@datacrest/dcuikit 0.1.2 → 0.1.4

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.
@@ -16,7 +16,7 @@ import*as e from"react";import t,{forwardRef as r,createElement as n,memo as o,u
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */const Be=r((({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:l,...s},c)=>n("svg",{ref:c,...We,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:Ae("lucide",i),...s},[...l.map((([e,t])=>n(e,t))),...Array.isArray(a)?a:[a]]))),_e=(e,t)=>{const o=r((({className:r,...o},i)=>{return n(Be,{ref:i,iconNode:t,className:Ae(`lucide-${a=Re(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...o});var a}));return o.displayName=Re(e),o},Fe=_e("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),He=_e("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),$e=_e("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ve=_e("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),qe=_e("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Ye=_e("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ue=_e("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ge=_e("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Xe=_e("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Ze=_e("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Ke=_e("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Qe=_e("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Je=_e("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),et=_e("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),tt=_e("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rt=({loading:e,children:r,iconLeft:n,iconRight:o})=>t.createElement("div",{className:De("flex items-center justify-center gap-2 transition-all duration-300",e?"opacity-0":"opacity-100")},n&&t.createElement("span",{className:"flex-shrink-0"},n),t.createElement("span",{className:"relative z-10"},r),o&&t.createElement("span",{className:"flex-shrink-0"},o)),nt=t.forwardRef((({iconLeft:e,iconRight:r,variant:n="primary",displayType:o="default",status:i="accepted",size:a="medium",loading:l=!1,disabled:s=!1,dataTestId:c,fluid:u=!1,className:d,...f},p)=>{const m=De("group relative inline-flex items-center justify-center font-medium","rounded-md ring-offset-background transition-all duration-300","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50 disabled:border-input","before:absolute before:inset-0 before:rounded-md before:transition-all before:duration-300","after:absolute after:inset-0 after:rounded-md after:transition-all after:duration-300"),y={default:"",badge:{accepted:"bg-primary/5 text-primary border border-primary/20",pending:"bg-amber-50 text-amber-600 border border-amber-200"}},h={primary:De("bg-primary text-primary-foreground","border border-primary","shadow-[0_2px_10px] shadow-primary/30 dark:shadow-primary/20","hover:shadow-[0_8px_25px] hover:shadow-primary/40 dark:hover:shadow-primary/30","hover:bg-primary/90 hover:border-primary","active:shadow-[0_2px_6px] active:shadow-primary/30 dark:active:shadow-primary/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),secondary:De("bg-gradient-to-br from-card via-card/95 to-card/90 text-card-foreground","border border-primary/30 dark:border-primary/20","shadow-[0_4px_20px] shadow-card/30 dark:shadow-card/20","hover:shadow-[0_8px_35px] hover:shadow-card/40 dark:hover:shadow-card/30","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/90 hover:border-primary/60","active:shadow-[0_2px_10px] active:shadow-card/30 active:translate-y-[1px]"),tertiary:De("bg-background text-foreground dark:bg-muted","border-2 border-primary/40 dark:border-primary/30","shadow-[0_2px_10px] shadow-foreground/5 dark:shadow-background/5","hover:border-primary hover:bg-accent dark:hover:bg-muted/90","hover:shadow-[0_8px_25px] hover:shadow-foreground/10 dark:hover:shadow-background/10","active:bg-accent/90 dark:active:bg-muted/80","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-b after:from-white/40 after:to-transparent dark:after:from-white/10"),danger:De("bg-destructive text-destructive-foreground","border border-destructive","shadow-[0_2px_10px] shadow-destructive/30 dark:shadow-destructive/20","hover:shadow-[0_8px_25px] hover:shadow-destructive/40 dark:hover:shadow-destructive/30","hover:bg-destructive/90 hover:border-destructive/90","active:shadow-[0_2px_6px] active:shadow-destructive/30 dark:active:shadow-destructive/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),warning:De("bg-warning text-warning-foreground","border border-primary/50 dark:border-primary/40","shadow-[0_2px_10px] shadow-warning/30 dark:shadow-warning/20","hover:shadow-[0_8px_25px] hover:shadow-warning/40 dark:hover:shadow-warning/30","hover:bg-warning/90 hover:border-primary","active:shadow-[0_2px_6px] active:shadow-warning/30 dark:active:shadow-warning/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),harford:De("bg-[#043d5a] text-primary-foreground","border border-[#043d5a]","shadow-[0_2px_10px] shadow-[#043d5a]/30 dark:shadow-[#043d5a]/20","hover:shadow-[0_8px_25px] hover:shadow-[#043d5a]/40 dark:hover:shadow-[#043d5a]/30","hover:bg-[#043d5a]/90 hover:border-[#043d5a]","active:shadow-[0_2px_6px] active:shadow-[#043d5a]/30 dark:active:shadow-[#043d5a]/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),link:De("text-primary dark:text-primary/90 underline-offset-4","hover:text-primary/90 dark:hover:text-primary/80 hover:underline","bg-transparent border-none shadow-none","active:text-primary/80 dark:active:text-primary/70","before:hidden after:hidden")};return t.createElement("button",{...f,ref:p,disabled:"badge"===o||(l||s),"data-test-id":c,onMouseMove:e=>{if("badge"===o)return;const t=e.currentTarget,r=t.getBoundingClientRect(),n=e.clientX-r.left,i=e.clientY-r.top;t.style.setProperty("--mouse-x",`${n}px`),t.style.setProperty("--mouse-y",`${i}px`)},className:De(m,"default"===o?h[n]:"badge"===o?y.badge[i]:y[o],{small:"h-8 px-3 text-sm",medium:"h-10 px-4 py-2",large:"h-12 px-6 text-lg"}[a],u&&"w-full","default"===o&&"active:scale-[0.98] transition-transform duration-300",d)},l&&"badge"!==o&&t.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},t.createElement(Qe,{className:"h-5 w-5 animate-spin"})),t.createElement(rt,{loading:l,iconLeft:e,iconRight:r},f.children))}));
19
+ */const Be=r((({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:l,...s},c)=>n("svg",{ref:c,...We,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:Ae("lucide",i),...s},[...l.map((([e,t])=>n(e,t))),...Array.isArray(a)?a:[a]]))),_e=(e,t)=>{const o=r((({className:r,...o},i)=>{return n(Be,{ref:i,iconNode:t,className:Ae(`lucide-${a=Re(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...o});var a}));return o.displayName=Re(e),o},Fe=_e("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),He=_e("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),$e=_e("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ve=_e("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),qe=_e("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Ye=_e("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ue=_e("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ge=_e("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Xe=_e("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Ze=_e("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Ke=_e("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Qe=_e("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Je=_e("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),et=_e("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),tt=_e("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rt=({loading:e,children:r,iconLeft:n,iconRight:o})=>t.createElement("div",{className:De("flex items-center justify-center gap-2 transition-all duration-300",e?"opacity-0":"opacity-100")},n&&t.createElement("span",{className:"flex-shrink-0"},n),t.createElement("span",{className:"relative z-10"},r),o&&t.createElement("span",{className:"flex-shrink-0"},o)),nt=t.forwardRef((({iconLeft:e,iconRight:r,variant:n="primary",displayType:o="default",status:i="accepted",size:a="medium",loading:l=!1,disabled:s=!1,dataTestId:c,fluid:u=!1,className:d,...f},p)=>{const m=De("group relative inline-flex items-center justify-center font-medium","rounded-md ring-offset-background transition-all duration-300","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50 disabled:border-input","before:absolute before:inset-0 before:rounded-md before:transition-all before:duration-300","after:absolute after:inset-0 after:rounded-md after:transition-all after:duration-300"),y={primary:De("bg-primary text-primary-foreground","border border-primary","shadow-[0_2px_10px] shadow-primary/30 dark:shadow-primary/20","hover:shadow-[0_8px_25px] hover:shadow-primary/40 dark:hover:shadow-primary/30","hover:bg-primary/90 hover:border-primary","active:shadow-[0_2px_6px] active:shadow-primary/30 dark:active:shadow-primary/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),secondary:De("bg-gradient-to-br from-card via-card/95 to-card/90 text-card-foreground","border border-primary/30 dark:border-primary/20","shadow-[0_4px_20px] shadow-card/30 dark:shadow-card/20","hover:shadow-[0_8px_35px] hover:shadow-card/40 dark:hover:shadow-card/30","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/90 hover:border-primary/60","active:shadow-[0_2px_10px] active:shadow-card/30 active:translate-y-[1px]"),tertiary:De("bg-background text-foreground dark:bg-muted","border-2 border-primary/40 dark:border-primary/30","shadow-[0_2px_10px] shadow-foreground/5 dark:shadow-background/5","hover:border-primary hover:bg-accent dark:hover:bg-muted/90","hover:shadow-[0_8px_25px] hover:shadow-foreground/10 dark:hover:shadow-background/10","active:bg-accent/90 dark:active:bg-muted/80","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-b after:from-white/40 after:to-transparent dark:after:from-white/10"),danger:De("bg-destructive text-destructive-foreground","border border-destructive","shadow-[0_2px_10px] shadow-destructive/30 dark:shadow-destructive/20","hover:shadow-[0_8px_25px] hover:shadow-destructive/40 dark:hover:shadow-destructive/30","hover:bg-destructive/90 hover:border-destructive/90","active:shadow-[0_2px_6px] active:shadow-destructive/30 dark:active:shadow-destructive/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),warning:De("bg-warning text-warning-foreground","border border-primary/50 dark:border-primary/40","shadow-[0_2px_10px] shadow-warning/30 dark:shadow-warning/20","hover:shadow-[0_8px_25px] hover:shadow-warning/40 dark:hover:shadow-warning/30","hover:bg-warning/90 hover:border-primary","active:shadow-[0_2px_6px] active:shadow-warning/30 dark:active:shadow-warning/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),harford:De("bg-[#043d5a] text-primary-foreground","border border-[#043d5a]","shadow-[0_2px_10px] shadow-[#043d5a]/30 dark:shadow-[#043d5a]/20","hover:shadow-[0_8px_25px] hover:shadow-[#043d5a]/40 dark:hover:shadow-[#043d5a]/30","hover:bg-[#043d5a]/90 hover:border-[#043d5a]","active:shadow-[0_2px_6px] active:shadow-[#043d5a]/30 dark:active:shadow-[#043d5a]/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-gradient-to-t after:from-black/10 after:to-transparent"),link:De("text-primary dark:text-primary/90 underline-offset-4","hover:text-primary/90 dark:hover:text-primary/80 hover:underline","bg-transparent border-none shadow-none","active:text-primary/80 dark:active:text-primary/70","before:hidden after:hidden")};return t.createElement("button",{...f,ref:p,disabled:l||s,"data-test-id":c,onMouseMove:e=>{const t=e.currentTarget,r=t.getBoundingClientRect(),n=e.clientX-r.left,o=e.clientY-r.top;t.style.setProperty("--mouse-x",`${n}px`),t.style.setProperty("--mouse-y",`${o}px`)},className:De(m,"default"===o?De(y[n],{small:"h-8 px-3 text-sm",medium:"h-10 px-4 py-2",large:"h-12 px-6 text-lg"}[a]):De({primary:"bg-primary text-primary-foreground border border-primary shadow py-0.5 px-2.5 text-xs font-medium",secondary:"bg-secondary text-secondary-foreground border border-secondary shadow py-0.5 px-2.5 text-xs font-medium",tertiary:"bg-muted text-muted-foreground border border-muted-foreground/30 shadow py-0.5 px-2.5 text-xs font-medium",danger:"bg-destructive text-destructive-foreground border border-destructive shadow py-0.5 px-2.5 text-xs font-medium",warning:"bg-warning text-warning-foreground border border-warning shadow py-0.5 px-2.5 text-xs font-medium",harford:"bg-[#043d5a] text-primary-foreground border border-[#043d5a] shadow py-0.5 px-2.5 text-xs font-medium",link:"bg-primary text-primary-foreground border border-primary shadow py-0.5 px-2.5 text-xs font-medium underline underline-offset-2"}[n],"accepted"!==i&&{accepted:"",pending:"bg-amber-500 text-amber-50 border-amber-600"}[i]),u&&"w-full","default"===o&&"active:scale-[0.98] transition-transform duration-300",d)},l&&"badge"!==o&&t.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},t.createElement(Qe,{className:"h-5 w-5 animate-spin"})),t.createElement(rt,{loading:l,iconLeft:e,iconRight:r},f.children))}));
20
20
  /**
21
21
  * @license lucide-react v0.487.0 - ISC
22
22
  *
@@ -40,7 +40,7 @@ object-assign
40
40
  Copyright (c) 2018 Jed Watson.
41
41
  Licensed under the MIT License (MIT), see
42
42
  http://jedwatson.github.io/classnames
43
- */var tg,rg=(Jv||(Jv=1,tg=eg,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var i in r)e.call(r,i)&&r[i]&&(o=n(o,i));return o}function n(e,t){return t?e?e+" "+t:e+t:e}tg.exports?(t.default=t,tg.exports=t):window.classNames=t}()),eg.exports),ng=ot(rg);const og={extraSmall:"mt-1 mb-1",small:"mt-2 mb-2",medium:"mt-4 mb-4",large:"mt-6 mb-6",extraLarge:"mt-8 mb-8"},ig={tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},ag={h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-xl",h5:"text-lg",h6:"text-base"},lg={primary:"text-primary",secondary:"text-secondary",tertiary:"text-destructive",quaternary:"text-warning",quinary:"text-muted-foreground",white:"text-white"},sg={normal:"font-normal",bold:"font-bold",semibold:"font-semibold",light:"font-light"},cg={body:"text-base",paragraph:"text-lg",caption:"text-sm",small:"text-xs",regular:"text-base",paragraphSm:"text-md",captionSm:"text-xs"},ug=({variant:e,color:r="primary",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ng(cg[e],lg[r],sg[l],n?og[n]:"",o?og[o]:"",i?ig[i]:"",a);return t.createElement("p",{className:u,...c},s)},dg=({variant:e="h1",color:r="primary",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ng(ag[e],lg[r],sg[l],n?og[n]:"",o?og[o]:"",i?ig[i]:"",a);return t.createElement(e,{className:u,...c},s)},fg=({value:e,fluid:r,label:n,leftIcon:o,rightIcon:a,togglePassword:s,error:c,success:u,hint:d,disabled:f,type:p="text",hintTextProps:m={variant:"small"},className:y="",dataTestId:h,inputSize:v,...g})=>{const[b,w]=i(!1),[O,x]=i(!1),E=l((()=>b?t.createElement(Gv,{name:"EyeOff",size:16}):t.createElement(Gv,{name:"Eye",size:16})),[b]),k=l((()=>{let t="relative flex items-center p-1 rounded border";return t+=f?" bg-muted text-muted-foreground":c?" border-destructive text-destructive":u?" border-success text-success":e?" border-primary":" border-input",r&&(t+=" w-full"),`${t} ${y}`}),[f,c,u,e,r,y]),j=`peer w-full outline-none bg-transparent placeholder-transparent ${f?"text-muted-foreground":"text-foreground"} ${"password"===p?"pr-10":""}`,P=l((()=>"password"===p&&b?"text":p),[p,b]),N=`absolute left-2 bg-background px-1 transform transition-all duration-200 ease-in-out ${e||O?"-top-4 text-sm text-muted-foreground":"top-1/2 -translate-y-1/2 text-base text-muted-foreground"} ${O&&!e?"text-primary":""}`;return t.createElement("div",{className:k},o&&t.createElement("div",{className:"flex items-center mr-2"},o),t.createElement("div",{className:"relative w-full"},t.createElement("input",{...g,"data-test-id":h,id:g.id,value:e,disabled:f,type:P,className:j,placeholder:" ",onFocus:e=>{x(!0),g.onFocus?.(e)},onBlur:e=>{x(!1),g.onBlur?.(e)}}),t.createElement("label",{htmlFor:g.id,className:N},n)),"password"===p&&s&&t.createElement("button",{type:"button",className:"absolute right-3",onClick:()=>{!f&&e&&w(!b)},disabled:f},E),a&&t.createElement("div",{className:"flex items-center ml-2"},a),(c||u||d)&&t.createElement("div",{className:"mt-1 text-sm"},t.createElement(ug,{...m},c?.message&&c.message,u?.message&&!c?.message&&u.message,!(c?.message||u?.message)&&d?.message)))};function pg(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function mg(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yg(...e){return t=>{let r=!1;const n=e.map((e=>{const n=mg(e,t);return r||"function"!=typeof n||(r=!0),n}));if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():mg(e[t],null)}}}}function hg(...t){return e.useCallback(yg(...t),t)}function vg(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo((()=>l),Object.values(l));return g(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},gg(o,...r)]}function gg(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}var bg=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(xg);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return g(wg,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return g(wg,{...o,ref:r,children:n})}));bg.displayName="Slot";var wg=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?yg(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null}));wg.displayName="SlotClone";var Og=({children:e})=>g(b,{children:e});function xg(t){return e.isValidElement(t)&&t.type===Og}var Eg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?bg:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),g(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});var kg=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},jg=e["useId".toString()]||(()=>{}),Pg=0;function Ng(t){const[r,n]=e.useState(jg());return kg((()=>{n((e=>e??String(Pg++)))}),[t]),r?`radix-${r}`:""}function Sg(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}function Cg({prop:t,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[o]=n,i=e.useRef(o),a=Sg(r);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==t,l=a?t:o,s=Sg(n);return[l,e.useCallback((e=>{if(a){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else i(e)}),[a,t,i,s])]}var zg=e.createContext(void 0);function Tg(t){const r=e.useContext(zg);return t||r||"ltr"}var Lg="rovingFocusGroup.onEntryFocus",Mg={bubbles:!1,cancelable:!0},Ig="RovingFocusGroup",[Dg,Rg,Ag]=function(e){const r=e+"CollectionProvider",[n,o]=vg(r),[i,a]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:n}=e,o=t.useRef(null),a=t.useRef(new Map).current;return g(i,{scope:r,itemMap:a,collectionRef:o,children:n})};l.displayName=r;const s=e+"CollectionSlot",c=t.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=hg(t,a(s,r).collectionRef);return g(bg,{ref:o,children:n})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=t.forwardRef(((e,r)=>{const{scope:n,children:o,...i}=e,l=t.useRef(null),s=hg(r,l),c=a(u,n);return t.useEffect((()=>(c.itemMap.set(l,{ref:l,...i}),()=>{c.itemMap.delete(l)}))),g(bg,{[d]:"",ref:s,children:o})}));return f.displayName=u,[{Provider:l,Slot:c,ItemSlot:f},function(r){const n=a(e+"CollectionConsumer",r);return t.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},o]}(Ig),[Wg,Bg]=vg(Ig,[Ag]),[_g,Fg]=Wg(Ig),Hg=e.forwardRef(((e,t)=>g(Dg.Provider,{scope:e.__scopeRovingFocusGroup,children:g(Dg.Slot,{scope:e.__scopeRovingFocusGroup,children:g($g,{...e,ref:t})})})));Hg.displayName=Ig;var $g=e.forwardRef(((t,r)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=e.useRef(null),m=hg(r,p),y=Tg(a),[h=null,v]=Cg({prop:l,defaultProp:s,onChange:c}),[b,w]=e.useState(!1),O=Sg(u),x=Rg(n),E=e.useRef(!1),[k,j]=e.useState(0);return e.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Lg,O),()=>e.removeEventListener(Lg,O)}),[O]),g(_g,{scope:n,orientation:o,dir:y,loop:i,currentTabStopId:h,onItemFocus:e.useCallback((e=>v(e)),[v]),onItemShiftTab:e.useCallback((()=>w(!0)),[]),onFocusableItemAdd:e.useCallback((()=>j((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>j((e=>e-1))),[]),children:g(Eg.div,{tabIndex:b||0===k?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:pg(t.onMouseDown,(()=>{E.current=!0})),onFocus:pg(t.onFocus,(e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(Lg,Mg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Ug([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}E.current=!1})),onBlur:pg(t.onBlur,(()=>w(!1)))})})})),Vg="RovingFocusGroupItem",qg=e.forwardRef(((t,r)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,...l}=t,s=Ng(),c=a||s,u=Fg(Vg,n),d=u.currentTabStopId===c,f=Rg(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=u;return e.useEffect((()=>{if(o)return p(),()=>m()}),[o,p,m]),g(Dg.ItemSlot,{scope:n,id:c,focusable:o,active:i,children:g(Eg.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...l,ref:r,onMouseDown:pg(t.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:pg(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:pg(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Yg[n]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(n=i+1,(r=o).map(((e,t)=>r[(n+t)%r.length]))):o.slice(i+1)}setTimeout((()=>Ug(o)))}var r,n}))})})}));qg.displayName=Vg;var Yg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ug(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Gg=Hg,Xg=qg;function Zg(t){const[r,n]=e.useState(void 0);return kg((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}function Kg(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}var Qg=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Jg(o.current);a.current="mounted"===s?e:"none"}),[s]),kg((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=Jg(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),kg((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=Jg(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=Jg(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=hg(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function Jg(e){return e?.animationName||"none"}Qg.displayName="Presence";var eb="Radio",[tb,rb]=vg(eb),[nb,ob]=tb(eb),ib=e.forwardRef(((t,r)=>{const{__scopeRadio:n,name:o,checked:i=!1,required:a,disabled:l,value:s="on",onCheck:c,form:u,...d}=t,[f,p]=e.useState(null),m=hg(r,(e=>p(e))),y=e.useRef(!1),h=!f||(u||!!f.closest("form"));return w(nb,{scope:n,checked:i,disabled:l,children:[g(Eg.button,{type:"button",role:"radio","aria-checked":i,"data-state":cb(i),"data-disabled":l?"":void 0,disabled:l,value:s,...d,ref:m,onClick:pg(t.onClick,(e=>{i||c?.(),h&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())}))}),h&&g(sb,{control:f,bubbles:!y.current,name:o,value:s,checked:i,required:a,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})}));ib.displayName=eb;var ab="RadioIndicator",lb=e.forwardRef(((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=ob(ab,r);return g(Qg,{present:n||i.checked,children:g(Eg.span,{"data-state":cb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})}));lb.displayName=ab;var sb=t=>{const{control:r,checked:n,bubbles:o=!0,...i}=t,a=e.useRef(null),l=Kg(n),s=Zg(r);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}}),[l,n,o]),g("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...t.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function cb(e){return e?"checked":"unchecked"}var ub=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],db="RadioGroup",[fb,pb]=vg(db,[Bg,rb]),mb=Bg(),yb=rb(),[hb,vb]=fb(db),gb=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:s,dir:c,loop:u=!0,onValueChange:d,...f}=e,p=mb(r),m=Tg(c),[y,h]=Cg({prop:i,defaultProp:o,onChange:d});return g(hb,{scope:r,name:n,required:a,disabled:l,value:y,onValueChange:h,children:g(Gg,{asChild:!0,...p,orientation:s,dir:m,loop:u,children:g(Eg.div,{role:"radiogroup","aria-required":a,"aria-orientation":s,"data-disabled":l?"":void 0,dir:m,...f,ref:t})})})}));gb.displayName=db;var bb="RadioGroupItem",wb=e.forwardRef(((t,r)=>{const{__scopeRadioGroup:n,disabled:o,...i}=t,a=vb(bb,n),l=a.disabled||o,s=mb(n),c=yb(n),u=e.useRef(null),d=hg(r,u),f=a.value===i.value,p=e.useRef(!1);return e.useEffect((()=>{const e=e=>{ub.includes(e.key)&&(p.current=!0)},t=()=>p.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),g(Xg,{asChild:!0,...s,focusable:!l,active:f,children:g(ib,{disabled:l,required:a.required,checked:f,...c,...i,name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:pg((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:pg(i.onFocus,(()=>{p.current&&u.current?.click()}))})})}));wb.displayName=bb;var Ob=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=yb(r);return g(lb,{...o,...n,ref:t})}));Ob.displayName="RadioGroupIndicator";var xb=gb,Eb=wb,kb=Ob;const jb=t.forwardRef((({className:e,classNames:r,showIcons:n=!0,withCard:o=!0,options:i,...a},l)=>t.createElement(xb,{ref:l,className:De("grid gap-2",e,r?.root),...a},i.map((e=>t.createElement("div",{key:e.id,className:De("relative")},t.createElement("label",{htmlFor:e.id,className:De("relative flex w-full items-center gap-x-3",o&&["cursor-pointer rounded-lg border-2 p-4","border-input bg-background hover:bg-accent hover:text-accent-foreground","data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"],!o&&"cursor-pointer py-2",r?.label)},t.createElement(Eb,{value:e.id,id:e.id,className:De("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r?.item)},t.createElement(kb,{className:De("flex items-center justify-center",r?.indicator)},t.createElement(Ge,{className:"h-2.5 w-2.5 fill-current text-current"}))),t.createElement("div",{className:"flex flex-1 items-center justify-between"},t.createElement("div",{className:De("space-y-1",!e.description&&"space-y-0")},t.createElement("p",{className:De("text-sm font-medium leading-none","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r?.text)},e.label),e.description&&t.createElement("p",{className:De("text-sm text-muted-foreground",r?.description)},e.description)),n&&e.icon&&t.createElement("div",{className:De("ml-4 flex-shrink-0 text-muted-foreground",r?.icon)},e.icon)))))))));jb.displayName="RadioGroup";var Pb="Switch",[Nb,Sb]=vg(Pb),[Cb,zb]=Nb(Pb),Tb=e.forwardRef(((t,r)=>{const{__scopeSwitch:n,name:o,checked:i,defaultChecked:a,required:l,disabled:s,value:c="on",onCheckedChange:u,form:d,...f}=t,[p,m]=e.useState(null),y=hg(r,(e=>m(e))),h=e.useRef(!1),v=!p||(d||!!p.closest("form")),[b=!1,O]=Cg({prop:i,defaultProp:a,onChange:u});return w(Cb,{scope:n,checked:b,disabled:s,children:[g(Eg.button,{type:"button",role:"switch","aria-checked":b,"aria-required":l,"data-state":Db(b),"data-disabled":s?"":void 0,disabled:s,value:c,...f,ref:y,onClick:pg(t.onClick,(e=>{O((e=>!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))}),v&&g(Ib,{control:p,bubbles:!h.current,name:o,value:c,checked:b,required:l,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})}));Tb.displayName=Pb;var Lb="SwitchThumb",Mb=e.forwardRef(((e,t)=>{const{__scopeSwitch:r,...n}=e,o=zb(Lb,r);return g(Eg.span,{"data-state":Db(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})}));Mb.displayName=Lb;var Ib=t=>{const{control:r,checked:n,bubbles:o=!0,...i}=t,a=e.useRef(null),l=Kg(n),s=Zg(r);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}}),[l,n,o]),g("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...t.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Db(e){return e?"checked":"unchecked"}var Rb=Tb,Ab=Mb;const Wb="medium",Bb="primary",_b={small:{switch:"w-8 h-4",thumb:"w-3 h-3",translate:"translate-x-4"},medium:{switch:"w-11 h-6",thumb:"w-5 h-5",translate:"translate-x-5"},large:{switch:"w-14 h-7",thumb:"w-6 h-6",translate:"translate-x-7"}},Fb={primary:{background:"bg-primary",foreground:"text-primary-foreground",hover:"hover:bg-primary/90"},success:{background:"bg-[rgb(var(--success))]",foreground:"text-[rgb(var(--success-foreground))]",hover:"hover:bg-[rgb(var(--success))]/90"},danger:{background:"bg-destructive",foreground:"text-destructive-foreground",hover:"hover:bg-destructive/90"},warning:{background:"bg-[rgb(var(--warning))]",foreground:"text-foreground",hover:"hover:bg-[rgb(var(--warning))]/90"}},Hb=({label:t,description:r,dataTestId:n})=>t||r?e.createElement("div",{className:"flex flex-col gap-1.5","data-test-id":n},t&&e.createElement(ug,{variant:"regular",color:"secondary"},t),r&&e.createElement(ug,{variant:"small",color:"secondary"},r)):null,$b=e.forwardRef((({label:t,description:r,size:n=Wb,variant:o=Bb,disabled:i=!1,loading:a=!1,className:l,onChange:s,dataTestId:c,checked:u,id:d,...f},p)=>{const m=n||Wb,y=o||Bb;return e.createElement("div",{className:"flex items-center"},e.createElement("label",{htmlFor:d,className:De("relative inline-flex items-start gap-3 select-none",i&&"cursor-not-allowed opacity-60",l)},e.createElement("div",{className:"relative"},e.createElement(Rb,{id:d,checked:u,onCheckedChange:e=>{i||a||s?.(e)},disabled:i||a,"data-test-id":`${c}-root`,ref:p,...f,className:De("peer relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors","border-2 border-transparent","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",_b[m].switch,u?De(Fb[y].background,Fb[y].foreground):"bg-input",i&&"cursor-not-allowed")},e.createElement(Ab,{className:De("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform","flex items-center justify-center",_b[m].thumb,u?_b[m].translate:"translate-x-0.5"),"data-test-id":`${c}-thumb`},a&&e.createElement(Je,{className:"animate-spin text-black",size:{small:12,medium:16,large:20}[m]})))),e.createElement(Hb,{label:t,description:r,dataTestId:c,disabled:i})))}));$b.displayName="Switch";const Vb=["small","medium","large"],qb=["primary","success","danger","warning"];var Yb,Ub;!function(e){e.Success="success",e.Error="error",e.Warning="warning",e.Info="info"}(Yb||(Yb={})),function(e){e.TopCenter="top-center",e.TopLeft="top-left",e.TopRight="top-right",e.BottomCenter="bottom-center",e.BottomLeft="bottom-left",e.BottomRight="bottom-right"}(Ub||(Ub={}));const Gb=({id:e,destroy:r,title:n,description:o,variant:l=Yb.Info,duration:u=5e3,animationDuration:d=400,icon:f,dataTestId:p})=>{const[m,y]=i(!1),[h]=i(!1),v=s(null),g=s(null),b=s(0),w=s(u),O=c((()=>{g.current&&clearTimeout(g.current),y(!0),setTimeout((()=>{r()}),d)}),[r,d]);a((()=>(b.current=Date.now(),w.current=u,v.current&&(v.current.style.width="100%",v.current.style.transition="none",v.current.offsetWidth,v.current.style.transition=`width ${u}ms linear`,v.current.style.width="0%"),g.current=window.setTimeout((()=>{O()}),u),()=>{g.current&&clearTimeout(g.current)})),[u,O]);const x={[Yb.Success]:"border-l-4 border-success bg-white text-foreground shadow-lg shadow-success/10",[Yb.Error]:"border-l-4 border-destructive bg-white text-foreground shadow-lg shadow-destructive/10",[Yb.Warning]:"border-l-4 border-warning bg-white text-foreground shadow-lg shadow-warning/10",[Yb.Info]:"border-l-4 border-primary bg-white text-foreground shadow-lg shadow-primary/10"},E={[Yb.Success]:"text-success",[Yb.Error]:"text-destructive",[Yb.Warning]:"text-warning",[Yb.Info]:"text-primary"},k={[Yb.Success]:"bg-success",[Yb.Error]:"bg-destructive",[Yb.Warning]:"bg-warning",[Yb.Info]:"bg-primary"};return t.createElement("div",{id:e??`${l}-${n}`,className:`relative flex items-center justify-between pointer-events-auto rounded-md backdrop-blur-lg max-w-md w-full overflow-hidden\n ${x[l]} ${m?"animate-slide-out opacity-0":"animate-slide-in opacity-100"} ${h?"scale-[1.02] shadow-xl":"scale-100"}`,"data-test-id":p,style:{transition:`all ${d}ms cubic-bezier(0.4, 0, 0.2, 1)`}},t.createElement("div",{className:"flex items-center gap-3 p-4 w-full"},f&&t.createElement("div",{className:`flex ${E[l]} ${h?"scale-110":"scale-100"}`,style:{transition:"transform 250ms ease"}},f),t.createElement("div",{className:"flex flex-col gap-1"},t.createElement("h1",{className:"font-medium text-sm m-0 leading-none tracking-tight"},n),o&&t.createElement("p",{className:"text-xs text-muted-foreground m-0 leading-tight"},o)),t.createElement("button",{onClick:O,className:"ml-auto p-1 rounded-full hover:bg-accent transition-colors group "+(h?"opacity-100":"opacity-70"),"aria-label":"Close notification"},t.createElement(tt,{size:14,className:"text-muted-foreground transition-transform group-hover:rotate-90"}))),!m&&t.createElement("div",{className:`absolute bottom-0 left-0 h-[2px] ${k[l]}`,ref:v,style:{width:"100%",transformOrigin:"left"}}))};const Xb=new class{isSetup=!1;isBrowser="undefined"!=typeof window;containers={[Ub.TopCenter]:void 0,[Ub.TopLeft]:void 0,[Ub.TopRight]:void 0,[Ub.BottomCenter]:void 0,[Ub.BottomLeft]:void 0,[Ub.BottomRight]:void 0};roots={[Ub.TopCenter]:null,[Ub.TopLeft]:null,[Ub.TopRight]:null,[Ub.BottomCenter]:null,[Ub.BottomLeft]:null,[Ub.BottomRight]:null};messages={[Ub.TopCenter]:[],[Ub.TopLeft]:[],[Ub.TopRight]:[],[Ub.BottomCenter]:[],[Ub.BottomLeft]:[],[Ub.BottomRight]:[]};constructor(){this.isBrowser&&this.setup()}setup(){if(!this.isBrowser)return;const e=document.getElementsByTagName("body")[0];Object.values(Ub).forEach((t=>{const r=`message-container-${t}`;let n=document.getElementById(r);n||(n=document.createElement("div"),n.id=r,e.appendChild(n)),this.containers[t]=n,this.roots[t]=k(n)})),this.isSetup=!0}show(e){if(!this.isBrowser)return;this.isSetup||this.setup();const t=e.position||Ub.TopCenter,r=e.id||`message-${Math.random().toString().slice(2,11)}`,n=50*this.messages[t].length,o={id:r,...e,animationDuration:e.animationDuration||300,destroy:()=>this.destroy(r,t)};setTimeout((()=>{this.messages[t]=[o,...this.messages[t]],this.render(t)}),n)}destroy(e,t=Ub.TopCenter){this.isBrowser&&(this.messages[t]=this.messages[t].filter((t=>t.id!==e)),this.render(t))}success(e){this.show({icon:t.createElement(Vv,{size:18}),...e,variant:Yb.Success})}error(e){this.show({icon:t.createElement(Bv,{size:18}),...e,variant:Yb.Error})}warning(e){this.show({icon:t.createElement(Wv,{size:18}),...e,variant:Yb.Warning})}info(e){this.show({icon:t.createElement(Av,{size:18}),...e,variant:Yb.Info})}getPositionStyles(e){switch(e){case Ub.TopLeft:return"fixed flex flex-col items-start justify-start gap-2 p-4 top-0 left-0 z-[9999] pointer-events-none";case Ub.TopRight:return"fixed flex flex-col items-end justify-start gap-2 p-4 top-0 right-0 z-[9999] pointer-events-none";case Ub.BottomCenter:return"fixed flex flex-col items-center justify-end gap-2 p-4 bottom-0 left-0 right-0 z-[9999] pointer-events-none";case Ub.BottomLeft:return"fixed flex flex-col items-start justify-end gap-2 p-4 bottom-0 left-0 z-[9999] pointer-events-none";case Ub.BottomRight:return"fixed flex flex-col items-end justify-end gap-2 p-4 bottom-0 right-0 z-[9999] pointer-events-none";case Ub.TopCenter:default:return"fixed flex flex-col items-center justify-start gap-2 p-4 top-0 left-0 right-0 z-[9999] pointer-events-none"}}render(e=Ub.TopCenter){if(!this.isBrowser||!this.roots[e])return;const r=this.messages[e].map((e=>t.createElement(Gb,{key:e.id,...e})));this.roots[e].render(t.createElement("div",{className:this.getPositionStyles(e)},r))}};var Zb;!function(e){e.Left="left",e.Center="center",e.Right="right"}(Zb||(Zb={}));const Kb="...",Qb=({className:t,...r})=>e.createElement("nav",{role:"navigation","aria-label":"pagination",className:De("mx-auto flex w-full justify-center",t),...r}),Jb=e.forwardRef((({className:t,...r},n)=>e.createElement("ul",{ref:n,className:De("flex flex-row items-center gap-1",t),...r})));Jb.displayName="PaginationContent";const ew=e.forwardRef((({className:t,...r},n)=>e.createElement("li",{ref:n,className:De("",t),...r})));ew.displayName="PaginationItem";const tw=e.forwardRef((({className:t,isActive:r,size:n="medium",...o},i)=>e.createElement(nt,{ref:i,"aria-current":r?"page":void 0,variant:r?"primary":"link",size:n,className:De("h-9 w-9",t),...o})));tw.displayName="PaginationLink";const rw=e.forwardRef((({className:t,...r},n)=>e.createElement(nt,{ref:n,variant:"link",size:"medium",className:De("h-9 w-9",t),...r},e.createElement(qe,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Previous page"))));rw.displayName="PaginationPrevious";const nw=e.forwardRef((({className:t,...r},n)=>e.createElement(nt,{ref:n,variant:"link",size:"medium",className:De("h-9 w-9",t),...r},e.createElement("span",{className:"sr-only"},"Next page"),e.createElement(Ye,{className:"h-4 w-4"}))));nw.displayName="PaginationNext";const ow=({className:t,...r})=>e.createElement("span",{"aria-hidden":!0,className:De("flex h-9 w-9 items-center justify-center",t),...r},e.createElement(Xe,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"More pages"));ow.displayName="PaginationEllipsis";const iw=(e,t)=>{const r=t-e+1;return Array.from({length:r},((t,r)=>r+e))},aw=({currentPage:e,totalPages:r,onPageChange:n,siblingCount:o=1,className:i,disabled:s=!1,isLoading:u=!1,enableKeyboardNav:d=!0,showEllipsis:f=!0})=>{const p=l((()=>((e,t,r,n)=>{if(r+5>=t)return iw(1,t);const o=Math.max(e-r,1),i=Math.min(e+r,t),a=o>2,l=i<t-2;if(!a&&l){const e=iw(1,3+2*r);return n?[...e,Kb,t]:[...e,t]}if(a&&!l){const e=iw(t-(3+2*r)+1,t);return n?[1,Kb,...e]:[1,...e]}if(a&&l){const e=iw(o,i);return n?[1,Kb,...e,Kb,t]:[1,...e,t]}return iw(1,t)})(e,r,o,f)),[e,r,o,f]),m=c((()=>{!s&&!u&&e>1&&n(e-1)}),[e,n,s,u]),y=c((()=>{!s&&!u&&e<r&&n(e+1)}),[e,r,n,s,u]),h=c((e=>{s||u||!d||("ArrowLeft"===e.key?(e.preventDefault(),m()):"ArrowRight"===e.key&&(e.preventDefault(),y()))}),[m,y,s,u,d]);return a((()=>{if(d)return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)}),[h,d]),0===e||p.length<2?null:t.createElement(Qb,{className:De("select-none",i)},t.createElement(Jb,null,t.createElement(ew,null,t.createElement(rw,{onClick:m,disabled:1===e||s||u,className:De("transition-all duration-200","hover:scale-105 hover:bg-accent",(s||u)&&"pointer-events-none opacity-50"),"aria-label":"Previous page"})),p.map(((r,o)=>{if(r===Kb)return t.createElement(ew,{key:`dots-${o}`},t.createElement(ow,null));const i=r,a=i===e;return t.createElement(ew,{key:i},t.createElement(tw,{isActive:a,onClick:()=>!s&&!u&&n(i),className:De("transition-all duration-200",a&&"hover:bg-primary/90",!a&&"hover:bg-accent hover:scale-105",(s||u)&&"pointer-events-none opacity-50"),"aria-label":`Page ${i}`,"aria-current":a?"page":void 0},i))})),t.createElement(ew,null,t.createElement(nw,{onClick:y,disabled:e===r||s||u,className:De("transition-all duration-200","hover:scale-105 hover:bg-accent",(s||u)&&"pointer-events-none opacity-50"),"aria-label":"Next page"}))))},lw=({columns:e,data:r,sortable:n=!1,pagination:o=!1,searchable:s=!1,currentPage:u=1,pageSize:d=5,onSort:f,onPageChange:p})=>{const[m,y]=i(null),[h,v]=i(u),[g,b]=i(d),[w,O]=i("");a((()=>{v(u)}),[u]);const x=c((e=>{if(!n||!e.sortable)return;let t="asc";m?.key===e.key&&"asc"===m.direction&&(t="desc"),y({key:e.key,direction:t}),f&&f(e.key,t)}),[m,n,f]),E=l((()=>m&&n?[...r].sort(((e,t)=>{const r=e[m.key],n=t[m.key];return r<n?"asc"===m.direction?-1:1:r>n?"asc"===m.direction?1:-1:0})):r),[r,m,n]),k=c((e=>{O(e.target.value),v(1)}),[]),j=l((()=>s&&w.trim()?E.filter((t=>e.some((e=>{const r=t[e.key];return null!=r&&String(r).toLowerCase().includes(w.toLowerCase())})))):E),[E,e,w,s]),P=l((()=>Math.max(1,Math.ceil(j.length/g))),[j.length,g]),N=l((()=>{if(o){const e=(h-1)*g;return j.slice(e,e+g)}return j}),[j,h,g,o]),S=c((e=>{e<1||e>P||(v(e),p&&p(e))}),[P,p]),C=c((e=>{b(e),v(1)}),[]),z=c(((e=Zb.Left)=>({left:"text-left",center:"text-center",right:"text-right"}[e])),[]);return t.createElement("div",{className:"w-full"},t.createElement("div",{className:"flex flex-wrap items-center justify-between mb-6 gap-6"},s&&t.createElement("div",{className:"w-80"},t.createElement(fg,{id:"table-search",value:w,onChange:k,label:"Search",rightIcon:t.createElement(et,{size:16,className:"text-muted-foreground"})})),o&&t.createElement("div",{className:"flex items-center space-x-3 ml-auto"},t.createElement("label",{htmlFor:"page-size-select",className:"text-sm font-medium text-muted-foreground"},"Rows per page"),t.createElement("select",{id:"page-size-select",value:g,onChange:e=>C(parseInt(e.target.value)),className:"h-9 rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-colors"},[5,10,20,50].map((e=>t.createElement("option",{key:e,value:e},e)))))),t.createElement("div",{className:"relative w-full overflow-auto rounded-lg border shadow-sm"},t.createElement("table",{className:"w-full caption-bottom text-sm"},t.createElement("thead",{className:"bg-muted/40"},t.createElement("tr",{className:"border-b border-border"},e.map((e=>t.createElement("th",{key:e.key,className:`h-11 px-6 ${z(e.align)} font-medium text-muted-foreground`,style:{width:e.width||"auto"},onClick:()=>x(e)},t.createElement("div",{className:`flex items-center ${e.align===Zb.Left?"justify-start":e.align===Zb.Center?"justify-center":"justify-end"} ${n&&e.sortable?"cursor-pointer select-none":""}`},t.createElement("span",null,e.title),n&&e.sortable&&t.createElement("div",{className:"ml-2"},m?.key===e.key?"asc"===m.direction?t.createElement(Ue,{className:"h-4 w-4 text-primary"}):t.createElement(Ve,{className:"h-4 w-4 text-primary"}):t.createElement(Fe,{className:"h-4 w-4 opacity-40"})))))))),t.createElement("tbody",{className:"[&_tr:last-child]:border-0"},N.length>0?N.map(((r,n)=>t.createElement("tr",{key:n,className:"border-b border-border transition-colors hover:bg-muted/30 data-[state=selected]:bg-muted"},e.map((e=>t.createElement("td",{key:e.key,className:`p-4 px-6 ${z(e.align)}`,style:{width:e.width||"auto"}},r[e.key])))))):t.createElement("tr",null,t.createElement("td",{colSpan:e.length,className:"py-10 px-6 text-center text-muted-foreground"},"No data available"))))),o&&P>0&&t.createElement("div",{className:"flex items-center justify-end px-3 mt-6 gap-6"},t.createElement("div",{className:"text-sm font-medium text-muted-foreground"},"Showing"," ",t.createElement("span",{className:"text-foreground"},Math.min((h-1)*g+1,j.length))," ","to"," ",t.createElement("span",{className:"text-foreground"},Math.min(h*g,j.length))," ","of ",t.createElement("span",{className:"text-foreground"},j.length)," ","entries"),t.createElement(aw,{currentPage:h,totalPages:P,onPageChange:S,disabled:!1,isLoading:!1})))};function sw(t){var r=t.children,n=t.prefixCls,o=t.id,i=t.overlayInnerStyle,a=t.bodyClassName,l=t.className,s=t.style;return e.createElement("div",{className:ng("".concat(n,"-content"),l),style:s},e.createElement("div",{className:ng("".concat(n,"-inner"),a),id:o,role:"tooltip",style:i},"function"==typeof r?r():r))}function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cw.apply(null,arguments)}function uw(e){return uw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uw(e)}function dw(e){var t=function(e,t){if("object"!=uw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=uw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uw(t)?t:t+""}function fw(e,t,r){return(t=dw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pw(Object(r),!0).forEach((function(t){fw(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pw(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yw(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vw(e,t){if(e){if("string"==typeof e)return hw(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hw(e,t):void 0}}function gw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||vw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bw(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var ww={},Ow=[];function xw(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Ow.reduce((function(e,t){return t(null!=e?e:"","warning")}),t);r&&console.error("Warning: ".concat(r))}}function Ew(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Ow.reduce((function(e,t){return t(null!=e?e:"","note")}),t);r&&console.warn("Note: ".concat(r))}}function kw(e,t,r){t||ww[r]||(e(!1,r),ww[r]=!0)}function jw(e,t){kw(xw,e,t)}jw.preMessage=function(e){Ow.push(e)},jw.resetWarned=function(){ww={}},jw.noteOnce=function(e,t){kw(Ew,e,t)};var Pw,Nw={exports:{}},Sw={};var Cw,zw,Tw={};
43
+ */var tg,rg=(Jv||(Jv=1,tg=eg,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var i in r)e.call(r,i)&&r[i]&&(o=n(o,i));return o}function n(e,t){return t?e?e+" "+t:e+t:e}tg.exports?(t.default=t,tg.exports=t):window.classNames=t}()),eg.exports),ng=ot(rg);const og={extraSmall:"mt-1 mb-1",small:"mt-2 mb-2",medium:"mt-4 mb-4",large:"mt-6 mb-6",extraLarge:"mt-8 mb-8"},ig={tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},ag={h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-xl",h5:"text-lg",h6:"text-base"},lg={primary:"text-primary",secondary:"text-secondary",tertiary:"text-destructive",quaternary:"text-warning",quinary:"text-muted-foreground",white:"text-white",harford:"text-[#043d5a]"},sg={normal:"font-normal",bold:"font-bold",semibold:"font-semibold",light:"font-light"},cg={body:"text-base",paragraph:"text-lg",caption:"text-sm",small:"text-xs",regular:"text-base",paragraphSm:"text-md",captionSm:"text-xs"},ug=({variant:e,color:r="harford",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ng(cg[e],lg[r],sg[l],n?og[n]:"",o?og[o]:"",i?ig[i]:"",a);return t.createElement("p",{className:u,...c},s)},dg=({variant:e="h1",color:r="harford",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ng(ag[e],lg[r],sg[l],n?og[n]:"",o?og[o]:"",i?ig[i]:"",a);return t.createElement(e,{className:u,...c},s)},fg=({value:e,fluid:r,label:n,leftIcon:o,rightIcon:a,togglePassword:s,error:c,success:u,hint:d,disabled:f,type:p="text",hintTextProps:m={variant:"small"},className:y="",dataTestId:h,inputSize:v,...g})=>{const[b,w]=i(!1),[O,x]=i(!1),E=l((()=>b?t.createElement(Gv,{name:"EyeOff",size:16}):t.createElement(Gv,{name:"Eye",size:16})),[b]),k=l((()=>{let t="relative flex items-center p-1 rounded border";return t+=f?" bg-muted text-muted-foreground":c?" border-destructive text-destructive":u?" border-success text-success":e?" border-primary":" border-input",r&&(t+=" w-full"),`${t} ${y}`}),[f,c,u,e,r,y]),j=`peer w-full outline-none bg-transparent placeholder-transparent ${f?"text-muted-foreground":"text-foreground"} ${"password"===p?"pr-10":""}`,P=l((()=>"password"===p&&b?"text":p),[p,b]),N=`absolute left-2 bg-background px-1 transform transition-all duration-200 ease-in-out ${e||O?"-top-4 text-sm text-muted-foreground":"top-1/2 -translate-y-1/2 text-base text-muted-foreground"} ${O&&!e?"text-primary":""}`;return t.createElement("div",{className:k},o&&t.createElement("div",{className:"flex items-center mr-2"},o),t.createElement("div",{className:"relative w-full"},t.createElement("input",{...g,"data-test-id":h,id:g.id,value:e,disabled:f,type:P,className:j,placeholder:" ",onFocus:e=>{x(!0),g.onFocus?.(e)},onBlur:e=>{x(!1),g.onBlur?.(e)}}),t.createElement("label",{htmlFor:g.id,className:N},n)),"password"===p&&s&&t.createElement("button",{type:"button",className:"absolute right-3",onClick:()=>{!f&&e&&w(!b)},disabled:f},E),a&&t.createElement("div",{className:"flex items-center ml-2"},a),(c||u||d)&&t.createElement("div",{className:"mt-1 text-sm"},t.createElement(ug,{...m},c?.message&&c.message,u?.message&&!c?.message&&u.message,!(c?.message||u?.message)&&d?.message)))};function pg(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function mg(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yg(...e){return t=>{let r=!1;const n=e.map((e=>{const n=mg(e,t);return r||"function"!=typeof n||(r=!0),n}));if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():mg(e[t],null)}}}}function hg(...t){return e.useCallback(yg(...t),t)}function vg(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo((()=>l),Object.values(l));return g(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},gg(o,...r)]}function gg(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}var bg=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(xg);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return g(wg,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return g(wg,{...o,ref:r,children:n})}));bg.displayName="Slot";var wg=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?yg(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null}));wg.displayName="SlotClone";var Og=({children:e})=>g(b,{children:e});function xg(t){return e.isValidElement(t)&&t.type===Og}var Eg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?bg:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),g(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});var kg=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},jg=e["useId".toString()]||(()=>{}),Pg=0;function Ng(t){const[r,n]=e.useState(jg());return kg((()=>{n((e=>e??String(Pg++)))}),[t]),r?`radix-${r}`:""}function Sg(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}function Cg({prop:t,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[o]=n,i=e.useRef(o),a=Sg(r);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==t,l=a?t:o,s=Sg(n);return[l,e.useCallback((e=>{if(a){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else i(e)}),[a,t,i,s])]}var zg=e.createContext(void 0);function Tg(t){const r=e.useContext(zg);return t||r||"ltr"}var Lg="rovingFocusGroup.onEntryFocus",Mg={bubbles:!1,cancelable:!0},Ig="RovingFocusGroup",[Dg,Rg,Ag]=function(e){const r=e+"CollectionProvider",[n,o]=vg(r),[i,a]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:n}=e,o=t.useRef(null),a=t.useRef(new Map).current;return g(i,{scope:r,itemMap:a,collectionRef:o,children:n})};l.displayName=r;const s=e+"CollectionSlot",c=t.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=hg(t,a(s,r).collectionRef);return g(bg,{ref:o,children:n})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=t.forwardRef(((e,r)=>{const{scope:n,children:o,...i}=e,l=t.useRef(null),s=hg(r,l),c=a(u,n);return t.useEffect((()=>(c.itemMap.set(l,{ref:l,...i}),()=>{c.itemMap.delete(l)}))),g(bg,{[d]:"",ref:s,children:o})}));return f.displayName=u,[{Provider:l,Slot:c,ItemSlot:f},function(r){const n=a(e+"CollectionConsumer",r);return t.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},o]}(Ig),[Wg,Bg]=vg(Ig,[Ag]),[_g,Fg]=Wg(Ig),Hg=e.forwardRef(((e,t)=>g(Dg.Provider,{scope:e.__scopeRovingFocusGroup,children:g(Dg.Slot,{scope:e.__scopeRovingFocusGroup,children:g($g,{...e,ref:t})})})));Hg.displayName=Ig;var $g=e.forwardRef(((t,r)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=e.useRef(null),m=hg(r,p),y=Tg(a),[h=null,v]=Cg({prop:l,defaultProp:s,onChange:c}),[b,w]=e.useState(!1),O=Sg(u),x=Rg(n),E=e.useRef(!1),[k,j]=e.useState(0);return e.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Lg,O),()=>e.removeEventListener(Lg,O)}),[O]),g(_g,{scope:n,orientation:o,dir:y,loop:i,currentTabStopId:h,onItemFocus:e.useCallback((e=>v(e)),[v]),onItemShiftTab:e.useCallback((()=>w(!0)),[]),onFocusableItemAdd:e.useCallback((()=>j((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>j((e=>e-1))),[]),children:g(Eg.div,{tabIndex:b||0===k?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:pg(t.onMouseDown,(()=>{E.current=!0})),onFocus:pg(t.onFocus,(e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(Lg,Mg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Ug([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}E.current=!1})),onBlur:pg(t.onBlur,(()=>w(!1)))})})})),Vg="RovingFocusGroupItem",qg=e.forwardRef(((t,r)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,...l}=t,s=Ng(),c=a||s,u=Fg(Vg,n),d=u.currentTabStopId===c,f=Rg(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=u;return e.useEffect((()=>{if(o)return p(),()=>m()}),[o,p,m]),g(Dg.ItemSlot,{scope:n,id:c,focusable:o,active:i,children:g(Eg.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...l,ref:r,onMouseDown:pg(t.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:pg(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:pg(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Yg[n]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(n=i+1,(r=o).map(((e,t)=>r[(n+t)%r.length]))):o.slice(i+1)}setTimeout((()=>Ug(o)))}var r,n}))})})}));qg.displayName=Vg;var Yg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ug(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Gg=Hg,Xg=qg;function Zg(t){const[r,n]=e.useState(void 0);return kg((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}function Kg(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}var Qg=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Jg(o.current);a.current="mounted"===s?e:"none"}),[s]),kg((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=Jg(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),kg((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=Jg(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=Jg(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=hg(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function Jg(e){return e?.animationName||"none"}Qg.displayName="Presence";var eb="Radio",[tb,rb]=vg(eb),[nb,ob]=tb(eb),ib=e.forwardRef(((t,r)=>{const{__scopeRadio:n,name:o,checked:i=!1,required:a,disabled:l,value:s="on",onCheck:c,form:u,...d}=t,[f,p]=e.useState(null),m=hg(r,(e=>p(e))),y=e.useRef(!1),h=!f||(u||!!f.closest("form"));return w(nb,{scope:n,checked:i,disabled:l,children:[g(Eg.button,{type:"button",role:"radio","aria-checked":i,"data-state":cb(i),"data-disabled":l?"":void 0,disabled:l,value:s,...d,ref:m,onClick:pg(t.onClick,(e=>{i||c?.(),h&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())}))}),h&&g(sb,{control:f,bubbles:!y.current,name:o,value:s,checked:i,required:a,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})}));ib.displayName=eb;var ab="RadioIndicator",lb=e.forwardRef(((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=ob(ab,r);return g(Qg,{present:n||i.checked,children:g(Eg.span,{"data-state":cb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})}));lb.displayName=ab;var sb=t=>{const{control:r,checked:n,bubbles:o=!0,...i}=t,a=e.useRef(null),l=Kg(n),s=Zg(r);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}}),[l,n,o]),g("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...t.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function cb(e){return e?"checked":"unchecked"}var ub=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],db="RadioGroup",[fb,pb]=vg(db,[Bg,rb]),mb=Bg(),yb=rb(),[hb,vb]=fb(db),gb=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:s,dir:c,loop:u=!0,onValueChange:d,...f}=e,p=mb(r),m=Tg(c),[y,h]=Cg({prop:i,defaultProp:o,onChange:d});return g(hb,{scope:r,name:n,required:a,disabled:l,value:y,onValueChange:h,children:g(Gg,{asChild:!0,...p,orientation:s,dir:m,loop:u,children:g(Eg.div,{role:"radiogroup","aria-required":a,"aria-orientation":s,"data-disabled":l?"":void 0,dir:m,...f,ref:t})})})}));gb.displayName=db;var bb="RadioGroupItem",wb=e.forwardRef(((t,r)=>{const{__scopeRadioGroup:n,disabled:o,...i}=t,a=vb(bb,n),l=a.disabled||o,s=mb(n),c=yb(n),u=e.useRef(null),d=hg(r,u),f=a.value===i.value,p=e.useRef(!1);return e.useEffect((()=>{const e=e=>{ub.includes(e.key)&&(p.current=!0)},t=()=>p.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),g(Xg,{asChild:!0,...s,focusable:!l,active:f,children:g(ib,{disabled:l,required:a.required,checked:f,...c,...i,name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:pg((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:pg(i.onFocus,(()=>{p.current&&u.current?.click()}))})})}));wb.displayName=bb;var Ob=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=yb(r);return g(lb,{...o,...n,ref:t})}));Ob.displayName="RadioGroupIndicator";var xb=gb,Eb=wb,kb=Ob;const jb=t.forwardRef((({className:e,classNames:r,showIcons:n=!0,withCard:o=!0,options:i,...a},l)=>t.createElement(xb,{ref:l,className:De("grid gap-2",e,r?.root),...a},i.map((e=>t.createElement("div",{key:e.id,className:De("relative")},t.createElement("label",{htmlFor:e.id,className:De("relative flex w-full items-center gap-x-3",o&&["cursor-pointer rounded-lg border-2 p-4","border-input bg-background hover:bg-accent hover:text-accent-foreground","data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"],!o&&"cursor-pointer py-2",r?.label)},t.createElement(Eb,{value:e.id,id:e.id,className:De("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r?.item)},t.createElement(kb,{className:De("flex items-center justify-center",r?.indicator)},t.createElement(Ge,{className:"h-2.5 w-2.5 fill-current text-current"}))),t.createElement("div",{className:"flex flex-1 items-center justify-between"},t.createElement("div",{className:De("space-y-1",!e.description&&"space-y-0")},t.createElement("p",{className:De("text-sm font-medium leading-none","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r?.text)},e.label),e.description&&t.createElement("p",{className:De("text-sm text-muted-foreground",r?.description)},e.description)),n&&e.icon&&t.createElement("div",{className:De("ml-4 flex-shrink-0 text-muted-foreground",r?.icon)},e.icon)))))))));jb.displayName="RadioGroup";var Pb="Switch",[Nb,Sb]=vg(Pb),[Cb,zb]=Nb(Pb),Tb=e.forwardRef(((t,r)=>{const{__scopeSwitch:n,name:o,checked:i,defaultChecked:a,required:l,disabled:s,value:c="on",onCheckedChange:u,form:d,...f}=t,[p,m]=e.useState(null),y=hg(r,(e=>m(e))),h=e.useRef(!1),v=!p||(d||!!p.closest("form")),[b=!1,O]=Cg({prop:i,defaultProp:a,onChange:u});return w(Cb,{scope:n,checked:b,disabled:s,children:[g(Eg.button,{type:"button",role:"switch","aria-checked":b,"aria-required":l,"data-state":Db(b),"data-disabled":s?"":void 0,disabled:s,value:c,...f,ref:y,onClick:pg(t.onClick,(e=>{O((e=>!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))}),v&&g(Ib,{control:p,bubbles:!h.current,name:o,value:c,checked:b,required:l,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})}));Tb.displayName=Pb;var Lb="SwitchThumb",Mb=e.forwardRef(((e,t)=>{const{__scopeSwitch:r,...n}=e,o=zb(Lb,r);return g(Eg.span,{"data-state":Db(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})}));Mb.displayName=Lb;var Ib=t=>{const{control:r,checked:n,bubbles:o=!0,...i}=t,a=e.useRef(null),l=Kg(n),s=Zg(r);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}}),[l,n,o]),g("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...t.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Db(e){return e?"checked":"unchecked"}var Rb=Tb,Ab=Mb;const Wb="medium",Bb="primary",_b={small:{switch:"w-8 h-4",thumb:"w-3 h-3",translate:"translate-x-4"},medium:{switch:"w-11 h-6",thumb:"w-5 h-5",translate:"translate-x-5"},large:{switch:"w-14 h-7",thumb:"w-6 h-6",translate:"translate-x-7"}},Fb={primary:{background:"bg-primary",foreground:"text-primary-foreground",hover:"hover:bg-primary/90"},success:{background:"bg-[rgb(var(--success))]",foreground:"text-[rgb(var(--success-foreground))]",hover:"hover:bg-[rgb(var(--success))]/90"},danger:{background:"bg-destructive",foreground:"text-destructive-foreground",hover:"hover:bg-destructive/90"},warning:{background:"bg-[rgb(var(--warning))]",foreground:"text-foreground",hover:"hover:bg-[rgb(var(--warning))]/90"}},Hb=({label:t,description:r,dataTestId:n})=>t||r?e.createElement("div",{className:"flex flex-col gap-1.5","data-test-id":n},t&&e.createElement(ug,{variant:"regular",color:"secondary"},t),r&&e.createElement(ug,{variant:"small",color:"secondary"},r)):null,$b=e.forwardRef((({label:t,description:r,size:n=Wb,variant:o=Bb,disabled:i=!1,loading:a=!1,className:l,onChange:s,dataTestId:c,checked:u,id:d,...f},p)=>{const m=n||Wb,y=o||Bb;return e.createElement("div",{className:"flex items-center"},e.createElement("label",{htmlFor:d,className:De("relative inline-flex items-start gap-3 select-none",i&&"cursor-not-allowed opacity-60",l)},e.createElement("div",{className:"relative"},e.createElement(Rb,{id:d,checked:u,onCheckedChange:e=>{i||a||s?.(e)},disabled:i||a,"data-test-id":`${c}-root`,ref:p,...f,className:De("peer relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors","border-2 border-transparent","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",_b[m].switch,u?De(Fb[y].background,Fb[y].foreground):"bg-input",i&&"cursor-not-allowed")},e.createElement(Ab,{className:De("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform","flex items-center justify-center",_b[m].thumb,u?_b[m].translate:"translate-x-0.5"),"data-test-id":`${c}-thumb`},a&&e.createElement(Je,{className:"animate-spin text-black",size:{small:12,medium:16,large:20}[m]})))),e.createElement(Hb,{label:t,description:r,dataTestId:c,disabled:i})))}));$b.displayName="Switch";const Vb=["small","medium","large"],qb=["primary","success","danger","warning"];var Yb,Ub;!function(e){e.Success="success",e.Error="error",e.Warning="warning",e.Info="info"}(Yb||(Yb={})),function(e){e.TopCenter="top-center",e.TopLeft="top-left",e.TopRight="top-right",e.BottomCenter="bottom-center",e.BottomLeft="bottom-left",e.BottomRight="bottom-right"}(Ub||(Ub={}));const Gb=({id:e,destroy:r,title:n,description:o,variant:l=Yb.Info,duration:u=5e3,animationDuration:d=400,icon:f,dataTestId:p})=>{const[m,y]=i(!1),[h]=i(!1),v=s(null),g=s(null),b=s(0),w=s(u),O=c((()=>{g.current&&clearTimeout(g.current),y(!0),setTimeout((()=>{r()}),d)}),[r,d]);a((()=>(b.current=Date.now(),w.current=u,v.current&&(v.current.style.width="100%",v.current.style.transition="none",v.current.offsetWidth,v.current.style.transition=`width ${u}ms linear`,v.current.style.width="0%"),g.current=window.setTimeout((()=>{O()}),u),()=>{g.current&&clearTimeout(g.current)})),[u,O]);const x={[Yb.Success]:"border-l-4 border-success bg-white text-foreground shadow-lg shadow-success/10",[Yb.Error]:"border-l-4 border-destructive bg-white text-foreground shadow-lg shadow-destructive/10",[Yb.Warning]:"border-l-4 border-warning bg-white text-foreground shadow-lg shadow-warning/10",[Yb.Info]:"border-l-4 border-primary bg-white text-foreground shadow-lg shadow-primary/10"},E={[Yb.Success]:"text-success",[Yb.Error]:"text-destructive",[Yb.Warning]:"text-warning",[Yb.Info]:"text-primary"},k={[Yb.Success]:"bg-success",[Yb.Error]:"bg-destructive",[Yb.Warning]:"bg-warning",[Yb.Info]:"bg-primary"};return t.createElement("div",{id:e??`${l}-${n}`,className:`relative flex items-center justify-between pointer-events-auto rounded-md backdrop-blur-lg max-w-md w-full overflow-hidden\n ${x[l]} ${m?"animate-slide-out opacity-0":"animate-slide-in opacity-100"} ${h?"scale-[1.02] shadow-xl":"scale-100"}`,"data-test-id":p,style:{transition:`all ${d}ms cubic-bezier(0.4, 0, 0.2, 1)`}},t.createElement("div",{className:"flex items-center gap-3 p-4 w-full"},f&&t.createElement("div",{className:`flex ${E[l]} ${h?"scale-110":"scale-100"}`,style:{transition:"transform 250ms ease"}},f),t.createElement("div",{className:"flex flex-col gap-1"},t.createElement("h1",{className:"font-medium text-sm m-0 leading-none tracking-tight"},n),o&&t.createElement("p",{className:"text-xs text-muted-foreground m-0 leading-tight"},o)),t.createElement("button",{onClick:O,className:"ml-auto p-1 rounded-full hover:bg-accent transition-colors group "+(h?"opacity-100":"opacity-70"),"aria-label":"Close notification"},t.createElement(tt,{size:14,className:"text-muted-foreground transition-transform group-hover:rotate-90"}))),!m&&t.createElement("div",{className:`absolute bottom-0 left-0 h-[2px] ${k[l]}`,ref:v,style:{width:"100%",transformOrigin:"left"}}))};const Xb=new class{isSetup=!1;isBrowser="undefined"!=typeof window;containers={[Ub.TopCenter]:void 0,[Ub.TopLeft]:void 0,[Ub.TopRight]:void 0,[Ub.BottomCenter]:void 0,[Ub.BottomLeft]:void 0,[Ub.BottomRight]:void 0};roots={[Ub.TopCenter]:null,[Ub.TopLeft]:null,[Ub.TopRight]:null,[Ub.BottomCenter]:null,[Ub.BottomLeft]:null,[Ub.BottomRight]:null};messages={[Ub.TopCenter]:[],[Ub.TopLeft]:[],[Ub.TopRight]:[],[Ub.BottomCenter]:[],[Ub.BottomLeft]:[],[Ub.BottomRight]:[]};constructor(){this.isBrowser&&this.setup()}setup(){if(!this.isBrowser)return;const e=document.getElementsByTagName("body")[0];Object.values(Ub).forEach((t=>{const r=`message-container-${t}`;let n=document.getElementById(r);n||(n=document.createElement("div"),n.id=r,e.appendChild(n)),this.containers[t]=n,this.roots[t]=k(n)})),this.isSetup=!0}show(e){if(!this.isBrowser)return;this.isSetup||this.setup();const t=e.position||Ub.TopCenter,r=e.id||`message-${Math.random().toString().slice(2,11)}`,n=50*this.messages[t].length,o={id:r,...e,animationDuration:e.animationDuration||300,destroy:()=>this.destroy(r,t)};setTimeout((()=>{this.messages[t]=[o,...this.messages[t]],this.render(t)}),n)}destroy(e,t=Ub.TopCenter){this.isBrowser&&(this.messages[t]=this.messages[t].filter((t=>t.id!==e)),this.render(t))}success(e){this.show({icon:t.createElement(Vv,{size:18}),...e,variant:Yb.Success})}error(e){this.show({icon:t.createElement(Bv,{size:18}),...e,variant:Yb.Error})}warning(e){this.show({icon:t.createElement(Wv,{size:18}),...e,variant:Yb.Warning})}info(e){this.show({icon:t.createElement(Av,{size:18}),...e,variant:Yb.Info})}getPositionStyles(e){switch(e){case Ub.TopLeft:return"fixed flex flex-col items-start justify-start gap-2 p-4 top-0 left-0 z-[9999] pointer-events-none";case Ub.TopRight:return"fixed flex flex-col items-end justify-start gap-2 p-4 top-0 right-0 z-[9999] pointer-events-none";case Ub.BottomCenter:return"fixed flex flex-col items-center justify-end gap-2 p-4 bottom-0 left-0 right-0 z-[9999] pointer-events-none";case Ub.BottomLeft:return"fixed flex flex-col items-start justify-end gap-2 p-4 bottom-0 left-0 z-[9999] pointer-events-none";case Ub.BottomRight:return"fixed flex flex-col items-end justify-end gap-2 p-4 bottom-0 right-0 z-[9999] pointer-events-none";case Ub.TopCenter:default:return"fixed flex flex-col items-center justify-start gap-2 p-4 top-0 left-0 right-0 z-[9999] pointer-events-none"}}render(e=Ub.TopCenter){if(!this.isBrowser||!this.roots[e])return;const r=this.messages[e].map((e=>t.createElement(Gb,{key:e.id,...e})));this.roots[e].render(t.createElement("div",{className:this.getPositionStyles(e)},r))}};var Zb;!function(e){e.Left="left",e.Center="center",e.Right="right"}(Zb||(Zb={}));const Kb="...",Qb=({className:t,...r})=>e.createElement("nav",{role:"navigation","aria-label":"pagination",className:De("mx-auto flex w-full justify-center",t),...r}),Jb=e.forwardRef((({className:t,...r},n)=>e.createElement("ul",{ref:n,className:De("flex flex-row items-center gap-1",t),...r})));Jb.displayName="PaginationContent";const ew=e.forwardRef((({className:t,...r},n)=>e.createElement("li",{ref:n,className:De("",t),...r})));ew.displayName="PaginationItem";const tw=e.forwardRef((({className:t,isActive:r,size:n="medium",...o},i)=>e.createElement(nt,{ref:i,"aria-current":r?"page":void 0,variant:r?"primary":"link",size:n,className:De("h-9 w-9",t),...o})));tw.displayName="PaginationLink";const rw=e.forwardRef((({className:t,...r},n)=>e.createElement(nt,{ref:n,variant:"link",size:"medium",className:De("h-9 w-9",t),...r},e.createElement(qe,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Previous page"))));rw.displayName="PaginationPrevious";const nw=e.forwardRef((({className:t,...r},n)=>e.createElement(nt,{ref:n,variant:"link",size:"medium",className:De("h-9 w-9",t),...r},e.createElement("span",{className:"sr-only"},"Next page"),e.createElement(Ye,{className:"h-4 w-4"}))));nw.displayName="PaginationNext";const ow=({className:t,...r})=>e.createElement("span",{"aria-hidden":!0,className:De("flex h-9 w-9 items-center justify-center",t),...r},e.createElement(Xe,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"More pages"));ow.displayName="PaginationEllipsis";const iw=(e,t)=>{const r=t-e+1;return Array.from({length:r},((t,r)=>r+e))},aw=({currentPage:e,totalPages:r,onPageChange:n,siblingCount:o=1,className:i,disabled:s=!1,isLoading:u=!1,enableKeyboardNav:d=!0,showEllipsis:f=!0})=>{const p=l((()=>((e,t,r,n)=>{if(r+5>=t)return iw(1,t);const o=Math.max(e-r,1),i=Math.min(e+r,t),a=o>2,l=i<t-2;if(!a&&l){const e=iw(1,3+2*r);return n?[...e,Kb,t]:[...e,t]}if(a&&!l){const e=iw(t-(3+2*r)+1,t);return n?[1,Kb,...e]:[1,...e]}if(a&&l){const e=iw(o,i);return n?[1,Kb,...e,Kb,t]:[1,...e,t]}return iw(1,t)})(e,r,o,f)),[e,r,o,f]),m=c((()=>{!s&&!u&&e>1&&n(e-1)}),[e,n,s,u]),y=c((()=>{!s&&!u&&e<r&&n(e+1)}),[e,r,n,s,u]),h=c((e=>{s||u||!d||("ArrowLeft"===e.key?(e.preventDefault(),m()):"ArrowRight"===e.key&&(e.preventDefault(),y()))}),[m,y,s,u,d]);return a((()=>{if(d)return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)}),[h,d]),0===e||p.length<2?null:t.createElement(Qb,{className:De("select-none",i)},t.createElement(Jb,null,t.createElement(ew,null,t.createElement(rw,{onClick:m,disabled:1===e||s||u,className:De("transition-all duration-200","hover:scale-105 hover:bg-accent",(s||u)&&"pointer-events-none opacity-50"),"aria-label":"Previous page"})),p.map(((r,o)=>{if(r===Kb)return t.createElement(ew,{key:`dots-${o}`},t.createElement(ow,null));const i=r,a=i===e;return t.createElement(ew,{key:i},t.createElement(tw,{isActive:a,onClick:()=>!s&&!u&&n(i),className:De("transition-all duration-200",a&&"hover:bg-primary/90",!a&&"hover:bg-accent hover:scale-105",(s||u)&&"pointer-events-none opacity-50"),"aria-label":`Page ${i}`,"aria-current":a?"page":void 0},i))})),t.createElement(ew,null,t.createElement(nw,{onClick:y,disabled:e===r||s||u,className:De("transition-all duration-200","hover:scale-105 hover:bg-accent",(s||u)&&"pointer-events-none opacity-50"),"aria-label":"Next page"}))))},lw=({columns:e,data:r,sortable:n=!1,pagination:o=!1,searchable:s=!1,currentPage:u=1,pageSize:d=5,onSort:f,onPageChange:p})=>{const[m,y]=i(null),[h,v]=i(u),[g,b]=i(d),[w,O]=i("");a((()=>{v(u)}),[u]);const x=c((e=>{if(!n||!e.sortable)return;let t="asc";m?.key===e.key&&"asc"===m.direction&&(t="desc"),y({key:e.key,direction:t}),f&&f(e.key,t)}),[m,n,f]),E=l((()=>m&&n?[...r].sort(((e,t)=>{const r=e[m.key],n=t[m.key];return r<n?"asc"===m.direction?-1:1:r>n?"asc"===m.direction?1:-1:0})):r),[r,m,n]),k=c((e=>{O(e.target.value),v(1)}),[]),j=l((()=>s&&w.trim()?E.filter((t=>e.some((e=>{const r=t[e.key];return null!=r&&String(r).toLowerCase().includes(w.toLowerCase())})))):E),[E,e,w,s]),P=l((()=>Math.max(1,Math.ceil(j.length/g))),[j.length,g]),N=l((()=>{if(o){const e=(h-1)*g;return j.slice(e,e+g)}return j}),[j,h,g,o]),S=c((e=>{e<1||e>P||(v(e),p&&p(e))}),[P,p]),C=c((e=>{b(e),v(1)}),[]),z=c(((e=Zb.Left)=>({left:"text-left",center:"text-center",right:"text-right"}[e])),[]);return t.createElement("div",{className:"w-full"},t.createElement("div",{className:"flex flex-wrap items-center justify-between mb-6 gap-6"},s&&t.createElement("div",{className:"w-80"},t.createElement(fg,{id:"table-search",value:w,onChange:k,label:"Search",rightIcon:t.createElement(et,{size:16,className:"text-muted-foreground"})})),o&&t.createElement("div",{className:"flex items-center space-x-3 ml-auto"},t.createElement("label",{htmlFor:"page-size-select",className:"text-sm font-medium text-muted-foreground"},"Rows per page"),t.createElement("select",{id:"page-size-select",value:g,onChange:e=>C(parseInt(e.target.value)),className:"h-9 rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-colors"},[5,10,20,50].map((e=>t.createElement("option",{key:e,value:e},e)))))),t.createElement("div",{className:"relative w-full overflow-auto rounded-lg border shadow-sm"},t.createElement("table",{className:"w-full caption-bottom text-sm"},t.createElement("thead",{className:"bg-muted/40"},t.createElement("tr",{className:"border-b border-border"},e.map((e=>t.createElement("th",{key:e.key,className:`h-11 px-6 ${z(e.align)} font-medium text-muted-foreground`,style:{width:e.width||"auto"},onClick:()=>x(e)},t.createElement("div",{className:`flex items-center ${e.align===Zb.Left?"justify-start":e.align===Zb.Center?"justify-center":"justify-end"} ${n&&e.sortable?"cursor-pointer select-none":""}`},t.createElement("span",null,e.title),n&&e.sortable&&t.createElement("div",{className:"ml-2"},m?.key===e.key?"asc"===m.direction?t.createElement(Ue,{className:"h-4 w-4 text-primary"}):t.createElement(Ve,{className:"h-4 w-4 text-primary"}):t.createElement(Fe,{className:"h-4 w-4 opacity-40"})))))))),t.createElement("tbody",{className:"[&_tr:last-child]:border-0"},N.length>0?N.map(((r,n)=>t.createElement("tr",{key:n,className:"border-b border-border transition-colors hover:bg-muted/30 data-[state=selected]:bg-muted"},e.map((e=>t.createElement("td",{key:e.key,className:`p-4 px-6 ${z(e.align)}`,style:{width:e.width||"auto"}},r[e.key])))))):t.createElement("tr",null,t.createElement("td",{colSpan:e.length,className:"py-10 px-6 text-center text-muted-foreground"},"No data available"))))),o&&P>0&&t.createElement("div",{className:"flex items-center justify-end px-3 mt-6 gap-6"},t.createElement("div",{className:"text-sm font-medium text-muted-foreground"},"Showing"," ",t.createElement("span",{className:"text-foreground"},Math.min((h-1)*g+1,j.length))," ","to"," ",t.createElement("span",{className:"text-foreground"},Math.min(h*g,j.length))," ","of ",t.createElement("span",{className:"text-foreground"},j.length)," ","entries"),t.createElement(aw,{currentPage:h,totalPages:P,onPageChange:S,disabled:!1,isLoading:!1})))};function sw(t){var r=t.children,n=t.prefixCls,o=t.id,i=t.overlayInnerStyle,a=t.bodyClassName,l=t.className,s=t.style;return e.createElement("div",{className:ng("".concat(n,"-content"),l),style:s},e.createElement("div",{className:ng("".concat(n,"-inner"),a),id:o,role:"tooltip",style:i},"function"==typeof r?r():r))}function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cw.apply(null,arguments)}function uw(e){return uw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uw(e)}function dw(e){var t=function(e,t){if("object"!=uw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=uw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uw(t)?t:t+""}function fw(e,t,r){return(t=dw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pw(Object(r),!0).forEach((function(t){fw(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pw(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yw(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vw(e,t){if(e){if("string"==typeof e)return hw(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hw(e,t):void 0}}function gw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||vw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bw(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var ww={},Ow=[];function xw(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Ow.reduce((function(e,t){return t(null!=e?e:"","warning")}),t);r&&console.error("Warning: ".concat(r))}}function Ew(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Ow.reduce((function(e,t){return t(null!=e?e:"","note")}),t);r&&console.warn("Note: ".concat(r))}}function kw(e,t,r){t||ww[r]||(e(!1,r),ww[r]=!0)}function jw(e,t){kw(xw,e,t)}jw.preMessage=function(e){Ow.push(e)},jw.resetWarned=function(){ww={}},jw.noteOnce=function(e,t){kw(Ew,e,t)};var Pw,Nw={exports:{}},Sw={};var Cw,zw,Tw={};
44
44
  /**
45
45
  * @license React
46
46
  * react-is.development.js
@@ -49,5 +49,5 @@ object-assign
49
49
  *
50
50
  * This source code is licensed under the MIT license found in the
51
51
  * LICENSE file in the root directory of this source tree.
52
- */var Lw=(zw||(zw=1,"production"===process.env.NODE_ENV?Nw.exports=function(){if(Pw)return Sw;Pw=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case n:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case c:case p:case f:case a:return e;default:return m}}case r:return m}}}return e=Symbol.for("react.module.reference"),Sw.ContextConsumer=l,Sw.ContextProvider=a,Sw.Element=t,Sw.ForwardRef=c,Sw.Fragment=n,Sw.Lazy=p,Sw.Memo=f,Sw.Portal=r,Sw.Profiler=i,Sw.StrictMode=o,Sw.Suspense=u,Sw.SuspenseList=d,Sw.isAsyncMode=function(){return!1},Sw.isConcurrentMode=function(){return!1},Sw.isContextConsumer=function(e){return y(e)===l},Sw.isContextProvider=function(e){return y(e)===a},Sw.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Sw.isForwardRef=function(e){return y(e)===c},Sw.isFragment=function(e){return y(e)===n},Sw.isLazy=function(e){return y(e)===p},Sw.isMemo=function(e){return y(e)===f},Sw.isPortal=function(e){return y(e)===r},Sw.isProfiler=function(e){return y(e)===i},Sw.isStrictMode=function(e){return y(e)===o},Sw.isSuspense=function(e){return y(e)===u},Sw.isSuspenseList=function(e){return y(e)===d},Sw.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Sw.typeOf=y,Sw}():Nw.exports=(Cw||(Cw=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var y=e.type;switch(y){case n:case i:case o:case u:case d:return y;default:var h=y&&y.$$typeof;switch(h){case s:case l:case c:case p:case f:case a:return h;default:return m}}case r:return m}}}e=Symbol.for("react.module.reference");var h=l,v=a,g=t,b=c,w=n,O=p,x=f,E=r,k=i,j=o,P=u,N=d,S=!1,C=!1;Tw.ContextConsumer=h,Tw.ContextProvider=v,Tw.Element=g,Tw.ForwardRef=b,Tw.Fragment=w,Tw.Lazy=O,Tw.Memo=x,Tw.Portal=E,Tw.Profiler=k,Tw.StrictMode=j,Tw.Suspense=P,Tw.SuspenseList=N,Tw.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Tw.isConcurrentMode=function(e){return C||(C=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Tw.isContextConsumer=function(e){return y(e)===l},Tw.isContextProvider=function(e){return y(e)===a},Tw.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Tw.isForwardRef=function(e){return y(e)===c},Tw.isFragment=function(e){return y(e)===n},Tw.isLazy=function(e){return y(e)===p},Tw.isMemo=function(e){return y(e)===f},Tw.isPortal=function(e){return y(e)===r},Tw.isProfiler=function(e){return y(e)===i},Tw.isStrictMode=function(e){return y(e)===o},Tw.isSuspense=function(e){return y(e)===u},Tw.isSuspenseList=function(e){return y(e)===d},Tw.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Tw.typeOf=y}()),Tw)),Nw.exports);var Mw=Symbol.for("react.element"),Iw=Symbol.for("react.transitional.element"),Dw=Symbol.for("react.fragment");function Rw(e){return e&&"object"===uw(e)&&(e.$$typeof===Mw||e.$$typeof===Iw)&&e.type===Dw}var Aw=Number(u.split(".")[0]),Ww=function(e,t){"function"==typeof e?e(t):"object"===uw(e)&&e&&"current"in e&&(e.current=t)},Bw=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(e){t.forEach((function(t){Ww(t,e)}))}},_w=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o=function(){return Bw.apply(void 0,r)},i=r,a=function(e,t){return e.length!==t.length||e.every((function(e,r){return e!==t[r]}))},"value"in(l=e.useRef({})).current&&!a(l.current.condition,i)||(l.current.value=o(),l.current.condition=i),l.current.value;var o,i,a,l},Fw=function(e){var t,r,n;if(!e)return!1;if(d(n=e)&&!Rw(n)&&Aw>=19)return!0;var o=Lw.isMemo(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===Lw.ForwardRef)&&!!("function"!=typeof e||null!==(r=e.prototype)&&void 0!==r&&r.render||e.$$typeof===Lw.ForwardRef)};var Hw=e.createContext(null);function $w(e){return function(e){if(Array.isArray(e))return hw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||vw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Vw="test"!==process.env.NODE_ENV&&bw()?e.useLayoutEffect:e.useEffect,qw=function(t,r){var n=e.useRef(!0);Vw((function(){return t(n.current)}),r),Vw((function(){return n.current=!1,function(){n.current=!0}}),[])},Yw=[];var Uw="data-rc-order",Gw="data-rc-priority",Xw=new Map;function Zw(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function Kw(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Qw(e){return Array.from((Xw.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Jw(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!bw())return null;var r=t.csp,n=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(n),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Uw,a),l&&i&&s.setAttribute(Gw,"".concat(i)),null!=r&&r.nonce&&(s.nonce=null==r?void 0:r.nonce),s.innerHTML=e;var c=Kw(t),u=c.firstChild;if(n){if(l){var d=(t.styles||Qw(c)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Uw)))return!1;var t=Number(e.getAttribute(Gw)||0);return i>=t}));if(d.length)return c.insertBefore(s,d[d.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function eO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Kw(t);return(t.styles||Qw(r)).find((function(r){return r.getAttribute(Zw(t))===e}))}function tO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=eO(e,t);r&&Kw(t).removeChild(r)}function rO(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Kw(r),o=Qw(n),i=mw(mw({},r),{},{styles:o});!function(e,t){var r=Xw.get(e);if(!r||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}(document,r)){var n=Jw("",t),o=n.parentNode;Xw.set(e,o),e.removeChild(n)}}(n,i);var a=eO(t,i);if(a){var l,s,c;if(null!==(l=i.csp)&&void 0!==l&&l.nonce&&a.nonce!==(null===(s=i.csp)||void 0===s?void 0:s.nonce))a.nonce=null===(c=i.csp)||void 0===c?void 0:c.nonce;return a.innerHTML!==e&&(a.innerHTML=e),a}var u=Jw(e,i);return u.setAttribute(Zw(i),t),u}function nO(e){return"undefined"!=typeof document&&e&&e instanceof Element?function(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n,o,i=r.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var a=getComputedStyle(e);i.scrollbarColor=a.scrollbarColor,i.scrollbarWidth=a.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),s=parseInt(l.width,10),c=parseInt(l.height,10);try{var u=s?"width: ".concat(l.width,";"):"",d=c?"height: ".concat(l.height,";"):"";rO("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(d,"\n}"),t)}catch(e){console.error(e),n=s,o=c}}document.body.appendChild(r);var f=e&&n&&!isNaN(n)?n:r.offsetWidth-r.clientWidth,p=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),tO(t),{width:f,height:p}}(e):{width:0,height:0}}var oO="rc-util-locker-".concat(Date.now()),iO=0;function aO(t){var r=!!t,n=gw(e.useState((function(){return iO+=1,"".concat(oO,"_").concat(iO)})),1)[0];qw((function(){if(r){var e=nO(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;rO("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),n)}else tO(n);return function(){tO(n)}}),[r,n])}var lO=function(e){return!1!==e&&(bw()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},sO=e.forwardRef((function(t,r){var n=t.open,o=t.autoLock,i=t.getContainer,a=t.debug,l=t.autoDestroy,s=void 0===l||l,c=t.children,u=gw(e.useState(n),2),d=u[0],f=u[1],p=d||n;"production"!==process.env.NODE_ENV&&jw(bw()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),e.useEffect((function(){(s||n)&&f(n)}),[n,s]);var m=gw(e.useState((function(){return lO(i)})),2),y=m[0],h=m[1];e.useEffect((function(){var e=lO(i);h(null!=e?e:null)}));var v=function(t,r){var n=gw(e.useState((function(){if(!bw())return null;var e=document.createElement("div");return"production"!==process.env.NODE_ENV&&r&&e.setAttribute("data-debug",r),e})),1)[0],o=e.useRef(!1),i=e.useContext(Hw),a=gw(e.useState(Yw),2),l=a[0],s=a[1],c=i||(o.current?void 0:function(e){s((function(t){return[e].concat($w(t))}))});function u(){n.parentElement||document.body.appendChild(n),o.current=!0}function d(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return qw((function(){return t?i?i(u):u():d(),d}),[t]),qw((function(){l.length&&(l.forEach((function(e){return e()})),s(Yw))}),[l]),[n,c]}(p&&!y,a),g=gw(v,2),b=g[0],w=g[1],O=null!=y?y:b;aO(o&&n&&bw()&&(O===b||O===document.body));var x=null;c&&Fw(c)&&r&&(x=c.ref);var k=_w(x,r);if(!p||!bw()||void 0===y)return null;var j=!1===O||!1,P=c;return r&&(P=e.cloneElement(c,{ref:k})),e.createElement(Hw.Provider,{value:w},j?P:E(P,O))}));function cO(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return t.Children.forEach(e,(function(e){(null!=e||r.keepEmpty)&&(Array.isArray(e)?n=n.concat(cO(e)):Rw(e)&&e.props?n=n.concat(cO(e.props.children,r)):n.push(e))})),n}function uO(e){return e instanceof HTMLElement||e instanceof SVGElement}function dO(e){var r,n=function(e){return e&&"object"===uw(e)&&uO(e.nativeElement)?e.nativeElement:uO(e)?e:null}(e);return n||(e instanceof t.Component?null===(r=x.findDOMNode)||void 0===r?void 0:r.call(x,e):null)}"production"!==process.env.NODE_ENV&&(sO.displayName="Portal");var fO=e.createContext(null);var pO=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];e.call(t,o[1],o[0])}},t}()}(),mO="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,yO="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),hO="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(yO):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var vO=["top","right","bottom","left","width","height","size","weight"],gO="undefined"!=typeof MutationObserver,bO=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,o=0;function i(){r&&(r=!1,e()),n&&l()}function a(){hO(i)}function l(){var e=Date.now();if(r){if(e-o<2)return;n=!0}else r=!0,n=!1,setTimeout(a,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){mO&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gO?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){mO&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;vO.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),wO=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},OO=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||yO},xO=SO(0,0,0,0);function EO(e){return parseFloat(e)||0}function kO(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce((function(t,r){return t+EO(e["border-"+r+"-width"])}),0)}function jO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return xO;var n=OO(e).getComputedStyle(e),o=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],i=e["padding-"+o];t[o]=EO(i)}return t}(n),i=o.left+o.right,a=o.top+o.bottom,l=EO(n.width),s=EO(n.height);if("border-box"===n.boxSizing&&(Math.round(l+i)!==t&&(l-=kO(n,"left","right")+i),Math.round(s+a)!==r&&(s-=kO(n,"top","bottom")+a)),!function(e){return e===OO(e).document.documentElement}(e)){var c=Math.round(l+i)-t,u=Math.round(s+a)-r;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return SO(o.left,o.top,l,s)}var PO="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof OO(e).SVGGraphicsElement}:function(e){return e instanceof OO(e).SVGElement&&"function"==typeof e.getBBox};function NO(e){return mO?PO(e)?function(e){var t=e.getBBox();return SO(0,0,t.width,t.height)}(e):jO(e):xO}function SO(e,t,r,n){return{x:e,y:t,width:r,height:n}}var CO=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=SO(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=NO(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),zO=function(e,t){var r,n,o,i,a,l,s,c=(n=(r=t).x,o=r.y,i=r.width,a=r.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(l.prototype),wO(s,{x:n,y:o,width:i,height:a,top:o,right:n+i,bottom:a+o,left:n}),s);wO(this,{target:e,contentRect:c})},TO=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new pO,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof OO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new CO(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof OO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new zO(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),LO="undefined"!=typeof WeakMap?new WeakMap:new pO,MO=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=bO.getInstance(),n=new TO(t,r,this);LO.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){MO.prototype[e]=function(){var t;return(t=LO.get(this))[e].apply(t,arguments)}}));var IO=void 0!==yO.ResizeObserver?yO.ResizeObserver:MO,DO=new Map;function RO(e){e.forEach((function(e){var t,r=e.target;null===(t=DO.get(r))||void 0===t||t.forEach((function(e){return e(r)}))}))}var AO=new IO(RO);function WO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dw(n.key),n)}}function _O(e,t,r){return t&&BO(e.prototype,t),r&&BO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function FO(e,t){return FO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},FO(e,t)}function HO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FO(e,t)}function $O(e){return $O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$O(e)}function VO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(VO=function(){return!!e})()}function qO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YO(e){var t=VO();return function(){var r,n=$O(e);if(t){var o=$O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"==uw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qO(e)}(this,r)}}process.env.NODE_ENV,process.env.NODE_ENV;var UO=function(){HO(r,e.Component);var t=YO(r);function r(){return WO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function GO(t,r){var n=t.children,o=t.disabled,i=e.useRef(null),a=e.useRef(null),l=e.useContext(fO),s="function"==typeof n,c=s?n(i):n,u=e.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!s&&e.isValidElement(c)&&Fw(c),f=d?c.ref:null,p=_w(f,i),m=function(){var e;return dO(i.current)||(i.current&&"object"===uw(i.current)?dO(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||dO(a.current)};e.useImperativeHandle(r,(function(){return m()}));var y=e.useRef(t);y.current=t;var h=e.useCallback((function(e){var t=y.current,r=t.onResize,n=t.data,o=e.getBoundingClientRect(),i=o.width,a=o.height,s=e.offsetWidth,c=e.offsetHeight,d=Math.floor(i),f=Math.floor(a);if(u.current.width!==d||u.current.height!==f||u.current.offsetWidth!==s||u.current.offsetHeight!==c){var p={width:d,height:f,offsetWidth:s,offsetHeight:c};u.current=p;var m=s===Math.round(i)?i:s,h=c===Math.round(a)?a:c,v=mw(mw({},p),{},{offsetWidth:m,offsetHeight:h});null==l||l(v,e,n),r&&Promise.resolve().then((function(){r(v,e)}))}}),[]);return e.useEffect((function(){var e,t,r=m();return r&&!o&&(e=r,t=h,DO.has(e)||(DO.set(e,new Set),AO.observe(e)),DO.get(e).add(t)),function(){return function(e,t){DO.has(e)&&(DO.get(e).delete(t),DO.get(e).size||(AO.unobserve(e),DO.delete(e)))}(r,h)}}),[i.current,o]),e.createElement(UO,{ref:a},d?e.cloneElement(c,{ref:p}):c)}var XO=e.forwardRef(GO);"production"!==process.env.NODE_ENV&&(XO.displayName="SingleObserver");function ZO(t,r){var n=t.children,o="function"==typeof n?[n]:cO(n);return"production"!==process.env.NODE_ENV&&(o.length>1?xw(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):0===o.length&&xw(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),o.map((function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return e.createElement(XO,cw({},t,{key:i,ref:0===o?r:void 0}),n)}))}var KO=e.forwardRef(ZO);function QO(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function JO(e){return function(e){return QO(e)instanceof ShadowRoot}(e)?QO(e):null}function ex(t){var r=e.useRef();r.current=t;var n=e.useCallback((function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return null===(e=r.current)||void 0===e?void 0:e.call.apply(e,[r].concat(n))}),[]);return n}"production"!==process.env.NODE_ENV&&(KO.displayName="ResizeObserver"),KO.Collection=function(t){var r=t.children,n=t.onBatchResize,o=e.useRef(0),i=e.useRef([]),a=e.useContext(fO),l=e.useCallback((function(e,t,r){o.current+=1;var l=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){l===o.current&&(null==n||n(i.current),i.current=[])})),null==a||a(e,t,r)}),[n,a]);return e.createElement(fO.Provider,{value:l},r)};var tx=0,rx=mw({},e).useId,nx=rx?function(e){var t=rx();return e||("test"===process.env.NODE_ENV?"test-id":t)}:function(t){var r=gw(e.useState("ssr-id"),2),n=r[0],o=r[1];return e.useEffect((function(){var e=tx;tx+=1,o("rc_unique_".concat(e))}),[]),t||("test"===process.env.NODE_ENV?"test-id":n)},ox=e.createContext({}),ix=function(){HO(r,e.Component);var t=YO(r);function r(){return WO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function ax(t){var r=e.useRef(!1),n=gw(e.useState(t),2),o=n[0],i=n[1];return e.useEffect((function(){return r.current=!1,function(){r.current=!0}}),[]),[o,function(e,t){t&&r.current||i(e)}]}var lx="none",sx="appear",cx="enter",ux="leave",dx="none",fx="prepare",px="start",mx="active",yx="end",hx="prepared";function vx(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}var gx,bx,wx,Ox=(gx=bw(),bx="undefined"!=typeof window?window:{},wx={animationend:vx("Animation","AnimationEnd"),transitionend:vx("Transition","TransitionEnd")},gx&&("AnimationEvent"in bx||delete wx.animationend.animation,"TransitionEvent"in bx||delete wx.transitionend.transition),wx),xx={};if(bw()){var Ex=document.createElement("div");xx=Ex.style}var kx={};function jx(e){if(kx[e])return kx[e];var t=Ox[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o+=1){var i=r[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in xx)return kx[e]=t[i],kx[e]}return""}var Px=jx("animationend"),Nx=jx("transitionend"),Sx=!(!Px||!Nx),Cx=Px||"animationend",zx=Nx||"transitionend";function Tx(e,t){if(!e)return null;if("object"===uw(e)){var r=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[r]}return"".concat(e,"-").concat(t)}var Lx=bw()?f:a,Mx=function(e){return+setTimeout(e,16)},Ix=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(Mx=function(e){return window.requestAnimationFrame(e)},Ix=function(e){return window.cancelAnimationFrame(e)});var Dx=0,Rx=new Map;function Ax(e){Rx.delete(e)}var Wx=function(e){var t=Dx+=1;return function r(n){if(0===n)Ax(t),e();else{var o=Mx((function(){r(n-1)}));Rx.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};Wx.cancel=function(e){var t=Rx.get(e);return Ax(e),Ix(t)},"production"!==process.env.NODE_ENV&&(Wx.ids=function(){return Rx});var Bx=[fx,px,mx,yx],_x=[fx,hx],Fx=!1;function Hx(e){return e===mx||e===yx}var $x=function(t,r,n){var o=gw(ax(dx),2),i=o[0],a=o[1],l=function(){var t=e.useRef(null);function r(){Wx.cancel(t.current)}return e.useEffect((function(){return function(){r()}}),[]),[function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;r();var i=Wx((function(){o<=1?n({isCanceled:function(){return i!==t.current}}):e(n,o-1)}));t.current=i},r]}(),s=gw(l,2),c=s[0],u=s[1];var d=r?_x:Bx;return Lx((function(){if(i!==dx&&i!==yx){var e=d.indexOf(i),t=d[e+1],r=n(i);r===Fx?a(t,!0):t&&c((function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[t,i]),e.useEffect((function(){return function(){u()}}),[]),[function(){a(fx,!0)},i]};function Vx(t,r,n,o){var i,l,c,u=o.motionEnter,d=void 0===u||u,f=o.motionAppear,p=void 0===f||f,m=o.motionLeave,y=void 0===m||m,h=o.motionDeadline,v=o.motionLeaveImmediately,g=o.onAppearPrepare,b=o.onEnterPrepare,w=o.onLeavePrepare,O=o.onAppearStart,x=o.onEnterStart,E=o.onLeaveStart,k=o.onAppearActive,j=o.onEnterActive,P=o.onLeaveActive,N=o.onAppearEnd,S=o.onEnterEnd,C=o.onLeaveEnd,z=o.onVisibleChanged,T=gw(ax(),2),L=T[0],M=T[1],I=(i=lx,l=gw(e.useReducer((function(e){return e+1}),0),2)[1],c=e.useRef(i),[ex((function(){return c.current})),ex((function(e){c.current="function"==typeof e?e(c.current):e,l()}))]),D=gw(I,2),R=D[0],A=D[1],W=gw(ax(null),2),B=W[0],_=W[1],F=R(),H=s(!1),$=s(null);function V(){return n()}var q=s(!1);function Y(){A(lx),_(null,!0)}var U=ex((function(e){var t=R();if(t!==lx){var r=V();if(!e||e.deadline||e.target===r){var n,o=q.current;t===sx&&o?n=null==N?void 0:N(r,e):t===cx&&o?n=null==S?void 0:S(r,e):t===ux&&o&&(n=null==C?void 0:C(r,e)),o&&!1!==n&&Y()}}})),G=function(t){var r=s();function n(e){e&&(e.removeEventListener(zx,t),e.removeEventListener(Cx,t))}return e.useEffect((function(){return function(){n(r.current)}}),[]),[function(e){r.current&&r.current!==e&&n(r.current),e&&e!==r.current&&(e.addEventListener(zx,t),e.addEventListener(Cx,t),r.current=e)},n]}(U),X=gw(G,1)[0],Z=function(e){switch(e){case sx:return fw(fw(fw({},fx,g),px,O),mx,k);case cx:return fw(fw(fw({},fx,b),px,x),mx,j);case ux:return fw(fw(fw({},fx,w),px,E),mx,P);default:return{}}},K=e.useMemo((function(){return Z(F)}),[F]),Q=gw($x(F,!t,(function(e){if(e===fx){var t=K[fx];return t?t(V()):Fx}var r;ee in K&&_((null===(r=K[ee])||void 0===r?void 0:r.call(K,V(),null))||null);return ee===mx&&F!==lx&&(X(V()),h>0&&(clearTimeout($.current),$.current=setTimeout((function(){U({deadline:!0})}),h))),ee===hx&&Y(),true})),2),J=Q[0],ee=Q[1],te=Hx(ee);q.current=te,Lx((function(){M(r);var e,n=H.current;H.current=!0,!n&&r&&p&&(e=sx),n&&r&&d&&(e=cx),(n&&!r&&y||!n&&v&&!r&&y)&&(e=ux);var o=Z(e);e&&(t||o[fx])?(A(e),J()):A(lx)}),[r]),a((function(){(F===sx&&!p||F===cx&&!d||F===ux&&!y)&&A(lx)}),[p,d,y]),a((function(){return function(){H.current=!1,clearTimeout($.current)}}),[]);var re=e.useRef(!1);a((function(){L&&(re.current=!0),void 0!==L&&F===lx&&((re.current||L)&&(null==z||z(L)),re.current=!0)}),[L,F]);var ne=B;return K[fx]&&ee===px&&(ne=mw({transition:"none"},ne)),[F,ee,ne,null!=L?L:r]}var qx=function(t){var r=t;"object"===uw(t)&&(r=t.transitionSupport);var n=e.forwardRef((function(t,n){var o=t.visible,i=void 0===o||o,a=t.removeOnLeave,l=void 0===a||a,c=t.forceRender,u=t.children,d=t.motionName,f=t.leavedClassName,p=t.eventProps,m=function(e,t){return!(!e.motionName||!r||!1===t)}(t,e.useContext(ox).motion),y=s(),h=s();var v=gw(Vx(m,i,(function(){try{return y.current instanceof HTMLElement?y.current:dO(h.current)}catch(e){return null}}),t),4),g=v[0],b=v[1],w=v[2],O=v[3],x=e.useRef(O);O&&(x.current=!0);var E,k=e.useCallback((function(e){y.current=e,Ww(n,e)}),[n]),j=mw(mw({},p),{},{visible:i});if(u)if(g===lx)E=O?u(mw({},j),k):!l&&x.current&&f?u(mw(mw({},j),{},{className:f}),k):c||!l&&!f?u(mw(mw({},j),{},{style:{display:"none"}}),k):null;else{var P;b===fx?P="prepare":Hx(b)?P="active":b===px&&(P="start");var N=Tx(d,"".concat(g,"-").concat(P));E=u(mw(mw({},j),{},{className:ng(Tx(d,g),fw(fw({},N,N&&P),d,"string"==typeof d)),style:w}),k)}else E=null;e.isValidElement(E)&&Fw(E)&&(E.ref||(E=e.cloneElement(E,{ref:k})));return e.createElement(ix,{ref:h},E)}));return n.displayName="CSSMotion",n}(Sx),Yx="add",Ux="keep",Gx="remove",Xx="removed";function Zx(e){var t;return mw(mw({},t=e&&"object"===uw(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function Kx(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(Zx)}var Qx=["component","children","onVisibleChanged","onAllRemoved"],Jx=["status"],eE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function tE(t){var r=t.prefixCls,n=t.align,o=t.arrow,i=t.arrowPos,a=o||{},l=a.className,s=a.content,c=i.x,u=void 0===c?0:c,d=i.y,f=void 0===d?0:d,p=e.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var y=n.points[0],h=n.points[1],v=y[0],g=y[1],b=h[0],w=h[1];v!==b&&["t","b"].includes(v)?"t"===v?m.top=0:m.bottom=0:m.top=f,g!==w&&["l","r"].includes(g)?"l"===g?m.left=0:m.right=0:m.left=u}return e.createElement("div",{ref:p,className:ng("".concat(r,"-arrow"),l),style:m},s)}function rE(t){var r=t.prefixCls,n=t.open,o=t.zIndex,i=t.mask,a=t.motion;return i?e.createElement(qx,cw({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(t){var n=t.className;return e.createElement("div",{style:{zIndex:o},className:ng("".concat(r,"-mask"),n)})})):null}!function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qx,n=function(){HO(n,e.Component);var t=YO(n);function n(){var e;WO(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return fw(qO(e=t.call.apply(t,[this].concat(o))),"state",{keyEntities:[]}),fw(qO(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:mw(mw({},e),{},{status:Xx})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==Xx})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return _O(n,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,l=o.onVisibleChanged;o.onAllRemoved;var s=yw(o,Qx),c=i||e.Fragment,u={};return eE.forEach((function(e){u[e]=s[e],delete s[e]})),delete s.keys,e.createElement(c,s,n.map((function(n,o){var i=n.status,s=yw(n,Jx),c=i===Yx||i===Ux;return e.createElement(r,cw({},u,{key:s.key,visible:c,eventProps:s,onVisibleChanged:function(e){null==l||l(e,{key:s.key}),e||t.removeKey(s.key)}}),(function(e,t){return a(mw(mw({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.keys,n=t.keyEntities,o=Kx(r),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,o=t.length,i=Kx(e),a=Kx(t);i.forEach((function(e){for(var t=!1,i=n;i<o;i+=1){var l=a[i];if(l.key===e.key){n<i&&(r=r.concat(a.slice(n,i).map((function(e){return mw(mw({},e),{},{status:Yx})}))),n=i),r.push(mw(mw({},l),{},{status:Ux})),n+=1,t=!0;break}}t||r.push(mw(mw({},e),{},{status:Gx}))})),n<o&&(r=r.concat(a.slice(n).map((function(e){return mw(mw({},e),{},{status:Yx})}))));var l={};return r.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||n!==Gx}))).forEach((function(t){t.key===e&&(t.status=Ux)}))})),r}(n,o);return{keyEntities:i.filter((function(e){var t=n.find((function(t){var r=t.key;return e.key===r}));return!t||t.status!==Xx||e.status!==Gx}))}}}]),n}();fw(n,"defaultProps",{component:"div"})}(Sx);var nE=e.memo((function(e){return e.children}),(function(e,t){return t.cache}));"production"!==process.env.NODE_ENV&&(nE.displayName="PopupContent");var oE=e.forwardRef((function(t,r){var n=t.popup,o=t.className,i=t.prefixCls,a=t.style,l=t.target,s=t.onVisibleChanged,c=t.open,u=t.keepDom,d=t.fresh,f=t.onClick,p=t.mask,m=t.arrow,y=t.arrowPos,h=t.align,v=t.motion,g=t.maskMotion,b=t.forceRender,w=t.getPopupContainer,O=t.autoDestroy,x=t.portal,E=t.zIndex,k=t.onMouseEnter,j=t.onMouseLeave,P=t.onPointerEnter,N=t.ready,S=t.offsetX,C=t.offsetY,z=t.offsetR,T=t.offsetB,L=t.onAlign,M=t.onPrepare,I=t.stretch,D=t.targetWidth,R=t.targetHeight,A="function"==typeof n?n():n,W=c||u,B=(null==w?void 0:w.length)>0,_=gw(e.useState(!w||!B),2),F=_[0],H=_[1];if(qw((function(){!F&&B&&l&&H(!0)}),[F,B,l]),!F)return null;var $="auto",V={left:"-1000vw",top:"-1000vh",right:$,bottom:$};if(N||!c){var q,Y=h.points,U=h.dynamicInset||(null===(q=h._experimental)||void 0===q?void 0:q.dynamicInset),G=U&&"r"===Y[0][1],X=U&&"b"===Y[0][0];G?(V.right=z,V.left=$):(V.left=S,V.right=$),X?(V.bottom=T,V.top=$):(V.top=C,V.bottom=$)}var Z={};return I&&(I.includes("height")&&R?Z.height=R:I.includes("minHeight")&&R&&(Z.minHeight=R),I.includes("width")&&D?Z.width=D:I.includes("minWidth")&&D&&(Z.minWidth=D)),c||(Z.pointerEvents="none"),e.createElement(x,{open:b||W,getContainer:w&&function(){return w(l)},autoDestroy:O},e.createElement(rE,{prefixCls:i,open:c,zIndex:E,mask:p,motion:g}),e.createElement(KO,{onResize:L,disabled:!c},(function(t){return e.createElement(qx,cw({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(i,"-hidden")},v,{onAppearPrepare:M,onEnterPrepare:M,visible:c,onVisibleChanged:function(e){var t;null==v||null===(t=v.onVisibleChanged)||void 0===t||t.call(v,e),s(e)}}),(function(n,l){var s=n.className,u=n.style,p=ng(i,s,o);return e.createElement("div",{ref:Bw(t,r,l),className:p,style:mw(mw(mw(mw({"--arrow-x":"".concat(y.x||0,"px"),"--arrow-y":"".concat(y.y||0,"px")},V),Z),u),{},{boxSizing:"border-box",zIndex:E},a),onMouseEnter:k,onMouseLeave:j,onPointerEnter:P,onClick:f},m&&e.createElement(tE,{prefixCls:i,arrow:m,arrowPos:y,align:h}),e.createElement(nE,{cache:!c&&!d},A))}))})))}));"production"!==process.env.NODE_ENV&&(oE.displayName="Popup");var iE=e.forwardRef((function(t,r){var n=t.children,o=t.getTriggerDOMNode,i=Fw(n),a=e.useCallback((function(e){Ww(r,o?o(e):e)}),[o]),l=_w(a,n.ref);return i?e.cloneElement(n,{ref:l}):n}));"production"!==process.env.NODE_ENV&&(iE.displayName="TriggerWrapper");var aE=e.createContext(null);function lE(e){return e?Array.isArray(e)?e:[e]:[]}function sE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function cE(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function uE(e){return e.ownerDocument.defaultView}function dE(e){for(var t=[],r=null==e?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=uE(r).getComputedStyle(r);[o.overflowX,o.overflowY,o.overflow].some((function(e){return n.includes(e)}))&&t.push(r),r=r.parentElement}return t}function fE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function pE(e){return fE(parseFloat(e),0)}function mE(e,t){var r=mw({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=uE(e).getComputedStyle(e),n=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,l=t.borderLeftWidth,s=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,p=e.clientWidth,m=pE(i),y=pE(a),h=pE(l),v=pE(s),g=fE(Math.round(c.width/f*1e3)/1e3),b=fE(Math.round(c.height/u*1e3)/1e3),w=(f-p-h-v)*g,O=(u-d-m-y)*b,x=m*b,E=y*b,k=h*g,j=v*g,P=0,N=0;if("clip"===n){var S=pE(o);P=S*g,N=S*b}var C=c.x+k-P,z=c.y+x-N,T=C+c.width+2*P-k-j-w,L=z+c.height+2*N-x-E-O;r.left=Math.max(r.left,C),r.top=Math.max(r.top,z),r.right=Math.min(r.right,T),r.bottom=Math.min(r.bottom,L)}})),r}function yE(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),r=t.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(t)}function hE(e,t){var r=gw(t||[],2),n=r[0],o=r[1];return[yE(e.width,n),yE(e.height,o)]}function vE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function gE(e,t){var r,n=t[0],o=t[1];return r="t"===n?e.y:"b"===n?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:r}}function bE(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,n){return n===t?r[e]||"c":e})).join("")}function wE(t,r,n,o,i,a,l){var s=gw(e.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),2),c=s[0],u=s[1],d=e.useRef(0),f=e.useMemo((function(){return r?dE(r):[]}),[r]),p=e.useRef({});t||(p.current={});var m=ex((function(){if(r&&n&&t){var e,s,c,d,m,y=r,h=y.ownerDocument,v=uE(y).getComputedStyle(y),g=v.width,b=v.height,w=v.position,O=y.style.left,x=y.style.top,E=y.style.right,k=y.style.bottom,j=y.style.overflow,P=mw(mw({},i[o]),a),N=h.createElement("div");if(null===(e=y.parentElement)||void 0===e||e.appendChild(N),N.style.left="".concat(y.offsetLeft,"px"),N.style.top="".concat(y.offsetTop,"px"),N.style.position=w,N.style.height="".concat(y.offsetHeight,"px"),N.style.width="".concat(y.offsetWidth,"px"),y.style.left="0",y.style.top="0",y.style.right="auto",y.style.bottom="auto",y.style.overflow="hidden",Array.isArray(n))m={x:n[0],y:n[1],width:0,height:0};else{var S,C,z=n.getBoundingClientRect();z.x=null!==(S=z.x)&&void 0!==S?S:z.left,z.y=null!==(C=z.y)&&void 0!==C?C:z.top,m={x:z.x,y:z.y,width:z.width,height:z.height}}var T=y.getBoundingClientRect();T.x=null!==(s=T.x)&&void 0!==s?s:T.left,T.y=null!==(c=T.y)&&void 0!==c?c:T.top;var L=h.documentElement,M=L.clientWidth,I=L.clientHeight,D=L.scrollWidth,R=L.scrollHeight,A=L.scrollTop,W=L.scrollLeft,B=T.height,_=T.width,F=m.height,H=m.width,$={left:0,top:0,right:M,bottom:I},V={left:-W,top:-A,right:D-W,bottom:R-A},q=P.htmlRegion,Y="visible",U="visibleFirst";"scroll"!==q&&q!==U&&(q=Y);var G=q===U,X=mE(V,f),Z=mE($,f),K=q===Y?Z:X,Q=G?Z:K;y.style.left="auto",y.style.top="auto",y.style.right="0",y.style.bottom="0";var J=y.getBoundingClientRect();y.style.left=O,y.style.top=x,y.style.right=E,y.style.bottom=k,y.style.overflow=j,null===(d=y.parentElement)||void 0===d||d.removeChild(N);var ee=fE(Math.round(_/parseFloat(g)*1e3)/1e3),te=fE(Math.round(B/parseFloat(b)*1e3)/1e3);if(0===ee||0===te||uO(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}(n))return;var re=P.offset,ne=P.targetOffset,oe=gw(hE(T,re),2),ie=oe[0],ae=oe[1],le=gw(hE(m,ne),2),se=le[0],ce=le[1];m.x-=se,m.y-=ce;var ue=gw(P.points||[],2),de=ue[0],fe=vE(ue[1]),pe=vE(de),me=gE(m,fe),ye=gE(T,pe),he=mw({},P),ve=me.x-ye.x+ie,ge=me.y-ye.y+ae;function dt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:K,n=T.x+e,o=T.y+t,i=n+_,a=o+B,l=Math.max(n,r.left),s=Math.max(o,r.top),c=Math.min(i,r.right),u=Math.min(a,r.bottom);return Math.max(0,(c-l)*(u-s))}var be,we,Oe,xe,Ee=dt(ve,ge),ke=dt(ve,ge,Z),je=gE(m,["t","l"]),Pe=gE(T,["t","l"]),Ne=gE(m,["b","r"]),Se=gE(T,["b","r"]),Ce=P.overflow||{},ze=Ce.adjustX,Te=Ce.adjustY,Le=Ce.shiftX,Me=Ce.shiftY,Ie=function(e){return"boolean"==typeof e?e:e>=0};function ft(){be=T.y+ge,we=be+B,Oe=T.x+ve,xe=Oe+_}ft();var De=Ie(Te),Re=pe[0]===fe[0];if(De&&"t"===pe[0]&&(we>Q.bottom||p.current.bt)){var Ae=ge;Re?Ae-=B-F:Ae=je.y-Se.y-ae;var We=dt(ve,Ae),Be=dt(ve,Ae,Z);We>Ee||We===Ee&&(!G||Be>=ke)?(p.current.bt=!0,ge=Ae,ae=-ae,he.points=[bE(pe,0),bE(fe,0)]):p.current.bt=!1}if(De&&"b"===pe[0]&&(be<Q.top||p.current.tb)){var _e=ge;Re?_e+=B-F:_e=Ne.y-Pe.y-ae;var Fe=dt(ve,_e),He=dt(ve,_e,Z);Fe>Ee||Fe===Ee&&(!G||He>=ke)?(p.current.tb=!0,ge=_e,ae=-ae,he.points=[bE(pe,0),bE(fe,0)]):p.current.tb=!1}var $e=Ie(ze),Ve=pe[1]===fe[1];if($e&&"l"===pe[1]&&(xe>Q.right||p.current.rl)){var qe=ve;Ve?qe-=_-H:qe=je.x-Se.x-ie;var Ye=dt(qe,ge),Ue=dt(qe,ge,Z);Ye>Ee||Ye===Ee&&(!G||Ue>=ke)?(p.current.rl=!0,ve=qe,ie=-ie,he.points=[bE(pe,1),bE(fe,1)]):p.current.rl=!1}if($e&&"r"===pe[1]&&(Oe<Q.left||p.current.lr)){var Ge=ve;Ve?Ge+=_-H:Ge=Ne.x-Pe.x-ie;var Xe=dt(Ge,ge),Ze=dt(Ge,ge,Z);Xe>Ee||Xe===Ee&&(!G||Ze>=ke)?(p.current.lr=!0,ve=Ge,ie=-ie,he.points=[bE(pe,1),bE(fe,1)]):p.current.lr=!1}ft();var Ke=!0===Le?0:Le;"number"==typeof Ke&&(Oe<Z.left&&(ve-=Oe-Z.left-ie,m.x+H<Z.left+Ke&&(ve+=m.x-Z.left+H-Ke)),xe>Z.right&&(ve-=xe-Z.right-ie,m.x>Z.right-Ke&&(ve+=m.x-Z.right+Ke)));var Qe=!0===Me?0:Me;"number"==typeof Qe&&(be<Z.top&&(ge-=be-Z.top-ae,m.y+F<Z.top+Qe&&(ge+=m.y-Z.top+F-Qe)),we>Z.bottom&&(ge-=we-Z.bottom-ae,m.y>Z.bottom-Qe&&(ge+=m.y-Z.bottom+Qe)));var Je=T.x+ve,et=Je+_,tt=T.y+ge,rt=tt+B,nt=m.x,ot=nt+H,it=m.y,at=it+F,lt=(Math.max(Je,nt)+Math.min(et,ot))/2-Je,st=(Math.max(tt,it)+Math.min(rt,at))/2-tt;null==l||l(r,he);var ct=J.right-T.x-(ve+T.width),ut=J.bottom-T.y-(ge+T.height);1===ee&&(ve=Math.round(ve),ct=Math.round(ct)),1===te&&(ge=Math.round(ge),ut=Math.round(ut)),u({ready:!0,offsetX:ve/ee,offsetY:ge/te,offsetR:ct/ee,offsetB:ut/te,arrowX:lt/ee,arrowY:st/te,scaleX:ee,scaleY:te,align:he})}})),y=function(){u((function(e){return mw(mw({},e),{},{ready:!1})}))};return qw(y,[o]),qw((function(){t||y()}),[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,function(){d.current+=1;var e=d.current;Promise.resolve().then((function(){d.current===e&&m()}))}]}var OE=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];var xE=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sO,r=e.forwardRef((function(r,n){var o=r.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=r.children,l=r.action,s=void 0===l?"hover":l,c=r.showAction,u=r.hideAction,d=r.popupVisible,f=r.defaultPopupVisible,p=r.onPopupVisibleChange,m=r.afterPopupVisibleChange,y=r.mouseEnterDelay,h=r.mouseLeaveDelay,v=void 0===h?.1:h,g=r.focusDelay,b=r.blurDelay,w=r.mask,O=r.maskClosable,x=void 0===O||O,E=r.getPopupContainer,k=r.forceRender,j=r.autoDestroy,P=r.destroyPopupOnHide,N=r.popup,S=r.popupClassName,C=r.popupStyle,z=r.popupPlacement,T=r.builtinPlacements,L=void 0===T?{}:T,M=r.popupAlign,I=r.zIndex,D=r.stretch,R=r.getPopupClassNameFromAlign,A=r.fresh,W=r.alignPoint,B=r.onPopupClick,_=r.onPopupAlign,F=r.arrow,H=r.popupMotion,$=r.maskMotion,V=r.popupTransitionName,q=r.popupAnimation,Y=r.maskTransitionName,U=r.maskAnimation,G=r.className,X=r.getTriggerDOMNode,Z=yw(r,OE),K=j||P||!1,Q=gw(e.useState(!1),2),J=Q[0],ee=Q[1];qw((function(){ee(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())}),[]);var te=e.useRef({}),re=e.useContext(aE),ne=e.useMemo((function(){return{registerSubPopup:function(e,t){te.current[e]=t,null==re||re.registerSubPopup(e,t)}}}),[re]),oe=nx(),ie=gw(e.useState(null),2),ae=ie[0],le=ie[1],se=e.useRef(null),ce=ex((function(e){se.current=e,uO(e)&&ae!==e&&le(e),null==re||re.registerSubPopup(oe,e)})),ue=gw(e.useState(null),2),de=ue[0],fe=ue[1],pe=e.useRef(null),me=ex((function(e){uO(e)&&de!==e&&(fe(e),pe.current=e)})),ye=e.Children.only(a),he=(null==ye?void 0:ye.props)||{},ve={},ge=ex((function(e){var t,r,n=de;return(null==n?void 0:n.contains(e))||(null===(t=JO(n))||void 0===t?void 0:t.host)===e||e===n||(null==ae?void 0:ae.contains(e))||(null===(r=JO(ae))||void 0===r?void 0:r.host)===e||e===ae||Object.values(te.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),be=cE(i,H,q,V),we=cE(i,$,U,Y),Oe=gw(e.useState(f||!1),2),xe=Oe[0],Ee=Oe[1],ke=null!=d?d:xe,je=ex((function(e){void 0===d&&Ee(e)}));qw((function(){Ee(d||!1)}),[d]);var Pe=e.useRef(ke);Pe.current=ke;var Ne=e.useRef([]);Ne.current=[];var Se=ex((function(e){var t;je(e),(null!==(t=Ne.current[Ne.current.length-1])&&void 0!==t?t:ke)!==e&&(Ne.current.push(e),null==p||p(e))})),Ce=e.useRef(),ze=function(){clearTimeout(Ce.current)},Te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;ze(),0===t?Se(e):Ce.current=setTimeout((function(){Se(e)}),1e3*t)};e.useEffect((function(){return ze}),[]);var Le=gw(e.useState(!1),2),Me=Le[0],Ie=Le[1];qw((function(e){e&&!ke||Ie(!0)}),[ke]);var De=gw(e.useState(null),2),Re=De[0],Ae=De[1],We=gw(e.useState(null),2),Be=We[0],_e=We[1],Fe=function(e){_e([e.clientX,e.clientY])},He=gw(wE(ke,ae,W&&null!==Be?Be:de,z,L,M,_),11),$e=He[0],Ve=He[1],qe=He[2],Ye=He[3],Ue=He[4],Ge=He[5],Xe=He[6],Ze=He[7],Ke=He[8],Qe=He[9],Je=He[10],et=function(t,r,n,o){return e.useMemo((function(){var e=lE(null!=n?n:r),i=lE(null!=o?o:r),a=new Set(e),l=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[a,l]}),[t,r,n,o])}(J,s,c,u),tt=gw(et,2),rt=tt[0],nt=tt[1],ot=rt.has("click"),it=nt.has("click")||nt.has("contextMenu"),at=ex((function(){Me||Je()}));!function(e,t,r,n,o){qw((function(){if(e&&t&&r){var i=r,a=dE(t),l=dE(i),s=uE(i),c=new Set([s].concat($w(a),$w(l)));function u(){n(),o()}return c.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),s.addEventListener("resize",u,{passive:!0}),n(),function(){c.forEach((function(e){e.removeEventListener("scroll",u),s.removeEventListener("resize",u)}))}}}),[e,t,r])}(ke,de,ae,at,(function(){Pe.current&&W&&it&&Te(!1)})),qw((function(){at()}),[Be,z]),qw((function(){!ke||null!=L&&L[z]||at()}),[JSON.stringify(M)]);var lt=e.useMemo((function(){var e=function(e,t,r,n){for(var o=r.points,i=Object.keys(e),a=0;a<i.length;a+=1){var l,s=i[a];if(sE(null===(l=e[s])||void 0===l?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(s)}return""}(L,i,Qe,W);return ng(e,null==R?void 0:R(Qe))}),[Qe,R,L,i,W]);e.useImperativeHandle(n,(function(){return{nativeElement:pe.current,popupElement:se.current,forceAlign:at}}));var st=gw(e.useState(0),2),ct=st[0],ut=st[1],dt=gw(e.useState(0),2),ft=dt[0],pt=dt[1],mt=function(){if(D&&de){var e=de.getBoundingClientRect();ut(e.width),pt(e.height)}};function yt(e,t,r,n){ve[e]=function(o){var i;null==n||n(o),Te(t,r);for(var a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];null===(i=he[e])||void 0===i||i.call.apply(i,[he,o].concat(l))}}qw((function(){Re&&(Je(),Re(),Ae(null))}),[Re]),(ot||it)&&(ve.onClick=function(e){var t;Pe.current&&it?Te(!1):!Pe.current&&ot&&(Fe(e),Te(!0));for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=he.onClick)||void 0===t||t.call.apply(t,[he,e].concat(n))}),function(t,r,n,o,i,a,l,s){var c=e.useRef(t);c.current=t,e.useEffect((function(){if(r&&o&&(!i||a)){var e=function(e){var t;c.current&&!l((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)&&s(!1)},t=uE(o);t.addEventListener("mousedown",e,!0),t.addEventListener("contextmenu",e,!0);var u,d,f=JO(n);return f&&(f.addEventListener("mousedown",e,!0),f.addEventListener("contextmenu",e,!0)),"production"!==process.env.NODE_ENV&&xw((null==n||null===(u=n.getRootNode)||void 0===u?void 0:u.call(n))===(null===(d=o.getRootNode)||void 0===d?void 0:d.call(o)),"trigger element and popup element should in same shadow root."),function(){t.removeEventListener("mousedown",e,!0),t.removeEventListener("contextmenu",e,!0),f&&(f.removeEventListener("mousedown",e,!0),f.removeEventListener("contextmenu",e,!0))}}}),[r,n,o,i,a])}(ke,it,de,ae,w,x,ge,Te);var ht,vt,gt=rt.has("hover"),bt=nt.has("hover");gt&&(yt("onMouseEnter",!0,y,(function(e){Fe(e)})),yt("onPointerEnter",!0,y,(function(e){Fe(e)})),ht=function(e){(ke||Me)&&null!=ae&&ae.contains(e.target)&&Te(!0,y)},W&&(ve.onMouseMove=function(e){var t;null===(t=he.onMouseMove)||void 0===t||t.call(he,e)})),bt&&(yt("onMouseLeave",!1,v),yt("onPointerLeave",!1,v),vt=function(){Te(!1,v)}),rt.has("focus")&&yt("onFocus",!0,g),nt.has("focus")&&yt("onBlur",!1,b),rt.has("contextMenu")&&(ve.onContextMenu=function(e){var t;Pe.current&&nt.has("contextMenu")?Te(!1):(Fe(e),Te(!0)),e.preventDefault();for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=he.onContextMenu)||void 0===t||t.call.apply(t,[he,e].concat(n))}),G&&(ve.className=ng(he.className,G));var wt=mw(mw({},he),ve),Ot={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){Z[e]&&(Ot[e]=function(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null===(t=wt[e])||void 0===t||t.call.apply(t,[wt].concat(n)),Z[e].apply(Z,n)})}));var xt=e.cloneElement(ye,mw(mw({},wt),Ot)),Et={x:Ge,y:Xe},kt=F?mw({},!0!==F?F:{}):null;return e.createElement(e.Fragment,null,e.createElement(KO,{disabled:!ke,ref:me,onResize:function(){mt(),at()}},e.createElement(iE,{getTriggerDOMNode:X},xt)),e.createElement(aE.Provider,{value:ne},e.createElement(oE,{portal:t,ref:ce,prefixCls:i,popup:N,className:ng(S,lt),style:C,target:de,onMouseEnter:ht,onMouseLeave:vt,onPointerEnter:ht,zIndex:I,open:ke,keepDom:Me,fresh:A,onClick:B,mask:w,motion:be,maskMotion:we,onVisibleChanged:function(e){Ie(!1),Je(),null==m||m(e)},onPrepare:function(){return new Promise((function(e){mt(),Ae((function(){return e}))}))},forceRender:k,autoDestroy:K,getPopupContainer:E,align:Qe,arrow:kt,arrowPos:Et,ready:$e,offsetX:Ve,offsetY:qe,offsetR:Ye,offsetB:Ue,onAlign:at,stretch:D,targetWidth:ct/Ze,targetHeight:ft/Ke})))}));return"production"!==process.env.NODE_ENV&&(r.displayName="Trigger"),r}(sO),EE={shiftX:64,adjustY:1},kE={adjustX:1,shiftY:!0},jE=[0,0],PE={left:{points:["cr","cl"],overflow:kE,offset:[-4,0],targetOffset:jE},right:{points:["cl","cr"],overflow:kE,offset:[4,0],targetOffset:jE},top:{points:["bc","tc"],overflow:EE,offset:[0,-4],targetOffset:jE},bottom:{points:["tc","bc"],overflow:EE,offset:[0,4],targetOffset:jE},topLeft:{points:["bl","tl"],overflow:EE,offset:[0,-4],targetOffset:jE},leftTop:{points:["tr","tl"],overflow:kE,offset:[-4,0],targetOffset:jE},topRight:{points:["br","tr"],overflow:EE,offset:[0,-4],targetOffset:jE},rightTop:{points:["tl","tr"],overflow:kE,offset:[4,0],targetOffset:jE},bottomRight:{points:["tr","br"],overflow:EE,offset:[0,4],targetOffset:jE},rightBottom:{points:["bl","br"],overflow:kE,offset:[4,0],targetOffset:jE},bottomLeft:{points:["tl","bl"],overflow:EE,offset:[0,4],targetOffset:jE},leftBottom:{points:["br","bl"],overflow:kE,offset:[-4,0],targetOffset:jE}},NE=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],SE=function(t,r){var n=t.overlayClassName,o=t.trigger,i=void 0===o?["hover"]:o,a=t.mouseEnterDelay,l=void 0===a?0:a,c=t.mouseLeaveDelay,u=void 0===c?.1:c,d=t.overlayStyle,f=t.prefixCls,m=void 0===f?"rc-tooltip":f,y=t.children,h=t.onVisibleChange,v=t.afterVisibleChange,g=t.transitionName,b=t.animation,w=t.motion,O=t.placement,x=void 0===O?"right":O,E=t.align,k=void 0===E?{}:E,j=t.destroyTooltipOnHide,P=void 0!==j&&j,N=t.defaultVisible,S=t.getTooltipContainer,C=t.overlayInnerStyle;t.arrowContent;var z=t.overlay,T=t.id,L=t.showArrow,M=void 0===L||L,I=t.classNames,D=t.styles,R=yw(t,NE),A=nx(T),W=s(null);p(r,(function(){return W.current}));var B=mw({},R);"visible"in t&&(B.popupVisible=t.visible);var _,F;return e.createElement(xE,cw({popupClassName:ng(n,null==I?void 0:I.root),prefixCls:m,popup:function(){return e.createElement(sw,{key:"content",prefixCls:m,id:A,bodyClassName:null==I?void 0:I.body,overlayInnerStyle:mw(mw({},C),null==D?void 0:D.body)},z)},action:i,builtinPlacements:PE,popupPlacement:x,ref:W,popupAlign:k,getPopupContainer:S,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:b,popupMotion:w,defaultPopupVisible:N,autoDestroy:P,mouseLeaveDelay:u,popupStyle:mw(mw({},d),null==D?void 0:D.root),mouseEnterDelay:l,arrow:M},B),(_=e.Children.only(y),F=mw(mw({},(null==_?void 0:_.props)||{}),{},{"aria-describedby":z?A:null}),e.cloneElement(y,F)))},CE=r(SE);const zE=({title:e,description:r,footer:n,dataTestId:o,variant:i="default"})=>{const a=Boolean(r||n);return t.createElement("div",{"data-test-id":o,className:De("overflow-hidden break-words rounded-lg","border shadow-md backdrop-blur-sm","transition-all duration-150 animate-in fade-in zoom-in-95",a?"py-3 px-4":"py-2 px-3",{"bg-popover border-border":"default"===i,"bg-destructive border-destructive/20 text-destructive-foreground":"destructive"===i,"bg-muted border-muted/20":"muted"===i})},t.createElement("div",{className:De("flex items-center",!a&&"justify-center")},t.createElement(ug,{fontWeight:"bold",variant:a?"regular":"small",className:De({"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},e)),r&&t.createElement("div",{className:"mt-1.5"},t.createElement(ug,{variant:"small",className:De("opacity-90",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},r)),n&&t.createElement("div",{className:De("mt-3",a&&"pt-2",{"border-t border-border/40":"default"===i,"border-t border-destructive/20":"destructive"===i,"border-t border-muted-foreground/20":"muted"===i})},"string"==typeof n?t.createElement(ug,{variant:"small",className:De("opacity-75",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},n):n))},TE=({overlay:e,title:r,description:n,footer:o,children:i,trigger:a="hover",mouseEnterDelay:s=.1,mouseLeaveDelay:c=.1,placement:u="top",variant:d="default",className:f,...p})=>{const m=l((()=>"function"==typeof e?e():e?t.createElement(t.Fragment,null,e):t.createElement(zE,{title:r,description:n,footer:o,variant:d,dataTestId:p.dataTestId})),[n,o,e,r,d,p.dataTestId]);return r||n||e?t.createElement(CE,{overlay:m,trigger:a,mouseEnterDelay:s,mouseLeaveDelay:c,placement:u,destroyTooltipOnHide:!0,overlayClassName:De("max-w-xs z-50",f),...p},t.createElement("span",{className:"inline-flex"},i)):i||null};function LE(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var ME=["color"],IE=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,ME);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),DE=["color"],RE=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,DE);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),AE=["color"],WE=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,AE);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),BE=["color"],_E=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,BE);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));const FE=6048e5,HE=Symbol.for("constructDateFrom");function $E(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&HE in e?e[HE](t):e instanceof Date?new e.constructor(t):new Date(t)}function VE(e,t){return $E(t||e,e)}function qE(e,t,r){const n=VE(e,r?.in);return isNaN(t)?$E(r?.in||e,NaN):t?(n.setDate(n.getDate()+t),n):n}function YE(e,t,r){const n=VE(e,r?.in);if(isNaN(t))return $E(r?.in||e,NaN);if(!t)return n;const o=n.getDate(),i=$E(r?.in||e,n.getTime());i.setMonth(n.getMonth()+t+1,0);return o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}let UE={};function GE(){return UE}function XE(e,t){const r=GE(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=VE(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function ZE(e,t){return XE(e,{...t,weekStartsOn:1})}function KE(e,t){const r=VE(e,t?.in),n=r.getFullYear(),o=$E(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const i=ZE(o),a=$E(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=ZE(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function QE(e){const t=VE(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function JE(e,...t){const r=$E.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(r)}function ek(e,t){const r=VE(e,t?.in);return r.setHours(0,0,0,0),r}function tk(e,t,r){const[n,o]=JE(r?.in,e,t),i=ek(n),a=ek(o),l=+i-QE(i),s=+a-QE(a);return Math.round((l-s)/864e5)}function rk(e,t,r){return qE(e,7*t,r)}function nk(e,t,r){return YE(e,12*t,r)}function ok(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=$E.bind(null,e));const t=VE(e,n);(!r||r<t||isNaN(+t))&&(r=t)})),$E(n,r||NaN)}function ik(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=$E.bind(null,e));const t=VE(e,n);(!r||r>t||isNaN(+t))&&(r=t)})),$E(n,r||NaN)}function ak(e,t,r){const[n,o]=JE(r?.in,e,t);return+ek(n)==+ek(o)}function lk(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function sk(e,t,r){const[n,o]=JE(r?.in,e,t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}function ck(e,t){const r=VE(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function uk(e,t){const r=VE(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function dk(e,t){const r=VE(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function fk(e,t){const r=GE(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=VE(e,t?.in),i=o.getDay(),a=6+(i<n?-7:0)-(i-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function pk(e,t){return fk(e,{...t,weekStartsOn:1})}const mk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function yk(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const hk={date:yk({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yk({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:yk({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},vk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function gk(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=r?.width?String(r.width):t;n=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=r?.width?String(r.width):e.defaultWidth;n=e.values[o]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const bk={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:gk({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:gk({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:gk({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:gk({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:gk({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function wk(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(l,(e=>e.test(a))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(l,(e=>e.test(a)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}const Ok={ordinalNumber:(xk={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(xk.matchPattern);if(!r)return null;const n=r[0],o=e.match(xk.parsePattern);if(!o)return null;let i=xk.valueCallback?xk.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(n.length)}}),era:wk({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:wk({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:wk({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:wk({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:wk({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var xk;const Ek={code:"en-US",formatDistance:(e,t,r)=>{let n;const o=mk[e];return n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:hk,formatRelative:(e,t,r,n)=>vk[e],localize:bk,match:Ok,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kk(e,t){const r=VE(e,t?.in),n=+ZE(r)-+function(e,t){const r=KE(e,t),n=$E(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ZE(n)}(r);return Math.round(n/FE)+1}function jk(e,t){const r=VE(e,t?.in),n=r.getFullYear(),o=GE(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=$E(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const l=XE(a,t),s=$E(t?.in||e,0);s.setFullYear(n,0,i),s.setHours(0,0,0,0);const c=XE(s,t);return+r>=+l?n+1:+r>=+c?n:n-1}function Pk(e,t){const r=VE(e,t?.in),n=+XE(r,t)-+function(e,t){const r=GE(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=jk(e,t),i=$E(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),XE(i,t)}(r,t);return Math.round(n/FE)+1}function Nk(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Sk={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Nk("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):Nk(r+1,2)},d:(e,t)=>Nk(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>Nk(e.getHours()%12||12,t.length),H:(e,t)=>Nk(e.getHours(),t.length),m:(e,t)=>Nk(e.getMinutes(),t.length),s:(e,t)=>Nk(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return Nk(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Ck="midnight",zk="noon",Tk="morning",Lk="afternoon",Mk="evening",Ik="night",Dk={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return Sk.y(e,t)},Y:function(e,t,r,n){const o=jk(e,n),i=o>0?o:1-o;if("YY"===t){return Nk(i%100,2)}return"Yo"===t?r.ordinalNumber(i,{unit:"year"}):Nk(i,t.length)},R:function(e,t){return Nk(KE(e),t.length)},u:function(e,t){return Nk(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Nk(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Nk(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Sk.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Nk(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=Pk(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):Nk(o,t.length)},I:function(e,t,r){const n=kk(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Nk(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):Sk.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=VE(e,t?.in);return tk(r,dk(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Nk(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Nk(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Nk(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return Nk(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(o=12===n?zk:0===n?Ck:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(o=n>=17?Mk:n>=12?Lk:n>=4?Tk:Ik,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return Sk.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):Sk.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Nk(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Nk(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sk.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Sk.s(e,t)},S:function(e,t){return Sk.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Ak(n);case"XXXX":case"XX":return Wk(n);default:return Wk(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Ak(n);case"xxxx":case"xx":return Wk(n);default:return Wk(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Rk(n,":");default:return"GMT"+Wk(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Rk(n,":");default:return"GMT"+Wk(n,":")}},t:function(e,t,r){return Nk(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return Nk(+e,t.length)}};function Rk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return 0===i?r+String(o):r+String(o)+t+Nk(i,2)}function Ak(e,t){if(e%60==0){return(e>0?"-":"+")+Nk(Math.abs(e)/60,2)}return Wk(e,t)}function Wk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+Nk(Math.trunc(n/60),2)+t+Nk(n%60,2)}const Bk=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},_k=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Fk={p:_k,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Bk(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Bk(n,t)).replace("{{time}}",_k(o,t))}},Hk=/^D+$/,$k=/^Y+$/,Vk=["D","DD","YY","YYYY"];const qk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Uk=/^'([^]*?)'?$/,Gk=/''/g,Xk=/[a-zA-Z]/;function Zk(e,t,r){const n=GE(),o=r?.locale??n.locale??Ek,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=VE(e,r?.in);if(!function(e){return!(!lk(e)&&"number"!=typeof e||isNaN(+VE(e)))}(l))throw new RangeError("Invalid time value");let s=t.match(Yk).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Fk[t])(e,o.formatLong)}return e})).join("").match(qk).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Kk(e)};if(Dk[t])return{isToken:!0,value:e};if(t.match(Xk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return s.map((n=>{if(!n.isToken)return n.value;const i=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return $k.test(e)}(i)||!r?.useAdditionalDayOfYearTokens&&function(e){return Hk.test(e)}(i))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Vk.includes(e))throw new RangeError(n)}(i,t,String(e));return(0,Dk[i[0]])(l,i,o.localize,c)})).join("")}function Kk(e){const t=e.match(Uk);return t?t[1].replace(Gk,"'"):e}function Qk(e,t){const r=VE(e,t?.in);return function(e,t,r){const[n,o]=JE(r?.in,e,t),i=XE(n,r),a=XE(o,r),l=+i-QE(i),s=+a-QE(a);return Math.round((l-s)/FE)}(function(e,t){const r=VE(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),VE(r,t?.in)}(r,t),uk(r,t),t)+1}function Jk(e,t){return+VE(e)>+VE(t)}function ej(e,t){return+VE(e)<+VE(t)}function tj(e,t,r){const[n,o]=JE(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function rj(e,t,r){return qE(e,-t,r)}function nj(e,t,r){const n=VE(e,r?.in),o=n.getFullYear(),i=n.getDate(),a=$E(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=function(e,t){const r=VE(e,t?.in),n=r.getFullYear(),o=r.getMonth(),i=$E(r,0);return i.setFullYear(n,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return n.setMonth(t,Math.min(i,l)),n}function oj(e,t,r){const n=VE(e,r?.in);return isNaN(+n)?$E(e,NaN):(n.setFullYear(t),n)}var ij=function(){return ij=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ij.apply(this,arguments)};function aj(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function lj(e){return"multiple"===e.mode}function sj(e){return"range"===e.mode}function cj(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var uj={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var dj=Object.freeze({__proto__:null,formatCaption:function(e,t){return Zk(e,"LLLL y",t)},formatDay:function(e,t){return Zk(e,"d",t)},formatMonthCaption:function(e,t){return Zk(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Zk(e,"cccccc",t)},formatYearCaption:function(e,t){return Zk(e,"yyyy",t)}}),fj=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Zk(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Zk(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var pj=m(void 0);function mj(e){var t,r,n=e.initialProps,o=function(){var e=uj,t=Ek,r=new Date;return{captionLayout:"buttons",classNames:e,formatters:dj,labels:fj,locale:t,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:r,mode:"default"}}(),i=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=uk(n):t&&(i=new Date(t,0,1)),o?a=ck(o):r&&(a=new Date(r,11,31)),{fromDate:i?ek(i):void 0,toDate:a?ek(a):void 0}}(n),a=i.fromDate,l=i.toDate,s=null!==(t=n.captionLayout)&&void 0!==t?t:o.captionLayout;"buttons"===s||a&&l||(s="buttons"),(cj(n)||lj(n)||sj(n))&&(r=n.onSelect);var c=ij(ij(ij({},o),n),{captionLayout:s,classNames:ij(ij({},o.classNames),n.classNames),components:ij({},n.components),formatters:ij(ij({},o.formatters),n.formatters),fromDate:a,labels:ij(ij({},o.labels),n.labels),mode:n.mode||o.mode,modifiers:ij(ij({},o.modifiers),n.modifiers),modifiersClassNames:ij(ij({},o.modifiersClassNames),n.modifiersClassNames),onSelect:r,styles:ij(ij({},o.styles),n.styles),toDate:l});return g(pj.Provider,{value:c,children:e.children})}function yj(){var e=y(pj);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function hj(e){var t=yj(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return g("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function vj(e){return g("svg",ij({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:g("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function gj(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=yj(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:vj;return w("div",{className:l,style:s,children:[g("span",{className:c.classNames.vhidden,children:e["aria-label"]}),g("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),w("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,g(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function bj(e){var t,r=yj(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return g(b,{});if(!o)return g(b,{});var d=[];if(function(e,t,r){const[n,o]=JE(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var f=uk(n),p=n.getMonth();p<=o.getMonth();p++)d.push(nj(f,p));else for(f=uk(new Date),p=0;p<=11;p++)d.push(nj(f,p));var m=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:gj;return g(m,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=nj(uk(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:d.map((function(e){return g("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function wj(e){var t,r=e.displayMonth,n=yj(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,d=n.labels.labelYearDropdown,f=[];if(!o)return g(b,{});if(!i)return g(b,{});for(var p=o.getFullYear(),m=i.getFullYear(),y=p;y<=m;y++)f.push(oj(dk(new Date),y));var h=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:gj;return g(h,{name:"years","aria-label":d(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=oj(uk(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:f.map((function(e){return g("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function Oj(){var e=yj(),t=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&sk(i,o)<0&&(o=YE(i,-1*(s-1))),a&&sk(o,a)<0&&(o=a),uk(o)}(e),r=function(e,t){var r=i(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=uk(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var xj=m(void 0);function Ej(e){var t=yj(),r=Oj(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=uk(e),i=sk(uk(YE(o,n)),o),a=[],l=0;l<i;l++){var s=YE(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=uk(e);if(!r)return YE(l,a);if(!(sk(r,e)<i))return YE(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=uk(e);if(!r)return YE(a,-i);if(!(sk(a,r)<=0))return YE(a,-i)}}(n,t),s=function(e){return i.some((function(t){return tj(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&ej(e,r)?o(YE(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return g(xj.Provider,{value:c,children:e.children})}function kj(){var e=y(xj);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function jj(e){var t,r=yj(),n=r.classNames,o=r.styles,i=r.components,a=kj().goToMonth,l=function(t){a(YE(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:hj,c=g(s,{id:e.id,displayMonth:e.displayMonth});return w("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[g("div",{className:n.vhidden,children:c}),g(bj,{onChange:l,displayMonth:e.displayMonth}),g(wj,{onChange:l,displayMonth:e.displayMonth})]})}function Pj(e){return g("svg",ij({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:g("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Nj(e){return g("svg",ij({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:g("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Sj=r((function(e,t){var r=yj(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=ij(ij({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),g("button",ij({},e,{ref:t,type:"button",className:a,style:l}))}));function Cj(e){var t,r,n=yj(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,d=n.components;if(!e.nextMonth&&!e.previousMonth)return g(b,{});var f=c(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),m=u(e.nextMonth,{locale:i}),y=[a.nav_button,a.nav_button_next].join(" "),h=null!==(t=null==d?void 0:d.IconRight)&&void 0!==t?t:Nj,v=null!==(r=null==d?void 0:d.IconLeft)&&void 0!==r?r:Pj;return w("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&g(Sj,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:g("rtl"===o?h:v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&g(Sj,{name:"next-month","aria-label":m,className:y,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:g("rtl"===o?v:h,{className:a.nav_icon,style:l.nav_icon})})]})}function zj(e){var t=yj().numberOfMonths,r=kj(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return tj(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),d=t>1&&(c||!s);return g(Cj,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:d,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function Tj(e){var t,r,n=yj(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:hj;return r=i?g(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?g(jj,{displayMonth:e.displayMonth,id:e.id}):w(b,"dropdown-buttons"===l?{children:[g(jj,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),g(zj,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[g(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),g(zj,{displayMonth:e.displayMonth,id:e.id})]}),g("div",{className:o.caption,style:a.caption,children:r})}function Lj(e){var t=yj(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?g("tfoot",{className:o,style:n.tfoot,children:g("tr",{children:g("td",{colSpan:8,children:r})})}):g(b,{})}function Mj(){var e=yj(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?ZE(new Date):XE(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=qE(n,i);o.push(a)}return o}(o,i,a);return w("tr",{style:r.head_row,className:t.head_row,children:[n&&g("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return g("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)}))]})}function Ij(){var e,t=yj(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Mj;return g("thead",{style:n.head,className:r.head,children:g(i,{})})}function Dj(e){var t=yj(),r=t.locale,n=t.formatters.formatDay;return g(b,{children:n(e.date,{locale:r})})}var Rj=m(void 0);function Aj(e){if(!lj(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return g(Rj.Provider,{value:t,children:e.children})}return g(Wj,{initialProps:e.initialProps,children:e.children})}function Wj(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push((function(e){var t=i&&n.length>i-1,r=n.some((function(t){return ak(t,e)}));return Boolean(t&&!r)}));var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?aj([],n):[];if(r.selected){var u=c.findIndex((function(t){return ak(e,t)}));c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return g(Rj.Provider,{value:l,children:r})}function Bj(){var e=y(Rj);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var _j,Fj=m(void 0);function Hj(e){if(!sj(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return g(Fj.Provider,{value:t,children:e.children})}return g($j,{initialProps:e.initialProps,children:e.children})}function $j(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],ak(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:rj(i,l-1),before:qE(i,l-1)}),i&&a&&c.disabled.push({after:i,before:qE(i,l-1)}),!i&&a&&c.disabled.push({after:rj(a,l-1),before:qE(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:qE(i,1-s)}),c.disabled.push({after:qE(i,s-1)})),i&&a){var u=s-(tk(a,i)+1);c.disabled.push({before:rj(i,u)}),c.disabled.push({after:qE(a,u)})}!i&&a&&(c.disabled.push({before:qE(a,1-s)}),c.disabled.push({after:qE(a,s-1)}))}return g(Fj.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(ak(o,e)&&ak(n,e))return;if(ak(o,e))return{from:o,to:void 0};if(ak(n,e))return;return Jk(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Jk(e,o)?{from:o,to:e}:{from:e,to:o}:n?ej(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function Vj(){var e=y(Fj);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function qj(e){return Array.isArray(e)?aj([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(_j||(_j={}));var Yj=_j.Selected,Uj=_j.Disabled,Gj=_j.Hidden,Xj=_j.Today,Zj=_j.RangeEnd,Kj=_j.RangeMiddle,Qj=_j.RangeStart,Jj=_j.Outside;var eP=m(void 0);function tP(e){var t=yj(),r=function(e,t,r){var n,o=((n={})[Yj]=qj(e.selected),n[Uj]=qj(e.disabled),n[Gj]=qj(e.hidden),n[Xj]=[e.today],n[Zj]=[],n[Kj]=[],n[Qj]=[],n[Jj]=[],n);return e.fromDate&&o[Uj].push({before:e.fromDate}),e.toDate&&o[Uj].push({after:e.toDate}),lj(e)?o[Uj]=o[Uj].concat(t.modifiers[Uj]):sj(e)&&(o[Uj]=o[Uj].concat(r.modifiers[Uj]),o[Qj]=r.modifiers[Qj],o[Kj]=r.modifiers[Kj],o[Zj]=r.modifiers[Zj]),o}(t,Bj(),Vj()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=qj(n)})),t}(t.modifiers),o=ij(ij({},r),n);return g(eP.Provider,{value:o,children:e.children})}function rP(){var e=y(eP);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function nP(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(lk(t))return ak(e,t);if(function(e){return Array.isArray(e)&&e.every(lk)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(tk(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),tk(e,n)>=0&&tk(o,e)>=0):o?ak(o,e):!!n&&ak(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=tk(t.before,e)>0,n=tk(t.after,e)<0;return Jk(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?tk(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?tk(t.before,e)>0:"function"==typeof t&&t(e)}))}function oP(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return nP(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!tj(e,r)&&(o.outside=!0),o}function iP(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,d=o.locale,f={day:qE,week:rk,month:YE,year:nk,startOfWeek:function(e){return o.ISOWeek?ZE(e):XE(e,{locale:d,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?pk(e):fk(e,{locale:d,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?f=ok([c,f]):"after"===n&&u&&(f=ik([u,f]));var p=!0;if(i){var m=oP(f,i);p=!m.disabled&&!m.hidden}return p?f:l.count>365?l.lastFocused:iP(f,{moveBy:r,direction:n,context:o,modifiers:i,retry:ij(ij({},l),{count:l.count+1})})}var aP=m(void 0);function lP(e){var t=kj(),r=rP(),n=i(),o=n[0],a=n[1],l=i(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=uk(e[0]),i=ck(e[e.length-1]),a=o;a<=i;){var l=oP(a,t);if(l.disabled||l.hidden)a=qE(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=qE(a,1)}}return n||r}(t.displayMonths,r),d=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,f=function(e){a(e)},p=yj(),m=function(e,n){if(o){var i=iP(o,{moveBy:e,direction:n,context:p,modifiers:r});ak(o,i)||(t.goToDate(i,o),f(i))}},y={focusedDay:o,focusTarget:d,blur:function(){c(o),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return g(aP.Provider,{value:y,children:e.children})}function sP(){var e=y(aP);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var cP=m(void 0);function uP(e){if(!cj(e.initialProps)){var t={selected:void 0};return g(cP.Provider,{value:t,children:e.children})}return g(dP,{initialProps:e.initialProps,children:e.children})}function dP(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return g(cP.Provider,{value:n,children:r})}function fP(){var e=y(cP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function pP(e,t){var r=[e.classNames.day];return Object.keys(t).forEach((function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(_j).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function mP(e,t,r){var n,o,i,l=yj(),s=sP(),c=function(e,t){return oP(e,rP(),t)}(e,t),u=function(e,t){var r=yj(),n=fP(),o=Bj(),i=Vj(),a=sP(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,d=a.blur,f=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,y=a.focusYearBefore,h=a.focusYearAfter,v=a.focusStartOfWeek,g=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;cj(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):lj(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):sj(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;f(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;d(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():p();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():m();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),g()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(e,c),d=function(){var e=yj(),t=fP(),r=Bj(),n=Vj();return cj(e)?t.selected:lj(e)?r.selected:sj(e)?n.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);a((function(){var t;c.outside||s.focusedDay&&f&&ak(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[s.focusedDay,e,r,f,c.outside]);var p=pP(l,c).join(" "),m=function(e,t){var r=ij({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=ij(ij({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(l,c),y=Boolean(c.outside&&!l.showOutsideDays||c.hidden),h=null!==(i=null===(o=l.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:Dj,v={style:m,className:p,children:g(h,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},b=s.focusTarget&&ak(s.focusTarget,e)&&!c.outside,w=s.focusedDay&&ak(s.focusedDay,e),O=ij(ij(ij({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=w||b?0:-1,n)),u);return{isButton:f,isHidden:y,activeModifiers:c,selectedDays:d,buttonProps:O,divProps:v}}function yP(e){var t=s(null),r=mP(e.date,e.displayMonth,t);return r.isHidden?g("div",{role:"gridcell"}):r.isButton?g(Sj,ij({name:"day",ref:t},r.buttonProps)):g("div",ij({},r.divProps))}function hP(e){var t=e.number,r=e.dates,n=yj(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return g("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return g(Sj,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function vP(e){var t,r,n,o=yj(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:yP,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:hP;return l&&(n=g("td",{className:a.cell,style:i.cell,children:g(u,{number:e.weekNumber,dates:e.dates})})),w("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return g("td",{className:a.cell,style:i.cell,role:"presentation",children:g(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+VE(e)/1e3)}(t))}))]})}function gP(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?pk(t):fk(t,r),o=(null==r?void 0:r.ISOWeek)?ZE(e):XE(e,r),i=tk(n,o),a=[],l=0;l<=i;l++)a.push(qE(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?kk(t):Pk(t,r),o=e.find((function(e){return e.weekNumber===n}));return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)}),[])}function bP(e){var t,r,n,o=yj(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,p=o.ISOWeek,m=function(e,t){var r=gP(uk(e),ck(e),t);if(null==t?void 0:t.useFixedWeeks){var n=Qk(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=rk(i,6-n),l=gP(rk(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),y=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:Ij,h=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:vP,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:Lj;return w("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&g(y,{}),g("tbody",{className:a.tbody,style:l.tbody,children:m.map((function(t){return g(h,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),g(v,{displayMonth:e.displayMonth})]})}var wP="undefined"!=typeof window&&window.document&&window.document.createElement?f:a,OP=!1,xP=0;function EP(){return"react-day-picker-".concat(++xP)}function kP(e){var t,r,n=yj(),o=n.dir,l=n.classNames,s=n.styles,c=n.components,u=kj().displayMonths,d=function(e){var t,r=null!=e?e:OP?EP():null,n=i(r),o=n[0],l=n[1];return wP((function(){null===o&&l(EP())}),[]),a((function(){!1===OP&&(OP=!0)}),[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,p=[l.month],m=s.month,y=0===e.displayIndex,h=e.displayIndex===u.length-1,v=!y&&!h;"rtl"===o&&(h=(t=[y,h])[0],y=t[1]),y&&(p.push(l.caption_start),m=ij(ij({},m),s.caption_start)),h&&(p.push(l.caption_end),m=ij(ij({},m),s.caption_end)),v&&(p.push(l.caption_between),m=ij(ij({},m),s.caption_between));var b=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:Tj;return w("div",{className:p.join(" "),style:m,children:[g(b,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),g(bP,{id:f,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function jP(e){var t=yj(),r=t.classNames,n=t.styles;return g("div",{className:r.months,style:n.months,children:e.children})}function PP(e){var t,r,n=e.initialProps,o=yj(),l=sP(),s=kj(),c=i(!1),u=c[0],d=c[1];a((function(){o.initialFocus&&l.focusTarget&&(u||(l.focus(l.focusTarget),d(!0)))}),[o.initialFocus,u,l.focus,l.focusTarget,l]);var f=[o.classNames.root,o.className];o.numberOfMonths>1&&f.push(o.classNames.multiple_months),o.showWeekNumber&&f.push(o.classNames.with_weeknumber);var p=ij(ij({},o.styles.root),o.style),m=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return ij(ij({},e),((r={})[t]=n[t],r))}),{}),y=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:jP;return g("div",ij({className:f.join(" "),style:p,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},m,{children:g(y,{children:s.displayMonths.map((function(e,t){return g(kP,{displayIndex:t,displayMonth:e},t)}))})}))}function NP(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return g(mj,{initialProps:r,children:g(Ej,{children:g(uP,{initialProps:r,children:g(Aj,{initialProps:r,children:g(Hj,{initialProps:r,children:g(tP,{children:g(lP,{children:t})})})})})})})}function SP(e){return g(NP,ij({},e,{children:g(PP,{initialProps:e})}))}const CP=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,zP=P,TP=(LP="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",MP={variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},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"}},e=>{var t;if(null==(null==MP?void 0:MP.variants))return zP(LP,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:r,defaultVariants:n}=MP,o=Object.keys(r).map((t=>{const o=null==e?void 0:e[t],i=null==n?void 0:n[t];if(null===o)return null;const a=CP(o)||CP(i);return r[t][a]})),i=e&&Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e}),{}),a=null==MP||null===(t=MP.compoundVariants)||void 0===t?void 0:t.reduce(((e,t)=>{let{class:r,className:o,...a}=t;return Object.entries(a).every((e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...n,...i}[t]):{...n,...i}[t]===r}))?[...e,r,o]:e}),[]);return zP(LP,o,a,null==e?void 0:e.class,null==e?void 0:e.className)});var LP,MP;const IP=e.forwardRef((({className:t,variant:r,size:n,asChild:o=!1,...i},a)=>{const l=o?bg:"button";return e.createElement(l,{className:De(TP({variant:r,size:n,className:t})),ref:a,...i})}));IP.displayName="Button";const DP=({className:e,classNames:r,showOutsideDays:n=!0,...o})=>t.createElement(SP,{showOutsideDays:n,className:De("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:De(TP({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:De("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:De(TP({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...r},components:{IconLeft:()=>t.createElement(IE,{className:"h-4 w-4"}),IconRight:()=>t.createElement(RE,{className:"h-4 w-4"})},...o});DP.displayName="Calendar";const RP={arrow:"arrow",slash:"slash",icon:"icon"},AP={small:{text:"text-xs",icon:"h-3 w-3",spacing:"py-0.5 px-1.5"},medium:{text:"text-sm",icon:"h-4 w-4",spacing:"py-1 px-2"},large:{text:"text-base",icon:"h-5 w-5",spacing:"py-1.5 px-2.5"}},WP=e.forwardRef((({variant:t,size:r,className:n,...o},i)=>{const a={slash:e.createElement("span",{className:"mx-2 text-muted-foreground/50 select-none"},"/"),arrow:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(Ye,{className:De(AP[r].icon,"text-muted-foreground/50")})),icon:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(Ye,{className:De(AP[r].icon,"text-muted-foreground/50")}))};return e.createElement("span",{ref:i,className:De("flex items-center",n),...o},a[t])}));WP.displayName="BreadCrumbSeparator";const BP=e.forwardRef((({items:t,variant:r="slash",size:n="medium",maxItems:o=4,className:a,...s},c)=>{const[u,d]=i(!1),[f,p]=i(null),m=l((()=>{if(u||t.length<=o)return t;return[...t.slice(0,1),{label:"...",href:"#"},...t.slice(-2)]}),[t,o,u]);return e.createElement("nav",{ref:c,"aria-label":"BreadCrumb",className:De("w-full p-3 select-none",a),...s},e.createElement("ol",{className:"flex items-center flex-wrap gap-y-2"},"icon"===r&&e.createElement("li",{className:"flex items-center"},e.createElement("a",{href:"/",className:De("text-muted-foreground/80 transition-colors duration-150","hover:text-primary focus-visible:text-primary","outline-none focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm")},e.createElement(Ke,{className:AP[n].icon}),e.createElement("span",{className:"sr-only"},"Home"))),m.map(((t,o)=>{const i=o===m.length-1,a="..."===t.label,l=f===o;return e.createElement("li",{key:t.href,className:"flex items-center group",onMouseEnter:()=>p(o),onMouseLeave:()=>p(null)},o>0&&e.createElement(WP,{variant:r,size:n}),"icon"===r&&!a&&e.createElement("span",{className:"mr-1"},t.icon||e.createElement(Ze,{className:De(AP[n].icon,"text-muted-foreground/80")})),e.createElement("a",{href:a?void 0:t.href,className:De("font-medium relative inline-flex items-center","transition-all duration-150","outline-none focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm",AP[n].text,AP[n].spacing,i?"text-primary cursor-default font-semibold":"text-muted-foreground/80 hover:text-muted-foreground",!i&&["after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0","after:bg-primary/50 after:transition-all after:duration-150",l&&"after:w-full"],a&&"cursor-pointer hover:text-primary"),onClick:e=>{a&&(e.preventDefault(),d(!0))},...!i&&{role:"link","aria-current":void 0},...i&&{"aria-current":"page"}},e.createElement("span",{className:"relative"},t.label)))}))))}));BP.displayName="BreadCrumb";const _P={small:{trigger:"px-3 py-2 text-sm",icon:"h-4 w-4",optionIcon:"h-4 w-4",option:"px-2.5 py-2",optionText:"text-sm",description:"text-xs"},medium:{trigger:"px-4 py-3 text-base",icon:"h-5 w-5",optionIcon:"h-5 w-5",option:"px-3 py-2.5",optionText:"text-sm",description:"text-xs"},large:{trigger:"px-5 py-4 text-lg",icon:"h-6 w-6",optionIcon:"h-6 w-6",option:"px-4 py-3",optionText:"text-base",description:"text-sm"}},FP={basic:{trigger:"border border-border hover:border-primary/20",content:"border border-border"},shadow:{trigger:"shadow-lg hover:shadow-xl",content:"shadow-xl"}},HP=t.forwardRef((({options:e,value:r,onValueChange:n,placeholder:o="",disabled:l=!1,showIcons:u=!0,size:d="medium",variant:f,className:p,classNames:m,searchable:y=!1,onSearch:v},g)=>{const[b,w]=i(!1),[O,x]=i(-1),[E,k]=i(""),[j,P]=i(null),[N,S]=i(""),C=s(null),z=s(null),T=s([]),L=e.find((e=>e.id===r)),M=_P[d],I=y&&N?e.filter((e=>e.label.toLowerCase().includes(N.toLowerCase()))):e;a((()=>{b?y&&z.current&&z.current.focus():(x(-1),S(""))}),[b,y]),a((()=>{b&&O>=0&&T.current[O]?.scrollIntoView({block:"nearest"})}),[b,O]),a((()=>{const e=e=>{C.current&&!C.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]),a((()=>{y&&v&&v(N)}),[N,v,y]);const D=c((e=>{n?.(e),w(!1)}),[n]),R=c((()=>{if(!f)return{trigger:"",content:""};const e=FP[f];return{trigger:e.trigger||"",content:e.content||""}}),[f]),A=c((e=>{if(!l)switch(e.key){case"ArrowDown":e.preventDefault(),b?x((e=>Math.min(e+1,I.length-1))):(w(!0),x(0));break;case"ArrowUp":e.preventDefault(),b?x((e=>Math.max(e-1,0))):(w(!0),x(I.length-1));break;case"Home":e.preventDefault(),b&&x(0);break;case"End":e.preventDefault(),b&&x(I.length-1);break;case"Enter":case" ":if(e.preventDefault(),b&&O>=0){const e=I[O];e.disabled||D(e.id)}else w(!b);break;case"Escape":e.preventDefault(),w(!1);break;default:if(!y&&1===e.key.length){const t=e.key.toLowerCase();j&&clearTimeout(j);const r=E+t;k(r);const n=I.findIndex((e=>e.label.toLowerCase().startsWith(r)));n>=0&&(x(n),b||w(!0));const o=setTimeout((()=>{k("")}),1e3);P(o)}}}),[l,b,I,E,j,D,O,y]),W=c(((e,t,r)=>{r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),D(t))}),[D]),B=c((e=>{S(e.target.value),x(0)}),[]),_=R();return t.createElement("div",{ref:C,className:"relative"},t.createElement("button",{ref:g,onClick:()=>!l&&w(!b),onKeyDown:A,className:De("group flex w-full items-center justify-between rounded-xl bg-background","transition-all duration-200 ease-out","hover:shadow-md","focus:outline-none focus:ring-2 focus:ring-primary/20 focus:ring-offset-2",l&&"cursor-not-allowed opacity-50",b&&"border-primary/30 bg-primary/5 shadow-lg",M.trigger,_.trigger,p,m?.trigger),disabled:l,"aria-expanded":b,"aria-haspopup":"listbox","aria-controls":"dropdown-options","aria-label":o},t.createElement("div",{className:"flex items-center gap-3"},u&&L?.icon&&t.createElement("span",{className:"text-primary/70 transition-colors duration-200 group-hover:text-primary"},t.cloneElement(L.icon,{})),t.createElement("span",{className:De("font-medium",M.optionText)},L?L.label:o)),t.createElement(Ve,{className:De("text-primary/70 transition-all duration-300","group-hover:text-primary",b&&"rotate-180",M.icon)})),t.createElement("div",{id:"dropdown-options",role:"listbox","aria-label":o,className:De("z-50 mt-2 origin-top-right","rounded-xl border border-border/50 bg-background p-1.5","shadow-lg backdrop-blur-sm","transition-all duration-200 ease-out",b?"visible scale-100 opacity-100":"invisible scale-95 opacity-0","absolute left-0 right-0",_.content,m?.content)},y&&t.createElement("div",{className:"sticky top-0 z-10 mb-1.5 bg-background px-2 py-1.5"},t.createElement("div",{className:"relative"},t.createElement(et,{className:De("absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",M.icon)}),t.createElement("input",{ref:z,type:"text",value:N,onChange:B,onClick:e=>e.stopPropagation(),placeholder:"Search...",className:De("w-full rounded-lg border border-border bg-background py-2","pl-9 pr-2 text-sm placeholder:text-muted-foreground","focus:border-primary/30 focus:outline-none focus:ring-1 focus:ring-primary/20",M.optionText)}))),t.createElement("div",{className:"max-h-72 overflow-auto"},0===I.length?t.createElement("div",{className:"px-3 py-2 text-sm text-muted-foreground"},"No options found"):I.map(((e,n)=>t.createElement(h,{key:e.id},t.createElement("div",{ref:e=>{T.current&&(T.current[n]=e)},role:"option",tabIndex:b&&!e.disabled?0:-1,"aria-selected":r===e.id,onClick:()=>!e.disabled&&D(e.id),onKeyDown:t=>W(t,e.id,!!e.disabled),className:De("group relative flex select-none items-center gap-3 rounded-lg","cursor-pointer transition-all duration-200","hover:bg-primary/10","focus:outline-none focus:ring-2 focus:ring-primary/20",e.disabled&&"pointer-events-none opacity-50",(r===e.id||n===O)&&"bg-primary/5 border border-primary/20",M.option,m?.item)},u&&e.icon&&t.createElement("span",{className:De("text-primary/70 transition-colors duration-200","group-hover:text-primary",m?.itemIcon)},t.cloneElement(e.icon)),t.createElement("div",{className:"flex flex-col gap-0.5"},t.createElement("span",{className:De("font-medium leading-none","transition-colors duration-200","group-hover:text-primary",M.optionText,m?.itemText)},e.label),e.description&&t.createElement("span",{className:De("text-muted-foreground","transition-colors duration-200","group-hover:text-primary/70",M.description,m?.description)},e.description)),r===e.id&&t.createElement($e,{className:De("ml-auto text-primary",M.icon)})),n<I.length-1&&t.createElement("div",{className:De("my-1.5 h-px bg-border/50",m?.separator)})))))))}));HP.displayName="Dropdown";const $P=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("rounded-xl border bg-card text-card-foreground shadow",t),...r})));$P.displayName="Card";const VP=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("flex flex-col space-y-1.5 p-6",t),...r})));VP.displayName="CardHeader";e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("font-semibold leading-none tracking-tight",t),...r}))).displayName="CardTitle";e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("text-sm text-muted-foreground",t),...r}))).displayName="CardDescription";const qP=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("p-6 pt-0",t),...r})));qP.displayName="CardContent";function YP({className:e,...r}){return t.createElement("div",{className:De("animate-pulse rounded-md bg-primary/10",e),...r})}e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("flex items-center p-6 pt-0",t),...r}))).displayName="CardFooter";const UP=({headerRows:e=2,contentRows:r=3,headerRowHeight:n="h-6",contentRowHeight:o="h-5",gridCols:i=2,gridHeight:a="h-64",className:l})=>t.createElement($P,{className:De("overflow-hidden",l)},t.createElement(VP,{className:"border-b"},t.createElement("div",{className:"space-y-8"},Array.from({length:e}).map(((e,r)=>t.createElement(YP,{key:r,className:De(n,0===r?"w-1/3":"w-2/3")}))),i>0&&t.createElement("div",{className:De("grid gap-8",{"grid-cols-1":1===i,"grid-cols-1 md:grid-cols-2":2===i,"grid-cols-1 md:grid-cols-3":3===i,"grid-cols-1 md:grid-cols-4":4===i})},Array.from({length:i}).map(((e,r)=>t.createElement(YP,{key:r,className:a})))))),t.createElement(qP,{className:"mt-6 space-y-6"},Array.from({length:r}).map(((e,r)=>t.createElement("div",{key:r,className:"flex gap-4"},t.createElement(YP,{className:De("w-5",o)}),t.createElement("div",{className:"space-y-2 flex-1"},t.createElement(YP,{className:De("w-3/4",o)}),t.createElement(YP,{className:De("w-1/2",o)}))))))),GP=({rows:e=5,className:r})=>t.createElement($P,{className:De("shadow-lg border-border",r)},t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-48"})),t.createElement(qP,null,t.createElement("div",{className:"space-y-4"},Array.from({length:e}).map(((e,r)=>t.createElement(YP,{key:r,className:"h-16 w-full"})))))),XP=({className:e,rows:r=3,rowHeight:n="h-4",mainHeight:o="h-24",firstRowWidth:i="w-3/5",secondRowWidth:a="w-4/5"})=>t.createElement($P,{className:e},t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-48"})),t.createElement(qP,{className:"space-y-4"},t.createElement(YP,{className:o}),Array.from({length:r}).map(((e,r)=>t.createElement(YP,{key:r,className:De(n,0===r?i:a)}))))),ZP=()=>t.createElement("div",{className:"space-y-6"},t.createElement("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Array.from({length:4}).map(((e,r)=>t.createElement($P,{key:r},t.createElement(VP,{className:"flex flex-row items-center justify-between pb-2"},t.createElement(YP,{className:"h-5 w-1/2"}),t.createElement(YP,{className:"h-4 w-4"})),t.createElement(qP,null,t.createElement(YP,{className:"h-8 w-full"}),t.createElement(YP,{className:"mt-4 h-4 w-3/4"})))))),t.createElement("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2"},t.createElement($P,null,t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-40"})),t.createElement(qP,null,t.createElement(YP,{className:"h-[200px]"}))),t.createElement($P,null,t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-40"})),t.createElement(qP,null,t.createElement("div",{className:"space-y-2"},Array.from({length:5}).map(((e,r)=>t.createElement("div",{key:r,className:"flex justify-between"},t.createElement(YP,{className:"h-4 w-[100px]"}),t.createElement(YP,{className:"h-4 w-[60px]"}))))))))),KP=t.forwardRef((({variant:e="card",rows:r=5,className:n,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l,headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:d,gridCols:f,gridHeight:p,...m},y)=>{const h={card:t.createElement(UP,{headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:d,gridCols:f,gridHeight:p,className:n}),table:t.createElement(GP,{rows:r,className:n}),simple:t.createElement(XP,{className:n,rows:r,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l}),dashboard:t.createElement(ZP,null)};return t.createElement("div",{ref:y,...m},h[e])}));KP.displayName="CustomSkeleton";const QP={small:{padding:"p-3 sm:p-4",titleSize:"text-base sm:text-lg",descSize:"text-sm sm:text-base",imageHeight:"h-24 sm:h-32 md:h-36"},medium:{padding:"p-4 sm:p-5 md:p-6",titleSize:"text-lg sm:text-xl md:text-2xl",descSize:"text-sm sm:text-base md:text-lg",imageHeight:"h-32 sm:h-40 md:h-48 lg:h-56"},large:{padding:"p-5 sm:p-6 md:p-7 lg:p-8",titleSize:"text-xl sm:text-2xl md:text-3xl",descSize:"text-base sm:text-lg md:text-xl",imageHeight:"h-40 sm:h-48 md:h-56 lg:h-64"}},JP={default:{kind:"default",wrapper:"bg-card border border-border rounded-lg sm:rounded-xl",gradients:[]},gradiant:{kind:"gradiant",wrapper:"relative overflow-hidden bg-card border border-border shadow-sm rounded-lg sm:rounded-xl",gradients:["absolute inset-0 bg-primary/20","absolute inset-0 bg-gradient-to-tr from-primary/10 via-transparent to-transparent"]}},eN=({title:e,description:r,variant:n="gradiant",size:o="medium",image:a,footer:l,className:s,children:c,badge:u,width:d,height:f})=>{const[p,m]=i(!a),y=JP[n],h=QP[o],v=t.createElement(t.Fragment,null,u&&t.createElement("div",{"data-testid":"badge-wrapper",className:"absolute right-4 top-4 z-10"},t.createElement("span",{className:"inline-flex items-center rounded-full bg-primary px-3 py-1 text-xs font-medium text-primary-foreground ring-1 ring-inset ring-primary/10"},u)),t.createElement("div",{className:De("space-y-4",y.content&&"default"!==n&&"p-6")},a&&t.createElement("div",{"data-testid":"image-wrapper",className:De("relative w-full overflow-hidden rounded-lg mb-6",h.imageHeight)},t.createElement("div",{"data-testid":"image-container",className:De(p?"opacity-100":"opacity-0")},t.createElement("img",{src:a,alt:e,className:"h-full w-full object-cover",onLoad:()=>m(!0)}))),t.createElement("h3",{"data-testid":"title",className:De("font-semibold tracking-tight text-foreground",h.titleSize)},e),r&&t.createElement("p",{"data-testid":"description",className:De("text-muted-foreground leading-relaxed",h.descSize)},r),c&&t.createElement("div",{className:"mt-4"},c),l&&t.createElement("div",{"data-testid":"footer",className:"mt-6 pt-4 border-t border-border"},l))),g=y.content?t.createElement("div",{className:y.content},v):v,b={width:d||"auto",height:f||"auto"};return t.createElement("div",{className:De("bg-card text-card-foreground",y.wrapper,s),style:b},t.createElement("div",{"data-testid":"gradient-wrapper"},y.gradients&&y.gradients.map(((e,r)=>t.createElement("div",{key:r,className:e})))),y.inner?t.createElement("div",{className:De(y.inner,h.padding)},t.createElement("div",{className:"relative"},g)):t.createElement("div",{className:De("relative",h.padding)},g))};eN.displayName="Card";const tN={small:"h-10 w-10",medium:"h-14 w-14 md:h-20 md:w-20",large:"h-28 w-28"},rN=({variant:e="spinner",size:r="medium",className:n,ariaLabel:o="Loading",colorScheme:i})=>{const a=tN[r];return t.createElement("div",{role:"status","aria-label":o,className:De("flex items-center justify-center",n)},(()=>{switch(e){case"dots":return t.createElement("div",{className:"flex space-x-2"},[0,1,2].map((e=>t.createElement("div",{key:e,className:De("w-3 h-3 rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bounce",1===e&&"animate-bounce-delay-1",2===e&&"animate-bounce-delay-2"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}}))));case"bars":return t.createElement("div",{className:"flex space-x-1 h-10 items-center"},[0,1,2,3].map((e=>t.createElement("div",{key:e,className:De("w-2 h-full rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bar-scale",1===e&&"animate-bar-scale-delay-1",2===e&&"animate-bar-scale-delay-2",3===e&&"animate-bar-scale-delay-3"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}}))));case"orbit":return t.createElement("div",{className:De("relative aspect-square flex items-center justify-center",{"w-20 h-20":"small"===r,"w-32 h-32":"medium"===r,"w-40 h-40":"large"===r},n)},t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:3rem]"},t.createElement("div",{className:De("absolute w-4 h-4 rounded-full animate-orbit-medium","harford"!==i&&"bg-primary/70 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.7)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:De("absolute inset-0 rounded-full blur-sm","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:De("absolute w-2 h-2 rounded-full animate-orbit-reverse-medium","harford"!==i&&"bg-primary/60 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 4px 6px -1px rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:4rem]"},t.createElement("div",{className:De("absolute w-5 h-5 rounded-full animate-orbit-slow","harford"!==i&&"bg-primary/60 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 20px 25px -5px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:De("absolute inset-0 rounded-full blur-sm","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:De("absolute w-3 h-3 rounded-full animate-orbit-reverse-slow","harford"!==i&&"bg-primary/50 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.5)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.3)"}:{}})));default:return t.createElement("div",{className:"relative"},t.createElement("div",{className:De("relative",a)},t.createElement("div",{className:De("absolute inset-0 rounded-full border-4","harford"!==i&&"border-primary/30","animate-ping-slow"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.3)"}:{}}),t.createElement("div",{className:De("absolute inset-0 rounded-full border-4 border-transparent","harford"!==i&&"border-t-primary border-l-primary","animate-spin-slow"),style:"harford"===i?{borderTopColor:"#043d5a",borderLeftColor:"#043d5a"}:{}}),t.createElement("div",{className:De("absolute inset-0 rounded-full","border-[3px] border-dashed","harford"!==i&&"border-primary/50","animate-spin-slower"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.5)"}:{}}),t.createElement("div",{className:De("absolute inset-2 rounded-full border-4 border-transparent","harford"!==i&&"border-r-primary/70 border-b-primary/70","animate-spin-reverse"),style:"harford"===i?{borderRightColor:"rgba(4, 61, 90, 0.7)",borderBottomColor:"rgba(4, 61, 90, 0.7)"}:{}})))}})(),t.createElement("span",{className:"sr-only"},o))};rN.displayName="Loader";var nN,oN="dismissableLayer.update",iN="dismissableLayer.pointerDownOutside",aN="dismissableLayer.focusOutside",lN=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sN=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(lN),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=e.useState({}),y=hg(r,(e=>f(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(v),w=d?h.indexOf(d):-1,O=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,E=function(t,r=globalThis?.document){const n=Sg(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){uN(iN,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));x&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),p),k=function(t,r=globalThis?.document){const n=Sg(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){uN(aN,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),p);return function(t,r=globalThis?.document){const n=Sg(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}((e=>{w===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),e.useEffect((()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(nN=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cN(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=nN)}}),[d,p,n,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cN())}),[d,u]),e.useEffect((()=>{const e=()=>m({});return document.addEventListener(oN,e),()=>document.removeEventListener(oN,e)}),[]),g(Eg.div,{...c,ref:y,style:{pointerEvents:O?x?"auto":"none":void 0,...t.style},onFocusCapture:pg(t.onFocusCapture,k.onFocusCapture),onBlurCapture:pg(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:pg(t.onPointerDownCapture,E.onPointerDownCapture)})}));sN.displayName="DismissableLayer";function cN(){const e=new CustomEvent(oN);document.dispatchEvent(e)}function uN(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&O.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(lN),o=e.useRef(null),i=hg(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),g(Eg.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var dN="focusScope.autoFocusOnMount",fN="focusScope.autoFocusOnUnmount",pN={bubbles:!1,cancelable:!0},mN=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=Sg(i),d=Sg(a),f=e.useRef(null),p=hg(r,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(m.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:gN(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||gN(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&gN(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,m.paused]),e.useEffect((()=>{if(s){bN.add(m);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(dN,pN);s.addEventListener(dN,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(gN(n,{select:t}),document.activeElement!==r)return}((e=yN(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&gN(s))}return()=>{s.removeEventListener(dN,u),setTimeout((()=>{const e=new CustomEvent(fN,pN);s.addEventListener(fN,d),s.dispatchEvent(e),e.defaultPrevented||gN(t??document.body,{select:!0}),s.removeEventListener(fN,d),bN.remove(m)}),0)}}var e}),[s,u,d,m]);const y=e.useCallback((e=>{if(!n&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=yN(e),r=hN(t,e),n=hN(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&gN(i,{select:!0})):(e.preventDefault(),n&&gN(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,m.paused]);return g(Eg.div,{tabIndex:-1,...l,ref:p,onKeyDown:y})}));function yN(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function hN(e,t){for(const r of e)if(!vN(r,{upTo:t}))return r}function vN(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function gN(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}mN.displayName="FocusScope";var bN=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=wN(e,t),e.unshift(t)},remove(t){e=wN(e,t),e[0]?.resume()}}}();function wN(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var ON=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);kg((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?x.createPortal(g(Eg.div,{...o,ref:r}),l):null}));ON.displayName="Portal";var xN=0;function EN(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kN()),document.body.insertAdjacentElement("beforeend",e[1]??kN()),xN++,()=>{1===xN&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),xN--}}),[])}function kN(){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 jN=function(){return jN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},jN.apply(this,arguments)};function PN(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}"function"==typeof SuppressedError&&SuppressedError;var NN="right-scroll-bar-position",SN="width-before-scroll-bar";function CN(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var zN="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,TN=new WeakMap;function LN(e,t){var r,n,o,a=(r=null,n=function(t){return e.forEach((function(e){return CN(e,t)}))},(o=i((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return zN((function(){var t=TN.get(a);if(t){var r=new Set(t),n=new Set(e),o=a.current;r.forEach((function(e){n.has(e)||CN(e,null)})),n.forEach((function(e){r.has(e)||CN(e,o)}))}TN.set(a,e)}),[e]),a}function MN(e){return e}var IN=function(t){var r=t.sideCar,n=PN(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,jN({},n))};IN.isSideCarExport=!0;var DN=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=MN);var r=[],n=!1;return{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(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=jN({async:!0,ssr:!1},e),t}(),RN=function(){},AN=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:RN,onWheelCapture:RN,onTouchMoveCapture:RN}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,m=t.noIsolation,y=t.inert,h=t.allowPinchZoom,v=t.as,g=void 0===v?"div":v,b=t.gapMode,w=PN(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,x=LN([n,r]),E=jN(jN({},w),i);return e.createElement(e.Fragment,null,d&&e.createElement(O,{sideCar:DN,removeScrollBar:u,shards:f,noIsolation:m,inert:y,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),l?e.cloneElement(e.Children.only(s),jN(jN({},E),{ref:x})):e.createElement(g,jN({},E,{className:c,ref:x}),s))}));AN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},AN.classNames={fullWidth:SN,zeroRight:NN};function WN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var BN=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=WN())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_N=function(){var t,r=(t=BN(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},FN={left:0,top:0,right:0,gap:0},HN=function(e){return parseInt(e||"",10)||0},$N=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return FN;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[HN(r),HN(n),HN(o)]}(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])}},VN=_N(),qN="data-scroll-locked",YN=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(qN,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(NN," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(SN," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(NN," .").concat(NN," {\n right: 0 ").concat(n,";\n }\n \n .").concat(SN," .").concat(SN," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(qN,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},UN=function(){var e=parseInt(document.body.getAttribute(qN)||"0",10);return isFinite(e)?e:0},GN=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(qN,(UN()+1).toString()),function(){var e=UN()-1;e<=0?document.body.removeAttribute(qN):document.body.setAttribute(qN,e.toString())}}),[]);var a=e.useMemo((function(){return $N(i)}),[i]);return e.createElement(VN,{styles:YN(a,!r,i,n?"":"!important")})},XN=!1;if("undefined"!=typeof window)try{var ZN=Object.defineProperty({},"passive",{get:function(){return XN=!0,!0}});window.addEventListener("test",ZN,ZN),window.removeEventListener("test",ZN,ZN)}catch(e){XN=!1}var KN=!!XN&&{passive:!1},QN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},JN=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),eS(e,n)){var o=tS(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},eS=function(e,t){return"v"===e?function(e){return QN(e,"overflowY")}(t):function(e){return QN(e,"overflowX")}(t)},tS=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},rS=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nS=function(e){return[e.deltaX,e.deltaY]},oS=function(e){return e&&"current"in e?e.current:e},iS=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},aS=0,lS=[];function sS(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var cS,uS=(cS=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(aS++)[0],a=e.useState(_N)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(oS),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=rS(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=JN(d,u);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=JN(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),s=!1,c=i>0,u=0,d=0;do{var f=tS(e,a),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&eS(e,a)&&(u+=m,d+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:c)}),[]),c=e.useCallback((function(e){var t=e;if(lS.length&&lS[lS.length-1]===a){var n="deltaY"in t?nS(t):rS(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(oS).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:sS(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){n.current=rS(e),o.current=void 0}),[]),f=e.useCallback((function(e){u(e.type,nS(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,rS(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return lS.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,KN),document.addEventListener("touchmove",c,KN),document.addEventListener("touchstart",d,KN),function(){lS=lS.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,KN),document.removeEventListener("touchmove",c,KN),document.removeEventListener("touchstart",d,KN)}}),[]);var m=t.removeScrollBar,y=t.inert;return e.createElement(e.Fragment,null,y?e.createElement(a,{styles:iS(i)}):null,m?e.createElement(GN,{gapMode:t.gapMode}):null)},DN.useMedium(cS),IN),dS=e.forwardRef((function(t,r){return e.createElement(AN,jN({},t,{ref:r,sideCar:uS}))}));dS.classNames=AN.classNames;var fS=new WeakMap,pS=new WeakMap,mS={},yS=0,hS=function(e){return e&&(e.host||hS(e.parentNode))},vS=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=hS(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);mS[r]||(mS[r]=new WeakMap);var i=mS[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(fS.get(e)||0)+1,c=(i.get(e)||0)+1;fS.set(e,s),i.set(e,c),a.push(e),1===s&&o&&pS.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),l.clear(),yS++,function(){a.forEach((function(e){var t=fS.get(e)-1,o=i.get(e)-1;fS.set(e,t),i.set(e,o),t||(pS.has(e)||e.removeAttribute(n),pS.delete(e)),o||e.removeAttribute(r)})),--yS||(fS=new WeakMap,fS=new WeakMap,pS=new WeakMap,mS={})}},gS=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),vS(n,o,r,"aria-hidden")):function(){return null}},bS="Dialog",[wS,OS]=vg(bS),[xS,ES]=wS(bS),kS=t=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=t,s=e.useRef(null),c=e.useRef(null),[u=!1,d]=Cg({prop:o,defaultProp:i,onChange:a});return g(xS,{scope:r,triggerRef:s,contentRef:c,contentId:Ng(),titleId:Ng(),descriptionId:Ng(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:l,children:n})};kS.displayName=bS;var jS="DialogTrigger",PS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(jS,r),i=hg(t,o.triggerRef);return g(Eg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qS(o.open),...n,ref:i,onClick:pg(e.onClick,o.onOpenToggle)})}));PS.displayName=jS;var NS="DialogPortal",[SS,CS]=wS(NS,{forceMount:void 0}),zS=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=ES(NS,r);return g(SS,{scope:r,forceMount:n,children:e.Children.map(o,(e=>g(Qg,{present:n||a.open,children:g(ON,{asChild:!0,container:i,children:e})})))})};zS.displayName=NS;var TS="DialogOverlay",LS=e.forwardRef(((e,t)=>{const r=CS(TS,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=ES(TS,e.__scopeDialog);return i.modal?g(Qg,{present:n||i.open,children:g(MS,{...o,ref:t})}):null}));LS.displayName=TS;var MS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(TS,r);return g(dS,{as:bg,allowPinchZoom:!0,shards:[o.contentRef],children:g(Eg.div,{"data-state":qS(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),IS="DialogContent",DS=e.forwardRef(((e,t)=>{const r=CS(IS,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=ES(IS,e.__scopeDialog);return g(Qg,{present:n||i.open,children:i.modal?g(RS,{...o,ref:t}):g(AS,{...o,ref:t})})}));DS.displayName=IS;var RS=e.forwardRef(((t,r)=>{const n=ES(IS,t.__scopeDialog),o=e.useRef(null),i=hg(r,n.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return gS(e)}),[]),g(WS,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pg(t.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:pg(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:pg(t.onFocusOutside,(e=>e.preventDefault()))})})),AS=e.forwardRef(((t,r)=>{const n=ES(IS,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return g(WS,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),WS=e.forwardRef(((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=ES(IS,n),c=e.useRef(null),u=hg(r,c);return EN(),w(b,{children:[g(mN,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:g(sN,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":qS(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),w(b,{children:[g(XS,{titleId:s.titleId}),g(ZS,{contentRef:c,descriptionId:s.descriptionId})]})]})})),BS="DialogTitle",_S=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(BS,r);return g(Eg.h2,{id:o.titleId,...n,ref:t})}));_S.displayName=BS;var FS="DialogDescription",HS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(FS,r);return g(Eg.p,{id:o.descriptionId,...n,ref:t})}));HS.displayName=FS;var $S="DialogClose",VS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES($S,r);return g(Eg.button,{type:"button",...n,ref:t,onClick:pg(e.onClick,(()=>o.onOpenChange(!1)))})}));function qS(e){return e?"open":"closed"}VS.displayName=$S;var YS="DialogTitleWarning",[US,GS]=function(t,r){const n=e.createContext(r),o=t=>{const{children:r,...o}=t,i=e.useMemo((()=>o),Object.values(o));return g(n.Provider,{value:i,children:r})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(n);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(YS,{contentName:IS,titleName:BS,docsSlug:"dialog"}),XS=({titleId:t})=>{const r=GS(YS),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(n)}}),[n,t]),null},ZS=({contentRef:t,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${GS("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(r&&e){document.getElementById(r)||console.warn(n)}}),[n,t,r]),null},KS=kS,QS=PS,JS=zS,eC=LS,tC=DS,rC=_S,nC=HS,oC=VS;const iC=KS,aC=QS,lC=JS,sC=e.forwardRef((({className:t,...r},n)=>e.createElement(eC,{ref:n,className:De("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",t),...r})));sC.displayName=eC.displayName;const cC=e.forwardRef((({className:t,children:r,...n},o)=>e.createElement(lC,null,e.createElement(sC,null),e.createElement(tC,{ref:o,className:De("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-lg 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",t),...n},r,e.createElement(oC,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none 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"},e.createElement(WE,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close"))))));cC.displayName=tC.displayName;const uC=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});uC.displayName="DialogHeader";const dC=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});dC.displayName="DialogFooter";const fC=e.forwardRef((({className:t,...r},n)=>e.createElement(rC,{ref:n,className:De("text-lg font-semibold leading-none tracking-tight",t),...r})));fC.displayName=rC.displayName;const pC=e.forwardRef((({className:t,...r},n)=>e.createElement(nC,{ref:n,className:De("text-sm text-muted-foreground",t),...r})));pC.displayName=nC.displayName;const mC="Cancel",yC="Confirm",hC="default",vC="medium",gC=!0,bC=!1,wC={button:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},OC=e=>{switch(e){case"small":return"sm:max-w-[425px]";case"large":return"sm:max-w-[725px]";case"extraLarge":return"sm:max-w-[925px]";case"full":return"sm:max-w-[90vw]";default:return"sm:max-w-[525px]"}},xC=({title:e,description:r,cancelText:n=mC,confirmText:o=yC,onConfirm:a,onCancel:l,variant:u=hC,showCloseButton:d=bC,size:f=vC,className:p,onClose:m,fields:y=[],onOpenChange:h})=>{const[v,g]=i({}),b=s(null),w=c((e=>{e.preventDefault(),b.current?.checkValidity()&&(a?.(v),h(!1))}),[v,a,h]),O=c((()=>{l?.(),h(!1)}),[l,h]),x=c((()=>{m?.(),h(!1)}),[m,h]),E=c((e=>{const{name:t,value:r}=e.target;g((e=>({...e,[t]:r})))}),[]);return t.createElement(cC,{className:De(OC(f),p)},t.createElement("form",{ref:b,onSubmit:w},t.createElement(uC,null,t.createElement("div",{className:"flex items-center justify-between"},t.createElement(fC,null,e),d&&t.createElement(nt,{variant:"tertiary",className:"h-6 w-6",onClick:x,type:"button"},t.createElement(tt,{className:"h-4 w-4"}))),t.createElement(pC,null,r)),y.length>0&&t.createElement("div",{className:"grid gap-4 py-4"},y.map((e=>t.createElement("div",{className:"grid gap-2",key:e.name},t.createElement(fg,{id:e.name,name:e.name,type:e.type,placeholder:e.placeholder,required:e.required,defaultValue:e.defaultValue,onChange:E,label:""}))))),t.createElement(dC,{className:"gap-2 sm:gap-0"},t.createElement(nt,{type:"button",variant:"primary",onClick:O},n),t.createElement(nt,{type:"submit",className:"destructive"===u?wC.destructive:wC.button},o))))},EC=({trigger:e,isOpen:r,closeOnOutsideClick:n=gC,...o})=>{const[l,s]=i(r);a((()=>{void 0!==r&&s(r)}),[r]);return t.createElement(iC,{open:l,onOpenChange:e=>{(e||n)&&s(e)}},t.createElement(aC,{asChild:!0},t.createElement(nt,{variant:"primary"},e)),t.createElement(xC,{...o,onOpenChange:s}))};EC.displayName="Dialog";const kC=["top","right","bottom","left"],jC=Math.min,PC=Math.max,NC=Math.round,SC=Math.floor,CC=e=>({x:e,y:e}),zC={left:"right",right:"left",bottom:"top",top:"bottom"},TC={start:"end",end:"start"};function LC(e,t,r){return PC(e,jC(t,r))}function MC(e,t){return"function"==typeof e?e(t):e}function IC(e){return e.split("-")[0]}function DC(e){return e.split("-")[1]}function RC(e){return"x"===e?"y":"x"}function AC(e){return"y"===e?"height":"width"}function WC(e){return["top","bottom"].includes(IC(e))?"y":"x"}function BC(e){return RC(WC(e))}function _C(e){return e.replace(/start|end/g,(e=>TC[e]))}function FC(e){return e.replace(/left|right|bottom|top/g,(e=>zC[e]))}function HC(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function $C(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function VC(e,t,r){let{reference:n,floating:o}=e;const i=WC(t),a=BC(t),l=AC(a),s=IC(t),c="y"===i,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(DC(t)){case"start":p[a]-=f*(r&&c?-1:1);break;case"end":p[a]+=f*(r&&c?-1:1)}return p}async function qC(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=MC(t,e),m=HC(p),y=l[f?"floating"===d?"reference":"floating":d],h=$C(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(y)))||r?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=$C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:g,strategy:s}):v);return{top:(h.top-w.top+m.top)/b.y,bottom:(w.bottom-h.bottom+m.bottom)/b.y,left:(h.left-w.left+m.left)/b.x,right:(w.right-h.right+m.right)/b.x}}function YC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UC(e){return kC.some((t=>e[t]>=0))}function GC(){return"undefined"!=typeof window}function XC(e){return QC(e)?(e.nodeName||"").toLowerCase():"#document"}function ZC(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function KC(e){var t;return null==(t=(QC(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function QC(e){return!!GC()&&(e instanceof Node||e instanceof ZC(e).Node)}function JC(e){return!!GC()&&(e instanceof Element||e instanceof ZC(e).Element)}function ez(e){return!!GC()&&(e instanceof HTMLElement||e instanceof ZC(e).HTMLElement)}function tz(e){return!(!GC()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ZC(e).ShadowRoot)}function rz(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=sz(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function nz(e){return["table","td","th"].includes(XC(e))}function oz(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function iz(e){const t=az(),r=JC(e)?sz(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!r[e]&&"none"!==r[e]))||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function az(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function lz(e){return["html","body","#document"].includes(XC(e))}function sz(e){return ZC(e).getComputedStyle(e)}function cz(e){return JC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uz(e){if("html"===XC(e))return e;const t=e.assignedSlot||e.parentNode||tz(e)&&e.host||KC(e);return tz(t)?t.host:t}function dz(e){const t=uz(e);return lz(t)?e.ownerDocument?e.ownerDocument.body:e.body:ez(t)&&rz(t)?t:dz(t)}function fz(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=dz(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ZC(o);if(i){const e=pz(a);return t.concat(a,a.visualViewport||[],rz(o)?o:[],e&&r?fz(e):[])}return t.concat(o,fz(o,[],r))}function pz(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mz(e){const t=sz(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ez(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=NC(r)!==i||NC(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function yz(e){return JC(e)?e:e.contextElement}function hz(e){const t=yz(e);if(!ez(t))return CC(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=mz(t);let a=(i?NC(r.width):r.width)/n,l=(i?NC(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const vz=CC(0);function gz(e){const t=ZC(e);return az()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:vz}function bz(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=yz(e);let a=CC(1);t&&(n?JC(n)&&(a=hz(n)):a=hz(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ZC(e))&&t}(i,r,n)?gz(i):CC(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=ZC(i),t=n&&JC(n)?ZC(n):n;let r=e,o=pz(r);for(;o&&n&&t!==r;){const e=hz(o),t=o.getBoundingClientRect(),n=sz(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,r=ZC(o),o=pz(r)}}return $C({width:u,height:d,x:s,y:c})}function wz(e,t){const r=cz(e).scrollLeft;return t?t.left+r:bz(KC(e)).left+r}function Oz(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:wz(e,n)),y:n.top+t.scrollTop}}function xz(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ZC(e),n=KC(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=az();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=KC(e),r=cz(e),n=e.ownerDocument.body,o=PC(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=PC(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+wz(e);const l=-r.scrollTop;return"rtl"===sz(n).direction&&(a+=PC(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(KC(e));else if(JC(t))n=function(e,t){const r=bz(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ez(e)?hz(e):CC(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=gz(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $C(n)}function Ez(e,t){const r=uz(e);return!(r===t||!JC(r)||lz(r))&&("fixed"===sz(r).position||Ez(r,t))}function kz(e,t,r){const n=ez(t),o=KC(t),i="fixed"===r,a=bz(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=CC(0);if(n||!n&&!i)if(("body"!==XC(t)||rz(o))&&(l=cz(t)),n){const e=bz(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=wz(o));const c=!o||n||i?CC(0):Oz(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function jz(e){return"static"===sz(e).position}function Pz(e,t){if(!ez(e)||"fixed"===sz(e).position)return null;if(t)return t(e);let r=e.offsetParent;return KC(e)===r&&(r=r.ownerDocument.body),r}function Nz(e,t){const r=ZC(e);if(oz(e))return r;if(!ez(e)){let t=uz(e);for(;t&&!lz(t);){if(JC(t)&&!jz(t))return t;t=uz(t)}return r}let n=Pz(e,t);for(;n&&nz(n)&&jz(n);)n=Pz(n,t);return n&&lz(n)&&jz(n)&&!iz(n)?r:n||function(e){let t=uz(e);for(;ez(t)&&!lz(t);){if(iz(t))return t;if(oz(t))return null;t=uz(t)}return null}(e)||r}const Sz={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=KC(n),l=!!t&&oz(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=CC(1);const u=CC(0),d=ez(n);if((d||!d&&!i)&&(("body"!==XC(n)||rz(a))&&(s=cz(n)),ez(n))){const e=bz(n);c=hz(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||d||i?CC(0):Oz(a,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:KC,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?oz(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=fz(e,[],!1).filter((e=>JC(e)&&"body"!==XC(e))),o=null;const i="fixed"===sz(e).position;let a=i?uz(e):e;for(;JC(a)&&!lz(a);){const t=sz(a),r=iz(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||rz(a)&&!r&&Ez(e,a))?n=n.filter((e=>e!==a)):o=t,a=uz(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce(((e,r)=>{const n=xz(t,r,o);return e.top=PC(n.top,e.top),e.right=jC(n.right,e.right),e.bottom=jC(n.bottom,e.bottom),e.left=PC(n.left,e.left),e}),xz(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Nz,getElementRects:async function(e){const t=this.getOffsetParent||Nz,r=this.getDimensions,n=await r(e.floating);return{reference:kz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=mz(e);return{width:t,height:r}},getScale:hz,isElement:JC,isRTL:function(e){return"rtl"===sz(e).direction}};function Cz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zz(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=yz(e),u=o||i?[...c?fz(c):[],...fz(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const d=c&&l?function(e,t){let r,n=null;const o=KC(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-SC(d)+"px "+-SC(o.clientWidth-(u+f))+"px "+-SC(o.clientHeight-(d+p))+"px "+-SC(u)+"px",threshold:PC(0,jC(1,s))||1};let y=!0;function h(t){const n=t[0].intersectionRatio;if(n!==s){if(!y)return a();n?a(!1,n):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==n||Cz(c,e.getBoundingClientRect())||a(),y=!1}try{n=new IntersectionObserver(h,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(h,m)}n.observe(e)}(!0),i}(c,r):null;let f,p=-1,m=null;a&&(m=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),r()})),c&&!s&&m.observe(c),m.observe(t));let y=s?bz(e):null;return s&&function t(){const n=bz(e);y&&!Cz(y,n)&&r();y=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const Tz=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=IC(r),l=DC(r),s="y"===WC(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,d=MC(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lz=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=MC(e,t),c={x:r,y:n},u=await qC(t,s),d=WC(IC(o)),f=RC(d);let p=c[f],m=c[d];if(i){const e="y"===f?"bottom":"right";p=LC(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";m=LC(m+u["y"===d?"top":"left"],m,m-u[e])}const y=l.fn({...t,[f]:p,[d]:m});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:i,[d]:a}}}}}},Mz=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...h}=MC(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=IC(o),g=WC(l),b=IC(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=f||(b||!y?[FC(l)]:function(e){const t=FC(e);return[_C(e),t,_C(t)]}(l)),x="none"!==m;!f&&x&&O.push(...function(e,t,r,n){const o=DC(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(IC(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(_C)))),i}(l,y,m,w));const E=[l,...O],k=await qC(t,h),j=[];let P=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&j.push(k[v]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=DC(e),o=BC(e),i=AC(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=FC(a)),[a,FC(a)]}(o,a,w);j.push(k[e[0]],k[e[1]])}if(P=[...P,{placement:o,overflows:j}],!j.every((e=>e<=0))){var N,S;const e=((null==(N=i.flip)?void 0:N.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let r=null==(S=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!r)switch(p){case"bestFit":{var C;const e=null==(C=P.filter((e=>{if(x){const t=WC(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},Iz=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=MC(e,t),u=await qC(t,c),d=IC(o),f=DC(o),p="y"===WC(o),{width:m,height:y}=i.floating;let h,v;"top"===d||"bottom"===d?(h=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,h="end"===f?"top":"bottom");const g=y-u.top-u.bottom,b=m-u.left-u.right,w=jC(y-u[h],g),O=jC(m-u[v],b),x=!t.middlewareData.shift;let E=w,k=O;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=g),x&&!f){const e=PC(u.left,0),t=PC(u.right,0),r=PC(u.top,0),n=PC(u.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:PC(u.left,u.right)):E=y-2*(0!==r||0!==n?r+n:PC(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:E});const j=await a.getDimensions(l.floating);return m!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}},Dz=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=MC(e,t);switch(n){case"referenceHidden":{const e=YC(await qC(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:UC(e)}}}case"escaped":{const e=YC(await qC(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:UC(e)}}}default:return{}}}}},Rz=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=MC(e,t)||{};if(null==c)return{};const d=HC(u),f={x:r,y:n},p=BC(o),m=AC(p),y=await a.getDimensions(c),h="y"===p,v=h?"top":"left",g=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],O=f[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=x?x[b]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=l.floating[b]||i.floating[m]);const k=w/2-O/2,j=E/2-y[m]/2-1,P=jC(d[v],j),N=jC(d[g],j),S=P,C=E-y[m]-N,z=E/2-y[m]/2+k,T=LC(S,z,C),L=!s.arrow&&null!=DC(o)&&z!==T&&i.reference[m]/2-(z<S?P:N)-y[m]/2<0,M=L?z<S?z-S:z-C:0;return{[p]:f[p]+M,data:{[p]:T,centerOffset:z-T-M,...L&&{alignmentOffset:M}},reset:L}}}),Az=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=MC(e,t),u={x:r,y:n},d=WC(o),f=RC(d);let p=u[f],m=u[d];const y=MC(l,t),h="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,r=i.reference[f]+i.reference[e]-h.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,g;const e="y"===f?"width":"height",t=["top","left"].includes(IC(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:h.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?h.crossAxis:0);m<r?m=r:m>n&&(m=n)}return{[f]:p,[d]:m}}}},Wz=(e,t,r)=>{const n=new Map,o={platform:Sz,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=VC(c,n,s),f=n,p={},m=0;for(let r=0;r<l.length;r++){const{name:i,fn:y}=l[r],{x:h,y:v,data:g,reset:b}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...g}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=VC(c,f,s))),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Bz="undefined"!=typeof document?f:a;function _z(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!_z(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!_z(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Fz(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hz(e,t){const r=Fz(e);return Math.round(t*r)/r}function $z(t){const r=e.useRef(t);return Bz((()=>{r.current=t})),r}const Vz=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?Rz({element:r.current,padding:n}).fn(t):{}:r?Rz({element:r,padding:n}).fn(t):{};var o}}),qz=(e,t)=>({...Tz(e),options:[e,t]}),Yz=(e,t)=>({...Lz(e),options:[e,t]}),Uz=(e,t)=>({...Az(e),options:[e,t]}),Gz=(e,t)=>({...Mz(e),options:[e,t]}),Xz=(e,t)=>({...Iz(e),options:[e,t]}),Zz=(e,t)=>({...Dz(e),options:[e,t]}),Kz=(e,t)=>({...Vz(e),options:[e,t]});var Qz=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return g(Eg.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g("polygon",{points:"0,0 30,0 15,10"})})}));Qz.displayName="Arrow";var Jz=Qz,eT="Popper",[tT,rT]=vg(eT),[nT,oT]=tT(eT),iT=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return g(nT,{scope:r,anchor:o,onAnchorChange:i,children:n})};iT.displayName=eT;var aT="PopperAnchor",lT=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=oT(aT,n),l=e.useRef(null),s=hg(r,l);return e.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:g(Eg.div,{...i,ref:s})}));lT.displayName=aT;var sT="PopperContent",[cT,uT]=tT(sT),dT=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...h}=t,v=oT(sT,n),[b,w]=e.useState(null),x=hg(r,(e=>w(e))),[E,k]=e.useState(null),j=Zg(E),P=j?.width??0,N=j?.height??0,S=o+("center"!==a?"-"+a:""),C="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},z=Array.isArray(u)?u:[u],T=z.length>0,L={padding:C,boundary:z.filter(yT),altBoundary:T},{refs:M,floatingStyles:I,placement:D,isPositioned:R,middlewareData:A}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,m]=e.useState(o);_z(p,o)||m(o);const[y,h]=e.useState(null),[v,g]=e.useState(null),b=e.useCallback((e=>{e!==k.current&&(k.current=e,h(e))}),[]),w=e.useCallback((e=>{e!==j.current&&(j.current=e,g(e))}),[]),x=a||y,E=l||v,k=e.useRef(null),j=e.useRef(null),P=e.useRef(d),N=null!=c,S=$z(c),C=$z(i),z=$z(u),T=e.useCallback((()=>{if(!k.current||!j.current)return;const e={placement:r,strategy:n,middleware:p};C.current&&(e.platform=C.current),Wz(k.current,j.current,e).then((e=>{const t={...e,isPositioned:!1!==z.current};L.current&&!_z(P.current,t)&&(P.current=t,O.flushSync((()=>{f(t)})))}))}),[p,r,n,C,z]);Bz((()=>{!1===u&&P.current.isPositioned&&(P.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const L=e.useRef(!1);Bz((()=>(L.current=!0,()=>{L.current=!1})),[]),Bz((()=>{if(x&&(k.current=x),E&&(j.current=E),x&&E){if(S.current)return S.current(x,E,T);T()}}),[x,E,T,S,N]);const M=e.useMemo((()=>({reference:k,floating:j,setReference:b,setFloating:w})),[b,w]),I=e.useMemo((()=>({reference:x,floating:E})),[x,E]),D=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=Hz(I.floating,d.x),r=Hz(I.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Fz(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,I.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:T,refs:M,elements:I,floatingStyles:D})),[d,T,M,I,D])}({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>zz(...e,{animationFrame:"always"===m}),elements:{reference:v.anchor},middleware:[qz({mainAxis:i+N,alignmentAxis:l}),c&&Yz({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Uz():void 0,...L}),c&&Gz({...L}),Xz({...L,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),E&&Kz({element:E,padding:s}),hT({arrowWidth:P,arrowHeight:N}),p&&Zz({strategy:"referenceHidden",...L})]}),[W,B]=vT(D),_=Sg(y);kg((()=>{R&&_?.()}),[R,_]);const F=A.arrow?.x,H=A.arrow?.y,$=0!==A.arrow?.centerOffset,[V,q]=e.useState();return kg((()=>{b&&q(window.getComputedStyle(b).zIndex)}),[b]),g("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:R?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g(cT,{scope:n,placedSide:W,onArrowChange:k,arrowX:F,arrowY:H,shouldHideArrow:$,children:g(Eg.div,{"data-side":W,"data-align":B,...h,ref:x,style:{...h.style,animation:R?void 0:"none"}})})})}));dT.displayName=sT;var fT="PopperArrow",pT={top:"bottom",right:"left",bottom:"top",left:"right"},mT=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=uT(fT,r),i=pT[o.placedSide];return g("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g(Jz,{...n,ref:t,style:{...n.style,display:"block"}})})}));function yT(e){return null!==e}mT.displayName=fT;var hT=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=vT(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let p="",m="";return"bottom"===s?(p=i?u:`${d}px`,m=-l+"px"):"top"===s?(p=i?u:`${d}px`,m=`${n.floating.height+l}px`):"right"===s?(p=-l+"px",m=i?u:`${f}px`):"left"===s&&(p=`${n.floating.width+l}px`,m=i?u:`${f}px`),{data:{x:p,y:m}}}});function vT(e){const[t,r="center"]=e.split("-");return[t,r]}var gT=iT,bT=lT,wT=dT,OT=mT,xT="Popover",[ET,kT]=vg(xT,[rT]),jT=rT(),[PT,NT]=ET(xT),ST=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=jT(r),c=e.useRef(null),[u,d]=e.useState(!1),[f=!1,p]=Cg({prop:o,defaultProp:i,onChange:a});return g(gT,{...s,children:g(PT,{scope:r,contentId:Ng(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:l,children:n})})};ST.displayName=xT;var CT="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...o}=t,i=NT(CT,n),a=jT(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect((()=>(l(),()=>s())),[l,s]),g(bT,{...a,...o,ref:r})})).displayName=CT;var zT="PopoverTrigger",TT=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=NT(zT,r),i=jT(r),a=hg(t,o.triggerRef),l=g(Eg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":HT(o.open),...n,ref:a,onClick:pg(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:g(bT,{asChild:!0,...i,children:l})}));TT.displayName=zT;var LT="PopoverPortal",[MT,IT]=ET(LT,{forceMount:void 0}),DT=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=NT(LT,t);return g(MT,{scope:t,forceMount:r,children:g(Qg,{present:r||i.open,children:g(ON,{asChild:!0,container:o,children:n})})})};DT.displayName=LT;var RT="PopoverContent",AT=e.forwardRef(((e,t)=>{const r=IT(RT,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=NT(RT,e.__scopePopover);return g(Qg,{present:n||i.open,children:i.modal?g(WT,{...o,ref:t}):g(BT,{...o,ref:t})})}));AT.displayName=RT;var WT=e.forwardRef(((t,r)=>{const n=NT(RT,t.__scopePopover),o=e.useRef(null),i=hg(r,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return gS(e)}),[]),g(dS,{as:bg,allowPinchZoom:!0,children:g(_T,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pg(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:pg(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:pg(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),BT=e.forwardRef(((t,r)=>{const n=NT(RT,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return g(_T,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),_T=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...d}=e,f=NT(RT,r),p=jT(r);return EN(),g(mN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g(sN,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:g(wT,{"data-state":HT(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),FT="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=NT(FT,r);return g(Eg.button,{type:"button",...n,ref:t,onClick:pg(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=FT;function HT(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=jT(r);return g(OT,{...o,...n,ref:t})})).displayName="PopoverArrow";var $T=ST,VT=TT,qT=DT,YT=AT;const UT=r((({type:e="single",value:r,onChange:n,placeholder:o="Select date",disabled:l=!1,minDate:s,maxDate:u,className:d,label:f,error:p,required:m=!1,clearable:y=!0,format:h="PPP",variant:v="tertiary",dataTestId:g},b)=>{const[w,O]=i(!1),[x,E]=i("range"!==e||!r||r instanceof Date?void 0:r);a((()=>{"range"!==e||!r||r instanceof Date||E(r)}),[r,e]);const k=c((t=>{if(t.preventDefault(),t.stopPropagation(),"single"===e)n?.(void 0);else{const e={from:void 0,to:void 0};n?.(e),E(e)}O(!1)}),[n,e]),j=c((()=>{if(!r)return"";if("single"===e&&r instanceof Date)return Zk(r,h);if("range"===e&&!(r instanceof Date)){const e=r;if(e.from){if(e.to){const t=Zk(e.from,"MMM d"),r=Zk(e.to,"MMM d"),n=Zk(e.from,"yyyy"),o=Zk(e.to,"yyyy");return n===o?`${t} - ${r}, ${n}`:`${t}, ${n} - ${r}, ${o}`}return Zk(e.from,h)}}return""}),[r,e,h]),P=c((e=>{if(!e)return E(void 0),void n?.(void 0);if(e instanceof Date)return n?.(e),void O(!1);const t={from:e.from,to:e.to};!e.from||e.from&&e.to?(E(t),n?.(t),e.from&&e.to&&O(!1)):E(t)}),[n]),N=c((()=>{const o={initialFocus:!0,disabled:e=>!!l||(!!(s&&e<s)||!!(u&&e>u)),classNames:{months:De("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0","sm:divide-x sm:divide-border"),month:De("space-y-4","first:pr-2 last:pl-2"),caption:"flex justify-center pt-1 relative items-center h-10",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:De("h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","border border-border rounded-md hover:bg-accent","flex items-center justify-center transition-colors"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:De("text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]","flex items-center justify-center"),row:"flex w-full mt-2",cell:De("relative p-0 text-center text-sm focus-within:relative focus-within:z-20","h-9 w-9 p-0","group","[&:has([aria-selected].day-range-start)]:rounded-l-md [&:has([aria-selected].day-range-start)]:bg-primary","[&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-range-end)]:bg-primary","[&:has([aria-selected])]:bg-primary/30","[&:has([aria-selected].day-range-middle)]:bg-primary/10"),day:De("h-9 w-9 p-0 font-normal","aria-selected:opacity-100","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:rounded-md","data-[today]:bg-accent/30 data-[today]:text-accent-foreground","rounded-md transition-colors","flex items-center justify-center","day-range-middle:bg-primary/10","day-range-start:bg-primary day-range-start:text-primary-foreground","day-range-end:bg-primary day-range-end:text-primary-foreground"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_range_middle:"day-range-middle",day_selected:De("bg-primary text-primary-foreground","hover:bg-primary/90","focus:bg-primary focus:text-primary-foreground"),day_today:"bg-accent/30 text-accent-foreground",day_outside:"text-muted-foreground opacity-50",day_disabled:"text-muted-foreground opacity-50",day_hidden:"invisible"}},i=e=>t.createElement("div",{className:"relative"},e,y&&r&&t.createElement("button",{type:"button",onClick:k,className:De("absolute top-2 right-2","p-1.5 rounded-md","bg-white/90 backdrop-blur-sm","hover:bg-accent/80 hover:text-destructive","focus:outline-none focus:ring-2 focus:ring-primary","transition-all duration-200","shadow-sm","z-50"),"aria-label":"Clear date selection"},t.createElement(tt,{className:"h-4 w-4"})));return i("single"===e?t.createElement(DP,{mode:"single",selected:r instanceof Date?r:void 0,onSelect:e=>{n?.(e),e&&O(!1)},...o}):t.createElement(DP,{mode:"range",selected:x,onSelect:P,numberOfMonths:2,...o}))}),[e,r,n,x,P,l,s,u,y,k]);return t.createElement("div",{ref:b,className:"relative w-full","data-testid":g},f&&t.createElement("div",{className:De("mb-2 text-sm font-medium",p&&"text-destructive")},f,m&&t.createElement("span",{className:"text-destructive ml-1"},"*")),t.createElement($T,{open:w,onOpenChange:O},t.createElement("div",{className:"relative"},t.createElement(VT,{asChild:!0},t.createElement(nt,{variant:v,className:De("w-full","inline-flex items-center","py-2 px-3","border border-input","hover:bg-accent/50","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",!r&&"text-muted-foreground",p&&"border-destructive focus:ring-destructive","transition-all duration-200","sm:text-sm md:text-base",d),disabled:l},t.createElement("div",{className:"inline-flex items-center gap-2 w-full pr-8"},t.createElement(He,{className:"h-4 w-4 flex-shrink-0"}),t.createElement("span",{className:"truncate flex-1 text-left","data-testid":"date-display"},j()||o)))),y&&r&&!w&&t.createElement("button",{type:"button",onClick:k,className:De("absolute right-2 top-1/2 -translate-y-1/2","p-1 rounded-md","hover:bg-accent/80","focus:outline-none focus:ring-2 focus:ring-primary","transition-all duration-200","z-10"),"aria-label":"Clear date","data-testid":"clear-button"},t.createElement(tt,{className:"h-4 w-4 hover:text-destructive transition-colors"}))),t.createElement(qT,null,t.createElement(YT,{className:De("z-50 rounded-lg border bg-popover p-3","shadow-lg ring-1 ring-black ring-opacity-5","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","w-auto min-w-[280px]","range"===e?"sm:min-w-[600px]":"sm:min-w-[320px]","max-w-[95vw]"),align:"start",sideOffset:4},t.createElement("div",{className:"w-full overflow-hidden"},t.createElement("div",{className:De("w-full","range"===e&&"overflow-x-auto")},N()))))),p&&t.createElement("p",{className:"mt-2 text-sm text-destructive"},p))}));UT.displayName="DatePicker";const GT=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),XT=()=>{const e=t.useContext(GT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function ZT(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function KT(){return JT(/^iPad/)||JT(/^Mac/)&&navigator.maxTouchPoints>1}function QT(){return JT(/^iPhone/)||KT()}function JT(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const eL="undefined"!=typeof window?f:a;function tL(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}const rL="undefined"!=typeof document&&window.visualViewport;function nL(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function oL(e){for(nL(e)&&(e=e.parentElement);e&&!nL(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const iL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let aL,lL=0;function sL(e={}){let{isDisabled:t}=e;eL((()=>{if(!t)return lL++,1===lL&&QT()&&(aL=function(){let e,t=0,r=r=>{e=oL(r.target),e===document.documentElement&&e===document.body||(t=r.changedTouches[0].pageY)},n=r=>{if(!e||e===document.documentElement||e===document.body)return void r.preventDefault();let n=r.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&n>t||o>=i&&n<t)&&r.preventDefault(),t=n)},o=e=>{let t=e.target;dL(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))},i=e=>{let t=e.target;dL(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",rL&&(rL.height<window.innerHeight?requestAnimationFrame((()=>{uL(t)})):rL.addEventListener("resize",(()=>uL(t)),{once:!0}))})))},a=()=>{window.scrollTo(0,0)},l=window.pageXOffset,s=window.pageYOffset,c=tL(function(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=tL(cL(document,"touchstart",r,{passive:!1,capture:!0}),cL(document,"touchmove",n,{passive:!1,capture:!0}),cL(document,"touchend",o,{passive:!1,capture:!0}),cL(document,"focus",i,!0),cL(window,"scroll",a));return()=>{c(),u(),window.scrollTo(l,s)}}()),()=>{lL--,0===lL&&(null==aL||aL())}}),[t])}function cL(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function uL(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=oL(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=n-r)}e=t.parentElement}}function dL(e){return e instanceof HTMLInputElement&&!iL.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function fL(...t){return e.useCallback(function(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}(...t),t)}const pL=new WeakMap;function mL(e,t,r=!1){if(!(e&&e instanceof HTMLElement))return;let n={};Object.entries(t).forEach((([t,r])=>{t.startsWith("--")?e.style.setProperty(t,r):(n[t]=e.style[t],e.style[t]=r)})),r||pL.set(e,n)}const yL=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function hL(e,t){if(!e)return null;const r=window.getComputedStyle(e),n=r.transform||r.webkitTransform||r.mozTransform;let o=n.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[yL(t)?13:12]):(o=n.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[yL(t)?5:4]):null)}function vL(e,t){if(!e)return()=>{};const r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}const gL={DURATION:.5,EASE:[.32,.72,0,1]},bL="vaul-dragging";function wL(e){const r=t.useRef(e);return t.useEffect((()=>{r.current=e})),t.useMemo((()=>(...e)=>null==r.current?void 0:r.current.call(r,...e)),[])}function OL({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:e,onChange:r}){const n=t.useState(e),[o]=n,i=t.useRef(o),a=wL(r);return t.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==e,l=a?e:o,s=wL(n),c=t.useCallback((t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)}),[a,e,i,s]);return[l,c]}let xL=null;const EL=t.forwardRef((function({...e},r){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:a,isOpen:l,modal:s,shouldAnimate:c}=XT(),u=fL(r,n),d=o&&o.length>0;if(!s)return null;const f=t.useCallback((e=>i(e)),[i]);return t.createElement(eC,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":l&&d?"true":"false","data-vaul-snap-points-overlay":l&&a?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})}));EL.displayName="Drawer.Overlay";const kL=t.forwardRef((function({onPointerDownOutside:e,style:r,onOpenAutoFocus:n,...o},i){const{drawerRef:a,onPress:s,onRelease:c,onDrag:u,keyboardIsOpen:d,snapPointsOffset:f,activeSnapPointIndex:p,modal:m,isOpen:y,direction:h,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:O}=XT(),[x,E]=t.useState(!1),k=fL(i,a),j=t.useRef(null),P=t.useRef(null),N=t.useRef(!1),S=v&&v.length>0;!function(){const{direction:e,isOpen:r,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=XT(),a=t.useRef(null),s=l((()=>document.body.style.backgroundColor),[]);function c(){return(window.innerWidth-26)/window.innerWidth}t.useEffect((()=>{if(r&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!i&&vL(document.body,{background:"black"}),vL(t,{transformOrigin:yL(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${gL.DURATION}s`,transitionTimingFunction:`cubic-bezier(${gL.EASE.join(",")})`});const r=vL(t,{borderRadius:"8px",overflow:"hidden",...yL(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{r(),a.current=window.setTimeout((()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")}),1e3*gL.DURATION)}}}),[r,n,s])}();function C(e){j.current=null,N.current=!1,c(e)}return t.useEffect((()=>{S&&window.requestAnimationFrame((()=>{E(!0)}))}),[]),t.createElement(tC,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":x?"true":"false","data-vaul-snap-points":y&&S?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...o,ref:k,style:f&&f.length>0?{"--snap-point-height":`${f[null!=p?p:0]}px`,...r}:r,onPointerDown:e=>{b||(null==o.onPointerDown||o.onPointerDown.call(o,e),j.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==n||n(e),O||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?d.current&&(d.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(P.current=e,b)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!j.current)return;const t=e.pageY-j.current.y,r=e.pageX-j.current.x,n="touch"===e.pointerType?10:2,i=((e,t,r=0)=>{if(N.current)return!0;const n=Math.abs(e.y),o=Math.abs(e.x),i=o>n,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=r)return i}else if(!(e.y*a<0)&&n>=0&&n<=r)return!i;return N.current=!0,!0})({x:r,y:t},h,n);i?u(e):(Math.abs(r)>n||Math.abs(t)>n)&&(j.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),j.current=null,N.current=!1,c(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),C(P.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),P.current&&C(P.current)}})}));kL.displayName="Drawer.Content";t.forwardRef((function({preventCycle:e=!1,children:r,...n},o){const{closeDrawer:i,isDragging:a,snapPoints:l,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:m}=XT(),y=t.useRef(null),h=t.useRef(!1);function v(){y.current&&window.clearTimeout(y.current),h.current=!1}return t.createElement("div",{onClick:function(){h.current?v():window.setTimeout((()=>{!function(){if(a||e||h.current)return void v();if(v(),!l||0===l.length)return void(u||i());if(s===l[l.length-1]&&u)return void i();const t=l.findIndex((e=>e===s));if(-1===t)return;const r=l[t+1];c(r)}()}),120)},onPointerCancel:v,onPointerDown:e=>{d&&p(e),y.current=window.setTimeout((()=>{h.current=!0}),250)},onPointerMove:e=>{d&&m(e)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},r))})).displayName="Drawer.Handle";const jL={Root:function({open:e,onOpenChange:r,children:n,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:l=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:y,fixed:h,modal:v=!0,onClose:g,nested:b,noBodyStyles:w=!1,direction:O="bottom",defaultOpen:x=!1,disablePreventScroll:E=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:j=!1,repositionInputs:P=!0,onAnimationEnd:N,container:S,autoFocus:C=!1}){var z,T;const[L=!1,M]=OL({defaultProp:x,prop:e,onChange:e=>{null==r||r(e),e||b||ue(),setTimeout((()=>{null==N||N(e)}),1e3*gL.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[I,D]=t.useState(!1),[R,A]=t.useState(!1),[W,B]=t.useState(!1),_=t.useRef(null),F=t.useRef(null),H=t.useRef(null),$=t.useRef(null),V=t.useRef(null),q=t.useRef(!1),Y=t.useRef(null),U=t.useRef(0),G=t.useRef(!1),X=t.useRef(!x),Z=t.useRef(0),K=t.useRef(null),Q=t.useRef((null==(z=K.current)?void 0:z.getBoundingClientRect().height)||0),J=t.useRef((null==(T=K.current)?void 0:T.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback((e=>{a&&e===ae.length-1&&(F.current=new Date)}),[]),{activeSnapPoint:re,activeSnapPointIndex:ne,setActiveSnapPoint:oe,onRelease:ie,snapPointsOffset:ae,onDrag:le,shouldFade:se,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:r,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:l,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=OL({prop:e,defaultProp:null==n?void 0:n[0],onChange:r}),[p,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect((()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const y=t.useMemo((()=>d===(null==n?void 0:n[n.length-1])||null),[n,d]),h=t.useMemo((()=>{var e;return null!=(e=null==n?void 0:n.findIndex((e=>e===d)))?e:null}),[n,d]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===d||!n,g=t.useMemo((()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const r="string"==typeof t;let n=0;if(r&&(n=parseInt(t,10)),yL(s)){const o=r?n:p?t*e.height:0;return p?"bottom"===s?e.height-o:-e.height+o:o}const o=r?n:p?t*e.width:0;return p?"right"===s?e.width-o:-e.width+o:o})))?t:[]}),[n,p,c]),b=t.useMemo((()=>null!==h?null==g?void 0:g[h]:null),[g,h]),w=t.useCallback((e=>{var t;const r=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;l(r),mL(o.current,{transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,transform:yL(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&r!==g.length-1&&void 0!==a&&r!==a&&r<a?mL(i.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,opacity:"0"}):mL(i.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(r,0)])}),[o.current,n,g,a,i,f]);return t.useEffect((()=>{if(d||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===d)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&w(g[r])}}),[d,e,n,g,w]),{isLastSnapPoint:y,activeSnapPoint:d,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!g||void 0===a)return null;const r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?h+1:h-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:f,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===a)return;const l="bottom"===s||"right"===s?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===h,d=e>0;if(h===a-1&&mL(i.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`}),!u&&r>2&&!d)return void(o?t():w(g[0]));if(!u&&r>2&&d&&g&&n)return void w(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-l)<Math.abs(e-l)?t:e)),p=yL(s)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&y&&n)return void w(g[n.length-1]);if(c&&e<0&&o&&t(),null===h)return;w(g[h+e])}else w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===s||"right"===s?b-e:b+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||mL(o.current,{transform:yL(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:y,drawerRef:K,fadeFromIndex:p,overlayRef:_,onSnapPointChange:te,direction:O,container:S,snapToSequentialPoint:k});sL({isDisabled:!L||R||!v||W||!I||!P||!E});const{restorePositionSetting:ue}=function({isOpen:e,modal:r,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:a}){const[l,s]=t.useState((()=>"undefined"!=typeof window?window.location.href:"")),c=t.useRef(0),u=t.useCallback((()=>{if(ZT()&&null===xL&&e&&!a){xL={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}))),300)}}),[e]),d=t.useCallback((()=>{if(ZT()&&null!==xL&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,xL),window.requestAnimationFrame((()=>{i&&l!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),xL=null}}),[l]);return t.useEffect((()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),t.useEffect((()=>{if(r)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||d())}}),[r,d]),t.useEffect((()=>{!n&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),r||window.setTimeout((()=>{d()}),500)):d())}),[e,o,l,r,n,u,d]),{restorePositionSetting:d}}({isOpen:L,modal:v,nested:null!=b&&b,hasBeenOpened:I,preventScrollRestoration:j,noBodyStyles:w});function de(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var r;let n=e;const o=null==(r=window.getSelection())?void 0:r.toString(),i=K.current?hL(K.current,O):null,a=new Date;if("SELECT"===n.tagName)return!1;if(n.hasAttribute("data-vaul-no-drag")||n.closest("[data-vaul-no-drag]"))return!1;if("right"===O||"left"===O)return!0;if(F.current&&a.getTime()-F.current.getTime()<500)return!1;if(null!==i&&("bottom"===O?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(V.current&&a.getTime()-V.current.getTime()<u&&0===i)return V.current=a,!1;if(t)return V.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(0!==n.scrollTop)return V.current=new Date,!1;if("dialog"===n.getAttribute("role"))return!0}n=n.parentNode}return!0}function pe(e){!function(){if(!R||!K.current)return;K.current.classList.remove(bL),q.current=!1,A(!1),$.current=new Date}(),null==g||g(),e||M(!1),setTimeout((()=>{a&&oe(a[0])}),1e3*gL.DURATION)}function me(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=hL(K.current,O);mL(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`}),mL(_.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,opacity:"1"}),l&&t&&t>0&&L&&mL(e,{borderRadius:"8px",overflow:"hidden",...yL(O)?{transform:`scale(${de()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${de()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${gL.DURATION}s`,transitionTimingFunction:`cubic-bezier(${gL.EASE.join(",")})`},!0)}return t.useEffect((()=>{window.requestAnimationFrame((()=>{X.current=!0}))}),[]),t.useEffect((()=>{var e;function t(){if(!K.current||!P)return;if(dL(document.activeElement)||G.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,r=window.innerHeight;let n=r-t;const o=K.current.getBoundingClientRect().height||0,i=o>.8*r;ee.current||(ee.current=o);const l=K.current.getBoundingClientRect().top;if(Math.abs(Z.current-n)>60&&(G.current=!G.current),a&&a.length>0&&ae&&ne){n+=ae[ne]||0}if(Z.current=n,o>t||G.current){const e=K.current.getBoundingClientRect().height;let r=e;e>t&&(r=t-(i?l:26)),K.current.style.height=h?e-Math.max(n,0)+"px":`${Math.max(r,t-l)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(K.current.style.height=`${ee.current}px`);a&&a.length>0&&!G.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(n,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[ne,a,ae]),t.useEffect((()=>(L&&(mL(document.documentElement,{scrollBehavior:"auto"}),F.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let r=pL.get(e);r&&(e.style[t]=r[t])}(document.documentElement,"scrollBehavior")})),[L]),t.useEffect((()=>{v||window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"}))}),[v]),t.createElement(KS,{defaultOpen:x,onOpenChange:e=>{(d||e)&&(e?D(!0):pe(!0),M(e))},open:L},t.createElement(GT.Provider,{value:{activeSnapPoint:re,snapPoints:a,setActiveSnapPoint:oe,drawerRef:K,overlayRef:_,onOpenChange:r,onPress:function(e){var t,r;(d||a)&&(K.current&&!K.current.contains(e.target)||(Q.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(r=K.current)?void 0:r.getBoundingClientRect().width)||0,A(!0),H.current=new Date,QT()&&window.addEventListener("touchend",(()=>q.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),U.current=yL(O)?e.pageY:e.pageX))},onRelease:function(e){if(!R||!K.current)return;K.current.classList.remove(bL),q.current=!1,A(!1),$.current=new Date;const t=hL(K.current,O);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===H.current)return;const r=$.current.getTime()-H.current.getTime(),n=U.current-(yL(O)?e.pageY:e.pageX),o=Math.abs(n)/r;if(o>.05&&(B(!0),setTimeout((()=>{B(!1)}),200)),a){return ie({draggedDistance:n*("bottom"===O||"right"===O?1:-1),closeDrawer:pe,velocity:o,dismissible:d}),void(null==i||i(e,!0))}if("bottom"===O||"right"===O?n>0:n<0)return me(),void(null==i||i(e,!0));if(o>.4)return pe(),void(null==i||i(e,!1));var l;const s=Math.min(null!=(l=K.current.getBoundingClientRect().height)?l:0,window.innerHeight);var u;const f=Math.min(null!=(u=K.current.getBoundingClientRect().width)?u:0,window.innerWidth),p="left"===O||"right"===O;if(Math.abs(t)>=(p?f:s)*c)return pe(),void(null==i||i(e,!1));null==i||i(e,!0),me()},onDrag:function(e){var t;if(K.current&&R){const r="bottom"===O||"right"===O?1:-1,n=(U.current-(yL(O)?e.pageY:e.pageX))*r,i=n>0,s=a&&!d&&!i;if(s&&0===ne)return;const c=Math.abs(n),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===O||"top"===O?Q.current:J.current);const m=ce(c,i);if(null!==m&&(f=m),s&&f>=1)return;if(!q.current&&!fe(e.target,i))return;if(K.current.classList.add(bL),q.current=!0,mL(K.current,{transition:"none"}),mL(_.current,{transition:"none"}),a&&le({draggedDistance:n}),i&&!a){const e=(t=n,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*r;return void mL(K.current,{transform:yL(O)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const y=1-f;if((se||p&&ne===p-1)&&(null==o||o(e,f),mL(_.current,{opacity:`${y}`,transition:"none"},!0)),u&&_.current&&l){const e=Math.min(de()+f*(1-de()),1),t=8-8*f,r=Math.max(0,14-14*f);mL(u,{borderRadius:`${t}px`,transform:yL(O)?`scale(${e}) translate3d(0, ${r}px, 0)`:`scale(${e}) translate3d(${r}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=c*r;mL(K.current,{transform:yL(O)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:d,shouldAnimate:X,handleOnly:f,isOpen:L,isDragging:R,shouldFade:se,closeDrawer:pe,onNestedDrag:function(e,t){if(t<0)return;const r=(window.innerWidth-16)/window.innerWidth,n=r+t*(1-r),o=16*t-16;mL(K.current,{transform:yL(O)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,r=e?-16:0;Y.current&&window.clearTimeout(Y.current),mL(K.current,{transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,transform:yL(O)?`scale(${t}) translate3d(0, ${r}px, 0)`:`scale(${t}) translate3d(${r}px, 0, 0)`}),!e&&K.current&&(Y.current=setTimeout((()=>{const e=hL(K.current,O);mL(K.current,{transition:"none",transform:yL(O)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const r=yL(O)?window.innerHeight:window.innerWidth,n=t?(r-16)/r:1,o=t?-16:0;t&&mL(K.current,{transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,transform:yL(O)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:G,modal:v,snapPointsOffset:ae,activeSnapPointIndex:ne,direction:O,shouldScaleBackground:l,setBackgroundColorOnScale:s,noBodyStyles:w,container:S,autoFocus:C}},n))},Content:kL,Overlay:EL,Portal:function(e){const r=XT(),{container:n=r.container,...o}=e;return t.createElement(JS,{container:n,...o})},Title:rC,Description:nC},PL=({shouldScaleBackground:t=!0,...r})=>e.createElement(jL.Root,{shouldScaleBackground:t,...r});PL.displayName="Drawer";const NL=jL.Portal,SL=e.forwardRef((({className:t,...r},n)=>e.createElement(jL.Overlay,{ref:n,className:De("fixed inset-0 z-50 bg-black/80",t),...r})));SL.displayName=jL.Overlay.displayName;const CL=e.forwardRef((({className:t,children:r,...n},o)=>e.createElement(NL,null,e.createElement(SL,null),e.createElement(jL.Content,{ref:o,className:De("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n},e.createElement("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),r))));CL.displayName="DrawerContent";const zL=({className:t,...r})=>e.createElement("div",{className:De("grid gap-1.5 p-4 text-center sm:text-left",t),...r});zL.displayName="DrawerHeader";const TL=e.forwardRef((({className:t,...r},n)=>e.createElement(jL.Title,{ref:n,className:De("text-lg font-semibold leading-none tracking-tight",t),...r})));TL.displayName=jL.Title.displayName;const LL=e.forwardRef((({className:t,...r},n)=>e.createElement(jL.Description,{ref:n,className:De("text-sm text-muted-foreground",t),...r})));LL.displayName=jL.Description.displayName;const ML={small:"h-64",medium:"h-80",large:"h-96",extraLarge:"h-[448px]",full:"h-screen"},IL=({children:e,isOpen:r,onClose:n,size:o="medium",title:i,description:a,showCloseButton:l=!0})=>{const s=ML[o];return t.createElement(PL,{open:r,onOpenChange:n},t.createElement(CL,{className:`fixed inset-x-0 bottom-0 ${s} bg-background`},t.createElement(zL,{className:"relative"},i?t.createElement(TL,null,i):t.createElement(TL,{className:"sr-only"},"Drawer Content"),a?t.createElement(LL,null,a):t.createElement(LL,{className:"sr-only"},i||"Drawer Content"," panel"),l&&t.createElement("button",{onClick:n,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100","aria-label":"Close drawer"},t.createElement(tt,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close"))),t.createElement("div",{className:"mt-6 px-4"},e)))},DL="right",RL={top:{in:"slide-in-from-top",out:"slide-out-to-top"},right:{in:"slide-in-from-right",out:"slide-out-to-right"},bottom:{in:"slide-in-from-bottom",out:"slide-out-to-bottom"},left:{in:"slide-in-from-left",out:"slide-out-to-left"}},AL=({children:e,side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:c,className:u,fullWidth:d,fullHeight:f,...p})=>{const m=s({side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:c,className:u,fullWidth:d,fullHeight:f});return a((()=>{m.current={side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:c,className:u,fullWidth:d,fullHeight:f}}),[r,n,o,i,l,c,u,d,f]),t.createElement(KS,{...p},e)};AL.displayName="Sheet";const WL=t.forwardRef((({children:e,...r},n)=>t.createElement(QS,{...r,ref:n},e)));WL.displayName="SheetTrigger";const BL=oC;BL.displayName="SheetClose";const _L=JS;_L.displayName="SheetPortal";const FL=t.forwardRef((({className:e,...r},n)=>t.createElement(eC,{className:De("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:n})));FL.displayName=eC.displayName;const HL=t.forwardRef((({side:e=DL,className:r,children:n,overlay:o=!0,fullWidth:i=!1,fullHeight:a=!0,...l},s)=>{const c=RL[e]?e:DL;return t.createElement(_L,null,o&&t.createElement(FL,null),t.createElement(tC,{ref:s,className:De("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a?"h-full":"h-auto",i?"w-full":"w-3/4","left"===c&&"inset-y-0 left-0 border-r","right"===c&&"inset-y-0 right-0 border-l","top"===c&&"inset-x-0 top-0 border-b","bottom"===c&&"inset-x-0 bottom-0 border-t",`data-[state=closed]:${RL[c].out}`,`data-[state=open]:${RL[c].in}`,r),...l},n,t.createElement(oC,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},t.createElement(tt,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close"))))}));HL.displayName=tC.displayName;const $L=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:De("flex flex-col space-y-2 text-center sm:text-left",e),...n},r)));$L.displayName="SheetHeader";const VL=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:De("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n},r)));VL.displayName="SheetFooter";const qL=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement(rC,{ref:o,className:De("text-lg font-semibold text-foreground",e),...n},r)));qL.displayName=rC.displayName;const YL=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement(nC,{ref:o,className:De("text-sm text-muted-foreground",e),...n},r)));YL.displayName=nC.displayName;t.forwardRef((({side:e=DL,overlay:r=!0,showFooter:n=!1,title:o,description:i,buttonText:a="Close",children:l,className:s,contentProps:c,fullWidth:u,fullHeight:d,...f},p)=>{const m=RL[e]?e:DL;return t.createElement(AL,{...f},t.createElement(HL,{side:m,overlay:r,className:s,fullWidth:u,fullHeight:d,...c},t.createElement("div",{ref:p},(o||i)&&t.createElement($L,null,o&&t.createElement(qL,null,o),i&&t.createElement(YL,null,i)),t.createElement("div",{className:"py-4"},l),n&&t.createElement(VL,null,t.createElement(BL,{className:"px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90"},a)))))})).displayName="SheetDrawer";const UL=$T;function GL(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function XL(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every((r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:GL(n)&&GL(o)?XL(n,o):n===o}))}function ZL(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}function KL(e){return"number"==typeof e}function QL(e){return"string"==typeof e}function JL(e){return"boolean"==typeof e}function eM(e){return"[object Object]"===Object.prototype.toString.call(e)}function tM(e){return Math.abs(e)}function rM(e){return Math.sign(e)}function nM(e,t){return tM(e-t)}function oM(e){return cM(e).map(Number)}function iM(e){return e[aM(e)]}function aM(e){return Math.max(0,e.length-1)}function lM(e,t){return t===aM(e)}function sM(e,t=0){return Array.from(Array(e),((e,r)=>t+r))}function cM(e){return Object.keys(e)}function uM(e,t){return[e,t].reduce(((e,t)=>(cM(t).forEach((r=>{const n=e[r],o=t[r],i=eM(n)&&eM(o);e[r]=i?uM(n,o):o})),e)),{})}function dM(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function fM(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter((e=>e()))}};return t}function pM(e,t,r,n){const o=fM(),i=1e3/60;let a=null,l=0,s=0;function c(e){if(!s)return;a||(a=e,r(),r());const o=e-a;for(a=e,l+=o;l>=i;)r(),l-=i;n(l/i),s&&(s=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(s),a=null,l=0,s=0}return{init:function(){o.add(e,"visibilitychange",(()=>{e.hidden&&(a=null,l=0)}))},destroy:function(){u(),o.clear()},start:function(){s||(s=t.requestAnimationFrame(c))},stop:u,update:r,render:n}}function mM(e=0,t=0){const r=tM(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function yM(e,t,r){const{constrain:n}=mM(0,e),o=e+1;let i=a(t);function a(e){return r?tM((o+e)%o):n(e)}function l(){return i}function s(){return yM(e,l(),r)}const c={get:l,set:function(e){return i=a(e),c},add:function(e){return s().set(l()+e)},clone:s};return c}function hM(e,t,r,n,o,i,a,l,s,c,u,d,f,p,m,y,h,v,g){const{cross:b,direction:w}=e,O=["INPUT","SELECT","TEXTAREA"],x={passive:!1},E=fM(),k=fM(),j=mM(50,225).constrain(p.measure(20)),P={mouse:300,touch:400},N={mouse:500,touch:600},S=m?43:25;let C=!1,z=0,T=0,L=!1,M=!1,I=!1,D=!1;function R(e){if(!dM(e,n)&&e.touches.length>=2)return A(e);const t=i.readPoint(e),r=i.readPoint(e,b),a=nM(t,z),s=nM(r,T);if(!M&&!D){if(!e.cancelable)return A(e);if(M=a>s,!M)return A(e)}const u=i.pointerMove(e);a>y&&(I=!0),c.useFriction(.3).useDuration(.75),l.start(),o.add(w(u)),e.preventDefault()}function A(e){const t=u.byDistance(0,!1).index!==d.get(),r=i.pointerUp(e)*(m?N:P)[D?"mouse":"touch"],n=function(e,t){const r=d.add(-1*rM(e)),n=u.byDistance(e,!m).distance;return m||tM(e)<j?n:h&&t?.5*n:u.byIndex(r.get(),0).distance}(w(r),t),o=function(e,t){if(0===e||0===t)return 0;if(tM(e)<=tM(t))return 0;const r=nM(tM(e),tM(t));return tM(r/e)}(r,n),a=S-10*o,l=v+o/50;M=!1,L=!1,k.clear(),c.useDuration(a).useFriction(l),s.distance(n,!m),D=!1,f.emit("pointerUp")}function W(e){I&&(e.stopPropagation(),e.preventDefault(),I=!1)}return{init:function(e){if(!g)return;function l(l){(JL(g)||g(e,l))&&function(e){const l=dM(e,n);if(D=l,I=m&&l&&!e.buttons&&C,C=nM(o.get(),a.get())>=2,l&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return O.includes(t)}(e.target))return;L=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=D?r:t;k.add(e,"touchmove",R,x).add(e,"touchend",A).add(e,"mousemove",R,x).add(e,"mouseup",A)}(),z=i.readPoint(e),T=i.readPoint(e,b),f.emit("pointerDown")}(l)}const s=t;E.add(s,"dragstart",(e=>e.preventDefault()),x).add(s,"touchmove",(()=>{}),x).add(s,"touchend",(()=>{})).add(s,"touchstart",l).add(s,"mousedown",l).add(s,"touchcancel",A).add(s,"contextmenu",A).add(s,"click",W,!0)},destroy:function(){E.clear(),k.clear()},pointerDown:function(){return L}}}function vM(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(dM(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),l=o(e)-o(n)>170,s=t/a;return a&&!l&&tM(s)>.1?s:0},readPoint:i}}function gM(e,t,r,n,o,i,a){const l=[e].concat(n);let s,c,u=[],d=!1;function f(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=f(e),u=n.map(f),s=new ResizeObserver((r=>{(JL(i)||i(o,r))&&function(r){for(const i of r){if(d)return;const r=i.target===e,a=n.indexOf(i.target),l=r?c:u[a];if(tM(f(r?e:n[a])-l)>=.5){o.reInit(),t.emit("resize");break}}}(r)})),r.requestAnimationFrame((()=>{l.forEach((e=>s.observe(e)))})))},destroy:function(){d=!0,s&&s.disconnect()}}}function bM(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),l=mM(.1,.99);let s=!1;function c(){return!s&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const s=e.reachedMin(t.get())?"min":"max",u=tM(e[s]-t.get()),d=r.get()-t.get(),f=l.constrain(u/a);r.subtract(d*f),!o&&tM(d)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){s=!e}}}function wM(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=mM(o,i);return{loop:function(t){if(!function(e){return 1===e?l(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach((e=>e.add(o)))}}}function OM(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:l}=n;function s(e){return e.concat().sort(((e,t)=>tM(e)-tM(t)))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return s(o);const i=o.filter((e=>rM(e)===n));return i.length?s(i):iM(o)-r}const u={byDistance:function(r,n){const s=o.get()+r,{index:u,distance:d}=function(r){const n=e?a(r):l(r),o=t.map(((e,t)=>({diff:c(e-n,0),index:t}))).sort(((e,t)=>tM(e.diff)-tM(t.diff))),{index:i}=o[0];return{index:i,distance:n}}(s),f=!e&&i(s);return!n||f?{index:u,distance:r}:{index:u,distance:r+c(t[u]-d,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return u}function xM(e,t,r,n,o,i,a,l){const s={passive:!0,capture:!0};let c=0;function u(e){"Tab"===e.code&&(c=(new Date).getTime())}const d={init:function(d){l&&(i.add(document,"keydown",u,!1),t.forEach(((t,u)=>{i.add(t,"focus",(t=>{(JL(l)||l(d,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex((e=>e.includes(t)));KL(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(u)}),s)})))}};return d}function EM(e){let t=e;function r(e){return KL(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function kM(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(l=e.direction(t),Math.round(100*l)/100);var l;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function jM(e,t,r,n,o,i,a,l,s){const c=oM(o),u=oM(o).reverse(),d=function(){const e=a[0];return m(p(u,e),r,!1)}().concat(function(){const e=t-a[0]-1;return m(p(c,e),-r,!0)}());function f(e,t){return e.reduce(((e,t)=>e-o[t]),t)}function p(e,t){return e.reduce(((e,r)=>f(e,t)>0?e.concat([r]):e),[])}function m(o,a,c){const u=function(e){return i.map(((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e})))}(a);return o.map((t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=u[t][i];return{index:t,loopPoint:a,slideLocation:EM(-1),translate:kM(e,s[t]),target:()=>l.get()>a?n:o}}))}const y={canLoop:function(){return d.every((({index:e})=>f(c.filter((t=>t!==e)),t)<=.1))},clear:function(){d.forEach((e=>e.translate.clear()))},loop:function(){d.forEach((e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))}))},loopPoints:d};return y}function PM(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver((e=>{o||(JL(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)})),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function NM(e,t,r,n){const o={};let i,a=null,l=null,s=!1;const c={init:function(){i=new IntersectionObserver((e=>{s||(e.forEach((e=>{const r=t.indexOf(e.target);o[r]=e})),a=null,l=null,r.emit("slidesInView"))}),{root:e.parentElement,threshold:n}),t.forEach((e=>i.observe(e)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(e=!0){if(e&&a)return a;if(!e&&l)return l;const t=function(e){return cM(o).reduce(((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t}),[])}(e);return e&&(a=t),e||(l=t),t}};return c}function SM(e,t,r,n,o,i,a,l,s){const{startEdge:c,endEdge:u,direction:d}=e,f=KL(r);const p={groupSlides:function(e){return f?function(e,t){return oM(e).filter((e=>e%t==0)).map((r=>e.slice(r,r+t)))}(e,r):function(e){return e.length?oM(e).reduce(((r,f,p)=>{const m=iM(r)||0,y=0===m,h=f===aM(e),v=o[c]-i[m][c],g=o[c]-i[f][u],b=!n&&y?d(a):0,w=tM(g-(!n&&h?d(l):0)-(v+b));return p&&w>t+s&&r.push(f),h&&r.push(e.length),r}),[]).map(((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)})):[]}(e)}};return p}function CM(e,t,r,n,o,i,a){const{align:l,axis:s,direction:c,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:y,slidesToScroll:h,skipSnaps:v,containScroll:g,watchResize:b,watchSlides:w,watchDrag:O,watchFocus:x}=i,E={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},k=E.measure(t),j=r.map(E.measure),P=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(s,c),N=P.measureSize(k),S=function(e){return{measure:function(t){return e*(t/100)}}}(N),C=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return QL(e)?r[e](n):e(t,n,o)}};return o}(l,N),z=!d&&!!g,T=d||!!g,{slideSizes:L,slideSizesWithGaps:M,startGap:I,endGap:D}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:l,endEdge:s}=e,c=r[0]&&o,u=function(){if(!c)return 0;const e=r[0];return tM(t[l]-e[l])}(),d=function(){if(!c)return 0;const e=i.getComputedStyle(iM(n));return parseFloat(e.getPropertyValue(`margin-${s}`))}(),f=r.map(a),p=r.map(((e,t,r)=>{const n=!t,o=lM(r,t);return n?f[t]+u:o?f[t]+d:r[t+1][l]-e[l]})).map(tM);return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}(P,k,j,r,T,o),R=SM(P,N,h,d,k,j,I,D,2),{snaps:A,snapsAligned:W}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:l}=o,s=l(n).map((e=>iM(e)[a]-e[0][i])).map(tM).map(t.measure),c=n.map((e=>r[i]-e[i])).map((e=>-tM(e))),u=l(c).map((e=>e[0])).map(((e,t)=>e+s[t]));return{snaps:c,snapsAligned:u}}(P,C,k,j,R),B=-iM(A)+iM(M),{snapsContained:_,scrollContainLimit:F}=function(e,t,r,n,o){const i=mM(-t+e,0),a=r.map(((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),l=!t,s=lM(r,t);return l?o:s||c(n,a)?n:c(o,a)?o:a})).map((e=>parseFloat(e.toFixed(3)))),l=function(){const e=a[0],t=iM(a);return mM(a.lastIndexOf(e),a.indexOf(t)+1)}(),s=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:s}=l;return a.slice(r,s)}();function c(e,t){return nM(e,t)<=1}return{snapsContained:s,scrollContainLimit:l}}(N,B,W,g,2),H=z?_:W,{limit:$}=function(e,t,r){const n=t[0];return{limit:mM(r?n-e:iM(t),n)}}(B,H,d),V=yM(aM(H),u,d),q=V.clone(),Y=oM(r),U=pM(n,o,(()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(le)),(e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:l,animation:s,eventHandler:c,scrollBounds:u,options:{loop:d}},f)=>{const p=e.settled(),m=!u.shouldConstrain(),y=d?p:p&&m,h=y&&!l.pointerDown();h&&s.stop();const v=r.get()*f+o.get()*(1-f);n.set(v),d&&(i.loop(e.direction()),a.loop()),t.to(n.get()),h&&c.emit("settle"),y||c.emit("scroll")})(le,e))),G=H[V.get()],X=EM(G),Z=EM(G),K=EM(G),Q=EM(G),J=function(e,t,r,n,o,i){let a=0,l=0,s=o,c=i,u=e.get(),d=0;function f(e){return s=e,m}function p(e){return c=e,m}const m={direction:function(){return l},duration:function(){return s},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return s?(r.set(e),a+=t/s,a*=c,u+=a,e.add(a),o=u-d):(a=0,r.set(n),e.set(n),o=t),l=rM(o),d=u,m},settled:function(){return tM(n.get()-t.get())<.001},useBaseFriction:function(){return p(i)},useBaseDuration:function(){return f(o)},useFriction:p,useDuration:f};return m}(X,K,Z,Q,f,.68),ee=OM(d,H,B,$,Q),te=function(e,t,r,n,o,i,a){function l(o){const l=o.distance,s=o.index!==t.get();i.add(l),l&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),s&&(r.set(t.get()),t.set(o.index),a.emit("select"))}return{distance:function(e,t){l(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);l(o.byIndex(n.get(),r))}}}(U,V,q,J,ee,Q,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}($),ne=fM(),oe=NM(t,r,a,y),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:l,max:s}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(l,s).map(((e,t,r)=>{const n=!t,o=lM(r,t);return n?sM(iM(r[0])+1):o?sM(aM(i)-iM(r)[0]+1,iM(r)[0]):e}))}();return{slideRegistry:c}}(z,g,H,F,R,Y),ae=xM(e,r,ie,te,J,ne,a,x),le={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:j,animation:U,axis:P,dragHandler:hM(P,e,n,o,Q,vM(P,o),X,U,te,J,ee,V,a,S,p,m,v,.68,O),eventStore:ne,percentOfView:S,index:V,indexPrevious:q,limit:$,location:X,offsetLocation:K,previousLocation:Z,options:i,resizeHandler:gM(t,a,o,r,P,b,E),scrollBody:J,scrollBounds:bM($,K,Q,J,S),scrollLooper:wM(B,$,K,[X,K,Z,Q]),scrollProgress:re,scrollSnapList:H.map(re.get),scrollSnaps:H,scrollTarget:ee,scrollTo:te,slideLooper:jM(P,N,B,L,M,A,H,K,r),slideFocus:ae,slidesHandler:PM(t,a,w),slidesInView:oe,slideIndexes:Y,slideRegistry:ie,slidesToScroll:R,target:Q,translate:kM(P,t)};return le}e.forwardRef((({className:t,align:r="center",sideOffset:n=4,side:o="bottom",...i},a)=>e.createElement(qT,null,e.createElement(YT,{ref:a,align:r,sideOffset:n,side:o,className:De("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[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",t),...i})))).displayName=YT.displayName;const zM={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function TM(e){function t(e,t){return uM(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=cM(n).filter((t=>e.matchMedia(t).matches)).map((e=>n[e])).reduce(((e,r)=>t(e,r)),{});return t(r,o)},optionsMediaQueries:function(t){return t.map((e=>cM(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}};return r}function LM(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=TM(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(r,e))),n.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}};return r}(i),l=fM(),s=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach((r=>r(e,t))),n},off:function(e,o){return t[e]=r(e).filter((e=>e!==o)),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=s,y=P;let h,v,g,b,w=!1,O=c(zM,LM.globalOptions),x=c(O),E=[];function k(t){const r=CM(e,g,b,n,o,t,s);if(t.loop&&!r.slideLooper.canLoop()){return k(Object.assign({},t,{loop:!1}))}return r}function j(t,r){w||(O=c(O,t),x=u(O),E=r||E,function(){const{container:t,slides:r}=x,n=QL(t)?e.querySelector(t):t;g=n||e.children[0];const o=QL(r)?g.querySelectorAll(r):r;b=[].slice.call(o||g.children)}(),h=k(x),d([O,...E.map((({options:e})=>e))]).forEach((e=>l.add(e,"change",P))),x.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(z),h.eventHandler.init(z),h.resizeHandler.init(z),h.slidesHandler.init(z),h.options.loop&&h.slideLooper.loop(),g.offsetParent&&b.length&&h.dragHandler.init(z),v=a.init(z,E)))}function P(e,t){const r=C();N(),j(c({startIndex:r},e),t),s.emit("reInit")}function N(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),a.destroy(),l.clear()}function S(e,t,r){x.active&&!w&&(h.scrollBody.useBaseFriction().useDuration(!0===t?0:x.duration),h.scrollTo.index(e,r||0))}function C(){return h.index.get()}const z={canScrollNext:function(){return h.index.add(1).get()!==C()},canScrollPrev:function(){return h.index.add(-1).get()!==C()},containerNode:function(){return g},internalEngine:function(){return h},destroy:function(){w||(w=!0,l.clear(),N(),s.emit("destroy"),s.clear())},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return h.indexPrevious.get()},reInit:y,rootNode:function(){return e},scrollNext:function(e){S(h.index.add(1).get(),e,-1)},scrollPrev:function(e){S(h.index.add(-1).get(),e,1)},scrollProgress:function(){return h.scrollProgress.get(h.offsetLocation.get())},scrollSnapList:function(){return h.scrollSnapList},scrollTo:S,selectedScrollSnap:C,slideNodes:function(){return b},slidesInView:function(){return h.slidesInView.get()},slidesNotInView:function(){return h.slidesInView.get(!1)}};return j(t,r),setTimeout((()=>s.emit("init")),0),z}function MM(e={},t=[]){const r=s(e),n=s(t),[o,l]=i(),[u,d]=i(),f=c((()=>{o&&o.reInit(r.current,n.current)}),[o]);return a((()=>{XL(r.current,e)||(r.current=e,f())}),[e,f]),a((()=>{(function(e,t){if(e.length!==t.length)return!1;const r=ZL(e),n=ZL(t);return r.every(((e,t)=>XL(e,n[t])))})(n.current,t)||(n.current=t,f())}),[t,f]),a((()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&u){LM.globalOptions=MM.globalOptions;const e=LM(u,r.current,n.current);return l(e),()=>e.destroy()}l(void 0)}),[u,l]),[d,o]}LM.globalOptions=void 0,MM.globalOptions=void 0;const IM=5e3,DM=m(null),RM=r((({children:e,orientation:r="x",showArrows:n=!0,showDots:o=!0,autoPlay:s=!1,interval:u=IM,disabled:d=!1,onSlideChange:f,className:p,...m},y)=>{const h="y"===r,[g,b]=MM({loop:!0,align:"start",axis:h?"y":"x",dragFree:!1,slidesToScroll:1,containScroll:"keepSnaps"}),[w,O]=i(!0),[x,E]=i(!0),[k,j]=i(0),P=v.count(e),N=l((()=>({selectedIndex:k,scrollNext:()=>b?.scrollNext(),scrollPrev:()=>b?.scrollPrev(),canScrollNext:!x,canScrollPrev:!w,setSelectedIndex:e=>{b?.scrollTo(e)}})),[b,x,w,k]),S=c((e=>{j(e.selectedScrollSnap()),O(!e.canScrollPrev()),E(!e.canScrollNext()),f?.(e.selectedScrollSnap())}),[f]);return a((()=>{b&&(S(b),b.on("select",(()=>S(b))),b.on("reInit",(()=>S(b))))}),[b,S]),a((()=>{if(!b||!s)return;const e=setInterval((()=>{x?b.scrollTo(0):b.scrollNext()}),u);return()=>clearInterval(e)}),[b,s,u,x]),t.createElement(DM.Provider,{value:N},t.createElement("div",{ref:y,className:De("relative group",h?"h-96":"w-full",p),role:"region","aria-roledescription":"carousel",style:{perspective:"1000px",perspectiveOrigin:"center center",overflow:"hidden"},...m},t.createElement("div",{ref:g,className:De("overflow-hidden h-full","rounded-2xl"),style:{WebkitMaskImage:"-webkit-radial-gradient(white, black)",willChange:"transform",transformStyle:"preserve-3d"}},t.createElement("div",{className:De("flex will-change-transform h-full",h?"flex-col":"flex-row")},v.map(e,((e,r)=>t.createElement("div",{className:De("transform transition-all duration-700 ease-out",h?"min-h-0 h-full w-full flex-[0_0_100%]":"min-w-0 w-full flex-[0_0_100%]",r===k?"scale-100 rotate-0 translate-z-0 opacity-100":"scale-95 opacity-0 -translate-z-8"),key:r},e))))),t.createElement("div",{className:De("absolute z-20 bg-background/30 backdrop-blur-xl px-4 py-2 rounded-full text-sm font-medium text-foreground shadow-xl border border-primary/20 transition-all duration-500 hover:bg-background/50 overflow-hidden group-hover:scale-105",h?"top-4 right-1/2 translate-x-1/2":"bottom-6 right-6")},t.createElement("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),t.createElement("span",{className:"text-primary font-bold"},k+1),t.createElement("span",{className:"mx-1 opacity-50"},"/"),t.createElement("span",null,P)),n&&t.createElement(t.Fragment,null,t.createElement("div",{className:De("absolute z-10 transition-opacity duration-300",h?"right-4 top-4":"top-1/2 -translate-y-1/2 left-4 opacity-0 group-hover:opacity-100")},t.createElement(nt,{variant:"secondary",size:"small",className:De("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:d||w,onClick:()=>N.scrollPrev()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),h?t.createElement(Ue,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(qe,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Previous slide"))),t.createElement("div",{className:De("absolute z-10 transition-opacity duration-300",h?"right-4 bottom-4":"top-1/2 -translate-y-1/2 right-4 opacity-0 group-hover:opacity-100")},t.createElement(nt,{variant:"secondary",size:"small",className:De("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:d||x,onClick:()=>N.scrollNext()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),h?t.createElement(Ve,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(Ye,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Next slide")))),o&&t.createElement("div",{className:De("absolute z-10",h?"right-4 top-1/2 -translate-y-1/2 flex flex-col gap-3 px-2 py-4 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20":"bottom-6 left-1/2 -translate-x-1/2 flex gap-3 px-4 py-2 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20")},v.map(e,((e,r)=>t.createElement("button",{key:r,type:"button",className:De("h-8 w-8 flex items-center justify-center transition-all duration-500 ease-out hover:scale-125",r===k?"scale-110":"opacity-60 hover:opacity-90"),disabled:d,onClick:()=>N.setSelectedIndex(r)},r===k?t.createElement("div",{className:"w-2 h-2 rounded-full bg-primary shadow-md shadow-primary/30 ring-4 ring-primary/20 transition-all duration-500"}):t.createElement("div",{className:"w-2 h-2 rounded-full bg-muted transition-all duration-500 hover:bg-primary/50"}),t.createElement("span",{className:"sr-only"},"Jump to slide ",r+1)))))))}));RM.displayName="Carousel";r((({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,role:"group","aria-roledescription":"slide",className:De("min-w-0 shrink-0 grow-0 basis-full h-full relative overflow-hidden rounded-xl backdrop-blur-lg transition-all duration-700 ease-out will-change-transform shadow-2xl",e),...n},t.createElement("div",{className:"absolute inset-0 bg-gradient-to-br from-background/5 via-primary/5 to-background/5 opacity-80 mix-blend-overlay pointer-events-none"}),t.createElement("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 bg-gradient-to-t from-primary/10 to-transparent transition-opacity duration-700 ease-out pointer-events-none"}),t.createElement("div",{className:"absolute top-0 right-0 w-24 h-24 -translate-y-8 translate-x-8 bg-primary/20 rounded-full blur-3xl pointer-events-none"}),t.createElement("div",{className:"absolute bottom-0 left-0 w-32 h-32 translate-y-16 -translate-x-16 bg-secondary/10 rounded-full blur-3xl pointer-events-none"}),r))).displayName="CarouselItem";var AM=Object.defineProperty,WM=Object.defineProperties,BM=Object.getOwnPropertyDescriptors,_M=Object.getOwnPropertySymbols,FM=Object.prototype.hasOwnProperty,HM=Object.prototype.propertyIsEnumerable,$M=(e,t,r)=>t in e?AM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var VM=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");var qM=e.createContext({}),YM=e.forwardRef(((t,r)=>{var n,o,i,a,l,s=t,{value:c,onChange:u,maxLength:d,textAlign:f="left",pattern:p,placeholder:m,inputMode:y="numeric",onComplete:h,pushPasswordManagerStrategy:v="increase-width",pasteTransformer:g,containerClassName:b,noScriptCSSFallback:w=GM,render:O,children:x}=s,E=((e,t)=>{var r={};for(var n in e)FM.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&_M)for(var n of _M(e))t.indexOf(n)<0&&HM.call(e,n)&&(r[n]=e[n]);return r})(s,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[k,j]=e.useState("string"==typeof E.defaultValue?E.defaultValue:""),P=null!=c?c:k,N=function(t){let r=e.useRef();return e.useEffect((()=>{r.current=t})),r.current}(P),S=e.useCallback((e=>{null==u||u(e),j(e)}),[u]),C=e.useMemo((()=>p?"string"==typeof p?new RegExp(p):p:null),[p]),z=e.useRef(null),T=e.useRef(null),L=e.useRef({value:P,onChange:S,isIOS:"undefined"!=typeof window&&(null==(o=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:o.call(n,"-webkit-touch-callout","none"))}),M=e.useRef({prev:[null==(i=z.current)?void 0:i.selectionStart,null==(a=z.current)?void 0:a.selectionEnd,null==(l=z.current)?void 0:l.selectionDirection]});e.useImperativeHandle(r,(()=>z.current),[]),e.useEffect((()=>{let e=z.current,t=T.current;if(!e||!t)return;function r(){if(document.activeElement!==e)return B(null),void F(null);let t,r=e.selectionStart,n=e.selectionEnd,o=e.selectionDirection,i=e.maxLength,a=e.value,l=M.current.prev,s=-1,c=-1;if(0!==a.length&&null!==r&&null!==n){let e=r===n,o=r===a.length&&a.length<i;if(e&&!o){let e=r;if(0===e)s=0,c=1,t="forward";else if(e===i)s=e-1,c=e,t="backward";else if(i>1&&a.length>1){let r=0;if(null!==l[0]&&null!==l[1]){t=e<l[1]?"backward":"forward";let n=l[0]===l[1]&&l[0]<i;"backward"===t&&!n&&(r=-1)}s=r+e,c=r+e+1}}-1!==s&&-1!==c&&s!==c&&z.current.setSelectionRange(s,c,t)}let u=-1!==s?s:r,d=-1!==c?c:n,f=null!=t?t:o;B(u),F(d),M.current.prev=[u,d,f]}if(L.current.value!==e.value&&L.current.onChange(e.value),M.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",r,{capture:!0}),r(),document.activeElement===e&&A(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="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;";UM(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),UM(e.sheet,`[data-input-otp]:autofill { ${t} }`),UM(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),UM(e.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; } }"),UM(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let n=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};n();let o=new ResizeObserver(n);return o.observe(e),()=>{document.removeEventListener("selectionchange",r,{capture:!0}),o.disconnect()}}),[]);let[I,D]=e.useState(!1),[R,A]=e.useState(!1),[W,B]=e.useState(null),[_,F]=e.useState(null);e.useEffect((()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}((()=>{var e,t,r,n;null==(e=z.current)||e.dispatchEvent(new Event("input"));let o=null==(t=z.current)?void 0:t.selectionStart,i=null==(r=z.current)?void 0:r.selectionEnd,a=null==(n=z.current)?void 0:n.selectionDirection;null!==o&&null!==i&&(B(o),F(i),M.current.prev=[o,i,a])}))}),[P,R]),e.useEffect((()=>{void 0!==N&&P!==N&&N.length<d&&P.length===d&&(null==h||h(P))}),[d,h,N,P]);let H=function({containerRef:t,inputRef:r,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=e.useState(!1),[l,s]=e.useState(!1),[c,u]=e.useState(!1),d=e.useMemo((()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&i&&l),[i,l,n]),f=e.useCallback((()=>{let e=t.current,o=r.current;if(!e||!o||c||"none"===n)return;let i=e,l=i.getBoundingClientRect().left+i.offsetWidth-18,s=i.getBoundingClientRect().top+i.offsetHeight/2;0===document.querySelectorAll(VM).length&&document.elementFromPoint(l,s)===e||(a(!0),u(!0))}),[t,r,c,n]);return e.useEffect((()=>{let e=t.current;if(!e||"none"===n)return;function r(){let t=window.innerWidth-e.getBoundingClientRect().right;s(t>=40)}r();let o=setInterval(r,1e3);return()=>{clearInterval(o)}}),[t,n]),e.useEffect((()=>{let e=o||document.activeElement===r.current;if("none"===n||!e)return;let t=setTimeout(f,0),i=setTimeout(f,2e3),a=setTimeout(f,5e3),l=setTimeout((()=>{u(!0)}),6e3);return()=>{clearTimeout(t),clearTimeout(i),clearTimeout(a),clearTimeout(l)}}),[r,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:T,inputRef:z,pushPasswordManagerStrategy:v,isFocused:R}),$=e.useCallback((e=>{let t=e.currentTarget.value.slice(0,d);t.length>0&&C&&!C.test(t)?e.preventDefault():("string"==typeof N&&t.length<N.length&&document.dispatchEvent(new Event("selectionchange")),S(t))}),[d,S,N,C]),V=e.useCallback((()=>{var e;if(z.current){let t=Math.min(z.current.value.length,d-1),r=z.current.value.length;null==(e=z.current)||e.setSelectionRange(t,r),B(t),F(r)}A(!0)}),[d]),q=e.useCallback((e=>{var t,r;let n=z.current;if(!(g||L.current.isIOS&&e.clipboardData&&n))return;let o=e.clipboardData.getData("text/plain"),i=g?g(o):o;e.preventDefault();let a=null==(t=z.current)?void 0:t.selectionStart,l=null==(r=z.current)?void 0:r.selectionEnd,s=(a!==l?P.slice(0,a)+i+P.slice(l):P.slice(0,a)+i+P.slice(a)).slice(0,d);if(s.length>0&&C&&!C.test(s))return;n.value=s,S(s);let c=Math.min(s.length,d-1),u=s.length;n.setSelectionRange(c,u),B(c),F(u)}),[d,S,C,P]),Y=e.useMemo((()=>({position:"relative",cursor:E.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"})),[E.disabled]),U=e.useMemo((()=>({position:"absolute",inset:0,width:H.willPushPWMBadge?`calc(100% + ${H.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:H.willPushPWMBadge?`inset(0 ${H.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:f,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"})),[H.PWM_BADGE_SPACE_WIDTH,H.willPushPWMBadge,f]),G=e.useMemo((()=>e.createElement("input",((e,t)=>WM(e,BM(t)))(((e,t)=>{for(var r in t||(t={}))FM.call(t,r)&&$M(e,r,t[r]);if(_M)for(var r of _M(t))HM.call(t,r)&&$M(e,r,t[r]);return e})({autoComplete:E.autoComplete||"one-time-code"},E),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===P.length||void 0,"data-input-otp-mss":W,"data-input-otp-mse":_,inputMode:y,pattern:null==C?void 0:C.source,"aria-placeholder":m,style:U,maxLength:d,value:P,ref:z,onPaste:e=>{var t;q(e),null==(t=E.onPaste)||t.call(E,e)},onChange:$,onMouseOver:e=>{var t;D(!0),null==(t=E.onMouseOver)||t.call(E,e)},onMouseLeave:e=>{var t;D(!1),null==(t=E.onMouseLeave)||t.call(E,e)},onFocus:e=>{var t;V(),null==(t=E.onFocus)||t.call(E,e)},onBlur:e=>{var t;A(!1),null==(t=E.onBlur)||t.call(E,e)}}))),[$,V,q,y,U,d,_,W,E,null==C?void 0:C.source,P]),X=e.useMemo((()=>({slots:Array.from({length:d}).map(((e,t)=>{var r;let n=R&&null!==W&&null!==_&&(W===_&&t===W||t>=W&&t<_),o=void 0!==P[t]?P[t]:null;return{char:o,placeholderChar:void 0!==P[0]?null:null!=(r=null==m?void 0:m[t])?r:null,isActive:n,hasFakeCaret:n&&null===o}})),isFocused:R,isHovering:!E.disabled&&I})),[R,I,d,_,W,E.disabled,P]),Z=e.useMemo((()=>O?O(X):e.createElement(qM.Provider,{value:X},x)),[x,X,O]);return e.createElement(e.Fragment,null,null!==w&&e.createElement("noscript",null,e.createElement("style",null,w)),e.createElement("div",{ref:T,"data-input-otp-container":!0,style:Y,className:b},Z,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},G)))}));function UM(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}YM.displayName="Input";var GM="\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}";const XM=e.forwardRef((({className:t,containerClassName:r,...n},o)=>e.createElement(YM,{ref:o,containerClassName:De("flex items-center gap-2 has-[:disabled]:opacity-50",r),className:De("disabled:cursor-not-allowed",t),...n})));XM.displayName="InputOTP";const ZM=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("flex items-center",t),...r})));ZM.displayName="InputOTPGroup";const KM=e.forwardRef((({index:t,className:r,...n},o)=>{const i=e.useContext(qM),{char:a,hasFakeCaret:l,isActive:s}=i.slots[t];return e.createElement("div",{ref:o,className:De("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",s&&"z-10 ring-1 ring-ring",r),...n},a,l&&e.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center"},e.createElement("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})))}));KM.displayName="InputOTPSlot";e.forwardRef((({...t},r)=>e.createElement("div",{ref:r,role:"separator",...t},e.createElement(_E,null)))).displayName="InputOTPSeparator";const QM=({value:e,maxLength:r=6,onChange:n,disabled:o=!1,isError:i=!1,placeholder:a="○",className:l})=>t.createElement(XM,{value:e,maxLength:r,onChange:n,disabled:o,className:l},t.createElement("div",{"aria-disabled":o},t.createElement(ZM,{role:"group",className:De("gap-2",i&&"input-error")},Array.from({length:r}).map(((r,n)=>t.createElement("div",{key:n,role:"textbox","data-value":e?.[n]||""},t.createElement(KM,{index:n,className:De("rounded-md border",i&&"border-destructive focus:ring-destructive")},e?.[n]||a)))))));QM.displayName="OTPInput";var JM="AlertDialog",[eI,tI]=vg(JM,[OS]),rI=OS(),nI=e=>{const{__scopeAlertDialog:t,...r}=e,n=rI(t);return g(KS,{...n,...r,modal:!0})};nI.displayName=JM;var oI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(QS,{...o,...n,ref:t})}));oI.displayName="AlertDialogTrigger";var iI=e=>{const{__scopeAlertDialog:t,...r}=e,n=rI(t);return g(JS,{...n,...r})};iI.displayName="AlertDialogPortal";var aI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(eC,{...o,...n,ref:t})}));aI.displayName="AlertDialogOverlay";var lI="AlertDialogContent",[sI,cI]=eI(lI),uI=e.forwardRef(((t,r)=>{const{__scopeAlertDialog:n,children:o,...i}=t,a=rI(n),l=e.useRef(null),s=hg(r,l),c=e.useRef(null);return g(US,{contentName:lI,titleName:dI,docsSlug:"alert-dialog",children:g(sI,{scope:n,cancelRef:c,children:w(tC,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:pg(i.onOpenAutoFocus,(e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[g(Og,{children:o}),g(gI,{contentRef:l})]})})})}));uI.displayName=lI;var dI="AlertDialogTitle",fI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(rC,{...o,...n,ref:t})}));fI.displayName=dI;var pI="AlertDialogDescription",mI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(nC,{...o,...n,ref:t})}));mI.displayName=pI;var yI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(oC,{...o,...n,ref:t})}));yI.displayName="AlertDialogAction";var hI="AlertDialogCancel",vI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=cI(hI,r),i=rI(r),a=hg(t,o);return g(oC,{...i,...n,ref:a})}));vI.displayName=hI;var gI=({contentRef:t})=>{const r=`\`${lI}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${lI}\` by passing a \`${pI}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${lI}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return e.useEffect((()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(r)}),[r,t]),null},bI=aI,wI=uI,OI=yI,xI=vI,EI=fI,kI=mI;const jI=nI,PI=oI,NI=iI,SI=e.forwardRef((({className:t,...r},n)=>e.createElement(bI,{className:De("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",t),...r,ref:n})));SI.displayName=bI.displayName;const CI=e.forwardRef((({className:t,...r},n)=>e.createElement(NI,null,e.createElement(SI,null),e.createElement(wI,{ref:n,className:De("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-lg 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",t),...r}))));CI.displayName=wI.displayName;const zI=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col space-y-2 text-center sm:text-left",t),...r});zI.displayName="AlertDialogHeader";const TI=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});TI.displayName="AlertDialogFooter";const LI=e.forwardRef((({className:t,...r},n)=>e.createElement(EI,{ref:n,className:De("text-lg font-semibold",t),...r})));LI.displayName=EI.displayName;const MI=e.forwardRef((({className:t,...r},n)=>e.createElement(kI,{ref:n,className:De("text-sm text-muted-foreground",t),...r})));MI.displayName=kI.displayName;const II=e.forwardRef((({className:t,...r},n)=>e.createElement(OI,{ref:n,className:De(TP(),t),...r})));II.displayName=OI.displayName;const DI=e.forwardRef((({className:t,...r},n)=>e.createElement(xI,{ref:n,className:De(TP({variant:"outline"}),"mt-2 sm:mt-0",t),...r})));DI.displayName=xI.displayName;const RI="Cancel",AI="default",WI=!1,BI=({title:e,description:r,trigger:n,action:o,cancel:i=RI,onAction:a,onCancel:l,variant:s=AI,disabled:c=WI})=>t.createElement(jI,null,t.createElement(PI,{asChild:!0},t.createElement(nt,{variant:"secondary",disabled:c},n)),t.createElement(CI,null,t.createElement(zI,null,t.createElement(LI,null,e),t.createElement(MI,null,r)),t.createElement(TI,null,t.createElement(DI,{onClick:l,className:De("destructive"===s&&"border-destructive/50")},i),t.createElement(II,{onClick:a,className:De("destructive"===s&&"bg-destructive hover:bg-destructive/90")},o)))),_I=!1,FI="chevron",HI="right",$I="",VI="",qI="",YI=300,UI=({title:e,children:r,defaultOpen:n=_I,icon:o=FI,iconPosition:a=HI,className:l=$I,headerClassName:s=VI,contentClassName:u=qI,animationDuration:d=YI,onToggle:f})=>{const[p,m]=i(n),y=c((()=>{const e=!p;m(e),f&&f(e)}),[p,f]),h=c((()=>"chevron"===o?p?t.createElement(Ue,{size:20}):t.createElement(Ve,{size:20}):null),[o,p]);return t.createElement("div",{className:`collapsible-container border rounded-md overflow-hidden ${l}`,"data-state":p?"open":"closed"},t.createElement("button",{type:"button",onClick:y,className:`flex items-center justify-between w-full p-4 text-left font-medium transition-all hover:bg-muted/50 ${s}`,"aria-expanded":p},"left"===a&&h(),t.createElement("span",null,e),"right"===a&&h()),t.createElement("div",{className:`overflow-hidden transition-all ${u}`,style:{maxHeight:p?"1000px":"0px",opacity:p?1:0,transitionDuration:`${d}ms`}},t.createElement("div",{className:"p-4 border-t bg-background"},r)))},GI={simple:{title:"Click to expand",content:t.createElement((()=>t.createElement("div",null,"This is a simple collapsible content area.")),null)},complex:{title:"Product Information",content:t.createElement((()=>t.createElement("div",null,t.createElement("h3",{className:"text-lg font-semibold mb-2"},"Product Features"),t.createElement("ul",{className:"list-disc pl-5 mb-4"},t.createElement("li",null,"Feature one with detailed description"),t.createElement("li",null,"Feature two with even more details about functionality"),t.createElement("li",null,"Feature three with technical specifications")),t.createElement("p",{className:"text-sm text-muted-foreground"},"Additional information about the product can be found in the documentation."))),null)},faq:[{title:"How do I reset my password?",content:t.createElement((()=>t.createElement("div",null,'You can reset your password by clicking on the "Forgot Password" link on the login page and following the instructions sent to your email.')),null)},{title:"What payment methods do you accept?",content:t.createElement((()=>t.createElement("div",null,"We accept all major credit cards, PayPal, and bank transfers. For enterprise customers, we also offer invoicing options.")),null)},{title:"Can I cancel my subscription?",content:t.createElement((()=>t.createElement("div",null,"Yes, you can cancel your subscription at any time from your account settings. Your access will continue until the end of your billing period.")),null)}]},XI=e=>t.createElement("div",{className:"w-full max-w-3xl mx-auto p-6 rounded-lg border bg-card text-card-foreground shadow"},t.createElement("h2",{className:"text-xl font-bold mb-4"},"Frequently Asked Questions"),GI.faq.map(((r,n)=>t.createElement("div",{key:n,className:n>0?"mt-2":""},t.createElement(UI,{...e,title:r.title},r.content))))),ZI="medium",KI={small:"max-w-sm",medium:"max-w-2xl",large:"max-w-4xl"},QI=({avatarUrl:e,name:r,email:n,position:o,dropdownItems:l=[],size:u=ZI,className:d})=>{const[f,p]=i(!1),m=s(null),y=l.length,h=c((()=>{p((e=>!e))}),[]),v=c((e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),h())}),[h]);return a((()=>{const e=e=>{m.current&&!m.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),t.createElement("div",{ref:m,role:y>0?"button":void 0,tabIndex:y>0?0:void 0,onClick:y>0?h:void 0,onKeyDown:y>0?v:void 0,"aria-expanded":y>0?f:void 0,"aria-haspopup":y>0?"menu":void 0,className:De("inline-block bg-card/95 text-card-foreground rounded-xl border border-border/30 shadow-md overflow-visible backdrop-blur-sm transition-all duration-300 hover:shadow-lg hover:border-border/50",y>0&&"cursor-pointer",KI[u],d)},t.createElement("div",{className:De("flex items-center gap-3","small"===u?"p-2":"large"===u?"p-4":"p-3")},t.createElement("img",{src:e,alt:`${r} profile`,className:De("rounded-full border-2 border-background shadow-sm transition-transform duration-300","ring-1 ring-primary/10 hover:ring-primary/30","small"===u?"w-10 h-10":"large"===u?"w-14 h-14":"w-12 h-12")}),t.createElement("div",null,t.createElement("h2",{className:De("font-semibold text-foreground transition-colors hover:text-primary/90","small"===u?"text-base":"large"===u?"text-xl":"text-lg")},r),o&&t.createElement("p",{className:"text-muted-foreground text-sm"},o),n&&t.createElement("p",{className:"text-muted-foreground text-sm mt-0.5"},n)),y>0&&t.createElement("div",{className:"ml-auto"},t.createElement("div",{className:"p-1"},f?t.createElement(Ue,{className:"w-4 h-4 text-muted-foreground"}):t.createElement(Ve,{className:"w-4 h-4 text-muted-foreground"})))),f&&y>0&&t.createElement("div",{role:"menu",className:"absolute mt-1 w-full bg-card rounded-md shadow-lg z-20 py-1 border border-border/30 left-0"},l.map(((e,r)=>t.createElement("a",{key:r,href:e.link||"#",role:"menuitem",className:De("flex items-center px-4 py-2 text-sm hover:bg-primary/10",{"opacity-50 pointer-events-none":e.isDisabled,"cursor-pointer":!e.isDisabled}),onClick:t=>{t.stopPropagation(),e.isDisabled&&t.preventDefault()}},e.icon&&t.createElement("span",{className:"mr-2"},e.icon),e.name)))))},JI="horizontal",eD="tab1",tD=!1,rD="100%";var nD;!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(nD||(nD={}));const oD=({items:e,defaultValue:r=eD,orientation:n=JI,disabled:o=tD,onValueChange:l,className:s,width:u=rD})=>{const[d,f]=i(r);a((()=>{if("undefined"!=typeof window){const t=new URLSearchParams(window.location.search).get("tab");t&&e.some((e=>e.value===t))&&(f(t),l?.(t))}}),[e,l]);const p=c(((e,t)=>{if("undefined"==typeof window)return"";const r=new URLSearchParams(window.location.search);return r.set(e,t),r.toString()}),[]),m=c((e=>{if(f(e),"undefined"!=typeof window){const t=p("tab",e),r=`${window.location.pathname}?${t}`;window.history&&window.history.pushState&&window.history.pushState({path:r},"",r)}l&&l(e)}),[l,p]),y="vertical"===n,h=e=>De("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200",y?"px-4 py-3 w-full justify-start text-left rounded-l-md":"px-5 py-2.5 relative",d===e.value?y?"bg-background/80 text-primary font-semibold shadow-sm backdrop-blur-sm":"text-primary font-semibold":y?"text-muted-foreground hover:text-foreground hover:bg-muted/30":"text-muted-foreground hover:text-foreground",(o||e.disabled)&&"opacity-40 pointer-events-none"),v=c((e=>{o||e.disabled||m(e.value)}),[o,m]);return t.createElement("div",{className:De(y?"flex space-x-6":"space-y-4 flex flex-col items-center",s),style:{width:u}},t.createElement("div",{role:"tablist","aria-orientation":n,className:De("flex relative",y?"flex-col h-full space-y-1 min-w-[200px] border-r border-border/40 pr-2":"w-full justify-center pb-px")},t.createElement("div",{className:De("flex relative",y?"flex-col w-full":"border-b border-border/30")},e.map((e=>t.createElement("div",{key:e.value,className:De("relative",y?"":"border-b-2 border-transparent",d===e.value&&!y&&"border-b-2 border-primary z-10")},t.createElement("button",{role:"tab",type:"button","aria-selected":d===e.value,"aria-controls":`tabpanel-${e.value}`,tabIndex:d===e.value?0:-1,className:h(e),onClick:()=>v(e),disabled:o||e.disabled},e.label,d===e.value&&!y&&t.createElement("div",{className:"absolute bottom-0 left-0 h-0.5 w-full bg-primary rounded-full"})),d===e.value&&y&&t.createElement("div",{className:"absolute top-0 left-0 h-full w-0.5 bg-primary rounded-full"})))))),e.map((e=>t.createElement("div",{key:e.value,role:"tabpanel",id:`tabpanel-${e.value}`,"aria-labelledby":`tab-${e.value}`,hidden:d!==e.value,className:De("focus-visible:outline-none rounded-md",y?"flex-1":"w-full",d===e.value?"animate-in fade-in-0 duration-300":"hidden"),style:y?void 0:{width:u}},e.content))))},iD={small:{node:"w-4 h-4",innerDot:{active:"w-2 h-2",completed:"w-1.5 h-1.5",default:"w-1 h-1"},text:"text-sm",description:"text-xs",connectorTop:"top-2",connectorHeight:"h-10",spacing:"mb-6",marginRight:"mr-4",verticalConnector:{left:"left-[7px]",top:"top-[16px]",height:"h-[calc(100%-16px)]"}},medium:{node:"w-6 h-6",innerDot:{active:"w-3 h-3",completed:"w-2.5 h-2.5",default:"w-2 h-2"},text:"text-base",description:"text-sm",connectorTop:"top-3",connectorHeight:"h-14",spacing:"mb-8",marginRight:"mr-6",verticalConnector:{left:"left-[11px]",top:"top-[24px]",height:"h-[calc(100%-24px)]"}},large:{node:"w-8 h-8",innerDot:{active:"w-4 h-4",completed:"w-3.5 h-3.5",default:"w-3 h-3"},text:"text-lg",description:"text-base",connectorTop:"top-4",connectorHeight:"h-16",spacing:"mb-10",marginRight:"mr-8",verticalConnector:{left:"left-[15px]",top:"top-[32px]",height:"h-[calc(100%-32px)]"}}},aD=({steps:e,activeStep:r=0,orientation:n="horizontal",size:o="medium",className:i,onStepClick:a})=>{const l="horizontal"===n,s=iD[o];return t.createElement("div",{className:De("max-w-full mx-auto mb-4 px-8",i)},t.createElement("div",{className:De("flex relative p-0",l?"flex-row justify-between":"flex-col")},e.map(((n,o)=>{const i=o===r,c=o<r,u=a?t.createElement("button",{type:"button",className:De("relative text-left w-full bg-transparent border-0 p-0 m-0",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),onClick:()=>a(o),"aria-current":i?"step":void 0},t.createElement("div",{className:De("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:De("rounded-full transition-all duration-300 ease-in-out",i?De(s.innerDot.active,"bg-primary"):c?De(s.innerDot.completed,"bg-primary-foreground"):De(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:De("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:`w-0.5 ${s.verticalConnector.left} ${s.verticalConnector.top} ${s.verticalConnector.height}`,c?"bg-primary":"bg-border")}),t.createElement("div",{className:De(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:De("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:De("text-muted-foreground mt-1",s.description)},n.description))):t.createElement("div",{className:De("relative",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),"aria-current":i?"step":void 0},t.createElement("div",{className:De("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:De("rounded-full transition-all duration-300 ease-in-out",i?De(s.innerDot.active,"bg-primary"):c?De(s.innerDot.completed,"bg-primary-foreground"):De(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:De("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:"w-0.5 left-[12px] top-[24px] h-[calc(100%-24px)]",c?"bg-primary":"bg-border")}),t.createElement("div",{className:De(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:De("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:De("text-muted-foreground mt-1",s.description)},n.description)));return t.createElement(t.Fragment,{key:n.id},u)}))))};export{BI as AlertDialogComponent,BP as BreadCrumb,nt as Button,DP as Calendar,eN as Card,RM as Carousel,Qv as Checkbox,UI as Collapse,GI as CollapseData,KP as CustomSkeleton,UT as DatePicker,EC as Dialog,Dv as Disable,IL as Drawer,HP as Dropdown,Fv as EditFilled,Bv as Error,$v as ExcelFile,XI as FAQCollapseGroup,qv as FBLike,Yv as FBLove,Hv as FileUpload,dg as Heading,Rv as Hide,Gv as Icon,Av as Info,fg as Input,rN as LoaderComponent,QM as OTPInput,aw as PaginationComponent,UL as Popover,QI as ProfileCard,jb as RadioGroup,AL as Sheet,BL as SheetClose,HL as SheetContent,YL as SheetDescription,VL as SheetFooter,$L as SheetHeader,qL as SheetTitle,WL as SheetTrigger,aD as Stepper,Vv as Success,$b as Switch,lw as Table,oD as Tabs,ug as Text,TE as Tooltip,_v as Upload,Wv as Warning,RP as breadCrumbVariants,Fb as colorVariants,Xb as message,_b as sizeVariants,Vb as sizes,qb as variants};
52
+ */var Lw=(zw||(zw=1,"production"===process.env.NODE_ENV?Nw.exports=function(){if(Pw)return Sw;Pw=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case n:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case c:case p:case f:case a:return e;default:return m}}case r:return m}}}return e=Symbol.for("react.module.reference"),Sw.ContextConsumer=l,Sw.ContextProvider=a,Sw.Element=t,Sw.ForwardRef=c,Sw.Fragment=n,Sw.Lazy=p,Sw.Memo=f,Sw.Portal=r,Sw.Profiler=i,Sw.StrictMode=o,Sw.Suspense=u,Sw.SuspenseList=d,Sw.isAsyncMode=function(){return!1},Sw.isConcurrentMode=function(){return!1},Sw.isContextConsumer=function(e){return y(e)===l},Sw.isContextProvider=function(e){return y(e)===a},Sw.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Sw.isForwardRef=function(e){return y(e)===c},Sw.isFragment=function(e){return y(e)===n},Sw.isLazy=function(e){return y(e)===p},Sw.isMemo=function(e){return y(e)===f},Sw.isPortal=function(e){return y(e)===r},Sw.isProfiler=function(e){return y(e)===i},Sw.isStrictMode=function(e){return y(e)===o},Sw.isSuspense=function(e){return y(e)===u},Sw.isSuspenseList=function(e){return y(e)===d},Sw.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Sw.typeOf=y,Sw}():Nw.exports=(Cw||(Cw=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var y=e.type;switch(y){case n:case i:case o:case u:case d:return y;default:var h=y&&y.$$typeof;switch(h){case s:case l:case c:case p:case f:case a:return h;default:return m}}case r:return m}}}e=Symbol.for("react.module.reference");var h=l,v=a,g=t,b=c,w=n,O=p,x=f,E=r,k=i,j=o,P=u,N=d,S=!1,C=!1;Tw.ContextConsumer=h,Tw.ContextProvider=v,Tw.Element=g,Tw.ForwardRef=b,Tw.Fragment=w,Tw.Lazy=O,Tw.Memo=x,Tw.Portal=E,Tw.Profiler=k,Tw.StrictMode=j,Tw.Suspense=P,Tw.SuspenseList=N,Tw.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Tw.isConcurrentMode=function(e){return C||(C=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Tw.isContextConsumer=function(e){return y(e)===l},Tw.isContextProvider=function(e){return y(e)===a},Tw.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Tw.isForwardRef=function(e){return y(e)===c},Tw.isFragment=function(e){return y(e)===n},Tw.isLazy=function(e){return y(e)===p},Tw.isMemo=function(e){return y(e)===f},Tw.isPortal=function(e){return y(e)===r},Tw.isProfiler=function(e){return y(e)===i},Tw.isStrictMode=function(e){return y(e)===o},Tw.isSuspense=function(e){return y(e)===u},Tw.isSuspenseList=function(e){return y(e)===d},Tw.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===u||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===l||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Tw.typeOf=y}()),Tw)),Nw.exports);var Mw=Symbol.for("react.element"),Iw=Symbol.for("react.transitional.element"),Dw=Symbol.for("react.fragment");function Rw(e){return e&&"object"===uw(e)&&(e.$$typeof===Mw||e.$$typeof===Iw)&&e.type===Dw}var Aw=Number(u.split(".")[0]),Ww=function(e,t){"function"==typeof e?e(t):"object"===uw(e)&&e&&"current"in e&&(e.current=t)},Bw=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(e){t.forEach((function(t){Ww(t,e)}))}},_w=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o=function(){return Bw.apply(void 0,r)},i=r,a=function(e,t){return e.length!==t.length||e.every((function(e,r){return e!==t[r]}))},"value"in(l=e.useRef({})).current&&!a(l.current.condition,i)||(l.current.value=o(),l.current.condition=i),l.current.value;var o,i,a,l},Fw=function(e){var t,r,n;if(!e)return!1;if(d(n=e)&&!Rw(n)&&Aw>=19)return!0;var o=Lw.isMemo(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===Lw.ForwardRef)&&!!("function"!=typeof e||null!==(r=e.prototype)&&void 0!==r&&r.render||e.$$typeof===Lw.ForwardRef)};var Hw=e.createContext(null);function $w(e){return function(e){if(Array.isArray(e))return hw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||vw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Vw="test"!==process.env.NODE_ENV&&bw()?e.useLayoutEffect:e.useEffect,qw=function(t,r){var n=e.useRef(!0);Vw((function(){return t(n.current)}),r),Vw((function(){return n.current=!1,function(){n.current=!0}}),[])},Yw=[];var Uw="data-rc-order",Gw="data-rc-priority",Xw=new Map;function Zw(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function Kw(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Qw(e){return Array.from((Xw.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Jw(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!bw())return null;var r=t.csp,n=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(n),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Uw,a),l&&i&&s.setAttribute(Gw,"".concat(i)),null!=r&&r.nonce&&(s.nonce=null==r?void 0:r.nonce),s.innerHTML=e;var c=Kw(t),u=c.firstChild;if(n){if(l){var d=(t.styles||Qw(c)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Uw)))return!1;var t=Number(e.getAttribute(Gw)||0);return i>=t}));if(d.length)return c.insertBefore(s,d[d.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function eO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Kw(t);return(t.styles||Qw(r)).find((function(r){return r.getAttribute(Zw(t))===e}))}function tO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=eO(e,t);r&&Kw(t).removeChild(r)}function rO(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Kw(r),o=Qw(n),i=mw(mw({},r),{},{styles:o});!function(e,t){var r=Xw.get(e);if(!r||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}(document,r)){var n=Jw("",t),o=n.parentNode;Xw.set(e,o),e.removeChild(n)}}(n,i);var a=eO(t,i);if(a){var l,s,c;if(null!==(l=i.csp)&&void 0!==l&&l.nonce&&a.nonce!==(null===(s=i.csp)||void 0===s?void 0:s.nonce))a.nonce=null===(c=i.csp)||void 0===c?void 0:c.nonce;return a.innerHTML!==e&&(a.innerHTML=e),a}var u=Jw(e,i);return u.setAttribute(Zw(i),t),u}function nO(e){return"undefined"!=typeof document&&e&&e instanceof Element?function(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n,o,i=r.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var a=getComputedStyle(e);i.scrollbarColor=a.scrollbarColor,i.scrollbarWidth=a.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),s=parseInt(l.width,10),c=parseInt(l.height,10);try{var u=s?"width: ".concat(l.width,";"):"",d=c?"height: ".concat(l.height,";"):"";rO("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(d,"\n}"),t)}catch(e){console.error(e),n=s,o=c}}document.body.appendChild(r);var f=e&&n&&!isNaN(n)?n:r.offsetWidth-r.clientWidth,p=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),tO(t),{width:f,height:p}}(e):{width:0,height:0}}var oO="rc-util-locker-".concat(Date.now()),iO=0;function aO(t){var r=!!t,n=gw(e.useState((function(){return iO+=1,"".concat(oO,"_").concat(iO)})),1)[0];qw((function(){if(r){var e=nO(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;rO("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),n)}else tO(n);return function(){tO(n)}}),[r,n])}var lO=function(e){return!1!==e&&(bw()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},sO=e.forwardRef((function(t,r){var n=t.open,o=t.autoLock,i=t.getContainer,a=t.debug,l=t.autoDestroy,s=void 0===l||l,c=t.children,u=gw(e.useState(n),2),d=u[0],f=u[1],p=d||n;"production"!==process.env.NODE_ENV&&jw(bw()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),e.useEffect((function(){(s||n)&&f(n)}),[n,s]);var m=gw(e.useState((function(){return lO(i)})),2),y=m[0],h=m[1];e.useEffect((function(){var e=lO(i);h(null!=e?e:null)}));var v=function(t,r){var n=gw(e.useState((function(){if(!bw())return null;var e=document.createElement("div");return"production"!==process.env.NODE_ENV&&r&&e.setAttribute("data-debug",r),e})),1)[0],o=e.useRef(!1),i=e.useContext(Hw),a=gw(e.useState(Yw),2),l=a[0],s=a[1],c=i||(o.current?void 0:function(e){s((function(t){return[e].concat($w(t))}))});function u(){n.parentElement||document.body.appendChild(n),o.current=!0}function d(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return qw((function(){return t?i?i(u):u():d(),d}),[t]),qw((function(){l.length&&(l.forEach((function(e){return e()})),s(Yw))}),[l]),[n,c]}(p&&!y,a),g=gw(v,2),b=g[0],w=g[1],O=null!=y?y:b;aO(o&&n&&bw()&&(O===b||O===document.body));var x=null;c&&Fw(c)&&r&&(x=c.ref);var k=_w(x,r);if(!p||!bw()||void 0===y)return null;var j=!1===O||!1,P=c;return r&&(P=e.cloneElement(c,{ref:k})),e.createElement(Hw.Provider,{value:w},j?P:E(P,O))}));function cO(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return t.Children.forEach(e,(function(e){(null!=e||r.keepEmpty)&&(Array.isArray(e)?n=n.concat(cO(e)):Rw(e)&&e.props?n=n.concat(cO(e.props.children,r)):n.push(e))})),n}function uO(e){return e instanceof HTMLElement||e instanceof SVGElement}function dO(e){var r,n=function(e){return e&&"object"===uw(e)&&uO(e.nativeElement)?e.nativeElement:uO(e)?e:null}(e);return n||(e instanceof t.Component?null===(r=x.findDOMNode)||void 0===r?void 0:r.call(x,e):null)}"production"!==process.env.NODE_ENV&&(sO.displayName="Portal");var fO=e.createContext(null);var pO=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];e.call(t,o[1],o[0])}},t}()}(),mO="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,yO="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),hO="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(yO):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var vO=["top","right","bottom","left","width","height","size","weight"],gO="undefined"!=typeof MutationObserver,bO=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,o=0;function i(){r&&(r=!1,e()),n&&l()}function a(){hO(i)}function l(){var e=Date.now();if(r){if(e-o<2)return;n=!0}else r=!0,n=!1,setTimeout(a,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){mO&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gO?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){mO&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;vO.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),wO=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},OO=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||yO},xO=SO(0,0,0,0);function EO(e){return parseFloat(e)||0}function kO(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce((function(t,r){return t+EO(e["border-"+r+"-width"])}),0)}function jO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return xO;var n=OO(e).getComputedStyle(e),o=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],i=e["padding-"+o];t[o]=EO(i)}return t}(n),i=o.left+o.right,a=o.top+o.bottom,l=EO(n.width),s=EO(n.height);if("border-box"===n.boxSizing&&(Math.round(l+i)!==t&&(l-=kO(n,"left","right")+i),Math.round(s+a)!==r&&(s-=kO(n,"top","bottom")+a)),!function(e){return e===OO(e).document.documentElement}(e)){var c=Math.round(l+i)-t,u=Math.round(s+a)-r;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return SO(o.left,o.top,l,s)}var PO="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof OO(e).SVGGraphicsElement}:function(e){return e instanceof OO(e).SVGElement&&"function"==typeof e.getBBox};function NO(e){return mO?PO(e)?function(e){var t=e.getBBox();return SO(0,0,t.width,t.height)}(e):jO(e):xO}function SO(e,t,r,n){return{x:e,y:t,width:r,height:n}}var CO=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=SO(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=NO(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),zO=function(e,t){var r,n,o,i,a,l,s,c=(n=(r=t).x,o=r.y,i=r.width,a=r.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(l.prototype),wO(s,{x:n,y:o,width:i,height:a,top:o,right:n+i,bottom:a+o,left:n}),s);wO(this,{target:e,contentRect:c})},TO=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new pO,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof OO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new CO(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof OO(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new zO(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),LO="undefined"!=typeof WeakMap?new WeakMap:new pO,MO=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=bO.getInstance(),n=new TO(t,r,this);LO.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){MO.prototype[e]=function(){var t;return(t=LO.get(this))[e].apply(t,arguments)}}));var IO=void 0!==yO.ResizeObserver?yO.ResizeObserver:MO,DO=new Map;function RO(e){e.forEach((function(e){var t,r=e.target;null===(t=DO.get(r))||void 0===t||t.forEach((function(e){return e(r)}))}))}var AO=new IO(RO);function WO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dw(n.key),n)}}function _O(e,t,r){return t&&BO(e.prototype,t),r&&BO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function FO(e,t){return FO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},FO(e,t)}function HO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FO(e,t)}function $O(e){return $O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$O(e)}function VO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(VO=function(){return!!e})()}function qO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YO(e){var t=VO();return function(){var r,n=$O(e);if(t){var o=$O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"==uw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qO(e)}(this,r)}}process.env.NODE_ENV,process.env.NODE_ENV;var UO=function(){HO(r,e.Component);var t=YO(r);function r(){return WO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function GO(t,r){var n=t.children,o=t.disabled,i=e.useRef(null),a=e.useRef(null),l=e.useContext(fO),s="function"==typeof n,c=s?n(i):n,u=e.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!s&&e.isValidElement(c)&&Fw(c),f=d?c.ref:null,p=_w(f,i),m=function(){var e;return dO(i.current)||(i.current&&"object"===uw(i.current)?dO(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||dO(a.current)};e.useImperativeHandle(r,(function(){return m()}));var y=e.useRef(t);y.current=t;var h=e.useCallback((function(e){var t=y.current,r=t.onResize,n=t.data,o=e.getBoundingClientRect(),i=o.width,a=o.height,s=e.offsetWidth,c=e.offsetHeight,d=Math.floor(i),f=Math.floor(a);if(u.current.width!==d||u.current.height!==f||u.current.offsetWidth!==s||u.current.offsetHeight!==c){var p={width:d,height:f,offsetWidth:s,offsetHeight:c};u.current=p;var m=s===Math.round(i)?i:s,h=c===Math.round(a)?a:c,v=mw(mw({},p),{},{offsetWidth:m,offsetHeight:h});null==l||l(v,e,n),r&&Promise.resolve().then((function(){r(v,e)}))}}),[]);return e.useEffect((function(){var e,t,r=m();return r&&!o&&(e=r,t=h,DO.has(e)||(DO.set(e,new Set),AO.observe(e)),DO.get(e).add(t)),function(){return function(e,t){DO.has(e)&&(DO.get(e).delete(t),DO.get(e).size||(AO.unobserve(e),DO.delete(e)))}(r,h)}}),[i.current,o]),e.createElement(UO,{ref:a},d?e.cloneElement(c,{ref:p}):c)}var XO=e.forwardRef(GO);"production"!==process.env.NODE_ENV&&(XO.displayName="SingleObserver");function ZO(t,r){var n=t.children,o="function"==typeof n?[n]:cO(n);return"production"!==process.env.NODE_ENV&&(o.length>1?xw(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):0===o.length&&xw(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),o.map((function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return e.createElement(XO,cw({},t,{key:i,ref:0===o?r:void 0}),n)}))}var KO=e.forwardRef(ZO);function QO(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function JO(e){return function(e){return QO(e)instanceof ShadowRoot}(e)?QO(e):null}function ex(t){var r=e.useRef();r.current=t;var n=e.useCallback((function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return null===(e=r.current)||void 0===e?void 0:e.call.apply(e,[r].concat(n))}),[]);return n}"production"!==process.env.NODE_ENV&&(KO.displayName="ResizeObserver"),KO.Collection=function(t){var r=t.children,n=t.onBatchResize,o=e.useRef(0),i=e.useRef([]),a=e.useContext(fO),l=e.useCallback((function(e,t,r){o.current+=1;var l=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){l===o.current&&(null==n||n(i.current),i.current=[])})),null==a||a(e,t,r)}),[n,a]);return e.createElement(fO.Provider,{value:l},r)};var tx=0,rx=mw({},e).useId,nx=rx?function(e){var t=rx();return e||("test"===process.env.NODE_ENV?"test-id":t)}:function(t){var r=gw(e.useState("ssr-id"),2),n=r[0],o=r[1];return e.useEffect((function(){var e=tx;tx+=1,o("rc_unique_".concat(e))}),[]),t||("test"===process.env.NODE_ENV?"test-id":n)},ox=e.createContext({}),ix=function(){HO(r,e.Component);var t=YO(r);function r(){return WO(this,r),t.apply(this,arguments)}return _O(r,[{key:"render",value:function(){return this.props.children}}]),r}();function ax(t){var r=e.useRef(!1),n=gw(e.useState(t),2),o=n[0],i=n[1];return e.useEffect((function(){return r.current=!1,function(){r.current=!0}}),[]),[o,function(e,t){t&&r.current||i(e)}]}var lx="none",sx="appear",cx="enter",ux="leave",dx="none",fx="prepare",px="start",mx="active",yx="end",hx="prepared";function vx(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}var gx,bx,wx,Ox=(gx=bw(),bx="undefined"!=typeof window?window:{},wx={animationend:vx("Animation","AnimationEnd"),transitionend:vx("Transition","TransitionEnd")},gx&&("AnimationEvent"in bx||delete wx.animationend.animation,"TransitionEvent"in bx||delete wx.transitionend.transition),wx),xx={};if(bw()){var Ex=document.createElement("div");xx=Ex.style}var kx={};function jx(e){if(kx[e])return kx[e];var t=Ox[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o+=1){var i=r[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in xx)return kx[e]=t[i],kx[e]}return""}var Px=jx("animationend"),Nx=jx("transitionend"),Sx=!(!Px||!Nx),Cx=Px||"animationend",zx=Nx||"transitionend";function Tx(e,t){if(!e)return null;if("object"===uw(e)){var r=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[r]}return"".concat(e,"-").concat(t)}var Lx=bw()?f:a,Mx=function(e){return+setTimeout(e,16)},Ix=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(Mx=function(e){return window.requestAnimationFrame(e)},Ix=function(e){return window.cancelAnimationFrame(e)});var Dx=0,Rx=new Map;function Ax(e){Rx.delete(e)}var Wx=function(e){var t=Dx+=1;return function r(n){if(0===n)Ax(t),e();else{var o=Mx((function(){r(n-1)}));Rx.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};Wx.cancel=function(e){var t=Rx.get(e);return Ax(e),Ix(t)},"production"!==process.env.NODE_ENV&&(Wx.ids=function(){return Rx});var Bx=[fx,px,mx,yx],_x=[fx,hx],Fx=!1;function Hx(e){return e===mx||e===yx}var $x=function(t,r,n){var o=gw(ax(dx),2),i=o[0],a=o[1],l=function(){var t=e.useRef(null);function r(){Wx.cancel(t.current)}return e.useEffect((function(){return function(){r()}}),[]),[function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;r();var i=Wx((function(){o<=1?n({isCanceled:function(){return i!==t.current}}):e(n,o-1)}));t.current=i},r]}(),s=gw(l,2),c=s[0],u=s[1];var d=r?_x:Bx;return Lx((function(){if(i!==dx&&i!==yx){var e=d.indexOf(i),t=d[e+1],r=n(i);r===Fx?a(t,!0):t&&c((function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[t,i]),e.useEffect((function(){return function(){u()}}),[]),[function(){a(fx,!0)},i]};function Vx(t,r,n,o){var i,l,c,u=o.motionEnter,d=void 0===u||u,f=o.motionAppear,p=void 0===f||f,m=o.motionLeave,y=void 0===m||m,h=o.motionDeadline,v=o.motionLeaveImmediately,g=o.onAppearPrepare,b=o.onEnterPrepare,w=o.onLeavePrepare,O=o.onAppearStart,x=o.onEnterStart,E=o.onLeaveStart,k=o.onAppearActive,j=o.onEnterActive,P=o.onLeaveActive,N=o.onAppearEnd,S=o.onEnterEnd,C=o.onLeaveEnd,z=o.onVisibleChanged,T=gw(ax(),2),L=T[0],M=T[1],I=(i=lx,l=gw(e.useReducer((function(e){return e+1}),0),2)[1],c=e.useRef(i),[ex((function(){return c.current})),ex((function(e){c.current="function"==typeof e?e(c.current):e,l()}))]),D=gw(I,2),R=D[0],A=D[1],W=gw(ax(null),2),B=W[0],_=W[1],F=R(),H=s(!1),$=s(null);function V(){return n()}var q=s(!1);function Y(){A(lx),_(null,!0)}var U=ex((function(e){var t=R();if(t!==lx){var r=V();if(!e||e.deadline||e.target===r){var n,o=q.current;t===sx&&o?n=null==N?void 0:N(r,e):t===cx&&o?n=null==S?void 0:S(r,e):t===ux&&o&&(n=null==C?void 0:C(r,e)),o&&!1!==n&&Y()}}})),G=function(t){var r=s();function n(e){e&&(e.removeEventListener(zx,t),e.removeEventListener(Cx,t))}return e.useEffect((function(){return function(){n(r.current)}}),[]),[function(e){r.current&&r.current!==e&&n(r.current),e&&e!==r.current&&(e.addEventListener(zx,t),e.addEventListener(Cx,t),r.current=e)},n]}(U),X=gw(G,1)[0],Z=function(e){switch(e){case sx:return fw(fw(fw({},fx,g),px,O),mx,k);case cx:return fw(fw(fw({},fx,b),px,x),mx,j);case ux:return fw(fw(fw({},fx,w),px,E),mx,P);default:return{}}},K=e.useMemo((function(){return Z(F)}),[F]),Q=gw($x(F,!t,(function(e){if(e===fx){var t=K[fx];return t?t(V()):Fx}var r;ee in K&&_((null===(r=K[ee])||void 0===r?void 0:r.call(K,V(),null))||null);return ee===mx&&F!==lx&&(X(V()),h>0&&(clearTimeout($.current),$.current=setTimeout((function(){U({deadline:!0})}),h))),ee===hx&&Y(),true})),2),J=Q[0],ee=Q[1],te=Hx(ee);q.current=te,Lx((function(){M(r);var e,n=H.current;H.current=!0,!n&&r&&p&&(e=sx),n&&r&&d&&(e=cx),(n&&!r&&y||!n&&v&&!r&&y)&&(e=ux);var o=Z(e);e&&(t||o[fx])?(A(e),J()):A(lx)}),[r]),a((function(){(F===sx&&!p||F===cx&&!d||F===ux&&!y)&&A(lx)}),[p,d,y]),a((function(){return function(){H.current=!1,clearTimeout($.current)}}),[]);var re=e.useRef(!1);a((function(){L&&(re.current=!0),void 0!==L&&F===lx&&((re.current||L)&&(null==z||z(L)),re.current=!0)}),[L,F]);var ne=B;return K[fx]&&ee===px&&(ne=mw({transition:"none"},ne)),[F,ee,ne,null!=L?L:r]}var qx=function(t){var r=t;"object"===uw(t)&&(r=t.transitionSupport);var n=e.forwardRef((function(t,n){var o=t.visible,i=void 0===o||o,a=t.removeOnLeave,l=void 0===a||a,c=t.forceRender,u=t.children,d=t.motionName,f=t.leavedClassName,p=t.eventProps,m=function(e,t){return!(!e.motionName||!r||!1===t)}(t,e.useContext(ox).motion),y=s(),h=s();var v=gw(Vx(m,i,(function(){try{return y.current instanceof HTMLElement?y.current:dO(h.current)}catch(e){return null}}),t),4),g=v[0],b=v[1],w=v[2],O=v[3],x=e.useRef(O);O&&(x.current=!0);var E,k=e.useCallback((function(e){y.current=e,Ww(n,e)}),[n]),j=mw(mw({},p),{},{visible:i});if(u)if(g===lx)E=O?u(mw({},j),k):!l&&x.current&&f?u(mw(mw({},j),{},{className:f}),k):c||!l&&!f?u(mw(mw({},j),{},{style:{display:"none"}}),k):null;else{var P;b===fx?P="prepare":Hx(b)?P="active":b===px&&(P="start");var N=Tx(d,"".concat(g,"-").concat(P));E=u(mw(mw({},j),{},{className:ng(Tx(d,g),fw(fw({},N,N&&P),d,"string"==typeof d)),style:w}),k)}else E=null;e.isValidElement(E)&&Fw(E)&&(E.ref||(E=e.cloneElement(E,{ref:k})));return e.createElement(ix,{ref:h},E)}));return n.displayName="CSSMotion",n}(Sx),Yx="add",Ux="keep",Gx="remove",Xx="removed";function Zx(e){var t;return mw(mw({},t=e&&"object"===uw(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function Kx(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(Zx)}var Qx=["component","children","onVisibleChanged","onAllRemoved"],Jx=["status"],eE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function tE(t){var r=t.prefixCls,n=t.align,o=t.arrow,i=t.arrowPos,a=o||{},l=a.className,s=a.content,c=i.x,u=void 0===c?0:c,d=i.y,f=void 0===d?0:d,p=e.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var y=n.points[0],h=n.points[1],v=y[0],g=y[1],b=h[0],w=h[1];v!==b&&["t","b"].includes(v)?"t"===v?m.top=0:m.bottom=0:m.top=f,g!==w&&["l","r"].includes(g)?"l"===g?m.left=0:m.right=0:m.left=u}return e.createElement("div",{ref:p,className:ng("".concat(r,"-arrow"),l),style:m},s)}function rE(t){var r=t.prefixCls,n=t.open,o=t.zIndex,i=t.mask,a=t.motion;return i?e.createElement(qx,cw({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(t){var n=t.className;return e.createElement("div",{style:{zIndex:o},className:ng("".concat(r,"-mask"),n)})})):null}!function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qx,n=function(){HO(n,e.Component);var t=YO(n);function n(){var e;WO(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return fw(qO(e=t.call.apply(t,[this].concat(o))),"state",{keyEntities:[]}),fw(qO(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:mw(mw({},e),{},{status:Xx})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==Xx})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return _O(n,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,l=o.onVisibleChanged;o.onAllRemoved;var s=yw(o,Qx),c=i||e.Fragment,u={};return eE.forEach((function(e){u[e]=s[e],delete s[e]})),delete s.keys,e.createElement(c,s,n.map((function(n,o){var i=n.status,s=yw(n,Jx),c=i===Yx||i===Ux;return e.createElement(r,cw({},u,{key:s.key,visible:c,eventProps:s,onVisibleChanged:function(e){null==l||l(e,{key:s.key}),e||t.removeKey(s.key)}}),(function(e,t){return a(mw(mw({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.keys,n=t.keyEntities,o=Kx(r),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,o=t.length,i=Kx(e),a=Kx(t);i.forEach((function(e){for(var t=!1,i=n;i<o;i+=1){var l=a[i];if(l.key===e.key){n<i&&(r=r.concat(a.slice(n,i).map((function(e){return mw(mw({},e),{},{status:Yx})}))),n=i),r.push(mw(mw({},l),{},{status:Ux})),n+=1,t=!0;break}}t||r.push(mw(mw({},e),{},{status:Gx}))})),n<o&&(r=r.concat(a.slice(n).map((function(e){return mw(mw({},e),{},{status:Yx})}))));var l={};return r.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||n!==Gx}))).forEach((function(t){t.key===e&&(t.status=Ux)}))})),r}(n,o);return{keyEntities:i.filter((function(e){var t=n.find((function(t){var r=t.key;return e.key===r}));return!t||t.status!==Xx||e.status!==Gx}))}}}]),n}();fw(n,"defaultProps",{component:"div"})}(Sx);var nE=e.memo((function(e){return e.children}),(function(e,t){return t.cache}));"production"!==process.env.NODE_ENV&&(nE.displayName="PopupContent");var oE=e.forwardRef((function(t,r){var n=t.popup,o=t.className,i=t.prefixCls,a=t.style,l=t.target,s=t.onVisibleChanged,c=t.open,u=t.keepDom,d=t.fresh,f=t.onClick,p=t.mask,m=t.arrow,y=t.arrowPos,h=t.align,v=t.motion,g=t.maskMotion,b=t.forceRender,w=t.getPopupContainer,O=t.autoDestroy,x=t.portal,E=t.zIndex,k=t.onMouseEnter,j=t.onMouseLeave,P=t.onPointerEnter,N=t.ready,S=t.offsetX,C=t.offsetY,z=t.offsetR,T=t.offsetB,L=t.onAlign,M=t.onPrepare,I=t.stretch,D=t.targetWidth,R=t.targetHeight,A="function"==typeof n?n():n,W=c||u,B=(null==w?void 0:w.length)>0,_=gw(e.useState(!w||!B),2),F=_[0],H=_[1];if(qw((function(){!F&&B&&l&&H(!0)}),[F,B,l]),!F)return null;var $="auto",V={left:"-1000vw",top:"-1000vh",right:$,bottom:$};if(N||!c){var q,Y=h.points,U=h.dynamicInset||(null===(q=h._experimental)||void 0===q?void 0:q.dynamicInset),G=U&&"r"===Y[0][1],X=U&&"b"===Y[0][0];G?(V.right=z,V.left=$):(V.left=S,V.right=$),X?(V.bottom=T,V.top=$):(V.top=C,V.bottom=$)}var Z={};return I&&(I.includes("height")&&R?Z.height=R:I.includes("minHeight")&&R&&(Z.minHeight=R),I.includes("width")&&D?Z.width=D:I.includes("minWidth")&&D&&(Z.minWidth=D)),c||(Z.pointerEvents="none"),e.createElement(x,{open:b||W,getContainer:w&&function(){return w(l)},autoDestroy:O},e.createElement(rE,{prefixCls:i,open:c,zIndex:E,mask:p,motion:g}),e.createElement(KO,{onResize:L,disabled:!c},(function(t){return e.createElement(qx,cw({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(i,"-hidden")},v,{onAppearPrepare:M,onEnterPrepare:M,visible:c,onVisibleChanged:function(e){var t;null==v||null===(t=v.onVisibleChanged)||void 0===t||t.call(v,e),s(e)}}),(function(n,l){var s=n.className,u=n.style,p=ng(i,s,o);return e.createElement("div",{ref:Bw(t,r,l),className:p,style:mw(mw(mw(mw({"--arrow-x":"".concat(y.x||0,"px"),"--arrow-y":"".concat(y.y||0,"px")},V),Z),u),{},{boxSizing:"border-box",zIndex:E},a),onMouseEnter:k,onMouseLeave:j,onPointerEnter:P,onClick:f},m&&e.createElement(tE,{prefixCls:i,arrow:m,arrowPos:y,align:h}),e.createElement(nE,{cache:!c&&!d},A))}))})))}));"production"!==process.env.NODE_ENV&&(oE.displayName="Popup");var iE=e.forwardRef((function(t,r){var n=t.children,o=t.getTriggerDOMNode,i=Fw(n),a=e.useCallback((function(e){Ww(r,o?o(e):e)}),[o]),l=_w(a,n.ref);return i?e.cloneElement(n,{ref:l}):n}));"production"!==process.env.NODE_ENV&&(iE.displayName="TriggerWrapper");var aE=e.createContext(null);function lE(e){return e?Array.isArray(e)?e:[e]:[]}function sE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function cE(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function uE(e){return e.ownerDocument.defaultView}function dE(e){for(var t=[],r=null==e?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=uE(r).getComputedStyle(r);[o.overflowX,o.overflowY,o.overflow].some((function(e){return n.includes(e)}))&&t.push(r),r=r.parentElement}return t}function fE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function pE(e){return fE(parseFloat(e),0)}function mE(e,t){var r=mw({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=uE(e).getComputedStyle(e),n=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,l=t.borderLeftWidth,s=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,p=e.clientWidth,m=pE(i),y=pE(a),h=pE(l),v=pE(s),g=fE(Math.round(c.width/f*1e3)/1e3),b=fE(Math.round(c.height/u*1e3)/1e3),w=(f-p-h-v)*g,O=(u-d-m-y)*b,x=m*b,E=y*b,k=h*g,j=v*g,P=0,N=0;if("clip"===n){var S=pE(o);P=S*g,N=S*b}var C=c.x+k-P,z=c.y+x-N,T=C+c.width+2*P-k-j-w,L=z+c.height+2*N-x-E-O;r.left=Math.max(r.left,C),r.top=Math.max(r.top,z),r.right=Math.min(r.right,T),r.bottom=Math.min(r.bottom,L)}})),r}function yE(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),r=t.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(t)}function hE(e,t){var r=gw(t||[],2),n=r[0],o=r[1];return[yE(e.width,n),yE(e.height,o)]}function vE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function gE(e,t){var r,n=t[0],o=t[1];return r="t"===n?e.y:"b"===n?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:r}}function bE(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,n){return n===t?r[e]||"c":e})).join("")}function wE(t,r,n,o,i,a,l){var s=gw(e.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),2),c=s[0],u=s[1],d=e.useRef(0),f=e.useMemo((function(){return r?dE(r):[]}),[r]),p=e.useRef({});t||(p.current={});var m=ex((function(){if(r&&n&&t){var e,s,c,d,m,y=r,h=y.ownerDocument,v=uE(y).getComputedStyle(y),g=v.width,b=v.height,w=v.position,O=y.style.left,x=y.style.top,E=y.style.right,k=y.style.bottom,j=y.style.overflow,P=mw(mw({},i[o]),a),N=h.createElement("div");if(null===(e=y.parentElement)||void 0===e||e.appendChild(N),N.style.left="".concat(y.offsetLeft,"px"),N.style.top="".concat(y.offsetTop,"px"),N.style.position=w,N.style.height="".concat(y.offsetHeight,"px"),N.style.width="".concat(y.offsetWidth,"px"),y.style.left="0",y.style.top="0",y.style.right="auto",y.style.bottom="auto",y.style.overflow="hidden",Array.isArray(n))m={x:n[0],y:n[1],width:0,height:0};else{var S,C,z=n.getBoundingClientRect();z.x=null!==(S=z.x)&&void 0!==S?S:z.left,z.y=null!==(C=z.y)&&void 0!==C?C:z.top,m={x:z.x,y:z.y,width:z.width,height:z.height}}var T=y.getBoundingClientRect();T.x=null!==(s=T.x)&&void 0!==s?s:T.left,T.y=null!==(c=T.y)&&void 0!==c?c:T.top;var L=h.documentElement,M=L.clientWidth,I=L.clientHeight,D=L.scrollWidth,R=L.scrollHeight,A=L.scrollTop,W=L.scrollLeft,B=T.height,_=T.width,F=m.height,H=m.width,$={left:0,top:0,right:M,bottom:I},V={left:-W,top:-A,right:D-W,bottom:R-A},q=P.htmlRegion,Y="visible",U="visibleFirst";"scroll"!==q&&q!==U&&(q=Y);var G=q===U,X=mE(V,f),Z=mE($,f),K=q===Y?Z:X,Q=G?Z:K;y.style.left="auto",y.style.top="auto",y.style.right="0",y.style.bottom="0";var J=y.getBoundingClientRect();y.style.left=O,y.style.top=x,y.style.right=E,y.style.bottom=k,y.style.overflow=j,null===(d=y.parentElement)||void 0===d||d.removeChild(N);var ee=fE(Math.round(_/parseFloat(g)*1e3)/1e3),te=fE(Math.round(B/parseFloat(b)*1e3)/1e3);if(0===ee||0===te||uO(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}(n))return;var re=P.offset,ne=P.targetOffset,oe=gw(hE(T,re),2),ie=oe[0],ae=oe[1],le=gw(hE(m,ne),2),se=le[0],ce=le[1];m.x-=se,m.y-=ce;var ue=gw(P.points||[],2),de=ue[0],fe=vE(ue[1]),pe=vE(de),me=gE(m,fe),ye=gE(T,pe),he=mw({},P),ve=me.x-ye.x+ie,ge=me.y-ye.y+ae;function dt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:K,n=T.x+e,o=T.y+t,i=n+_,a=o+B,l=Math.max(n,r.left),s=Math.max(o,r.top),c=Math.min(i,r.right),u=Math.min(a,r.bottom);return Math.max(0,(c-l)*(u-s))}var be,we,Oe,xe,Ee=dt(ve,ge),ke=dt(ve,ge,Z),je=gE(m,["t","l"]),Pe=gE(T,["t","l"]),Ne=gE(m,["b","r"]),Se=gE(T,["b","r"]),Ce=P.overflow||{},ze=Ce.adjustX,Te=Ce.adjustY,Le=Ce.shiftX,Me=Ce.shiftY,Ie=function(e){return"boolean"==typeof e?e:e>=0};function ft(){be=T.y+ge,we=be+B,Oe=T.x+ve,xe=Oe+_}ft();var De=Ie(Te),Re=pe[0]===fe[0];if(De&&"t"===pe[0]&&(we>Q.bottom||p.current.bt)){var Ae=ge;Re?Ae-=B-F:Ae=je.y-Se.y-ae;var We=dt(ve,Ae),Be=dt(ve,Ae,Z);We>Ee||We===Ee&&(!G||Be>=ke)?(p.current.bt=!0,ge=Ae,ae=-ae,he.points=[bE(pe,0),bE(fe,0)]):p.current.bt=!1}if(De&&"b"===pe[0]&&(be<Q.top||p.current.tb)){var _e=ge;Re?_e+=B-F:_e=Ne.y-Pe.y-ae;var Fe=dt(ve,_e),He=dt(ve,_e,Z);Fe>Ee||Fe===Ee&&(!G||He>=ke)?(p.current.tb=!0,ge=_e,ae=-ae,he.points=[bE(pe,0),bE(fe,0)]):p.current.tb=!1}var $e=Ie(ze),Ve=pe[1]===fe[1];if($e&&"l"===pe[1]&&(xe>Q.right||p.current.rl)){var qe=ve;Ve?qe-=_-H:qe=je.x-Se.x-ie;var Ye=dt(qe,ge),Ue=dt(qe,ge,Z);Ye>Ee||Ye===Ee&&(!G||Ue>=ke)?(p.current.rl=!0,ve=qe,ie=-ie,he.points=[bE(pe,1),bE(fe,1)]):p.current.rl=!1}if($e&&"r"===pe[1]&&(Oe<Q.left||p.current.lr)){var Ge=ve;Ve?Ge+=_-H:Ge=Ne.x-Pe.x-ie;var Xe=dt(Ge,ge),Ze=dt(Ge,ge,Z);Xe>Ee||Xe===Ee&&(!G||Ze>=ke)?(p.current.lr=!0,ve=Ge,ie=-ie,he.points=[bE(pe,1),bE(fe,1)]):p.current.lr=!1}ft();var Ke=!0===Le?0:Le;"number"==typeof Ke&&(Oe<Z.left&&(ve-=Oe-Z.left-ie,m.x+H<Z.left+Ke&&(ve+=m.x-Z.left+H-Ke)),xe>Z.right&&(ve-=xe-Z.right-ie,m.x>Z.right-Ke&&(ve+=m.x-Z.right+Ke)));var Qe=!0===Me?0:Me;"number"==typeof Qe&&(be<Z.top&&(ge-=be-Z.top-ae,m.y+F<Z.top+Qe&&(ge+=m.y-Z.top+F-Qe)),we>Z.bottom&&(ge-=we-Z.bottom-ae,m.y>Z.bottom-Qe&&(ge+=m.y-Z.bottom+Qe)));var Je=T.x+ve,et=Je+_,tt=T.y+ge,rt=tt+B,nt=m.x,ot=nt+H,it=m.y,at=it+F,lt=(Math.max(Je,nt)+Math.min(et,ot))/2-Je,st=(Math.max(tt,it)+Math.min(rt,at))/2-tt;null==l||l(r,he);var ct=J.right-T.x-(ve+T.width),ut=J.bottom-T.y-(ge+T.height);1===ee&&(ve=Math.round(ve),ct=Math.round(ct)),1===te&&(ge=Math.round(ge),ut=Math.round(ut)),u({ready:!0,offsetX:ve/ee,offsetY:ge/te,offsetR:ct/ee,offsetB:ut/te,arrowX:lt/ee,arrowY:st/te,scaleX:ee,scaleY:te,align:he})}})),y=function(){u((function(e){return mw(mw({},e),{},{ready:!1})}))};return qw(y,[o]),qw((function(){t||y()}),[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,function(){d.current+=1;var e=d.current;Promise.resolve().then((function(){d.current===e&&m()}))}]}var OE=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];var xE=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sO,r=e.forwardRef((function(r,n){var o=r.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=r.children,l=r.action,s=void 0===l?"hover":l,c=r.showAction,u=r.hideAction,d=r.popupVisible,f=r.defaultPopupVisible,p=r.onPopupVisibleChange,m=r.afterPopupVisibleChange,y=r.mouseEnterDelay,h=r.mouseLeaveDelay,v=void 0===h?.1:h,g=r.focusDelay,b=r.blurDelay,w=r.mask,O=r.maskClosable,x=void 0===O||O,E=r.getPopupContainer,k=r.forceRender,j=r.autoDestroy,P=r.destroyPopupOnHide,N=r.popup,S=r.popupClassName,C=r.popupStyle,z=r.popupPlacement,T=r.builtinPlacements,L=void 0===T?{}:T,M=r.popupAlign,I=r.zIndex,D=r.stretch,R=r.getPopupClassNameFromAlign,A=r.fresh,W=r.alignPoint,B=r.onPopupClick,_=r.onPopupAlign,F=r.arrow,H=r.popupMotion,$=r.maskMotion,V=r.popupTransitionName,q=r.popupAnimation,Y=r.maskTransitionName,U=r.maskAnimation,G=r.className,X=r.getTriggerDOMNode,Z=yw(r,OE),K=j||P||!1,Q=gw(e.useState(!1),2),J=Q[0],ee=Q[1];qw((function(){ee(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())}),[]);var te=e.useRef({}),re=e.useContext(aE),ne=e.useMemo((function(){return{registerSubPopup:function(e,t){te.current[e]=t,null==re||re.registerSubPopup(e,t)}}}),[re]),oe=nx(),ie=gw(e.useState(null),2),ae=ie[0],le=ie[1],se=e.useRef(null),ce=ex((function(e){se.current=e,uO(e)&&ae!==e&&le(e),null==re||re.registerSubPopup(oe,e)})),ue=gw(e.useState(null),2),de=ue[0],fe=ue[1],pe=e.useRef(null),me=ex((function(e){uO(e)&&de!==e&&(fe(e),pe.current=e)})),ye=e.Children.only(a),he=(null==ye?void 0:ye.props)||{},ve={},ge=ex((function(e){var t,r,n=de;return(null==n?void 0:n.contains(e))||(null===(t=JO(n))||void 0===t?void 0:t.host)===e||e===n||(null==ae?void 0:ae.contains(e))||(null===(r=JO(ae))||void 0===r?void 0:r.host)===e||e===ae||Object.values(te.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),be=cE(i,H,q,V),we=cE(i,$,U,Y),Oe=gw(e.useState(f||!1),2),xe=Oe[0],Ee=Oe[1],ke=null!=d?d:xe,je=ex((function(e){void 0===d&&Ee(e)}));qw((function(){Ee(d||!1)}),[d]);var Pe=e.useRef(ke);Pe.current=ke;var Ne=e.useRef([]);Ne.current=[];var Se=ex((function(e){var t;je(e),(null!==(t=Ne.current[Ne.current.length-1])&&void 0!==t?t:ke)!==e&&(Ne.current.push(e),null==p||p(e))})),Ce=e.useRef(),ze=function(){clearTimeout(Ce.current)},Te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;ze(),0===t?Se(e):Ce.current=setTimeout((function(){Se(e)}),1e3*t)};e.useEffect((function(){return ze}),[]);var Le=gw(e.useState(!1),2),Me=Le[0],Ie=Le[1];qw((function(e){e&&!ke||Ie(!0)}),[ke]);var De=gw(e.useState(null),2),Re=De[0],Ae=De[1],We=gw(e.useState(null),2),Be=We[0],_e=We[1],Fe=function(e){_e([e.clientX,e.clientY])},He=gw(wE(ke,ae,W&&null!==Be?Be:de,z,L,M,_),11),$e=He[0],Ve=He[1],qe=He[2],Ye=He[3],Ue=He[4],Ge=He[5],Xe=He[6],Ze=He[7],Ke=He[8],Qe=He[9],Je=He[10],et=function(t,r,n,o){return e.useMemo((function(){var e=lE(null!=n?n:r),i=lE(null!=o?o:r),a=new Set(e),l=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[a,l]}),[t,r,n,o])}(J,s,c,u),tt=gw(et,2),rt=tt[0],nt=tt[1],ot=rt.has("click"),it=nt.has("click")||nt.has("contextMenu"),at=ex((function(){Me||Je()}));!function(e,t,r,n,o){qw((function(){if(e&&t&&r){var i=r,a=dE(t),l=dE(i),s=uE(i),c=new Set([s].concat($w(a),$w(l)));function u(){n(),o()}return c.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),s.addEventListener("resize",u,{passive:!0}),n(),function(){c.forEach((function(e){e.removeEventListener("scroll",u),s.removeEventListener("resize",u)}))}}}),[e,t,r])}(ke,de,ae,at,(function(){Pe.current&&W&&it&&Te(!1)})),qw((function(){at()}),[Be,z]),qw((function(){!ke||null!=L&&L[z]||at()}),[JSON.stringify(M)]);var lt=e.useMemo((function(){var e=function(e,t,r,n){for(var o=r.points,i=Object.keys(e),a=0;a<i.length;a+=1){var l,s=i[a];if(sE(null===(l=e[s])||void 0===l?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(s)}return""}(L,i,Qe,W);return ng(e,null==R?void 0:R(Qe))}),[Qe,R,L,i,W]);e.useImperativeHandle(n,(function(){return{nativeElement:pe.current,popupElement:se.current,forceAlign:at}}));var st=gw(e.useState(0),2),ct=st[0],ut=st[1],dt=gw(e.useState(0),2),ft=dt[0],pt=dt[1],mt=function(){if(D&&de){var e=de.getBoundingClientRect();ut(e.width),pt(e.height)}};function yt(e,t,r,n){ve[e]=function(o){var i;null==n||n(o),Te(t,r);for(var a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];null===(i=he[e])||void 0===i||i.call.apply(i,[he,o].concat(l))}}qw((function(){Re&&(Je(),Re(),Ae(null))}),[Re]),(ot||it)&&(ve.onClick=function(e){var t;Pe.current&&it?Te(!1):!Pe.current&&ot&&(Fe(e),Te(!0));for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=he.onClick)||void 0===t||t.call.apply(t,[he,e].concat(n))}),function(t,r,n,o,i,a,l,s){var c=e.useRef(t);c.current=t,e.useEffect((function(){if(r&&o&&(!i||a)){var e=function(e){var t;c.current&&!l((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)&&s(!1)},t=uE(o);t.addEventListener("mousedown",e,!0),t.addEventListener("contextmenu",e,!0);var u,d,f=JO(n);return f&&(f.addEventListener("mousedown",e,!0),f.addEventListener("contextmenu",e,!0)),"production"!==process.env.NODE_ENV&&xw((null==n||null===(u=n.getRootNode)||void 0===u?void 0:u.call(n))===(null===(d=o.getRootNode)||void 0===d?void 0:d.call(o)),"trigger element and popup element should in same shadow root."),function(){t.removeEventListener("mousedown",e,!0),t.removeEventListener("contextmenu",e,!0),f&&(f.removeEventListener("mousedown",e,!0),f.removeEventListener("contextmenu",e,!0))}}}),[r,n,o,i,a])}(ke,it,de,ae,w,x,ge,Te);var ht,vt,gt=rt.has("hover"),bt=nt.has("hover");gt&&(yt("onMouseEnter",!0,y,(function(e){Fe(e)})),yt("onPointerEnter",!0,y,(function(e){Fe(e)})),ht=function(e){(ke||Me)&&null!=ae&&ae.contains(e.target)&&Te(!0,y)},W&&(ve.onMouseMove=function(e){var t;null===(t=he.onMouseMove)||void 0===t||t.call(he,e)})),bt&&(yt("onMouseLeave",!1,v),yt("onPointerLeave",!1,v),vt=function(){Te(!1,v)}),rt.has("focus")&&yt("onFocus",!0,g),nt.has("focus")&&yt("onBlur",!1,b),rt.has("contextMenu")&&(ve.onContextMenu=function(e){var t;Pe.current&&nt.has("contextMenu")?Te(!1):(Fe(e),Te(!0)),e.preventDefault();for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];null===(t=he.onContextMenu)||void 0===t||t.call.apply(t,[he,e].concat(n))}),G&&(ve.className=ng(he.className,G));var wt=mw(mw({},he),ve),Ot={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){Z[e]&&(Ot[e]=function(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null===(t=wt[e])||void 0===t||t.call.apply(t,[wt].concat(n)),Z[e].apply(Z,n)})}));var xt=e.cloneElement(ye,mw(mw({},wt),Ot)),Et={x:Ge,y:Xe},kt=F?mw({},!0!==F?F:{}):null;return e.createElement(e.Fragment,null,e.createElement(KO,{disabled:!ke,ref:me,onResize:function(){mt(),at()}},e.createElement(iE,{getTriggerDOMNode:X},xt)),e.createElement(aE.Provider,{value:ne},e.createElement(oE,{portal:t,ref:ce,prefixCls:i,popup:N,className:ng(S,lt),style:C,target:de,onMouseEnter:ht,onMouseLeave:vt,onPointerEnter:ht,zIndex:I,open:ke,keepDom:Me,fresh:A,onClick:B,mask:w,motion:be,maskMotion:we,onVisibleChanged:function(e){Ie(!1),Je(),null==m||m(e)},onPrepare:function(){return new Promise((function(e){mt(),Ae((function(){return e}))}))},forceRender:k,autoDestroy:K,getPopupContainer:E,align:Qe,arrow:kt,arrowPos:Et,ready:$e,offsetX:Ve,offsetY:qe,offsetR:Ye,offsetB:Ue,onAlign:at,stretch:D,targetWidth:ct/Ze,targetHeight:ft/Ke})))}));return"production"!==process.env.NODE_ENV&&(r.displayName="Trigger"),r}(sO),EE={shiftX:64,adjustY:1},kE={adjustX:1,shiftY:!0},jE=[0,0],PE={left:{points:["cr","cl"],overflow:kE,offset:[-4,0],targetOffset:jE},right:{points:["cl","cr"],overflow:kE,offset:[4,0],targetOffset:jE},top:{points:["bc","tc"],overflow:EE,offset:[0,-4],targetOffset:jE},bottom:{points:["tc","bc"],overflow:EE,offset:[0,4],targetOffset:jE},topLeft:{points:["bl","tl"],overflow:EE,offset:[0,-4],targetOffset:jE},leftTop:{points:["tr","tl"],overflow:kE,offset:[-4,0],targetOffset:jE},topRight:{points:["br","tr"],overflow:EE,offset:[0,-4],targetOffset:jE},rightTop:{points:["tl","tr"],overflow:kE,offset:[4,0],targetOffset:jE},bottomRight:{points:["tr","br"],overflow:EE,offset:[0,4],targetOffset:jE},rightBottom:{points:["bl","br"],overflow:kE,offset:[4,0],targetOffset:jE},bottomLeft:{points:["tl","bl"],overflow:EE,offset:[0,4],targetOffset:jE},leftBottom:{points:["br","bl"],overflow:kE,offset:[-4,0],targetOffset:jE}},NE=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],SE=function(t,r){var n=t.overlayClassName,o=t.trigger,i=void 0===o?["hover"]:o,a=t.mouseEnterDelay,l=void 0===a?0:a,c=t.mouseLeaveDelay,u=void 0===c?.1:c,d=t.overlayStyle,f=t.prefixCls,m=void 0===f?"rc-tooltip":f,y=t.children,h=t.onVisibleChange,v=t.afterVisibleChange,g=t.transitionName,b=t.animation,w=t.motion,O=t.placement,x=void 0===O?"right":O,E=t.align,k=void 0===E?{}:E,j=t.destroyTooltipOnHide,P=void 0!==j&&j,N=t.defaultVisible,S=t.getTooltipContainer,C=t.overlayInnerStyle;t.arrowContent;var z=t.overlay,T=t.id,L=t.showArrow,M=void 0===L||L,I=t.classNames,D=t.styles,R=yw(t,NE),A=nx(T),W=s(null);p(r,(function(){return W.current}));var B=mw({},R);"visible"in t&&(B.popupVisible=t.visible);var _,F;return e.createElement(xE,cw({popupClassName:ng(n,null==I?void 0:I.root),prefixCls:m,popup:function(){return e.createElement(sw,{key:"content",prefixCls:m,id:A,bodyClassName:null==I?void 0:I.body,overlayInnerStyle:mw(mw({},C),null==D?void 0:D.body)},z)},action:i,builtinPlacements:PE,popupPlacement:x,ref:W,popupAlign:k,getPopupContainer:S,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:b,popupMotion:w,defaultPopupVisible:N,autoDestroy:P,mouseLeaveDelay:u,popupStyle:mw(mw({},d),null==D?void 0:D.root),mouseEnterDelay:l,arrow:M},B),(_=e.Children.only(y),F=mw(mw({},(null==_?void 0:_.props)||{}),{},{"aria-describedby":z?A:null}),e.cloneElement(y,F)))},CE=r(SE);const zE=({title:e,description:r,footer:n,dataTestId:o,variant:i="default"})=>{const a=Boolean(r||n);return t.createElement("div",{"data-test-id":o,className:De("overflow-hidden break-words rounded-lg","border shadow-md backdrop-blur-sm","transition-all duration-150 animate-in fade-in zoom-in-95",a?"py-3 px-4":"py-2 px-3",{"bg-popover border-border":"default"===i,"bg-destructive border-destructive/20 text-destructive-foreground":"destructive"===i,"bg-muted border-muted/20":"muted"===i})},t.createElement("div",{className:De("flex items-center",!a&&"justify-center")},t.createElement(ug,{fontWeight:"bold",variant:a?"regular":"small",className:De({"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},e)),r&&t.createElement("div",{className:"mt-1.5"},t.createElement(ug,{variant:"small",className:De("opacity-90",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},r)),n&&t.createElement("div",{className:De("mt-3",a&&"pt-2",{"border-t border-border/40":"default"===i,"border-t border-destructive/20":"destructive"===i,"border-t border-muted-foreground/20":"muted"===i})},"string"==typeof n?t.createElement(ug,{variant:"small",className:De("opacity-75",{"text-foreground":"default"===i,"text-destructive-foreground":"destructive"===i,"text-muted-foreground":"muted"===i})},n):n))},TE=({overlay:e,title:r,description:n,footer:o,children:i,trigger:a="hover",mouseEnterDelay:s=.1,mouseLeaveDelay:c=.1,placement:u="top",variant:d="default",className:f,...p})=>{const m=l((()=>"function"==typeof e?e():e?t.createElement(t.Fragment,null,e):t.createElement(zE,{title:r,description:n,footer:o,variant:d,dataTestId:p.dataTestId})),[n,o,e,r,d,p.dataTestId]);return r||n||e?t.createElement(CE,{overlay:m,trigger:a,mouseEnterDelay:s,mouseLeaveDelay:c,placement:u,destroyTooltipOnHide:!0,overlayClassName:De("max-w-xs z-50",f),...p},t.createElement("span",{className:"inline-flex"},i)):i||null};function LE(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var ME=["color"],IE=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,ME);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),DE=["color"],RE=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,DE);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),AE=["color"],WE=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,AE);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),BE=["color"],_E=r((function(e,t){var r=e.color,o=void 0===r?"currentColor":r,i=LE(e,BE);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),n("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));const FE=6048e5,HE=Symbol.for("constructDateFrom");function $E(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&HE in e?e[HE](t):e instanceof Date?new e.constructor(t):new Date(t)}function VE(e,t){return $E(t||e,e)}function qE(e,t,r){const n=VE(e,r?.in);return isNaN(t)?$E(r?.in||e,NaN):t?(n.setDate(n.getDate()+t),n):n}function YE(e,t,r){const n=VE(e,r?.in);if(isNaN(t))return $E(r?.in||e,NaN);if(!t)return n;const o=n.getDate(),i=$E(r?.in||e,n.getTime());i.setMonth(n.getMonth()+t+1,0);return o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}let UE={};function GE(){return UE}function XE(e,t){const r=GE(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=VE(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function ZE(e,t){return XE(e,{...t,weekStartsOn:1})}function KE(e,t){const r=VE(e,t?.in),n=r.getFullYear(),o=$E(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const i=ZE(o),a=$E(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=ZE(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function QE(e){const t=VE(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function JE(e,...t){const r=$E.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(r)}function ek(e,t){const r=VE(e,t?.in);return r.setHours(0,0,0,0),r}function tk(e,t,r){const[n,o]=JE(r?.in,e,t),i=ek(n),a=ek(o),l=+i-QE(i),s=+a-QE(a);return Math.round((l-s)/864e5)}function rk(e,t,r){return qE(e,7*t,r)}function nk(e,t,r){return YE(e,12*t,r)}function ok(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=$E.bind(null,e));const t=VE(e,n);(!r||r<t||isNaN(+t))&&(r=t)})),$E(n,r||NaN)}function ik(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=$E.bind(null,e));const t=VE(e,n);(!r||r>t||isNaN(+t))&&(r=t)})),$E(n,r||NaN)}function ak(e,t,r){const[n,o]=JE(r?.in,e,t);return+ek(n)==+ek(o)}function lk(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function sk(e,t,r){const[n,o]=JE(r?.in,e,t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}function ck(e,t){const r=VE(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function uk(e,t){const r=VE(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function dk(e,t){const r=VE(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function fk(e,t){const r=GE(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=VE(e,t?.in),i=o.getDay(),a=6+(i<n?-7:0)-(i-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function pk(e,t){return fk(e,{...t,weekStartsOn:1})}const mk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function yk(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const hk={date:yk({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yk({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:yk({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},vk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function gk(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=r?.width?String(r.width):t;n=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=r?.width?String(r.width):e.defaultWidth;n=e.values[o]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const bk={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:gk({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:gk({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:gk({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:gk({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:gk({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function wk(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(l,(e=>e.test(a))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(l,(e=>e.test(a)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}const Ok={ordinalNumber:(xk={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(xk.matchPattern);if(!r)return null;const n=r[0],o=e.match(xk.parsePattern);if(!o)return null;let i=xk.valueCallback?xk.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(n.length)}}),era:wk({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:wk({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:wk({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:wk({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:wk({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var xk;const Ek={code:"en-US",formatDistance:(e,t,r)=>{let n;const o=mk[e];return n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:hk,formatRelative:(e,t,r,n)=>vk[e],localize:bk,match:Ok,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kk(e,t){const r=VE(e,t?.in),n=+ZE(r)-+function(e,t){const r=KE(e,t),n=$E(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ZE(n)}(r);return Math.round(n/FE)+1}function jk(e,t){const r=VE(e,t?.in),n=r.getFullYear(),o=GE(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=$E(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const l=XE(a,t),s=$E(t?.in||e,0);s.setFullYear(n,0,i),s.setHours(0,0,0,0);const c=XE(s,t);return+r>=+l?n+1:+r>=+c?n:n-1}function Pk(e,t){const r=VE(e,t?.in),n=+XE(r,t)-+function(e,t){const r=GE(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=jk(e,t),i=$E(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),XE(i,t)}(r,t);return Math.round(n/FE)+1}function Nk(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Sk={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Nk("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):Nk(r+1,2)},d:(e,t)=>Nk(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>Nk(e.getHours()%12||12,t.length),H:(e,t)=>Nk(e.getHours(),t.length),m:(e,t)=>Nk(e.getMinutes(),t.length),s:(e,t)=>Nk(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return Nk(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Ck="midnight",zk="noon",Tk="morning",Lk="afternoon",Mk="evening",Ik="night",Dk={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return Sk.y(e,t)},Y:function(e,t,r,n){const o=jk(e,n),i=o>0?o:1-o;if("YY"===t){return Nk(i%100,2)}return"Yo"===t?r.ordinalNumber(i,{unit:"year"}):Nk(i,t.length)},R:function(e,t){return Nk(KE(e),t.length)},u:function(e,t){return Nk(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Nk(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Nk(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Sk.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Nk(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=Pk(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):Nk(o,t.length)},I:function(e,t,r){const n=kk(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Nk(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):Sk.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=VE(e,t?.in);return tk(r,dk(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Nk(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Nk(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Nk(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return Nk(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(o=12===n?zk:0===n?Ck:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(o=n>=17?Mk:n>=12?Lk:n>=4?Tk:Ik,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return Sk.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):Sk.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Nk(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Nk(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sk.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Sk.s(e,t)},S:function(e,t){return Sk.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Ak(n);case"XXXX":case"XX":return Wk(n);default:return Wk(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Ak(n);case"xxxx":case"xx":return Wk(n);default:return Wk(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Rk(n,":");default:return"GMT"+Wk(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Rk(n,":");default:return"GMT"+Wk(n,":")}},t:function(e,t,r){return Nk(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return Nk(+e,t.length)}};function Rk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return 0===i?r+String(o):r+String(o)+t+Nk(i,2)}function Ak(e,t){if(e%60==0){return(e>0?"-":"+")+Nk(Math.abs(e)/60,2)}return Wk(e,t)}function Wk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+Nk(Math.trunc(n/60),2)+t+Nk(n%60,2)}const Bk=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},_k=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Fk={p:_k,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Bk(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Bk(n,t)).replace("{{time}}",_k(o,t))}},Hk=/^D+$/,$k=/^Y+$/,Vk=["D","DD","YY","YYYY"];const qk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Uk=/^'([^]*?)'?$/,Gk=/''/g,Xk=/[a-zA-Z]/;function Zk(e,t,r){const n=GE(),o=r?.locale??n.locale??Ek,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=VE(e,r?.in);if(!function(e){return!(!lk(e)&&"number"!=typeof e||isNaN(+VE(e)))}(l))throw new RangeError("Invalid time value");let s=t.match(Yk).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Fk[t])(e,o.formatLong)}return e})).join("").match(qk).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Kk(e)};if(Dk[t])return{isToken:!0,value:e};if(t.match(Xk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return s.map((n=>{if(!n.isToken)return n.value;const i=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return $k.test(e)}(i)||!r?.useAdditionalDayOfYearTokens&&function(e){return Hk.test(e)}(i))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Vk.includes(e))throw new RangeError(n)}(i,t,String(e));return(0,Dk[i[0]])(l,i,o.localize,c)})).join("")}function Kk(e){const t=e.match(Uk);return t?t[1].replace(Gk,"'"):e}function Qk(e,t){const r=VE(e,t?.in);return function(e,t,r){const[n,o]=JE(r?.in,e,t),i=XE(n,r),a=XE(o,r),l=+i-QE(i),s=+a-QE(a);return Math.round((l-s)/FE)}(function(e,t){const r=VE(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),VE(r,t?.in)}(r,t),uk(r,t),t)+1}function Jk(e,t){return+VE(e)>+VE(t)}function ej(e,t){return+VE(e)<+VE(t)}function tj(e,t,r){const[n,o]=JE(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function rj(e,t,r){return qE(e,-t,r)}function nj(e,t,r){const n=VE(e,r?.in),o=n.getFullYear(),i=n.getDate(),a=$E(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=function(e,t){const r=VE(e,t?.in),n=r.getFullYear(),o=r.getMonth(),i=$E(r,0);return i.setFullYear(n,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return n.setMonth(t,Math.min(i,l)),n}function oj(e,t,r){const n=VE(e,r?.in);return isNaN(+n)?$E(e,NaN):(n.setFullYear(t),n)}var ij=function(){return ij=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ij.apply(this,arguments)};function aj(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function lj(e){return"multiple"===e.mode}function sj(e){return"range"===e.mode}function cj(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var uj={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var dj=Object.freeze({__proto__:null,formatCaption:function(e,t){return Zk(e,"LLLL y",t)},formatDay:function(e,t){return Zk(e,"d",t)},formatMonthCaption:function(e,t){return Zk(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Zk(e,"cccccc",t)},formatYearCaption:function(e,t){return Zk(e,"yyyy",t)}}),fj=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Zk(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Zk(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var pj=m(void 0);function mj(e){var t,r,n=e.initialProps,o=function(){var e=uj,t=Ek,r=new Date;return{captionLayout:"buttons",classNames:e,formatters:dj,labels:fj,locale:t,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:r,mode:"default"}}(),i=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=uk(n):t&&(i=new Date(t,0,1)),o?a=ck(o):r&&(a=new Date(r,11,31)),{fromDate:i?ek(i):void 0,toDate:a?ek(a):void 0}}(n),a=i.fromDate,l=i.toDate,s=null!==(t=n.captionLayout)&&void 0!==t?t:o.captionLayout;"buttons"===s||a&&l||(s="buttons"),(cj(n)||lj(n)||sj(n))&&(r=n.onSelect);var c=ij(ij(ij({},o),n),{captionLayout:s,classNames:ij(ij({},o.classNames),n.classNames),components:ij({},n.components),formatters:ij(ij({},o.formatters),n.formatters),fromDate:a,labels:ij(ij({},o.labels),n.labels),mode:n.mode||o.mode,modifiers:ij(ij({},o.modifiers),n.modifiers),modifiersClassNames:ij(ij({},o.modifiersClassNames),n.modifiersClassNames),onSelect:r,styles:ij(ij({},o.styles),n.styles),toDate:l});return g(pj.Provider,{value:c,children:e.children})}function yj(){var e=y(pj);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function hj(e){var t=yj(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return g("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function vj(e){return g("svg",ij({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:g("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function gj(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=yj(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:vj;return w("div",{className:l,style:s,children:[g("span",{className:c.classNames.vhidden,children:e["aria-label"]}),g("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),w("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,g(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function bj(e){var t,r=yj(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return g(b,{});if(!o)return g(b,{});var d=[];if(function(e,t,r){const[n,o]=JE(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var f=uk(n),p=n.getMonth();p<=o.getMonth();p++)d.push(nj(f,p));else for(f=uk(new Date),p=0;p<=11;p++)d.push(nj(f,p));var m=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:gj;return g(m,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=nj(uk(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:d.map((function(e){return g("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function wj(e){var t,r=e.displayMonth,n=yj(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,d=n.labels.labelYearDropdown,f=[];if(!o)return g(b,{});if(!i)return g(b,{});for(var p=o.getFullYear(),m=i.getFullYear(),y=p;y<=m;y++)f.push(oj(dk(new Date),y));var h=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:gj;return g(h,{name:"years","aria-label":d(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=oj(uk(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:f.map((function(e){return g("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function Oj(){var e=yj(),t=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&sk(i,o)<0&&(o=YE(i,-1*(s-1))),a&&sk(o,a)<0&&(o=a),uk(o)}(e),r=function(e,t){var r=i(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=uk(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var xj=m(void 0);function Ej(e){var t=yj(),r=Oj(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=uk(e),i=sk(uk(YE(o,n)),o),a=[],l=0;l<i;l++){var s=YE(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=uk(e);if(!r)return YE(l,a);if(!(sk(r,e)<i))return YE(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=uk(e);if(!r)return YE(a,-i);if(!(sk(a,r)<=0))return YE(a,-i)}}(n,t),s=function(e){return i.some((function(t){return tj(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&ej(e,r)?o(YE(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return g(xj.Provider,{value:c,children:e.children})}function kj(){var e=y(xj);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function jj(e){var t,r=yj(),n=r.classNames,o=r.styles,i=r.components,a=kj().goToMonth,l=function(t){a(YE(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:hj,c=g(s,{id:e.id,displayMonth:e.displayMonth});return w("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[g("div",{className:n.vhidden,children:c}),g(bj,{onChange:l,displayMonth:e.displayMonth}),g(wj,{onChange:l,displayMonth:e.displayMonth})]})}function Pj(e){return g("svg",ij({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:g("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Nj(e){return g("svg",ij({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:g("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Sj=r((function(e,t){var r=yj(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=ij(ij({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),g("button",ij({},e,{ref:t,type:"button",className:a,style:l}))}));function Cj(e){var t,r,n=yj(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,d=n.components;if(!e.nextMonth&&!e.previousMonth)return g(b,{});var f=c(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),m=u(e.nextMonth,{locale:i}),y=[a.nav_button,a.nav_button_next].join(" "),h=null!==(t=null==d?void 0:d.IconRight)&&void 0!==t?t:Nj,v=null!==(r=null==d?void 0:d.IconLeft)&&void 0!==r?r:Pj;return w("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&g(Sj,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:g("rtl"===o?h:v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&g(Sj,{name:"next-month","aria-label":m,className:y,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:g("rtl"===o?v:h,{className:a.nav_icon,style:l.nav_icon})})]})}function zj(e){var t=yj().numberOfMonths,r=kj(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return tj(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),d=t>1&&(c||!s);return g(Cj,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:d,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function Tj(e){var t,r,n=yj(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:hj;return r=i?g(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?g(jj,{displayMonth:e.displayMonth,id:e.id}):w(b,"dropdown-buttons"===l?{children:[g(jj,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),g(zj,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[g(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),g(zj,{displayMonth:e.displayMonth,id:e.id})]}),g("div",{className:o.caption,style:a.caption,children:r})}function Lj(e){var t=yj(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?g("tfoot",{className:o,style:n.tfoot,children:g("tr",{children:g("td",{colSpan:8,children:r})})}):g(b,{})}function Mj(){var e=yj(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?ZE(new Date):XE(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=qE(n,i);o.push(a)}return o}(o,i,a);return w("tr",{style:r.head_row,className:t.head_row,children:[n&&g("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return g("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)}))]})}function Ij(){var e,t=yj(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Mj;return g("thead",{style:n.head,className:r.head,children:g(i,{})})}function Dj(e){var t=yj(),r=t.locale,n=t.formatters.formatDay;return g(b,{children:n(e.date,{locale:r})})}var Rj=m(void 0);function Aj(e){if(!lj(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return g(Rj.Provider,{value:t,children:e.children})}return g(Wj,{initialProps:e.initialProps,children:e.children})}function Wj(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push((function(e){var t=i&&n.length>i-1,r=n.some((function(t){return ak(t,e)}));return Boolean(t&&!r)}));var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?aj([],n):[];if(r.selected){var u=c.findIndex((function(t){return ak(e,t)}));c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return g(Rj.Provider,{value:l,children:r})}function Bj(){var e=y(Rj);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var _j,Fj=m(void 0);function Hj(e){if(!sj(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return g(Fj.Provider,{value:t,children:e.children})}return g($j,{initialProps:e.initialProps,children:e.children})}function $j(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],ak(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:rj(i,l-1),before:qE(i,l-1)}),i&&a&&c.disabled.push({after:i,before:qE(i,l-1)}),!i&&a&&c.disabled.push({after:rj(a,l-1),before:qE(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:qE(i,1-s)}),c.disabled.push({after:qE(i,s-1)})),i&&a){var u=s-(tk(a,i)+1);c.disabled.push({before:rj(i,u)}),c.disabled.push({after:qE(a,u)})}!i&&a&&(c.disabled.push({before:qE(a,1-s)}),c.disabled.push({after:qE(a,s-1)}))}return g(Fj.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(ak(o,e)&&ak(n,e))return;if(ak(o,e))return{from:o,to:void 0};if(ak(n,e))return;return Jk(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Jk(e,o)?{from:o,to:e}:{from:e,to:o}:n?ej(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function Vj(){var e=y(Fj);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function qj(e){return Array.isArray(e)?aj([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(_j||(_j={}));var Yj=_j.Selected,Uj=_j.Disabled,Gj=_j.Hidden,Xj=_j.Today,Zj=_j.RangeEnd,Kj=_j.RangeMiddle,Qj=_j.RangeStart,Jj=_j.Outside;var eP=m(void 0);function tP(e){var t=yj(),r=function(e,t,r){var n,o=((n={})[Yj]=qj(e.selected),n[Uj]=qj(e.disabled),n[Gj]=qj(e.hidden),n[Xj]=[e.today],n[Zj]=[],n[Kj]=[],n[Qj]=[],n[Jj]=[],n);return e.fromDate&&o[Uj].push({before:e.fromDate}),e.toDate&&o[Uj].push({after:e.toDate}),lj(e)?o[Uj]=o[Uj].concat(t.modifiers[Uj]):sj(e)&&(o[Uj]=o[Uj].concat(r.modifiers[Uj]),o[Qj]=r.modifiers[Qj],o[Kj]=r.modifiers[Kj],o[Zj]=r.modifiers[Zj]),o}(t,Bj(),Vj()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=qj(n)})),t}(t.modifiers),o=ij(ij({},r),n);return g(eP.Provider,{value:o,children:e.children})}function rP(){var e=y(eP);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function nP(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(lk(t))return ak(e,t);if(function(e){return Array.isArray(e)&&e.every(lk)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(tk(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),tk(e,n)>=0&&tk(o,e)>=0):o?ak(o,e):!!n&&ak(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=tk(t.before,e)>0,n=tk(t.after,e)<0;return Jk(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?tk(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?tk(t.before,e)>0:"function"==typeof t&&t(e)}))}function oP(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return nP(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!tj(e,r)&&(o.outside=!0),o}function iP(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,d=o.locale,f={day:qE,week:rk,month:YE,year:nk,startOfWeek:function(e){return o.ISOWeek?ZE(e):XE(e,{locale:d,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?pk(e):fk(e,{locale:d,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?f=ok([c,f]):"after"===n&&u&&(f=ik([u,f]));var p=!0;if(i){var m=oP(f,i);p=!m.disabled&&!m.hidden}return p?f:l.count>365?l.lastFocused:iP(f,{moveBy:r,direction:n,context:o,modifiers:i,retry:ij(ij({},l),{count:l.count+1})})}var aP=m(void 0);function lP(e){var t=kj(),r=rP(),n=i(),o=n[0],a=n[1],l=i(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=uk(e[0]),i=ck(e[e.length-1]),a=o;a<=i;){var l=oP(a,t);if(l.disabled||l.hidden)a=qE(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=qE(a,1)}}return n||r}(t.displayMonths,r),d=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,f=function(e){a(e)},p=yj(),m=function(e,n){if(o){var i=iP(o,{moveBy:e,direction:n,context:p,modifiers:r});ak(o,i)||(t.goToDate(i,o),f(i))}},y={focusedDay:o,focusTarget:d,blur:function(){c(o),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return g(aP.Provider,{value:y,children:e.children})}function sP(){var e=y(aP);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var cP=m(void 0);function uP(e){if(!cj(e.initialProps)){var t={selected:void 0};return g(cP.Provider,{value:t,children:e.children})}return g(dP,{initialProps:e.initialProps,children:e.children})}function dP(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return g(cP.Provider,{value:n,children:r})}function fP(){var e=y(cP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function pP(e,t){var r=[e.classNames.day];return Object.keys(t).forEach((function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(_j).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function mP(e,t,r){var n,o,i,l=yj(),s=sP(),c=function(e,t){return oP(e,rP(),t)}(e,t),u=function(e,t){var r=yj(),n=fP(),o=Bj(),i=Vj(),a=sP(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,d=a.blur,f=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,y=a.focusYearBefore,h=a.focusYearAfter,v=a.focusStartOfWeek,g=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;cj(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):lj(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):sj(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;f(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;d(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():p();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():m();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),g()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(e,c),d=function(){var e=yj(),t=fP(),r=Bj(),n=Vj();return cj(e)?t.selected:lj(e)?r.selected:sj(e)?n.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);a((function(){var t;c.outside||s.focusedDay&&f&&ak(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[s.focusedDay,e,r,f,c.outside]);var p=pP(l,c).join(" "),m=function(e,t){var r=ij({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=ij(ij({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(l,c),y=Boolean(c.outside&&!l.showOutsideDays||c.hidden),h=null!==(i=null===(o=l.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:Dj,v={style:m,className:p,children:g(h,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},b=s.focusTarget&&ak(s.focusTarget,e)&&!c.outside,w=s.focusedDay&&ak(s.focusedDay,e),O=ij(ij(ij({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=w||b?0:-1,n)),u);return{isButton:f,isHidden:y,activeModifiers:c,selectedDays:d,buttonProps:O,divProps:v}}function yP(e){var t=s(null),r=mP(e.date,e.displayMonth,t);return r.isHidden?g("div",{role:"gridcell"}):r.isButton?g(Sj,ij({name:"day",ref:t},r.buttonProps)):g("div",ij({},r.divProps))}function hP(e){var t=e.number,r=e.dates,n=yj(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return g("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return g(Sj,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function vP(e){var t,r,n,o=yj(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:yP,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:hP;return l&&(n=g("td",{className:a.cell,style:i.cell,children:g(u,{number:e.weekNumber,dates:e.dates})})),w("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return g("td",{className:a.cell,style:i.cell,role:"presentation",children:g(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+VE(e)/1e3)}(t))}))]})}function gP(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?pk(t):fk(t,r),o=(null==r?void 0:r.ISOWeek)?ZE(e):XE(e,r),i=tk(n,o),a=[],l=0;l<=i;l++)a.push(qE(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?kk(t):Pk(t,r),o=e.find((function(e){return e.weekNumber===n}));return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)}),[])}function bP(e){var t,r,n,o=yj(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,p=o.ISOWeek,m=function(e,t){var r=gP(uk(e),ck(e),t);if(null==t?void 0:t.useFixedWeeks){var n=Qk(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=rk(i,6-n),l=gP(rk(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),y=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:Ij,h=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:vP,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:Lj;return w("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&g(y,{}),g("tbody",{className:a.tbody,style:l.tbody,children:m.map((function(t){return g(h,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),g(v,{displayMonth:e.displayMonth})]})}var wP="undefined"!=typeof window&&window.document&&window.document.createElement?f:a,OP=!1,xP=0;function EP(){return"react-day-picker-".concat(++xP)}function kP(e){var t,r,n=yj(),o=n.dir,l=n.classNames,s=n.styles,c=n.components,u=kj().displayMonths,d=function(e){var t,r=null!=e?e:OP?EP():null,n=i(r),o=n[0],l=n[1];return wP((function(){null===o&&l(EP())}),[]),a((function(){!1===OP&&(OP=!0)}),[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,p=[l.month],m=s.month,y=0===e.displayIndex,h=e.displayIndex===u.length-1,v=!y&&!h;"rtl"===o&&(h=(t=[y,h])[0],y=t[1]),y&&(p.push(l.caption_start),m=ij(ij({},m),s.caption_start)),h&&(p.push(l.caption_end),m=ij(ij({},m),s.caption_end)),v&&(p.push(l.caption_between),m=ij(ij({},m),s.caption_between));var b=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:Tj;return w("div",{className:p.join(" "),style:m,children:[g(b,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),g(bP,{id:f,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function jP(e){var t=yj(),r=t.classNames,n=t.styles;return g("div",{className:r.months,style:n.months,children:e.children})}function PP(e){var t,r,n=e.initialProps,o=yj(),l=sP(),s=kj(),c=i(!1),u=c[0],d=c[1];a((function(){o.initialFocus&&l.focusTarget&&(u||(l.focus(l.focusTarget),d(!0)))}),[o.initialFocus,u,l.focus,l.focusTarget,l]);var f=[o.classNames.root,o.className];o.numberOfMonths>1&&f.push(o.classNames.multiple_months),o.showWeekNumber&&f.push(o.classNames.with_weeknumber);var p=ij(ij({},o.styles.root),o.style),m=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return ij(ij({},e),((r={})[t]=n[t],r))}),{}),y=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:jP;return g("div",ij({className:f.join(" "),style:p,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},m,{children:g(y,{children:s.displayMonths.map((function(e,t){return g(kP,{displayIndex:t,displayMonth:e},t)}))})}))}function NP(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return g(mj,{initialProps:r,children:g(Ej,{children:g(uP,{initialProps:r,children:g(Aj,{initialProps:r,children:g(Hj,{initialProps:r,children:g(tP,{children:g(lP,{children:t})})})})})})})}function SP(e){return g(NP,ij({},e,{children:g(PP,{initialProps:e})}))}const CP=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,zP=P,TP=(LP="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",MP={variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},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"}},e=>{var t;if(null==(null==MP?void 0:MP.variants))return zP(LP,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:r,defaultVariants:n}=MP,o=Object.keys(r).map((t=>{const o=null==e?void 0:e[t],i=null==n?void 0:n[t];if(null===o)return null;const a=CP(o)||CP(i);return r[t][a]})),i=e&&Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e}),{}),a=null==MP||null===(t=MP.compoundVariants)||void 0===t?void 0:t.reduce(((e,t)=>{let{class:r,className:o,...a}=t;return Object.entries(a).every((e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...n,...i}[t]):{...n,...i}[t]===r}))?[...e,r,o]:e}),[]);return zP(LP,o,a,null==e?void 0:e.class,null==e?void 0:e.className)});var LP,MP;const IP=e.forwardRef((({className:t,variant:r,size:n,asChild:o=!1,...i},a)=>{const l=o?bg:"button";return e.createElement(l,{className:De(TP({variant:r,size:n,className:t})),ref:a,...i})}));IP.displayName="Button";const DP=({className:e,classNames:r,showOutsideDays:n=!0,...o})=>t.createElement(SP,{showOutsideDays:n,className:De("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:De(TP({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:De("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:De(TP({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...r},components:{IconLeft:()=>t.createElement(IE,{className:"h-4 w-4"}),IconRight:()=>t.createElement(RE,{className:"h-4 w-4"})},...o});DP.displayName="Calendar";const RP={arrow:"arrow",slash:"slash",icon:"icon"},AP={small:{text:"text-xs",icon:"h-3 w-3",spacing:"py-0.5 px-1.5"},medium:{text:"text-sm",icon:"h-4 w-4",spacing:"py-1 px-2"},large:{text:"text-base",icon:"h-5 w-5",spacing:"py-1.5 px-2.5"}},WP=e.forwardRef((({variant:t,size:r,className:n,...o},i)=>{const a={slash:e.createElement("span",{className:"mx-2 text-muted-foreground/50 select-none"},"/"),arrow:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(Ye,{className:De(AP[r].icon,"text-muted-foreground/50")})),icon:e.createElement("span",{className:"mx-2 group-hover:scale-105 transition-transform duration-150"},e.createElement(Ye,{className:De(AP[r].icon,"text-muted-foreground/50")}))};return e.createElement("span",{ref:i,className:De("flex items-center",n),...o},a[t])}));WP.displayName="BreadCrumbSeparator";const BP=e.forwardRef((({items:t,variant:r="slash",size:n="medium",maxItems:o=4,className:a,...s},c)=>{const[u,d]=i(!1),[f,p]=i(null),m=l((()=>{if(u||t.length<=o)return t;return[...t.slice(0,1),{label:"...",href:"#"},...t.slice(-2)]}),[t,o,u]);return e.createElement("nav",{ref:c,"aria-label":"BreadCrumb",className:De("w-full p-3 select-none",a),...s},e.createElement("ol",{className:"flex items-center flex-wrap gap-y-2"},"icon"===r&&e.createElement("li",{className:"flex items-center"},e.createElement("a",{href:"/",className:De("text-muted-foreground/80 transition-colors duration-150","hover:text-primary focus-visible:text-primary","outline-none focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm")},e.createElement(Ke,{className:AP[n].icon}),e.createElement("span",{className:"sr-only"},"Home"))),m.map(((t,o)=>{const i=o===m.length-1,a="..."===t.label,l=f===o;return e.createElement("li",{key:t.href,className:"flex items-center group",onMouseEnter:()=>p(o),onMouseLeave:()=>p(null)},o>0&&e.createElement(WP,{variant:r,size:n}),"icon"===r&&!a&&e.createElement("span",{className:"mr-1"},t.icon||e.createElement(Ze,{className:De(AP[n].icon,"text-muted-foreground/80")})),e.createElement("a",{href:a?void 0:t.href,className:De("font-medium relative inline-flex items-center","transition-all duration-150","outline-none focus-visible:ring-2 focus-visible:ring-offset-2","focus-visible:ring-ring rounded-sm",AP[n].text,AP[n].spacing,i?"text-primary cursor-default font-semibold":"text-muted-foreground/80 hover:text-muted-foreground",!i&&["after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0","after:bg-primary/50 after:transition-all after:duration-150",l&&"after:w-full"],a&&"cursor-pointer hover:text-primary"),onClick:e=>{a&&(e.preventDefault(),d(!0))},...!i&&{role:"link","aria-current":void 0},...i&&{"aria-current":"page"}},e.createElement("span",{className:"relative"},t.label)))}))))}));BP.displayName="BreadCrumb";const _P={small:{trigger:"px-3 py-2 text-sm",icon:"h-4 w-4",optionIcon:"h-4 w-4",option:"px-2.5 py-2",optionText:"text-sm",description:"text-xs"},medium:{trigger:"px-4 py-3 text-base",icon:"h-5 w-5",optionIcon:"h-5 w-5",option:"px-3 py-2.5",optionText:"text-sm",description:"text-xs"},large:{trigger:"px-5 py-4 text-lg",icon:"h-6 w-6",optionIcon:"h-6 w-6",option:"px-4 py-3",optionText:"text-base",description:"text-sm"}},FP={basic:{trigger:"border border-border hover:border-primary/20",content:"border border-border"},shadow:{trigger:"shadow-lg hover:shadow-xl",content:"shadow-xl"}},HP=t.forwardRef((({options:e,value:r,onValueChange:n,placeholder:o="",disabled:l=!1,showIcons:u=!0,size:d="medium",variant:f,className:p,classNames:m,searchable:y=!1,onSearch:v},g)=>{const[b,w]=i(!1),[O,x]=i(-1),[E,k]=i(""),[j,P]=i(null),[N,S]=i(""),C=s(null),z=s(null),T=s([]),L=e.find((e=>e.id===r)),M=_P[d],I=y&&N?e.filter((e=>e.label.toLowerCase().includes(N.toLowerCase()))):e;a((()=>{b?y&&z.current&&z.current.focus():(x(-1),S(""))}),[b,y]),a((()=>{b&&O>=0&&T.current[O]?.scrollIntoView({block:"nearest"})}),[b,O]),a((()=>{const e=e=>{C.current&&!C.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]),a((()=>{y&&v&&v(N)}),[N,v,y]);const D=c((e=>{n?.(e),w(!1)}),[n]),R=c((()=>{if(!f)return{trigger:"",content:""};const e=FP[f];return{trigger:e.trigger||"",content:e.content||""}}),[f]),A=c((e=>{if(!l)switch(e.key){case"ArrowDown":e.preventDefault(),b?x((e=>Math.min(e+1,I.length-1))):(w(!0),x(0));break;case"ArrowUp":e.preventDefault(),b?x((e=>Math.max(e-1,0))):(w(!0),x(I.length-1));break;case"Home":e.preventDefault(),b&&x(0);break;case"End":e.preventDefault(),b&&x(I.length-1);break;case"Enter":case" ":if(e.preventDefault(),b&&O>=0){const e=I[O];e.disabled||D(e.id)}else w(!b);break;case"Escape":e.preventDefault(),w(!1);break;default:if(!y&&1===e.key.length){const t=e.key.toLowerCase();j&&clearTimeout(j);const r=E+t;k(r);const n=I.findIndex((e=>e.label.toLowerCase().startsWith(r)));n>=0&&(x(n),b||w(!0));const o=setTimeout((()=>{k("")}),1e3);P(o)}}}),[l,b,I,E,j,D,O,y]),W=c(((e,t,r)=>{r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),D(t))}),[D]),B=c((e=>{S(e.target.value),x(0)}),[]),_=R();return t.createElement("div",{ref:C,className:"relative"},t.createElement("button",{ref:g,onClick:()=>!l&&w(!b),onKeyDown:A,className:De("group flex w-full items-center justify-between rounded-xl bg-background","transition-all duration-200 ease-out","hover:shadow-md","focus:outline-none focus:ring-2 focus:ring-primary/20 focus:ring-offset-2",l&&"cursor-not-allowed opacity-50",b&&"border-primary/30 bg-primary/5 shadow-lg",M.trigger,_.trigger,p,m?.trigger),disabled:l,"aria-expanded":b,"aria-haspopup":"listbox","aria-controls":"dropdown-options","aria-label":o},t.createElement("div",{className:"flex items-center gap-3"},u&&L?.icon&&t.createElement("span",{className:"text-primary/70 transition-colors duration-200 group-hover:text-primary"},t.cloneElement(L.icon,{})),t.createElement("span",{className:De("font-medium",M.optionText)},L?L.label:o)),t.createElement(Ve,{className:De("text-primary/70 transition-all duration-300","group-hover:text-primary",b&&"rotate-180",M.icon)})),t.createElement("div",{id:"dropdown-options",role:"listbox","aria-label":o,className:De("z-50 mt-2 origin-top-right","rounded-xl border border-border/50 bg-background p-1.5","shadow-lg backdrop-blur-sm","transition-all duration-200 ease-out",b?"visible scale-100 opacity-100":"invisible scale-95 opacity-0","absolute left-0 right-0",_.content,m?.content)},y&&t.createElement("div",{className:"sticky top-0 z-10 mb-1.5 bg-background px-2 py-1.5"},t.createElement("div",{className:"relative"},t.createElement(et,{className:De("absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",M.icon)}),t.createElement("input",{ref:z,type:"text",value:N,onChange:B,onClick:e=>e.stopPropagation(),placeholder:"Search...",className:De("w-full rounded-lg border border-border bg-background py-2","pl-9 pr-2 text-sm placeholder:text-muted-foreground","focus:border-primary/30 focus:outline-none focus:ring-1 focus:ring-primary/20",M.optionText)}))),t.createElement("div",{className:"max-h-72 overflow-auto"},0===I.length?t.createElement("div",{className:"px-3 py-2 text-sm text-muted-foreground"},"No options found"):I.map(((e,n)=>t.createElement(h,{key:e.id},t.createElement("div",{ref:e=>{T.current&&(T.current[n]=e)},role:"option",tabIndex:b&&!e.disabled?0:-1,"aria-selected":r===e.id,onClick:()=>!e.disabled&&D(e.id),onKeyDown:t=>W(t,e.id,!!e.disabled),className:De("group relative flex select-none items-center gap-3 rounded-lg","cursor-pointer transition-all duration-200","hover:bg-primary/10","focus:outline-none focus:ring-2 focus:ring-primary/20",e.disabled&&"pointer-events-none opacity-50",(r===e.id||n===O)&&"bg-primary/5 border border-primary/20",M.option,m?.item)},u&&e.icon&&t.createElement("span",{className:De("text-primary/70 transition-colors duration-200","group-hover:text-primary",m?.itemIcon)},t.cloneElement(e.icon)),t.createElement("div",{className:"flex flex-col gap-0.5"},t.createElement("span",{className:De("font-medium leading-none","transition-colors duration-200","group-hover:text-primary",M.optionText,m?.itemText)},e.label),e.description&&t.createElement("span",{className:De("text-muted-foreground","transition-colors duration-200","group-hover:text-primary/70",M.description,m?.description)},e.description)),r===e.id&&t.createElement($e,{className:De("ml-auto text-primary",M.icon)})),n<I.length-1&&t.createElement("div",{className:De("my-1.5 h-px bg-border/50",m?.separator)})))))))}));HP.displayName="Dropdown";const $P=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("rounded-xl border bg-card text-card-foreground shadow",t),...r})));$P.displayName="Card";const VP=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("flex flex-col space-y-1.5 p-6",t),...r})));VP.displayName="CardHeader";e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("font-semibold leading-none tracking-tight",t),...r}))).displayName="CardTitle";e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("text-sm text-muted-foreground",t),...r}))).displayName="CardDescription";const qP=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("p-6 pt-0",t),...r})));qP.displayName="CardContent";function YP({className:e,...r}){return t.createElement("div",{className:De("animate-pulse rounded-md bg-primary/10",e),...r})}e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("flex items-center p-6 pt-0",t),...r}))).displayName="CardFooter";const UP=({headerRows:e=2,contentRows:r=3,headerRowHeight:n="h-6",contentRowHeight:o="h-5",gridCols:i=2,gridHeight:a="h-64",className:l})=>t.createElement($P,{className:De("overflow-hidden",l)},t.createElement(VP,{className:"border-b"},t.createElement("div",{className:"space-y-8"},Array.from({length:e}).map(((e,r)=>t.createElement(YP,{key:r,className:De(n,0===r?"w-1/3":"w-2/3")}))),i>0&&t.createElement("div",{className:De("grid gap-8",{"grid-cols-1":1===i,"grid-cols-1 md:grid-cols-2":2===i,"grid-cols-1 md:grid-cols-3":3===i,"grid-cols-1 md:grid-cols-4":4===i})},Array.from({length:i}).map(((e,r)=>t.createElement(YP,{key:r,className:a})))))),t.createElement(qP,{className:"mt-6 space-y-6"},Array.from({length:r}).map(((e,r)=>t.createElement("div",{key:r,className:"flex gap-4"},t.createElement(YP,{className:De("w-5",o)}),t.createElement("div",{className:"space-y-2 flex-1"},t.createElement(YP,{className:De("w-3/4",o)}),t.createElement(YP,{className:De("w-1/2",o)}))))))),GP=({rows:e=5,className:r})=>t.createElement($P,{className:De("shadow-lg border-border",r)},t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-48"})),t.createElement(qP,null,t.createElement("div",{className:"space-y-4"},Array.from({length:e}).map(((e,r)=>t.createElement(YP,{key:r,className:"h-16 w-full"})))))),XP=({className:e,rows:r=3,rowHeight:n="h-4",mainHeight:o="h-24",firstRowWidth:i="w-3/5",secondRowWidth:a="w-4/5"})=>t.createElement($P,{className:e},t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-48"})),t.createElement(qP,{className:"space-y-4"},t.createElement(YP,{className:o}),Array.from({length:r}).map(((e,r)=>t.createElement(YP,{key:r,className:De(n,0===r?i:a)}))))),ZP=()=>t.createElement("div",{className:"space-y-6"},t.createElement("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Array.from({length:4}).map(((e,r)=>t.createElement($P,{key:r},t.createElement(VP,{className:"flex flex-row items-center justify-between pb-2"},t.createElement(YP,{className:"h-5 w-1/2"}),t.createElement(YP,{className:"h-4 w-4"})),t.createElement(qP,null,t.createElement(YP,{className:"h-8 w-full"}),t.createElement(YP,{className:"mt-4 h-4 w-3/4"})))))),t.createElement("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2"},t.createElement($P,null,t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-40"})),t.createElement(qP,null,t.createElement(YP,{className:"h-[200px]"}))),t.createElement($P,null,t.createElement(VP,null,t.createElement(YP,{className:"h-8 w-40"})),t.createElement(qP,null,t.createElement("div",{className:"space-y-2"},Array.from({length:5}).map(((e,r)=>t.createElement("div",{key:r,className:"flex justify-between"},t.createElement(YP,{className:"h-4 w-[100px]"}),t.createElement(YP,{className:"h-4 w-[60px]"}))))))))),KP=t.forwardRef((({variant:e="card",rows:r=5,className:n,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l,headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:d,gridCols:f,gridHeight:p,...m},y)=>{const h={card:t.createElement(UP,{headerRows:s,contentRows:c,headerRowHeight:u,contentRowHeight:d,gridCols:f,gridHeight:p,className:n}),table:t.createElement(GP,{rows:r,className:n}),simple:t.createElement(XP,{className:n,rows:r,rowHeight:o,mainHeight:i,firstRowWidth:a,secondRowWidth:l}),dashboard:t.createElement(ZP,null)};return t.createElement("div",{ref:y,...m},h[e])}));KP.displayName="CustomSkeleton";const QP={small:{padding:"p-3 sm:p-4",titleSize:"text-base sm:text-lg",descSize:"text-sm sm:text-base",imageHeight:"h-24 sm:h-32 md:h-36"},medium:{padding:"p-4 sm:p-5 md:p-6",titleSize:"text-lg sm:text-xl md:text-2xl",descSize:"text-sm sm:text-base md:text-lg",imageHeight:"h-32 sm:h-40 md:h-48 lg:h-56"},large:{padding:"p-5 sm:p-6 md:p-7 lg:p-8",titleSize:"text-xl sm:text-2xl md:text-3xl",descSize:"text-base sm:text-lg md:text-xl",imageHeight:"h-40 sm:h-48 md:h-56 lg:h-64"}},JP={default:{kind:"default",wrapper:"bg-card border border-border rounded-lg sm:rounded-xl",gradients:[]},gradiant:{kind:"gradiant",wrapper:"relative overflow-hidden bg-card border border-border shadow-sm rounded-lg sm:rounded-xl",gradients:["absolute inset-0 bg-primary/20","absolute inset-0 bg-gradient-to-tr from-primary/10 via-transparent to-transparent"]}},eN=({title:e,description:r,variant:n="gradiant",size:o="medium",image:a,footer:l,className:s,children:c,badge:u,width:d,height:f})=>{const[p,m]=i(!a),y=JP[n],h=QP[o],v=t.createElement(t.Fragment,null,u&&t.createElement("div",{"data-testid":"badge-wrapper",className:"absolute right-4 top-4 z-10"},t.createElement("span",{className:"inline-flex items-center rounded-full bg-primary px-3 py-1 text-xs font-medium text-primary-foreground ring-1 ring-inset ring-primary/10"},u)),t.createElement("div",{className:De("space-y-4",y.content&&"default"!==n&&"p-6")},a&&t.createElement("div",{"data-testid":"image-wrapper",className:De("relative w-full overflow-hidden rounded-lg mb-6",h.imageHeight)},t.createElement("div",{"data-testid":"image-container",className:De(p?"opacity-100":"opacity-0")},t.createElement("img",{src:a,alt:e,className:"h-full w-full object-cover",onLoad:()=>m(!0)}))),t.createElement("h3",{"data-testid":"title",className:De("font-semibold tracking-tight text-foreground",h.titleSize)},e),r&&t.createElement("p",{"data-testid":"description",className:De("text-muted-foreground leading-relaxed",h.descSize)},r),c&&t.createElement("div",{className:"mt-4"},c),l&&t.createElement("div",{"data-testid":"footer",className:"mt-6 pt-4 border-t border-border"},l))),g=y.content?t.createElement("div",{className:y.content},v):v,b={width:d||"auto",height:f||"auto"};return t.createElement("div",{className:De("bg-card text-card-foreground",y.wrapper,s),style:b},t.createElement("div",{"data-testid":"gradient-wrapper"},y.gradients&&y.gradients.map(((e,r)=>t.createElement("div",{key:r,className:e})))),y.inner?t.createElement("div",{className:De(y.inner,h.padding)},t.createElement("div",{className:"relative"},g)):t.createElement("div",{className:De("relative",h.padding)},g))};eN.displayName="Card";const tN={small:"h-10 w-10",medium:"h-14 w-14 md:h-20 md:w-20",large:"h-28 w-28"},rN=({variant:e="spinner",size:r="medium",className:n,ariaLabel:o="Loading",colorScheme:i})=>{const a=tN[r];return t.createElement("div",{role:"status","aria-label":o,className:De("flex items-center justify-center",n)},(()=>{switch(e){case"dots":return t.createElement("div",{className:"flex space-x-2"},[0,1,2].map((e=>t.createElement("div",{key:e,className:De("w-3 h-3 rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bounce",1===e&&"animate-bounce-delay-1",2===e&&"animate-bounce-delay-2"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}}))));case"bars":return t.createElement("div",{className:"flex space-x-1 h-10 items-center"},[0,1,2,3].map((e=>t.createElement("div",{key:e,className:De("w-2 h-full rounded-full","harford"!==i&&"bg-primary",0===e&&"animate-bar-scale",1===e&&"animate-bar-scale-delay-1",2===e&&"animate-bar-scale-delay-2",3===e&&"animate-bar-scale-delay-3"),style:"harford"===i?{backgroundColor:"#043d5a"}:{}}))));case"orbit":return t.createElement("div",{className:De("relative aspect-square flex items-center justify-center",{"w-20 h-20":"small"===r,"w-32 h-32":"medium"===r,"w-40 h-40":"large"===r},n)},t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:3rem]"},t.createElement("div",{className:De("absolute w-4 h-4 rounded-full animate-orbit-medium","harford"!==i&&"bg-primary/70 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.7)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:De("absolute inset-0 rounded-full blur-sm","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:De("absolute w-2 h-2 rounded-full animate-orbit-reverse-medium","harford"!==i&&"bg-primary/60 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 4px 6px -1px rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:"absolute inset-0 flex items-center justify-center [--orbit-radius:4rem]"},t.createElement("div",{className:De("absolute w-5 h-5 rounded-full animate-orbit-slow","harford"!==i&&"bg-primary/60 shadow-primary/50"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.6)",boxShadow:"0 20px 25px -5px rgba(4, 61, 90, 0.5)"}:{}},t.createElement("div",{className:De("absolute inset-0 rounded-full blur-sm","harford"!==i&&"bg-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.3)"}:{}})),t.createElement("div",{className:De("absolute w-3 h-3 rounded-full animate-orbit-reverse-slow","harford"!==i&&"bg-primary/50 shadow-primary/30"),style:"harford"===i?{backgroundColor:"rgba(4, 61, 90, 0.5)",boxShadow:"0 10px 15px -3px rgba(4, 61, 90, 0.3)"}:{}})));default:return t.createElement("div",{className:"relative"},t.createElement("div",{className:De("relative",a)},t.createElement("div",{className:De("absolute inset-0 rounded-full border-4","harford"!==i&&"border-primary/30","animate-ping-slow"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.3)"}:{}}),t.createElement("div",{className:De("absolute inset-0 rounded-full border-4 border-transparent","harford"!==i&&"border-t-primary border-l-primary","animate-spin-slow"),style:"harford"===i?{borderTopColor:"#043d5a",borderLeftColor:"#043d5a"}:{}}),t.createElement("div",{className:De("absolute inset-0 rounded-full","border-[3px] border-dashed","harford"!==i&&"border-primary/50","animate-spin-slower"),style:"harford"===i?{borderColor:"rgba(4, 61, 90, 0.5)"}:{}}),t.createElement("div",{className:De("absolute inset-2 rounded-full border-4 border-transparent","harford"!==i&&"border-r-primary/70 border-b-primary/70","animate-spin-reverse"),style:"harford"===i?{borderRightColor:"rgba(4, 61, 90, 0.7)",borderBottomColor:"rgba(4, 61, 90, 0.7)"}:{}})))}})(),t.createElement("span",{className:"sr-only"},o))};rN.displayName="Loader";var nN,oN="dismissableLayer.update",iN="dismissableLayer.pointerDownOutside",aN="dismissableLayer.focusOutside",lN=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sN=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(lN),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=e.useState({}),y=hg(r,(e=>f(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(v),w=d?h.indexOf(d):-1,O=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,E=function(t,r=globalThis?.document){const n=Sg(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){uN(iN,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));x&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),p),k=function(t,r=globalThis?.document){const n=Sg(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){uN(aN,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),p);return function(t,r=globalThis?.document){const n=Sg(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}((e=>{w===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),e.useEffect((()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(nN=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cN(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=nN)}}),[d,p,n,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cN())}),[d,u]),e.useEffect((()=>{const e=()=>m({});return document.addEventListener(oN,e),()=>document.removeEventListener(oN,e)}),[]),g(Eg.div,{...c,ref:y,style:{pointerEvents:O?x?"auto":"none":void 0,...t.style},onFocusCapture:pg(t.onFocusCapture,k.onFocusCapture),onBlurCapture:pg(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:pg(t.onPointerDownCapture,E.onPointerDownCapture)})}));sN.displayName="DismissableLayer";function cN(){const e=new CustomEvent(oN);document.dispatchEvent(e)}function uN(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&O.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(lN),o=e.useRef(null),i=hg(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),g(Eg.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var dN="focusScope.autoFocusOnMount",fN="focusScope.autoFocusOnUnmount",pN={bubbles:!1,cancelable:!0},mN=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=Sg(i),d=Sg(a),f=e.useRef(null),p=hg(r,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(m.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:gN(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||gN(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&gN(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,m.paused]),e.useEffect((()=>{if(s){bN.add(m);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(dN,pN);s.addEventListener(dN,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(gN(n,{select:t}),document.activeElement!==r)return}((e=yN(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&gN(s))}return()=>{s.removeEventListener(dN,u),setTimeout((()=>{const e=new CustomEvent(fN,pN);s.addEventListener(fN,d),s.dispatchEvent(e),e.defaultPrevented||gN(t??document.body,{select:!0}),s.removeEventListener(fN,d),bN.remove(m)}),0)}}var e}),[s,u,d,m]);const y=e.useCallback((e=>{if(!n&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=yN(e),r=hN(t,e),n=hN(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&gN(i,{select:!0})):(e.preventDefault(),n&&gN(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,m.paused]);return g(Eg.div,{tabIndex:-1,...l,ref:p,onKeyDown:y})}));function yN(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function hN(e,t){for(const r of e)if(!vN(r,{upTo:t}))return r}function vN(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function gN(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}mN.displayName="FocusScope";var bN=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=wN(e,t),e.unshift(t)},remove(t){e=wN(e,t),e[0]?.resume()}}}();function wN(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var ON=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);kg((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?x.createPortal(g(Eg.div,{...o,ref:r}),l):null}));ON.displayName="Portal";var xN=0;function EN(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kN()),document.body.insertAdjacentElement("beforeend",e[1]??kN()),xN++,()=>{1===xN&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),xN--}}),[])}function kN(){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 jN=function(){return jN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},jN.apply(this,arguments)};function PN(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}"function"==typeof SuppressedError&&SuppressedError;var NN="right-scroll-bar-position",SN="width-before-scroll-bar";function CN(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var zN="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,TN=new WeakMap;function LN(e,t){var r,n,o,a=(r=null,n=function(t){return e.forEach((function(e){return CN(e,t)}))},(o=i((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return zN((function(){var t=TN.get(a);if(t){var r=new Set(t),n=new Set(e),o=a.current;r.forEach((function(e){n.has(e)||CN(e,null)})),n.forEach((function(e){r.has(e)||CN(e,o)}))}TN.set(a,e)}),[e]),a}function MN(e){return e}var IN=function(t){var r=t.sideCar,n=PN(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,jN({},n))};IN.isSideCarExport=!0;var DN=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=MN);var r=[],n=!1;return{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(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=jN({async:!0,ssr:!1},e),t}(),RN=function(){},AN=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:RN,onWheelCapture:RN,onTouchMoveCapture:RN}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,m=t.noIsolation,y=t.inert,h=t.allowPinchZoom,v=t.as,g=void 0===v?"div":v,b=t.gapMode,w=PN(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,x=LN([n,r]),E=jN(jN({},w),i);return e.createElement(e.Fragment,null,d&&e.createElement(O,{sideCar:DN,removeScrollBar:u,shards:f,noIsolation:m,inert:y,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),l?e.cloneElement(e.Children.only(s),jN(jN({},E),{ref:x})):e.createElement(g,jN({},E,{className:c,ref:x}),s))}));AN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},AN.classNames={fullWidth:SN,zeroRight:NN};function WN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var BN=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=WN())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_N=function(){var t,r=(t=BN(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},FN={left:0,top:0,right:0,gap:0},HN=function(e){return parseInt(e||"",10)||0},$N=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return FN;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[HN(r),HN(n),HN(o)]}(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])}},VN=_N(),qN="data-scroll-locked",YN=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(qN,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(NN," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(SN," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(NN," .").concat(NN," {\n right: 0 ").concat(n,";\n }\n \n .").concat(SN," .").concat(SN," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(qN,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},UN=function(){var e=parseInt(document.body.getAttribute(qN)||"0",10);return isFinite(e)?e:0},GN=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(qN,(UN()+1).toString()),function(){var e=UN()-1;e<=0?document.body.removeAttribute(qN):document.body.setAttribute(qN,e.toString())}}),[]);var a=e.useMemo((function(){return $N(i)}),[i]);return e.createElement(VN,{styles:YN(a,!r,i,n?"":"!important")})},XN=!1;if("undefined"!=typeof window)try{var ZN=Object.defineProperty({},"passive",{get:function(){return XN=!0,!0}});window.addEventListener("test",ZN,ZN),window.removeEventListener("test",ZN,ZN)}catch(e){XN=!1}var KN=!!XN&&{passive:!1},QN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},JN=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),eS(e,n)){var o=tS(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},eS=function(e,t){return"v"===e?function(e){return QN(e,"overflowY")}(t):function(e){return QN(e,"overflowX")}(t)},tS=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},rS=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nS=function(e){return[e.deltaX,e.deltaY]},oS=function(e){return e&&"current"in e?e.current:e},iS=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},aS=0,lS=[];function sS(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var cS,uS=(cS=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(aS++)[0],a=e.useState(_N)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(oS),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=rS(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=JN(d,u);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=JN(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),s=!1,c=i>0,u=0,d=0;do{var f=tS(e,a),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&eS(e,a)&&(u+=m,d+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:c)}),[]),c=e.useCallback((function(e){var t=e;if(lS.length&&lS[lS.length-1]===a){var n="deltaY"in t?nS(t):rS(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(oS).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:sS(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){n.current=rS(e),o.current=void 0}),[]),f=e.useCallback((function(e){u(e.type,nS(e),e.target,s(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,rS(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return lS.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,KN),document.addEventListener("touchmove",c,KN),document.addEventListener("touchstart",d,KN),function(){lS=lS.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,KN),document.removeEventListener("touchmove",c,KN),document.removeEventListener("touchstart",d,KN)}}),[]);var m=t.removeScrollBar,y=t.inert;return e.createElement(e.Fragment,null,y?e.createElement(a,{styles:iS(i)}):null,m?e.createElement(GN,{gapMode:t.gapMode}):null)},DN.useMedium(cS),IN),dS=e.forwardRef((function(t,r){return e.createElement(AN,jN({},t,{ref:r,sideCar:uS}))}));dS.classNames=AN.classNames;var fS=new WeakMap,pS=new WeakMap,mS={},yS=0,hS=function(e){return e&&(e.host||hS(e.parentNode))},vS=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=hS(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);mS[r]||(mS[r]=new WeakMap);var i=mS[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(fS.get(e)||0)+1,c=(i.get(e)||0)+1;fS.set(e,s),i.set(e,c),a.push(e),1===s&&o&&pS.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),l.clear(),yS++,function(){a.forEach((function(e){var t=fS.get(e)-1,o=i.get(e)-1;fS.set(e,t),i.set(e,o),t||(pS.has(e)||e.removeAttribute(n),pS.delete(e)),o||e.removeAttribute(r)})),--yS||(fS=new WeakMap,fS=new WeakMap,pS=new WeakMap,mS={})}},gS=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),vS(n,o,r,"aria-hidden")):function(){return null}},bS="Dialog",[wS,OS]=vg(bS),[xS,ES]=wS(bS),kS=t=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=t,s=e.useRef(null),c=e.useRef(null),[u=!1,d]=Cg({prop:o,defaultProp:i,onChange:a});return g(xS,{scope:r,triggerRef:s,contentRef:c,contentId:Ng(),titleId:Ng(),descriptionId:Ng(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:l,children:n})};kS.displayName=bS;var jS="DialogTrigger",PS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(jS,r),i=hg(t,o.triggerRef);return g(Eg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qS(o.open),...n,ref:i,onClick:pg(e.onClick,o.onOpenToggle)})}));PS.displayName=jS;var NS="DialogPortal",[SS,CS]=wS(NS,{forceMount:void 0}),zS=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=ES(NS,r);return g(SS,{scope:r,forceMount:n,children:e.Children.map(o,(e=>g(Qg,{present:n||a.open,children:g(ON,{asChild:!0,container:i,children:e})})))})};zS.displayName=NS;var TS="DialogOverlay",LS=e.forwardRef(((e,t)=>{const r=CS(TS,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=ES(TS,e.__scopeDialog);return i.modal?g(Qg,{present:n||i.open,children:g(MS,{...o,ref:t})}):null}));LS.displayName=TS;var MS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(TS,r);return g(dS,{as:bg,allowPinchZoom:!0,shards:[o.contentRef],children:g(Eg.div,{"data-state":qS(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),IS="DialogContent",DS=e.forwardRef(((e,t)=>{const r=CS(IS,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=ES(IS,e.__scopeDialog);return g(Qg,{present:n||i.open,children:i.modal?g(RS,{...o,ref:t}):g(AS,{...o,ref:t})})}));DS.displayName=IS;var RS=e.forwardRef(((t,r)=>{const n=ES(IS,t.__scopeDialog),o=e.useRef(null),i=hg(r,n.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return gS(e)}),[]),g(WS,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pg(t.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:pg(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:pg(t.onFocusOutside,(e=>e.preventDefault()))})})),AS=e.forwardRef(((t,r)=>{const n=ES(IS,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return g(WS,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),WS=e.forwardRef(((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=ES(IS,n),c=e.useRef(null),u=hg(r,c);return EN(),w(b,{children:[g(mN,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:g(sN,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":qS(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),w(b,{children:[g(XS,{titleId:s.titleId}),g(ZS,{contentRef:c,descriptionId:s.descriptionId})]})]})})),BS="DialogTitle",_S=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(BS,r);return g(Eg.h2,{id:o.titleId,...n,ref:t})}));_S.displayName=BS;var FS="DialogDescription",HS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES(FS,r);return g(Eg.p,{id:o.descriptionId,...n,ref:t})}));HS.displayName=FS;var $S="DialogClose",VS=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=ES($S,r);return g(Eg.button,{type:"button",...n,ref:t,onClick:pg(e.onClick,(()=>o.onOpenChange(!1)))})}));function qS(e){return e?"open":"closed"}VS.displayName=$S;var YS="DialogTitleWarning",[US,GS]=function(t,r){const n=e.createContext(r),o=t=>{const{children:r,...o}=t,i=e.useMemo((()=>o),Object.values(o));return g(n.Provider,{value:i,children:r})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(n);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(YS,{contentName:IS,titleName:BS,docsSlug:"dialog"}),XS=({titleId:t})=>{const r=GS(YS),n=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(n)}}),[n,t]),null},ZS=({contentRef:t,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${GS("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(r&&e){document.getElementById(r)||console.warn(n)}}),[n,t,r]),null},KS=kS,QS=PS,JS=zS,eC=LS,tC=DS,rC=_S,nC=HS,oC=VS;const iC=KS,aC=QS,lC=JS,sC=e.forwardRef((({className:t,...r},n)=>e.createElement(eC,{ref:n,className:De("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",t),...r})));sC.displayName=eC.displayName;const cC=e.forwardRef((({className:t,children:r,...n},o)=>e.createElement(lC,null,e.createElement(sC,null),e.createElement(tC,{ref:o,className:De("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-lg 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",t),...n},r,e.createElement(oC,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none 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"},e.createElement(WE,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Close"))))));cC.displayName=tC.displayName;const uC=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});uC.displayName="DialogHeader";const dC=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});dC.displayName="DialogFooter";const fC=e.forwardRef((({className:t,...r},n)=>e.createElement(rC,{ref:n,className:De("text-lg font-semibold leading-none tracking-tight",t),...r})));fC.displayName=rC.displayName;const pC=e.forwardRef((({className:t,...r},n)=>e.createElement(nC,{ref:n,className:De("text-sm text-muted-foreground",t),...r})));pC.displayName=nC.displayName;const mC="Cancel",yC="Confirm",hC="default",vC="medium",gC=!0,bC=!1,wC={button:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},OC=e=>{switch(e){case"small":return"sm:max-w-[425px]";case"large":return"sm:max-w-[725px]";case"extraLarge":return"sm:max-w-[925px]";case"full":return"sm:max-w-[90vw]";default:return"sm:max-w-[525px]"}},xC=({title:e,description:r,cancelText:n=mC,confirmText:o=yC,onConfirm:a,onCancel:l,variant:u=hC,showCloseButton:d=bC,size:f=vC,className:p,onClose:m,fields:y=[],onOpenChange:h})=>{const[v,g]=i({}),b=s(null),w=c((e=>{e.preventDefault(),b.current?.checkValidity()&&(a?.(v),h(!1))}),[v,a,h]),O=c((()=>{l?.(),h(!1)}),[l,h]),x=c((()=>{m?.(),h(!1)}),[m,h]),E=c((e=>{const{name:t,value:r}=e.target;g((e=>({...e,[t]:r})))}),[]);return t.createElement(cC,{className:De(OC(f),p)},t.createElement("form",{ref:b,onSubmit:w},t.createElement(uC,null,t.createElement("div",{className:"flex items-center justify-between"},t.createElement(fC,null,e),d&&t.createElement(nt,{variant:"tertiary",className:"h-6 w-6",onClick:x,type:"button"},t.createElement(tt,{className:"h-4 w-4"}))),t.createElement(pC,null,r)),y.length>0&&t.createElement("div",{className:"grid gap-4 py-4"},y.map((e=>t.createElement("div",{className:"grid gap-2",key:e.name},t.createElement(fg,{id:e.name,name:e.name,type:e.type,placeholder:e.placeholder,required:e.required,defaultValue:e.defaultValue,onChange:E,label:""}))))),t.createElement(dC,{className:"gap-2 sm:gap-0"},t.createElement(nt,{type:"button",variant:"primary",onClick:O},n),t.createElement(nt,{type:"submit",className:"destructive"===u?wC.destructive:wC.button},o))))},EC=({trigger:e,isOpen:r,closeOnOutsideClick:n=gC,...o})=>{const[l,s]=i(r);a((()=>{void 0!==r&&s(r)}),[r]);return t.createElement(iC,{open:l,onOpenChange:e=>{(e||n)&&s(e)}},t.createElement(aC,{asChild:!0},t.createElement(nt,{variant:"primary"},e)),t.createElement(xC,{...o,onOpenChange:s}))};EC.displayName="Dialog";const kC=["top","right","bottom","left"],jC=Math.min,PC=Math.max,NC=Math.round,SC=Math.floor,CC=e=>({x:e,y:e}),zC={left:"right",right:"left",bottom:"top",top:"bottom"},TC={start:"end",end:"start"};function LC(e,t,r){return PC(e,jC(t,r))}function MC(e,t){return"function"==typeof e?e(t):e}function IC(e){return e.split("-")[0]}function DC(e){return e.split("-")[1]}function RC(e){return"x"===e?"y":"x"}function AC(e){return"y"===e?"height":"width"}function WC(e){return["top","bottom"].includes(IC(e))?"y":"x"}function BC(e){return RC(WC(e))}function _C(e){return e.replace(/start|end/g,(e=>TC[e]))}function FC(e){return e.replace(/left|right|bottom|top/g,(e=>zC[e]))}function HC(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function $C(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function VC(e,t,r){let{reference:n,floating:o}=e;const i=WC(t),a=BC(t),l=AC(a),s=IC(t),c="y"===i,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(DC(t)){case"start":p[a]-=f*(r&&c?-1:1);break;case"end":p[a]+=f*(r&&c?-1:1)}return p}async function qC(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=MC(t,e),m=HC(p),y=l[f?"floating"===d?"reference":"floating":d],h=$C(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(y)))||r?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=$C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:g,strategy:s}):v);return{top:(h.top-w.top+m.top)/b.y,bottom:(w.bottom-h.bottom+m.bottom)/b.y,left:(h.left-w.left+m.left)/b.x,right:(w.right-h.right+m.right)/b.x}}function YC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UC(e){return kC.some((t=>e[t]>=0))}function GC(){return"undefined"!=typeof window}function XC(e){return QC(e)?(e.nodeName||"").toLowerCase():"#document"}function ZC(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function KC(e){var t;return null==(t=(QC(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function QC(e){return!!GC()&&(e instanceof Node||e instanceof ZC(e).Node)}function JC(e){return!!GC()&&(e instanceof Element||e instanceof ZC(e).Element)}function ez(e){return!!GC()&&(e instanceof HTMLElement||e instanceof ZC(e).HTMLElement)}function tz(e){return!(!GC()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ZC(e).ShadowRoot)}function rz(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=sz(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function nz(e){return["table","td","th"].includes(XC(e))}function oz(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function iz(e){const t=az(),r=JC(e)?sz(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!r[e]&&"none"!==r[e]))||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function az(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function lz(e){return["html","body","#document"].includes(XC(e))}function sz(e){return ZC(e).getComputedStyle(e)}function cz(e){return JC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uz(e){if("html"===XC(e))return e;const t=e.assignedSlot||e.parentNode||tz(e)&&e.host||KC(e);return tz(t)?t.host:t}function dz(e){const t=uz(e);return lz(t)?e.ownerDocument?e.ownerDocument.body:e.body:ez(t)&&rz(t)?t:dz(t)}function fz(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=dz(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ZC(o);if(i){const e=pz(a);return t.concat(a,a.visualViewport||[],rz(o)?o:[],e&&r?fz(e):[])}return t.concat(o,fz(o,[],r))}function pz(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mz(e){const t=sz(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ez(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=NC(r)!==i||NC(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function yz(e){return JC(e)?e:e.contextElement}function hz(e){const t=yz(e);if(!ez(t))return CC(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=mz(t);let a=(i?NC(r.width):r.width)/n,l=(i?NC(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const vz=CC(0);function gz(e){const t=ZC(e);return az()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:vz}function bz(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=yz(e);let a=CC(1);t&&(n?JC(n)&&(a=hz(n)):a=hz(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ZC(e))&&t}(i,r,n)?gz(i):CC(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=ZC(i),t=n&&JC(n)?ZC(n):n;let r=e,o=pz(r);for(;o&&n&&t!==r;){const e=hz(o),t=o.getBoundingClientRect(),n=sz(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,r=ZC(o),o=pz(r)}}return $C({width:u,height:d,x:s,y:c})}function wz(e,t){const r=cz(e).scrollLeft;return t?t.left+r:bz(KC(e)).left+r}function Oz(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:wz(e,n)),y:n.top+t.scrollTop}}function xz(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ZC(e),n=KC(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=az();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=KC(e),r=cz(e),n=e.ownerDocument.body,o=PC(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=PC(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+wz(e);const l=-r.scrollTop;return"rtl"===sz(n).direction&&(a+=PC(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(KC(e));else if(JC(t))n=function(e,t){const r=bz(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ez(e)?hz(e):CC(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=gz(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $C(n)}function Ez(e,t){const r=uz(e);return!(r===t||!JC(r)||lz(r))&&("fixed"===sz(r).position||Ez(r,t))}function kz(e,t,r){const n=ez(t),o=KC(t),i="fixed"===r,a=bz(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=CC(0);if(n||!n&&!i)if(("body"!==XC(t)||rz(o))&&(l=cz(t)),n){const e=bz(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=wz(o));const c=!o||n||i?CC(0):Oz(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function jz(e){return"static"===sz(e).position}function Pz(e,t){if(!ez(e)||"fixed"===sz(e).position)return null;if(t)return t(e);let r=e.offsetParent;return KC(e)===r&&(r=r.ownerDocument.body),r}function Nz(e,t){const r=ZC(e);if(oz(e))return r;if(!ez(e)){let t=uz(e);for(;t&&!lz(t);){if(JC(t)&&!jz(t))return t;t=uz(t)}return r}let n=Pz(e,t);for(;n&&nz(n)&&jz(n);)n=Pz(n,t);return n&&lz(n)&&jz(n)&&!iz(n)?r:n||function(e){let t=uz(e);for(;ez(t)&&!lz(t);){if(iz(t))return t;if(oz(t))return null;t=uz(t)}return null}(e)||r}const Sz={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=KC(n),l=!!t&&oz(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=CC(1);const u=CC(0),d=ez(n);if((d||!d&&!i)&&(("body"!==XC(n)||rz(a))&&(s=cz(n)),ez(n))){const e=bz(n);c=hz(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||d||i?CC(0):Oz(a,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:KC,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?oz(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=fz(e,[],!1).filter((e=>JC(e)&&"body"!==XC(e))),o=null;const i="fixed"===sz(e).position;let a=i?uz(e):e;for(;JC(a)&&!lz(a);){const t=sz(a),r=iz(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||rz(a)&&!r&&Ez(e,a))?n=n.filter((e=>e!==a)):o=t,a=uz(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce(((e,r)=>{const n=xz(t,r,o);return e.top=PC(n.top,e.top),e.right=jC(n.right,e.right),e.bottom=jC(n.bottom,e.bottom),e.left=PC(n.left,e.left),e}),xz(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Nz,getElementRects:async function(e){const t=this.getOffsetParent||Nz,r=this.getDimensions,n=await r(e.floating);return{reference:kz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=mz(e);return{width:t,height:r}},getScale:hz,isElement:JC,isRTL:function(e){return"rtl"===sz(e).direction}};function Cz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zz(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=yz(e),u=o||i?[...c?fz(c):[],...fz(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const d=c&&l?function(e,t){let r,n=null;const o=KC(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-SC(d)+"px "+-SC(o.clientWidth-(u+f))+"px "+-SC(o.clientHeight-(d+p))+"px "+-SC(u)+"px",threshold:PC(0,jC(1,s))||1};let y=!0;function h(t){const n=t[0].intersectionRatio;if(n!==s){if(!y)return a();n?a(!1,n):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==n||Cz(c,e.getBoundingClientRect())||a(),y=!1}try{n=new IntersectionObserver(h,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(h,m)}n.observe(e)}(!0),i}(c,r):null;let f,p=-1,m=null;a&&(m=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),r()})),c&&!s&&m.observe(c),m.observe(t));let y=s?bz(e):null;return s&&function t(){const n=bz(e);y&&!Cz(y,n)&&r();y=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const Tz=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=IC(r),l=DC(r),s="y"===WC(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,d=MC(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lz=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=MC(e,t),c={x:r,y:n},u=await qC(t,s),d=WC(IC(o)),f=RC(d);let p=c[f],m=c[d];if(i){const e="y"===f?"bottom":"right";p=LC(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";m=LC(m+u["y"===d?"top":"left"],m,m-u[e])}const y=l.fn({...t,[f]:p,[d]:m});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:i,[d]:a}}}}}},Mz=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...h}=MC(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=IC(o),g=WC(l),b=IC(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=f||(b||!y?[FC(l)]:function(e){const t=FC(e);return[_C(e),t,_C(t)]}(l)),x="none"!==m;!f&&x&&O.push(...function(e,t,r,n){const o=DC(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(IC(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(_C)))),i}(l,y,m,w));const E=[l,...O],k=await qC(t,h),j=[];let P=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&j.push(k[v]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=DC(e),o=BC(e),i=AC(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=FC(a)),[a,FC(a)]}(o,a,w);j.push(k[e[0]],k[e[1]])}if(P=[...P,{placement:o,overflows:j}],!j.every((e=>e<=0))){var N,S;const e=((null==(N=i.flip)?void 0:N.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let r=null==(S=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!r)switch(p){case"bestFit":{var C;const e=null==(C=P.filter((e=>{if(x){const t=WC(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},Iz=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=MC(e,t),u=await qC(t,c),d=IC(o),f=DC(o),p="y"===WC(o),{width:m,height:y}=i.floating;let h,v;"top"===d||"bottom"===d?(h=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,h="end"===f?"top":"bottom");const g=y-u.top-u.bottom,b=m-u.left-u.right,w=jC(y-u[h],g),O=jC(m-u[v],b),x=!t.middlewareData.shift;let E=w,k=O;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=g),x&&!f){const e=PC(u.left,0),t=PC(u.right,0),r=PC(u.top,0),n=PC(u.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:PC(u.left,u.right)):E=y-2*(0!==r||0!==n?r+n:PC(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:E});const j=await a.getDimensions(l.floating);return m!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}},Dz=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=MC(e,t);switch(n){case"referenceHidden":{const e=YC(await qC(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:UC(e)}}}case"escaped":{const e=YC(await qC(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:UC(e)}}}default:return{}}}}},Rz=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=MC(e,t)||{};if(null==c)return{};const d=HC(u),f={x:r,y:n},p=BC(o),m=AC(p),y=await a.getDimensions(c),h="y"===p,v=h?"top":"left",g=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],O=f[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=x?x[b]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=l.floating[b]||i.floating[m]);const k=w/2-O/2,j=E/2-y[m]/2-1,P=jC(d[v],j),N=jC(d[g],j),S=P,C=E-y[m]-N,z=E/2-y[m]/2+k,T=LC(S,z,C),L=!s.arrow&&null!=DC(o)&&z!==T&&i.reference[m]/2-(z<S?P:N)-y[m]/2<0,M=L?z<S?z-S:z-C:0;return{[p]:f[p]+M,data:{[p]:T,centerOffset:z-T-M,...L&&{alignmentOffset:M}},reset:L}}}),Az=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=MC(e,t),u={x:r,y:n},d=WC(o),f=RC(d);let p=u[f],m=u[d];const y=MC(l,t),h="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,r=i.reference[f]+i.reference[e]-h.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,g;const e="y"===f?"width":"height",t=["top","left"].includes(IC(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:h.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?h.crossAxis:0);m<r?m=r:m>n&&(m=n)}return{[f]:p,[d]:m}}}},Wz=(e,t,r)=>{const n=new Map,o={platform:Sz,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=VC(c,n,s),f=n,p={},m=0;for(let r=0;r<l.length;r++){const{name:i,fn:y}=l[r],{x:h,y:v,data:g,reset:b}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...g}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=VC(c,f,s))),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Bz="undefined"!=typeof document?f:a;function _z(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!_z(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!_z(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Fz(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hz(e,t){const r=Fz(e);return Math.round(t*r)/r}function $z(t){const r=e.useRef(t);return Bz((()=>{r.current=t})),r}const Vz=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?Rz({element:r.current,padding:n}).fn(t):{}:r?Rz({element:r,padding:n}).fn(t):{};var o}}),qz=(e,t)=>({...Tz(e),options:[e,t]}),Yz=(e,t)=>({...Lz(e),options:[e,t]}),Uz=(e,t)=>({...Az(e),options:[e,t]}),Gz=(e,t)=>({...Mz(e),options:[e,t]}),Xz=(e,t)=>({...Iz(e),options:[e,t]}),Zz=(e,t)=>({...Dz(e),options:[e,t]}),Kz=(e,t)=>({...Vz(e),options:[e,t]});var Qz=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return g(Eg.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g("polygon",{points:"0,0 30,0 15,10"})})}));Qz.displayName="Arrow";var Jz=Qz,eT="Popper",[tT,rT]=vg(eT),[nT,oT]=tT(eT),iT=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return g(nT,{scope:r,anchor:o,onAnchorChange:i,children:n})};iT.displayName=eT;var aT="PopperAnchor",lT=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=oT(aT,n),l=e.useRef(null),s=hg(r,l);return e.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:g(Eg.div,{...i,ref:s})}));lT.displayName=aT;var sT="PopperContent",[cT,uT]=tT(sT),dT=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...h}=t,v=oT(sT,n),[b,w]=e.useState(null),x=hg(r,(e=>w(e))),[E,k]=e.useState(null),j=Zg(E),P=j?.width??0,N=j?.height??0,S=o+("center"!==a?"-"+a:""),C="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},z=Array.isArray(u)?u:[u],T=z.length>0,L={padding:C,boundary:z.filter(yT),altBoundary:T},{refs:M,floatingStyles:I,placement:D,isPositioned:R,middlewareData:A}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,m]=e.useState(o);_z(p,o)||m(o);const[y,h]=e.useState(null),[v,g]=e.useState(null),b=e.useCallback((e=>{e!==k.current&&(k.current=e,h(e))}),[]),w=e.useCallback((e=>{e!==j.current&&(j.current=e,g(e))}),[]),x=a||y,E=l||v,k=e.useRef(null),j=e.useRef(null),P=e.useRef(d),N=null!=c,S=$z(c),C=$z(i),z=$z(u),T=e.useCallback((()=>{if(!k.current||!j.current)return;const e={placement:r,strategy:n,middleware:p};C.current&&(e.platform=C.current),Wz(k.current,j.current,e).then((e=>{const t={...e,isPositioned:!1!==z.current};L.current&&!_z(P.current,t)&&(P.current=t,O.flushSync((()=>{f(t)})))}))}),[p,r,n,C,z]);Bz((()=>{!1===u&&P.current.isPositioned&&(P.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const L=e.useRef(!1);Bz((()=>(L.current=!0,()=>{L.current=!1})),[]),Bz((()=>{if(x&&(k.current=x),E&&(j.current=E),x&&E){if(S.current)return S.current(x,E,T);T()}}),[x,E,T,S,N]);const M=e.useMemo((()=>({reference:k,floating:j,setReference:b,setFloating:w})),[b,w]),I=e.useMemo((()=>({reference:x,floating:E})),[x,E]),D=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=Hz(I.floating,d.x),r=Hz(I.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Fz(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,I.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:T,refs:M,elements:I,floatingStyles:D})),[d,T,M,I,D])}({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>zz(...e,{animationFrame:"always"===m}),elements:{reference:v.anchor},middleware:[qz({mainAxis:i+N,alignmentAxis:l}),c&&Yz({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Uz():void 0,...L}),c&&Gz({...L}),Xz({...L,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),E&&Kz({element:E,padding:s}),hT({arrowWidth:P,arrowHeight:N}),p&&Zz({strategy:"referenceHidden",...L})]}),[W,B]=vT(D),_=Sg(y);kg((()=>{R&&_?.()}),[R,_]);const F=A.arrow?.x,H=A.arrow?.y,$=0!==A.arrow?.centerOffset,[V,q]=e.useState();return kg((()=>{b&&q(window.getComputedStyle(b).zIndex)}),[b]),g("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:R?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g(cT,{scope:n,placedSide:W,onArrowChange:k,arrowX:F,arrowY:H,shouldHideArrow:$,children:g(Eg.div,{"data-side":W,"data-align":B,...h,ref:x,style:{...h.style,animation:R?void 0:"none"}})})})}));dT.displayName=sT;var fT="PopperArrow",pT={top:"bottom",right:"left",bottom:"top",left:"right"},mT=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=uT(fT,r),i=pT[o.placedSide];return g("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g(Jz,{...n,ref:t,style:{...n.style,display:"block"}})})}));function yT(e){return null!==e}mT.displayName=fT;var hT=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=vT(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let p="",m="";return"bottom"===s?(p=i?u:`${d}px`,m=-l+"px"):"top"===s?(p=i?u:`${d}px`,m=`${n.floating.height+l}px`):"right"===s?(p=-l+"px",m=i?u:`${f}px`):"left"===s&&(p=`${n.floating.width+l}px`,m=i?u:`${f}px`),{data:{x:p,y:m}}}});function vT(e){const[t,r="center"]=e.split("-");return[t,r]}var gT=iT,bT=lT,wT=dT,OT=mT,xT="Popover",[ET,kT]=vg(xT,[rT]),jT=rT(),[PT,NT]=ET(xT),ST=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=jT(r),c=e.useRef(null),[u,d]=e.useState(!1),[f=!1,p]=Cg({prop:o,defaultProp:i,onChange:a});return g(gT,{...s,children:g(PT,{scope:r,contentId:Ng(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:l,children:n})})};ST.displayName=xT;var CT="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...o}=t,i=NT(CT,n),a=jT(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect((()=>(l(),()=>s())),[l,s]),g(bT,{...a,...o,ref:r})})).displayName=CT;var zT="PopoverTrigger",TT=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=NT(zT,r),i=jT(r),a=hg(t,o.triggerRef),l=g(Eg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":HT(o.open),...n,ref:a,onClick:pg(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:g(bT,{asChild:!0,...i,children:l})}));TT.displayName=zT;var LT="PopoverPortal",[MT,IT]=ET(LT,{forceMount:void 0}),DT=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=NT(LT,t);return g(MT,{scope:t,forceMount:r,children:g(Qg,{present:r||i.open,children:g(ON,{asChild:!0,container:o,children:n})})})};DT.displayName=LT;var RT="PopoverContent",AT=e.forwardRef(((e,t)=>{const r=IT(RT,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=NT(RT,e.__scopePopover);return g(Qg,{present:n||i.open,children:i.modal?g(WT,{...o,ref:t}):g(BT,{...o,ref:t})})}));AT.displayName=RT;var WT=e.forwardRef(((t,r)=>{const n=NT(RT,t.__scopePopover),o=e.useRef(null),i=hg(r,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return gS(e)}),[]),g(dS,{as:bg,allowPinchZoom:!0,children:g(_T,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pg(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:pg(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:pg(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),BT=e.forwardRef(((t,r)=>{const n=NT(RT,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return g(_T,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),_T=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...d}=e,f=NT(RT,r),p=jT(r);return EN(),g(mN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g(sN,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:g(wT,{"data-state":HT(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),FT="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=NT(FT,r);return g(Eg.button,{type:"button",...n,ref:t,onClick:pg(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=FT;function HT(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=jT(r);return g(OT,{...o,...n,ref:t})})).displayName="PopoverArrow";var $T=ST,VT=TT,qT=DT,YT=AT;const UT=r((({type:e="single",value:r,onChange:n,placeholder:o="Select date",disabled:l=!1,minDate:s,maxDate:u,className:d,label:f,error:p,required:m=!1,clearable:y=!0,format:h="PPP",variant:v="tertiary",dataTestId:g},b)=>{const[w,O]=i(!1),[x,E]=i("range"!==e||!r||r instanceof Date?void 0:r);a((()=>{"range"!==e||!r||r instanceof Date||E(r)}),[r,e]);const k=c((t=>{if(t.preventDefault(),t.stopPropagation(),"single"===e)n?.(void 0);else{const e={from:void 0,to:void 0};n?.(e),E(e)}O(!1)}),[n,e]),j=c((()=>{if(!r)return"";if("single"===e&&r instanceof Date)return Zk(r,h);if("range"===e&&!(r instanceof Date)){const e=r;if(e.from){if(e.to){const t=Zk(e.from,"MMM d"),r=Zk(e.to,"MMM d"),n=Zk(e.from,"yyyy"),o=Zk(e.to,"yyyy");return n===o?`${t} - ${r}, ${n}`:`${t}, ${n} - ${r}, ${o}`}return Zk(e.from,h)}}return""}),[r,e,h]),P=c((e=>{if(!e)return E(void 0),void n?.(void 0);if(e instanceof Date)return n?.(e),void O(!1);const t={from:e.from,to:e.to};!e.from||e.from&&e.to?(E(t),n?.(t),e.from&&e.to&&O(!1)):E(t)}),[n]),N=c((()=>{const o={initialFocus:!0,disabled:e=>!!l||(!!(s&&e<s)||!!(u&&e>u)),classNames:{months:De("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0","sm:divide-x sm:divide-border"),month:De("space-y-4","first:pr-2 last:pl-2"),caption:"flex justify-center pt-1 relative items-center h-10",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:De("h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","border border-border rounded-md hover:bg-accent","flex items-center justify-center transition-colors"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:De("text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]","flex items-center justify-center"),row:"flex w-full mt-2",cell:De("relative p-0 text-center text-sm focus-within:relative focus-within:z-20","h-9 w-9 p-0","group","[&:has([aria-selected].day-range-start)]:rounded-l-md [&:has([aria-selected].day-range-start)]:bg-primary","[&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-range-end)]:bg-primary","[&:has([aria-selected])]:bg-primary/30","[&:has([aria-selected].day-range-middle)]:bg-primary/10"),day:De("h-9 w-9 p-0 font-normal","aria-selected:opacity-100","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:rounded-md","data-[today]:bg-accent/30 data-[today]:text-accent-foreground","rounded-md transition-colors","flex items-center justify-center","day-range-middle:bg-primary/10","day-range-start:bg-primary day-range-start:text-primary-foreground","day-range-end:bg-primary day-range-end:text-primary-foreground"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_range_middle:"day-range-middle",day_selected:De("bg-primary text-primary-foreground","hover:bg-primary/90","focus:bg-primary focus:text-primary-foreground"),day_today:"bg-accent/30 text-accent-foreground",day_outside:"text-muted-foreground opacity-50",day_disabled:"text-muted-foreground opacity-50",day_hidden:"invisible"}},i=e=>t.createElement("div",{className:"relative"},e,y&&r&&t.createElement("button",{type:"button",onClick:k,className:De("absolute top-2 right-2","p-1.5 rounded-md","bg-white/90 backdrop-blur-sm","hover:bg-accent/80 hover:text-destructive","focus:outline-none focus:ring-2 focus:ring-primary","transition-all duration-200","shadow-sm","z-50"),"aria-label":"Clear date selection"},t.createElement(tt,{className:"h-4 w-4"})));return i("single"===e?t.createElement(DP,{mode:"single",selected:r instanceof Date?r:void 0,onSelect:e=>{n?.(e),e&&O(!1)},...o}):t.createElement(DP,{mode:"range",selected:x,onSelect:P,numberOfMonths:2,...o}))}),[e,r,n,x,P,l,s,u,y,k]);return t.createElement("div",{ref:b,className:"relative w-full","data-testid":g},f&&t.createElement("div",{className:De("mb-2 text-sm font-medium",p&&"text-destructive")},f,m&&t.createElement("span",{className:"text-destructive ml-1"},"*")),t.createElement($T,{open:w,onOpenChange:O},t.createElement("div",{className:"relative"},t.createElement(VT,{asChild:!0},t.createElement(nt,{variant:v,className:De("w-full","inline-flex items-center","py-2 px-3","border border-input","hover:bg-accent/50","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",!r&&"text-muted-foreground",p&&"border-destructive focus:ring-destructive","transition-all duration-200","sm:text-sm md:text-base",d),disabled:l},t.createElement("div",{className:"inline-flex items-center gap-2 w-full pr-8"},t.createElement(He,{className:"h-4 w-4 flex-shrink-0"}),t.createElement("span",{className:"truncate flex-1 text-left","data-testid":"date-display"},j()||o)))),y&&r&&!w&&t.createElement("button",{type:"button",onClick:k,className:De("absolute right-2 top-1/2 -translate-y-1/2","p-1 rounded-md","hover:bg-accent/80","focus:outline-none focus:ring-2 focus:ring-primary","transition-all duration-200","z-10"),"aria-label":"Clear date","data-testid":"clear-button"},t.createElement(tt,{className:"h-4 w-4 hover:text-destructive transition-colors"}))),t.createElement(qT,null,t.createElement(YT,{className:De("z-50 rounded-lg border bg-popover p-3","shadow-lg ring-1 ring-black ring-opacity-5","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","w-auto min-w-[280px]","range"===e?"sm:min-w-[600px]":"sm:min-w-[320px]","max-w-[95vw]"),align:"start",sideOffset:4},t.createElement("div",{className:"w-full overflow-hidden"},t.createElement("div",{className:De("w-full","range"===e&&"overflow-x-auto")},N()))))),p&&t.createElement("p",{className:"mt-2 text-sm text-destructive"},p))}));UT.displayName="DatePicker";const GT=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),XT=()=>{const e=t.useContext(GT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function ZT(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function KT(){return JT(/^iPad/)||JT(/^Mac/)&&navigator.maxTouchPoints>1}function QT(){return JT(/^iPhone/)||KT()}function JT(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const eL="undefined"!=typeof window?f:a;function tL(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}const rL="undefined"!=typeof document&&window.visualViewport;function nL(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function oL(e){for(nL(e)&&(e=e.parentElement);e&&!nL(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const iL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let aL,lL=0;function sL(e={}){let{isDisabled:t}=e;eL((()=>{if(!t)return lL++,1===lL&&QT()&&(aL=function(){let e,t=0,r=r=>{e=oL(r.target),e===document.documentElement&&e===document.body||(t=r.changedTouches[0].pageY)},n=r=>{if(!e||e===document.documentElement||e===document.body)return void r.preventDefault();let n=r.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&n>t||o>=i&&n<t)&&r.preventDefault(),t=n)},o=e=>{let t=e.target;dL(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))},i=e=>{let t=e.target;dL(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",rL&&(rL.height<window.innerHeight?requestAnimationFrame((()=>{uL(t)})):rL.addEventListener("resize",(()=>uL(t)),{once:!0}))})))},a=()=>{window.scrollTo(0,0)},l=window.pageXOffset,s=window.pageYOffset,c=tL(function(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=tL(cL(document,"touchstart",r,{passive:!1,capture:!0}),cL(document,"touchmove",n,{passive:!1,capture:!0}),cL(document,"touchend",o,{passive:!1,capture:!0}),cL(document,"focus",i,!0),cL(window,"scroll",a));return()=>{c(),u(),window.scrollTo(l,s)}}()),()=>{lL--,0===lL&&(null==aL||aL())}}),[t])}function cL(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function uL(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=oL(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=n-r)}e=t.parentElement}}function dL(e){return e instanceof HTMLInputElement&&!iL.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function fL(...t){return e.useCallback(function(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}(...t),t)}const pL=new WeakMap;function mL(e,t,r=!1){if(!(e&&e instanceof HTMLElement))return;let n={};Object.entries(t).forEach((([t,r])=>{t.startsWith("--")?e.style.setProperty(t,r):(n[t]=e.style[t],e.style[t]=r)})),r||pL.set(e,n)}const yL=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function hL(e,t){if(!e)return null;const r=window.getComputedStyle(e),n=r.transform||r.webkitTransform||r.mozTransform;let o=n.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[yL(t)?13:12]):(o=n.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[yL(t)?5:4]):null)}function vL(e,t){if(!e)return()=>{};const r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}const gL={DURATION:.5,EASE:[.32,.72,0,1]},bL="vaul-dragging";function wL(e){const r=t.useRef(e);return t.useEffect((()=>{r.current=e})),t.useMemo((()=>(...e)=>null==r.current?void 0:r.current.call(r,...e)),[])}function OL({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:e,onChange:r}){const n=t.useState(e),[o]=n,i=t.useRef(o),a=wL(r);return t.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==e,l=a?e:o,s=wL(n),c=t.useCallback((t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)}),[a,e,i,s]);return[l,c]}let xL=null;const EL=t.forwardRef((function({...e},r){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:a,isOpen:l,modal:s,shouldAnimate:c}=XT(),u=fL(r,n),d=o&&o.length>0;if(!s)return null;const f=t.useCallback((e=>i(e)),[i]);return t.createElement(eC,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":l&&d?"true":"false","data-vaul-snap-points-overlay":l&&a?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})}));EL.displayName="Drawer.Overlay";const kL=t.forwardRef((function({onPointerDownOutside:e,style:r,onOpenAutoFocus:n,...o},i){const{drawerRef:a,onPress:s,onRelease:c,onDrag:u,keyboardIsOpen:d,snapPointsOffset:f,activeSnapPointIndex:p,modal:m,isOpen:y,direction:h,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:O}=XT(),[x,E]=t.useState(!1),k=fL(i,a),j=t.useRef(null),P=t.useRef(null),N=t.useRef(!1),S=v&&v.length>0;!function(){const{direction:e,isOpen:r,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=XT(),a=t.useRef(null),s=l((()=>document.body.style.backgroundColor),[]);function c(){return(window.innerWidth-26)/window.innerWidth}t.useEffect((()=>{if(r&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!i&&vL(document.body,{background:"black"}),vL(t,{transformOrigin:yL(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${gL.DURATION}s`,transitionTimingFunction:`cubic-bezier(${gL.EASE.join(",")})`});const r=vL(t,{borderRadius:"8px",overflow:"hidden",...yL(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{r(),a.current=window.setTimeout((()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")}),1e3*gL.DURATION)}}}),[r,n,s])}();function C(e){j.current=null,N.current=!1,c(e)}return t.useEffect((()=>{S&&window.requestAnimationFrame((()=>{E(!0)}))}),[]),t.createElement(tC,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":x?"true":"false","data-vaul-snap-points":y&&S?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...o,ref:k,style:f&&f.length>0?{"--snap-point-height":`${f[null!=p?p:0]}px`,...r}:r,onPointerDown:e=>{b||(null==o.onPointerDown||o.onPointerDown.call(o,e),j.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==n||n(e),O||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?d.current&&(d.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(P.current=e,b)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!j.current)return;const t=e.pageY-j.current.y,r=e.pageX-j.current.x,n="touch"===e.pointerType?10:2,i=((e,t,r=0)=>{if(N.current)return!0;const n=Math.abs(e.y),o=Math.abs(e.x),i=o>n,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=r)return i}else if(!(e.y*a<0)&&n>=0&&n<=r)return!i;return N.current=!0,!0})({x:r,y:t},h,n);i?u(e):(Math.abs(r)>n||Math.abs(t)>n)&&(j.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),j.current=null,N.current=!1,c(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),C(P.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),P.current&&C(P.current)}})}));kL.displayName="Drawer.Content";t.forwardRef((function({preventCycle:e=!1,children:r,...n},o){const{closeDrawer:i,isDragging:a,snapPoints:l,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:m}=XT(),y=t.useRef(null),h=t.useRef(!1);function v(){y.current&&window.clearTimeout(y.current),h.current=!1}return t.createElement("div",{onClick:function(){h.current?v():window.setTimeout((()=>{!function(){if(a||e||h.current)return void v();if(v(),!l||0===l.length)return void(u||i());if(s===l[l.length-1]&&u)return void i();const t=l.findIndex((e=>e===s));if(-1===t)return;const r=l[t+1];c(r)}()}),120)},onPointerCancel:v,onPointerDown:e=>{d&&p(e),y.current=window.setTimeout((()=>{h.current=!0}),250)},onPointerMove:e=>{d&&m(e)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},r))})).displayName="Drawer.Handle";const jL={Root:function({open:e,onOpenChange:r,children:n,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:l=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:y,fixed:h,modal:v=!0,onClose:g,nested:b,noBodyStyles:w=!1,direction:O="bottom",defaultOpen:x=!1,disablePreventScroll:E=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:j=!1,repositionInputs:P=!0,onAnimationEnd:N,container:S,autoFocus:C=!1}){var z,T;const[L=!1,M]=OL({defaultProp:x,prop:e,onChange:e=>{null==r||r(e),e||b||ue(),setTimeout((()=>{null==N||N(e)}),1e3*gL.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[I,D]=t.useState(!1),[R,A]=t.useState(!1),[W,B]=t.useState(!1),_=t.useRef(null),F=t.useRef(null),H=t.useRef(null),$=t.useRef(null),V=t.useRef(null),q=t.useRef(!1),Y=t.useRef(null),U=t.useRef(0),G=t.useRef(!1),X=t.useRef(!x),Z=t.useRef(0),K=t.useRef(null),Q=t.useRef((null==(z=K.current)?void 0:z.getBoundingClientRect().height)||0),J=t.useRef((null==(T=K.current)?void 0:T.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback((e=>{a&&e===ae.length-1&&(F.current=new Date)}),[]),{activeSnapPoint:re,activeSnapPointIndex:ne,setActiveSnapPoint:oe,onRelease:ie,snapPointsOffset:ae,onDrag:le,shouldFade:se,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:r,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:l,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=OL({prop:e,defaultProp:null==n?void 0:n[0],onChange:r}),[p,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect((()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const y=t.useMemo((()=>d===(null==n?void 0:n[n.length-1])||null),[n,d]),h=t.useMemo((()=>{var e;return null!=(e=null==n?void 0:n.findIndex((e=>e===d)))?e:null}),[n,d]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===d||!n,g=t.useMemo((()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const r="string"==typeof t;let n=0;if(r&&(n=parseInt(t,10)),yL(s)){const o=r?n:p?t*e.height:0;return p?"bottom"===s?e.height-o:-e.height+o:o}const o=r?n:p?t*e.width:0;return p?"right"===s?e.width-o:-e.width+o:o})))?t:[]}),[n,p,c]),b=t.useMemo((()=>null!==h?null==g?void 0:g[h]:null),[g,h]),w=t.useCallback((e=>{var t;const r=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;l(r),mL(o.current,{transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,transform:yL(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&r!==g.length-1&&void 0!==a&&r!==a&&r<a?mL(i.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,opacity:"0"}):mL(i.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(r,0)])}),[o.current,n,g,a,i,f]);return t.useEffect((()=>{if(d||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===d)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&w(g[r])}}),[d,e,n,g,w]),{isLastSnapPoint:y,activeSnapPoint:d,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!g||void 0===a)return null;const r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?h+1:h-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:f,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===a)return;const l="bottom"===s||"right"===s?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===h,d=e>0;if(h===a-1&&mL(i.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`}),!u&&r>2&&!d)return void(o?t():w(g[0]));if(!u&&r>2&&d&&g&&n)return void w(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-l)<Math.abs(e-l)?t:e)),p=yL(s)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&y&&n)return void w(g[n.length-1]);if(c&&e<0&&o&&t(),null===h)return;w(g[h+e])}else w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===s||"right"===s?b-e:b+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||mL(o.current,{transform:yL(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:y,drawerRef:K,fadeFromIndex:p,overlayRef:_,onSnapPointChange:te,direction:O,container:S,snapToSequentialPoint:k});sL({isDisabled:!L||R||!v||W||!I||!P||!E});const{restorePositionSetting:ue}=function({isOpen:e,modal:r,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:a}){const[l,s]=t.useState((()=>"undefined"!=typeof window?window.location.href:"")),c=t.useRef(0),u=t.useCallback((()=>{if(ZT()&&null===xL&&e&&!a){xL={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}))),300)}}),[e]),d=t.useCallback((()=>{if(ZT()&&null!==xL&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,xL),window.requestAnimationFrame((()=>{i&&l!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),xL=null}}),[l]);return t.useEffect((()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),t.useEffect((()=>{if(r)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||d())}}),[r,d]),t.useEffect((()=>{!n&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),r||window.setTimeout((()=>{d()}),500)):d())}),[e,o,l,r,n,u,d]),{restorePositionSetting:d}}({isOpen:L,modal:v,nested:null!=b&&b,hasBeenOpened:I,preventScrollRestoration:j,noBodyStyles:w});function de(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var r;let n=e;const o=null==(r=window.getSelection())?void 0:r.toString(),i=K.current?hL(K.current,O):null,a=new Date;if("SELECT"===n.tagName)return!1;if(n.hasAttribute("data-vaul-no-drag")||n.closest("[data-vaul-no-drag]"))return!1;if("right"===O||"left"===O)return!0;if(F.current&&a.getTime()-F.current.getTime()<500)return!1;if(null!==i&&("bottom"===O?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(V.current&&a.getTime()-V.current.getTime()<u&&0===i)return V.current=a,!1;if(t)return V.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(0!==n.scrollTop)return V.current=new Date,!1;if("dialog"===n.getAttribute("role"))return!0}n=n.parentNode}return!0}function pe(e){!function(){if(!R||!K.current)return;K.current.classList.remove(bL),q.current=!1,A(!1),$.current=new Date}(),null==g||g(),e||M(!1),setTimeout((()=>{a&&oe(a[0])}),1e3*gL.DURATION)}function me(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=hL(K.current,O);mL(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`}),mL(_.current,{transition:`opacity ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,opacity:"1"}),l&&t&&t>0&&L&&mL(e,{borderRadius:"8px",overflow:"hidden",...yL(O)?{transform:`scale(${de()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${de()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${gL.DURATION}s`,transitionTimingFunction:`cubic-bezier(${gL.EASE.join(",")})`},!0)}return t.useEffect((()=>{window.requestAnimationFrame((()=>{X.current=!0}))}),[]),t.useEffect((()=>{var e;function t(){if(!K.current||!P)return;if(dL(document.activeElement)||G.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,r=window.innerHeight;let n=r-t;const o=K.current.getBoundingClientRect().height||0,i=o>.8*r;ee.current||(ee.current=o);const l=K.current.getBoundingClientRect().top;if(Math.abs(Z.current-n)>60&&(G.current=!G.current),a&&a.length>0&&ae&&ne){n+=ae[ne]||0}if(Z.current=n,o>t||G.current){const e=K.current.getBoundingClientRect().height;let r=e;e>t&&(r=t-(i?l:26)),K.current.style.height=h?e-Math.max(n,0)+"px":`${Math.max(r,t-l)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(K.current.style.height=`${ee.current}px`);a&&a.length>0&&!G.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(n,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[ne,a,ae]),t.useEffect((()=>(L&&(mL(document.documentElement,{scrollBehavior:"auto"}),F.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let r=pL.get(e);r&&(e.style[t]=r[t])}(document.documentElement,"scrollBehavior")})),[L]),t.useEffect((()=>{v||window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"}))}),[v]),t.createElement(KS,{defaultOpen:x,onOpenChange:e=>{(d||e)&&(e?D(!0):pe(!0),M(e))},open:L},t.createElement(GT.Provider,{value:{activeSnapPoint:re,snapPoints:a,setActiveSnapPoint:oe,drawerRef:K,overlayRef:_,onOpenChange:r,onPress:function(e){var t,r;(d||a)&&(K.current&&!K.current.contains(e.target)||(Q.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(r=K.current)?void 0:r.getBoundingClientRect().width)||0,A(!0),H.current=new Date,QT()&&window.addEventListener("touchend",(()=>q.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),U.current=yL(O)?e.pageY:e.pageX))},onRelease:function(e){if(!R||!K.current)return;K.current.classList.remove(bL),q.current=!1,A(!1),$.current=new Date;const t=hL(K.current,O);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===H.current)return;const r=$.current.getTime()-H.current.getTime(),n=U.current-(yL(O)?e.pageY:e.pageX),o=Math.abs(n)/r;if(o>.05&&(B(!0),setTimeout((()=>{B(!1)}),200)),a){return ie({draggedDistance:n*("bottom"===O||"right"===O?1:-1),closeDrawer:pe,velocity:o,dismissible:d}),void(null==i||i(e,!0))}if("bottom"===O||"right"===O?n>0:n<0)return me(),void(null==i||i(e,!0));if(o>.4)return pe(),void(null==i||i(e,!1));var l;const s=Math.min(null!=(l=K.current.getBoundingClientRect().height)?l:0,window.innerHeight);var u;const f=Math.min(null!=(u=K.current.getBoundingClientRect().width)?u:0,window.innerWidth),p="left"===O||"right"===O;if(Math.abs(t)>=(p?f:s)*c)return pe(),void(null==i||i(e,!1));null==i||i(e,!0),me()},onDrag:function(e){var t;if(K.current&&R){const r="bottom"===O||"right"===O?1:-1,n=(U.current-(yL(O)?e.pageY:e.pageX))*r,i=n>0,s=a&&!d&&!i;if(s&&0===ne)return;const c=Math.abs(n),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===O||"top"===O?Q.current:J.current);const m=ce(c,i);if(null!==m&&(f=m),s&&f>=1)return;if(!q.current&&!fe(e.target,i))return;if(K.current.classList.add(bL),q.current=!0,mL(K.current,{transition:"none"}),mL(_.current,{transition:"none"}),a&&le({draggedDistance:n}),i&&!a){const e=(t=n,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*r;return void mL(K.current,{transform:yL(O)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const y=1-f;if((se||p&&ne===p-1)&&(null==o||o(e,f),mL(_.current,{opacity:`${y}`,transition:"none"},!0)),u&&_.current&&l){const e=Math.min(de()+f*(1-de()),1),t=8-8*f,r=Math.max(0,14-14*f);mL(u,{borderRadius:`${t}px`,transform:yL(O)?`scale(${e}) translate3d(0, ${r}px, 0)`:`scale(${e}) translate3d(${r}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=c*r;mL(K.current,{transform:yL(O)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:d,shouldAnimate:X,handleOnly:f,isOpen:L,isDragging:R,shouldFade:se,closeDrawer:pe,onNestedDrag:function(e,t){if(t<0)return;const r=(window.innerWidth-16)/window.innerWidth,n=r+t*(1-r),o=16*t-16;mL(K.current,{transform:yL(O)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,r=e?-16:0;Y.current&&window.clearTimeout(Y.current),mL(K.current,{transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,transform:yL(O)?`scale(${t}) translate3d(0, ${r}px, 0)`:`scale(${t}) translate3d(${r}px, 0, 0)`}),!e&&K.current&&(Y.current=setTimeout((()=>{const e=hL(K.current,O);mL(K.current,{transition:"none",transform:yL(O)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const r=yL(O)?window.innerHeight:window.innerWidth,n=t?(r-16)/r:1,o=t?-16:0;t&&mL(K.current,{transition:`transform ${gL.DURATION}s cubic-bezier(${gL.EASE.join(",")})`,transform:yL(O)?`scale(${n}) translate3d(0, ${o}px, 0)`:`scale(${n}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:G,modal:v,snapPointsOffset:ae,activeSnapPointIndex:ne,direction:O,shouldScaleBackground:l,setBackgroundColorOnScale:s,noBodyStyles:w,container:S,autoFocus:C}},n))},Content:kL,Overlay:EL,Portal:function(e){const r=XT(),{container:n=r.container,...o}=e;return t.createElement(JS,{container:n,...o})},Title:rC,Description:nC},PL=({shouldScaleBackground:t=!0,...r})=>e.createElement(jL.Root,{shouldScaleBackground:t,...r});PL.displayName="Drawer";const NL=jL.Portal,SL=e.forwardRef((({className:t,...r},n)=>e.createElement(jL.Overlay,{ref:n,className:De("fixed inset-0 z-50 bg-black/80",t),...r})));SL.displayName=jL.Overlay.displayName;const CL=e.forwardRef((({className:t,children:r,...n},o)=>e.createElement(NL,null,e.createElement(SL,null),e.createElement(jL.Content,{ref:o,className:De("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n},e.createElement("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),r))));CL.displayName="DrawerContent";const zL=({className:t,...r})=>e.createElement("div",{className:De("grid gap-1.5 p-4 text-center sm:text-left",t),...r});zL.displayName="DrawerHeader";const TL=e.forwardRef((({className:t,...r},n)=>e.createElement(jL.Title,{ref:n,className:De("text-lg font-semibold leading-none tracking-tight",t),...r})));TL.displayName=jL.Title.displayName;const LL=e.forwardRef((({className:t,...r},n)=>e.createElement(jL.Description,{ref:n,className:De("text-sm text-muted-foreground",t),...r})));LL.displayName=jL.Description.displayName;const ML={small:"h-64",medium:"h-80",large:"h-96",extraLarge:"h-[448px]",full:"h-screen"},IL=({children:e,isOpen:r,onClose:n,size:o="medium",title:i,description:a,showCloseButton:l=!0})=>{const s=ML[o];return t.createElement(PL,{open:r,onOpenChange:n},t.createElement(CL,{className:`fixed inset-x-0 bottom-0 ${s} bg-background`},t.createElement(zL,{className:"relative"},i?t.createElement(TL,null,i):t.createElement(TL,{className:"sr-only"},"Drawer Content"),a?t.createElement(LL,null,a):t.createElement(LL,{className:"sr-only"},i||"Drawer Content"," panel"),l&&t.createElement("button",{onClick:n,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100","aria-label":"Close drawer"},t.createElement(tt,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close"))),t.createElement("div",{className:"mt-6 px-4"},e)))},DL="right",RL={top:{in:"slide-in-from-top",out:"slide-out-to-top"},right:{in:"slide-in-from-right",out:"slide-out-to-right"},bottom:{in:"slide-in-from-bottom",out:"slide-out-to-bottom"},left:{in:"slide-in-from-left",out:"slide-out-to-left"}},AL=({children:e,side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:c,className:u,fullWidth:d,fullHeight:f,...p})=>{const m=s({side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:c,className:u,fullWidth:d,fullHeight:f});return a((()=>{m.current={side:r,overlay:n,showFooter:o,title:i,description:l,buttonText:c,className:u,fullWidth:d,fullHeight:f}}),[r,n,o,i,l,c,u,d,f]),t.createElement(KS,{...p},e)};AL.displayName="Sheet";const WL=t.forwardRef((({children:e,...r},n)=>t.createElement(QS,{...r,ref:n},e)));WL.displayName="SheetTrigger";const BL=oC;BL.displayName="SheetClose";const _L=JS;_L.displayName="SheetPortal";const FL=t.forwardRef((({className:e,...r},n)=>t.createElement(eC,{className:De("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:n})));FL.displayName=eC.displayName;const HL=t.forwardRef((({side:e=DL,className:r,children:n,overlay:o=!0,fullWidth:i=!1,fullHeight:a=!0,...l},s)=>{const c=RL[e]?e:DL;return t.createElement(_L,null,o&&t.createElement(FL,null),t.createElement(tC,{ref:s,className:De("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a?"h-full":"h-auto",i?"w-full":"w-3/4","left"===c&&"inset-y-0 left-0 border-r","right"===c&&"inset-y-0 right-0 border-l","top"===c&&"inset-x-0 top-0 border-b","bottom"===c&&"inset-x-0 bottom-0 border-t",`data-[state=closed]:${RL[c].out}`,`data-[state=open]:${RL[c].in}`,r),...l},n,t.createElement(oC,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},t.createElement(tt,{className:"h-4 w-4"}),t.createElement("span",{className:"sr-only"},"Close"))))}));HL.displayName=tC.displayName;const $L=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:De("flex flex-col space-y-2 text-center sm:text-left",e),...n},r)));$L.displayName="SheetHeader";const VL=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,className:De("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n},r)));VL.displayName="SheetFooter";const qL=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement(rC,{ref:o,className:De("text-lg font-semibold text-foreground",e),...n},r)));qL.displayName=rC.displayName;const YL=t.forwardRef((({className:e,children:r,...n},o)=>t.createElement(nC,{ref:o,className:De("text-sm text-muted-foreground",e),...n},r)));YL.displayName=nC.displayName;t.forwardRef((({side:e=DL,overlay:r=!0,showFooter:n=!1,title:o,description:i,buttonText:a="Close",children:l,className:s,contentProps:c,fullWidth:u,fullHeight:d,...f},p)=>{const m=RL[e]?e:DL;return t.createElement(AL,{...f},t.createElement(HL,{side:m,overlay:r,className:s,fullWidth:u,fullHeight:d,...c},t.createElement("div",{ref:p},(o||i)&&t.createElement($L,null,o&&t.createElement(qL,null,o),i&&t.createElement(YL,null,i)),t.createElement("div",{className:"py-4"},l),n&&t.createElement(VL,null,t.createElement(BL,{className:"px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90"},a)))))})).displayName="SheetDrawer";const UL=$T;function GL(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function XL(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every((r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:GL(n)&&GL(o)?XL(n,o):n===o}))}function ZL(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}function KL(e){return"number"==typeof e}function QL(e){return"string"==typeof e}function JL(e){return"boolean"==typeof e}function eM(e){return"[object Object]"===Object.prototype.toString.call(e)}function tM(e){return Math.abs(e)}function rM(e){return Math.sign(e)}function nM(e,t){return tM(e-t)}function oM(e){return cM(e).map(Number)}function iM(e){return e[aM(e)]}function aM(e){return Math.max(0,e.length-1)}function lM(e,t){return t===aM(e)}function sM(e,t=0){return Array.from(Array(e),((e,r)=>t+r))}function cM(e){return Object.keys(e)}function uM(e,t){return[e,t].reduce(((e,t)=>(cM(t).forEach((r=>{const n=e[r],o=t[r],i=eM(n)&&eM(o);e[r]=i?uM(n,o):o})),e)),{})}function dM(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function fM(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter((e=>e()))}};return t}function pM(e,t,r,n){const o=fM(),i=1e3/60;let a=null,l=0,s=0;function c(e){if(!s)return;a||(a=e,r(),r());const o=e-a;for(a=e,l+=o;l>=i;)r(),l-=i;n(l/i),s&&(s=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(s),a=null,l=0,s=0}return{init:function(){o.add(e,"visibilitychange",(()=>{e.hidden&&(a=null,l=0)}))},destroy:function(){u(),o.clear()},start:function(){s||(s=t.requestAnimationFrame(c))},stop:u,update:r,render:n}}function mM(e=0,t=0){const r=tM(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function yM(e,t,r){const{constrain:n}=mM(0,e),o=e+1;let i=a(t);function a(e){return r?tM((o+e)%o):n(e)}function l(){return i}function s(){return yM(e,l(),r)}const c={get:l,set:function(e){return i=a(e),c},add:function(e){return s().set(l()+e)},clone:s};return c}function hM(e,t,r,n,o,i,a,l,s,c,u,d,f,p,m,y,h,v,g){const{cross:b,direction:w}=e,O=["INPUT","SELECT","TEXTAREA"],x={passive:!1},E=fM(),k=fM(),j=mM(50,225).constrain(p.measure(20)),P={mouse:300,touch:400},N={mouse:500,touch:600},S=m?43:25;let C=!1,z=0,T=0,L=!1,M=!1,I=!1,D=!1;function R(e){if(!dM(e,n)&&e.touches.length>=2)return A(e);const t=i.readPoint(e),r=i.readPoint(e,b),a=nM(t,z),s=nM(r,T);if(!M&&!D){if(!e.cancelable)return A(e);if(M=a>s,!M)return A(e)}const u=i.pointerMove(e);a>y&&(I=!0),c.useFriction(.3).useDuration(.75),l.start(),o.add(w(u)),e.preventDefault()}function A(e){const t=u.byDistance(0,!1).index!==d.get(),r=i.pointerUp(e)*(m?N:P)[D?"mouse":"touch"],n=function(e,t){const r=d.add(-1*rM(e)),n=u.byDistance(e,!m).distance;return m||tM(e)<j?n:h&&t?.5*n:u.byIndex(r.get(),0).distance}(w(r),t),o=function(e,t){if(0===e||0===t)return 0;if(tM(e)<=tM(t))return 0;const r=nM(tM(e),tM(t));return tM(r/e)}(r,n),a=S-10*o,l=v+o/50;M=!1,L=!1,k.clear(),c.useDuration(a).useFriction(l),s.distance(n,!m),D=!1,f.emit("pointerUp")}function W(e){I&&(e.stopPropagation(),e.preventDefault(),I=!1)}return{init:function(e){if(!g)return;function l(l){(JL(g)||g(e,l))&&function(e){const l=dM(e,n);if(D=l,I=m&&l&&!e.buttons&&C,C=nM(o.get(),a.get())>=2,l&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return O.includes(t)}(e.target))return;L=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=D?r:t;k.add(e,"touchmove",R,x).add(e,"touchend",A).add(e,"mousemove",R,x).add(e,"mouseup",A)}(),z=i.readPoint(e),T=i.readPoint(e,b),f.emit("pointerDown")}(l)}const s=t;E.add(s,"dragstart",(e=>e.preventDefault()),x).add(s,"touchmove",(()=>{}),x).add(s,"touchend",(()=>{})).add(s,"touchstart",l).add(s,"mousedown",l).add(s,"touchcancel",A).add(s,"contextmenu",A).add(s,"click",W,!0)},destroy:function(){E.clear(),k.clear()},pointerDown:function(){return L}}}function vM(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(dM(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),l=o(e)-o(n)>170,s=t/a;return a&&!l&&tM(s)>.1?s:0},readPoint:i}}function gM(e,t,r,n,o,i,a){const l=[e].concat(n);let s,c,u=[],d=!1;function f(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=f(e),u=n.map(f),s=new ResizeObserver((r=>{(JL(i)||i(o,r))&&function(r){for(const i of r){if(d)return;const r=i.target===e,a=n.indexOf(i.target),l=r?c:u[a];if(tM(f(r?e:n[a])-l)>=.5){o.reInit(),t.emit("resize");break}}}(r)})),r.requestAnimationFrame((()=>{l.forEach((e=>s.observe(e)))})))},destroy:function(){d=!0,s&&s.disconnect()}}}function bM(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),l=mM(.1,.99);let s=!1;function c(){return!s&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const s=e.reachedMin(t.get())?"min":"max",u=tM(e[s]-t.get()),d=r.get()-t.get(),f=l.constrain(u/a);r.subtract(d*f),!o&&tM(d)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){s=!e}}}function wM(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=mM(o,i);return{loop:function(t){if(!function(e){return 1===e?l(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach((e=>e.add(o)))}}}function OM(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:l}=n;function s(e){return e.concat().sort(((e,t)=>tM(e)-tM(t)))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return s(o);const i=o.filter((e=>rM(e)===n));return i.length?s(i):iM(o)-r}const u={byDistance:function(r,n){const s=o.get()+r,{index:u,distance:d}=function(r){const n=e?a(r):l(r),o=t.map(((e,t)=>({diff:c(e-n,0),index:t}))).sort(((e,t)=>tM(e.diff)-tM(t.diff))),{index:i}=o[0];return{index:i,distance:n}}(s),f=!e&&i(s);return!n||f?{index:u,distance:r}:{index:u,distance:r+c(t[u]-d,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return u}function xM(e,t,r,n,o,i,a,l){const s={passive:!0,capture:!0};let c=0;function u(e){"Tab"===e.code&&(c=(new Date).getTime())}const d={init:function(d){l&&(i.add(document,"keydown",u,!1),t.forEach(((t,u)=>{i.add(t,"focus",(t=>{(JL(l)||l(d,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex((e=>e.includes(t)));KL(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(u)}),s)})))}};return d}function EM(e){let t=e;function r(e){return KL(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function kM(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(l=e.direction(t),Math.round(100*l)/100);var l;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function jM(e,t,r,n,o,i,a,l,s){const c=oM(o),u=oM(o).reverse(),d=function(){const e=a[0];return m(p(u,e),r,!1)}().concat(function(){const e=t-a[0]-1;return m(p(c,e),-r,!0)}());function f(e,t){return e.reduce(((e,t)=>e-o[t]),t)}function p(e,t){return e.reduce(((e,r)=>f(e,t)>0?e.concat([r]):e),[])}function m(o,a,c){const u=function(e){return i.map(((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e})))}(a);return o.map((t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=u[t][i];return{index:t,loopPoint:a,slideLocation:EM(-1),translate:kM(e,s[t]),target:()=>l.get()>a?n:o}}))}const y={canLoop:function(){return d.every((({index:e})=>f(c.filter((t=>t!==e)),t)<=.1))},clear:function(){d.forEach((e=>e.translate.clear()))},loop:function(){d.forEach((e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))}))},loopPoints:d};return y}function PM(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver((e=>{o||(JL(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)})),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function NM(e,t,r,n){const o={};let i,a=null,l=null,s=!1;const c={init:function(){i=new IntersectionObserver((e=>{s||(e.forEach((e=>{const r=t.indexOf(e.target);o[r]=e})),a=null,l=null,r.emit("slidesInView"))}),{root:e.parentElement,threshold:n}),t.forEach((e=>i.observe(e)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(e=!0){if(e&&a)return a;if(!e&&l)return l;const t=function(e){return cM(o).reduce(((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t}),[])}(e);return e&&(a=t),e||(l=t),t}};return c}function SM(e,t,r,n,o,i,a,l,s){const{startEdge:c,endEdge:u,direction:d}=e,f=KL(r);const p={groupSlides:function(e){return f?function(e,t){return oM(e).filter((e=>e%t==0)).map((r=>e.slice(r,r+t)))}(e,r):function(e){return e.length?oM(e).reduce(((r,f,p)=>{const m=iM(r)||0,y=0===m,h=f===aM(e),v=o[c]-i[m][c],g=o[c]-i[f][u],b=!n&&y?d(a):0,w=tM(g-(!n&&h?d(l):0)-(v+b));return p&&w>t+s&&r.push(f),h&&r.push(e.length),r}),[]).map(((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)})):[]}(e)}};return p}function CM(e,t,r,n,o,i,a){const{align:l,axis:s,direction:c,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:y,slidesToScroll:h,skipSnaps:v,containScroll:g,watchResize:b,watchSlides:w,watchDrag:O,watchFocus:x}=i,E={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},k=E.measure(t),j=r.map(E.measure),P=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(s,c),N=P.measureSize(k),S=function(e){return{measure:function(t){return e*(t/100)}}}(N),C=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return QL(e)?r[e](n):e(t,n,o)}};return o}(l,N),z=!d&&!!g,T=d||!!g,{slideSizes:L,slideSizesWithGaps:M,startGap:I,endGap:D}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:l,endEdge:s}=e,c=r[0]&&o,u=function(){if(!c)return 0;const e=r[0];return tM(t[l]-e[l])}(),d=function(){if(!c)return 0;const e=i.getComputedStyle(iM(n));return parseFloat(e.getPropertyValue(`margin-${s}`))}(),f=r.map(a),p=r.map(((e,t,r)=>{const n=!t,o=lM(r,t);return n?f[t]+u:o?f[t]+d:r[t+1][l]-e[l]})).map(tM);return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}(P,k,j,r,T,o),R=SM(P,N,h,d,k,j,I,D,2),{snaps:A,snapsAligned:W}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:l}=o,s=l(n).map((e=>iM(e)[a]-e[0][i])).map(tM).map(t.measure),c=n.map((e=>r[i]-e[i])).map((e=>-tM(e))),u=l(c).map((e=>e[0])).map(((e,t)=>e+s[t]));return{snaps:c,snapsAligned:u}}(P,C,k,j,R),B=-iM(A)+iM(M),{snapsContained:_,scrollContainLimit:F}=function(e,t,r,n,o){const i=mM(-t+e,0),a=r.map(((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),l=!t,s=lM(r,t);return l?o:s||c(n,a)?n:c(o,a)?o:a})).map((e=>parseFloat(e.toFixed(3)))),l=function(){const e=a[0],t=iM(a);return mM(a.lastIndexOf(e),a.indexOf(t)+1)}(),s=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:s}=l;return a.slice(r,s)}();function c(e,t){return nM(e,t)<=1}return{snapsContained:s,scrollContainLimit:l}}(N,B,W,g,2),H=z?_:W,{limit:$}=function(e,t,r){const n=t[0];return{limit:mM(r?n-e:iM(t),n)}}(B,H,d),V=yM(aM(H),u,d),q=V.clone(),Y=oM(r),U=pM(n,o,(()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(le)),(e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:l,animation:s,eventHandler:c,scrollBounds:u,options:{loop:d}},f)=>{const p=e.settled(),m=!u.shouldConstrain(),y=d?p:p&&m,h=y&&!l.pointerDown();h&&s.stop();const v=r.get()*f+o.get()*(1-f);n.set(v),d&&(i.loop(e.direction()),a.loop()),t.to(n.get()),h&&c.emit("settle"),y||c.emit("scroll")})(le,e))),G=H[V.get()],X=EM(G),Z=EM(G),K=EM(G),Q=EM(G),J=function(e,t,r,n,o,i){let a=0,l=0,s=o,c=i,u=e.get(),d=0;function f(e){return s=e,m}function p(e){return c=e,m}const m={direction:function(){return l},duration:function(){return s},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return s?(r.set(e),a+=t/s,a*=c,u+=a,e.add(a),o=u-d):(a=0,r.set(n),e.set(n),o=t),l=rM(o),d=u,m},settled:function(){return tM(n.get()-t.get())<.001},useBaseFriction:function(){return p(i)},useBaseDuration:function(){return f(o)},useFriction:p,useDuration:f};return m}(X,K,Z,Q,f,.68),ee=OM(d,H,B,$,Q),te=function(e,t,r,n,o,i,a){function l(o){const l=o.distance,s=o.index!==t.get();i.add(l),l&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),s&&(r.set(t.get()),t.set(o.index),a.emit("select"))}return{distance:function(e,t){l(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);l(o.byIndex(n.get(),r))}}}(U,V,q,J,ee,Q,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}($),ne=fM(),oe=NM(t,r,a,y),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:l,max:s}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(l,s).map(((e,t,r)=>{const n=!t,o=lM(r,t);return n?sM(iM(r[0])+1):o?sM(aM(i)-iM(r)[0]+1,iM(r)[0]):e}))}();return{slideRegistry:c}}(z,g,H,F,R,Y),ae=xM(e,r,ie,te,J,ne,a,x),le={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:j,animation:U,axis:P,dragHandler:hM(P,e,n,o,Q,vM(P,o),X,U,te,J,ee,V,a,S,p,m,v,.68,O),eventStore:ne,percentOfView:S,index:V,indexPrevious:q,limit:$,location:X,offsetLocation:K,previousLocation:Z,options:i,resizeHandler:gM(t,a,o,r,P,b,E),scrollBody:J,scrollBounds:bM($,K,Q,J,S),scrollLooper:wM(B,$,K,[X,K,Z,Q]),scrollProgress:re,scrollSnapList:H.map(re.get),scrollSnaps:H,scrollTarget:ee,scrollTo:te,slideLooper:jM(P,N,B,L,M,A,H,K,r),slideFocus:ae,slidesHandler:PM(t,a,w),slidesInView:oe,slideIndexes:Y,slideRegistry:ie,slidesToScroll:R,target:Q,translate:kM(P,t)};return le}e.forwardRef((({className:t,align:r="center",sideOffset:n=4,side:o="bottom",...i},a)=>e.createElement(qT,null,e.createElement(YT,{ref:a,align:r,sideOffset:n,side:o,className:De("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[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",t),...i})))).displayName=YT.displayName;const zM={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function TM(e){function t(e,t){return uM(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=cM(n).filter((t=>e.matchMedia(t).matches)).map((e=>n[e])).reduce(((e,r)=>t(e,r)),{});return t(r,o)},optionsMediaQueries:function(t){return t.map((e=>cM(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}};return r}function LM(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=TM(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(r,e))),n.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}};return r}(i),l=fM(),s=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach((r=>r(e,t))),n},off:function(e,o){return t[e]=r(e).filter((e=>e!==o)),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=s,y=P;let h,v,g,b,w=!1,O=c(zM,LM.globalOptions),x=c(O),E=[];function k(t){const r=CM(e,g,b,n,o,t,s);if(t.loop&&!r.slideLooper.canLoop()){return k(Object.assign({},t,{loop:!1}))}return r}function j(t,r){w||(O=c(O,t),x=u(O),E=r||E,function(){const{container:t,slides:r}=x,n=QL(t)?e.querySelector(t):t;g=n||e.children[0];const o=QL(r)?g.querySelectorAll(r):r;b=[].slice.call(o||g.children)}(),h=k(x),d([O,...E.map((({options:e})=>e))]).forEach((e=>l.add(e,"change",P))),x.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(z),h.eventHandler.init(z),h.resizeHandler.init(z),h.slidesHandler.init(z),h.options.loop&&h.slideLooper.loop(),g.offsetParent&&b.length&&h.dragHandler.init(z),v=a.init(z,E)))}function P(e,t){const r=C();N(),j(c({startIndex:r},e),t),s.emit("reInit")}function N(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),a.destroy(),l.clear()}function S(e,t,r){x.active&&!w&&(h.scrollBody.useBaseFriction().useDuration(!0===t?0:x.duration),h.scrollTo.index(e,r||0))}function C(){return h.index.get()}const z={canScrollNext:function(){return h.index.add(1).get()!==C()},canScrollPrev:function(){return h.index.add(-1).get()!==C()},containerNode:function(){return g},internalEngine:function(){return h},destroy:function(){w||(w=!0,l.clear(),N(),s.emit("destroy"),s.clear())},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return h.indexPrevious.get()},reInit:y,rootNode:function(){return e},scrollNext:function(e){S(h.index.add(1).get(),e,-1)},scrollPrev:function(e){S(h.index.add(-1).get(),e,1)},scrollProgress:function(){return h.scrollProgress.get(h.offsetLocation.get())},scrollSnapList:function(){return h.scrollSnapList},scrollTo:S,selectedScrollSnap:C,slideNodes:function(){return b},slidesInView:function(){return h.slidesInView.get()},slidesNotInView:function(){return h.slidesInView.get(!1)}};return j(t,r),setTimeout((()=>s.emit("init")),0),z}function MM(e={},t=[]){const r=s(e),n=s(t),[o,l]=i(),[u,d]=i(),f=c((()=>{o&&o.reInit(r.current,n.current)}),[o]);return a((()=>{XL(r.current,e)||(r.current=e,f())}),[e,f]),a((()=>{(function(e,t){if(e.length!==t.length)return!1;const r=ZL(e),n=ZL(t);return r.every(((e,t)=>XL(e,n[t])))})(n.current,t)||(n.current=t,f())}),[t,f]),a((()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&u){LM.globalOptions=MM.globalOptions;const e=LM(u,r.current,n.current);return l(e),()=>e.destroy()}l(void 0)}),[u,l]),[d,o]}LM.globalOptions=void 0,MM.globalOptions=void 0;const IM=5e3,DM=m(null),RM=r((({children:e,orientation:r="x",showArrows:n=!0,showDots:o=!0,autoPlay:s=!1,interval:u=IM,disabled:d=!1,onSlideChange:f,className:p,...m},y)=>{const h="y"===r,[g,b]=MM({loop:!0,align:"start",axis:h?"y":"x",dragFree:!1,slidesToScroll:1,containScroll:"keepSnaps"}),[w,O]=i(!0),[x,E]=i(!0),[k,j]=i(0),P=v.count(e),N=l((()=>({selectedIndex:k,scrollNext:()=>b?.scrollNext(),scrollPrev:()=>b?.scrollPrev(),canScrollNext:!x,canScrollPrev:!w,setSelectedIndex:e=>{b?.scrollTo(e)}})),[b,x,w,k]),S=c((e=>{j(e.selectedScrollSnap()),O(!e.canScrollPrev()),E(!e.canScrollNext()),f?.(e.selectedScrollSnap())}),[f]);return a((()=>{b&&(S(b),b.on("select",(()=>S(b))),b.on("reInit",(()=>S(b))))}),[b,S]),a((()=>{if(!b||!s)return;const e=setInterval((()=>{x?b.scrollTo(0):b.scrollNext()}),u);return()=>clearInterval(e)}),[b,s,u,x]),t.createElement(DM.Provider,{value:N},t.createElement("div",{ref:y,className:De("relative group",h?"h-96":"w-full",p),role:"region","aria-roledescription":"carousel",style:{perspective:"1000px",perspectiveOrigin:"center center",overflow:"hidden"},...m},t.createElement("div",{ref:g,className:De("overflow-hidden h-full","rounded-2xl"),style:{WebkitMaskImage:"-webkit-radial-gradient(white, black)",willChange:"transform",transformStyle:"preserve-3d"}},t.createElement("div",{className:De("flex will-change-transform h-full",h?"flex-col":"flex-row")},v.map(e,((e,r)=>t.createElement("div",{className:De("transform transition-all duration-700 ease-out",h?"min-h-0 h-full w-full flex-[0_0_100%]":"min-w-0 w-full flex-[0_0_100%]",r===k?"scale-100 rotate-0 translate-z-0 opacity-100":"scale-95 opacity-0 -translate-z-8"),key:r},e))))),t.createElement("div",{className:De("absolute z-20 bg-background/30 backdrop-blur-xl px-4 py-2 rounded-full text-sm font-medium text-foreground shadow-xl border border-primary/20 transition-all duration-500 hover:bg-background/50 overflow-hidden group-hover:scale-105",h?"top-4 right-1/2 translate-x-1/2":"bottom-6 right-6")},t.createElement("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),t.createElement("span",{className:"text-primary font-bold"},k+1),t.createElement("span",{className:"mx-1 opacity-50"},"/"),t.createElement("span",null,P)),n&&t.createElement(t.Fragment,null,t.createElement("div",{className:De("absolute z-10 transition-opacity duration-300",h?"right-4 top-4":"top-1/2 -translate-y-1/2 left-4 opacity-0 group-hover:opacity-100")},t.createElement(nt,{variant:"secondary",size:"small",className:De("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:d||w,onClick:()=>N.scrollPrev()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),h?t.createElement(Ue,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(qe,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Previous slide"))),t.createElement("div",{className:De("absolute z-10 transition-opacity duration-300",h?"right-4 bottom-4":"top-1/2 -translate-y-1/2 right-4 opacity-0 group-hover:opacity-100")},t.createElement(nt,{variant:"secondary",size:"small",className:De("h-12 w-12 rounded-full bg-background/20 backdrop-blur-xl shadow-xl border border-primary/20 transition-all duration-500 ease-out hover:bg-background/40 hover:scale-110 hover:border-primary/50 hover:shadow-primary/30 group/btn"),disabled:d||x,onClick:()=>N.scrollNext()},t.createElement("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover/btn:opacity-100 rounded-full transition-opacity duration-500"}),h?t.createElement(Ve,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}):t.createElement(Ye,{className:"h-5 w-5 text-foreground relative z-10 group-hover/btn:text-primary transition-colors duration-300"}),t.createElement("span",{className:"sr-only"},"Next slide")))),o&&t.createElement("div",{className:De("absolute z-10",h?"right-4 top-1/2 -translate-y-1/2 flex flex-col gap-3 px-2 py-4 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20":"bottom-6 left-1/2 -translate-x-1/2 flex gap-3 px-4 py-2 rounded-full bg-background/10 backdrop-blur-md transition-all duration-700 group-hover:bg-background/20 border border-primary/10 group-hover:border-primary/20")},v.map(e,((e,r)=>t.createElement("button",{key:r,type:"button",className:De("h-8 w-8 flex items-center justify-center transition-all duration-500 ease-out hover:scale-125",r===k?"scale-110":"opacity-60 hover:opacity-90"),disabled:d,onClick:()=>N.setSelectedIndex(r)},r===k?t.createElement("div",{className:"w-2 h-2 rounded-full bg-primary shadow-md shadow-primary/30 ring-4 ring-primary/20 transition-all duration-500"}):t.createElement("div",{className:"w-2 h-2 rounded-full bg-muted transition-all duration-500 hover:bg-primary/50"}),t.createElement("span",{className:"sr-only"},"Jump to slide ",r+1)))))))}));RM.displayName="Carousel";r((({className:e,children:r,...n},o)=>t.createElement("div",{ref:o,role:"group","aria-roledescription":"slide",className:De("min-w-0 shrink-0 grow-0 basis-full h-full relative overflow-hidden rounded-xl backdrop-blur-lg transition-all duration-700 ease-out will-change-transform shadow-2xl",e),...n},t.createElement("div",{className:"absolute inset-0 bg-gradient-to-br from-background/5 via-primary/5 to-background/5 opacity-80 mix-blend-overlay pointer-events-none"}),t.createElement("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 bg-gradient-to-t from-primary/10 to-transparent transition-opacity duration-700 ease-out pointer-events-none"}),t.createElement("div",{className:"absolute top-0 right-0 w-24 h-24 -translate-y-8 translate-x-8 bg-primary/20 rounded-full blur-3xl pointer-events-none"}),t.createElement("div",{className:"absolute bottom-0 left-0 w-32 h-32 translate-y-16 -translate-x-16 bg-secondary/10 rounded-full blur-3xl pointer-events-none"}),r))).displayName="CarouselItem";var AM=Object.defineProperty,WM=Object.defineProperties,BM=Object.getOwnPropertyDescriptors,_M=Object.getOwnPropertySymbols,FM=Object.prototype.hasOwnProperty,HM=Object.prototype.propertyIsEnumerable,$M=(e,t,r)=>t in e?AM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var VM=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");var qM=e.createContext({}),YM=e.forwardRef(((t,r)=>{var n,o,i,a,l,s=t,{value:c,onChange:u,maxLength:d,textAlign:f="left",pattern:p,placeholder:m,inputMode:y="numeric",onComplete:h,pushPasswordManagerStrategy:v="increase-width",pasteTransformer:g,containerClassName:b,noScriptCSSFallback:w=GM,render:O,children:x}=s,E=((e,t)=>{var r={};for(var n in e)FM.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&_M)for(var n of _M(e))t.indexOf(n)<0&&HM.call(e,n)&&(r[n]=e[n]);return r})(s,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[k,j]=e.useState("string"==typeof E.defaultValue?E.defaultValue:""),P=null!=c?c:k,N=function(t){let r=e.useRef();return e.useEffect((()=>{r.current=t})),r.current}(P),S=e.useCallback((e=>{null==u||u(e),j(e)}),[u]),C=e.useMemo((()=>p?"string"==typeof p?new RegExp(p):p:null),[p]),z=e.useRef(null),T=e.useRef(null),L=e.useRef({value:P,onChange:S,isIOS:"undefined"!=typeof window&&(null==(o=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:o.call(n,"-webkit-touch-callout","none"))}),M=e.useRef({prev:[null==(i=z.current)?void 0:i.selectionStart,null==(a=z.current)?void 0:a.selectionEnd,null==(l=z.current)?void 0:l.selectionDirection]});e.useImperativeHandle(r,(()=>z.current),[]),e.useEffect((()=>{let e=z.current,t=T.current;if(!e||!t)return;function r(){if(document.activeElement!==e)return B(null),void F(null);let t,r=e.selectionStart,n=e.selectionEnd,o=e.selectionDirection,i=e.maxLength,a=e.value,l=M.current.prev,s=-1,c=-1;if(0!==a.length&&null!==r&&null!==n){let e=r===n,o=r===a.length&&a.length<i;if(e&&!o){let e=r;if(0===e)s=0,c=1,t="forward";else if(e===i)s=e-1,c=e,t="backward";else if(i>1&&a.length>1){let r=0;if(null!==l[0]&&null!==l[1]){t=e<l[1]?"backward":"forward";let n=l[0]===l[1]&&l[0]<i;"backward"===t&&!n&&(r=-1)}s=r+e,c=r+e+1}}-1!==s&&-1!==c&&s!==c&&z.current.setSelectionRange(s,c,t)}let u=-1!==s?s:r,d=-1!==c?c:n,f=null!=t?t:o;B(u),F(d),M.current.prev=[u,d,f]}if(L.current.value!==e.value&&L.current.onChange(e.value),M.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",r,{capture:!0}),r(),document.activeElement===e&&A(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="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;";UM(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),UM(e.sheet,`[data-input-otp]:autofill { ${t} }`),UM(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),UM(e.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; } }"),UM(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let n=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};n();let o=new ResizeObserver(n);return o.observe(e),()=>{document.removeEventListener("selectionchange",r,{capture:!0}),o.disconnect()}}),[]);let[I,D]=e.useState(!1),[R,A]=e.useState(!1),[W,B]=e.useState(null),[_,F]=e.useState(null);e.useEffect((()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}((()=>{var e,t,r,n;null==(e=z.current)||e.dispatchEvent(new Event("input"));let o=null==(t=z.current)?void 0:t.selectionStart,i=null==(r=z.current)?void 0:r.selectionEnd,a=null==(n=z.current)?void 0:n.selectionDirection;null!==o&&null!==i&&(B(o),F(i),M.current.prev=[o,i,a])}))}),[P,R]),e.useEffect((()=>{void 0!==N&&P!==N&&N.length<d&&P.length===d&&(null==h||h(P))}),[d,h,N,P]);let H=function({containerRef:t,inputRef:r,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=e.useState(!1),[l,s]=e.useState(!1),[c,u]=e.useState(!1),d=e.useMemo((()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&i&&l),[i,l,n]),f=e.useCallback((()=>{let e=t.current,o=r.current;if(!e||!o||c||"none"===n)return;let i=e,l=i.getBoundingClientRect().left+i.offsetWidth-18,s=i.getBoundingClientRect().top+i.offsetHeight/2;0===document.querySelectorAll(VM).length&&document.elementFromPoint(l,s)===e||(a(!0),u(!0))}),[t,r,c,n]);return e.useEffect((()=>{let e=t.current;if(!e||"none"===n)return;function r(){let t=window.innerWidth-e.getBoundingClientRect().right;s(t>=40)}r();let o=setInterval(r,1e3);return()=>{clearInterval(o)}}),[t,n]),e.useEffect((()=>{let e=o||document.activeElement===r.current;if("none"===n||!e)return;let t=setTimeout(f,0),i=setTimeout(f,2e3),a=setTimeout(f,5e3),l=setTimeout((()=>{u(!0)}),6e3);return()=>{clearTimeout(t),clearTimeout(i),clearTimeout(a),clearTimeout(l)}}),[r,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:T,inputRef:z,pushPasswordManagerStrategy:v,isFocused:R}),$=e.useCallback((e=>{let t=e.currentTarget.value.slice(0,d);t.length>0&&C&&!C.test(t)?e.preventDefault():("string"==typeof N&&t.length<N.length&&document.dispatchEvent(new Event("selectionchange")),S(t))}),[d,S,N,C]),V=e.useCallback((()=>{var e;if(z.current){let t=Math.min(z.current.value.length,d-1),r=z.current.value.length;null==(e=z.current)||e.setSelectionRange(t,r),B(t),F(r)}A(!0)}),[d]),q=e.useCallback((e=>{var t,r;let n=z.current;if(!(g||L.current.isIOS&&e.clipboardData&&n))return;let o=e.clipboardData.getData("text/plain"),i=g?g(o):o;e.preventDefault();let a=null==(t=z.current)?void 0:t.selectionStart,l=null==(r=z.current)?void 0:r.selectionEnd,s=(a!==l?P.slice(0,a)+i+P.slice(l):P.slice(0,a)+i+P.slice(a)).slice(0,d);if(s.length>0&&C&&!C.test(s))return;n.value=s,S(s);let c=Math.min(s.length,d-1),u=s.length;n.setSelectionRange(c,u),B(c),F(u)}),[d,S,C,P]),Y=e.useMemo((()=>({position:"relative",cursor:E.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"})),[E.disabled]),U=e.useMemo((()=>({position:"absolute",inset:0,width:H.willPushPWMBadge?`calc(100% + ${H.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:H.willPushPWMBadge?`inset(0 ${H.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:f,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"})),[H.PWM_BADGE_SPACE_WIDTH,H.willPushPWMBadge,f]),G=e.useMemo((()=>e.createElement("input",((e,t)=>WM(e,BM(t)))(((e,t)=>{for(var r in t||(t={}))FM.call(t,r)&&$M(e,r,t[r]);if(_M)for(var r of _M(t))HM.call(t,r)&&$M(e,r,t[r]);return e})({autoComplete:E.autoComplete||"one-time-code"},E),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===P.length||void 0,"data-input-otp-mss":W,"data-input-otp-mse":_,inputMode:y,pattern:null==C?void 0:C.source,"aria-placeholder":m,style:U,maxLength:d,value:P,ref:z,onPaste:e=>{var t;q(e),null==(t=E.onPaste)||t.call(E,e)},onChange:$,onMouseOver:e=>{var t;D(!0),null==(t=E.onMouseOver)||t.call(E,e)},onMouseLeave:e=>{var t;D(!1),null==(t=E.onMouseLeave)||t.call(E,e)},onFocus:e=>{var t;V(),null==(t=E.onFocus)||t.call(E,e)},onBlur:e=>{var t;A(!1),null==(t=E.onBlur)||t.call(E,e)}}))),[$,V,q,y,U,d,_,W,E,null==C?void 0:C.source,P]),X=e.useMemo((()=>({slots:Array.from({length:d}).map(((e,t)=>{var r;let n=R&&null!==W&&null!==_&&(W===_&&t===W||t>=W&&t<_),o=void 0!==P[t]?P[t]:null;return{char:o,placeholderChar:void 0!==P[0]?null:null!=(r=null==m?void 0:m[t])?r:null,isActive:n,hasFakeCaret:n&&null===o}})),isFocused:R,isHovering:!E.disabled&&I})),[R,I,d,_,W,E.disabled,P]),Z=e.useMemo((()=>O?O(X):e.createElement(qM.Provider,{value:X},x)),[x,X,O]);return e.createElement(e.Fragment,null,null!==w&&e.createElement("noscript",null,e.createElement("style",null,w)),e.createElement("div",{ref:T,"data-input-otp-container":!0,style:Y,className:b},Z,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},G)))}));function UM(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}YM.displayName="Input";var GM="\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}";const XM=e.forwardRef((({className:t,containerClassName:r,...n},o)=>e.createElement(YM,{ref:o,containerClassName:De("flex items-center gap-2 has-[:disabled]:opacity-50",r),className:De("disabled:cursor-not-allowed",t),...n})));XM.displayName="InputOTP";const ZM=e.forwardRef((({className:t,...r},n)=>e.createElement("div",{ref:n,className:De("flex items-center",t),...r})));ZM.displayName="InputOTPGroup";const KM=e.forwardRef((({index:t,className:r,...n},o)=>{const i=e.useContext(qM),{char:a,hasFakeCaret:l,isActive:s}=i.slots[t];return e.createElement("div",{ref:o,className:De("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",s&&"z-10 ring-1 ring-ring",r),...n},a,l&&e.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center"},e.createElement("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})))}));KM.displayName="InputOTPSlot";e.forwardRef((({...t},r)=>e.createElement("div",{ref:r,role:"separator",...t},e.createElement(_E,null)))).displayName="InputOTPSeparator";const QM=({value:e,maxLength:r=6,onChange:n,disabled:o=!1,isError:i=!1,placeholder:a="○",className:l})=>t.createElement(XM,{value:e,maxLength:r,onChange:n,disabled:o,className:l},t.createElement("div",{"aria-disabled":o},t.createElement(ZM,{role:"group",className:De("gap-2",i&&"input-error")},Array.from({length:r}).map(((r,n)=>t.createElement("div",{key:n,role:"textbox","data-value":e?.[n]||""},t.createElement(KM,{index:n,className:De("rounded-md border",i&&"border-destructive focus:ring-destructive")},e?.[n]||a)))))));QM.displayName="OTPInput";var JM="AlertDialog",[eI,tI]=vg(JM,[OS]),rI=OS(),nI=e=>{const{__scopeAlertDialog:t,...r}=e,n=rI(t);return g(KS,{...n,...r,modal:!0})};nI.displayName=JM;var oI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(QS,{...o,...n,ref:t})}));oI.displayName="AlertDialogTrigger";var iI=e=>{const{__scopeAlertDialog:t,...r}=e,n=rI(t);return g(JS,{...n,...r})};iI.displayName="AlertDialogPortal";var aI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(eC,{...o,...n,ref:t})}));aI.displayName="AlertDialogOverlay";var lI="AlertDialogContent",[sI,cI]=eI(lI),uI=e.forwardRef(((t,r)=>{const{__scopeAlertDialog:n,children:o,...i}=t,a=rI(n),l=e.useRef(null),s=hg(r,l),c=e.useRef(null);return g(US,{contentName:lI,titleName:dI,docsSlug:"alert-dialog",children:g(sI,{scope:n,cancelRef:c,children:w(tC,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:pg(i.onOpenAutoFocus,(e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[g(Og,{children:o}),g(gI,{contentRef:l})]})})})}));uI.displayName=lI;var dI="AlertDialogTitle",fI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(rC,{...o,...n,ref:t})}));fI.displayName=dI;var pI="AlertDialogDescription",mI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(nC,{...o,...n,ref:t})}));mI.displayName=pI;var yI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=rI(r);return g(oC,{...o,...n,ref:t})}));yI.displayName="AlertDialogAction";var hI="AlertDialogCancel",vI=e.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=cI(hI,r),i=rI(r),a=hg(t,o);return g(oC,{...i,...n,ref:a})}));vI.displayName=hI;var gI=({contentRef:t})=>{const r=`\`${lI}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${lI}\` by passing a \`${pI}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${lI}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return e.useEffect((()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(r)}),[r,t]),null},bI=aI,wI=uI,OI=yI,xI=vI,EI=fI,kI=mI;const jI=nI,PI=oI,NI=iI,SI=e.forwardRef((({className:t,...r},n)=>e.createElement(bI,{className:De("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",t),...r,ref:n})));SI.displayName=bI.displayName;const CI=e.forwardRef((({className:t,...r},n)=>e.createElement(NI,null,e.createElement(SI,null),e.createElement(wI,{ref:n,className:De("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-lg 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",t),...r}))));CI.displayName=wI.displayName;const zI=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col space-y-2 text-center sm:text-left",t),...r});zI.displayName="AlertDialogHeader";const TI=({className:t,...r})=>e.createElement("div",{className:De("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});TI.displayName="AlertDialogFooter";const LI=e.forwardRef((({className:t,...r},n)=>e.createElement(EI,{ref:n,className:De("text-lg font-semibold",t),...r})));LI.displayName=EI.displayName;const MI=e.forwardRef((({className:t,...r},n)=>e.createElement(kI,{ref:n,className:De("text-sm text-muted-foreground",t),...r})));MI.displayName=kI.displayName;const II=e.forwardRef((({className:t,...r},n)=>e.createElement(OI,{ref:n,className:De(TP(),t),...r})));II.displayName=OI.displayName;const DI=e.forwardRef((({className:t,...r},n)=>e.createElement(xI,{ref:n,className:De(TP({variant:"outline"}),"mt-2 sm:mt-0",t),...r})));DI.displayName=xI.displayName;const RI="Cancel",AI="default",WI=!1,BI=({title:e,description:r,trigger:n,action:o,cancel:i=RI,onAction:a,onCancel:l,variant:s=AI,disabled:c=WI})=>t.createElement(jI,null,t.createElement(PI,{asChild:!0},t.createElement(nt,{variant:"secondary",disabled:c},n)),t.createElement(CI,null,t.createElement(zI,null,t.createElement(LI,null,e),t.createElement(MI,null,r)),t.createElement(TI,null,t.createElement(DI,{onClick:l,className:De("destructive"===s&&"border-destructive/50")},i),t.createElement(II,{onClick:a,className:De("destructive"===s&&"bg-destructive hover:bg-destructive/90")},o)))),_I=!1,FI="chevron",HI="right",$I="",VI="",qI="",YI=300,UI=({title:e,children:r,defaultOpen:n=_I,icon:o=FI,iconPosition:a=HI,className:l=$I,headerClassName:s=VI,contentClassName:u=qI,animationDuration:d=YI,onToggle:f})=>{const[p,m]=i(n),y=c((()=>{const e=!p;m(e),f&&f(e)}),[p,f]),h=c((()=>"chevron"===o?p?t.createElement(Ue,{size:20}):t.createElement(Ve,{size:20}):null),[o,p]);return t.createElement("div",{className:`collapsible-container border rounded-md overflow-hidden ${l}`,"data-state":p?"open":"closed"},t.createElement("button",{type:"button",onClick:y,className:`flex items-center justify-between w-full p-4 text-left font-medium transition-all hover:bg-muted/50 ${s}`,"aria-expanded":p},"left"===a&&h(),t.createElement("span",null,e),"right"===a&&h()),t.createElement("div",{className:`overflow-hidden transition-all ${u}`,style:{maxHeight:p?"1000px":"0px",opacity:p?1:0,transitionDuration:`${d}ms`}},t.createElement("div",{className:"p-4 border-t bg-background"},r)))},GI={simple:{title:"Click to expand",content:t.createElement((()=>t.createElement("div",null,"This is a simple collapsible content area.")),null)},complex:{title:"Product Information",content:t.createElement((()=>t.createElement("div",null,t.createElement("h3",{className:"text-lg font-semibold mb-2"},"Product Features"),t.createElement("ul",{className:"list-disc pl-5 mb-4"},t.createElement("li",null,"Feature one with detailed description"),t.createElement("li",null,"Feature two with even more details about functionality"),t.createElement("li",null,"Feature three with technical specifications")),t.createElement("p",{className:"text-sm text-muted-foreground"},"Additional information about the product can be found in the documentation."))),null)},faq:[{title:"How do I reset my password?",content:t.createElement((()=>t.createElement("div",null,'You can reset your password by clicking on the "Forgot Password" link on the login page and following the instructions sent to your email.')),null)},{title:"What payment methods do you accept?",content:t.createElement((()=>t.createElement("div",null,"We accept all major credit cards, PayPal, and bank transfers. For enterprise customers, we also offer invoicing options.")),null)},{title:"Can I cancel my subscription?",content:t.createElement((()=>t.createElement("div",null,"Yes, you can cancel your subscription at any time from your account settings. Your access will continue until the end of your billing period.")),null)}]},XI=e=>t.createElement("div",{className:"w-full max-w-3xl mx-auto p-6 rounded-lg border bg-card text-card-foreground shadow"},t.createElement("h2",{className:"text-xl font-bold mb-4"},"Frequently Asked Questions"),GI.faq.map(((r,n)=>t.createElement("div",{key:n,className:n>0?"mt-2":""},t.createElement(UI,{...e,title:r.title},r.content))))),ZI="medium",KI={small:"max-w-sm",medium:"max-w-2xl",large:"max-w-4xl"},QI=({avatarUrl:e,name:r,email:n,position:o,dropdownItems:l=[],size:u=ZI,className:d})=>{const[f,p]=i(!1),m=s(null),y=l.length,h=c((()=>{p((e=>!e))}),[]),v=c((e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),h())}),[h]);return a((()=>{const e=e=>{m.current&&!m.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),t.createElement("div",{ref:m,role:y>0?"button":void 0,tabIndex:y>0?0:void 0,onClick:y>0?h:void 0,onKeyDown:y>0?v:void 0,"aria-expanded":y>0?f:void 0,"aria-haspopup":y>0?"menu":void 0,className:De("inline-block bg-card/95 text-card-foreground rounded-xl border border-border/30 shadow-md overflow-visible backdrop-blur-sm transition-all duration-300 hover:shadow-lg hover:border-border/50",y>0&&"cursor-pointer",KI[u],d)},t.createElement("div",{className:De("flex items-center gap-3","small"===u?"p-2":"large"===u?"p-4":"p-3")},t.createElement("img",{src:e,alt:`${r} profile`,className:De("rounded-full border-2 border-background shadow-sm transition-transform duration-300","ring-1 ring-primary/10 hover:ring-primary/30","small"===u?"w-10 h-10":"large"===u?"w-14 h-14":"w-12 h-12")}),t.createElement("div",null,t.createElement("h2",{className:De("font-semibold text-foreground transition-colors hover:text-primary/90","small"===u?"text-base":"large"===u?"text-xl":"text-lg")},r),o&&t.createElement("p",{className:"text-muted-foreground text-sm"},o),n&&t.createElement("p",{className:"text-muted-foreground text-sm mt-0.5"},n)),y>0&&t.createElement("div",{className:"ml-auto"},t.createElement("div",{className:"p-1"},f?t.createElement(Ue,{className:"w-4 h-4 text-muted-foreground"}):t.createElement(Ve,{className:"w-4 h-4 text-muted-foreground"})))),f&&y>0&&t.createElement("div",{role:"menu",className:"absolute mt-1 w-full bg-card rounded-md shadow-lg z-20 py-1 border border-border/30 left-0"},l.map(((e,r)=>t.createElement("a",{key:r,href:e.link||"#",role:"menuitem",className:De("flex items-center px-4 py-2 text-sm hover:bg-primary/10",{"opacity-50 pointer-events-none":e.isDisabled,"cursor-pointer":!e.isDisabled}),onClick:t=>{t.stopPropagation(),e.isDisabled&&t.preventDefault()}},e.icon&&t.createElement("span",{className:"mr-2"},e.icon),e.name)))))},JI="horizontal",eD="tab1",tD=!1,rD="100%";var nD;!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(nD||(nD={}));const oD=({items:e,defaultValue:r=eD,orientation:n=JI,disabled:o=tD,onValueChange:l,className:s,width:u=rD})=>{const[d,f]=i(r);a((()=>{if("undefined"!=typeof window){const t=new URLSearchParams(window.location.search).get("tab");t&&e.some((e=>e.value===t))&&(f(t),l?.(t))}}),[e,l]);const p=c(((e,t)=>{if("undefined"==typeof window)return"";const r=new URLSearchParams(window.location.search);return r.set(e,t),r.toString()}),[]),m=c((e=>{if(f(e),"undefined"!=typeof window){const t=p("tab",e),r=`${window.location.pathname}?${t}`;window.history&&window.history.pushState&&window.history.pushState({path:r},"",r)}l&&l(e)}),[l,p]),y="vertical"===n,h=e=>De("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200",y?"px-4 py-3 w-full justify-start text-left rounded-l-md":"px-5 py-2.5 relative",d===e.value?y?"bg-background/80 text-primary font-semibold shadow-sm backdrop-blur-sm":"text-primary font-semibold":y?"text-muted-foreground hover:text-foreground hover:bg-muted/30":"text-muted-foreground hover:text-foreground",(o||e.disabled)&&"opacity-40 pointer-events-none"),v=c((e=>{o||e.disabled||m(e.value)}),[o,m]);return t.createElement("div",{className:De(y?"flex space-x-6":"space-y-4 flex flex-col items-center",s),style:{width:u}},t.createElement("div",{role:"tablist","aria-orientation":n,className:De("flex relative",y?"flex-col h-full space-y-1 min-w-[200px] border-r border-border/40 pr-2":"w-full justify-center pb-px")},t.createElement("div",{className:De("flex relative",y?"flex-col w-full":"border-b border-border/30")},e.map((e=>t.createElement("div",{key:e.value,className:De("relative",y?"":"border-b-2 border-transparent",d===e.value&&!y&&"border-b-2 border-primary z-10")},t.createElement("button",{role:"tab",type:"button","aria-selected":d===e.value,"aria-controls":`tabpanel-${e.value}`,tabIndex:d===e.value?0:-1,className:h(e),onClick:()=>v(e),disabled:o||e.disabled},e.label,d===e.value&&!y&&t.createElement("div",{className:"absolute bottom-0 left-0 h-0.5 w-full bg-primary rounded-full"})),d===e.value&&y&&t.createElement("div",{className:"absolute top-0 left-0 h-full w-0.5 bg-primary rounded-full"})))))),e.map((e=>t.createElement("div",{key:e.value,role:"tabpanel",id:`tabpanel-${e.value}`,"aria-labelledby":`tab-${e.value}`,hidden:d!==e.value,className:De("focus-visible:outline-none rounded-md",y?"flex-1":"w-full",d===e.value?"animate-in fade-in-0 duration-300":"hidden"),style:y?void 0:{width:u}},e.content))))},iD={small:{node:"w-4 h-4",innerDot:{active:"w-2 h-2",completed:"w-1.5 h-1.5",default:"w-1 h-1"},text:"text-sm",description:"text-xs",connectorTop:"top-2",connectorHeight:"h-10",spacing:"mb-6",marginRight:"mr-4",verticalConnector:{left:"left-[7px]",top:"top-[16px]",height:"h-[calc(100%-16px)]"}},medium:{node:"w-6 h-6",innerDot:{active:"w-3 h-3",completed:"w-2.5 h-2.5",default:"w-2 h-2"},text:"text-base",description:"text-sm",connectorTop:"top-3",connectorHeight:"h-14",spacing:"mb-8",marginRight:"mr-6",verticalConnector:{left:"left-[11px]",top:"top-[24px]",height:"h-[calc(100%-24px)]"}},large:{node:"w-8 h-8",innerDot:{active:"w-4 h-4",completed:"w-3.5 h-3.5",default:"w-3 h-3"},text:"text-lg",description:"text-base",connectorTop:"top-4",connectorHeight:"h-16",spacing:"mb-10",marginRight:"mr-8",verticalConnector:{left:"left-[15px]",top:"top-[32px]",height:"h-[calc(100%-32px)]"}}},aD=({steps:e,activeStep:r=0,orientation:n="horizontal",size:o="medium",className:i,onStepClick:a})=>{const l="horizontal"===n,s=iD[o];return t.createElement("div",{className:De("max-w-full mx-auto mb-4 px-8",i)},t.createElement("div",{className:De("flex relative p-0",l?"flex-row justify-between":"flex-col")},e.map(((n,o)=>{const i=o===r,c=o<r,u=a?t.createElement("button",{type:"button",className:De("relative text-left w-full bg-transparent border-0 p-0 m-0",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),onClick:()=>a(o),"aria-current":i?"step":void 0},t.createElement("div",{className:De("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:De("rounded-full transition-all duration-300 ease-in-out",i?De(s.innerDot.active,"bg-primary"):c?De(s.innerDot.completed,"bg-primary-foreground"):De(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:De("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:`w-0.5 ${s.verticalConnector.left} ${s.verticalConnector.top} ${s.verticalConnector.height}`,c?"bg-primary":"bg-border")}),t.createElement("div",{className:De(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:De("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:De("text-muted-foreground mt-1",s.description)},n.description))):t.createElement("div",{className:De("relative",l?"flex-1 flex flex-col items-center px-4":"flex items-start w-full p-0 pb-12 last:pb-0",i&&"active",c&&"completed"),"aria-current":i?"step":void 0},t.createElement("div",{className:De("flex justify-center items-center rounded-full relative transition-all duration-300 ease-in-out z-10",s.node,l?"mb-6":"absolute",i?"border-2 border-primary shadow-[0_0_0_4px_rgba(var(--primary),0.2)] bg-background":c?"border-2 border-primary bg-primary":"border-2 border-border bg-background")},t.createElement("div",{className:De("rounded-full transition-all duration-300 ease-in-out",i?De(s.innerDot.active,"bg-primary"):c?De(s.innerDot.completed,"bg-primary-foreground"):De(s.innerDot.default,"bg-muted-foreground/50"))})),o<e.length-1&&t.createElement("div",{className:De("absolute transition-all duration-300 ease-in-out",l?`h-0.5 ${s.connectorTop} -translate-y-1/2 left-[calc(50%+12px+1rem)] right-[calc(-50%+12px+1rem)]`:"w-0.5 left-[12px] top-[24px] h-[calc(100%-24px)]",c?"bg-primary":"bg-border")}),t.createElement("div",{className:De(l?"text-center px-4":"flex-1 ml-10")},t.createElement("h3",{className:De("transition-opacity duration-300 ease-in-out m-0",s.text,i?"text-primary font-medium opacity-100":c?"text-primary font-normal opacity-90":"text-foreground font-normal opacity-70")},n.label),n.description&&t.createElement("p",{className:De("text-muted-foreground mt-1",s.description)},n.description)));return t.createElement(t.Fragment,{key:n.id},u)}))))};export{BI as AlertDialogComponent,BP as BreadCrumb,nt as Button,DP as Calendar,eN as Card,RM as Carousel,Qv as Checkbox,UI as Collapse,GI as CollapseData,xC as CustomDialogContent,KP as CustomSkeleton,UT as DatePicker,EC as Dialog,Dv as Disable,IL as Drawer,HP as Dropdown,Fv as EditFilled,Bv as Error,$v as ExcelFile,XI as FAQCollapseGroup,qv as FBLike,Yv as FBLove,Hv as FileUpload,dg as Heading,Rv as Hide,Gv as Icon,Av as Info,fg as Input,rN as LoaderComponent,QM as OTPInput,aw as PaginationComponent,UL as Popover,QI as ProfileCard,jb as RadioGroup,AL as Sheet,BL as SheetClose,HL as SheetContent,YL as SheetDescription,VL as SheetFooter,$L as SheetHeader,qL as SheetTitle,WL as SheetTrigger,aD as Stepper,Vv as Success,$b as Switch,lw as Table,oD as Tabs,ug as Text,TE as Tooltip,_v as Upload,Wv as Warning,RP as breadCrumbVariants,Fb as colorVariants,Xb as message,_b as sizeVariants,Vb as sizes,qb as variants};
53
53
  //# sourceMappingURL=index.esm.js.map