@stackable-labs/embeddables 1.95.1 → 1.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(d,be){typeof exports=="object"&&typeof module<"u"?be(require("react/jsx-runtime"),require("react-dom/client"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react-dom/client","react","react-dom"],be):(d=typeof globalThis<"u"?globalThis:d||self,be(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,be,x,Wo){"use strict";var hb=Object.defineProperty;var gb=(d,be,x)=>be in d?hb(d,be,{enumerable:!0,configurable:!0,writable:!0,value:x}):d[be]=x;var sr=(d,be,x)=>gb(d,typeof be!="symbol"?be+"":be,x);function ir(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const p=ir(x),Rt=ir(Wo),zl='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-red-100:oklch(93.6% .032 17.717);--color-red-800:oklch(44.4% .177 26.899);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-800:oklch(45.9% .187 3.815);--color-gray-800:oklch(27.8% .033 256.848);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans,ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);--default-mono-font-family:var(--font-geist-mono,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-colored:0 0 #0000;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*,:before,:after{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}:host{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-8{right:calc(var(--spacing) * 8)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-24{bottom:calc(var(--spacing) * 24)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-1000{z-index:1000}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-2\\.5{margin-top:calc(var(--spacing) * -2.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-2\\.5{margin-left:calc(var(--spacing) * -2.5)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-\\[700px\\]{height:700px}.h-auto{height:auto}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[900px\\]{width:900px}.w-full{width:100%}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-bottom-right{transform-origin:100% 100%}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-115{--tw-scale-x:115%;--tw-scale-y:115%;--tw-scale-z:115%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:#e4e4e4}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-foreground\\/35{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/35{background-color:color-mix(in oklab,var(--foreground) 35%,transparent)}}.bg-foreground\\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/70{background-color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.bg-gray-100{background-color:#f3f4f6}.bg-muted{background-color:var(--muted)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\\!text-muted-foreground{color:var(--muted-foreground)!important}.text-amber-800{color:var(--color-amber-800)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\\/75{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/75{color:color-mix(in oklab,var(--foreground) 75%,transparent)}}.text-gray-800{color:var(--color-gray-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-pink-800{color:var(--color-pink-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-800{color:var(--color-red-800)}.text-zinc-300{color:#d4d4d4}.text-zinc-500{color:#727272}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.16\\)\\,0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.22\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ffffff29), 0 0 0 1px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-zinc-200{--tw-ring-color:oklch(92% 0 0)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.running{animation-play-state:running}@media(hover:hover){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:color-mix(in oklab,var(--foreground) 55%,transparent)}}.group-hover\\/resize\\:opacity-100:is(:where(.group\\/resize):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-accent\\/70:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/70:hover{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-zinc-900:hover{color:#181818}.hover\\:opacity-100:hover{opacity:1}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.dark\\:border-zinc-300:is(.dark *){border-color:#d4d4d4}.dark\\:bg-background:is(.dark *){background-color:var(--background)}.dark\\:bg-white:is(.dark *){background-color:#fff}.dark\\:ring-zinc-300:is(.dark *){--tw-ring-color:oklch(87.1% 0 0)}@media(hover:hover){.dark\\:group-hover\\/resize\\:bg-white:is(.dark *):is(:where(.group\\/resize):hover *){background-color:#fff}}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-90[data-state=open]>svg{rotate:90deg}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:host{--radius:.625rem;--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08)}:host([theme=dark]),:host(.dark){--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439)}@keyframes sparkle-swipe-in{0%{opacity:0;color:#facc15;filter:drop-shadow(-8px 8px #a855f700)}28%{opacity:1;color:#d8b4fe;filter:drop-shadow(-2px 2px 8px #a855f7cc)}55%{color:#a855f7;filter:drop-shadow(3px -3px 10px #a855f7f2)}to{opacity:1;color:#facc15;filter:drop-shadow(0 0 #a855f700)}}@keyframes sparkle-twinkle{0%,to{opacity:.82;filter:drop-shadow(0 0 #facc1500)}50%{opacity:1;filter:drop-shadow(0 0 7px #facc1580)}}.sparkle-icon{color:#facc15;vertical-align:middle;transform-origin:50%;will-change:transform,filter,color,opacity;line-height:1;animation:1.15s cubic-bezier(.22,1,.36,1) sparkle-swipe-in,2.1s ease-in-out 1.15s infinite sparkle-twinkle;display:inline-block;transform:rotate(10deg)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}',Dl=()=>{try{return"d316593a-bbc2-4a87-8ba3-5d3ad01f4b9c"}catch{return"dev"}},tt=new Map,$l=async(e,t)=>{const o=tt.get(e.id);if(o)return o;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const n=document.createElement("iframe");n.setAttribute("sandbox","allow-scripts allow-same-origin"),n.style.display="none",n.style.width="0",n.style.height="0",n.style.border="none";const r=e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js"),a=r?new URL(e.bundleUrl).origin:"null";if(r){const l=new URL(e.bundleUrl);l.searchParams.set("__extensionId",e.id),n.src=l.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${l.toString()}`)}else{let l="";try{const f=Dl();l=await(await fetch(`${e.bundleUrl}?_b=${f}`)).text()}catch(f){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,f)}const u=`<!DOCTYPE html>
1
+ (function(u,be){typeof exports=="object"&&typeof module<"u"?be(require("react/jsx-runtime"),require("react-dom/client"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react-dom/client","react","react-dom"],be):(u=typeof globalThis<"u"?globalThis:u||self,be(u.jsxRuntime,u.ReactDOM,u.React,u.ReactDOM))})(this,(function(u,be,C,Kn){"use strict";var Jb=Object.defineProperty;var Qb=(u,be,C)=>be in u?Jb(u,be,{enumerable:!0,configurable:!0,writable:!0,value:C}):u[be]=C;var Bo=(u,be,C)=>Qb(u,typeof be!="symbol"?be+"":be,C);function Fo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=Fo(C),Zt=Fo(Kn),jc='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-red-100:oklch(93.6% .032 17.717);--color-red-800:oklch(44.4% .177 26.899);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-800:oklch(45.9% .187 3.815);--color-gray-800:oklch(27.8% .033 256.848);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans,ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);--default-mono-font-family:var(--font-geist-mono,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-colored:0 0 #0000;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*,:before,:after{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}:host{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-8{right:calc(var(--spacing) * 8)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-24{bottom:calc(var(--spacing) * 24)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-1000{z-index:1000}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-2\\.5{margin-top:calc(var(--spacing) * -2.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-2\\.5{margin-left:calc(var(--spacing) * -2.5)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-\\[700px\\]{height:700px}.h-auto{height:auto}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[900px\\]{width:900px}.w-full{width:100%}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-bottom-right{transform-origin:100% 100%}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-115{--tw-scale-x:115%;--tw-scale-y:115%;--tw-scale-z:115%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:#e4e4e4}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-foreground\\/35{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/35{background-color:color-mix(in oklab,var(--foreground) 35%,transparent)}}.bg-foreground\\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/70{background-color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.bg-gray-100{background-color:#f3f4f6}.bg-muted{background-color:var(--muted)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\\!text-muted-foreground{color:var(--muted-foreground)!important}.text-amber-800{color:var(--color-amber-800)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\\/75{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/75{color:color-mix(in oklab,var(--foreground) 75%,transparent)}}.text-gray-800{color:var(--color-gray-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-pink-800{color:var(--color-pink-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-800{color:var(--color-red-800)}.text-zinc-300{color:#d4d4d4}.text-zinc-500{color:#727272}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.16\\)\\,0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.22\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ffffff29), 0 0 0 1px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-zinc-200{--tw-ring-color:oklch(92% 0 0)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.running{animation-play-state:running}@media(hover:hover){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:color-mix(in oklab,var(--foreground) 55%,transparent)}}.group-hover\\/resize\\:opacity-100:is(:where(.group\\/resize):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-accent\\/70:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/70:hover{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-zinc-900:hover{color:#181818}.hover\\:opacity-100:hover{opacity:1}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.dark\\:border-zinc-300:is(.dark *){border-color:#d4d4d4}.dark\\:bg-background:is(.dark *){background-color:var(--background)}.dark\\:bg-white:is(.dark *){background-color:#fff}.dark\\:ring-zinc-300:is(.dark *){--tw-ring-color:oklch(87.1% 0 0)}@media(hover:hover){.dark\\:group-hover\\/resize\\:bg-white:is(.dark *):is(:where(.group\\/resize):hover *){background-color:#fff}}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-90[data-state=open]>svg{rotate:90deg}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:host{--radius:.625rem;--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08)}:host([theme=dark]),:host(.dark){--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439)}@keyframes sparkle-swipe-in{0%{opacity:0;color:#facc15;filter:drop-shadow(-8px 8px #a855f700)}28%{opacity:1;color:#d8b4fe;filter:drop-shadow(-2px 2px 8px #a855f7cc)}55%{color:#a855f7;filter:drop-shadow(3px -3px 10px #a855f7f2)}to{opacity:1;color:#facc15;filter:drop-shadow(0 0 #a855f700)}}@keyframes sparkle-twinkle{0%,to{opacity:.82;filter:drop-shadow(0 0 #facc1500)}50%{opacity:1;filter:drop-shadow(0 0 7px #facc1580)}}.sparkle-icon{color:#facc15;vertical-align:middle;transform-origin:50%;will-change:transform,filter,color,opacity;line-height:1;animation:1.15s cubic-bezier(.22,1,.36,1) sparkle-swipe-in,2.1s ease-in-out 1.15s infinite sparkle-twinkle;display:inline-block;transform:rotate(10deg)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}',qc=()=>{try{return"1d6405a9-9919-4da4-9388-989cd43a061f"}catch{return"dev"}},rt=new Map,Gc=async(e,t)=>{const n=rt.get(e.id);if(n)return n;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const r=document.createElement("iframe");r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="none";const o=e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js"),a=o?new URL(e.bundleUrl).origin:"null";if(o){const l=new URL(e.bundleUrl);l.searchParams.set("__extensionId",e.id),r.src=l.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${l.toString()}`)}else{let l="";try{const f=qc();l=await(await fetch(`${e.bundleUrl}?_b=${f}`)).text()}catch(f){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,f)}const d=`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
@@ -9,272 +9,277 @@
9
9
  <script>var __STACKABLE_EXTENSION_ID__ = ${JSON.stringify(e.id)}; var process = { env: { NODE_ENV: "production" } };<\/script>
10
10
  <script type="module">${l}<\/script>
11
11
  </body>
12
- </html>`;n.srcdoc=u,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${u.substring(0,300)}`)}t.appendChild(n);const s={manifest:e.manifest,extensionId:e.id,iframe:n,ready:!1,expectedOrigin:a,messageHandlers:new Set},i=l=>{if(l.origin!==s.expectedOrigin)return;const u=l.data;!u||typeof u!="object"||!("type"in u)||("extensionId"in u?u.extensionId:void 0)!==e.id||(u.type==="extension-ready"&&(s.ready=!0),s.messageHandlers.forEach(c=>c(u)))};return window.addEventListener("message",i),tt.set(e.id,s),s},Me=(e,t)=>{const o=tt.get(e);if(!(o!=null&&o.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}const n=o.expectedOrigin==="null"?"*":o.expectedOrigin;o.iframe.contentWindow.postMessage(t,n)},ut=e=>tt.get(e),Fl=e=>{const t=tt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),tt.delete(e))},ft=()=>tt,Uo=e=>e,Bl={SUPER_ADMIN:"super_admin"};new Set(Object.values(Bl));const lr={ADMIN:"org:admin",MEMBER:"org:member"},Hl=[lr.ADMIN];[...Object.values(Hl),lr.MEMBER];const cr={"ui-card":{description:"Card container for grouping related content",icon:"square",category:"layout",attributes:["className","onClick"],children:["ui-card-header","ui-card-content"]},"ui-card-content":{description:"Content area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-button":{description:"Interactive button with variant and size options",icon:"mouse-pointer-click",category:"input",attributes:["variant","size","disabled","onClick","type","className","title"],attributeValues:{variant:["default","destructive","outline","secondary","ghost","link"],size:["default","xs","sm","lg","icon"]}},"ui-text":{description:"Paragraph text",icon:"type",category:"text",attributes:["className","tone"],attributeValues:{tone:["default","muted","destructive"]}},"ui-heading":{description:"Heading element (h1–h6)",icon:"heading",category:"text",attributes:["level","className"],attributeValues:{level:["1","2","3","4","5","6"]}},"ui-badge":{description:"Small label for status, category, or count",icon:"tag",category:"text",attributes:["variant","hue","tone","className"],attributeValues:{variant:["default","secondary","destructive","outline","ghost","link"],hue:["amber","blue","emerald","red","purple","pink","gray"],tone:["default","muted","destructive"]}},"ui-input":{description:"Single-line text input field",icon:"text-cursor-input",category:"input",attributes:["type","placeholder","value","onChange","disabled","className","id"]},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"]},"ui-select":{description:"Dropdown select with options",icon:"chevrons-up-down",category:"input",attributes:["value","defaultValue","onChange","placeholder","disabled","className"],children:["ui-select-option"]},"ui-select-option":{description:"Option within a Select dropdown",icon:"chevrons-up-down",category:"input",attributes:["value","disabled","className"]},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"]},"ui-switch":{description:"Toggle switch for on/off states",icon:"toggle-left",category:"input",attributes:["checked","onChange","disabled","size","className","id"],attributeValues:{size:["sm","default"]}},"ui-label":{description:"Form label associated with an input",icon:"tag",category:"input",attributes:["htmlFor","className"]},"ui-radio-group":{description:"Group of radio buttons for single selection",icon:"circle-dot",category:"input",attributes:["value","defaultValue","onChange","className"],children:["ui-radio-group-item","ui-label","ui-inline"]},"ui-radio-group-item":{description:"Individual radio button within a RadioGroup",icon:"circle-dot",category:"input",attributes:["value","disabled","className","id"]},"ui-stack":{description:"Vertical or horizontal flex container with gap",icon:"rows-3",category:"layout",attributes:["gap","direction","className"],attributeValues:{direction:["row","column"],gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-inline":{description:"Horizontal flex container with centered items",icon:"columns-3",category:"layout",attributes:["gap","className"],attributeValues:{gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-separator":{description:"Horizontal divider line",icon:"minus",category:"layout",attributes:["className"]},"ui-tabs":{description:"Tabbed content container",icon:"panel-top",category:"navigation",attributes:["defaultValue","className"],children:["ui-tabs-list","ui-tabs-content"]},"ui-tabs-list":{description:"Container for tab triggers",icon:"panel-top",category:"navigation",attributes:["className"],children:["ui-tabs-trigger"]},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-scroll-area":{description:"Scrollable content container",icon:"scroll",category:"layout",attributes:["className"]},"ui-avatar":{description:"User avatar with image and initials fallback",icon:"circle-user",category:"composite",attributes:["src","alt","className"]},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]}},"ui-link":{description:"Hyperlink element",icon:"link",category:"navigation",attributes:["href","target","rel","className"]},"ui-menu":{description:"Card-based menu with clickable items",icon:"menu",category:"navigation",attributes:["title","className"],children:["ui-menu-item"]},"ui-menu-item":{description:"Clickable item within a Menu",icon:"menu",category:"navigation",attributes:["icon","label","description","onClick","className"]},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"]},"ui-tooltip":{description:"Hover tooltip with text content",icon:"message-square",category:"feedback",attributes:["content","className"]},"ui-progress":{description:"Progress bar with percentage value",icon:"bar-chart",category:"feedback",attributes:["value","className"]},"ui-alert":{description:"Alert banner with icon and optional title",icon:"alert-circle",category:"feedback",attributes:["variant","title","className"],attributeValues:{variant:["default","destructive"]}},"ui-collapsible":{description:"Expandable/collapsible content section",icon:"chevrons-down-up",category:"composite",attributes:["defaultOpen","className"],children:["ui-collapsible-trigger","ui-collapsible-content"]},"ui-collapsible-trigger":{description:"Clickable trigger to toggle Collapsible",icon:"chevrons-down-up",category:"composite",attributes:["className"]},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"]}},pt=cr,Mt=Object.keys(cr),Vl=Object.fromEntries(Mt.map(e=>[e,pt[e].attributes]));Object.fromEntries(Mt.filter(e=>pt[e].attributeValues).map(e=>[e,pt[e].attributeValues]));const dr=Object.fromEntries(Mt.filter(e=>pt[e].children).map(e=>[e,pt[e].children]));({...dr},Object.fromEntries(Mt.map(e=>[e,pt[e].category])));const ht={NEW_CONVERSATION:"newConversation",SET_CONVERSATION_TAGS:"setConversationTags",SET_CONVERSATION_FIELDS:"setConversationFields"},Wl=["identity","messaging","settings"],Ul={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},jl=e=>{const t=async o=>{const n=o.data;if((n==null?void 0:n.type)!=="capability-request")return;const r=n;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(o.data));const a=r.extensionId;if(!a||!ut(a)){const l=[...ft().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${r.capability})`);return}const s=ut(a);if(!s)return;const i=Ul[r.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:r.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Me(a,l);return}try{let l;switch(r.capability){case"data.query":l=await e["data.query"](r.payload);break;case"data.fetch":l=await e["data.fetch"](a,r.payload);break;case"actions.toast":l=await e["actions.toast"](a,r.payload);break;case"actions.invoke":l=await e["actions.invoke"](r.payload);break;case"context.read":l=await e["context.read"](a);break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,r.payload):null;break;default:throw new Error(`Unknown capability: ${r.capability}`)}const u={type:"capability-response",id:r.id,success:!0,data:l};Me(a,u)}catch(l){const u={type:"capability-response",id:r.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Me(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},ur=x.createContext({extensions:[],components:{},ready:!1}),Rl=({extensions:e,capabilityHandlers:t,components:o={},children:n})=>{const[r,a]=x.useState(!1),s=x.useRef(null),i=x.useRef(null),l=x.useRef(t);return l.current=t,x.useEffect(()=>{if(!s.current)return;let u=!1;return(async()=>{const c=s.current;if(!c)return;console.log("[ExtensionProvider] Initializing with",e.length,"extensions");const h=new Proxy({},{get:(g,b)=>l.current[b]});i.current=jl(h);for(const g of e)g.enabled&&!u&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await $l(g,c),console.log("[ExtensionProvider] Sandbox created for",g.id));u||(console.log("[ExtensionProvider] Ready"),a(!0))})(),()=>{var c;u=!0;for(const h of e)Fl(h.id);(c=i.current)==null||c.call(i)}},[e]),d.jsxs(ur.Provider,{value:{extensions:e,components:o,ready:r},children:[d.jsx("div",{ref:s,style:{display:"none"}}),n]})},fr=()=>x.useContext(ur),Gl=e=>Mt.includes(e),ql=(e,t={})=>{const{surfaceId:o,logPrefix:n="[NodeRenderer]"}=t,r=(a,s,i=0)=>{var g,b,m;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return d.jsx(x.Fragment,{children:(g=a.children)==null?void 0:g.map((v,w)=>r(v,s,w))},i);if(!Gl(a.tag))return console.warn(`${n} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${n} Unregistered UI tag: <${a.tag}>`),null):d.jsx(x.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>r(v,s,w))},i);const{filtered:u,stripped:f}=Yl(a.tag,a.attrs);f.length>0&&console.warn(`${n} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=Xl(a.tag,a.children);if(c.length>0&&console.warn(`${n} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const v=a.actionId;u.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:o,actionId:v},"*")}}if(u["data-onchange-id"]){const v=u["data-onchange-id"];delete u["data-onchange-id"],u.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:o,actionId:v,value:w.target.value},"*")}}const h=(m=a.children)==null?void 0:m.map((v,w)=>r(v,s,w));return x.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return r},Yl=(e,t)=>{const o={},n=[];if(!t)return{filtered:o,stripped:n};const r=Vl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){o[a]=s;continue}r!=null&&r.includes(a)?o[a]=s:n.push(a)}return{filtered:o,stripped:n}},Xl=(e,t)=>{const o=dr[e];if(!o||!t)return[];const n=[];for(const r of t)r.type!=="text"&&(!r.tag||r.tag==="__fragment"||o.includes(r.tag)||n.push(r.tag));return n},Kl=e=>{const t={...e};for(const o of Wl)delete t[o];return t},Gt=({target:e,context:t,className:o,separator:n,fallback:r=null,render:a})=>{const{extensions:s,components:i,ready:l}=fr(),[u,f]=x.useState({}),c=x.useRef(""),h=x.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),g=x.useMemo(()=>ql(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(x.useEffect(()=>{const v=h.map(y=>y.id).join(",");if(c.current!==v&&(c.current=v,f({})),!l||h.length===0)return;const w=y=>{const k=y.data;if(!(!k||typeof k!="object"||!h.some(_=>{const P=ut(_.id);return P&&y.source===P.iframe.contentWindow}))){if(k.type==="surface-update"&&k.surfaceId===e){const _=h.find(T=>{const E=ut(T.id);return E&&y.source===E.iframe.contentWindow});if(!_)return;const P=g(k.tree,y.source??null);f(T=>({...T,[_.id]:P}))}if(k.type==="surface-ready"&&k.surfaceId===e&&t){const _=Kl(t);h.forEach(P=>{var E;const T=ut(P.id);(E=T==null?void 0:T.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:_},"*")})}}};return window.addEventListener("message",w),h.forEach(y=>{var C;const k=ut(y.id);(C=k==null?void 0:k.iframe.contentWindow)==null||C.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,g]),!l)return null;if(h.length===0)return r?d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:r}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),m=b.length>0?b.flatMap((v,w,y)=>{const k=a?a({extensionId:v.id,children:v.children,index:w,total:y.length}):d.jsx(x.Fragment,{children:v.children},v.id),C=d.jsx(x.Fragment,{children:k},`extension:${v.id}`);if(w===0||!n)return[C];const _=y[w-1],P=typeof n=="function"?n({index:w,total:y.length,previousExtensionId:_.id,extensionId:v.id}):n;return[d.jsx(x.Fragment,{children:P},`separator:${_.id}:${v.id}:${w}`),C]}):r;return d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:m})};function Zl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const Jl=e=>{switch(e){case"success":return tc;case"info":return nc;case"warning":return oc;case"error":return rc;default:return null}},Ql=Array(12).fill(0),ec=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},Ql.map((o,n)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),tc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),oc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),nc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),rc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ac=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),sc=()=>{const[e,t]=x.useState(document.hidden);return x.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let jo=1;class ic{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:n,...r}=t,a=typeof(t==null?void 0:t.id)=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:jo++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:n}),{...l,...t,id:a,dismissible:i,title:n}):l):this.addToast({title:n,...r,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(n=>n({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let n;o.loading!==void 0&&(n=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const i=r.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:n,type:"default",message:u});else if(cc(u)&&!u.ok){a=!1;const c=typeof o.error=="function"?await o.error(`HTTP error! status: ${u.status}`):o.error,h=typeof o.description=="function"?await o.description(`HTTP error! status: ${u.status}`):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof o.error=="function"?await o.error(u):o.error,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:h,...b})}else if(o.success!==void 0){a=!1;const c=typeof o.success=="function"?await o.success(u):o.success,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:n,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],o.error!==void 0){a=!1;const f=typeof o.error=="function"?await o.error(u):o.error,c=typeof o.description=="function"?await o.description(u):o.description,g=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),o.finally==null||o.finally.call(o)}),l=()=>new Promise((u,f)=>i.then(()=>s[0]==="reject"?f(s[1]):u(s[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,o)=>{const n=(o==null?void 0:o.id)||jo++;return this.create({jsx:t(n),id:n,...o}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new ic,lc=(e,t)=>{const o=(t==null?void 0:t.id)||jo++;return ge.addToast({title:e,...t,id:o}),o},cc=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dc=lc,uc=()=>ge.toasts,fc=()=>ge.getActiveToasts(),gt=Object.assign(dc,{success:ge.success,info:ge.info,warning:ge.warning,error:ge.error,custom:ge.custom,message:ge.message,promise:ge.promise,dismiss:ge.dismiss,loading:ge.loading},{getHistory:uc,getToasts:fc});Zl("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function qt(e){return e.label!==void 0}const pc=3,hc="24px",gc="16px",pr=4e3,mc=356,vc=14,bc=45,wc=200;function Oe(...e){return e.filter(Boolean).join(" ")}function yc(e){const[t,o]=e.split("-"),n=[];return t&&n.push(t),o&&n.push(o),n}const xc=e=>{var t,o,n,r,a,s,i,l,u;const{invert:f,toast:c,unstyled:h,interacting:g,setHeights:b,visibleToasts:m,heights:v,index:w,toasts:y,expanded:k,removeToast:C,defaultRichColors:_,closeButton:P,style:T,cancelButtonStyle:E,actionButtonStyle:z,className:j="",descriptionClassName:O="",duration:B,position:V,gap:L,expandByDefault:Y,classNames:I,icons:D,closeButtonAriaLabel:R="Close toast"}=e,[N,S]=x.useState(null),[M,F]=x.useState(null),[A,$]=x.useState(!1),[H,Z]=x.useState(!1),[G,q]=x.useState(!1),[Q,ee]=x.useState(!1),[re,oe]=x.useState(!1),[ce,de]=x.useState(0),[ct,Qe]=x.useState(0),Pe=x.useRef(c.duration||B||pr),Fo=x.useRef(null),ve=x.useRef(null),rb=w===0,ab=w+1<=m,xe=c.type,Pt=c.dismissible!==!1,sb=c.className||"",ib=c.descriptionClassName||"",Bo=x.useMemo(()=>v.findIndex(te=>te.toastId===c.id)||0,[v,c.id]),lb=x.useMemo(()=>{var te;return(te=c.closeButton)!=null?te:P},[c.closeButton,P]),_l=x.useMemo(()=>c.duration||B||pr,[c.duration,B]),rr=x.useRef(0),At=x.useRef(0),Pl=x.useRef(0),It=x.useRef(null),[cb,db]=V.split("-"),Al=x.useMemo(()=>v.reduce((te,ue,he)=>he>=Bo?te:te+ue.height,0),[v,Bo]),Il=sc(),ub=c.invert||f,ar=xe==="loading";At.current=x.useMemo(()=>Bo*L+Al,[Bo,Al]),x.useEffect(()=>{Pe.current=_l},[_l]),x.useEffect(()=>{$(!0)},[]),x.useEffect(()=>{const te=ve.current;if(te){const ue=te.getBoundingClientRect().height;return Qe(ue),b(he=>[{toastId:c.id,height:ue,position:c.position},...he]),()=>b(he=>he.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),x.useLayoutEffect(()=>{if(!A)return;const te=ve.current,ue=te.style.height;te.style.height="auto";const he=te.getBoundingClientRect().height;te.style.height=ue,Qe(he),b(ke=>ke.find(fe=>fe.toastId===c.id)?ke.map(fe=>fe.toastId===c.id?{...fe,height:he}:fe):[{toastId:c.id,height:he,position:c.position},...ke])},[A,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const et=x.useCallback(()=>{Z(!0),de(At.current),b(te=>te.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{C(c)},wc)},[c,C,b,At]);x.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let te;return k||g||Il?(()=>{if(Pl.current<rr.current){const ke=new Date().getTime()-rr.current;Pe.current=Pe.current-ke}Pl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(rr.current=new Date().getTime(),te=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),et()},Pe.current))})(),()=>clearTimeout(te)},[k,g,c,xe,Il,et]),x.useEffect(()=>{c.delete&&(et(),c.onDismiss==null||c.onDismiss.call(c,c))},[et,c.delete]);function fb(){var te;if(D!=null&&D.loading){var ue;return x.createElement("div",{className:Oe(I==null?void 0:I.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},D.loading)}return x.createElement(ec,{className:Oe(I==null?void 0:I.loader,c==null||(te=c.classNames)==null?void 0:te.loader),visible:xe==="loading"})}const pb=c.icon||(D==null?void 0:D[xe])||Jl(xe);var Ml,Ol;return x.createElement("li",{tabIndex:0,ref:ve,className:Oe(j,sb,I==null?void 0:I.toast,c==null||(t=c.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[xe],c==null||(o=c.classNames)==null?void 0:o[xe]),"data-sonner-toast":"","data-rich-colors":(Ml=c.richColors)!=null?Ml:_,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":A,"data-promise":!!c.promise,"data-swiped":re,"data-removed":H,"data-visible":ab,"data-y-position":cb,"data-x-position":db,"data-index":w,"data-front":rb,"data-swiping":G,"data-dismissible":Pt,"data-type":xe,"data-invert":ub,"data-swipe-out":Q,"data-swipe-direction":M,"data-expanded":!!(k||Y&&A),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${H?ce:At.current}px`,"--initial-height":Y?"auto":`${ct}px`,...T,...c.style},onDragEnd:()=>{q(!1),S(null),It.current=null},onPointerDown:te=>{te.button!==2&&(ar||!Pt||(Fo.current=new Date,de(At.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(q(!0),It.current={x:te.clientX,y:te.clientY})))},onPointerUp:()=>{var te,ue,he;if(Q||!Pt)return;It.current=null;const ke=Number(((te=ve.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ho=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=Fo.current)==null?void 0:he.getTime()),Ce=N==="x"?ke:Ho,Vo=Math.abs(Ce)/fe;if(Math.abs(Ce)>=bc||Vo>.11){de(At.current),c.onDismiss==null||c.onDismiss.call(c,c),F(N==="x"?ke>0?"right":"left":Ho>0?"down":"up"),et(),ee(!0);return}else{var Ae,Ie;(Ae=ve.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}oe(!1),q(!1),S(null)},onPointerMove:te=>{var ue,he,ke;if(!It.current||!Pt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=te.clientY-It.current.y,Ce=te.clientX-It.current.x;var Vo;const Ae=(Vo=e.swipeDirections)!=null?Vo:yc(V);!N&&(Math.abs(Ce)>1||Math.abs(fe)>1)&&S(Math.abs(Ce)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Ll=dt=>1/(1.5+Math.abs(dt)/20);if(N==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&fe<0||Ae.includes("bottom")&&fe>0)Ie.y=fe;else{const dt=fe*Ll(fe);Ie.y=Math.abs(dt)<Math.abs(fe)?dt:fe}}else if(N==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const dt=Ce*Ll(Ce);Ie.x=Math.abs(dt)<Math.abs(Ce)?dt:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&oe(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=ve.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},lb&&!c.jsx&&xe!=="loading"?x.createElement("button",{"aria-label":R,"data-disabled":ar,"data-close-button":!0,onClick:ar||!Pt?()=>{}:()=>{et(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Oe(I==null?void 0:I.closeButton,c==null||(n=c.classNames)==null?void 0:n.closeButton)},(Ol=D==null?void 0:D.close)!=null?Ol:ac):null,(xe||c.icon||c.promise)&&c.icon!==null&&((D==null?void 0:D[xe])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:Oe(I==null?void 0:I.icon,c==null||(r=c.classNames)==null?void 0:r.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||fb():null,c.type!=="loading"?pb:null):null,x.createElement("div",{"data-content":"",className:Oe(I==null?void 0:I.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:Oe(I==null?void 0:I.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:Oe(O,ib,I==null?void 0:I.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&qt(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:te=>{qt(c.cancel)&&Pt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,te),et())},className:Oe(I==null?void 0:I.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&qt(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||z,onClick:te=>{qt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,te),!te.defaultPrevented&&et())},className:Oe(I==null?void 0:I.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function hr(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function kc(e,t){const o={};return[e,t].forEach((n,r)=>{const a=r===1,s=a?"--mobile-offset":"--offset",i=a?gc:hc;function l(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(i)}),o}const Sc=x.forwardRef(function(t,o){const{id:n,invert:r,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:f,mobileOffset:c,theme:h="light",richColors:g,duration:b,style:m,visibleToasts:v=pc,toastOptions:w,dir:y=hr(),gap:k=vc,icons:C,containerAriaLabel:_="Notifications"}=t,[P,T]=x.useState([]),E=x.useMemo(()=>n?P.filter(A=>A.toasterId===n):P.filter(A=>!A.toasterId),[P,n]),z=x.useMemo(()=>Array.from(new Set([a].concat(E.filter(A=>A.position).map(A=>A.position)))),[E,a]),[j,O]=x.useState([]),[B,V]=x.useState(!1),[L,Y]=x.useState(!1),[I,D]=x.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),R=x.useRef(null),N=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=x.useRef(null),M=x.useRef(!1),F=x.useCallback(A=>{T($=>{var H;return(H=$.find(Z=>Z.id===A.id))!=null&&H.delete||ge.dismiss(A.id),$.filter(({id:Z})=>Z!==A.id)})},[]);return x.useEffect(()=>ge.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{T($=>$.map(H=>H.id===A.id?{...H,delete:!0}:H))});return}setTimeout(()=>{Wo.flushSync(()=>{T($=>{const H=$.findIndex(Z=>Z.id===A.id);return H!==-1?[...$.slice(0,H),{...$[H],...A},...$.slice(H+1)]:[A,...$]})})})}),[P]),x.useEffect(()=>{if(h!=="system"){D(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:$})=>{D($?"dark":"light")})}catch{A.addListener(({matches:H})=>{try{D(H?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),x.useEffect(()=>{P.length<=1&&V(!1)},[P]),x.useEffect(()=>{const A=$=>{var H;if(s.every(q=>$[q]||$.code===q)){var G;V(!0),(G=R.current)==null||G.focus()}$.code==="Escape"&&(document.activeElement===R.current||(H=R.current)!=null&&H.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[s]),x.useEffect(()=>{if(R.current)return()=>{S.current&&(S.current.focus({preventScroll:!0}),S.current=null,M.current=!1)}},[R.current]),x.createElement("section",{ref:o,"aria-label":`${_} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((A,$)=>{var H;const[Z,G]=A.split("-");return E.length?x.createElement("ol",{key:A,dir:y==="auto"?hr():y,tabIndex:-1,ref:R,className:u,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":Z,"data-x-position":G,style:{"--front-toast-height":`${((H=j[0])==null?void 0:H.height)||0}px`,"--width":`${mc}px`,"--gap":`${k}px`,...m,...kc(f,c)},onBlur:q=>{M.current&&!q.currentTarget.contains(q.relatedTarget)&&(M.current=!1,S.current&&(S.current.focus({preventScroll:!0}),S.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||M.current||(M.current=!0,S.current=q.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{L||V(!1)},onDragEnd:()=>V(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},E.filter(q=>!q.position&&$===0||q.position===A).map((q,Q)=>{var ee,re;return x.createElement(xc,{key:q.id,icons:C,index:Q,toast:q,defaultRichColors:g,duration:(ee=w==null?void 0:w.duration)!=null?ee:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:v,closeButton:(re=w==null?void 0:w.closeButton)!=null?re:l,interacting:L,position:A,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:F,toasts:E.filter(oe=>oe.position==q.position),heights:j.filter(oe=>oe.position==q.position),setHeights:O,expandByDefault:i,gap:k,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),Cc=e=>e.startsWith("http")&&!e.endsWith(".js"),gr=e=>{try{const{hostname:t}=new URL(e);return t==="localhost"||t==="127.0.0.1"||t.endsWith(".trycloudflare.com")||t.endsWith(".ngrok-free.app")}catch{return!1}},Ec=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=t+"=".repeat((4-t.length%4)%4);return atob(o)},Nc=(e,t)=>{const o=e.indexOf(":");if(o===-1)return;const n=e.slice(0,o),r=e.slice(o+1);if(!(!n||!r)){if(!r.startsWith("http")){try{const a=JSON.parse(Ec(r));if(a.url&&gr(a.url))return{extensionId:n,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(gr(r))return{extensionId:n,bundleUrl:r,mode:t}}},mr=(e,t,o)=>{const n=e.getAll(t);if(n.length===0)return[];const r=[];for(const a of n){const s=a.split(",");for(const i of s){const l=Nc(i,o);l&&r.push(l)}}return r},vr=e=>{const t=new URLSearchParams(e);try{const o=mr(t,"_stackable_dev","dev"),n=mr(t,"_stackable_staging","staging"),r=new Map;for(const a of o)r.set(a.extensionId,a);for(const a of n)r.set(a.extensionId,a);return Array.from(r.values())}catch{return[]}},Tc=async(e,t)=>t.length===0?e:Promise.all(e.map(async o=>{const n=t.find(r=>r.extensionId===o.id);if(!n)return o;console.log(`[Stackable] Dev override active for ${o.id} → ${n.bundleUrl}`);try{const r=await fetch(`${n.bundleUrl}/manifest.json`);if(r.ok){const a=await r.json();return console.log(`[Stackable] Dev manifest loaded for ${o.id}`,a.permissions),{...o,bundleUrl:n.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${o.id}, using registry manifest`)}return{...o,bundleUrl:n.bundleUrl}}));/**
12
+ </html>`;r.srcdoc=d,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${d.substring(0,300)}`)}t.appendChild(r);const s={manifest:e.manifest,extensionId:e.id,iframe:r,ready:!1,expectedOrigin:a,messageHandlers:new Set},i=l=>{if(l.origin!==s.expectedOrigin)return;const d=l.data;!d||typeof d!="object"||!("type"in d)||("extensionId"in d?d.extensionId:void 0)!==e.id||(d.type==="extension-ready"&&(s.ready=!0),s.messageHandlers.forEach(c=>c(d)))};return window.addEventListener("message",i),rt.set(e.id,s),s},Me=(e,t)=>{const n=rt.get(e);if(!(n!=null&&n.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}const r=n.expectedOrigin==="null"?"*":n.expectedOrigin;n.iframe.contentWindow.postMessage(t,r)},gt=e=>rt.get(e),Yc=e=>{const t=rt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),rt.delete(e))},mt=()=>rt,Xn=e=>e,Kc={SUPER_ADMIN:"super_admin"};new Set(Object.values(Kc));const $o={ADMIN:"org:admin",MEMBER:"org:member"},Xc=[$o.ADMIN];[...Object.values(Xc),$o.MEMBER];const Ho={"ui-card":{description:"Card container for grouping related content",icon:"square",category:"layout",attributes:["className","onClick"],children:["ui-card-header","ui-card-content"]},"ui-card-content":{description:"Content area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-button":{description:"Interactive button with variant and size options",icon:"mouse-pointer-click",category:"input",attributes:["variant","size","disabled","onClick","type","className","title"],attributeValues:{variant:["default","destructive","outline","secondary","ghost","link"],size:["default","xs","sm","lg","icon"]}},"ui-text":{description:"Paragraph text",icon:"type",category:"text",attributes:["className","tone"],attributeValues:{tone:["default","muted","destructive"]}},"ui-heading":{description:"Heading element (h1–h6)",icon:"heading",category:"text",attributes:["level","className"],attributeValues:{level:["1","2","3","4","5","6"]}},"ui-badge":{description:"Small label for status, category, or count",icon:"tag",category:"text",attributes:["variant","hue","tone","className"],attributeValues:{variant:["default","secondary","destructive","outline","ghost","link"],hue:["amber","blue","emerald","red","purple","pink","gray"],tone:["default","muted","destructive"]}},"ui-input":{description:"Single-line text input field",icon:"text-cursor-input",category:"input",attributes:["type","placeholder","value","onChange","disabled","className","id"]},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"]},"ui-select":{description:"Dropdown select with options",icon:"chevrons-up-down",category:"input",attributes:["value","defaultValue","onChange","placeholder","disabled","className"],children:["ui-select-option"]},"ui-select-option":{description:"Option within a Select dropdown",icon:"chevrons-up-down",category:"input",attributes:["value","disabled","className"]},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"]},"ui-switch":{description:"Toggle switch for on/off states",icon:"toggle-left",category:"input",attributes:["checked","onChange","disabled","size","className","id"],attributeValues:{size:["sm","default"]}},"ui-label":{description:"Form label associated with an input",icon:"tag",category:"input",attributes:["htmlFor","className"]},"ui-radio-group":{description:"Group of radio buttons for single selection",icon:"circle-dot",category:"input",attributes:["value","defaultValue","onChange","className"],children:["ui-radio-group-item","ui-label","ui-inline"]},"ui-radio-group-item":{description:"Individual radio button within a RadioGroup",icon:"circle-dot",category:"input",attributes:["value","disabled","className","id"]},"ui-stack":{description:"Vertical or horizontal flex container with gap",icon:"rows-3",category:"layout",attributes:["gap","direction","className"],attributeValues:{direction:["row","column"],gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-inline":{description:"Horizontal flex container with centered items",icon:"columns-3",category:"layout",attributes:["gap","className"],attributeValues:{gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-separator":{description:"Horizontal divider line",icon:"minus",category:"layout",attributes:["className"]},"ui-tabs":{description:"Tabbed content container",icon:"panel-top",category:"navigation",attributes:["defaultValue","className"],children:["ui-tabs-list","ui-tabs-content"]},"ui-tabs-list":{description:"Container for tab triggers",icon:"panel-top",category:"navigation",attributes:["className"],children:["ui-tabs-trigger"]},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-scroll-area":{description:"Scrollable content container",icon:"scroll",category:"layout",attributes:["className"]},"ui-avatar":{description:"User avatar with image and initials fallback",icon:"circle-user",category:"composite",attributes:["src","alt","className"]},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]}},"ui-qr-code":{description:"QR code rendered from a string payload",icon:"qr-code",category:"composite",attributes:["value","size","variant","level","alt","className"],attributeValues:{size:["sm","md","lg"],variant:["default","inverted"],level:["low","medium","quartile","high"]}},"ui-link":{description:"Hyperlink element",icon:"link",category:"navigation",attributes:["href","target","rel","className"]},"ui-menu":{description:"Card-based menu with clickable items",icon:"menu",category:"navigation",attributes:["title","className"],children:["ui-menu-item"]},"ui-menu-item":{description:"Clickable item within a Menu",icon:"menu",category:"navigation",attributes:["icon","label","description","onClick","className"]},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"]},"ui-tooltip":{description:"Hover tooltip with text content",icon:"message-square",category:"feedback",attributes:["content","className"]},"ui-progress":{description:"Progress bar with percentage value",icon:"bar-chart",category:"feedback",attributes:["value","className"]},"ui-alert":{description:"Alert banner with icon and optional title",icon:"alert-circle",category:"feedback",attributes:["variant","title","className"],attributeValues:{variant:["default","destructive"]}},"ui-collapsible":{description:"Expandable/collapsible content section",icon:"chevrons-down-up",category:"composite",attributes:["defaultOpen","className"],children:["ui-collapsible-trigger","ui-collapsible-content"]},"ui-collapsible-trigger":{description:"Clickable trigger to toggle Collapsible",icon:"chevrons-down-up",category:"composite",attributes:["className"]},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"]}},vt=Ho,Bt=Object.keys(Ho),Zc=Object.fromEntries(Bt.map(e=>[e,vt[e].attributes]));Object.fromEntries(Bt.filter(e=>vt[e].attributeValues).map(e=>[e,vt[e].attributeValues]));const Vo=Object.fromEntries(Bt.filter(e=>vt[e].children).map(e=>[e,vt[e].children]));({...Vo},Object.fromEntries(Bt.map(e=>[e,vt[e].category])));const bt={NEW_CONVERSATION:"newConversation",SET_CONVERSATION_TAGS:"setConversationTags",SET_CONVERSATION_FIELDS:"setConversationFields"},Jc=["identity","messaging","settings"],Qc={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},ed=e=>{const t=async n=>{const r=n.data;if((r==null?void 0:r.type)!=="capability-request")return;const o=r;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(n.data));const a=o.extensionId;if(!a||!gt(a)){const l=[...mt().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${o.capability})`);return}const s=gt(a);if(!s)return;const i=Qc[o.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:o.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Me(a,l);return}try{let l;switch(o.capability){case"data.query":l=await e["data.query"](o.payload);break;case"data.fetch":l=await e["data.fetch"](a,o.payload);break;case"actions.toast":l=await e["actions.toast"](a,o.payload);break;case"actions.invoke":l=await e["actions.invoke"](o.payload);break;case"context.read":l=await e["context.read"](a);break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,o.payload):null;break;default:throw new Error(`Unknown capability: ${o.capability}`)}const d={type:"capability-response",id:o.id,success:!0,data:l};Me(a,d)}catch(l){const d={type:"capability-response",id:o.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Me(a,d)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},Uo=C.createContext({extensions:[],components:{},ready:!1}),td=({extensions:e,capabilityHandlers:t,components:n={},children:r})=>{const[o,a]=C.useState(!1),s=C.useRef(null),i=C.useRef(null),l=C.useRef(t);return l.current=t,C.useEffect(()=>{if(!s.current)return;let d=!1;return(async()=>{const c=s.current;if(!c)return;console.log("[ExtensionProvider] Initializing with",e.length,"extensions");const p=new Proxy({},{get:(g,v)=>l.current[v]});i.current=ed(p);for(const g of e)g.enabled&&!d&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await Gc(g,c),console.log("[ExtensionProvider] Sandbox created for",g.id));d||(console.log("[ExtensionProvider] Ready"),a(!0))})(),()=>{var c;d=!0;for(const p of e)Yc(p.id);(c=i.current)==null||c.call(i)}},[e]),u.jsxs(Uo.Provider,{value:{extensions:e,components:n,ready:o},children:[u.jsx("div",{ref:s,style:{display:"none"}}),r]})},Ro=()=>C.useContext(Uo),nd=e=>Bt.includes(e),rd=(e,t={})=>{const{surfaceId:n,logPrefix:r="[NodeRenderer]"}=t,o=(a,s,i=0)=>{var g,v,m;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return u.jsx(C.Fragment,{children:(g=a.children)==null?void 0:g.map((b,w)=>o(b,s,w))},i);if(!nd(a.tag))return console.warn(`${r} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${r} Unregistered UI tag: <${a.tag}>`),null):u.jsx(C.Fragment,{children:(v=a.children)==null?void 0:v.map((b,w)=>o(b,s,w))},i);const{filtered:d,stripped:f}=od(a.tag,a.attrs);f.length>0&&console.warn(`${r} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=ad(a.tag,a.children);if(c.length>0&&console.warn(`${r} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const b=a.actionId;d.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:n,actionId:b},"*")}}if(d["data-onchange-id"]){const b=d["data-onchange-id"];delete d["data-onchange-id"],d.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:n,actionId:b,value:w.target.value},"*")}}const p=(m=a.children)==null?void 0:m.map((b,w)=>o(b,s,w));return C.createElement(l,{...d,key:i},p&&p.length>0?p:void 0)};return o},od=(e,t)=>{const n={},r=[];if(!t)return{filtered:n,stripped:r};const o=Zc[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){n[a]=s;continue}o!=null&&o.includes(a)?n[a]=s:r.push(a)}return{filtered:n,stripped:r}},ad=(e,t)=>{const n=Vo[e];if(!n||!t)return[];const r=[];for(const o of t)o.type!=="text"&&(!o.tag||o.tag==="__fragment"||n.includes(o.tag)||r.push(o.tag));return r},sd=e=>{const t={...e};for(const n of Jc)delete t[n];return t},Jt=({target:e,context:t,className:n,separator:r,fallback:o=null,render:a})=>{const{extensions:s,components:i,ready:l}=Ro(),[d,f]=C.useState({}),c=C.useRef(""),p=C.useMemo(()=>s.filter(b=>b.enabled&&b.manifest.targets.includes(e)),[s.map(b=>b.id).join(","),e]),g=C.useMemo(()=>rd(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(C.useEffect(()=>{const b=p.map(y=>y.id).join(",");if(c.current!==b&&(c.current=b,f({})),!l||p.length===0)return;const w=y=>{const x=y.data;if(!(!x||typeof x!="object"||!p.some(P=>{const E=gt(P.id);return E&&y.source===E.iframe.contentWindow}))){if(x.type==="surface-update"&&x.surfaceId===e){const P=p.find(N=>{const S=gt(N.id);return S&&y.source===S.iframe.contentWindow});if(!P)return;const E=g(x.tree,y.source??null);f(N=>({...N,[P.id]:E}))}if(x.type==="surface-ready"&&x.surfaceId===e&&t){const P=sd(t);p.forEach(E=>{var S;const N=gt(E.id);(S=N==null?void 0:N.iframe.contentWindow)==null||S.postMessage({type:"context-update",surfaceId:e,context:P},"*")})}}};return window.addEventListener("message",w),p.forEach(y=>{var k;const x=gt(y.id);(k=x==null?void 0:x.iframe.contentWindow)==null||k.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,p,e,t,g]),!l)return null;if(p.length===0)return o?u.jsx("div",{"data-extension-slot":e,title:e,className:n,children:o}):null;const v=p.map(b=>({id:b.id,children:d[b.id]})).filter(b=>!!b.children),m=v.length>0?v.flatMap((b,w,y)=>{const x=a?a({extensionId:b.id,children:b.children,index:w,total:y.length}):u.jsx(C.Fragment,{children:b.children},b.id),k=u.jsx(C.Fragment,{children:x},`extension:${b.id}`);if(w===0||!r)return[k];const P=y[w-1],E=typeof r=="function"?r({index:w,total:y.length,previousExtensionId:P.id,extensionId:b.id}):r;return[u.jsx(C.Fragment,{children:E},`separator:${P.id}:${b.id}:${w}`),k]}):o;return u.jsx("div",{"data-extension-slot":e,title:e,className:n,children:m})};function id(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const ld=e=>{switch(e){case"success":return ud;case"info":return pd;case"warning":return fd;case"error":return hd;default:return null}},cd=Array(12).fill(0),dd=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},cd.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ud=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),fd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),pd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),hd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),gd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),md=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Zn=1;class vd{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Zn++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async d=>{if(s=["resolve",d],C.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(wd(d)&&!d.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...v})}else if(d instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(d):n.error,p=typeof n.description=="function"?await n.description(d):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...v})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(d):n.success,p=typeof n.description=="function"?await n.description(d):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...v})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(d):n.error,c=typeof n.description=="function"?await n.description(d):n.description,g=typeof f=="object"&&!C.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((d,f)=>i.then(()=>s[0]==="reject"?f(s[1]):d(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Zn++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new vd,bd=(e,t)=>{const n=(t==null?void 0:t.id)||Zn++;return ge.addToast({title:e,...t,id:n}),n},wd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yd=bd,xd=()=>ge.toasts,Cd=()=>ge.getActiveToasts(),wt=Object.assign(yd,{success:ge.success,info:ge.info,warning:ge.warning,error:ge.error,custom:ge.custom,message:ge.message,promise:ge.promise,dismiss:ge.dismiss,loading:ge.loading},{getHistory:xd,getToasts:Cd});id("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Qt(e){return e.label!==void 0}const kd=3,Sd="24px",Ed="16px",Wo=4e3,Nd=356,Td=14,_d=45,Ad=200;function Le(...e){return e.filter(Boolean).join(" ")}function Pd(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Id=e=>{var t,n,r,o,a,s,i,l,d;const{invert:f,toast:c,unstyled:p,interacting:g,setHeights:v,visibleToasts:m,heights:b,index:w,toasts:y,expanded:x,removeToast:k,defaultRichColors:P,closeButton:E,style:N,cancelButtonStyle:S,actionButtonStyle:A,className:z="",descriptionClassName:_="",duration:M,position:O,gap:I,expandByDefault:j,classNames:D,icons:$,closeButtonAriaLabel:q="Close toast"}=e,[L,T]=C.useState(null),[F,H]=C.useState(null),[B,V]=C.useState(!1),[U,X]=C.useState(!1),[R,W]=C.useState(!1),[Z,ee]=C.useState(!1),[ae,ne]=C.useState(!1),[ce,de]=C.useState(0),[pt,tt]=C.useState(0),Ae=C.useRef(c.duration||M||Wo),jn=C.useRef(null),ve=C.useRef(null),Ub=w===0,Rb=w+1<=m,xe=c.type,Ot=c.dismissible!==!1,Wb=c.className||"",jb=c.descriptionClassName||"",qn=C.useMemo(()=>b.findIndex(te=>te.toastId===c.id)||0,[b,c.id]),qb=C.useMemo(()=>{var te;return(te=c.closeButton)!=null?te:E},[c.closeButton,E]),Fc=C.useMemo(()=>c.duration||M||Wo,[c.duration,M]),zo=C.useRef(0),zt=C.useRef(0),$c=C.useRef(0),Dt=C.useRef(null),[Gb,Yb]=O.split("-"),Hc=C.useMemo(()=>b.reduce((te,ue,he)=>he>=qn?te:te+ue.height,0),[b,qn]),Vc=md(),Kb=c.invert||f,Do=xe==="loading";zt.current=C.useMemo(()=>qn*I+Hc,[qn,Hc]),C.useEffect(()=>{Ae.current=Fc},[Fc]),C.useEffect(()=>{V(!0)},[]),C.useEffect(()=>{const te=ve.current;if(te){const ue=te.getBoundingClientRect().height;return tt(ue),v(he=>[{toastId:c.id,height:ue,position:c.position},...he]),()=>v(he=>he.filter(Ce=>Ce.toastId!==c.id))}},[v,c.id]),C.useLayoutEffect(()=>{if(!B)return;const te=ve.current,ue=te.style.height;te.style.height="auto";const he=te.getBoundingClientRect().height;te.style.height=ue,tt(he),v(Ce=>Ce.find(fe=>fe.toastId===c.id)?Ce.map(fe=>fe.toastId===c.id?{...fe,height:he}:fe):[{toastId:c.id,height:he,position:c.position},...Ce])},[B,c.title,c.description,v,c.id,c.jsx,c.action,c.cancel]);const nt=C.useCallback(()=>{X(!0),de(zt.current),v(te=>te.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{k(c)},Ad)},[c,k,v,zt]);C.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let te;return x||g||Vc?(()=>{if($c.current<zo.current){const Ce=new Date().getTime()-zo.current;Ae.current=Ae.current-Ce}$c.current=new Date().getTime()})():(()=>{Ae.current!==1/0&&(zo.current=new Date().getTime(),te=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),nt()},Ae.current))})(),()=>clearTimeout(te)},[x,g,c,xe,Vc,nt]),C.useEffect(()=>{c.delete&&(nt(),c.onDismiss==null||c.onDismiss.call(c,c))},[nt,c.delete]);function Xb(){var te;if($!=null&&$.loading){var ue;return C.createElement("div",{className:Le(D==null?void 0:D.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},$.loading)}return C.createElement(dd,{className:Le(D==null?void 0:D.loader,c==null||(te=c.classNames)==null?void 0:te.loader),visible:xe==="loading"})}const Zb=c.icon||($==null?void 0:$[xe])||ld(xe);var Uc,Rc;return C.createElement("li",{tabIndex:0,ref:ve,className:Le(z,Wb,D==null?void 0:D.toast,c==null||(t=c.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[xe],c==null||(n=c.classNames)==null?void 0:n[xe]),"data-sonner-toast":"","data-rich-colors":(Uc=c.richColors)!=null?Uc:P,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":B,"data-promise":!!c.promise,"data-swiped":ae,"data-removed":U,"data-visible":Rb,"data-y-position":Gb,"data-x-position":Yb,"data-index":w,"data-front":Ub,"data-swiping":R,"data-dismissible":Ot,"data-type":xe,"data-invert":Kb,"data-swipe-out":Z,"data-swipe-direction":F,"data-expanded":!!(x||j&&B),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${U?ce:zt.current}px`,"--initial-height":j?"auto":`${pt}px`,...N,...c.style},onDragEnd:()=>{W(!1),T(null),Dt.current=null},onPointerDown:te=>{te.button!==2&&(Do||!Ot||(jn.current=new Date,de(zt.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(W(!0),Dt.current={x:te.clientX,y:te.clientY})))},onPointerUp:()=>{var te,ue,he;if(Z||!Ot)return;Dt.current=null;const Ce=Number(((te=ve.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Gn=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=jn.current)==null?void 0:he.getTime()),Se=L==="x"?Ce:Gn,Yn=Math.abs(Se)/fe;if(Math.abs(Se)>=_d||Yn>.11){de(zt.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Ce>0?"right":"left":Gn>0?"down":"up"),nt(),ee(!0);return}else{var Pe,Ie;(Pe=ve.current)==null||Pe.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}ne(!1),W(!1),T(null)},onPointerMove:te=>{var ue,he,Ce;if(!Dt.current||!Ot||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=te.clientY-Dt.current.y,Se=te.clientX-Dt.current.x;var Yn;const Pe=(Yn=e.swipeDirections)!=null?Yn:Pd(O);!L&&(Math.abs(Se)>1||Math.abs(fe)>1)&&T(Math.abs(Se)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Wc=ht=>1/(1.5+Math.abs(ht)/20);if(L==="y"){if(Pe.includes("top")||Pe.includes("bottom"))if(Pe.includes("top")&&fe<0||Pe.includes("bottom")&&fe>0)Ie.y=fe;else{const ht=fe*Wc(fe);Ie.y=Math.abs(ht)<Math.abs(fe)?ht:fe}}else if(L==="x"&&(Pe.includes("left")||Pe.includes("right")))if(Pe.includes("left")&&Se<0||Pe.includes("right")&&Se>0)Ie.x=Se;else{const ht=Se*Wc(Se);Ie.x=Math.abs(ht)<Math.abs(Se)?ht:Se}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&ne(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(Ce=ve.current)==null||Ce.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},qb&&!c.jsx&&xe!=="loading"?C.createElement("button",{"aria-label":q,"data-disabled":Do,"data-close-button":!0,onClick:Do||!Ot?()=>{}:()=>{nt(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Le(D==null?void 0:D.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Rc=$==null?void 0:$.close)!=null?Rc:gd):null,(xe||c.icon||c.promise)&&c.icon!==null&&(($==null?void 0:$[xe])!==null||c.icon)?C.createElement("div",{"data-icon":"",className:Le(D==null?void 0:D.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Xb():null,c.type!=="loading"?Zb:null):null,C.createElement("div",{"data-content":"",className:Le(D==null?void 0:D.content,c==null||(a=c.classNames)==null?void 0:a.content)},C.createElement("div",{"data-title":"",className:Le(D==null?void 0:D.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?C.createElement("div",{"data-description":"",className:Le(_,jb,D==null?void 0:D.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),C.isValidElement(c.cancel)?c.cancel:c.cancel&&Qt(c.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||S,onClick:te=>{Qt(c.cancel)&&Ot&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,te),nt())},className:Le(D==null?void 0:D.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,C.isValidElement(c.action)?c.action:c.action&&Qt(c.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||A,onClick:te=>{Qt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,te),!te.defaultPrevented&&nt())},className:Le(D==null?void 0:D.actionButton,c==null||(d=c.classNames)==null?void 0:d.actionButton)},c.action.label):null)};function jo(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Md(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?Ed:Sd;function l(d){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=i:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(i)}),n}const Ld=C.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:d,offset:f,mobileOffset:c,theme:p="light",richColors:g,duration:v,style:m,visibleToasts:b=kd,toastOptions:w,dir:y=jo(),gap:x=Td,icons:k,containerAriaLabel:P="Notifications"}=t,[E,N]=C.useState([]),S=C.useMemo(()=>r?E.filter(B=>B.toasterId===r):E.filter(B=>!B.toasterId),[E,r]),A=C.useMemo(()=>Array.from(new Set([a].concat(S.filter(B=>B.position).map(B=>B.position)))),[S,a]),[z,_]=C.useState([]),[M,O]=C.useState(!1),[I,j]=C.useState(!1),[D,$]=C.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=C.useRef(null),L=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=C.useRef(null),F=C.useRef(!1),H=C.useCallback(B=>{N(V=>{var U;return(U=V.find(X=>X.id===B.id))!=null&&U.delete||ge.dismiss(B.id),V.filter(({id:X})=>X!==B.id)})},[]);return C.useEffect(()=>ge.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{N(V=>V.map(U=>U.id===B.id?{...U,delete:!0}:U))});return}setTimeout(()=>{Kn.flushSync(()=>{N(V=>{const U=V.findIndex(X=>X.id===B.id);return U!==-1?[...V.slice(0,U),{...V[U],...B},...V.slice(U+1)]:[B,...V]})})})}),[E]),C.useEffect(()=>{if(p!=="system"){$(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{B.addListener(({matches:U})=>{try{$(U?"dark":"light")}catch(X){console.error(X)}})}},[p]),C.useEffect(()=>{E.length<=1&&O(!1)},[E]),C.useEffect(()=>{const B=V=>{var U;if(s.every(W=>V[W]||V.code===W)){var R;O(!0),(R=q.current)==null||R.focus()}V.code==="Escape"&&(document.activeElement===q.current||(U=q.current)!=null&&U.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),C.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,F.current=!1)}},[q.current]),C.createElement("section",{ref:n,"aria-label":`${P} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((B,V)=>{var U;const[X,R]=B.split("-");return S.length?C.createElement("ol",{key:B,dir:y==="auto"?jo():y,tabIndex:-1,ref:q,className:d,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":X,"data-x-position":R,style:{"--front-toast-height":`${((U=z[0])==null?void 0:U.height)||0}px`,"--width":`${Nd}px`,"--gap":`${x}px`,...m,...Md(f,c)},onBlur:W=>{F.current&&!W.currentTarget.contains(W.relatedTarget)&&(F.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||F.current||(F.current=!0,T.current=W.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{I||O(!1)},onDragEnd:()=>O(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(W=>!W.position&&V===0||W.position===B).map((W,Z)=>{var ee,ae;return C.createElement(Id,{key:W.id,icons:k,index:Z,toast:W,defaultRichColors:g,duration:(ee=w==null?void 0:w.duration)!=null?ee:v,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:o,visibleToasts:b,closeButton:(ae=w==null?void 0:w.closeButton)!=null?ae:l,interacting:I,position:B,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:H,toasts:S.filter(ne=>ne.position==W.position),heights:z.filter(ne=>ne.position==W.position),setHeights:_,expandByDefault:i,gap:x,expanded:M,swipeDirections:t.swipeDirections})})):null}))}),Od=e=>e.startsWith("http")&&!e.endsWith(".js"),qo=e=>{try{const{hostname:t}=new URL(e);return t==="localhost"||t==="127.0.0.1"||t.endsWith(".trycloudflare.com")||t.endsWith(".ngrok-free.app")}catch{return!1}},zd=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t+"=".repeat((4-t.length%4)%4);return atob(n)},Dd=(e,t)=>{const n=e.indexOf(":");if(n===-1)return;const r=e.slice(0,n),o=e.slice(n+1);if(!(!r||!o)){if(!o.startsWith("http")){try{const a=JSON.parse(zd(o));if(a.url&&qo(a.url))return{extensionId:r,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(qo(o))return{extensionId:r,bundleUrl:o,mode:t}}},Go=(e,t,n)=>{const r=e.getAll(t);if(r.length===0)return[];const o=[];for(const a of r){const s=a.split(",");for(const i of s){const l=Dd(i,n);l&&o.push(l)}}return o},Yo=e=>{const t=new URLSearchParams(e);try{const n=Go(t,"_stackable_dev","dev"),r=Go(t,"_stackable_staging","staging"),o=new Map;for(const a of n)o.set(a.extensionId,a);for(const a of r)o.set(a.extensionId,a);return Array.from(o.values())}catch{return[]}},Bd=async(e,t)=>t.length===0?e:Promise.all(e.map(async n=>{const r=t.find(o=>o.extensionId===n.id);if(!r)return n;console.log(`[Stackable] Dev override active for ${n.id} → ${r.bundleUrl}`);try{const o=await fetch(`${r.bundleUrl}/manifest.json`);if(o.ok){const a=await o.json();return console.log(`[Stackable] Dev manifest loaded for ${n.id}`,a.permissions),{...n,bundleUrl:r.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${n.id}, using registry manifest`)}return{...n,bundleUrl:r.bundleUrl}}));/**
13
13
  * @license lucide-react v0.577.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const br=(...e)=>e.filter((t,o,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===o).join(" ").trim();/**
17
+ */const Ko=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
18
18
  * @license lucide-react v0.577.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */const _c=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
22
+ */const Fd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
23
23
  * @license lucide-react v0.577.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const Pc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,n)=>n?n.toUpperCase():o.toLowerCase());/**
27
+ */const $d=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
28
28
  * @license lucide-react v0.577.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const wr=e=>{const t=Pc(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
32
+ */const Xo=e=>{const t=$d(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
33
33
  * @license lucide-react v0.577.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */var Ac={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
37
+ */var Hd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
38
38
  * @license lucide-react v0.577.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const Ic=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
42
+ */const Vd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
43
43
  * @license lucide-react v0.577.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Mc=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:r="",children:a,iconNode:s,...i},l)=>x.createElement("svg",{ref:l,...Ac,width:t,height:t,stroke:e,strokeWidth:n?Number(o)*24/Number(t):o,className:br("lucide",r),...!a&&!Ic(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,f])=>x.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
47
+ */const Ud=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>C.createElement("svg",{ref:l,...Hd,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ko("lucide",o),...!a&&!Vd(i)&&{"aria-hidden":"true"},...i},[...s.map(([d,f])=>C.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
48
48
  * @license lucide-react v0.577.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const ae=(e,t)=>{const o=x.forwardRef(({className:n,...r},a)=>x.createElement(Mc,{ref:a,iconNode:t,className:br(`lucide-${_c(wr(e))}`,`lucide-${e}`,n),...r}));return o.displayName=wr(e),o};/**
52
+ */const oe=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(Ud,{ref:a,iconNode:t,className:Ko(`lucide-${Fd(Xo(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Xo(e),n};/**
53
53
  * @license lucide-react v0.577.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Oc=ae("airplay",[["path",{d:"M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",key:"ns4c3b"}],["path",{d:"m12 15 5 6H7Z",key:"14qnn2"}]]);/**
57
+ */const Rd=oe("airplay",[["path",{d:"M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",key:"ns4c3b"}],["path",{d:"m12 15 5 6H7Z",key:"14qnn2"}]]);/**
58
58
  * @license lucide-react v0.577.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Lc=ae("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
62
+ */const Wd=oe("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
63
63
  * @license lucide-react v0.577.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const zc=ae("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
67
+ */const jd=oe("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
68
68
  * @license lucide-react v0.577.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Dc=ae("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
72
+ */const qd=oe("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
73
73
  * @license lucide-react v0.577.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const $c=ae("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"}]]);/**
77
+ */const Gd=oe("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"}]]);/**
78
78
  * @license lucide-react v0.577.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const yr=ae("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
82
+ */const Zo=oe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
83
83
  * @license lucide-react v0.577.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const xr=ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
87
+ */const Jo=oe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
88
88
  * @license lucide-react v0.577.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const Fc=ae("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
92
+ */const Yd=oe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
93
93
  * @license lucide-react v0.577.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Ro=ae("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
97
+ */const Jn=oe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
98
98
  * @license lucide-react v0.577.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const Bc=ae("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
102
+ */const Kd=oe("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
103
103
  * @license lucide-react v0.577.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const kr=ae("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
107
+ */const Qo=oe("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
108
108
  * @license lucide-react v0.577.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const Sr=ae("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
112
+ */const ea=oe("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
113
113
  * @license lucide-react v0.577.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const Cr=ae("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
117
+ */const ta=oe("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
118
118
  * @license lucide-react v0.577.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const Hc=ae("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
122
+ */const Xd=oe("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
123
123
  * @license lucide-react v0.577.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const Vc=ae("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
127
+ */const Zd=oe("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
128
128
  * @license lucide-react v0.577.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const Wc=ae("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
132
+ */const Jd=oe("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
133
133
  * @license lucide-react v0.577.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const Uc=ae("corner-right-down",[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]]);/**
137
+ */const Qd=oe("corner-right-down",[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]]);/**
138
138
  * @license lucide-react v0.577.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const jc=ae("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
142
+ */const eu=oe("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
143
143
  * @license lucide-react v0.577.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const Rc=ae("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
147
+ */const tu=oe("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
148
148
  * @license lucide-react v0.577.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const Gc=ae("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
152
+ */const nu=oe("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
153
153
  * @license lucide-react v0.577.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const Yt=ae("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
157
+ */const ru=oe("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
158
158
  * @license lucide-react v0.577.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const Go=ae("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
162
+ */const en=oe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
163
163
  * @license lucide-react v0.577.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const qo=ae("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
167
+ */const Qn=oe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
168
168
  * @license lucide-react v0.577.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const qc=ae("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
172
+ */const er=oe("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
173
173
  * @license lucide-react v0.577.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const Er=ae("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);/**
177
+ */const ou=oe("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
178
178
  * @license lucide-react v0.577.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const Yo=ae("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);/**
182
+ */const na=oe("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);/**
183
183
  * @license lucide-react v0.577.0 - ISC
184
184
  *
185
185
  * This source code is licensed under the ISC license.
186
186
  * See the LICENSE file in the root directory of this source tree.
187
- */const Yc=ae("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
187
+ */const tr=oe("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);/**
188
188
  * @license lucide-react v0.577.0 - ISC
189
189
  *
190
190
  * This source code is licensed under the ISC license.
191
191
  * See the LICENSE file in the root directory of this source tree.
192
- */const Xc=ae("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
192
+ */const au=oe("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
193
193
  * @license lucide-react v0.577.0 - ISC
194
194
  *
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
- */const Kc=ae("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
197
+ */const su=oe("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
198
198
  * @license lucide-react v0.577.0 - ISC
199
199
  *
200
200
  * This source code is licensed under the ISC license.
201
201
  * See the LICENSE file in the root directory of this source tree.
202
- */const Zc=ae("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
202
+ */const iu=oe("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
203
203
  * @license lucide-react v0.577.0 - ISC
204
204
  *
205
205
  * This source code is licensed under the ISC license.
206
206
  * See the LICENSE file in the root directory of this source tree.
207
- */const Jc=ae("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
207
+ */const lu=oe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
208
208
  * @license lucide-react v0.577.0 - ISC
209
209
  *
210
210
  * This source code is licensed under the ISC license.
211
211
  * See the LICENSE file in the root directory of this source tree.
212
- */const Qc=ae("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);/**
212
+ */const cu=oe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
213
213
  * @license lucide-react v0.577.0 - ISC
214
214
  *
215
215
  * This source code is licensed under the ISC license.
216
216
  * See the LICENSE file in the root directory of this source tree.
217
- */const Nr=ae("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
217
+ */const du=oe("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);/**
218
218
  * @license lucide-react v0.577.0 - ISC
219
219
  *
220
220
  * This source code is licensed under the ISC license.
221
221
  * See the LICENSE file in the root directory of this source tree.
222
- */const ed=ae("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
222
+ */const ra=oe("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
223
223
  * @license lucide-react v0.577.0 - ISC
224
224
  *
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
- */const td=ae("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
227
+ */const uu=oe("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
228
228
  * @license lucide-react v0.577.0 - ISC
229
229
  *
230
230
  * This source code is licensed under the ISC license.
231
231
  * See the LICENSE file in the root directory of this source tree.
232
- */const Tr=ae("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
232
+ */const fu=oe("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
233
233
  * @license lucide-react v0.577.0 - ISC
234
234
  *
235
235
  * This source code is licensed under the ISC license.
236
236
  * See the LICENSE file in the root directory of this source tree.
237
- */const od=ae("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function _r(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=_r(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function Pr(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=_r(e))&&(n&&(n+=" "),n+=t);return n}const nd=(e,t)=>{const o=new Array(e.length+t.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<t.length;n++)o[e.length+n]=t[n];return o},rd=(e,t)=>({classGroupId:e,validator:t}),Ar=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),Xt="-",Ir=[],ad="arbitrary..",sd=e=>{const t=ld(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return id(s);const i=s.split(Xt),l=i[0]===""&&i.length>1?1:0;return Mr(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=n[s],u=o[s];return l?u?nd(u,l):l:u||Ir}return o[s]||Ir}}},Mr=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const r=e[t],a=o.nextPart.get(r);if(a){const u=Mr(e,t+1,a);if(u)return u}const s=o.validators;if(s===null)return;const i=t===0?e.join(Xt):e.slice(t).join(Xt),l=s.length;for(let u=0;u<l;u++){const f=s[u];if(f.validator(i))return f.classGroupId}},id=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),n=t.slice(0,o);return n?ad+n:void 0})(),ld=e=>{const{theme:t,classGroups:o}=e;return cd(o,t)},cd=(e,t)=>{const o=Ar();for(const n in e){const r=e[n];Xo(r,o,n,t)}return o},Xo=(e,t,o,n)=>{const r=e.length;for(let a=0;a<r;a++){const s=e[a];dd(s,t,o,n)}},dd=(e,t,o,n)=>{if(typeof e=="string"){ud(e,t,o);return}if(typeof e=="function"){fd(e,t,o,n);return}pd(e,t,o,n)},ud=(e,t,o)=>{const n=e===""?t:Or(t,e);n.classGroupId=o},fd=(e,t,o,n)=>{if(hd(e)){Xo(e(n),t,o,n);return}t.validators===null&&(t.validators=[]),t.validators.push(rd(o,e))},pd=(e,t,o,n)=>{const r=Object.entries(e),a=r.length;for(let s=0;s<a;s++){const[i,l]=r[s];Xo(l,Or(t,i),o,n)}},Or=(e,t)=>{let o=e;const n=t.split(Xt),r=n.length;for(let a=0;a<r;a++){const s=n[a];let i=o.nextPart.get(s);i||(i=Ar(),o.nextPart.set(s,i)),o=i}return o},hd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,gd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),n=Object.create(null);const r=(a,s)=>{o[a]=s,t++,t>e&&(t=0,n=o,o=Object.create(null))};return{get(a){let s=o[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return r(a,s),s},set(a,s){a in o?o[a]=s:r(a,s)}}},Ko="!",Lr=":",md=[],zr=(e,t,o,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:n,isExternal:r}),vd=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=r=>{const a=[];let s=0,i=0,l=0,u;const f=r.length;for(let m=0;m<f;m++){const v=r[m];if(s===0&&i===0){if(v===Lr){a.push(r.slice(l,m)),l=m+1;continue}if(v==="/"){u=m;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?r:r.slice(l);let h=c,g=!1;c.endsWith(Ko)?(h=c.slice(0,-1),g=!0):c.startsWith(Ko)&&(h=c.slice(1),g=!0);const b=u&&u>l?u-l:void 0;return zr(a,g,h,b)};if(t){const r=t+Lr,a=n;n=s=>s.startsWith(r)?a(s.slice(r.length)):zr(md,!1,s,void 0,!0)}if(o){const r=n;n=a=>o({className:a,parseClassName:r})}return n},bd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{t.set(o,1e6+n)}),o=>{const n=[];let r=[];for(let a=0;a<o.length;a++){const s=o[a],i=s[0]==="[",l=t.has(s);i||l?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(s)):r.push(s)}return r.length>0&&(r.sort(),n.push(...r)),n}},wd=e=>({cache:gd(e.cacheSize),parseClassName:vd(e),sortModifiers:bd(e),...sd(e)}),yd=/\s+/,xd=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:a}=t,s=[],i=e.trim().split(yd);let l="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:c,modifiers:h,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:m}=o(f);if(c){l=f+(l.length>0?" "+l:l);continue}let v=!!m,w=n(v?b.substring(0,m):b);if(!w){if(!v){l=f+(l.length>0?" "+l:l);continue}if(w=n(b),!w){l=f+(l.length>0?" "+l:l);continue}v=!1}const y=h.length===0?"":h.length===1?h[0]:a(h).join(":"),k=g?y+Ko:y,C=k+w;if(s.indexOf(C)>-1)continue;s.push(C);const _=r(w,v);for(let P=0;P<_.length;++P){const T=_[P];s.push(k+T)}l=f+(l.length>0?" "+l:l)}return l},kd=(...e)=>{let t=0,o,n,r="";for(;t<e.length;)(o=e[t++])&&(n=Dr(o))&&(r&&(r+=" "),r+=n);return r},Dr=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=Dr(e[n]))&&(o&&(o+=" "),o+=t);return o},Sd=(e,...t)=>{let o,n,r,a;const s=l=>{const u=t.reduce((f,c)=>c(f),e());return o=wd(u),n=o.cache.get,r=o.cache.set,a=i,i(l)},i=l=>{const u=n(l);if(u)return u;const f=xd(l,o);return r(l,f),f};return a=s,(...l)=>a(kd(...l))},Cd=[],le=e=>{const t=o=>o[e]||Cd;return t.isThemeGetter=!0,t},$r=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ed=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Nd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Td=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Ed.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>!!e&&Number.isInteger(Number(e)),Zo=e=>e.endsWith("%")&&ne(e.slice(0,-1)),Be=e=>Nd.test(e),Br=()=>!0,Id=e=>Td.test(e)&&!_d.test(e),Jo=()=>!1,Md=e=>Pd.test(e),Od=e=>Ad.test(e),Ld=e=>!W(e)&&!U(e),zd=e=>Ge(e,Rr,Jo),W=e=>$r.test(e),ot=e=>Ge(e,Gr,Id),Hr=e=>Ge(e,Ud,ne),Dd=e=>Ge(e,Yr,Br),$d=e=>Ge(e,qr,Jo),Vr=e=>Ge(e,Ur,Jo),Fd=e=>Ge(e,jr,Od),Kt=e=>Ge(e,Xr,Md),U=e=>Fr.test(e),Ot=e=>nt(e,Gr),Bd=e=>nt(e,qr),Wr=e=>nt(e,Ur),Hd=e=>nt(e,Rr),Vd=e=>nt(e,jr),Zt=e=>nt(e,Xr,!0),Wd=e=>nt(e,Yr,!0),Ge=(e,t,o)=>{const n=$r.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},nt=(e,t,o=!1)=>{const n=Fr.exec(e);return n?n[1]?t(n[1]):o:!1},Ur=e=>e==="position"||e==="percentage",jr=e=>e==="image"||e==="url",Rr=e=>e==="length"||e==="size"||e==="bg-size",Gr=e=>e==="length",Ud=e=>e==="number",qr=e=>e==="family-name",Yr=e=>e==="number"||e==="weight",Xr=e=>e==="shadow",jd=Sd(()=>{const e=le("color"),t=le("font"),o=le("text"),n=le("font-weight"),r=le("tracking"),a=le("leading"),s=le("breakpoint"),i=le("container"),l=le("spacing"),u=le("radius"),f=le("shadow"),c=le("inset-shadow"),h=le("text-shadow"),g=le("drop-shadow"),b=le("blur"),m=le("perspective"),v=le("aspect"),w=le("ease"),y=le("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...C(),U,W],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[U,W,l],z=()=>[je,"full","auto",...E()],j=()=>[Re,"none","subgrid",U,W],O=()=>["auto",{span:["full",Re,U,W]},Re,U,W],B=()=>[Re,"auto",U,W],V=()=>["auto","min","max","fr",U,W],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],D=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...E()],N=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],S=()=>[e,U,W],M=()=>[...C(),Wr,Vr,{position:[U,W]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",Hd,zd,{size:[U,W]}],$=()=>[Zo,Ot,ot],H=()=>["","none","full",u,U,W],Z=()=>["",ne,Ot,ot],G=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[ne,Zo,Wr,Vr],ee=()=>["","none",b,U,W],re=()=>["none",ne,U,W],oe=()=>["none",ne,U,W],ce=()=>[ne,U,W],de=()=>[je,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Be],breakpoint:[Be],color:[Br],container:[Be],"drop-shadow":[Be],ease:["in","out","in-out"],font:[Ld],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Be],shadow:[Be],spacing:["px",ne],text:[Be],"text-shadow":[Be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,W,U,v]}],container:["container"],columns:[{columns:[ne,W,U,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",U,W]}],basis:[{basis:[je,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,je,"auto","initial","none",W]}],grow:[{grow:["",ne,U,W]}],shrink:[{shrink:["",ne,U,W]}],order:[{order:[Re,"first","last","none",U,W]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...N()]}],"min-block-size":[{"min-block":["auto",...N()]}],"max-block-size":[{"max-block":["none",...N()]}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",o,Ot,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Wd,Dd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zo,W]}],"font-family":[{font:[Bd,$d,t]}],"font-features":[{"font-features":[W]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,U,W]}],"line-clamp":[{"line-clamp":[ne,"none",U,Hr]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",U,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",U,ot]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[ne,"auto",U,W]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,W]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U,W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,U,W],radial:["",U,W],conic:[Re,U,W]},Vd,Fd]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-bs":[{"border-bs":S()}],"border-color-be":[{"border-be":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,U,W]}],"outline-w":[{outline:["",ne,Ot,ot]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,Zt,Kt]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",c,Zt,Kt]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[ne,ot]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",h,Zt,Kt]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[ne,U,W]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[U,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,W]}],filter:[{filter:["","none",U,W]}],blur:[{blur:ee()}],brightness:[{brightness:[ne,U,W]}],contrast:[{contrast:[ne,U,W]}],"drop-shadow":[{"drop-shadow":["","none",g,Zt,Kt]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",ne,U,W]}],"hue-rotate":[{"hue-rotate":[ne,U,W]}],invert:[{invert:["",ne,U,W]}],saturate:[{saturate:[ne,U,W]}],sepia:[{sepia:["",ne,U,W]}],"backdrop-filter":[{"backdrop-filter":["","none",U,W]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[ne,U,W]}],"backdrop-contrast":[{"backdrop-contrast":[ne,U,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,U,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,U,W]}],"backdrop-invert":[{"backdrop-invert":["",ne,U,W]}],"backdrop-opacity":[{"backdrop-opacity":[ne,U,W]}],"backdrop-saturate":[{"backdrop-saturate":[ne,U,W]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,U,W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",U,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",U,W]}],ease:[{ease:["linear","initial",w,U,W]}],delay:[{delay:[ne,U,W]}],animate:[{animate:["none",y,U,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,U,W]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[U,W,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U,W]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U,W]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[ne,Ot,ot,Hr]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),X=(...e)=>jd(Pr(e));function Lt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:X("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Rd({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:X("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function zt({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:X("px-6",e),...t})}const Kr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zr=Pr,Jt=(e,t)=>o=>{var n;if((t==null?void 0:t.variants)==null)return Zr(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:r,defaultVariants:a}=t,s=Object.keys(r).map(u=>{const f=o==null?void 0:o[u],c=a==null?void 0:a[u];if(f===null)return null;const h=Kr(f)||Kr(c);return r[u][h]}),i=o&&Object.entries(o).reduce((u,f)=>{let[c,h]=f;return h===void 0||(u[c]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:c,className:h,...g}=f;return Object.entries(g).every(b=>{let[m,v]=b;return Array.isArray(v)?v.includes({...a,...i}[m]):{...a,...i}[m]===v})?[...u,c,h]:u},[]);return Zr(e,s,l,o==null?void 0:o.class,o==null?void 0:o.className)};function Jr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qr(...e){return t=>{let o=!1;const n=e.map(r=>{const a=Jr(r,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let r=0;r<n.length;r++){const a=n[r];typeof a=="function"?a():Jr(e[r],null)}}}}function se(...e){return p.useCallback(Qr(...e),e)}function Dt(e){const t=Gd(e),o=p.forwardRef((n,r)=>{const{children:a,...s}=n,i=p.Children.toArray(a),l=i.find(Yd);if(l){const u=l.props.children,f=i.map(c=>c===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:r,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return d.jsx(t,{...s,ref:r,children:a})});return o.displayName=`${e}.Slot`,o}var ea=Dt("Slot");function Gd(e){const t=p.forwardRef((o,n)=>{const{children:r,...a}=o;if(p.isValidElement(r)){const s=Kd(r),i=Xd(a,r.props);return r.type!==p.Fragment&&(i.ref=n?Qr(n,s):s),p.cloneElement(r,i)}return p.Children.count(r)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function qd(e){const t=({children:o})=>d.jsx(d.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=ta,t}function Yd(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function Xd(e,t){const o={...t};for(const n in t){const r=e[n],a=t[n];/^on[A-Z]/.test(n)?r&&a?o[n]=(...i)=>{const l=a(...i);return r(...i),l}:r&&(o[n]=r):n==="style"?o[n]={...r,...a}:n==="className"&&(o[n]=[r,a].filter(Boolean).join(" "))}return{...e,...o}}function Kd(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Zd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=Zd.reduce((e,t)=>{const o=Dt(`Primitive.${t}`),n=p.forwardRef((r,a)=>{const{asChild:s,...i}=r,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jd(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}var oa=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qd="VisuallyHidden",na=p.forwardRef((e,t)=>d.jsx(K.span,{...e,ref:t,style:{...oa,...e.style}}));na.displayName=Qd;var eu=na;function me(e,t=[]){let o=[];function n(a,s){const i=p.createContext(s),l=o.length;o=[...o,s];const u=c=>{var w;const{scope:h,children:g,...b}=c,m=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=p.useMemo(()=>b,Object.values(b));return d.jsx(m.Provider,{value:v,children:g})};u.displayName=a+"Provider";function f(c,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,b=p.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,f]}const r=()=>{const a=o.map(s=>p.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return r.scopeName=e,[n,tu(r,...t)]}function tu(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const n=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}function ra(e){const t=e+"CollectionProvider",[o,n]=me(t),[r,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:w}=m,y=x.useRef(null),k=x.useRef(new Map).current;return d.jsx(r,{scope:v,itemMap:k,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Dt(i),u=x.forwardRef((m,v)=>{const{scope:w,children:y}=m,k=a(i,w),C=se(v,k.collectionRef);return d.jsx(l,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",h=Dt(f),g=x.forwardRef((m,v)=>{const{scope:w,children:y,...k}=m,C=x.useRef(null),_=se(v,C),P=a(f,w);return x.useEffect(()=>(P.itemMap.set(C,{ref:C,...k}),()=>void P.itemMap.delete(C))),d.jsx(h,{[c]:"",ref:_,children:y})});g.displayName=f;function b(m){const v=a(e+"CollectionConsumer",m);return x.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const k=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((P,T)=>k.indexOf(P.ref.current)-k.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},b,n]}function J(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e==null||e(r),o===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var ie=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},ou=p[" useInsertionEffect ".trim().toString()]||ie;function He({prop:e,defaultProp:t,onChange:o=()=>{},caller:n}){const[r,a,s]=nu({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:r;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const c=f.current;c!==i&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=p.useCallback(f=>{var c;if(i){const h=ru(f)?f(e):f;h!==e&&((c=s.current)==null||c.call(s,h))}else a(f)},[i,e,a,s]);return[l,u]}function nu({defaultProp:e,onChange:t}){const[o,n]=p.useState(e),r=p.useRef(o),a=p.useRef(t);return ou(()=>{a.current=t},[t]),p.useEffect(()=>{var s;r.current!==o&&((s=a.current)==null||s.call(a,o),r.current=o)},[o,r]),[o,n,a]}function ru(e){return typeof e=="function"}function au(e,t){return p.useReducer((o,n)=>t[o][n]??o,e)}var Ee=e=>{const{present:t,children:o}=e,n=su(t),r=typeof o=="function"?o({present:n.isPresent}):p.Children.only(o),a=se(n.ref,iu(r));return typeof o=="function"||n.isPresent?p.cloneElement(r,{ref:a}):null};Ee.displayName="Presence";function su(e){const[t,o]=p.useState(),n=p.useRef(null),r=p.useRef(e),a=p.useRef("none"),s=e?"mounted":"unmounted",[i,l]=au(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Qt(n.current);a.current=i==="mounted"?u:"none"},[i]),ie(()=>{const u=n.current,f=r.current;if(f!==e){const h=a.current,g=Qt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),ie(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=g=>{const m=Qt(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Qt(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(u=>{n.current=u?getComputedStyle(u):null,o(u)},[])}}function Qt(e){return(e==null?void 0:e.animationName)||"none"}function iu(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var lu=p[" useId ".trim().toString()]||(()=>{}),cu=0;function rt(e){const[t,o]=p.useState(lu());return ie(()=>{o(n=>n??String(cu++))},[e]),e||(t?`radix-${t}`:"")}var eo="Collapsible",[du]=me(eo),[uu,Qo]=du(eo),aa=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:a,onOpenChange:s,...i}=e,[l,u]=He({prop:n,defaultProp:r??!1,onChange:s,caller:eo});return d.jsx(uu,{scope:o,disabled:a,contentId:rt(),open:l,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),children:d.jsx(K.div,{"data-state":tn(l),"data-disabled":a?"":void 0,...i,ref:t})})});aa.displayName=eo;var sa="CollapsibleTrigger",ia=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,...n}=e,r=Qo(sa,o);return d.jsx(K.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":tn(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:t,onClick:J(e.onClick,r.onOpenToggle)})});ia.displayName=sa;var en="CollapsibleContent",la=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Qo(en,e.__scopeCollapsible);return d.jsx(Ee,{present:o||r.open,children:({present:a})=>d.jsx(fu,{...n,ref:t,present:a})})});la.displayName=en;var fu=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:n,children:r,...a}=e,s=Qo(en,o),[i,l]=p.useState(n),u=p.useRef(null),f=se(t,u),c=p.useRef(0),h=c.current,g=p.useRef(0),b=g.current,m=s.open||i,v=p.useRef(m),w=p.useRef(void 0);return p.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),ie(()=>{const y=u.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const k=y.getBoundingClientRect();c.current=k.height,g.current=k.width,v.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(n)}},[s.open,n]),d.jsx(K.div,{"data-state":tn(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:m&&r})});function tn(e){return e?"open":"closed"}var pu=aa,hu=p.createContext(void 0);function $t(e){const t=p.useContext(hu);return e||t||"ltr"}function pe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...o)=>{var n;return(n=t.current)==null?void 0:n.call(t,...o)},[])}function gu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e);p.useEffect(()=>{const n=r=>{r.key==="Escape"&&o(r)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[o,t])}var mu="DismissableLayer",on="dismissableLayer.update",vu="dismissableLayer.pointerDownOutside",bu="dismissableLayer.focusOutside",ca,da=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nn=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=p.useContext(da),[f,c]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=p.useState({}),b=se(t,T=>c(T)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(v),y=f?m.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=w,_=xu(T=>{const E=T.target,z=[...u.branches].some(j=>j.contains(E));!C||z||(r==null||r(T),s==null||s(T),T.defaultPrevented||i==null||i())},h),P=ku(T=>{const E=T.target;[...u.branches].some(j=>j.contains(E))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},h);return gu(T=>{y===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ca=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ua(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ca)}},[f,h,o,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ua())},[f,u]),p.useEffect(()=>{const T=()=>g({});return document.addEventListener(on,T),()=>document.removeEventListener(on,T)},[]),d.jsx(K.div,{...l,ref:b,style:{pointerEvents:k?C?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,P.onFocusCapture),onBlurCapture:J(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,_.onPointerDownCapture)})});nn.displayName=mu;var wu="DismissableLayerBranch",yu=p.forwardRef((e,t)=>{const o=p.useContext(da),n=p.useRef(null),r=se(t,n);return p.useEffect(()=>{const a=n.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),d.jsx(K.div,{...e,ref:r})});yu.displayName=wu;function xu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),n=p.useRef(!1),r=p.useRef(()=>{});return p.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){fa(vu,o,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,o]),{onPointerDownCapture:()=>n.current=!0}}function ku(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),n=p.useRef(!1);return p.useEffect(()=>{const r=a=>{a.target&&!n.current&&fa(bu,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,o]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ua(){const e=new CustomEvent(on);document.dispatchEvent(e)}function fa(e,t,o,{discrete:n}){const r=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&r.addEventListener(e,t,{once:!0}),n?Jd(r,a):r.dispatchEvent(a)}var rn="focusScope.autoFocusOnMount",an="focusScope.autoFocusOnUnmount",pa={bubbles:!1,cancelable:!0},Su="FocusScope",ha=p.forwardRef((e,t)=>{const{loop:o=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[i,l]=p.useState(null),u=pe(r),f=pe(a),c=p.useRef(null),h=se(t,m=>l(m)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let m=function(k){if(g.paused||!i)return;const C=k.target;i.contains(C)?c.current=C:qe(c.current,{select:!0})},v=function(k){if(g.paused||!i)return;const C=k.relatedTarget;C!==null&&(i.contains(C)||qe(c.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const _ of k)_.removedNodes.length>0&&qe(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[n,i,g.paused]),p.useEffect(()=>{if(i){va.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(rn,pa);i.addEventListener(rn,u),i.dispatchEvent(w),w.defaultPrevented||(Cu(Pu(ga(i)),{select:!0}),document.activeElement===m&&qe(i))}return()=>{i.removeEventListener(rn,u),setTimeout(()=>{const w=new CustomEvent(an,pa);i.addEventListener(an,f),i.dispatchEvent(w),w.defaultPrevented||qe(m??document.body,{select:!0}),i.removeEventListener(an,f),va.remove(g)},0)}}},[i,u,f,g]);const b=p.useCallback(m=>{if(!o&&!n||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(v&&w){const y=m.currentTarget,[k,C]=Eu(y);k&&C?!m.shiftKey&&w===C?(m.preventDefault(),o&&qe(k,{select:!0})):m.shiftKey&&w===k&&(m.preventDefault(),o&&qe(C,{select:!0})):w===y&&m.preventDefault()}},[o,n,g.paused]);return d.jsx(K.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});ha.displayName=Su;function Cu(e,{select:t=!1}={}){const o=document.activeElement;for(const n of e)if(qe(n,{select:t}),document.activeElement!==o)return}function Eu(e){const t=ga(e),o=ma(t,e),n=ma(t.reverse(),e);return[o,n]}function ga(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function ma(e,t){for(const o of e)if(!Nu(o,{upTo:t}))return o}function Nu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tu(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Tu(e)&&t&&e.select()}}var va=_u();function _u(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=ba(e,t),e.unshift(t)},remove(t){var o;e=ba(e,t),(o=e[0])==null||o.resume()}}}function ba(e,t){const o=[...e],n=o.indexOf(t);return n!==-1&&o.splice(n,1),o}function Pu(e){return e.filter(t=>t.tagName!=="A")}var Au="Portal",sn=p.forwardRef((e,t)=>{var i;const{container:o,...n}=e,[r,a]=p.useState(!1);ie(()=>a(!0),[]);const s=o||r&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Wo.createPortal(d.jsx(K.div,{...n,ref:t}),s):null});sn.displayName=Au;var ln=0;function Iu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wa()),document.body.insertAdjacentElement("beforeend",e[1]??wa()),ln++,()=>{ln===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ln--}},[])}function wa(){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 Le=function(){return Le=Object.assign||function(t){for(var o,n=1,r=arguments.length;n<r;n++){o=arguments[n];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Le.apply(this,arguments)};function ya(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o}function Mu(e,t,o){if(o||arguments.length===2)for(var n=0,r=t.length,a;n<r;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var to="right-scroll-bar-position",oo="width-before-scroll-bar",Ou="with-scroll-bars-hidden",Lu="--removed-body-scroll-bar-size";function cn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zu(e,t){var o=x.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(n){var r=o.value;r!==n&&(o.value=n,o.callback(n,r))}}}})[0];return o.callback=t,o.facade}var Du=typeof window<"u"?p.useLayoutEffect:p.useEffect,xa=new WeakMap;function $u(e,t){var o=zu(null,function(n){return e.forEach(function(r){return cn(r,n)})});return Du(function(){var n=xa.get(o);if(n){var r=new Set(n),a=new Set(e),s=o.current;r.forEach(function(i){a.has(i)||cn(i,null)}),a.forEach(function(i){r.has(i)||cn(i,s)})}xa.set(o,e)},[e]),o}function Fu(e){return e}function Bu(e,t){t===void 0&&(t=Fu);var o=[],n=!1,r={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(a){var s=t(a,n);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){n=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(a),s=o}var l=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),o}}}};return r}function Hu(e){e===void 0&&(e={});var t=Bu(null);return t.options=Le({async:!0,ssr:!1},e),t}var ka=function(e){var t=e.sideCar,o=ya(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,Le({},o))};ka.isSideCarExport=!0;function Vu(e,t){return e.useMedium(t),ka}var Sa=Hu(),dn=function(){},no=p.forwardRef(function(e,t){var o=p.useRef(null),n=p.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),r=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,m=e.inert,v=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,k=e.gapMode,C=ya(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,P=$u([o,t]),T=Le(Le({},C),r);return p.createElement(p.Fragment,null,f&&p.createElement(_,{sideCar:Sa,removeScrollBar:u,shards:c,noRelative:g,noIsolation:b,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:o,gapMode:k}),s?p.cloneElement(p.Children.only(i),Le(Le({},T),{ref:P})):p.createElement(y,Le({},T,{className:l,ref:P}),i))});no.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},no.classNames={fullWidth:oo,zeroRight:to};var Wu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wu();return t&&e.setAttribute("nonce",t),e}function ju(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ru(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gu=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Uu())&&(ju(t,o),Ru(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qu=function(){var e=Gu();return function(t,o){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},Ca=function(){var e=qu(),t=function(o){var n=o.styles,r=o.dynamic;return e(n,r),null};return t},Yu={left:0,top:0,right:0,gap:0},un=function(e){return parseInt(e||"",10)||0},Xu=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[un(o),un(n),un(r)]},Ku=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yu;var t=Xu(e),o=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-o+t[2]-t[0])}},Zu=Ca(),mt="data-scroll-locked",Ju=function(e,t,o,n){var r=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
238
- .`.concat(Ou,` {
239
- overflow: hidden `).concat(n,`;
240
- padding-right: `).concat(i,"px ").concat(n,`;
237
+ */const oa=oe("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
238
+ * @license lucide-react v0.577.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const pu=oe("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function aa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=aa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=aa(e))&&(r&&(r+=" "),r+=t);return r}const hu=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},gu=(e,t)=>({classGroupId:e,validator:t}),ia=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),tn="-",la=[],mu="arbitrary..",vu=e=>{const t=wu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return bu(s);const i=s.split(tn),l=i[0]===""&&i.length>1?1:0;return ca(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],d=n[s];return l?d?hu(d,l):l:d||la}return n[s]||la}}},ca=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const d=ca(e,t+1,a);if(d)return d}const s=n.validators;if(s===null)return;const i=t===0?e.join(tn):e.slice(t).join(tn),l=s.length;for(let d=0;d<l;d++){const f=s[d];if(f.validator(i))return f.classGroupId}},bu=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?mu+r:void 0})(),wu=e=>{const{theme:t,classGroups:n}=e;return yu(n,t)},yu=(e,t)=>{const n=ia();for(const r in e){const o=e[r];nr(o,n,r,t)}return n},nr=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const s=e[a];xu(s,t,n,r)}},xu=(e,t,n,r)=>{if(typeof e=="string"){Cu(e,t,n);return}if(typeof e=="function"){ku(e,t,n,r);return}Su(e,t,n,r)},Cu=(e,t,n)=>{const r=e===""?t:da(t,e);r.classGroupId=n},ku=(e,t,n,r)=>{if(Eu(e)){nr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gu(n,e))},Su=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[i,l]=o[s];nr(l,da(t,i),n,r)}},da=(e,t)=>{let n=e;const r=t.split(tn),o=r.length;for(let a=0;a<o;a++){const s=r[a];let i=n.nextPart.get(s);i||(i=ia(),n.nextPart.set(s,i)),n=i}return n},Eu=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Nu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return o(a,s),s},set(a,s){a in n?n[a]=s:o(a,s)}}},rr="!",ua=":",Tu=[],fa=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),_u=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,d;const f=o.length;for(let m=0;m<f;m++){const b=o[m];if(s===0&&i===0){if(b===ua){a.push(o.slice(l,m)),l=m+1;continue}if(b==="/"){d=m;continue}}b==="["?s++:b==="]"?s--:b==="("?i++:b===")"&&i--}const c=a.length===0?o:o.slice(l);let p=c,g=!1;c.endsWith(rr)?(p=c.slice(0,-1),g=!0):c.startsWith(rr)&&(p=c.slice(1),g=!0);const v=d&&d>l?d-l:void 0;return fa(a,g,p,v)};if(t){const o=t+ua,a=r;r=s=>s.startsWith(o)?a(s.slice(o.length)):fa(Tu,!1,s,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Au=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const s=n[a],i=s[0]==="[",l=t.has(s);i||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Pu=e=>({cache:Nu(e.cacheSize),parseClassName:_u(e),sortModifiers:Au(e),...vu(e)}),Iu=/\s+/,Mu=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(Iu);let l="";for(let d=i.length-1;d>=0;d-=1){const f=i[d],{isExternal:c,modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}=n(f);if(c){l=f+(l.length>0?" "+l:l);continue}let b=!!m,w=r(b?v.substring(0,m):v);if(!w){if(!b){l=f+(l.length>0?" "+l:l);continue}if(w=r(v),!w){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=p.length===0?"":p.length===1?p[0]:a(p).join(":"),x=g?y+rr:y,k=x+w;if(s.indexOf(k)>-1)continue;s.push(k);const P=o(w,b);for(let E=0;E<P.length;++E){const N=P[E];s.push(x+N)}l=f+(l.length>0?" "+l:l)}return l},Lu=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=pa(n))&&(o&&(o+=" "),o+=r);return o},pa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pa(e[r]))&&(n&&(n+=" "),n+=t);return n},Ou=(e,...t)=>{let n,r,o,a;const s=l=>{const d=t.reduce((f,c)=>c(f),e());return n=Pu(d),r=n.cache.get,o=n.cache.set,a=i,i(l)},i=l=>{const d=r(l);if(d)return d;const f=Mu(l,n);return o(l,f),f};return a=s,(...l)=>a(Lu(...l))},zu=[],le=e=>{const t=n=>n[e]||zu;return t.isThemeGetter=!0,t},ha=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ga=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Du=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Bu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$u=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Du.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),qe=e=>!!e&&Number.isInteger(Number(e)),or=e=>e.endsWith("%")&&re(e.slice(0,-1)),He=e=>Bu.test(e),ma=()=>!0,Uu=e=>Fu.test(e)&&!$u.test(e),ar=()=>!1,Ru=e=>Hu.test(e),Wu=e=>Vu.test(e),ju=e=>!G(e)&&!Y(e),qu=e=>Ge(e,Ca,ar),G=e=>ha.test(e),ot=e=>Ge(e,ka,Uu),va=e=>Ge(e,ef,re),Gu=e=>Ge(e,Ea,ma),Yu=e=>Ge(e,Sa,ar),ba=e=>Ge(e,ya,ar),Ku=e=>Ge(e,xa,Wu),nn=e=>Ge(e,Na,Ru),Y=e=>ga.test(e),Ft=e=>at(e,ka),Xu=e=>at(e,Sa),wa=e=>at(e,ya),Zu=e=>at(e,Ca),Ju=e=>at(e,xa),rn=e=>at(e,Na,!0),Qu=e=>at(e,Ea,!0),Ge=(e,t,n)=>{const r=ha.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},at=(e,t,n=!1)=>{const r=ga.exec(e);return r?r[1]?t(r[1]):n:!1},ya=e=>e==="position"||e==="percentage",xa=e=>e==="image"||e==="url",Ca=e=>e==="length"||e==="size"||e==="bg-size",ka=e=>e==="length",ef=e=>e==="number",Sa=e=>e==="family-name",Ea=e=>e==="number"||e==="weight",Na=e=>e==="shadow",tf=Ou(()=>{const e=le("color"),t=le("font"),n=le("text"),r=le("font-weight"),o=le("tracking"),a=le("leading"),s=le("breakpoint"),i=le("container"),l=le("spacing"),d=le("radius"),f=le("shadow"),c=le("inset-shadow"),p=le("text-shadow"),g=le("drop-shadow"),v=le("blur"),m=le("perspective"),b=le("aspect"),w=le("ease"),y=le("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...k(),Y,G],E=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],S=()=>[Y,G,l],A=()=>[je,"full","auto",...S()],z=()=>[qe,"none","subgrid",Y,G],_=()=>["auto",{span:["full",qe,Y,G]},qe,Y,G],M=()=>[qe,"auto",Y,G],O=()=>["auto","min","max","fr",Y,G],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...S()],$=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],q=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...S()],L=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],T=()=>[e,Y,G],F=()=>[...k(),wa,ba,{position:[Y,G]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",Zu,qu,{size:[Y,G]}],V=()=>[or,Ft,ot],U=()=>["","none","full",d,Y,G],X=()=>["",re,Ft,ot],R=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[re,or,wa,ba],ee=()=>["","none",v,Y,G],ae=()=>["none",re,Y,G],ne=()=>["none",re,Y,G],ce=()=>[re,Y,G],de=()=>[je,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ma],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[ju],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",re],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,G,Y,b]}],container:["container"],columns:[{columns:[re,G,Y,i]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[qe,"auto",Y,G]}],basis:[{basis:[je,"full","auto",i,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,je,"auto","initial","none",G]}],grow:[{grow:["",re,Y,G]}],shrink:[{shrink:["",re,Y,G]}],order:[{order:[qe,"first","last","none",Y,G]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[i,"screen",...$()]}],"min-w":[{"min-w":[i,"screen","none",...$()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Ft,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Qu,Gu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",or,G]}],"font-family":[{font:[Xu,Yu,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Y,G]}],"line-clamp":[{"line-clamp":[re,"none",Y,va]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",Y,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Y,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Y,ot]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[re,"auto",Y,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qe,Y,G],radial:["",Y,G],conic:[qe,Y,G]},Ju,Ku]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Y,G]}],"outline-w":[{outline:["",re,Ft,ot]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,rn,nn]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",c,rn,nn]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[re,ot]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,rn,nn]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[re,Y,G]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Y,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Y,G]}],filter:[{filter:["","none",Y,G]}],blur:[{blur:ee()}],brightness:[{brightness:[re,Y,G]}],contrast:[{contrast:[re,Y,G]}],"drop-shadow":[{"drop-shadow":["","none",g,rn,nn]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",re,Y,G]}],"hue-rotate":[{"hue-rotate":[re,Y,G]}],invert:[{invert:["",re,Y,G]}],saturate:[{saturate:[re,Y,G]}],sepia:[{sepia:["",re,Y,G]}],"backdrop-filter":[{"backdrop-filter":["","none",Y,G]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[re,Y,G]}],"backdrop-contrast":[{"backdrop-contrast":[re,Y,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Y,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Y,G]}],"backdrop-invert":[{"backdrop-invert":["",re,Y,G]}],"backdrop-opacity":[{"backdrop-opacity":[re,Y,G]}],"backdrop-saturate":[{"backdrop-saturate":[re,Y,G]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Y,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Y,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Y,G]}],ease:[{ease:["linear","initial",w,Y,G]}],delay:[{delay:[re,Y,G]}],animate:[{animate:["none",y,Y,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Y,G]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Y,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y,G]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[re,Ft,ot,va]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),K=(...e)=>tf(sa(e));function $t({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:K("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function nf({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:K("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Ht({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:K("px-6",e),...t})}const Ta=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_a=sa,on=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return _a(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],c=a==null?void 0:a[d];if(f===null)return null;const p=Ta(f)||Ta(c);return o[d][p]}),i=n&&Object.entries(n).reduce((d,f)=>{let[c,p]=f;return p===void 0||(d[c]=p),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:c,className:p,...g}=f;return Object.entries(g).every(v=>{let[m,b]=v;return Array.isArray(b)?b.includes({...a,...i}[m]):{...a,...i}[m]===b})?[...d,c,p]:d},[]);return _a(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Aa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pa(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Aa(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Aa(e[o],null)}}}}function se(...e){return h.useCallback(Pa(...e),e)}function Vt(e){const t=rf(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,i=h.Children.toArray(a),l=i.find(af);if(l){const d=l.props.children,f=i.map(c=>c===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:c);return u.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,f):null})}return u.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Ia=Vt("Slot");function rf(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=lf(o),i=sf(a,o.props);return o.type!==h.Fragment&&(i.ref=r?Pa(r,s):s),h.cloneElement(o,i)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ma=Symbol("radix.slottable");function of(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ma,t}function af(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ma}function sf(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function lf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=cf.reduce((e,t)=>{const n=Vt(`Primitive.${t}`),r=h.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function df(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}var La=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),uf="VisuallyHidden",Oa=h.forwardRef((e,t)=>u.jsx(J.span,{...e,ref:t,style:{...La,...e.style}}));Oa.displayName=uf;var ff=Oa;function me(e,t=[]){let n=[];function r(a,s){const i=h.createContext(s),l=n.length;n=[...n,s];const d=c=>{var w;const{scope:p,children:g,...v}=c,m=((w=p==null?void 0:p[e])==null?void 0:w[l])||i,b=h.useMemo(()=>v,Object.values(v));return u.jsx(m.Provider,{value:b,children:g})};d.displayName=a+"Provider";function f(c,p){var m;const g=((m=p==null?void 0:p[e])==null?void 0:m[l])||i,v=h.useContext(g);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>h.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return h.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,pf(o,...t)]}function pf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:d})=>{const c=l(a)[`__scope${d}`];return{...i,...c}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function za(e){const t=e+"CollectionProvider",[n,r]=me(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:b,children:w}=m,y=C.useRef(null),x=C.useRef(new Map).current;return u.jsx(o,{scope:b,itemMap:x,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Vt(i),d=C.forwardRef((m,b)=>{const{scope:w,children:y}=m,x=a(i,w),k=se(b,x.collectionRef);return u.jsx(l,{ref:k,children:y})});d.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",p=Vt(f),g=C.forwardRef((m,b)=>{const{scope:w,children:y,...x}=m,k=C.useRef(null),P=se(b,k),E=a(f,w);return C.useEffect(()=>(E.itemMap.set(k,{ref:k,...x}),()=>void E.itemMap.delete(k))),u.jsx(p,{[c]:"",ref:P,children:y})});g.displayName=f;function v(m){const b=a(e+"CollectionConsumer",m);return C.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((E,N)=>x.indexOf(E.ref.current)-x.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:d,ItemSlot:g},v,r]}function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var ie=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},hf=h[" useInsertionEffect ".trim().toString()]||ie;function Ve({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=gf({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const f=h.useRef(e!==void 0);h.useEffect(()=>{const c=f.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const d=h.useCallback(f=>{var c;if(i){const p=mf(f)?f(e):f;p!==e&&((c=s.current)==null||c.call(s,p))}else a(f)},[i,e,a,s]);return[l,d]}function gf({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),a=h.useRef(t);return hf(()=>{a.current=t},[t]),h.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function mf(e){return typeof e=="function"}function vf(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Ee=e=>{const{present:t,children:n}=e,r=bf(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=se(r.ref,wf(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:a}):null};Ee.displayName="Presence";function bf(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),a=h.useRef("none"),s=e?"mounted":"unmounted",[i,l]=vf(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=an(r.current);a.current=i==="mounted"?d:"none"},[i]),ie(()=>{const d=r.current,f=o.current;if(f!==e){const p=a.current,g=an(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ie(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,c=g=>{const m=an(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=g=>{g.target===t&&(a.current=an(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:h.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function an(e){return(e==null?void 0:e.animationName)||"none"}function wf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yf=h[" useId ".trim().toString()]||(()=>{}),xf=0;function st(e){const[t,n]=h.useState(yf());return ie(()=>{n(r=>r??String(xf++))},[e]),e||(t?`radix-${t}`:"")}var sn="Collapsible",[Cf]=me(sn),[kf,sr]=Cf(sn),Da=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,d]=Ve({prop:r,defaultProp:o??!1,onChange:s,caller:sn});return u.jsx(kf,{scope:n,disabled:a,contentId:st(),open:l,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),children:u.jsx(J.div,{"data-state":lr(l),"data-disabled":a?"":void 0,...i,ref:t})})});Da.displayName=sn;var Ba="CollapsibleTrigger",Fa=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=sr(Ba,n);return u.jsx(J.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":lr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Q(e.onClick,o.onOpenToggle)})});Fa.displayName=Ba;var ir="CollapsibleContent",$a=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=sr(ir,e.__scopeCollapsible);return u.jsx(Ee,{present:n||o.open,children:({present:a})=>u.jsx(Sf,{...r,ref:t,present:a})})});$a.displayName=ir;var Sf=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=sr(ir,n),[i,l]=h.useState(r),d=h.useRef(null),f=se(t,d),c=h.useRef(0),p=c.current,g=h.useRef(0),v=g.current,m=s.open||i,b=h.useRef(m),w=h.useRef(void 0);return h.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),ie(()=>{const y=d.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();c.current=x.height,g.current=x.width,b.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(r)}},[s.open,r]),u.jsx(J.div,{"data-state":lr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&o})});function lr(e){return e?"open":"closed"}var Ef=Da,Nf=h.createContext(void 0);function Ut(e){const t=h.useContext(Nf);return e||t||"ltr"}function pe(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Tf(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _f="DismissableLayer",cr="dismissableLayer.update",Af="dismissableLayer.pointerDownOutside",Pf="dismissableLayer.focusOutside",Ha,Va=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dr=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,d=h.useContext(Va),[f,c]=h.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=h.useState({}),v=se(t,N=>c(N)),m=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),y=f?m.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,P=Lf(N=>{const S=N.target,A=[...d.branches].some(z=>z.contains(S));!k||A||(o==null||o(N),s==null||s(N),N.defaultPrevented||i==null||i())},p),E=Of(N=>{const S=N.target;[...d.branches].some(z=>z.contains(S))||(a==null||a(N),s==null||s(N),N.defaultPrevented||i==null||i())},p);return Tf(N=>{y===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},p),h.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ha=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ua(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ha)}},[f,p,n,d]),h.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ua())},[f,d]),h.useEffect(()=>{const N=()=>g({});return document.addEventListener(cr,N),()=>document.removeEventListener(cr,N)},[]),u.jsx(J.div,{...l,ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,P.onPointerDownCapture)})});dr.displayName=_f;var If="DismissableLayerBranch",Mf=h.forwardRef((e,t)=>{const n=h.useContext(Va),r=h.useRef(null),o=se(t,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(J.div,{...e,ref:o})});Mf.displayName=If;function Lf(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Ra(Af,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Of(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),r=h.useRef(!1);return h.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ra(Pf,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ua(){const e=new CustomEvent(cr);document.dispatchEvent(e)}function Ra(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?df(o,a):o.dispatchEvent(a)}var ur="focusScope.autoFocusOnMount",fr="focusScope.autoFocusOnUnmount",Wa={bubbles:!1,cancelable:!0},zf="FocusScope",ja=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=h.useState(null),d=pe(o),f=pe(a),c=h.useRef(null),p=se(t,m=>l(m)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let m=function(x){if(g.paused||!i)return;const k=x.target;i.contains(k)?c.current=k:Ye(c.current,{select:!0})},b=function(x){if(g.paused||!i)return;const k=x.relatedTarget;k!==null&&(i.contains(k)||Ye(c.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&Ye(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,i,g.paused]),h.useEffect(()=>{if(i){Ya.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(ur,Wa);i.addEventListener(ur,d),i.dispatchEvent(w),w.defaultPrevented||(Df(Vf(qa(i)),{select:!0}),document.activeElement===m&&Ye(i))}return()=>{i.removeEventListener(ur,d),setTimeout(()=>{const w=new CustomEvent(fr,Wa);i.addEventListener(fr,f),i.dispatchEvent(w),w.defaultPrevented||Ye(m??document.body,{select:!0}),i.removeEventListener(fr,f),Ya.remove(g)},0)}}},[i,d,f,g]);const v=h.useCallback(m=>{if(!n&&!r||g.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const y=m.currentTarget,[x,k]=Bf(y);x&&k?!m.shiftKey&&w===k?(m.preventDefault(),n&&Ye(x,{select:!0})):m.shiftKey&&w===x&&(m.preventDefault(),n&&Ye(k,{select:!0})):w===y&&m.preventDefault()}},[n,r,g.paused]);return u.jsx(J.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})});ja.displayName=zf;function Df(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ye(r,{select:t}),document.activeElement!==n)return}function Bf(e){const t=qa(e),n=Ga(t,e),r=Ga(t.reverse(),e);return[n,r]}function qa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ga(e,t){for(const n of e)if(!Ff(n,{upTo:t}))return n}function Ff(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $f(e){return e instanceof HTMLInputElement&&"select"in e}function Ye(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$f(e)&&t&&e.select()}}var Ya=Hf();function Hf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ka(e,t),e.unshift(t)},remove(t){var n;e=Ka(e,t),(n=e[0])==null||n.resume()}}}function Ka(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vf(e){return e.filter(t=>t.tagName!=="A")}var Uf="Portal",pr=h.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=h.useState(!1);ie(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Kn.createPortal(u.jsx(J.div,{...r,ref:t}),s):null});pr.displayName=Uf;var hr=0;function Rf(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xa()),document.body.insertAdjacentElement("beforeend",e[1]??Xa()),hr++,()=>{hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hr--}},[])}function Xa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe=function(){return Oe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Oe.apply(this,arguments)};function Za(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Wf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ln="right-scroll-bar-position",cn="width-before-scroll-bar",jf="with-scroll-bars-hidden",qf="--removed-body-scroll-bar-size";function gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gf(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Yf=typeof window<"u"?h.useLayoutEffect:h.useEffect,Ja=new WeakMap;function Kf(e,t){var n=Gf(null,function(r){return e.forEach(function(o){return gr(o,r)})});return Yf(function(){var r=Ja.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||gr(i,null)}),a.forEach(function(i){o.has(i)||gr(i,s)})}Ja.set(n,e)},[e]),n}function Xf(e){return e}function Zf(e,t){t===void 0&&(t=Xf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Jf(e){e===void 0&&(e={});var t=Zf(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Qa=function(e){var t=e.sideCar,n=Za(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Oe({},n))};Qa.isSideCarExport=!0;function Qf(e,t){return e.useMedium(t),Qa}var es=Jf(),mr=function(){},dn=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,g=e.noRelative,v=e.noIsolation,m=e.inert,b=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,x=e.gapMode,k=Za(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,E=Kf([n,t]),N=Oe(Oe({},k),o);return h.createElement(h.Fragment,null,f&&h.createElement(P,{sideCar:es,removeScrollBar:d,shards:c,noRelative:g,noIsolation:v,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:x}),s?h.cloneElement(h.Children.only(i),Oe(Oe({},N),{ref:E})):h.createElement(y,Oe({},N,{className:l,ref:E}),i))});dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dn.classNames={fullWidth:cn,zeroRight:ln};var ep=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ep();return t&&e.setAttribute("nonce",t),e}function np(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var op=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tp())&&(np(t,n),rp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ap=function(){var e=op();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ts=function(){var e=ap(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},sp={left:0,top:0,right:0,gap:0},vr=function(e){return parseInt(e||"",10)||0},ip=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vr(n),vr(r),vr(o)]},lp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sp;var t=ip(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},cp=ts(),yt="data-scroll-locked",dp=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
243
+ .`.concat(jf,` {
244
+ overflow: hidden `).concat(r,`;
245
+ padding-right: `).concat(i,"px ").concat(r,`;
241
246
  }
242
- body[`).concat(mt,`] {
243
- overflow: hidden `).concat(n,`;
247
+ body[`).concat(yt,`] {
248
+ overflow: hidden `).concat(r,`;
244
249
  overscroll-behavior: contain;
245
- `).concat([t&&"position: relative ".concat(n,";"),o==="margin"&&`
246
- padding-left: `.concat(r,`px;
250
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
251
+ padding-left: `.concat(o,`px;
247
252
  padding-top: `).concat(a,`px;
248
253
  padding-right: `).concat(s,`px;
249
254
  margin-left:0;
250
255
  margin-top:0;
251
- margin-right: `).concat(i,"px ").concat(n,`;
252
- `),o==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
256
+ margin-right: `).concat(i,"px ").concat(r,`;
257
+ `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
253
258
  }
254
259
 
255
- .`).concat(to,` {
256
- right: `).concat(i,"px ").concat(n,`;
260
+ .`).concat(ln,` {
261
+ right: `).concat(i,"px ").concat(r,`;
257
262
  }
258
263
 
259
- .`).concat(oo,` {
260
- margin-right: `).concat(i,"px ").concat(n,`;
264
+ .`).concat(cn,` {
265
+ margin-right: `).concat(i,"px ").concat(r,`;
261
266
  }
262
267
 
263
- .`).concat(to," .").concat(to,` {
264
- right: 0 `).concat(n,`;
268
+ .`).concat(ln," .").concat(ln,` {
269
+ right: 0 `).concat(r,`;
265
270
  }
266
271
 
267
- .`).concat(oo," .").concat(oo,` {
268
- margin-right: 0 `).concat(n,`;
272
+ .`).concat(cn," .").concat(cn,` {
273
+ margin-right: 0 `).concat(r,`;
269
274
  }
270
275
 
271
- body[`).concat(mt,`] {
272
- `).concat(Lu,": ").concat(i,`px;
276
+ body[`).concat(yt,`] {
277
+ `).concat(qf,": ").concat(i,`px;
273
278
  }
274
- `)},Ea=function(){var e=parseInt(document.body.getAttribute(mt)||"0",10);return isFinite(e)?e:0},Qu=function(){p.useEffect(function(){return document.body.setAttribute(mt,(Ea()+1).toString()),function(){var e=Ea()-1;e<=0?document.body.removeAttribute(mt):document.body.setAttribute(mt,e.toString())}},[])},ef=function(e){var t=e.noRelative,o=e.noImportant,n=e.gapMode,r=n===void 0?"margin":n;Qu();var a=p.useMemo(function(){return Ku(r)},[r]);return p.createElement(Zu,{styles:Ju(a,!t,r,o?"":"!important")})},fn=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return fn=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{fn=!1}var vt=fn?{passive:!1}:!1,tf=function(e){return e.tagName==="TEXTAREA"},Na=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!tf(e)&&o[t]==="visible")},of=function(e){return Na(e,"overflowY")},nf=function(e){return Na(e,"overflowX")},Ta=function(e,t){var o=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_a(e,n);if(r){var a=Pa(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==o.body);return!1},rf=function(e){var t=e.scrollTop,o=e.scrollHeight,n=e.clientHeight;return[t,o,n]},af=function(e){var t=e.scrollLeft,o=e.scrollWidth,n=e.clientWidth;return[t,o,n]},_a=function(e,t){return e==="v"?of(t):nf(t)},Pa=function(e,t){return e==="v"?rf(t):af(t)},sf=function(e,t){return e==="h"&&t==="rtl"?-1:1},lf=function(e,t,o,n,r){var a=sf(e,window.getComputedStyle(t).direction),s=a*n,i=o.target,l=t.contains(i),u=!1,f=s>0,c=0,h=0;do{if(!i)break;var g=Pa(e,i),b=g[0],m=g[1],v=g[2],w=m-v-a*b;(b||w)&&_a(e,i)&&(c+=w,h+=b);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&Math.abs(c)<1||!f&&Math.abs(h)<1)&&(u=!0),u},ao=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Aa=function(e){return[e.deltaX,e.deltaY]},Ia=function(e){return e&&"current"in e?e.current:e},cf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},df=function(e){return`
279
+ `)},ns=function(){var e=parseInt(document.body.getAttribute(yt)||"0",10);return isFinite(e)?e:0},up=function(){h.useEffect(function(){return document.body.setAttribute(yt,(ns()+1).toString()),function(){var e=ns()-1;e<=0?document.body.removeAttribute(yt):document.body.setAttribute(yt,e.toString())}},[])},fp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;up();var a=h.useMemo(function(){return lp(o)},[o]);return h.createElement(cp,{styles:dp(a,!t,o,n?"":"!important")})},br=!1;if(typeof window<"u")try{var un=Object.defineProperty({},"passive",{get:function(){return br=!0,!0}});window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{br=!1}var xt=br?{passive:!1}:!1,pp=function(e){return e.tagName==="TEXTAREA"},rs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pp(e)&&n[t]==="visible")},hp=function(e){return rs(e,"overflowY")},gp=function(e){return rs(e,"overflowX")},os=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=as(e,r);if(o){var a=ss(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mp=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vp=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},as=function(e,t){return e==="v"?hp(t):gp(t)},ss=function(e,t){return e==="v"?mp(t):vp(t)},bp=function(e,t){return e==="h"&&t==="rtl"?-1:1},wp=function(e,t,n,r,o){var a=bp(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),d=!1,f=s>0,c=0,p=0;do{if(!i)break;var g=ss(e,i),v=g[0],m=g[1],b=g[2],w=m-b-a*v;(v||w)&&as(e,i)&&(c+=w,p+=v);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&Math.abs(c)<1||!f&&Math.abs(p)<1)&&(d=!0),d},fn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},is=function(e){return[e.deltaX,e.deltaY]},ls=function(e){return e&&"current"in e?e.current:e},yp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xp=function(e){return`
275
280
  .block-interactivity-`.concat(e,` {pointer-events: none;}
276
281
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
277
- `)},uf=0,bt=[];function ff(e){var t=p.useRef([]),o=p.useRef([0,0]),n=p.useRef(),r=p.useState(uf++)[0],a=p.useState(Ca)[0],s=p.useRef(e);p.useEffect(function(){s.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Mu([e.lockRef.current],(e.shards||[]).map(Ia),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=p.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var w=ao(m),y=o.current,k="deltaX"in m?m.deltaX:y[0]-w[0],C="deltaY"in m?m.deltaY:y[1]-w[1],_,P=m.target,T=Math.abs(k)>Math.abs(C)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=window.getSelection(),z=E&&E.anchorNode,j=z?z===P||z.contains(P):!1;if(j)return!1;var O=Ta(T,P);if(!O)return!0;if(O?_=T:(_=T==="v"?"h":"v",O=Ta(T,P)),!O)return!1;if(!n.current&&"changedTouches"in m&&(k||C)&&(n.current=_),!_)return!0;var B=n.current||_;return lf(B,v,m,B==="h"?k:C)},[]),l=p.useCallback(function(m){var v=m;if(!(!bt.length||bt[bt.length-1]!==a)){var w="deltaY"in v?Aa(v):ao(v),y=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&cf(_.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var k=(s.current.shards||[]).map(Ia).filter(Boolean).filter(function(_){return _.contains(v.target)}),C=k.length>0?i(v,k[0]):!s.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),u=p.useCallback(function(m,v,w,y){var k={name:m,delta:v,target:w,should:y,shadowParent:pf(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(C){return C!==k})},1)},[]),f=p.useCallback(function(m){o.current=ao(m),n.current=void 0},[]),c=p.useCallback(function(m){u(m.type,Aa(m),m.target,i(m,e.lockRef.current))},[]),h=p.useCallback(function(m){u(m.type,ao(m),m.target,i(m,e.lockRef.current))},[]);p.useEffect(function(){return bt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",f,vt),function(){bt=bt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",f,vt)}},[]);var g=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(a,{styles:df(r)}):null,g?p.createElement(ef,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hf=Vu(Sa,ff);var Ma=p.forwardRef(function(e,t){return p.createElement(no,Le({},e,{ref:t,sideCar:hf}))});Ma.classNames=no.classNames;var gf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wt=new WeakMap,so=new WeakMap,io={},pn=0,Oa=function(e){return e&&(e.host||Oa(e.parentNode))},mf=function(e,t){return t.map(function(o){if(e.contains(o))return o;var n=Oa(o);return n&&e.contains(n)?n:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},vf=function(e,t,o,n){var r=mf(t,Array.isArray(e)?e:[e]);io[o]||(io[o]=new WeakMap);var a=io[o],s=[],i=new Set,l=new Set(r),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};r.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(n),b=g!==null&&g!=="false",m=(wt.get(h)||0)+1,v=(a.get(h)||0)+1;wt.set(h,m),a.set(h,v),s.push(h),m===1&&b&&so.set(h,!0),v===1&&h.setAttribute(o,"true"),b||h.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return f(t),i.clear(),pn++,function(){s.forEach(function(c){var h=wt.get(c)-1,g=a.get(c)-1;wt.set(c,h),a.set(c,g),h||(so.has(c)||c.removeAttribute(n),so.delete(c)),g||c.removeAttribute(o)}),pn--,pn||(wt=new WeakMap,wt=new WeakMap,so=new WeakMap,io={})}},bf=function(e,t,o){o===void 0&&(o="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),r=gf(e);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),vf(n,r,o,"aria-hidden")):function(){return null}},hn={exports:{}},gn={};/**
282
+ `)},Cp=0,Ct=[];function kp(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(Cp++)[0],a=h.useState(ts)[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Wf([e.lockRef.current],(e.shards||[]).map(ls),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=h.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var w=fn(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-w[0],k="deltaY"in m?m.deltaY:y[1]-w[1],P,E=m.target,N=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in m&&N==="h"&&E.type==="range")return!1;var S=window.getSelection(),A=S&&S.anchorNode,z=A?A===E||A.contains(E):!1;if(z)return!1;var _=os(N,E);if(!_)return!0;if(_?P=N:(P=N==="v"?"h":"v",_=os(N,E)),!_)return!1;if(!r.current&&"changedTouches"in m&&(x||k)&&(r.current=P),!P)return!0;var M=r.current||P;return wp(M,b,m,M==="h"?x:k)},[]),l=h.useCallback(function(m){var b=m;if(!(!Ct.length||Ct[Ct.length-1]!==a)){var w="deltaY"in b?is(b):fn(b),y=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&yp(P.delta,w)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(ls).filter(Boolean).filter(function(P){return P.contains(b.target)}),k=x.length>0?i(b,x[0]):!s.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),d=h.useCallback(function(m,b,w,y){var x={name:m,delta:b,target:w,should:y,shadowParent:Sp(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(k){return k!==x})},1)},[]),f=h.useCallback(function(m){n.current=fn(m),r.current=void 0},[]),c=h.useCallback(function(m){d(m.type,is(m),m.target,i(m,e.lockRef.current))},[]),p=h.useCallback(function(m){d(m.type,fn(m),m.target,i(m,e.lockRef.current))},[]);h.useEffect(function(){return Ct.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,xt),document.addEventListener("touchmove",l,xt),document.addEventListener("touchstart",f,xt),function(){Ct=Ct.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,xt),document.removeEventListener("touchmove",l,xt),document.removeEventListener("touchstart",f,xt)}},[]);var g=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(a,{styles:xp(o)}):null,g?h.createElement(fp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Sp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ep=Qf(es,kp);var cs=h.forwardRef(function(e,t){return h.createElement(dn,Oe({},e,{ref:t,sideCar:Ep}))});cs.classNames=dn.classNames;var Np=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kt=new WeakMap,pn=new WeakMap,hn={},wr=0,ds=function(e){return e&&(e.host||ds(e.parentNode))},Tp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ds(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_p=function(e,t,n,r){var o=Tp(t,Array.isArray(e)?e:[e]);hn[n]||(hn[n]=new WeakMap);var a=hn[n],s=[],i=new Set,l=new Set(o),d=function(c){!c||i.has(c)||(i.add(c),d(c.parentNode))};o.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(i.has(p))f(p);else try{var g=p.getAttribute(r),v=g!==null&&g!=="false",m=(kt.get(p)||0)+1,b=(a.get(p)||0)+1;kt.set(p,m),a.set(p,b),s.push(p),m===1&&v&&pn.set(p,!0),b===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),i.clear(),wr++,function(){s.forEach(function(c){var p=kt.get(c)-1,g=a.get(c)-1;kt.set(c,p),a.set(c,g),p||(pn.has(c)||c.removeAttribute(r),pn.delete(c)),g||c.removeAttribute(n)}),wr--,wr||(kt=new WeakMap,kt=new WeakMap,pn=new WeakMap,hn={})}},Ap=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Np(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),_p(r,o,n,"aria-hidden")):function(){return null}};function Pp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yr={exports:{}},xr={};/**
278
283
  * @license React
279
284
  * use-sync-external-store-shim.production.js
280
285
  *
@@ -282,16 +287,23 @@
282
287
  *
283
288
  * This source code is licensed under the MIT license found in the
284
289
  * LICENSE file in the root directory of this source tree.
285
- */var La;function wf(){if(La)return gn;La=1;var e=x;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var o=typeof Object.is=="function"?Object.is:t,n=e.useState,r=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var g=h(),b=n({inst:{value:g,getSnapshot:h}}),m=b[0].inst,v=b[1];return a(function(){m.value=g,m.getSnapshot=h,l(m)&&v({inst:m})},[c,g,h]),r(function(){return l(m)&&v({inst:m}),c(function(){l(m)&&v({inst:m})})},[c]),s(g),g}function l(c){var h=c.getSnapshot;c=c.value;try{var g=h();return!o(c,g)}catch{return!0}}function u(c,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return gn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,gn}var za;function yf(){return za||(za=1,hn.exports=wf()),hn.exports}var xf=yf();function kf(){return xf.useSyncExternalStore(Sf,()=>!0,()=>!1)}function Sf(){return()=>{}}var mn="Avatar",[Cf]=me(mn),[Ef,Da]=Cf(mn),$a=p.forwardRef((e,t)=>{const{__scopeAvatar:o,...n}=e,[r,a]=p.useState("idle");return d.jsx(Ef,{scope:o,imageLoadingStatus:r,onImageLoadingStatusChange:a,children:d.jsx(K.span,{...n,ref:t})})});$a.displayName=mn;var Fa="AvatarImage",Ba=p.forwardRef((e,t)=>{const{__scopeAvatar:o,src:n,onLoadingStatusChange:r=()=>{},...a}=e,s=Da(Fa,o),i=Nf(n,a),l=pe(u=>{r(u),s.onImageLoadingStatusChange(u)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(K.img,{...a,ref:t,src:n}):null});Ba.displayName=Fa;var Ha="AvatarFallback",Va=p.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:n,...r}=e,a=Da(Ha,o),[s,i]=p.useState(n===void 0);return p.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(l)}},[n]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(K.span,{...r,ref:t}):null});Va.displayName=Ha;function Wa(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Nf(e,{referrerPolicy:t,crossOrigin:o}){const n=kf(),r=p.useRef(null),a=n?(r.current||(r.current=new window.Image),r.current):null,[s,i]=p.useState(()=>Wa(a,e));return ie(()=>{i(Wa(a,e))},[a,e]),ie(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),f=l("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,o,t]),s}var Tf=$a,_f=Ba,Pf=Va;function lo(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function co(e){const[t,o]=p.useState(void 0);return ie(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else o(void 0)},[e]),t}var uo="Checkbox",[Af]=me(uo),[If,vn]=Af(uo);function Mf(e){const{__scopeCheckbox:t,checked:o,children:n,defaultChecked:r,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:f="on",internal_do_not_use_render:c}=e,[h,g]=He({prop:o,defaultProp:r??!1,onChange:l,caller:uo}),[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useRef(!1),k=b?!!s||!!b.closest("form"):!0,C={checked:h,disabled:a,setChecked:g,control:b,setControl:m,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ye(r)?!1:r,isFormControl:k,bubbleInput:v,setBubbleInput:w};return d.jsx(If,{scope:t,...C,children:Of(c)?c(C):n})}var Ua="CheckboxTrigger",ja=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...n},r)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:b}=vn(Ua,e),m=se(r,f),v=p.useRef(l);return p.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(v.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),d.jsx(K.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":Ka(l),"data-disabled":i?"":void 0,disabled:i,value:s,...n,ref:m,onKeyDown:J(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:J(o,w=>{c(y=>Ye(y)?!0:!y),b&&g&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});ja.displayName=Ua;var Ra=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:n,checked:r,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:f,...c}=e;return d.jsx(Mf,{__scopeCheckbox:o,checked:r,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:n,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(ja,{...c,ref:t,__scopeCheckbox:o}),h&&d.jsx(Xa,{__scopeCheckbox:o})]})})});Ra.displayName=uo;var Ga="CheckboxIndicator",qa=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:n,...r}=e,a=vn(Ga,o);return d.jsx(Ee,{present:n||Ye(a.checked)||a.checked===!0,children:d.jsx(K.span,{"data-state":Ka(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});qa.displayName=Ga;var Ya="CheckboxBubbleInput",Xa=p.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:n,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:f,form:c,bubbleInput:h,setBubbleInput:g}=vn(Ya,e),b=se(o,g),m=lo(a),v=co(n);p.useEffect(()=>{const y=h;if(!y)return;const k=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(k,"checked").set,P=!r.current;if(m!==a&&_){const T=new Event("click",{bubbles:P});y.indeterminate=Ye(a),_.call(y,Ye(a)?!1:a),y.dispatchEvent(T)}},[h,m,a,r]);const w=p.useRef(Ye(a)?!1:a);return d.jsx(K.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:f,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Xa.displayName=Ya;function Of(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function Ka(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const Lf=["top","right","bottom","left"],Xe=Math.min,we=Math.max,fo=Math.round,po=Math.floor,ze=e=>({x:e,y:e}),zf={left:"right",right:"left",bottom:"top",top:"bottom"};function bn(e,t,o){return we(e,Xe(t,o))}function Ve(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function yn(e){return e==="y"?"height":"width"}function De(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xn(e){return wn(De(e))}function Df(e,t,o){o===void 0&&(o=!1);const n=yt(e),r=xn(e),a=yn(r);let s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ho(s)),[s,ho(s)]}function $f(e){const t=ho(e);return[kn(e),t,kn(t)]}function kn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Za=["left","right"],Ja=["right","left"],Ff=["top","bottom"],Bf=["bottom","top"];function Hf(e,t,o){switch(e){case"top":case"bottom":return o?t?Ja:Za:t?Za:Ja;case"left":case"right":return t?Ff:Bf;default:return[]}}function Vf(e,t,o,n){const r=yt(e);let a=Hf(We(e),o==="start",n);return r&&(a=a.map(s=>s+"-"+r),t&&(a=a.concat(a.map(kn)))),a}function ho(e){const t=We(e);return zf[t]+e.slice(t.length)}function Wf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qa(e){return typeof e!="number"?Wf(e):{top:e,right:e,bottom:e,left:e}}function go(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function es(e,t,o){let{reference:n,floating:r}=e;const a=De(t),s=xn(t),i=yn(s),l=We(t),u=a==="y",f=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2,h=n[i]/2-r[i]/2;let g;switch(l){case"top":g={x:f,y:n.y-r.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:c};break;case"left":g={x:n.x-r.width,y:c};break;default:g={x:n.x,y:n.y}}switch(yt(t)){case"start":g[s]-=h*(o&&u?-1:1);break;case"end":g[s]+=h*(o&&u?-1:1);break}return g}async function Uf(e,t){var o;t===void 0&&(t={});const{x:n,y:r,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:h=!1,padding:g=0}=Ve(t,e),b=Qa(g),v=i[h?c==="floating"?"reference":"floating":c],w=go(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(v)))==null||o?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:l})),y=c==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},_=go(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:l}):y);return{top:(w.top-_.top+b.top)/C.y,bottom:(_.bottom-w.bottom+b.bottom)/C.y,left:(w.left-_.left+b.left)/C.x,right:(_.right-w.right+b.right)/C.x}}const jf=50,Rf=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:Uf},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:c}=es(u,n,l),h=n,g=0;const b={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:w,fn:y}=v,{x:k,y:C,data:_,reset:P}=await y({x:f,y:c,initialPlacement:n,placement:h,strategy:r,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});f=k??f,c=C??c,b[w]={...b[w],..._},P&&g<jf&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:f,y:c}=es(u,h,l)),m=-1)}return{x:f,y:c,placement:h,strategy:r,middlewareData:b}},Gf=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:r,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Ve(e,t)||{};if(u==null)return{};const c=Qa(f),h={x:o,y:n},g=xn(r),b=yn(g),m=await s.getDimensions(u),v=g==="y",w=v?"top":"left",y=v?"bottom":"right",k=v?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-h[g]-a.floating[b],_=h[g]-a.reference[g],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let T=P?P[k]:0;(!T||!await(s.isElement==null?void 0:s.isElement(P)))&&(T=i.floating[k]||a.floating[b]);const E=C/2-_/2,z=T/2-m[b]/2-1,j=Xe(c[w],z),O=Xe(c[y],z),B=j,V=T-m[b]-O,L=T/2-m[b]/2+E,Y=bn(B,L,V),I=!l.arrow&&yt(r)!=null&&L!==Y&&a.reference[b]/2-(L<B?j:O)-m[b]/2<0,D=I?L<B?L-B:L-V:0;return{[g]:h[g]+D,data:{[g]:Y,centerOffset:L-Y-D,...I&&{alignmentOffset:D}},reset:I}}}),qf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...v}=Ve(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const w=We(r),y=De(i),k=We(i)===i,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=h||(k||!m?[ho(i)]:$f(i)),P=b!=="none";!h&&P&&_.push(...Vf(i,m,b,C));const T=[i,..._],E=await l.detectOverflow(t,v),z=[];let j=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&z.push(E[w]),c){const L=Df(r,s,C);z.push(E[L[0]],E[L[1]])}if(j=[...j,{placement:r,overflows:z}],!z.every(L=>L<=0)){var O,B;const L=(((O=a.flip)==null?void 0:O.index)||0)+1,Y=T[L];if(Y&&(!(c==="alignment"?y!==De(Y):!1)||j.every(R=>De(R.placement)===y?R.overflows[0]>0:!0)))return{data:{index:L,overflows:j},reset:{placement:Y}};let I=(B=j.filter(D=>D.overflows[0]<=0).sort((D,R)=>D.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!I)switch(g){case"bestFit":{var V;const D=(V=j.filter(R=>{if(P){const N=De(R.placement);return N===y||N==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(N=>N>0).reduce((N,S)=>N+S,0)]).sort((R,N)=>R[1]-N[1])[0])==null?void 0:V[0];D&&(I=D);break}case"initialPlacement":I=i;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function os(e){return Lf.some(t=>e[t]>=0)}const Yf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:n}=t,{strategy:r="referenceHidden",...a}=Ve(e,t);switch(r){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),i=ts(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:os(i)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),i=ts(s,o.floating);return{data:{escapedOffsets:i,escaped:os(i)}}}default:return{}}}}},ns=new Set(["left","top"]);async function Xf(e,t){const{placement:o,platform:n,elements:r}=e,a=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=We(o),i=yt(o),l=De(o)==="y",u=ns.has(s)?-1:1,f=a&&l?-1:1,c=Ve(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),l?{x:g*f,y:h*u}:{x:h*u,y:g*f}}const Kf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:a,placement:s,middlewareData:i}=t,l=await Xf(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:s}}}}},Zf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:k}=w;return{x:y,y:k}}},...u}=Ve(e,t),f={x:o,y:n},c=await a.detectOverflow(t,u),h=De(We(r)),g=wn(h);let b=f[g],m=f[h];if(s){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",k=b+c[w],C=b-c[y];b=bn(k,b,C)}if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",k=m+c[w],C=m-c[y];m=bn(k,m,C)}const v=l.fn({...t,[g]:b,[h]:m});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[g]:s,[h]:i}}}}}},Jf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:r,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Ve(e,t),f={x:o,y:n},c=De(r),h=wn(c);let g=f[h],b=f[c];const m=Ve(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=h==="y"?"height":"width",C=a.reference[h]-a.floating[k]+v.mainAxis,_=a.reference[h]+a.reference[k]-v.mainAxis;g<C?g=C:g>_&&(g=_)}if(u){var w,y;const k=h==="y"?"width":"height",C=ns.has(We(r)),_=a.reference[c]-a.floating[k]+(C&&((w=s.offset)==null?void 0:w[c])||0)+(C?0:v.crossAxis),P=a.reference[c]+a.reference[k]+(C?0:((y=s.offset)==null?void 0:y[c])||0)-(C?v.crossAxis:0);b<_?b=_:b>P&&(b=P)}return{[h]:g,[c]:b}}}},Qf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Ve(e,t),f=await s.detectOverflow(t,u),c=We(r),h=yt(r),g=De(r)==="y",{width:b,height:m}=a.floating;let v,w;c==="top"||c==="bottom"?(v=c,w=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,v=h==="end"?"top":"bottom");const y=m-f.top-f.bottom,k=b-f.left-f.right,C=Xe(m-f[v],y),_=Xe(b-f[w],k),P=!t.middlewareData.shift;let T=C,E=_;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(E=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=y),P&&!h){const j=we(f.left,0),O=we(f.right,0),B=we(f.top,0),V=we(f.bottom,0);g?E=b-2*(j!==0||O!==0?j+O:we(f.left,f.right)):T=m-2*(B!==0||V!==0?B+V:we(f.top,f.bottom))}await l({...t,availableWidth:E,availableHeight:T});const z=await s.getDimensions(i.floating);return b!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function mo(){return typeof window<"u"}function xt(e){return rs(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $e(e){var t;return(t=(rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rs(e){return mo()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return mo()?e instanceof Element||e instanceof ye(e).Element:!1}function Ue(e){return mo()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function as(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ft(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&r!=="inline"&&r!=="contents"}function ep(e){return/^(table|td|th)$/.test(xt(e))}function vo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const tp=/transform|translate|scale|rotate|perspective|filter/,op=/paint|layout|strict|content/,at=e=>!!e&&e!=="none";let Sn;function Cn(e){const t=Ne(e)?Te(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!En()&&(at(t.backdropFilter)||at(t.filter))||tp.test(t.willChange||"")||op.test(t.contain||"")}function np(e){let t=Ke(e);for(;Ue(t)&&!kt(t);){if(Cn(t))return t;if(vo(t))return null;t=Ke(t)}return null}function En(){return Sn==null&&(Sn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sn}function kt(e){return/^(html|body|#document)$/.test(xt(e))}function Te(e){return ye(e).getComputedStyle(e)}function bo(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||as(e)&&e.host||$e(e);return as(t)?t.host:t}function ss(e){const t=Ke(e);return kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ue(t)&&Ft(t)?t:ss(t)}function Bt(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=ss(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),s=ye(r);if(a){const i=Nn(s);return t.concat(s,s.visualViewport||[],Ft(r)?r:[],i&&o?Bt(i):[])}else return t.concat(r,Bt(r,[],o))}function Nn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function is(e){const t=Te(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Ue(e),a=r?e.offsetWidth:o,s=r?e.offsetHeight:n,i=fo(o)!==a||fo(n)!==s;return i&&(o=a,n=s),{width:o,height:n,$:i}}function Tn(e){return Ne(e)?e:e.contextElement}function St(e){const t=Tn(e);if(!Ue(t))return ze(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:a}=is(t);let s=(a?fo(o.width):o.width)/n,i=(a?fo(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const rp=ze(0);function ls(e){const t=ye(e);return!En()||!t.visualViewport?rp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ap(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ye(e)?!1:t}function st(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),a=Tn(e);let s=ze(1);t&&(n?Ne(n)&&(s=St(n)):s=St(e));const i=ap(a,o,n)?ls(a):ze(0);let l=(r.left+i.x)/s.x,u=(r.top+i.y)/s.y,f=r.width/s.x,c=r.height/s.y;if(a){const h=ye(a),g=n&&Ne(n)?ye(n):n;let b=h,m=Nn(b);for(;m&&n&&g!==b;){const v=St(m),w=m.getBoundingClientRect(),y=Te(m),k=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,C=w.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,c*=v.y,l+=k,u+=C,b=ye(m),m=Nn(b)}}return go({width:f,height:c,x:l,y:u})}function wo(e,t){const o=bo(e).scrollLeft;return t?t.left+o:st($e(e)).left+o}function cs(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-wo(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function sp(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const a=r==="fixed",s=$e(n),i=t?vo(t.floating):!1;if(n===s||i&&a)return o;let l={scrollLeft:0,scrollTop:0},u=ze(1);const f=ze(0),c=Ue(n);if((c||!c&&!a)&&((xt(n)!=="body"||Ft(s))&&(l=bo(n)),c)){const g=st(n);u=St(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const h=s&&!c&&!a?cs(s,l):ze(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:o.y*u.y-l.scrollTop*u.y+f.y+h.y}}function ip(e){return Array.from(e.getClientRects())}function lp(e){const t=$e(e),o=bo(e),n=e.ownerDocument.body,r=we(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=we(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+wo(e);const i=-o.scrollTop;return Te(n).direction==="rtl"&&(s+=we(t.clientWidth,n.clientWidth)-r),{width:r,height:a,x:s,y:i}}const ds=25;function cp(e,t){const o=ye(e),n=$e(e),r=o.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(r){a=r.width,s=r.height;const f=En();(!f||f&&t==="fixed")&&(i=r.offsetLeft,l=r.offsetTop)}const u=wo(n);if(u<=0){const f=n.ownerDocument,c=f.body,h=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(n.clientWidth-c.clientWidth-g);b<=ds&&(a-=b)}else u<=ds&&(a+=u);return{width:a,height:s,x:i,y:l}}function dp(e,t){const o=st(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,a=Ue(e)?St(e):ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=r*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function us(e,t,o){let n;if(t==="viewport")n=cp(e,o);else if(t==="document")n=lp($e(e));else if(Ne(t))n=dp(t,o);else{const r=ls(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return go(n)}function fs(e,t){const o=Ke(e);return o===t||!Ne(o)||kt(o)?!1:Te(o).position==="fixed"||fs(o,t)}function up(e,t){const o=t.get(e);if(o)return o;let n=Bt(e,[],!1).filter(i=>Ne(i)&&xt(i)!=="body"),r=null;const a=Te(e).position==="fixed";let s=a?Ke(e):e;for(;Ne(s)&&!kt(s);){const i=Te(s),l=Cn(s);!l&&i.position==="fixed"&&(r=null),(a?!l&&!r:!l&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Ft(s)&&!l&&fs(e,s))?n=n.filter(f=>f!==s):r=i,s=Ke(s)}return t.set(e,n),n}function fp(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const s=[...o==="clippingAncestors"?vo(t)?[]:up(t,this._c):[].concat(o),n],i=us(t,s[0],r);let l=i.top,u=i.right,f=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=us(t,s[h],r);l=we(g.top,l),u=Xe(g.right,u),f=Xe(g.bottom,f),c=we(g.left,c)}return{width:u-c,height:f-l,x:c,y:l}}function pp(e){const{width:t,height:o}=is(e);return{width:t,height:o}}function hp(e,t,o){const n=Ue(t),r=$e(t),a=o==="fixed",s=st(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ze(0);function u(){l.x=wo(r)}if(n||!n&&!a)if((xt(t)!=="body"||Ft(r))&&(i=bo(t)),n){const g=st(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else r&&u();a&&!n&&r&&u();const f=r&&!n&&!a?cs(r,i):ze(0),c=s.left+i.scrollLeft-l.x-f.x,h=s.top+i.scrollTop-l.y-f.y;return{x:c,y:h,width:s.width,height:s.height}}function _n(e){return Te(e).position==="static"}function ps(e,t){if(!Ue(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return $e(e)===o&&(o=o.ownerDocument.body),o}function hs(e,t){const o=ye(e);if(vo(e))return o;if(!Ue(e)){let r=Ke(e);for(;r&&!kt(r);){if(Ne(r)&&!_n(r))return r;r=Ke(r)}return o}let n=ps(e,t);for(;n&&ep(n)&&_n(n);)n=ps(n,t);return n&&kt(n)&&_n(n)&&!Cn(n)?o:n||np(e)||o}const gp=async function(e){const t=this.getOffsetParent||hs,o=this.getDimensions,n=await o(e.floating);return{reference:hp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mp(e){return Te(e).direction==="rtl"}const vp={convertOffsetParentRelativeRectToViewportRelativeRect:sp,getDocumentElement:$e,getClippingRect:fp,getOffsetParent:hs,getElementRects:gp,getClientRects:ip,getDimensions:pp,getScale:St,isElement:Ne,isRTL:mp};function gs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bp(e,t){let o=null,n;const r=$e(e);function a(){var i;clearTimeout(n),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:f,top:c,width:h,height:g}=u;if(i||t(),!h||!g)return;const b=po(c),m=po(r.clientWidth-(f+h)),v=po(r.clientHeight-(c+g)),w=po(f),k={rootMargin:-b+"px "+-m+"px "+-v+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let C=!0;function _(P){const T=P[0].intersectionRatio;if(T!==l){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!gs(u,e.getBoundingClientRect())&&s(),C=!1}try{o=new IntersectionObserver(_,{...k,root:r.ownerDocument})}catch{o=new IntersectionObserver(_,k)}o.observe(e)}return s(!0),a}function wp(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Tn(e),f=r||a?[...u?Bt(u):[],...t?Bt(t):[]]:[];f.forEach(w=>{r&&w.addEventListener("scroll",o,{passive:!0}),a&&w.addEventListener("resize",o)});const c=u&&i?bp(u,o):null;let h=-1,g=null;s&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(t)})),o()}),u&&!l&&g.observe(u),t&&g.observe(t));let b,m=l?st(e):null;l&&v();function v(){const w=st(e);m&&!gs(m,w)&&o(),m=w,b=requestAnimationFrame(v)}return o(),()=>{var w;f.forEach(y=>{r&&y.removeEventListener("scroll",o),a&&y.removeEventListener("resize",o)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const yp=Kf,xp=Zf,kp=qf,Sp=Qf,Cp=Yf,ms=Gf,Ep=Jf,Np=(e,t,o)=>{const n=new Map,r={platform:vp,...o},a={...r.platform,_c:n};return Rf(e,t,{...r,platform:a})};var Tp=typeof document<"u",_p=function(){},yo=Tp?x.useLayoutEffect:_p;function xo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!xo(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const a=r[n];if(!(a==="_owner"&&e.$$typeof)&&!xo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function vs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bs(e,t){const o=vs(e);return Math.round(t*o)/o}function Pn(e){const t=p.useRef(e);return yo(()=>{t.current=e}),t}function Pp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[f,c]=p.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=p.useState(n);xo(h,n)||g(n);const[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useCallback(R=>{R!==P.current&&(P.current=R,m(R))},[]),k=p.useCallback(R=>{R!==T.current&&(T.current=R,w(R))},[]),C=a||b,_=s||v,P=p.useRef(null),T=p.useRef(null),E=p.useRef(f),z=l!=null,j=Pn(l),O=Pn(r),B=Pn(u),V=p.useCallback(()=>{if(!P.current||!T.current)return;const R={placement:t,strategy:o,middleware:h};O.current&&(R.platform=O.current),Np(P.current,T.current,R).then(N=>{const S={...N,isPositioned:B.current!==!1};L.current&&!xo(E.current,S)&&(E.current=S,Rt.flushSync(()=>{c(S)}))})},[h,t,o,O,B]);yo(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(R=>({...R,isPositioned:!1})))},[u]);const L=p.useRef(!1);yo(()=>(L.current=!0,()=>{L.current=!1}),[]),yo(()=>{if(C&&(P.current=C),_&&(T.current=_),C&&_){if(j.current)return j.current(C,_,V);V()}},[C,_,V,j,z]);const Y=p.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:k}),[y,k]),I=p.useMemo(()=>({reference:C,floating:_}),[C,_]),D=p.useMemo(()=>{const R={position:o,left:0,top:0};if(!I.floating)return R;const N=bs(I.floating,f.x),S=bs(I.floating,f.y);return i?{...R,transform:"translate("+N+"px, "+S+"px)",...vs(I.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:N,top:S}},[o,i,I.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:V,refs:Y,elements:I,floatingStyles:D}),[f,V,Y,I,D])}const Ap=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?ms({element:n.current,padding:r}).fn(o):{}:n?ms({element:n,padding:r}).fn(o):{}}}},Ip=(e,t)=>{const o=yp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Mp=(e,t)=>{const o=xp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Op=(e,t)=>({fn:Ep(e).fn,options:[e,t]}),Lp=(e,t)=>{const o=kp(e);return{name:o.name,fn:o.fn,options:[e,t]}},zp=(e,t)=>{const o=Sp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Dp=(e,t)=>{const o=Cp(e);return{name:o.name,fn:o.fn,options:[e,t]}},$p=(e,t)=>{const o=Ap(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Fp="Arrow",ws=p.forwardRef((e,t)=>{const{children:o,width:n=10,height:r=5,...a}=e;return d.jsx(K.svg,{...a,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ws.displayName=Fp;var Bp=ws,An="Popper",[ys,ko]=me(An),[Hp,xs]=ys(An),ks=e=>{const{__scopePopper:t,children:o}=e,[n,r]=p.useState(null);return d.jsx(Hp,{scope:t,anchor:n,onAnchorChange:r,children:o})};ks.displayName=An;var Ss="PopperAnchor",Cs=p.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:n,...r}=e,a=xs(Ss,o),s=p.useRef(null),i=se(t,s),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(n==null?void 0:n.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),n?null:d.jsx(K.div,{...r,ref:i})});Cs.displayName=Ss;var In="PopperContent",[Vp,Wp]=ys(In),Es=p.forwardRef((e,t)=>{var G,q,Q,ee,re,oe;const{__scopePopper:o,side:n="bottom",sideOffset:r=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...m}=e,v=xs(In,o),[w,y]=p.useState(null),k=se(t,ce=>y(ce)),[C,_]=p.useState(null),P=co(C),T=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,z=n+(a!=="center"?"-"+a:""),j=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(u)?u:[u],B=O.length>0,V={padding:j,boundary:O.filter(jp),altBoundary:B},{refs:L,floatingStyles:Y,placement:I,isPositioned:D,middlewareData:R}=Pp({strategy:"fixed",placement:z,whileElementsMounted:(...ce)=>wp(...ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Ip({mainAxis:r+E,alignmentAxis:s}),l&&Mp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Op():void 0,...V}),l&&Lp({...V}),zp({...V,apply:({elements:ce,rects:de,availableWidth:ct,availableHeight:Qe})=>{const{width:Pe,height:Fo}=de.reference,ve=ce.floating.style;ve.setProperty("--radix-popper-available-width",`${ct}px`),ve.setProperty("--radix-popper-available-height",`${Qe}px`),ve.setProperty("--radix-popper-anchor-width",`${Pe}px`),ve.setProperty("--radix-popper-anchor-height",`${Fo}px`)}}),C&&$p({element:C,padding:i}),Rp({arrowWidth:T,arrowHeight:E}),h&&Dp({strategy:"referenceHidden",...V})]}),[N,S]=_s(I),M=pe(b);ie(()=>{D&&(M==null||M())},[D,M]);const F=(G=R.arrow)==null?void 0:G.x,A=(q=R.arrow)==null?void 0:q.y,$=((Q=R.arrow)==null?void 0:Q.centerOffset)!==0,[H,Z]=p.useState();return ie(()=>{w&&Z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:D?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(ee=R.transformOrigin)==null?void 0:ee.x,(re=R.transformOrigin)==null?void 0:re.y].join(" "),...((oe=R.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Vp,{scope:o,placedSide:N,onArrowChange:_,arrowX:F,arrowY:A,shouldHideArrow:$,children:d.jsx(K.div,{"data-side":N,"data-align":S,...m,ref:k,style:{...m.style,animation:D?void 0:"none"}})})})});Es.displayName=In;var Ns="PopperArrow",Up={top:"bottom",right:"left",bottom:"top",left:"right"},Ts=p.forwardRef(function(t,o){const{__scopePopper:n,...r}=t,a=Wp(Ns,n),s=Up[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Bp,{...r,ref:o,style:{...r.style,display:"block"}})})});Ts.displayName=Ns;function jp(e){return e!==null}var Rp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:o,rects:n,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=_s(o),c={start:"0%",center:"50%",end:"100%"}[f],h=(((w=r.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=r.arrow)==null?void 0:y.y)??0)+l/2;let b="",m="";return u==="bottom"?(b=s?c:`${h}px`,m=`${-l}px`):u==="top"?(b=s?c:`${h}px`,m=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(b=`${n.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:b,y:m}}}});function _s(e){const[t,o="center"]=e.split("-");return[t,o]}var Ps=ks,As=Cs,Is=Es,Ms=Ts,Mn="rovingFocusGroup.onEntryFocus",Gp={bubbles:!1,cancelable:!0},Ht="RovingFocusGroup",[On,Os,qp]=ra(Ht),[Yp,So]=me(Ht,[qp]),[Xp,Kp]=Yp(Ht),Ls=p.forwardRef((e,t)=>d.jsx(On.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(On.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Zp,{...e,ref:t})})}));Ls.displayName=Ht;var Zp=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,h=p.useRef(null),g=se(t,h),b=$t(a),[m,v]=He({prop:s,defaultProp:i??null,onChange:l,caller:Ht}),[w,y]=p.useState(!1),k=pe(u),C=Os(o),_=p.useRef(!1),[P,T]=p.useState(0);return p.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(Mn,k),()=>E.removeEventListener(Mn,k)},[k]),d.jsx(Xp,{scope:o,orientation:n,dir:b,loop:r,currentTabStopId:m,onItemFocus:p.useCallback(E=>v(E),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:p.useCallback(()=>T(E=>E-1),[]),children:d.jsx(K.div,{tabIndex:w||P===0?-1:0,"data-orientation":n,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{_.current=!0}),onFocus:J(e.onFocus,E=>{const z=!_.current;if(E.target===E.currentTarget&&z&&!w){const j=new CustomEvent(Mn,Gp);if(E.currentTarget.dispatchEvent(j),!j.defaultPrevented){const O=C().filter(I=>I.focusable),B=O.find(I=>I.active),V=O.find(I=>I.id===m),Y=[B,V,...O].filter(Boolean).map(I=>I.ref.current);$s(Y,f)}}_.current=!1}),onBlur:J(e.onBlur,()=>y(!1))})})}),zs="RovingFocusGroupItem",Ds=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:a,children:s,...i}=e,l=rt(),u=a||l,f=Kp(zs,o),c=f.currentTabStopId===u,h=Os(o),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:m}=f;return p.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),d.jsx(On.ItemSlot,{scope:o,id:u,focusable:n,active:r,children:d.jsx(K.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:J(e.onMouseDown,v=>{n?f.onItemFocus(u):v.preventDefault()}),onFocus:J(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:J(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=eh(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let k=h().filter(C=>C.focusable).map(C=>C.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const C=k.indexOf(v.currentTarget);k=f.loop?th(k,C+1):k.slice(C+1)}setTimeout(()=>$s(k))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});Ds.displayName=zs;var Jp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function eh(e,t,o){const n=Qp(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Jp[n]}function $s(e,t=!1){const o=document.activeElement;for(const n of e)if(n===o||(n.focus({preventScroll:t}),document.activeElement!==o))return}function th(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var Fs=Ls,Bs=Ds,oh="Label",Hs=p.forwardRef((e,t)=>d.jsx(K.label,{...e,ref:t,onMouseDown:o=>{var r;o.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Hs.displayName=oh;var nh=Hs;function Ln(e,[t,o]){return Math.min(o,Math.max(t,e))}var zn="Progress",Dn=100,[rh]=me(zn),[ah,sh]=rh(zn),Vs=p.forwardRef((e,t)=>{const{__scopeProgress:o,value:n=null,max:r,getValueLabel:a=ih,...s}=e;(r||r===0)&&!Rs(r)&&console.error(lh(`${r}`,"Progress"));const i=Rs(r)?r:Dn;n!==null&&!Gs(n,i)&&console.error(ch(`${n}`,"Progress"));const l=Gs(n,i)?n:null,u=Co(l)?a(l,i):void 0;return d.jsx(ah,{scope:o,value:l,max:i,children:d.jsx(K.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Co(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":js(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Vs.displayName=zn;var Ws="ProgressIndicator",Us=p.forwardRef((e,t)=>{const{__scopeProgress:o,...n}=e,r=sh(Ws,o);return d.jsx(K.div,{"data-state":js(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...n,ref:t})});Us.displayName=Ws;function ih(e,t){return`${Math.round(e/t*100)}%`}function js(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Co(e){return typeof e=="number"}function Rs(e){return Co(e)&&!isNaN(e)&&e>0}function Gs(e,t){return Co(e)&&!isNaN(e)&&e<=t&&e>=0}function lh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Dn}\`.`}function ch(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
290
+ */var us;function Ip(){if(us)return xr;us=1;var e=C;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,p){var g=p(),v=r({inst:{value:g,getSnapshot:p}}),m=v[0].inst,b=v[1];return a(function(){m.value=g,m.getSnapshot=p,l(m)&&b({inst:m})},[c,g,p]),o(function(){return l(m)&&b({inst:m}),c(function(){l(m)&&b({inst:m})})},[c]),s(g),g}function l(c){var p=c.getSnapshot;c=c.value;try{var g=p();return!n(c,g)}catch{return!0}}function d(c,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return xr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,xr}var fs;function Mp(){return fs||(fs=1,yr.exports=Ip()),yr.exports}var Lp=Mp();function Op(){return Lp.useSyncExternalStore(zp,()=>!0,()=>!1)}function zp(){return()=>{}}var Cr="Avatar",[Dp]=me(Cr),[Bp,ps]=Dp(Cr),hs=h.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=h.useState("idle");return u.jsx(Bp,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:u.jsx(J.span,{...r,ref:t})})});hs.displayName=Cr;var gs="AvatarImage",ms=h.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=ps(gs,n),i=Fp(r,a),l=pe(d=>{o(d),s.onImageLoadingStatusChange(d)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?u.jsx(J.img,{...a,ref:t,src:r}):null});ms.displayName=gs;var vs="AvatarFallback",bs=h.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=ps(vs,n),[s,i]=h.useState(r===void 0);return h.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?u.jsx(J.span,{...o,ref:t}):null});bs.displayName=vs;function ws(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Fp(e,{referrerPolicy:t,crossOrigin:n}){const r=Op(),o=h.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=h.useState(()=>ws(a,e));return ie(()=>{i(ws(a,e))},[a,e]),ie(()=>{const l=c=>()=>{i(c)};if(!a)return;const d=l("loaded"),f=l("error");return a.addEventListener("load",d),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",d),a.removeEventListener("error",f)}},[a,n,t]),s}var $p=hs,Hp=ms,Vp=bs;function gn(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function mn(e){const[t,n]=h.useState(void 0);return ie(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vn="Checkbox",[Up]=me(vn),[Rp,kr]=Up(vn);function Wp(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:d,value:f="on",internal_do_not_use_render:c}=e,[p,g]=Ve({prop:n,defaultProp:o??!1,onChange:l,caller:vn}),[v,m]=h.useState(null),[b,w]=h.useState(null),y=h.useRef(!1),x=v?!!s||!!v.closest("form"):!0,k={checked:p,disabled:a,setChecked:g,control:v,setControl:m,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:Ke(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:w};return u.jsx(Rp,{scope:t,...k,children:jp(c)?c(k):r})}var ys="CheckboxTrigger",xs=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:d,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:v}=kr(ys,e),m=se(o,f),b=h.useRef(l);return h.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(b.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),u.jsx(J.button,{type:"button",role:"checkbox","aria-checked":Ke(l)?"mixed":l,"aria-required":d,"data-state":Ts(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:m,onKeyDown:Q(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Q(n,w=>{c(y=>Ke(y)?!0:!y),v&&g&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});xs.displayName=ys;var Cs=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:d,form:f,...c}=e;return u.jsx(Wp,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:d,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(xs,{...c,ref:t,__scopeCheckbox:n}),p&&u.jsx(Ns,{__scopeCheckbox:n})]})})});Cs.displayName=vn;var ks="CheckboxIndicator",Ss=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=kr(ks,n);return u.jsx(Ee,{present:r||Ke(a.checked)||a.checked===!0,children:u.jsx(J.span,{"data-state":Ts(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Ss.displayName=ks;var Es="CheckboxBubbleInput",Ns=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:d,value:f,form:c,bubbleInput:p,setBubbleInput:g}=kr(Es,e),v=se(n,g),m=gn(a),b=mn(r);h.useEffect(()=>{const y=p;if(!y)return;const x=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(x,"checked").set,E=!o.current;if(m!==a&&P){const N=new Event("click",{bubbles:E});y.indeterminate=Ke(a),P.call(y,Ke(a)?!1:a),y.dispatchEvent(N)}},[p,m,a,o]);const w=h.useRef(Ke(a)?!1:a);return u.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:d,value:f,form:c,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ns.displayName=Es;function jp(e){return typeof e=="function"}function Ke(e){return e==="indeterminate"}function Ts(e){return Ke(e)?"indeterminate":e?"checked":"unchecked"}const qp=["top","right","bottom","left"],Xe=Math.min,we=Math.max,bn=Math.round,wn=Math.floor,ze=e=>({x:e,y:e}),Gp={left:"right",right:"left",bottom:"top",top:"bottom"};function Sr(e,t,n){return we(e,Xe(t,n))}function Ue(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function St(e){return e.split("-")[1]}function Er(e){return e==="x"?"y":"x"}function Nr(e){return e==="y"?"height":"width"}function De(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tr(e){return Er(De(e))}function Yp(e,t,n){n===void 0&&(n=!1);const r=St(e),o=Tr(e),a=Nr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yn(s)),[s,yn(s)]}function Kp(e){const t=yn(e);return[_r(e),t,_r(t)]}function _r(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _s=["left","right"],As=["right","left"],Xp=["top","bottom"],Zp=["bottom","top"];function Jp(e,t,n){switch(e){case"top":case"bottom":return n?t?As:_s:t?_s:As;case"left":case"right":return t?Xp:Zp;default:return[]}}function Qp(e,t,n,r){const o=St(e);let a=Jp(Re(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(_r)))),a}function yn(e){const t=Re(e);return Gp[t]+e.slice(t.length)}function eh(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ps(e){return typeof e!="number"?eh(e):{top:e,right:e,bottom:e,left:e}}function xn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Is(e,t,n){let{reference:r,floating:o}=e;const a=De(t),s=Tr(t),i=Nr(s),l=Re(t),d=a==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-o.width,y:c};break;default:g={x:r.x,y:r.y}}switch(St(t)){case"start":g[s]-=p*(n&&d?-1:1);break;case"end":g[s]+=p*(n&&d?-1:1);break}return g}async function th(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:g=0}=Ue(t,e),v=Ps(g),b=i[p?c==="floating"?"reference":"floating":c],w=xn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:l})),y=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),k=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},P=xn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(w.top-P.top+v.top)/k.y,bottom:(P.bottom-w.bottom+v.bottom)/k.y,left:(w.left-P.left+v.left)/k.x,right:(P.right-w.right+v.right)/k.x}}const nh=50,rh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:th},l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=Is(d,r,l),p=r,g=0;const v={};for(let m=0;m<a.length;m++){const b=a[m];if(!b)continue;const{name:w,fn:y}=b,{x,y:k,data:P,reset:E}=await y({x:f,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:v,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,c=k??c,v[w]={...v[w],...P},E&&g<nh&&(g++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:c}=Is(d,p,l)),m=-1)}return{x:f,y:c,placement:p,strategy:o,middlewareData:v}},oh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:d,padding:f=0}=Ue(e,t)||{};if(d==null)return{};const c=Ps(f),p={x:n,y:r},g=Tr(o),v=Nr(g),m=await s.getDimensions(d),b=g==="y",w=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",k=a.reference[v]+a.reference[g]-p[g]-a.floating[v],P=p[g]-a.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=E?E[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(E)))&&(N=i.floating[x]||a.floating[v]);const S=k/2-P/2,A=N/2-m[v]/2-1,z=Xe(c[w],A),_=Xe(c[y],A),M=z,O=N-m[v]-_,I=N/2-m[v]/2+S,j=Sr(M,I,O),D=!l.arrow&&St(o)!=null&&I!==j&&a.reference[v]/2-(I<M?z:_)-m[v]/2<0,$=D?I<M?I-M:I-O:0;return{[g]:p[g]+$,data:{[g]:j,centerOffset:I-j-$,...D&&{alignmentOffset:$}},reset:D}}}),ah=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Ue(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Re(o),y=De(i),x=Re(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(d.floating)),P=p||(x||!m?[yn(i)]:Kp(i)),E=v!=="none";!p&&E&&P.push(...Qp(i,m,v,k));const N=[i,...P],S=await l.detectOverflow(t,b),A=[];let z=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&A.push(S[w]),c){const I=Yp(o,s,k);A.push(S[I[0]],S[I[1]])}if(z=[...z,{placement:o,overflows:A}],!A.every(I=>I<=0)){var _,M;const I=(((_=a.flip)==null?void 0:_.index)||0)+1,j=N[I];if(j&&(!(c==="alignment"?y!==De(j):!1)||z.every(q=>De(q.placement)===y?q.overflows[0]>0:!0)))return{data:{index:I,overflows:z},reset:{placement:j}};let D=(M=z.filter($=>$.overflows[0]<=0).sort(($,q)=>$.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(g){case"bestFit":{var O;const $=(O=z.filter(q=>{if(E){const L=De(q.placement);return L===y||L==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(L=>L>0).reduce((L,T)=>L+T,0)]).sort((q,L)=>q[1]-L[1])[0])==null?void 0:O[0];$&&(D=$);break}case"initialPlacement":D=i;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Ms(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ls(e){return qp.some(t=>e[t]>=0)}const sh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Ue(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ms(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ls(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ms(s,n.floating);return{data:{escapedOffsets:i,escaped:Ls(i)}}}default:return{}}}}},Os=new Set(["left","top"]);async function ih(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Re(n),i=St(n),l=De(n)==="y",d=Os.has(s)?-1:1,f=a&&l?-1:1,c=Ue(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),l?{x:g*f,y:p*d}:{x:p*d,y:g*f}}const lh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await ih(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},ch=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:x}=w;return{x:y,y:x}}},...d}=Ue(e,t),f={x:n,y:r},c=await a.detectOverflow(t,d),p=De(Re(o)),g=Er(p);let v=f[g],m=f[p];if(s){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=v+c[w],k=v-c[y];v=Sr(x,v,k)}if(i){const w=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=m+c[w],k=m-c[y];m=Sr(x,m,k)}const b=l.fn({...t,[g]:v,[p]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:s,[p]:i}}}}}},dh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Ue(e,t),f={x:n,y:r},c=De(o),p=Er(c);let g=f[p],v=f[c];const m=Ue(i,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",k=a.reference[p]-a.floating[x]+b.mainAxis,P=a.reference[p]+a.reference[x]-b.mainAxis;g<k?g=k:g>P&&(g=P)}if(d){var w,y;const x=p==="y"?"width":"height",k=Os.has(Re(o)),P=a.reference[c]-a.floating[x]+(k&&((w=s.offset)==null?void 0:w[c])||0)+(k?0:b.crossAxis),E=a.reference[c]+a.reference[x]+(k?0:((y=s.offset)==null?void 0:y[c])||0)-(k?b.crossAxis:0);v<P?v=P:v>E&&(v=E)}return{[p]:g,[c]:v}}}},uh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...d}=Ue(e,t),f=await s.detectOverflow(t,d),c=Re(o),p=St(o),g=De(o)==="y",{width:v,height:m}=a.floating;let b,w;c==="top"||c==="bottom"?(b=c,w=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,b=p==="end"?"top":"bottom");const y=m-f.top-f.bottom,x=v-f.left-f.right,k=Xe(m-f[b],y),P=Xe(v-f[w],x),E=!t.middlewareData.shift;let N=k,S=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=y),E&&!p){const z=we(f.left,0),_=we(f.right,0),M=we(f.top,0),O=we(f.bottom,0);g?S=v-2*(z!==0||_!==0?z+_:we(f.left,f.right)):N=m-2*(M!==0||O!==0?M+O:we(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:N});const A=await s.getDimensions(i.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Cn(){return typeof window<"u"}function Et(e){return zs(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(zs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zs(e){return Cn()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return Cn()?e instanceof Element||e instanceof ye(e).Element:!1}function We(e){return Cn()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Ds(e){return!Cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Rt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function fh(e){return/^(table|td|th)$/.test(Et(e))}function kn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ph=/transform|translate|scale|rotate|perspective|filter/,hh=/paint|layout|strict|content/,it=e=>!!e&&e!=="none";let Ar;function Pr(e){const t=Ne(e)?Te(e):e;return it(t.transform)||it(t.translate)||it(t.scale)||it(t.rotate)||it(t.perspective)||!Ir()&&(it(t.backdropFilter)||it(t.filter))||ph.test(t.willChange||"")||hh.test(t.contain||"")}function gh(e){let t=Ze(e);for(;We(t)&&!Nt(t);){if(Pr(t))return t;if(kn(t))return null;t=Ze(t)}return null}function Ir(){return Ar==null&&(Ar=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ar}function Nt(e){return/^(html|body|#document)$/.test(Et(e))}function Te(e){return ye(e).getComputedStyle(e)}function Sn(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(Et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||Be(e);return Ds(t)?t.host:t}function Bs(e){const t=Ze(e);return Nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&Rt(t)?t:Bs(t)}function Wt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bs(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=ye(o);if(a){const i=Mr(s);return t.concat(s,s.visualViewport||[],Rt(o)?o:[],i&&n?Wt(i):[])}else return t.concat(o,Wt(o,[],n))}function Mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fs(e){const t=Te(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=We(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=bn(n)!==a||bn(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Lr(e){return Ne(e)?e:e.contextElement}function Tt(e){const t=Lr(e);if(!We(t))return ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Fs(t);let s=(a?bn(n.width):n.width)/r,i=(a?bn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const mh=ze(0);function $s(e){const t=ye(e);return!Ir()||!t.visualViewport?mh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Lr(e);let s=ze(1);t&&(r?Ne(r)&&(s=Tt(r)):s=Tt(e));const i=vh(a,n,r)?$s(a):ze(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,c=o.height/s.y;if(a){const p=ye(a),g=r&&Ne(r)?ye(r):r;let v=p,m=Mr(v);for(;m&&r&&g!==v;){const b=Tt(m),w=m.getBoundingClientRect(),y=Te(m),x=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,k=w.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,d*=b.y,f*=b.x,c*=b.y,l+=x,d+=k,v=ye(m),m=Mr(v)}}return xn({width:f,height:c,x:l,y:d})}function En(e,t){const n=Sn(e).scrollLeft;return t?t.left+n:lt(Be(e)).left+n}function Hs(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-En(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function bh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=Be(r),i=t?kn(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=ze(1);const f=ze(0),c=We(r);if((c||!c&&!a)&&((Et(r)!=="body"||Rt(s))&&(l=Sn(r)),c)){const g=lt(r);d=Tt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const p=s&&!c&&!a?Hs(s,l):ze(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-l.scrollTop*d.y+f.y+p.y}}function wh(e){return Array.from(e.getClientRects())}function yh(e){const t=Be(e),n=Sn(e),r=e.ownerDocument.body,o=we(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=we(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+En(e);const i=-n.scrollTop;return Te(r).direction==="rtl"&&(s+=we(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Vs=25;function xh(e,t){const n=ye(e),r=Be(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const f=Ir();(!f||f&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=En(r);if(d<=0){const f=r.ownerDocument,c=f.body,p=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-c.clientWidth-g);v<=Vs&&(a-=v)}else d<=Vs&&(a+=d);return{width:a,height:s,x:i,y:l}}function Ch(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=We(e)?Tt(e):ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:i,x:l,y:d}}function Us(e,t,n){let r;if(t==="viewport")r=xh(e,n);else if(t==="document")r=yh(Be(e));else if(Ne(t))r=Ch(t,n);else{const o=$s(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xn(r)}function Rs(e,t){const n=Ze(e);return n===t||!Ne(n)||Nt(n)?!1:Te(n).position==="fixed"||Rs(n,t)}function kh(e,t){const n=t.get(e);if(n)return n;let r=Wt(e,[],!1).filter(i=>Ne(i)&&Et(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?Ze(e):e;for(;Ne(s)&&!Nt(s);){const i=Te(s),l=Pr(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Rt(s)&&!l&&Rs(e,s))?r=r.filter(f=>f!==s):o=i,s=Ze(s)}return t.set(e,r),r}function Sh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?kn(t)?[]:kh(t,this._c):[].concat(n),r],i=Us(t,s[0],o);let l=i.top,d=i.right,f=i.bottom,c=i.left;for(let p=1;p<s.length;p++){const g=Us(t,s[p],o);l=we(g.top,l),d=Xe(g.right,d),f=Xe(g.bottom,f),c=we(g.left,c)}return{width:d-c,height:f-l,x:c,y:l}}function Eh(e){const{width:t,height:n}=Fs(e);return{width:t,height:n}}function Nh(e,t,n){const r=We(t),o=Be(t),a=n==="fixed",s=lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ze(0);function d(){l.x=En(o)}if(r||!r&&!a)if((Et(t)!=="body"||Rt(o))&&(i=Sn(t)),r){const g=lt(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?Hs(o,i):ze(0),c=s.left+i.scrollLeft-l.x-f.x,p=s.top+i.scrollTop-l.y-f.y;return{x:c,y:p,width:s.width,height:s.height}}function Or(e){return Te(e).position==="static"}function Ws(e,t){if(!We(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function js(e,t){const n=ye(e);if(kn(e))return n;if(!We(e)){let o=Ze(e);for(;o&&!Nt(o);){if(Ne(o)&&!Or(o))return o;o=Ze(o)}return n}let r=Ws(e,t);for(;r&&fh(r)&&Or(r);)r=Ws(r,t);return r&&Nt(r)&&Or(r)&&!Pr(r)?n:r||gh(e)||n}const Th=async function(e){const t=this.getOffsetParent||js,n=this.getDimensions,r=await n(e.floating);return{reference:Nh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _h(e){return Te(e).direction==="rtl"}const Ah={convertOffsetParentRelativeRectToViewportRelativeRect:bh,getDocumentElement:Be,getClippingRect:Sh,getOffsetParent:js,getElementRects:Th,getClientRects:wh,getDimensions:Eh,getScale:Tt,isElement:Ne,isRTL:_h};function qs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ph(e,t){let n=null,r;const o=Be(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:f,top:c,width:p,height:g}=d;if(i||t(),!p||!g)return;const v=wn(c),m=wn(o.clientWidth-(f+p)),b=wn(o.clientHeight-(c+g)),w=wn(f),x={rootMargin:-v+"px "+-m+"px "+-b+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let k=!0;function P(E){const N=E[0].intersectionRatio;if(N!==l){if(!k)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!qs(d,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(P,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,x)}n.observe(e)}return s(!0),a}function Ih(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Lr(e),f=o||a?[...d?Wt(d):[],...t?Wt(t):[]]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const c=d&&i?Ph(d,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!l&&g.observe(d),t&&g.observe(t));let v,m=l?lt(e):null;l&&b();function b(){const w=lt(e);m&&!qs(m,w)&&n(),m=w,v=requestAnimationFrame(b)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const Mh=lh,Lh=ch,Oh=ah,zh=uh,Dh=sh,Gs=oh,Bh=dh,Fh=(e,t,n)=>{const r=new Map,o={platform:Ah,...n},a={...o.platform,_c:r};return rh(e,t,{...o,platform:a})};var $h=typeof document<"u",Hh=function(){},Nn=$h?C.useLayoutEffect:Hh;function Tn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Tn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Tn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ys(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ks(e,t){const n=Ys(e);return Math.round(t*n)/n}function zr(e){const t=h.useRef(e);return Nn(()=>{t.current=e}),t}function Vh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:d}=e,[f,c]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=h.useState(r);Tn(p,r)||g(r);const[v,m]=h.useState(null),[b,w]=h.useState(null),y=h.useCallback(q=>{q!==E.current&&(E.current=q,m(q))},[]),x=h.useCallback(q=>{q!==N.current&&(N.current=q,w(q))},[]),k=a||v,P=s||b,E=h.useRef(null),N=h.useRef(null),S=h.useRef(f),A=l!=null,z=zr(l),_=zr(o),M=zr(d),O=h.useCallback(()=>{if(!E.current||!N.current)return;const q={placement:t,strategy:n,middleware:p};_.current&&(q.platform=_.current),Fh(E.current,N.current,q).then(L=>{const T={...L,isPositioned:M.current!==!1};I.current&&!Tn(S.current,T)&&(S.current=T,Zt.flushSync(()=>{c(T)}))})},[p,t,n,_,M]);Nn(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,c(q=>({...q,isPositioned:!1})))},[d]);const I=h.useRef(!1);Nn(()=>(I.current=!0,()=>{I.current=!1}),[]),Nn(()=>{if(k&&(E.current=k),P&&(N.current=P),k&&P){if(z.current)return z.current(k,P,O);O()}},[k,P,O,z,A]);const j=h.useMemo(()=>({reference:E,floating:N,setReference:y,setFloating:x}),[y,x]),D=h.useMemo(()=>({reference:k,floating:P}),[k,P]),$=h.useMemo(()=>{const q={position:n,left:0,top:0};if(!D.floating)return q;const L=Ks(D.floating,f.x),T=Ks(D.floating,f.y);return i?{...q,transform:"translate("+L+"px, "+T+"px)",...Ys(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:T}},[n,i,D.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:O,refs:j,elements:D,floatingStyles:$}),[f,O,j,D,$])}const Uh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Gs({element:r.current,padding:o}).fn(n):{}:r?Gs({element:r,padding:o}).fn(n):{}}}},Rh=(e,t)=>{const n=Mh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wh=(e,t)=>{const n=Lh(e);return{name:n.name,fn:n.fn,options:[e,t]}},jh=(e,t)=>({fn:Bh(e).fn,options:[e,t]}),qh=(e,t)=>{const n=Oh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gh=(e,t)=>{const n=zh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yh=(e,t)=>{const n=Dh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kh=(e,t)=>{const n=Uh(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Xh="Arrow",Xs=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return u.jsx(J.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xs.displayName=Xh;var Zh=Xs,Dr="Popper",[Zs,_n]=me(Dr),[Jh,Js]=Zs(Dr),Qs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return u.jsx(Jh,{scope:t,anchor:r,onAnchorChange:o,children:n})};Qs.displayName=Dr;var ei="PopperAnchor",ti=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Js(ei,n),s=h.useRef(null),i=se(t,s),l=h.useRef(null);return h.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:u.jsx(J.div,{...o,ref:i})});ti.displayName=ei;var Br="PopperContent",[Qh,eg]=Zs(Br),ni=h.forwardRef((e,t)=>{var R,W,Z,ee,ae,ne;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:v,...m}=e,b=Js(Br,n),[w,y]=h.useState(null),x=se(t,ce=>y(ce)),[k,P]=h.useState(null),E=mn(k),N=(E==null?void 0:E.width)??0,S=(E==null?void 0:E.height)??0,A=r+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(d)?d:[d],M=_.length>0,O={padding:z,boundary:_.filter(ng),altBoundary:M},{refs:I,floatingStyles:j,placement:D,isPositioned:$,middlewareData:q}=Vh({strategy:"fixed",placement:A,whileElementsMounted:(...ce)=>Ih(...ce,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[Rh({mainAxis:o+S,alignmentAxis:s}),l&&Wh({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?jh():void 0,...O}),l&&qh({...O}),Gh({...O,apply:({elements:ce,rects:de,availableWidth:pt,availableHeight:tt})=>{const{width:Ae,height:jn}=de.reference,ve=ce.floating.style;ve.setProperty("--radix-popper-available-width",`${pt}px`),ve.setProperty("--radix-popper-available-height",`${tt}px`),ve.setProperty("--radix-popper-anchor-width",`${Ae}px`),ve.setProperty("--radix-popper-anchor-height",`${jn}px`)}}),k&&Kh({element:k,padding:i}),rg({arrowWidth:N,arrowHeight:S}),p&&Yh({strategy:"referenceHidden",...O})]}),[L,T]=ai(D),F=pe(v);ie(()=>{$&&(F==null||F())},[$,F]);const H=(R=q.arrow)==null?void 0:R.x,B=(W=q.arrow)==null?void 0:W.y,V=((Z=q.arrow)==null?void 0:Z.centerOffset)!==0,[U,X]=h.useState();return ie(()=>{w&&X(window.getComputedStyle(w).zIndex)},[w]),u.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:$?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(ee=q.transformOrigin)==null?void 0:ee.x,(ae=q.transformOrigin)==null?void 0:ae.y].join(" "),...((ne=q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Qh,{scope:n,placedSide:L,onArrowChange:P,arrowX:H,arrowY:B,shouldHideArrow:V,children:u.jsx(J.div,{"data-side":L,"data-align":T,...m,ref:x,style:{...m.style,animation:$?void 0:"none"}})})})});ni.displayName=Br;var ri="PopperArrow",tg={top:"bottom",right:"left",bottom:"top",left:"right"},oi=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=eg(ri,r),s=tg[a.placedSide];return u.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:u.jsx(Zh,{...o,ref:n,style:{...o.style,display:"block"}})})});oi.displayName=ri;function ng(e){return e!==null}var rg=e=>({name:"transformOrigin",options:e,fn(t){var b,w,y;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,f]=ai(n),c={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let v="",m="";return d==="bottom"?(v=s?c:`${p}px`,m=`${-l}px`):d==="top"?(v=s?c:`${p}px`,m=`${r.floating.height+l}px`):d==="right"?(v=`${-l}px`,m=s?c:`${g}px`):d==="left"&&(v=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:v,y:m}}}});function ai(e){const[t,n="center"]=e.split("-");return[t,n]}var si=Qs,ii=ti,li=ni,ci=oi,Fr="rovingFocusGroup.onEntryFocus",og={bubbles:!1,cancelable:!0},jt="RovingFocusGroup",[$r,di,ag]=za(jt),[sg,An]=me(jt,[ag]),[ig,lg]=sg(jt),ui=h.forwardRef((e,t)=>u.jsx($r.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx($r.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(cg,{...e,ref:t})})}));ui.displayName=jt;var cg=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...c}=e,p=h.useRef(null),g=se(t,p),v=Ut(a),[m,b]=Ve({prop:s,defaultProp:i??null,onChange:l,caller:jt}),[w,y]=h.useState(!1),x=pe(d),k=di(n),P=h.useRef(!1),[E,N]=h.useState(0);return h.useEffect(()=>{const S=p.current;if(S)return S.addEventListener(Fr,x),()=>S.removeEventListener(Fr,x)},[x]),u.jsx(ig,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:h.useCallback(S=>b(S),[b]),onItemShiftTab:h.useCallback(()=>y(!0),[]),onFocusableItemAdd:h.useCallback(()=>N(S=>S+1),[]),onFocusableItemRemove:h.useCallback(()=>N(S=>S-1),[]),children:u.jsx(J.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:Q(e.onMouseDown,()=>{P.current=!0}),onFocus:Q(e.onFocus,S=>{const A=!P.current;if(S.target===S.currentTarget&&A&&!w){const z=new CustomEvent(Fr,og);if(S.currentTarget.dispatchEvent(z),!z.defaultPrevented){const _=k().filter(D=>D.focusable),M=_.find(D=>D.active),O=_.find(D=>D.id===m),j=[M,O,..._].filter(Boolean).map(D=>D.ref.current);hi(j,f)}}P.current=!1}),onBlur:Q(e.onBlur,()=>y(!1))})})}),fi="RovingFocusGroupItem",pi=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=st(),d=a||l,f=lg(fi,n),c=f.currentTabStopId===d,p=di(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:m}=f;return h.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),u.jsx($r.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:u.jsx(J.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:Q(e.onMouseDown,b=>{r?f.onItemFocus(d):b.preventDefault()}),onFocus:Q(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Q(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=fg(b,f.orientation,f.dir);if(w!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=p().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const k=x.indexOf(b.currentTarget);x=f.loop?pg(x,k+1):x.slice(k+1)}setTimeout(()=>hi(x))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});pi.displayName=fi;var dg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ug(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fg(e,t,n){const r=ug(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return dg[r]}function hi(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gi=ui,mi=pi,hg="Label",vi=h.forwardRef((e,t)=>u.jsx(J.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vi.displayName=hg;var gg=vi;function Hr(e,[t,n]){return Math.min(n,Math.max(t,e))}var Vr="Progress",Ur=100,[mg]=me(Vr),[vg,bg]=mg(Vr),bi=h.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=wg,...s}=e;(o||o===0)&&!Ci(o)&&console.error(yg(`${o}`,"Progress"));const i=Ci(o)?o:Ur;r!==null&&!ki(r,i)&&console.error(xg(`${r}`,"Progress"));const l=ki(r,i)?r:null,d=Pn(l)?a(l,i):void 0;return u.jsx(vg,{scope:n,value:l,max:i,children:u.jsx(J.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Pn(l)?l:void 0,"aria-valuetext":d,role:"progressbar","data-state":xi(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});bi.displayName=Vr;var wi="ProgressIndicator",yi=h.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=bg(wi,n);return u.jsx(J.div,{"data-state":xi(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});yi.displayName=wi;function wg(e,t){return`${Math.round(e/t*100)}%`}function xi(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pn(e){return typeof e=="number"}function Ci(e){return Pn(e)&&!isNaN(e)&&e>0}function ki(e,t){return Pn(e)&&!isNaN(e)&&e<=t&&e>=0}function yg(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ur}\`.`}function xg(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
286
291
  - a positive number
287
- - less than the value passed to \`max\` (or ${Dn} if no \`max\` prop is set)
292
+ - less than the value passed to \`max\` (or ${Ur} if no \`max\` prop is set)
288
293
  - \`null\` or \`undefined\` if the progress is indeterminate.
289
294
 
290
- Defaulting to \`null\`.`}var dh=Vs,uh=Us,$n="Radio",[fh,qs]=me($n),[ph,hh]=fh($n),Ys=p.forwardRef((e,t)=>{const{__scopeRadio:o,name:n,checked:r=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...f}=e,[c,h]=p.useState(null),g=se(t,v=>h(v)),b=p.useRef(!1),m=c?u||!!c.closest("form"):!0;return d.jsxs(ph,{scope:o,checked:r,disabled:s,children:[d.jsx(K.button,{type:"button",role:"radio","aria-checked":r,"data-state":Js(r),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:J(e.onClick,v=>{r||l==null||l(),m&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),m&&d.jsx(Zs,{control:c,bubbles:!b.current,name:n,value:i,checked:r,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Ys.displayName=$n;var Xs="RadioIndicator",Ks=p.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:n,...r}=e,a=hh(Xs,o);return d.jsx(Ee,{present:n||a.checked,children:d.jsx(K.span,{"data-state":Js(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});Ks.displayName=Xs;var gh="RadioBubbleInput",Zs=p.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:n=!0,...r},a)=>{const s=p.useRef(null),i=se(s,a),l=lo(o),u=co(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&g){const b=new Event("click",{bubbles:n});g.call(f,o),f.dispatchEvent(b)}},[l,o,n]),d.jsx(K.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Zs.displayName=gh;function Js(e){return e?"checked":"unchecked"}var mh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Eo="RadioGroup",[vh]=me(Eo,[So,qs]),Qs=So(),ei=qs(),[bh,wh]=vh(Eo),ti=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:n,defaultValue:r,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:f=!0,onValueChange:c,...h}=e,g=Qs(o),b=$t(u),[m,v]=He({prop:a,defaultProp:r??null,onChange:c,caller:Eo});return d.jsx(bh,{scope:o,name:n,required:s,disabled:i,value:m,onValueChange:v,children:d.jsx(Fs,{asChild:!0,...g,orientation:l,dir:b,loop:f,children:d.jsx(K.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});ti.displayName=Eo;var oi="RadioGroupItem",ni=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:n,...r}=e,a=wh(oi,o),s=a.disabled||n,i=Qs(o),l=ei(o),u=p.useRef(null),f=se(t,u),c=a.value===r.value,h=p.useRef(!1);return p.useEffect(()=>{const g=m=>{mh.includes(m.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",b)}},[]),d.jsx(Bs,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Ys,{disabled:s,required:a.required,checked:c,...l,...r,name:a.name,ref:f,onCheck:()=>a.onValueChange(r.value),onKeyDown:J(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:J(r.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});ni.displayName=oi;var yh="RadioGroupIndicator",ri=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...n}=e,r=ei(o);return d.jsx(Ks,{...r,...n,ref:t})});ri.displayName=yh;var xh=ti,kh=ni,Sh=ri;function Ch(e,t){return p.useReducer((o,n)=>t[o][n]??o,e)}var Fn="ScrollArea",[ai]=me(Fn),[Eh,Se]=ai(Fn),si=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:n="hover",dir:r,scrollHideDelay:a=600,...s}=e,[i,l]=p.useState(null),[u,f]=p.useState(null),[c,h]=p.useState(null),[g,b]=p.useState(null),[m,v]=p.useState(null),[w,y]=p.useState(0),[k,C]=p.useState(0),[_,P]=p.useState(!1),[T,E]=p.useState(!1),z=se(t,O=>l(O)),j=$t(r);return d.jsx(Eh,{scope:o,type:n,dir:j,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:c,onContentChange:h,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:_,onScrollbarXEnabledChange:P,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:T,onScrollbarYEnabledChange:E,onCornerWidthChange:y,onCornerHeightChange:C,children:d.jsx(K.div,{dir:j,...s,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});si.displayName=Fn;var ii="ScrollAreaViewport",li=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:n,nonce:r,...a}=e,s=Se(ii,o),i=p.useRef(null),l=se(t,i,s.onViewportChange);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(K.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});li.displayName=ii;var Fe="ScrollAreaScrollbar",ci=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=r,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),r.type==="hover"?d.jsx(Nh,{...n,ref:t,forceMount:o}):r.type==="scroll"?d.jsx(Th,{...n,ref:t,forceMount:o}):r.type==="auto"?d.jsx(di,{...n,ref:t,forceMount:o}):r.type==="always"?d.jsx(Bn,{...n,ref:t}):null});ci.displayName=Fe;var Nh=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{const i=r.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),r.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[r.scrollArea,r.scrollHideDelay]),d.jsx(Ee,{present:o||a,children:d.jsx(di,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Th=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Po(()=>l("SCROLL_END"),100),[i,l]=Ch("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,r.scrollHideDelay,l]),p.useEffect(()=>{const u=r.viewport,f=a?"scrollLeft":"scrollTop";if(u){let c=u[f];const h=()=>{const g=u[f];c!==g&&(l("SCROLL"),s()),c=g};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[r.viewport,a,l,s]),d.jsx(Ee,{present:o||i!=="hidden",children:d.jsx(Bn,{"data-state":i==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:J(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:J(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),di=p.forwardRef((e,t)=>{const o=Se(Fe,e.__scopeScrollArea),{forceMount:n,...r}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",l=Po(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return Ct(o.viewport,l),Ct(o.content,l),d.jsx(Ee,{present:n||a,children:d.jsx(Bn,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Bn=p.forwardRef((e,t)=>{const{orientation:o="vertical",...n}=e,r=Se(Fe,e.__scopeScrollArea),a=p.useRef(null),s=p.useRef(0),[i,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=gi(i.viewport,i.content),f={...n,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function c(h,g){return Oh(h,s.current,i,g)}return o==="horizontal"?d.jsx(_h,{...f,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const h=r.viewport.scrollLeft,g=mi(h,i,r.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=c(h,r.dir))}}):o==="vertical"?d.jsx(Ph,{...f,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const h=r.viewport.scrollTop,g=mi(h,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=c(h))}}):null}),_h=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:n,...r}=e,a=Se(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=se(t,l,a.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(fi,{"data-orientation":"horizontal",...r,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_o(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),bi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:To(s.paddingLeft),paddingEnd:To(s.paddingRight)}})}})}),Ph=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:n,...r}=e,a=Se(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=se(t,l,a.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(fi,{"data-orientation":"vertical",...r,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_o(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),bi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:To(s.paddingTop),paddingEnd:To(s.paddingBottom)}})}})}),[Ah,ui]=ai(Fe),fi=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:n,hasThumb:r,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:c,...h}=e,g=Se(Fe,o),[b,m]=p.useState(null),v=se(t,z=>m(z)),w=p.useRef(null),y=p.useRef(""),k=g.viewport,C=n.content-n.viewport,_=pe(f),P=pe(l),T=Po(c,10);function E(z){if(w.current){const j=z.clientX-w.current.left,O=z.clientY-w.current.top;u({x:j,y:O})}}return p.useEffect(()=>{const z=j=>{const O=j.target;(b==null?void 0:b.contains(O))&&_(j,C)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[k,b,C,_]),p.useEffect(P,[n,P]),Ct(b,T),Ct(g.content,T),d.jsx(Ah,{scope:o,scrollbar:b,hasThumb:r,onThumbChange:pe(a),onThumbPointerUp:pe(s),onThumbPositionChange:P,onThumbPointerDown:pe(i),children:d.jsx(K.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:J(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),w.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),E(z))}),onPointerMove:J(e.onPointerMove,E),onPointerUp:J(e.onPointerUp,z=>{const j=z.target;j.hasPointerCapture(z.pointerId)&&j.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),No="ScrollAreaThumb",pi=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=ui(No,e.__scopeScrollArea);return d.jsx(Ee,{present:o||r.hasThumb,children:d.jsx(Ih,{ref:t,...n})})}),Ih=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:n,...r}=e,a=Se(No,o),s=ui(No,o),{onThumbPositionChange:i}=s,l=se(t,c=>s.onThumbChange(c)),u=p.useRef(void 0),f=Po(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(f(),!u.current){const g=Lh(c,i);u.current=g,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,f,i]),d.jsx(K.div,{"data-state":s.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:J(e.onPointerDownCapture,c=>{const g=c.target.getBoundingClientRect(),b=c.clientX-g.left,m=c.clientY-g.top;s.onThumbPointerDown({x:b,y:m})}),onPointerUp:J(e.onPointerUp,s.onThumbPointerUp)})});pi.displayName=No;var Hn="ScrollAreaCorner",hi=p.forwardRef((e,t)=>{const o=Se(Hn,e.__scopeScrollArea),n=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&n?d.jsx(Mh,{...e,ref:t}):null});hi.displayName=Hn;var Mh=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,...n}=e,r=Se(Hn,o),[a,s]=p.useState(0),[i,l]=p.useState(0),u=!!(a&&i);return Ct(r.scrollbarX,()=>{var c;const f=((c=r.scrollbarX)==null?void 0:c.offsetHeight)||0;r.onCornerHeightChange(f),l(f)}),Ct(r.scrollbarY,()=>{var c;const f=((c=r.scrollbarY)==null?void 0:c.offsetWidth)||0;r.onCornerWidthChange(f),s(f)}),u?d.jsx(K.div,{...n,ref:t,style:{width:a,height:i,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function To(e){return e?parseInt(e,10):0}function gi(e,t){const o=e/t;return isNaN(o)?0:o}function _o(e){const t=gi(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-o)*t;return Math.max(n,18)}function Oh(e,t,o,n="ltr"){const r=_o(o),a=r/2,s=t||a,i=r-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,c=n==="ltr"?[0,f]:[f*-1,0];return vi([l,u],c)(e)}function mi(e,t,o="ltr"){const n=_o(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-r,s=t.content-t.viewport,i=a-n,l=o==="ltr"?[0,s]:[s*-1,0],u=Ln(e,l);return vi([0,s],[0,i])(u)}function vi(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function bi(e,t){return e>0&&e<t}var Lh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},n=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,n=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(n)};function Po(e,t){const o=pe(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(o,t)},[o,t])}function Ct(e,t){const o=pe(t);ie(()=>{let n=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(o)});return r.observe(e),()=>{window.cancelAnimationFrame(n),r.unobserve(e)}}},[e,o])}var zh=si,Dh=li,$h=hi,Fh=[" ","Enter","ArrowUp","ArrowDown"],Bh=[" ","Enter"],it="Select",[Ao,Io,Hh]=ra(it),[Et]=me(it,[Hh,ko]),Mo=ko(),[Vh,Ze]=Et(it),[Wh,Uh]=Et(it),wi=e=>{const{__scopeSelect:t,children:o,open:n,defaultOpen:r,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:h,required:g,form:b}=e,m=Mo(t),[v,w]=p.useState(null),[y,k]=p.useState(null),[C,_]=p.useState(!1),P=$t(u),[T,E]=He({prop:n,defaultProp:r??!1,onChange:a,caller:it}),[z,j]=He({prop:s,defaultProp:i,onChange:l,caller:it}),O=p.useRef(null),B=v?b||!!v.closest("form"):!0,[V,L]=p.useState(new Set),Y=Array.from(V).map(I=>I.props.value).join(";");return d.jsx(Ps,{...m,children:d.jsxs(Vh,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:k,valueNodeHasChildren:C,onValueNodeHasChildrenChange:_,contentId:rt(),value:z,onValueChange:j,open:T,onOpenChange:E,dir:P,triggerPointerDownPosRef:O,disabled:h,children:[d.jsx(Ao.Provider,{scope:t,children:d.jsx(Wh,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(I=>{L(D=>new Set(D).add(I))},[]),onNativeOptionRemove:p.useCallback(I=>{L(D=>{const R=new Set(D);return R.delete(I),R})},[]),children:o})}),B?d.jsxs(Vi,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:z,onChange:I=>j(I.target.value),disabled:h,form:b,children:[z===void 0?d.jsx("option",{value:""}):null,Array.from(V)]},Y):null]})})};wi.displayName=it;var yi="SelectTrigger",xi=p.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:n=!1,...r}=e,a=Mo(o),s=Ze(yi,o),i=s.disabled||n,l=se(t,s.onTriggerChange),u=Io(o),f=p.useRef("touch"),[c,h,g]=Ui(m=>{const v=u().filter(k=>!k.disabled),w=v.find(k=>k.value===s.value),y=ji(v,m,w);y!==void 0&&s.onValueChange(y.value)}),b=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(As,{asChild:!0,...a,children:d.jsx(K.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Wi(s.value)?"":void 0,...r,ref:l,onClick:J(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&b(m)}),onPointerDown:J(r.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:J(r.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Fh.includes(m.key)&&(b(),m.preventDefault())})})})});xi.displayName=yi;var ki="SelectValue",Si=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:a,placeholder:s="",...i}=e,l=Ze(ki,o),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,c=se(t,l.onValueNodeChange);return ie(()=>{u(f)},[u,f]),d.jsx(K.span,{...i,ref:c,style:{pointerEvents:"none"},children:Wi(l.value)?d.jsx(d.Fragment,{children:s}):a})});Si.displayName=ki;var jh="SelectIcon",Ci=p.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return d.jsx(K.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})});Ci.displayName=jh;var Rh="SelectPortal",Ei=e=>d.jsx(sn,{asChild:!0,...e});Ei.displayName=Rh;var lt="SelectContent",Ni=p.forwardRef((e,t)=>{const o=Ze(lt,e.__scopeSelect),[n,r]=p.useState();if(ie(()=>{r(new DocumentFragment)},[]),!o.open){const a=n;return a?Rt.createPortal(d.jsx(Ti,{scope:e.__scopeSelect,children:d.jsx(Ao.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(_i,{...e,ref:t})});Ni.displayName=lt;var _e=10,[Ti,Je]=Et(lt),Gh="SelectContentImpl",qh=Dt("SelectContent.RemoveScroll"),_i=p.forwardRef((e,t)=>{const{__scopeSelect:o,position:n="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v,...w}=e,y=Ze(lt,o),[k,C]=p.useState(null),[_,P]=p.useState(null),T=se(t,G=>C(G)),[E,z]=p.useState(null),[j,O]=p.useState(null),B=Io(o),[V,L]=p.useState(!1),Y=p.useRef(!1);p.useEffect(()=>{if(k)return bf(k)},[k]),Iu();const I=p.useCallback(G=>{const[q,...Q]=B().map(oe=>oe.ref.current),[ee]=Q.slice(-1),re=document.activeElement;for(const oe of G)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===q&&_&&(_.scrollTop=0),oe===ee&&_&&(_.scrollTop=_.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[B,_]),D=p.useCallback(()=>I([E,k]),[I,E,k]);p.useEffect(()=>{V&&D()},[V,D]);const{onOpenChange:R,triggerPointerDownPosRef:N}=y;p.useEffect(()=>{if(k){let G={x:0,y:0};const q=ee=>{var re,oe;G={x:Math.abs(Math.round(ee.pageX)-(((re=N.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((oe=N.current)==null?void 0:oe.y)??0))}},Q=ee=>{G.x<=10&&G.y<=10?ee.preventDefault():k.contains(ee.target)||R(!1),document.removeEventListener("pointermove",q),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Q,{capture:!0})}}},[k,R,N]),p.useEffect(()=>{const G=()=>R(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[R]);const[S,M]=Ui(G=>{const q=B().filter(re=>!re.disabled),Q=q.find(re=>re.ref.current===document.activeElement),ee=ji(q,G,Q);ee&&setTimeout(()=>ee.ref.current.focus())}),F=p.useCallback((G,q,Q)=>{const ee=!Y.current&&!Q;(y.value!==void 0&&y.value===q||ee)&&(z(G),ee&&(Y.current=!0))},[y.value]),A=p.useCallback(()=>k==null?void 0:k.focus(),[k]),$=p.useCallback((G,q,Q)=>{const ee=!Y.current&&!Q;(y.value!==void 0&&y.value===q||ee)&&O(G)},[y.value]),H=n==="popper"?Vn:Pi,Z=H===Vn?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Ti,{scope:o,content:k,viewport:_,onViewportChange:P,itemRefCallback:F,selectedItem:E,onItemLeave:A,itemTextRefCallback:$,focusSelectedItem:D,selectedItemText:j,position:n,isPositioned:V,searchRef:S,children:d.jsx(Ma,{as:qh,allowPinchZoom:!0,children:d.jsx(ha,{asChild:!0,trapped:y.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:J(r,G=>{var q;(q=y.trigger)==null||q.focus({preventScroll:!0}),G.preventDefault()}),children:d.jsx(nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(H,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:G=>G.preventDefault(),...w,...Z,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:J(w.onKeyDown,G=>{const q=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!q&&G.key.length===1&&M(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let ee=B().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(G.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const re=G.target,oe=ee.indexOf(re);ee=ee.slice(oe+1)}setTimeout(()=>I(ee)),G.preventDefault()}})})})})})})});_i.displayName=Gh;var Yh="SelectItemAlignedPosition",Pi=p.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:n,...r}=e,a=Ze(lt,o),s=Je(lt,o),[i,l]=p.useState(null),[u,f]=p.useState(null),c=se(t,T=>f(T)),h=Io(o),g=p.useRef(!1),b=p.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=s,k=p.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&m&&v&&w){const T=a.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),z=a.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(a.dir!=="rtl"){const re=j.left-E.left,oe=z.left-re,ce=T.left-oe,de=T.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ln(oe,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.left=Pe+"px"}else{const re=E.right-j.right,oe=window.innerWidth-z.right-re,ce=window.innerWidth-T.right-oe,de=T.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ln(oe,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.right=Pe+"px"}const O=h(),B=window.innerHeight-_e*2,V=m.scrollHeight,L=window.getComputedStyle(u),Y=parseInt(L.borderTopWidth,10),I=parseInt(L.paddingTop,10),D=parseInt(L.borderBottomWidth,10),R=parseInt(L.paddingBottom,10),N=Y+I+V+R+D,S=Math.min(v.offsetHeight*5,N),M=window.getComputedStyle(m),F=parseInt(M.paddingTop,10),A=parseInt(M.paddingBottom,10),$=T.top+T.height/2-_e,H=B-$,Z=v.offsetHeight/2,G=v.offsetTop+Z,q=Y+I+G,Q=N-q;if(q<=$){const re=O.length>0&&v===O[O.length-1].ref.current;i.style.bottom="0px";const oe=u.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(H,Z+(re?A:0)+oe+D),de=q+ce;i.style.height=de+"px"}else{const re=O.length>0&&v===O[0].ref.current;i.style.top="0px";const ce=Math.max($,Y+m.offsetTop+(re?F:0)+Z)+Q;i.style.height=ce+"px",m.scrollTop=q-$+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=S+"px",i.style.maxHeight=B+"px",n==null||n(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,w,a.dir,n]);ie(()=>k(),[k]);const[C,_]=p.useState();ie(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const P=p.useCallback(T=>{T&&b.current===!0&&(k(),y==null||y(),b.current=!1)},[k,y]);return d.jsx(Kh,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:P,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx(K.div,{...r,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Pi.displayName=Yh;var Xh="SelectPopperPosition",Vn=p.forwardRef((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=_e,...a}=e,s=Mo(o);return d.jsx(Is,{...s,...a,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vn.displayName=Xh;var[Kh,Wn]=Et(lt,{}),Un="SelectViewport",Ai=p.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:n,...r}=e,a=Je(Un,o),s=Wn(Un,o),i=se(t,a.onViewportChange),l=p.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Ao.Slot,{scope:o,children:d.jsx(K.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:J(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const g=Math.abs(l.current-f.scrollTop);if(g>0){const b=window.innerHeight-_e*2,m=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(m,v);if(w<b){const y=w+g,k=Math.min(b,y),C=y-k;c.style.height=k+"px",c.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Ai.displayName=Un;var Ii="SelectGroup",[Zh,Jh]=Et(Ii),Qh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=rt();return d.jsx(Zh,{scope:o,id:r,children:d.jsx(K.div,{role:"group","aria-labelledby":r,...n,ref:t})})});Qh.displayName=Ii;var Mi="SelectLabel",eg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Jh(Mi,o);return d.jsx(K.div,{id:r.id,...n,ref:t})});eg.displayName=Mi;var Oo="SelectItem",[tg,Oi]=Et(Oo),Li=p.forwardRef((e,t)=>{const{__scopeSelect:o,value:n,disabled:r=!1,textValue:a,...s}=e,i=Ze(Oo,o),l=Je(Oo,o),u=i.value===n,[f,c]=p.useState(a??""),[h,g]=p.useState(!1),b=se(t,y=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,y,n,r)}),m=rt(),v=p.useRef("touch"),w=()=>{r||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(tg,{scope:o,value:n,disabled:r,textId:m,isSelected:u,onItemTextChange:p.useCallback(y=>{c(k=>k||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(Ao.ItemSlot,{scope:o,value:n,disabled:r,textValue:f,children:d.jsx(K.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:b,onFocus:J(s.onFocus,()=>g(!0)),onBlur:J(s.onBlur,()=>g(!1)),onClick:J(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:J(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:J(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:J(s.onPointerMove,y=>{var k;v.current=y.pointerType,r?(k=l.onItemLeave)==null||k.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(s.onPointerLeave,y=>{var k;y.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:J(s.onKeyDown,y=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&y.key===" "||(Bh.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Li.displayName=Oo;var Vt="SelectItemText",zi=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,...a}=e,s=Ze(Vt,o),i=Je(Vt,o),l=Oi(Vt,o),u=Uh(Vt,o),[f,c]=p.useState(null),h=se(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),g=f==null?void 0:f.textContent,b=p.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return ie(()=>(m(b),()=>v(b)),[m,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(K.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rt.createPortal(a.children,s.valueNode):null]})});zi.displayName=Vt;var Di="SelectItemIndicator",$i=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return Oi(Di,o).isSelected?d.jsx(K.span,{"aria-hidden":!0,...n,ref:t}):null});$i.displayName=Di;var jn="SelectScrollUpButton",Fi=p.forwardRef((e,t)=>{const o=Je(jn,e.__scopeSelect),n=Wn(jn,e.__scopeSelect),[r,a]=p.useState(!1),s=se(t,n.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),r?d.jsx(Hi,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Fi.displayName=jn;var Rn="SelectScrollDownButton",Bi=p.forwardRef((e,t)=>{const o=Je(Rn,e.__scopeSelect),n=Wn(Rn,e.__scopeSelect),[r,a]=p.useState(!1),s=se(t,n.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;a(f)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),r?d.jsx(Hi,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Bi.displayName=Rn;var Hi=p.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:n,...r}=e,a=Je("SelectScrollButton",o),s=p.useRef(null),i=Io(o),l=p.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),ie(()=>{var f;const u=i().find(c=>c.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),d.jsx(K.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:J(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:J(r.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:J(r.onPointerLeave,()=>{l()})})}),og="SelectSeparator",ng=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return d.jsx(K.div,{"aria-hidden":!0,...n,ref:t})});ng.displayName=og;var Gn="SelectArrow",rg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Mo(o),a=Ze(Gn,o),s=Je(Gn,o);return a.open&&s.position==="popper"?d.jsx(Ms,{...r,...n,ref:t}):null});rg.displayName=Gn;var ag="SelectBubbleInput",Vi=p.forwardRef(({__scopeSelect:e,value:t,...o},n)=>{const r=p.useRef(null),a=se(n,r),s=lo(t);return p.useEffect(()=>{const i=r.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const c=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(K.select,{...o,style:{...oa,...o.style},ref:a,defaultValue:t})});Vi.displayName=ag;function Wi(e){return e===""||e===void 0}function Ui(e){const t=pe(e),o=p.useRef(""),n=p.useRef(0),r=p.useCallback(s=>{const i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=p.useCallback(()=>{o.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[o,r,a]}function ji(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=sg(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==o));const l=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==o?l:void 0}function sg(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var ig=wi,lg=xi,cg=Si,dg=Ci,ug=Ei,fg=Ni,pg=Ai,hg=Li,gg=zi,mg=$i,vg=Fi,bg=Bi,wg="Separator",Ri="horizontal",yg=["horizontal","vertical"],Gi=p.forwardRef((e,t)=>{const{decorative:o,orientation:n=Ri,...r}=e,a=xg(n)?n:Ri,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(K.div,{"data-orientation":a,...i,...r,ref:t})});Gi.displayName=wg;function xg(e){return yg.includes(e)}var kg=Gi,Lo="Switch",[Sg]=me(Lo),[Cg,Eg]=Sg(Lo),qi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,name:n,checked:r,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:f,...c}=e,[h,g]=p.useState(null),b=se(t,k=>g(k)),m=p.useRef(!1),v=h?f||!!h.closest("form"):!0,[w,y]=He({prop:r,defaultProp:a??!1,onChange:u,caller:Lo});return d.jsxs(Cg,{scope:o,checked:w,disabled:i,children:[d.jsx(K.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Zi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:J(e.onClick,k=>{y(C=>!C),v&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})}),v&&d.jsx(Ki,{control:h,bubbles:!m.current,name:n,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});qi.displayName=Lo;var Yi="SwitchThumb",Xi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,...n}=e,r=Eg(Yi,o);return d.jsx(K.span,{"data-state":Zi(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t})});Xi.displayName=Yi;var Ng="SwitchBubbleInput",Ki=p.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:n=!0,...r},a)=>{const s=p.useRef(null),i=se(s,a),l=lo(o),u=co(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&g){const b=new Event("click",{bubbles:n});g.call(f,o),f.dispatchEvent(b)}},[l,o,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ki.displayName=Ng;function Zi(e){return e?"checked":"unchecked"}var Tg=qi,_g=Xi,zo="Tabs",[Pg]=me(zo,[So]),Ji=So(),[Ag,qn]=Pg(zo),Qi=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,onValueChange:r,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,f=$t(i),[c,h]=He({prop:n,onChange:r,defaultProp:a??"",caller:zo});return d.jsx(Ag,{scope:o,baseId:rt(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:l,children:d.jsx(K.div,{dir:f,"data-orientation":s,...u,ref:t})})});Qi.displayName=zo;var el="TabsList",tl=p.forwardRef((e,t)=>{const{__scopeTabs:o,loop:n=!0,...r}=e,a=qn(el,o),s=Ji(o);return d.jsx(Fs,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:d.jsx(K.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});tl.displayName=el;var ol="TabsTrigger",nl=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,disabled:r=!1,...a}=e,s=qn(ol,o),i=Ji(o),l=sl(s.baseId,n),u=il(s.baseId,n),f=n===s.value;return d.jsx(Bs,{asChild:!0,...i,focusable:!r,active:f,children:d.jsx(K.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:J(e.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?s.onValueChange(n):c.preventDefault()}),onKeyDown:J(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(n)}),onFocus:J(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!r&&c&&s.onValueChange(n)})})})});nl.displayName=ol;var rl="TabsContent",al=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,forceMount:r,children:a,...s}=e,i=qn(rl,o),l=sl(i.baseId,n),u=il(i.baseId,n),f=n===i.value,c=p.useRef(f);return p.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:r||f,children:({present:h})=>d.jsx(K.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});al.displayName=rl;function sl(e,t){return`${e}-trigger-${t}`}function il(e,t){return`${e}-content-${t}`}var Ig=Qi,Mg=tl,Og=nl,Lg=al,[Do]=me("Tooltip",[ko]),$o=ko(),ll="TooltipProvider",zg=700,Yn="tooltip.open",[Dg,Xn]=Do(ll),cl=e=>{const{__scopeTooltip:t,delayDuration:o=zg,skipDelayDuration:n=300,disableHoverableContent:r=!1,children:a}=e,s=p.useRef(!0),i=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Dg,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(u=>{i.current=u},[]),disableHoverableContent:r,children:a})};cl.displayName=ll;var Wt="Tooltip",[$g,Ut]=Do(Wt),dl=e=>{const{__scopeTooltip:t,children:o,open:n,defaultOpen:r,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Xn(Wt,e.__scopeTooltip),u=$o(t),[f,c]=p.useState(null),h=rt(),g=p.useRef(0),b=s??l.disableHoverableContent,m=i??l.delayDuration,v=p.useRef(!1),[w,y]=He({prop:n,defaultProp:r??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):l.onClose(),a==null||a(T)},caller:Wt}),k=p.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),C=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),_=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),P=p.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},m)},[m,y]);return p.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),d.jsx(Ps,{...u,children:d.jsx($g,{scope:t,contentId:h,open:w,stateAttribute:k,trigger:f,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?P():C()},[l.isOpenDelayedRef,P,C]),onTriggerLeave:p.useCallback(()=>{b?_():(window.clearTimeout(g.current),g.current=0)},[_,b]),onOpen:C,onClose:_,disableHoverableContent:b,children:o})})};dl.displayName=Wt;var Kn="TooltipTrigger",ul=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=Ut(Kn,o),a=Xn(Kn,o),s=$o(o),i=p.useRef(null),l=se(t,i,r.onTriggerChange),u=p.useRef(!1),f=p.useRef(!1),c=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(As,{asChild:!0,...s,children:d.jsx(K.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:l,onPointerMove:J(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:J(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:J(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:J(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:J(e.onBlur,r.onClose),onClick:J(e.onClick,r.onClose)})})});ul.displayName=Kn;var Zn="TooltipPortal",[Fg,Bg]=Do(Zn,{forceMount:void 0}),fl=e=>{const{__scopeTooltip:t,forceMount:o,children:n,container:r}=e,a=Ut(Zn,t);return d.jsx(Fg,{scope:t,forceMount:o,children:d.jsx(Ee,{present:o||a.open,children:d.jsx(sn,{asChild:!0,container:r,children:n})})})};fl.displayName=Zn;var Nt="TooltipContent",pl=p.forwardRef((e,t)=>{const o=Bg(Nt,e.__scopeTooltip),{forceMount:n=o.forceMount,side:r="top",...a}=e,s=Ut(Nt,e.__scopeTooltip);return d.jsx(Ee,{present:n||s.open,children:s.disableHoverableContent?d.jsx(hl,{side:r,...a,ref:t}):d.jsx(Hg,{side:r,...a,ref:t})})}),Hg=p.forwardRef((e,t)=>{const o=Ut(Nt,e.__scopeTooltip),n=Xn(Nt,e.__scopeTooltip),r=p.useRef(null),a=se(t,r),[s,i]=p.useState(null),{trigger:l,onClose:u}=o,f=r.current,{onPointerInTransitChange:c}=n,h=p.useCallback(()=>{i(null),c(!1)},[c]),g=p.useCallback((b,m)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=jg(w,v.getBoundingClientRect()),k=Rg(w,y),C=Gg(m.getBoundingClientRect()),_=Yg([...k,...C]);i(_),c(!0)},[c]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&f){const b=v=>g(v,f),m=v=>g(v,l);return l.addEventListener("pointerleave",b),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",m)}}},[l,f,g,h]),p.useEffect(()=>{if(s){const b=m=>{const v=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),k=!qg(w,s);y?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,u,h]),d.jsx(hl,{...e,ref:a})}),[Vg,Wg]=Do(Wt,{isInside:!1}),Ug=qd("TooltipContent"),hl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,children:n,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ut(Nt,o),u=$o(o),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(Yn,f),()=>document.removeEventListener(Yn,f)),[f]),p.useEffect(()=>{if(l.trigger){const c=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),d.jsx(nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:d.jsxs(Is,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Ug,{children:n}),d.jsx(Vg,{scope:o,isInside:!0,children:d.jsx(eu,{id:l.contentId,role:"tooltip",children:r||n})})]})})});pl.displayName=Nt;var gl="TooltipArrow",ml=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=$o(o);return Wg(gl,o).isInside?null:d.jsx(Ms,{...r,...n,ref:t})});ml.displayName=gl;function jg(e,t){const o=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,n,r,a)){case a:return"left";case r:return"right";case o:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Rg(e,t,o=5){const n=[];switch(t){case"top":n.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":n.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":n.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":n.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return n}function Gg(e){const{top:t,right:o,bottom:n,left:r}=e;return[{x:r,y:t},{x:o,y:t},{x:o,y:n},{x:r,y:n}]}function qg(e,t){const{x:o,y:n}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,f=i.y,c=l.x,h=l.y;f>n!=h>n&&o<(c-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function Yg(e){const t=e.slice();return t.sort((o,n)=>o.x<n.x?-1:o.x>n.x?1:o.y<n.y?-1:o.y>n.y?1:0),Xg(t)}function Xg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const o=[];for(let n=e.length-1;n>=0;n--){const r=e[n];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))o.pop();else break}o.push(r)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Kg=cl,Zg=dl,Jg=ul,Qg=fl,em=pl,tm=ml;const om=Jt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function vl({className:e,variant:t="default",size:o="default",asChild:n=!1,...r}){const a=n?ea:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":o,className:X(om({variant:t,size:o,className:e})),...r})}const nm={amber:"bg-amber-100 text-amber-800",blue:"bg-blue-100 text-blue-800",emerald:"bg-emerald-100 text-emerald-800",red:"bg-red-100 text-red-800",purple:"bg-purple-100 text-purple-800",pink:"bg-pink-100 text-pink-800",gray:"bg-gray-100 text-gray-800"},rm=Jt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function am({className:e,variant:t="default",hue:o,asChild:n=!1,...r}){const a=n?ea:"span",s=o?nm[o]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:X(rm({variant:t}),s,e),...r})}function sm({className:e,type:t,...o}){return d.jsx("input",{type:t,"data-slot":"input",className:X("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...o})}function im({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:X("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function lm({...e}){return d.jsx(ig,{"data-slot":"select",...e})}function cm({...e}){return d.jsx(cg,{"data-slot":"select-value",...e})}function dm({className:e,size:t="default",children:o,...n}){return d.jsxs(lg,{"data-slot":"select-trigger","data-size":t,className:X("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...n,children:[o,d.jsx(dg,{asChild:!0,children:d.jsx(xr,{className:"size-4 opacity-50"})})]})}function um({className:e,children:t,position:o="item-aligned",align:n="center",...r}){return d.jsx(ug,{children:d.jsxs(fg,{"data-slot":"select-content",className:X("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,align:n,...r,children:[d.jsx(pm,{}),d.jsx(pg,{className:X("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(hm,{})]})})}function fm({className:e,children:t,...o}){return d.jsxs(hg,{"data-slot":"select-item",className:X("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(mg,{children:d.jsx(yr,{className:"size-4"})})}),d.jsx(gg,{children:t})]})}function pm({className:e,...t}){return d.jsx(vg,{"data-slot":"select-scroll-up-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Bc,{className:"size-4"})})}function hm({className:e,...t}){return d.jsx(bg,{"data-slot":"select-scroll-down-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(xr,{className:"size-4"})})}function gm({className:e,...t}){return d.jsx(Ra,{"data-slot":"checkbox",className:X("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:d.jsx(qa,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(yr,{className:"size-3.5"})})})}function mm({className:e,size:t="default",...o}){return d.jsx(Tg,{"data-slot":"switch","data-size":t,className:X("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...o,children:d.jsx(_g,{"data-slot":"switch-thumb",className:X("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function vm({className:e,...t}){return d.jsx(nh,{"data-slot":"label",className:X("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function bm({className:e,...t}){return d.jsx(xh,{"data-slot":"radio-group",className:X("grid gap-3",e),...t})}function wm({className:e,...t}){return d.jsx(kh,{"data-slot":"radio-group-item",className:X("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:d.jsx(Sh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Vc,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function ym({className:e,orientation:t="horizontal",decorative:o=!0,...n}){return d.jsx(kg,{"data-slot":"separator",decorative:o,orientation:t,className:X("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}function xm({className:e,orientation:t="horizontal",...o}){return d.jsx(Ig,{"data-slot":"tabs","data-orientation":t,orientation:t,className:X("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...o})}const km=Jt("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Sm({className:e,variant:t="default",...o}){return d.jsx(Mg,{"data-slot":"tabs-list","data-variant":t,className:X(km({variant:t}),e),...o})}function Cm({className:e,...t}){return d.jsx(Og,{"data-slot":"tabs-trigger",className:X("cursor-pointer relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function Em({className:e,...t}){return d.jsx(Lg,{"data-slot":"tabs-content",className:X("flex-1 outline-none",e),...t})}function Nm({className:e,children:t,...o}){return d.jsxs(zh,{"data-slot":"scroll-area",className:X("relative",e),...o,children:[d.jsx(Dh,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),d.jsx(Tm,{}),d.jsx($h,{})]})}function Tm({className:e,orientation:t="vertical",...o}){return d.jsx(ci,{"data-slot":"scroll-area-scrollbar",orientation:t,className:X("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...o,children:d.jsx(pi,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Jn({className:e,size:t="default",...o}){return d.jsx(Tf,{"data-slot":"avatar","data-size":t,className:X("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...o})}function Qn({className:e,...t}){return d.jsx(_f,{"data-slot":"avatar-image",className:X("aspect-square size-full",e),...t})}function er({className:e,...t}){return d.jsx(Pf,{"data-slot":"avatar-fallback",className:X("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function _m({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:X("animate-pulse rounded-md bg-accent",e),...t})}function Pm({delayDuration:e=0,...t}){return d.jsx(Kg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Am({...e}){return d.jsx(Zg,{"data-slot":"tooltip",...e})}function Im({...e}){return d.jsx(Jg,{"data-slot":"tooltip-trigger",...e})}function Mm({className:e,sideOffset:t=0,children:o,...n}){return d.jsx(Qg,{children:d.jsxs(em,{"data-slot":"tooltip-content",sideOffset:t,className:X("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...n,children:[o,d.jsx(tm,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function Om({className:e,value:t,...o}){return d.jsx(dh,{"data-slot":"progress",className:X("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o,children:d.jsx(uh,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Lm=Jt("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function zm({className:e,variant:t,...o}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:X(Lm({variant:t}),e),...o})}function Dm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:X("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function $m({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:X("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Fm({...e}){return d.jsx(pu,{"data-slot":"collapsible",...e})}function Bm({...e}){return d.jsx(ia,{"data-slot":"collapsible-trigger",...e})}function Hm({...e}){return d.jsx(la,{"data-slot":"collapsible-content",...e})}const Tt=e=>e==null?void 0:e===!0||e==="true",bl={"arrow-left":Lc,calendar:$c,"check-circle-2":Sr,"chevron-left":Fc,"chevron-right":Ro,clock:Wc,"credit-card":jc,"external-link":Rc,"help-circle":Cr,info:Yt,"loader-2":Go,mail:qo,"map-pin":qc,"message-circle":Er,"message-square":Yo,package:Xc,phone:Kc,search:Jc,"shopping-bag":Qc,sparkles:Nr,truck:td,user:Tr,"x-circle":Hc,"alert-circle":kr,"book-open":zc},wl={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},yl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},xl=e=>typeof e=="number"?wl[String(e)]??"gap-2":typeof e=="string"?wl[e.trim()]??"gap-2":"gap-2",Vm=({children:e,className:t,onClick:o})=>d.jsx(Lt,{className:t,onClick:o,children:e}),Wm=({children:e,className:t})=>d.jsx(zt,{className:t,children:e}),Um=({children:e,className:t})=>d.jsx(Rd,{className:t,children:e}),jm=({children:e,className:t,onClick:o,variant:n,size:r,disabled:a,title:s})=>d.jsx(vl,{className:t,variant:n,size:r,onClick:o,disabled:Tt(a),title:s,children:e}),Rm=({children:e,className:t,variant:o,hue:n,tone:r})=>d.jsx(am,{className:X(yl[r]??"",t),variant:o,hue:n,children:e}),Gm=({className:e,onChange:t,...o})=>d.jsx(sm,{className:e,onChange:t,...o}),qm=({className:e,onChange:t,...o})=>d.jsx(im,{className:e,onChange:t,...o}),Ym=({children:e,className:t,value:o,defaultValue:n,onChange:r,placeholder:a,disabled:s})=>d.jsxs(lm,{value:o,defaultValue:n,onValueChange:i=>{const l=r;l==null||l({target:{value:i}})},disabled:Tt(s),children:[d.jsx(dm,{className:t,children:d.jsx(cm,{placeholder:a})}),d.jsx(um,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Xm=({children:e,value:t,disabled:o,className:n})=>d.jsx(fm,{value:t,disabled:Tt(o),className:n,children:e}),Km=({checked:e,onChange:t,disabled:o,className:n,id:r})=>{const a=e!==void 0,s=t;return d.jsx(gm,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Tt(o),className:n,id:r})},Zm=({checked:e,onChange:t,disabled:o,size:n,className:r,id:a})=>{const s=e!==void 0,i=t;return d.jsx(mm,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Tt(o),size:n,className:r,id:a})},Jm=({children:e,htmlFor:t,className:o})=>d.jsx(vm,{htmlFor:t,className:o,children:e}),Qm=({children:e,value:t,defaultValue:o,onChange:n,className:r})=>d.jsx(bm,{value:t,defaultValue:o,onValueChange:a=>{const s=n;s==null||s({target:{value:a}})},className:r,children:e}),ev=({value:e,disabled:t,className:o,id:n})=>d.jsx(wm,{value:e,disabled:Tt(t),className:o,id:n}),tv=({className:e})=>d.jsx(ym,{className:e}),ov=({children:e,defaultValue:t,className:o})=>{const[n,r]=x.useState(t);return d.jsx(xm,{value:n,onValueChange:r,className:o,children:e})},nv=({children:e,className:t})=>d.jsx(Sm,{className:t,children:e}),rv=({children:e,value:t,className:o})=>d.jsx(Cm,{className:o,value:t,children:e}),av=({children:e,value:t,className:o})=>d.jsx(Em,{className:o,value:t,children:e}),sv=({children:e,className:t})=>d.jsx(Nm,{className:t,children:e}),iv=({src:e,alt:t,className:o})=>{var n;return d.jsxs(Jn,{className:o,children:[d.jsx(Qn,{src:e,alt:t}),d.jsx(er,{children:((n=t==null?void 0:t.charAt(0))==null?void 0:n.toUpperCase())||"?"})]})},lv=({width:e,height:t,className:o})=>d.jsx(_m,{className:o,style:{width:e,height:t}}),cv=({children:e,content:t,className:o})=>d.jsx(Pm,{children:d.jsxs(Am,{children:[d.jsx(Im,{asChild:!0,children:d.jsx("span",{className:o,children:e})}),d.jsx(Mm,{children:d.jsx("p",{children:String(t)})})]})}),dv=({value:e,className:t})=>d.jsx(Om,{value:typeof e=="string"?Number(e):e,className:t}),uv={default:Yt,destructive:kr},fv=({children:e,variant:t,title:o,className:n})=>{const r=t,a=uv[r||"default"]||Yt;return d.jsxs(zm,{variant:r,className:n,children:[d.jsx(a,{className:"size-4"}),o?d.jsx(Dm,{children:String(o)}):null,e?d.jsx($m,{children:e}):null]})},pv=({children:e,defaultOpen:t,className:o})=>d.jsx(Fm,{defaultOpen:t==="true"||t===!0,className:o,children:e}),hv=({children:e,className:t})=>d.jsxs(Bm,{className:X("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Ro,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),gv=({children:e,className:t})=>d.jsx(Hm,{className:t,children:e}),mv=({children:e,className:t,tone:o})=>d.jsx("p",{className:X("text-sm",yl[o]??"",t),children:e}),vv=({children:e,className:t,level:o})=>{const n=`h${o||"2"}`;return d.jsx(n,{className:X("font-semibold tracking-tight",t),children:e})},bv=({children:e,className:t,direction:o,gap:n})=>{const r=o==="row"?"flex-row":"flex-col",a=xl(n);return d.jsx("div",{className:X("flex",r,a,t),children:e})},wv=({children:e,className:t,gap:o})=>{const n=xl(o);return d.jsx("div",{className:X("flex flex-row items-center",n,t),children:e})},yv=({children:e,className:t,href:o,target:n,rel:r})=>d.jsx("a",{href:o,target:n,rel:r,className:t,children:e}),xv=({title:e,children:t,className:o})=>d.jsxs(Lt,{className:X("overflow-hidden p-0 gap-0 shadow-sm",o),children:[e?d.jsx(zt,{className:"px-6 py-3",children:d.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,d.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),kv=({icon:e,label:t,description:o,onClick:n,className:r})=>{const a=e,s="size-5",i=a?bl[a]:null;return d.jsxs("button",{type:"button",className:X("w-full h-auto px-6 py-6 flex items-center gap-2 justify-start cursor-pointer text-left rounded-none transition-colors hover:bg-accent/70",r),onClick:n,children:[i&&d.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),d.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?d.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,o?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(o)}):null]}),d.jsx(Ro,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},Sv=({name:e,size:t,className:o})=>{const r={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=bl[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:X(r,i,o)}):d.jsx("span",{className:X("inline-block",r,i,o),"data-icon":a})},Cv=()=>({"ui-card":Vm,"ui-card-content":Wm,"ui-card-header":Um,"ui-button":jm,"ui-text":mv,"ui-heading":vv,"ui-badge":Rm,"ui-input":Gm,"ui-textarea":qm,"ui-select":Ym,"ui-select-option":Xm,"ui-checkbox":Km,"ui-switch":Zm,"ui-label":Jm,"ui-radio-group":Qm,"ui-radio-group-item":ev,"ui-stack":bv,"ui-inline":wv,"ui-separator":tv,"ui-tabs":ov,"ui-tabs-list":nv,"ui-tabs-trigger":rv,"ui-tabs-content":av,"ui-scroll-area":sv,"ui-avatar":iv,"ui-icon":Sv,"ui-link":yv,"ui-menu-item":kv,"ui-menu":xv,"ui-skeleton":lv,"ui-tooltip":cv,"ui-progress":dv,"ui-alert":fv,"ui-collapsible":pv,"ui-collapsible-trigger":hv,"ui-collapsible-content":gv}),kl="/api/ecommerce",Sl=async(e,t)=>{const o=t?`${t.replace(/\/$/,"")}${kl}`:kl,n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw new Error(r.error||"API request failed");return r.data},Ev=({className:e})=>d.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",fill:"rgb(232,218,234)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",fill:"rgb(252,248,161)"})})]}),Cl="stackable-dev-badge-styles",Nv=()=>{if(typeof document>"u"||document.getElementById(Cl))return;const e=document.createElement("style");e.id=Cl,e.textContent=`
295
+ Defaulting to \`null\`.`}var Cg=bi,kg=yi,Rr="Radio",[Sg,Si]=me(Rr),[Eg,Ng]=Sg(Rr),Ei=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:d,...f}=e,[c,p]=h.useState(null),g=se(t,b=>p(b)),v=h.useRef(!1),m=c?d||!!c.closest("form"):!0;return u.jsxs(Eg,{scope:n,checked:o,disabled:s,children:[u.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ai(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:Q(e.onClick,b=>{o||l==null||l(),m&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),m&&u.jsx(_i,{control:c,bubbles:!v.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Ei.displayName=Rr;var Ni="RadioIndicator",Ti=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=Ng(Ni,n);return u.jsx(Ee,{present:r||a.checked,children:u.jsx(J.span,{"data-state":Ai(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Ti.displayName=Ni;var Tg="RadioBubbleInput",_i=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=se(s,a),l=gn(n),d=mn(t);return h.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&g){const v=new Event("click",{bubbles:r});g.call(f,n),f.dispatchEvent(v)}},[l,n,r]),u.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_i.displayName=Tg;function Ai(e){return e?"checked":"unchecked"}var _g=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],In="RadioGroup",[Ag]=me(In,[An,Si]),Pi=An(),Ii=Si(),[Pg,Ig]=Ag(In),Mi=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:d,loop:f=!0,onValueChange:c,...p}=e,g=Pi(n),v=Ut(d),[m,b]=Ve({prop:a,defaultProp:o??null,onChange:c,caller:In});return u.jsx(Pg,{scope:n,name:r,required:s,disabled:i,value:m,onValueChange:b,children:u.jsx(gi,{asChild:!0,...g,orientation:l,dir:v,loop:f,children:u.jsx(J.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:v,...p,ref:t})})})});Mi.displayName=In;var Li="RadioGroupItem",Oi=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=Ig(Li,n),s=a.disabled||r,i=Pi(n),l=Ii(n),d=h.useRef(null),f=se(t,d),c=a.value===o.value,p=h.useRef(!1);return h.useEffect(()=>{const g=m=>{_g.includes(m.key)&&(p.current=!0)},v=()=>p.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",v)}},[]),u.jsx(mi,{asChild:!0,...i,focusable:!s,active:c,children:u.jsx(Ei,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:Q(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Q(o.onFocus,()=>{var g;p.current&&((g=d.current)==null||g.click())})})})});Oi.displayName=Li;var Mg="RadioGroupIndicator",zi=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Ii(n);return u.jsx(Ti,{...o,...r,ref:t})});zi.displayName=Mg;var Lg=Mi,Og=Oi,zg=zi;function Dg(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Wr="ScrollArea",[Di]=me(Wr),[Bg,ke]=Di(Wr),Bi=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[i,l]=h.useState(null),[d,f]=h.useState(null),[c,p]=h.useState(null),[g,v]=h.useState(null),[m,b]=h.useState(null),[w,y]=h.useState(0),[x,k]=h.useState(0),[P,E]=h.useState(!1),[N,S]=h.useState(!1),A=se(t,_=>l(_)),z=Ut(o);return u.jsx(Bg,{scope:n,type:r,dir:z,scrollHideDelay:a,scrollArea:i,viewport:d,onViewportChange:f,content:c,onContentChange:p,scrollbarX:g,onScrollbarXChange:v,scrollbarXEnabled:P,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:k,children:u.jsx(J.div,{dir:z,...s,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Bi.displayName=Wr;var Fi="ScrollAreaViewport",$i=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=ke(Fi,n),i=h.useRef(null),l=se(t,i,s.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),u.jsx(J.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});$i.displayName=Fi;var Fe="ScrollAreaScrollbar",Hi=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,i=e.orientation==="horizontal";return h.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),o.type==="hover"?u.jsx(Fg,{...r,ref:t,forceMount:n}):o.type==="scroll"?u.jsx($g,{...r,ref:t,forceMount:n}):o.type==="auto"?u.jsx(Vi,{...r,ref:t,forceMount:n}):o.type==="always"?u.jsx(jr,{...r,ref:t}):null});Hi.displayName=Fe;var Fg=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{const i=o.scrollArea;let l=0;if(i){const d=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",d),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",d),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),u.jsx(Ee,{present:n||a,children:u.jsx(Vi,{"data-state":a?"visible":"hidden",...r,ref:t})})}),$g=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=zn(()=>l("SCROLL_END"),100),[i,l]=Dg("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(i==="idle"){const d=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[i,o.scrollHideDelay,l]),h.useEffect(()=>{const d=o.viewport,f=a?"scrollLeft":"scrollTop";if(d){let c=d[f];const p=()=>{const g=d[f];c!==g&&(l("SCROLL"),s()),c=g};return d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,a,l,s]),u.jsx(Ee,{present:n||i!=="hidden",children:u.jsx(jr,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Q(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Q(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Vi=h.forwardRef((e,t)=>{const n=ke(Fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=h.useState(!1),i=e.orientation==="horizontal",l=zn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(i?d:f)}},10);return _t(n.viewport,l),_t(n.content,l),u.jsx(Ee,{present:r||a,children:u.jsx(jr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),jr=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=ke(Fe,e.__scopeScrollArea),a=h.useRef(null),s=h.useRef(0),[i,l]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=qi(i.viewport,i.content),f={...r,sizes:i,onSizesChange:l,hasThumb:d>0&&d<1,onThumbChange:p=>a.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function c(p,g){return jg(p,s.current,i,g)}return n==="horizontal"?u.jsx(Hg,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const p=o.viewport.scrollLeft,g=Gi(p,i,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=c(p,o.dir))}}):n==="vertical"?u.jsx(Vg,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const p=o.viewport.scrollTop,g=Gi(p,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=c(p))}}):null}),Hg=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=ke(Fe,e.__scopeScrollArea),[s,i]=h.useState(),l=h.useRef(null),d=se(t,l,a.onScrollbarXChange);return h.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(Ri,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":On(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(a.viewport){const p=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Ki(p,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ln(s.paddingLeft),paddingEnd:Ln(s.paddingRight)}})}})}),Vg=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=ke(Fe,e.__scopeScrollArea),[s,i]=h.useState(),l=h.useRef(null),d=se(t,l,a.onScrollbarYChange);return h.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(Ri,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":On(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(a.viewport){const p=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Ki(p,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ln(s.paddingTop),paddingEnd:Ln(s.paddingBottom)}})}})}),[Ug,Ui]=Di(Fe),Ri=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:f,onResize:c,...p}=e,g=ke(Fe,n),[v,m]=h.useState(null),b=se(t,A=>m(A)),w=h.useRef(null),y=h.useRef(""),x=g.viewport,k=r.content-r.viewport,P=pe(f),E=pe(l),N=zn(c,10);function S(A){if(w.current){const z=A.clientX-w.current.left,_=A.clientY-w.current.top;d({x:z,y:_})}}return h.useEffect(()=>{const A=z=>{const _=z.target;(v==null?void 0:v.contains(_))&&P(z,k)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[x,v,k,P]),h.useEffect(E,[r,E]),_t(v,N),_t(g.content,N),u.jsx(Ug,{scope:n,scrollbar:v,hasThumb:o,onThumbChange:pe(a),onThumbPointerUp:pe(s),onThumbPositionChange:E,onThumbPointerDown:pe(i),children:u.jsx(J.div,{...p,ref:b,style:{position:"absolute",...p.style},onPointerDown:Q(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),w.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),S(A))}),onPointerMove:Q(e.onPointerMove,S),onPointerUp:Q(e.onPointerUp,A=>{const z=A.target;z.hasPointerCapture(A.pointerId)&&z.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),Mn="ScrollAreaThumb",Wi=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ui(Mn,e.__scopeScrollArea);return u.jsx(Ee,{present:n||o.hasThumb,children:u.jsx(Rg,{ref:t,...r})})}),Rg=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=ke(Mn,n),s=Ui(Mn,n),{onThumbPositionChange:i}=s,l=se(t,c=>s.onThumbChange(c)),d=h.useRef(void 0),f=zn(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{const c=a.viewport;if(c){const p=()=>{if(f(),!d.current){const g=qg(c,i);d.current=g,i()}};return i(),c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[a.viewport,f,i]),u.jsx(J.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Q(e.onPointerDownCapture,c=>{const g=c.target.getBoundingClientRect(),v=c.clientX-g.left,m=c.clientY-g.top;s.onThumbPointerDown({x:v,y:m})}),onPointerUp:Q(e.onPointerUp,s.onThumbPointerUp)})});Wi.displayName=Mn;var qr="ScrollAreaCorner",ji=h.forwardRef((e,t)=>{const n=ke(qr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?u.jsx(Wg,{...e,ref:t}):null});ji.displayName=qr;var Wg=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=ke(qr,n),[a,s]=h.useState(0),[i,l]=h.useState(0),d=!!(a&&i);return _t(o.scrollbarX,()=>{var c;const f=((c=o.scrollbarX)==null?void 0:c.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),_t(o.scrollbarY,()=>{var c;const f=((c=o.scrollbarY)==null?void 0:c.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),d?u.jsx(J.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ln(e){return e?parseInt(e,10):0}function qi(e,t){const n=e/t;return isNaN(n)?0:n}function On(e){const t=qi(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function jg(e,t,n,r="ltr"){const o=On(n),a=o/2,s=t||a,i=o-s,l=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-i,f=n.content-n.viewport,c=r==="ltr"?[0,f]:[f*-1,0];return Yi([l,d],c)(e)}function Gi(e,t,n="ltr"){const r=On(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,l=n==="ltr"?[0,s]:[s*-1,0],d=Hr(e,l);return Yi([0,s],[0,i])(d)}function Yi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Ki(e,t){return e>0&&e<t}var qg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function zn(e,t){const n=pe(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function _t(e,t){const n=pe(t);ie(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Gg=Bi,Yg=$i,Kg=ji,Xg=[" ","Enter","ArrowUp","ArrowDown"],Zg=[" ","Enter"],ct="Select",[Dn,Bn,Jg]=za(ct),[At]=me(ct,[Jg,_n]),Fn=_n(),[Qg,Je]=At(ct),[em,tm]=At(ct),Xi=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:f,autoComplete:c,disabled:p,required:g,form:v}=e,m=Fn(t),[b,w]=h.useState(null),[y,x]=h.useState(null),[k,P]=h.useState(!1),E=Ut(d),[N,S]=Ve({prop:r,defaultProp:o??!1,onChange:a,caller:ct}),[A,z]=Ve({prop:s,defaultProp:i,onChange:l,caller:ct}),_=h.useRef(null),M=b?v||!!b.closest("form"):!0,[O,I]=h.useState(new Set),j=Array.from(O).map(D=>D.props.value).join(";");return u.jsx(si,{...m,children:u.jsxs(Qg,{required:g,scope:t,trigger:b,onTriggerChange:w,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:P,contentId:st(),value:A,onValueChange:z,open:N,onOpenChange:S,dir:E,triggerPointerDownPosRef:_,disabled:p,children:[u.jsx(Dn.Provider,{scope:t,children:u.jsx(em,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(D=>{I($=>new Set($).add(D))},[]),onNativeOptionRemove:h.useCallback(D=>{I($=>{const q=new Set($);return q.delete(D),q})},[]),children:n})}),M?u.jsxs(bl,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:A,onChange:D=>z(D.target.value),disabled:p,form:v,children:[A===void 0?u.jsx("option",{value:""}):null,Array.from(O)]},j):null]})})};Xi.displayName=ct;var Zi="SelectTrigger",Ji=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Fn(n),s=Je(Zi,n),i=s.disabled||r,l=se(t,s.onTriggerChange),d=Bn(n),f=h.useRef("touch"),[c,p,g]=yl(m=>{const b=d().filter(x=>!x.disabled),w=b.find(x=>x.value===s.value),y=xl(b,m,w);y!==void 0&&s.onValueChange(y.value)}),v=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return u.jsx(ii,{asChild:!0,...a,children:u.jsx(J.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":wl(s.value)?"":void 0,...o,ref:l,onClick:Q(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&v(m)}),onPointerDown:Q(o.onPointerDown,m=>{f.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:Q(o.onKeyDown,m=>{const b=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(b&&m.key===" ")&&Xg.includes(m.key)&&(v(),m.preventDefault())})})})});Ji.displayName=Zi;var Qi="SelectValue",el=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Je(Qi,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,c=se(t,l.onValueNodeChange);return ie(()=>{d(f)},[d,f]),u.jsx(J.span,{...i,ref:c,style:{pointerEvents:"none"},children:wl(l.value)?u.jsx(u.Fragment,{children:s}):a})});el.displayName=Qi;var nm="SelectIcon",tl=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return u.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});tl.displayName=nm;var rm="SelectPortal",nl=e=>u.jsx(pr,{asChild:!0,...e});nl.displayName=rm;var dt="SelectContent",rl=h.forwardRef((e,t)=>{const n=Je(dt,e.__scopeSelect),[r,o]=h.useState();if(ie(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Zt.createPortal(u.jsx(ol,{scope:e.__scopeSelect,children:u.jsx(Dn.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),a):null}return u.jsx(al,{...e,ref:t})});rl.displayName=dt;var _e=10,[ol,Qe]=At(dt),om="SelectContentImpl",am=Vt("SelectContent.RemoveScroll"),al=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:c,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:b,...w}=e,y=Je(dt,n),[x,k]=h.useState(null),[P,E]=h.useState(null),N=se(t,R=>k(R)),[S,A]=h.useState(null),[z,_]=h.useState(null),M=Bn(n),[O,I]=h.useState(!1),j=h.useRef(!1);h.useEffect(()=>{if(x)return Ap(x)},[x]),Rf();const D=h.useCallback(R=>{const[W,...Z]=M().map(ne=>ne.ref.current),[ee]=Z.slice(-1),ae=document.activeElement;for(const ne of R)if(ne===ae||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===W&&P&&(P.scrollTop=0),ne===ee&&P&&(P.scrollTop=P.scrollHeight),ne==null||ne.focus(),document.activeElement!==ae))return},[M,P]),$=h.useCallback(()=>D([S,x]),[D,S,x]);h.useEffect(()=>{O&&$()},[O,$]);const{onOpenChange:q,triggerPointerDownPosRef:L}=y;h.useEffect(()=>{if(x){let R={x:0,y:0};const W=ee=>{var ae,ne;R={x:Math.abs(Math.round(ee.pageX)-(((ae=L.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((ne=L.current)==null?void 0:ne.y)??0))}},Z=ee=>{R.x<=10&&R.y<=10?ee.preventDefault():x.contains(ee.target)||q(!1),document.removeEventListener("pointermove",W),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",Z,{capture:!0})}}},[x,q,L]),h.useEffect(()=>{const R=()=>q(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[q]);const[T,F]=yl(R=>{const W=M().filter(ae=>!ae.disabled),Z=W.find(ae=>ae.ref.current===document.activeElement),ee=xl(W,R,Z);ee&&setTimeout(()=>ee.ref.current.focus())}),H=h.useCallback((R,W,Z)=>{const ee=!j.current&&!Z;(y.value!==void 0&&y.value===W||ee)&&(A(R),ee&&(j.current=!0))},[y.value]),B=h.useCallback(()=>x==null?void 0:x.focus(),[x]),V=h.useCallback((R,W,Z)=>{const ee=!j.current&&!Z;(y.value!==void 0&&y.value===W||ee)&&_(R)},[y.value]),U=r==="popper"?Gr:sl,X=U===Gr?{side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:c,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:b}:{};return u.jsx(ol,{scope:n,content:x,viewport:P,onViewportChange:E,itemRefCallback:H,selectedItem:S,onItemLeave:B,itemTextRefCallback:V,focusSelectedItem:$,selectedItemText:z,position:r,isPositioned:O,searchRef:T,children:u.jsx(cs,{as:am,allowPinchZoom:!0,children:u.jsx(ja,{asChild:!0,trapped:y.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:Q(o,R=>{var W;(W=y.trigger)==null||W.focus({preventScroll:!0}),R.preventDefault()}),children:u.jsx(dr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:u.jsx(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:R=>R.preventDefault(),...w,...X,onPlaced:()=>I(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Q(w.onKeyDown,R=>{const W=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!W&&R.key.length===1&&F(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let ee=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(R.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const ae=R.target,ne=ee.indexOf(ae);ee=ee.slice(ne+1)}setTimeout(()=>D(ee)),R.preventDefault()}})})})})})})});al.displayName=om;var sm="SelectItemAlignedPosition",sl=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Je(dt,n),s=Qe(dt,n),[i,l]=h.useState(null),[d,f]=h.useState(null),c=se(t,N=>f(N)),p=Bn(n),g=h.useRef(!1),v=h.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=s,x=h.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&m&&b&&w){const N=a.trigger.getBoundingClientRect(),S=d.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),z=w.getBoundingClientRect();if(a.dir!=="rtl"){const ae=z.left-S.left,ne=A.left-ae,ce=N.left-ne,de=N.width+ce,pt=Math.max(de,S.width),tt=window.innerWidth-_e,Ae=Hr(ne,[_e,Math.max(_e,tt-pt)]);i.style.minWidth=de+"px",i.style.left=Ae+"px"}else{const ae=S.right-z.right,ne=window.innerWidth-A.right-ae,ce=window.innerWidth-N.right-ne,de=N.width+ce,pt=Math.max(de,S.width),tt=window.innerWidth-_e,Ae=Hr(ne,[_e,Math.max(_e,tt-pt)]);i.style.minWidth=de+"px",i.style.right=Ae+"px"}const _=p(),M=window.innerHeight-_e*2,O=m.scrollHeight,I=window.getComputedStyle(d),j=parseInt(I.borderTopWidth,10),D=parseInt(I.paddingTop,10),$=parseInt(I.borderBottomWidth,10),q=parseInt(I.paddingBottom,10),L=j+D+O+q+$,T=Math.min(b.offsetHeight*5,L),F=window.getComputedStyle(m),H=parseInt(F.paddingTop,10),B=parseInt(F.paddingBottom,10),V=N.top+N.height/2-_e,U=M-V,X=b.offsetHeight/2,R=b.offsetTop+X,W=j+D+R,Z=L-W;if(W<=V){const ae=_.length>0&&b===_[_.length-1].ref.current;i.style.bottom="0px";const ne=d.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(U,X+(ae?B:0)+ne+$),de=W+ce;i.style.height=de+"px"}else{const ae=_.length>0&&b===_[0].ref.current;i.style.top="0px";const ce=Math.max(V,j+m.offsetTop+(ae?H:0)+X)+Z;i.style.height=ce+"px",m.scrollTop=W-V+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=T+"px",i.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,a.trigger,a.valueNode,i,d,m,b,w,a.dir,r]);ie(()=>x(),[x]);const[k,P]=h.useState();ie(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const E=h.useCallback(N=>{N&&v.current===!0&&(x(),y==null||y(),v.current=!1)},[x,y]);return u.jsx(lm,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:u.jsx(J.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});sl.displayName=sm;var im="SelectPopperPosition",Gr=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_e,...a}=e,s=Fn(n);return u.jsx(li,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Gr.displayName=im;var[lm,Yr]=At(dt,{}),Kr="SelectViewport",il=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Qe(Kr,n),s=Yr(Kr,n),i=se(t,a.onViewportChange),l=h.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),u.jsx(Dn.Slot,{scope:n,children:u.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Q(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&c){const g=Math.abs(l.current-f.scrollTop);if(g>0){const v=window.innerHeight-_e*2,m=parseFloat(c.style.minHeight),b=parseFloat(c.style.height),w=Math.max(m,b);if(w<v){const y=w+g,x=Math.min(v,y),k=y-x;c.style.height=x+"px",c.style.bottom==="0px"&&(f.scrollTop=k>0?k:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});il.displayName=Kr;var ll="SelectGroup",[cm,dm]=At(ll),um=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=st();return u.jsx(cm,{scope:n,id:o,children:u.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});um.displayName=ll;var cl="SelectLabel",fm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dm(cl,n);return u.jsx(J.div,{id:o.id,...r,ref:t})});fm.displayName=cl;var $n="SelectItem",[pm,dl]=At($n),ul=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Je($n,n),l=Qe($n,n),d=i.value===r,[f,c]=h.useState(a??""),[p,g]=h.useState(!1),v=se(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,o)}),m=st(),b=h.useRef("touch"),w=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(pm,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:h.useCallback(y=>{c(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:u.jsx(Dn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:u.jsx(J.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:Q(s.onFocus,()=>g(!0)),onBlur:Q(s.onBlur,()=>g(!1)),onClick:Q(s.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Q(s.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Q(s.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Q(s.onPointerMove,y=>{var x;b.current=y.pointerType,o?(x=l.onItemLeave)==null||x.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Q(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:Q(s.onKeyDown,y=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&y.key===" "||(Zg.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});ul.displayName=$n;var qt="SelectItemText",fl=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Je(qt,n),i=Qe(qt,n),l=dl(qt,n),d=tm(qt,n),[f,c]=h.useState(null),p=se(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),g=f==null?void 0:f.textContent,v=h.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=d;return ie(()=>(m(v),()=>b(v)),[m,b,v]),u.jsxs(u.Fragment,{children:[u.jsx(J.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Zt.createPortal(a.children,s.valueNode):null]})});fl.displayName=qt;var pl="SelectItemIndicator",hl=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return dl(pl,n).isSelected?u.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});hl.displayName=pl;var Xr="SelectScrollUpButton",gl=h.forwardRef((e,t)=>{const n=Qe(Xr,e.__scopeSelect),r=Yr(Xr,e.__scopeSelect),[o,a]=h.useState(!1),s=se(t,r.onScrollButtonChange);return ie(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(vl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});gl.displayName=Xr;var Zr="SelectScrollDownButton",ml=h.forwardRef((e,t)=>{const n=Qe(Zr,e.__scopeSelect),r=Yr(Zr,e.__scopeSelect),[o,a]=h.useState(!1),s=se(t,r.onScrollButtonChange);return ie(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<d;a(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(vl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ml.displayName=Zr;var vl=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Qe("SelectScrollButton",n),s=h.useRef(null),i=Bn(n),l=h.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),ie(()=>{var f;const d=i().find(c=>c.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),u.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Q(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Q(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Q(o.onPointerLeave,()=>{l()})})}),hm="SelectSeparator",gm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});gm.displayName=hm;var Jr="SelectArrow",mm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Fn(n),a=Je(Jr,n),s=Qe(Jr,n);return a.open&&s.position==="popper"?u.jsx(ci,{...o,...r,ref:t}):null});mm.displayName=Jr;var vm="SelectBubbleInput",bl=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=h.useRef(null),a=se(r,o),s=gn(t);return h.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const c=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(c)}},[s,t]),u.jsx(J.select,{...n,style:{...La,...n.style},ref:a,defaultValue:t})});bl.displayName=vm;function wl(e){return e===""||e===void 0}function yl(e){const t=pe(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(s=>{const i=n.current+s;t(i),(function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function xl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=bm(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function bm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wm=Xi,ym=Ji,xm=el,Cm=tl,km=nl,Sm=rl,Em=il,Nm=ul,Tm=fl,_m=hl,Am=gl,Pm=ml,Im="Separator",Cl="horizontal",Mm=["horizontal","vertical"],kl=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=Cl,...o}=e,a=Lm(r)?r:Cl,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(J.div,{"data-orientation":a,...i,...o,ref:t})});kl.displayName=Im;function Lm(e){return Mm.includes(e)}var Om=kl,Hn="Switch",[zm]=me(Hn),[Dm,Bm]=zm(Hn),Sl=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:d,form:f,...c}=e,[p,g]=h.useState(null),v=se(t,x=>g(x)),m=h.useRef(!1),b=p?f||!!p.closest("form"):!0,[w,y]=Ve({prop:o,defaultProp:a??!1,onChange:d,caller:Hn});return u.jsxs(Dm,{scope:n,checked:w,disabled:i,children:[u.jsx(J.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":_l(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:v,onClick:Q(e.onClick,x=>{y(k=>!k),b&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),b&&u.jsx(Tl,{control:p,bubbles:!m.current,name:r,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Sl.displayName=Hn;var El="SwitchThumb",Nl=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Bm(El,n);return u.jsx(J.span,{"data-state":_l(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Nl.displayName=El;var Fm="SwitchBubbleInput",Tl=h.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=se(s,a),l=gn(n),d=mn(t);return h.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&g){const v=new Event("click",{bubbles:r});g.call(f,n),f.dispatchEvent(v)}},[l,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tl.displayName=Fm;function _l(e){return e?"checked":"unchecked"}var $m=Sl,Hm=Nl,Vn="Tabs",[Vm]=me(Vn,[An]),Al=An(),[Um,Qr]=Vm(Vn),Pl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,f=Ut(i),[c,p]=Ve({prop:r,onChange:o,defaultProp:a??"",caller:Vn});return u.jsx(Um,{scope:n,baseId:st(),value:c,onValueChange:p,orientation:s,dir:f,activationMode:l,children:u.jsx(J.div,{dir:f,"data-orientation":s,...d,ref:t})})});Pl.displayName=Vn;var Il="TabsList",Ml=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Qr(Il,n),s=Al(n);return u.jsx(gi,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:u.jsx(J.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Ml.displayName=Il;var Ll="TabsTrigger",Ol=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Qr(Ll,n),i=Al(n),l=Bl(s.baseId,r),d=Fl(s.baseId,r),f=r===s.value;return u.jsx(mi,{asChild:!0,...i,focusable:!o,active:f,children:u.jsx(J.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Q(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Q(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Q(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!o&&c&&s.onValueChange(r)})})})});Ol.displayName=Ll;var zl="TabsContent",Dl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Qr(zl,n),l=Bl(i.baseId,r),d=Fl(i.baseId,r),f=r===i.value,c=h.useRef(f);return h.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),u.jsx(Ee,{present:o||f,children:({present:p})=>u.jsx(J.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:p&&a})})});Dl.displayName=zl;function Bl(e,t){return`${e}-trigger-${t}`}function Fl(e,t){return`${e}-content-${t}`}var Rm=Pl,Wm=Ml,jm=Ol,qm=Dl,[Un]=me("Tooltip",[_n]),Rn=_n(),$l="TooltipProvider",Gm=700,eo="tooltip.open",[Ym,to]=Un($l),Hl=e=>{const{__scopeTooltip:t,delayDuration:n=Gm,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=h.useRef(!0),i=h.useRef(!1),l=h.useRef(0);return h.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.jsx(Ym,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:h.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Hl.displayName=$l;var Gt="Tooltip",[Km,Yt]=Un(Gt),Vl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=to(Gt,e.__scopeTooltip),d=Rn(t),[f,c]=h.useState(null),p=st(),g=h.useRef(0),v=s??l.disableHoverableContent,m=i??l.delayDuration,b=h.useRef(!1),[w,y]=Ve({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(eo))):l.onClose(),a==null||a(N)},caller:Gt}),x=h.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),k=h.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,y(!0)},[y]),P=h.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),E=h.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,y(!0),g.current=0},m)},[m,y]);return h.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),u.jsx(si,{...d,children:u.jsx(Km,{scope:t,contentId:p,open:w,stateAttribute:x,trigger:f,onTriggerChange:c,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayedRef.current?E():k()},[l.isOpenDelayedRef,E,k]),onTriggerLeave:h.useCallback(()=>{v?P():(window.clearTimeout(g.current),g.current=0)},[P,v]),onOpen:k,onClose:P,disableHoverableContent:v,children:n})})};Vl.displayName=Gt;var no="TooltipTrigger",Ul=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yt(no,n),a=to(no,n),s=Rn(n),i=h.useRef(null),l=se(t,i,o.onTriggerChange),d=h.useRef(!1),f=h.useRef(!1),c=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),u.jsx(ii,{asChild:!0,...s,children:u.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Q(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Q(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Q(e.onBlur,o.onClose),onClick:Q(e.onClick,o.onClose)})})});Ul.displayName=no;var ro="TooltipPortal",[Xm,Zm]=Un(ro,{forceMount:void 0}),Rl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Yt(ro,t);return u.jsx(Xm,{scope:t,forceMount:n,children:u.jsx(Ee,{present:n||a.open,children:u.jsx(pr,{asChild:!0,container:o,children:r})})})};Rl.displayName=ro;var Pt="TooltipContent",Wl=h.forwardRef((e,t)=>{const n=Zm(Pt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Yt(Pt,e.__scopeTooltip);return u.jsx(Ee,{present:r||s.open,children:s.disableHoverableContent?u.jsx(jl,{side:o,...a,ref:t}):u.jsx(Jm,{side:o,...a,ref:t})})}),Jm=h.forwardRef((e,t)=>{const n=Yt(Pt,e.__scopeTooltip),r=to(Pt,e.__scopeTooltip),o=h.useRef(null),a=se(t,o),[s,i]=h.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:c}=r,p=h.useCallback(()=>{i(null),c(!1)},[c]),g=h.useCallback((v,m)=>{const b=v.currentTarget,w={x:v.clientX,y:v.clientY},y=n0(w,b.getBoundingClientRect()),x=r0(w,y),k=o0(m.getBoundingClientRect()),P=s0([...x,...k]);i(P),c(!0)},[c]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(l&&f){const v=b=>g(b,f),m=b=>g(b,l);return l.addEventListener("pointerleave",v),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",m)}}},[l,f,g,p]),h.useEffect(()=>{if(s){const v=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(b))||(f==null?void 0:f.contains(b)),x=!a0(w,s);y?p():x&&(p(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,f,s,d,p]),u.jsx(jl,{...e,ref:a})}),[Qm,e0]=Un(Gt,{isInside:!1}),t0=of("TooltipContent"),jl=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Yt(Pt,n),d=Rn(n),{onClose:f}=l;return h.useEffect(()=>(document.addEventListener(eo,f),()=>document.removeEventListener(eo,f)),[f]),h.useEffect(()=>{if(l.trigger){const c=p=>{const g=p.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),u.jsx(dr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:u.jsxs(li,{"data-state":l.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(t0,{children:r}),u.jsx(Qm,{scope:n,isInside:!0,children:u.jsx(ff,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Wl.displayName=Pt;var ql="TooltipArrow",Gl=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Rn(n);return e0(ql,n).isInside?null:u.jsx(ci,{...o,...r,ref:t})});Gl.displayName=ql;function n0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function r0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function o0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function a0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-d)*(r-f)/(p-f)+d&&(o=!o)}return o}function s0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),i0(t)}function i0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var l0=Hl,c0=Vl,d0=Ul,u0=Rl,f0=Wl,p0=Gl;const h0=on("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Yl({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?Ia:"button";return u.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:K(h0({variant:t,size:n,className:e})),...o})}const g0={amber:"bg-amber-100 text-amber-800",blue:"bg-blue-100 text-blue-800",emerald:"bg-emerald-100 text-emerald-800",red:"bg-red-100 text-red-800",purple:"bg-purple-100 text-purple-800",pink:"bg-pink-100 text-pink-800",gray:"bg-gray-100 text-gray-800"},m0=on("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function v0({className:e,variant:t="default",hue:n,asChild:r=!1,...o}){const a=r?Ia:"span",s=n?g0[n]:void 0;return u.jsx(a,{"data-slot":"badge","data-variant":t,className:K(m0({variant:t}),s,e),...o})}function b0({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:K("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function w0({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:K("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function y0({...e}){return u.jsx(wm,{"data-slot":"select",...e})}function x0({...e}){return u.jsx(xm,{"data-slot":"select-value",...e})}function C0({className:e,size:t="default",children:n,...r}){return u.jsxs(ym,{"data-slot":"select-trigger","data-size":t,className:K("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,u.jsx(Cm,{asChild:!0,children:u.jsx(Jo,{className:"size-4 opacity-50"})})]})}function k0({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return u.jsx(km,{children:u.jsxs(Sm,{"data-slot":"select-content",className:K("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...o,children:[u.jsx(E0,{}),u.jsx(Em,{className:K("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),u.jsx(N0,{})]})})}function S0({className:e,children:t,...n}){return u.jsxs(Nm,{"data-slot":"select-item",className:K("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[u.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(_m,{children:u.jsx(Zo,{className:"size-4"})})}),u.jsx(Tm,{children:t})]})}function E0({className:e,...t}){return u.jsx(Am,{"data-slot":"select-scroll-up-button",className:K("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Kd,{className:"size-4"})})}function N0({className:e,...t}){return u.jsx(Pm,{"data-slot":"select-scroll-down-button",className:K("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Jo,{className:"size-4"})})}function T0({className:e,...t}){return u.jsx(Cs,{"data-slot":"checkbox",className:K("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:u.jsx(Ss,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:u.jsx(Zo,{className:"size-3.5"})})})}function _0({className:e,size:t="default",...n}){return u.jsx($m,{"data-slot":"switch","data-size":t,className:K("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...n,children:u.jsx(Hm,{"data-slot":"switch-thumb",className:K("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function A0({className:e,...t}){return u.jsx(gg,{"data-slot":"label",className:K("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function P0({className:e,...t}){return u.jsx(Lg,{"data-slot":"radio-group",className:K("grid gap-3",e),...t})}function I0({className:e,...t}){return u.jsx(Og,{"data-slot":"radio-group-item",className:K("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:u.jsx(zg,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:u.jsx(Zd,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function M0({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return u.jsx(Om,{"data-slot":"separator",decorative:n,orientation:t,className:K("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function L0({className:e,orientation:t="horizontal",...n}){return u.jsx(Rm,{"data-slot":"tabs","data-orientation":t,orientation:t,className:K("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const O0=on("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function z0({className:e,variant:t="default",...n}){return u.jsx(Wm,{"data-slot":"tabs-list","data-variant":t,className:K(O0({variant:t}),e),...n})}function D0({className:e,...t}){return u.jsx(jm,{"data-slot":"tabs-trigger",className:K("cursor-pointer relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function B0({className:e,...t}){return u.jsx(qm,{"data-slot":"tabs-content",className:K("flex-1 outline-none",e),...t})}function F0({className:e,children:t,...n}){return u.jsxs(Gg,{"data-slot":"scroll-area",className:K("relative",e),...n,children:[u.jsx(Yg,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),u.jsx($0,{}),u.jsx(Kg,{})]})}function $0({className:e,orientation:t="vertical",...n}){return u.jsx(Hi,{"data-slot":"scroll-area-scrollbar",orientation:t,className:K("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:u.jsx(Wi,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function oo({className:e,size:t="default",...n}){return u.jsx($p,{"data-slot":"avatar","data-size":t,className:K("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...n})}function ao({className:e,...t}){return u.jsx(Hp,{"data-slot":"avatar-image",className:K("aspect-square size-full",e),...t})}function so({className:e,...t}){return u.jsx(Vp,{"data-slot":"avatar-fallback",className:K("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}var It={},io,Kl;function H0(){return Kl||(Kl=1,io=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),io}var lo={},et={},Xl;function ut(){if(Xl)return et;Xl=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return et.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},et.getSymbolTotalCodewords=function(r){return t[r]},et.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},et.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},et.isKanjiModeEnabled=function(){return typeof e<"u"},et.toSJIS=function(r){return e(r)},et}var co={},Zl;function uo(){return Zl||(Zl=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(co)),co}var fo,Jl;function V0(){if(Jl)return fo;Jl=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},fo=e,fo}var po,Ql;function U0(){if(Ql)return po;Ql=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const a=t*this.size+n;this.data[a]=r,o&&(this.reservedBit[a]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},po=e,po}var ho={},ec;function R0(){return ec||(ec=1,(function(e){const t=ut().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,a=t(r),s=a===145?26:Math.ceil((a-13)/(2*o-2))*2,i=[a-7];for(let l=1;l<o-1;l++)i[l]=i[l-1]-s;return i.push(6),i.reverse()},e.getPositions=function(r){const o=[],a=e.getRowColCoords(r),s=a.length;for(let i=0;i<s;i++)for(let l=0;l<s;l++)i===0&&l===0||i===0&&l===s-1||i===s-1&&l===0||o.push([a[i],a[l]]);return o}})(ho)),ho}var go={},tc;function W0(){if(tc)return go;tc=1;const e=ut().getSymbolSize,t=7;return go.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},go}var mo={},nc;function j0(){return nc||(nc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const a=o.size;let s=0,i=0,l=0,d=null,f=null;for(let c=0;c<a;c++){i=l=0,d=f=null;for(let p=0;p<a;p++){let g=o.get(c,p);g===d?i++:(i>=5&&(s+=t.N1+(i-5)),d=g,i=1),g=o.get(p,c),g===f?l++:(l>=5&&(s+=t.N1+(l-5)),f=g,l=1)}i>=5&&(s+=t.N1+(i-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(o){const a=o.size;let s=0;for(let i=0;i<a-1;i++)for(let l=0;l<a-1;l++){const d=o.get(i,l)+o.get(i,l+1)+o.get(i+1,l)+o.get(i+1,l+1);(d===4||d===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const a=o.size;let s=0,i=0,l=0;for(let d=0;d<a;d++){i=l=0;for(let f=0;f<a;f++)i=i<<1&2047|o.get(d,f),f>=10&&(i===1488||i===93)&&s++,l=l<<1&2047|o.get(f,d),f>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let a=0;const s=o.data.length;for(let l=0;l<s;l++)a+=o.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){const s=a.size;for(let i=0;i<s;i++)for(let l=0;l<s;l++)a.isReserved(l,i)||a.xor(l,i,n(o,l,i))},e.getBestMask=function(o,a){const s=Object.keys(e.Patterns).length;let i=0,l=1/0;for(let d=0;d<s;d++){a(d),e.applyMask(d,o);const f=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),f<l&&(l=f,i=d)}return i}})(mo)),mo}var Wn={},rc;function oc(){if(rc)return Wn;rc=1;const e=uo(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Wn.getBlocksCount=function(o,a){switch(a){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Wn.getTotalCodewordsCount=function(o,a){switch(a){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Wn}var vo={},Kt={},ac;function q0(){if(ac)return Kt;ac=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Kt.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Kt.exp=function(r){return e[r]},Kt.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Kt}var sc;function G0(){return sc||(sc=1,(function(e){const t=q0();e.mul=function(r,o){const a=new Uint8Array(r.length+o.length-1);for(let s=0;s<r.length;s++)for(let i=0;i<o.length;i++)a[s+i]^=t.mul(r[s],o[i]);return a},e.mod=function(r,o){let a=new Uint8Array(r);for(;a.length-o.length>=0;){const s=a[0];for(let l=0;l<o.length;l++)a[l]^=t.mul(o[l],s);let i=0;for(;i<a.length&&a[i]===0;)i++;a=a.slice(i)}return a},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let a=0;a<r;a++)o=e.mul(o,new Uint8Array([1,t.exp(a)]));return o}})(vo)),vo}var bo,ic;function Y0(){if(ic)return bo;ic=1;const e=G0();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const a=e.mod(o,this.genPoly),s=this.degree-a.length;if(s>0){const i=new Uint8Array(this.degree);return i.set(a,s),i}return a},bo=t,bo}var wo={},yo={},xo={},lc;function cc(){return lc||(lc=1,xo.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),xo}var $e={},dc;function uc(){if(dc)return $e;dc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
296
+ ]))+`;$e.KANJI=new RegExp(n,"g"),$e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),$e.BYTE=new RegExp(r,"g"),$e.NUMERIC=new RegExp(e,"g"),$e.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),a=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return $e.testKanji=function(l){return o.test(l)},$e.testNumeric=function(l){return a.test(l)},$e.testAlphanumeric=function(l){return s.test(l)},$e}var fc;function ft(){return fc||(fc=1,(function(e){const t=cc(),n=uc();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(a,s){if(e.isValid(a))return a;try{return r(a)}catch{return s}}})(yo)),yo}var pc;function K0(){return pc||(pc=1,(function(e){const t=ut(),n=oc(),r=uo(),o=ft(),a=cc(),s=7973,i=t.getBCHDigit(s);function l(p,g,v){for(let m=1;m<=40;m++)if(g<=e.getCapacity(m,v,p))return m}function d(p,g){return o.getCharCountIndicator(p,g)+4}function f(p,g){let v=0;return p.forEach(function(m){const b=d(m.mode,g);v+=b+m.getBitsLength()}),v}function c(p,g){for(let v=1;v<=40;v++)if(f(p,v)<=e.getCapacity(v,g,o.MIXED))return v}e.from=function(g,v){return a.isValid(g)?parseInt(g,10):v},e.getCapacity=function(g,v,m){if(!a.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=o.BYTE);const b=t.getSymbolTotalCodewords(g),w=n.getTotalCodewordsCount(g,v),y=(b-w)*8;if(m===o.MIXED)return y;const x=y-d(m,g);switch(m){case o.NUMERIC:return Math.floor(x/10*3);case o.ALPHANUMERIC:return Math.floor(x/11*2);case o.KANJI:return Math.floor(x/13);case o.BYTE:default:return Math.floor(x/8)}},e.getBestVersionForData=function(g,v){let m;const b=r.from(v,r.M);if(Array.isArray(g)){if(g.length>1)return c(g,b);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),b)},e.getEncodedBits=function(g){if(!a.isValid(g)||g<7)throw new Error("Invalid QR Code version");let v=g<<12;for(;t.getBCHDigit(v)-i>=0;)v^=s<<t.getBCHDigit(v)-i;return g<<12|v}})(wo)),wo}var Co={},hc;function X0(){if(hc)return Co;hc=1;const e=ut(),t=1335,n=21522,r=e.getBCHDigit(t);return Co.getEncodedBits=function(a,s){const i=a.bit<<3|s;let l=i<<10;for(;e.getBCHDigit(l)-r>=0;)l^=t<<e.getBCHDigit(l)-r;return(i<<10|l)^n},Co}var ko={},So,gc;function Z0(){if(gc)return So;gc=1;const e=ft();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,a,s;for(o=0;o+3<=this.data.length;o+=3)a=this.data.substr(o,3),s=parseInt(a,10),r.put(s,10);const i=this.data.length-o;i>0&&(a=this.data.substr(o),s=parseInt(a,10),r.put(s,i*3+1))},So=t,So}var Eo,mc;function J0(){if(mc)return Eo;mc=1;const e=ft(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let a;for(a=0;a+2<=this.data.length;a+=2){let s=t.indexOf(this.data[a])*45;s+=t.indexOf(this.data[a+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[a]),6)},Eo=n,Eo}var No,vc;function Q0(){if(vc)return No;vc=1;const e=ft();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},No=t,No}var To,bc;function ev(){if(bc)return To;bc=1;const e=ft(),t=ut();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let a=t.toSJIS(this.data[o]);if(a>=33088&&a<=40956)a-=33088;else if(a>=57408&&a<=60351)a-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
297
+ Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),r.put(a,13)}},To=n,To}var _o={exports:{}},wc;function tv(){return wc||(wc=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var a={},s={};s[r]=0;var i=t.PriorityQueue.make();i.push(r,0);for(var l,d,f,c,p,g,v,m,b;!i.empty();){l=i.pop(),d=l.value,c=l.cost,p=n[d]||{};for(f in p)p.hasOwnProperty(f)&&(g=p[f],v=c+g,m=s[f],b=typeof s[f]>"u",(b||m>v)&&(s[f]=v,i.push(f,v),a[f]=d))}if(typeof o<"u"&&typeof s[o]>"u"){var w=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(w)}return a},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],a=r;a;)o.push(a),n[a],a=n[a];return o.reverse(),o},find_path:function(n,r,o){var a=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(a,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},a;n=n||{};for(a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(_o)),_o.exports}var yc;function nv(){return yc||(yc=1,(function(e){const t=ft(),n=Z0(),r=J0(),o=Q0(),a=ev(),s=uc(),i=ut(),l=tv();function d(w){return unescape(encodeURIComponent(w)).length}function f(w,y,x){const k=[];let P;for(;(P=w.exec(x))!==null;)k.push({data:P[0],index:P.index,mode:y,length:P[0].length});return k}function c(w){const y=f(s.NUMERIC,t.NUMERIC,w),x=f(s.ALPHANUMERIC,t.ALPHANUMERIC,w);let k,P;return i.isKanjiModeEnabled()?(k=f(s.BYTE,t.BYTE,w),P=f(s.KANJI,t.KANJI,w)):(k=f(s.BYTE_KANJI,t.BYTE,w),P=[]),y.concat(x,k,P).sort(function(N,S){return N.index-S.index}).map(function(N){return{data:N.data,mode:N.mode,length:N.length}})}function p(w,y){switch(y){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return r.getBitsLength(w);case t.KANJI:return a.getBitsLength(w);case t.BYTE:return o.getBitsLength(w)}}function g(w){return w.reduce(function(y,x){const k=y.length-1>=0?y[y.length-1]:null;return k&&k.mode===x.mode?(y[y.length-1].data+=x.data,y):(y.push(x),y)},[])}function v(w){const y=[];for(let x=0;x<w.length;x++){const k=w[x];switch(k.mode){case t.NUMERIC:y.push([k,{data:k.data,mode:t.ALPHANUMERIC,length:k.length},{data:k.data,mode:t.BYTE,length:k.length}]);break;case t.ALPHANUMERIC:y.push([k,{data:k.data,mode:t.BYTE,length:k.length}]);break;case t.KANJI:y.push([k,{data:k.data,mode:t.BYTE,length:d(k.data)}]);break;case t.BYTE:y.push([{data:k.data,mode:t.BYTE,length:d(k.data)}])}}return y}function m(w,y){const x={},k={start:{}};let P=["start"];for(let E=0;E<w.length;E++){const N=w[E],S=[];for(let A=0;A<N.length;A++){const z=N[A],_=""+E+A;S.push(_),x[_]={node:z,lastCount:0},k[_]={};for(let M=0;M<P.length;M++){const O=P[M];x[O]&&x[O].node.mode===z.mode?(k[O][_]=p(x[O].lastCount+z.length,z.mode)-p(x[O].lastCount,z.mode),x[O].lastCount+=z.length):(x[O]&&(x[O].lastCount=z.length),k[O][_]=p(z.length,z.mode)+4+t.getCharCountIndicator(z.mode,y))}}P=S}for(let E=0;E<P.length;E++)k[P[E]].end=0;return{map:k,table:x}}function b(w,y){let x;const k=t.getBestModeForData(w);if(x=t.from(y,k),x!==t.BYTE&&x.bit<k.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString(x)+`.
298
+ Suggested mode is: `+t.toString(k));switch(x===t.KANJI&&!i.isKanjiModeEnabled()&&(x=t.BYTE),x){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new r(w);case t.KANJI:return new a(w);case t.BYTE:return new o(w)}}e.fromArray=function(y){return y.reduce(function(x,k){return typeof k=="string"?x.push(b(k,null)):k.data&&x.push(b(k.data,k.mode)),x},[])},e.fromString=function(y,x){const k=c(y,i.isKanjiModeEnabled()),P=v(k),E=m(P,x),N=l.find_path(E.map,"start","end"),S=[];for(let A=1;A<N.length-1;A++)S.push(E.table[N[A]].node);return e.fromArray(g(S))},e.rawSplit=function(y){return e.fromArray(c(y,i.isKanjiModeEnabled()))}})(ko)),ko}var xc;function rv(){if(xc)return lo;xc=1;const e=ut(),t=uo(),n=V0(),r=U0(),o=R0(),a=W0(),s=j0(),i=oc(),l=Y0(),d=K0(),f=X0(),c=ft(),p=nv();function g(E,N){const S=E.size,A=a.getPositions(N);for(let z=0;z<A.length;z++){const _=A[z][0],M=A[z][1];for(let O=-1;O<=7;O++)if(!(_+O<=-1||S<=_+O))for(let I=-1;I<=7;I++)M+I<=-1||S<=M+I||(O>=0&&O<=6&&(I===0||I===6)||I>=0&&I<=6&&(O===0||O===6)||O>=2&&O<=4&&I>=2&&I<=4?E.set(_+O,M+I,!0,!0):E.set(_+O,M+I,!1,!0))}}function v(E){const N=E.size;for(let S=8;S<N-8;S++){const A=S%2===0;E.set(S,6,A,!0),E.set(6,S,A,!0)}}function m(E,N){const S=o.getPositions(N);for(let A=0;A<S.length;A++){const z=S[A][0],_=S[A][1];for(let M=-2;M<=2;M++)for(let O=-2;O<=2;O++)M===-2||M===2||O===-2||O===2||M===0&&O===0?E.set(z+M,_+O,!0,!0):E.set(z+M,_+O,!1,!0)}}function b(E,N){const S=E.size,A=d.getEncodedBits(N);let z,_,M;for(let O=0;O<18;O++)z=Math.floor(O/3),_=O%3+S-8-3,M=(A>>O&1)===1,E.set(z,_,M,!0),E.set(_,z,M,!0)}function w(E,N,S){const A=E.size,z=f.getEncodedBits(N,S);let _,M;for(_=0;_<15;_++)M=(z>>_&1)===1,_<6?E.set(_,8,M,!0):_<8?E.set(_+1,8,M,!0):E.set(A-15+_,8,M,!0),_<8?E.set(8,A-_-1,M,!0):_<9?E.set(8,15-_-1+1,M,!0):E.set(8,15-_-1,M,!0);E.set(A-8,8,1,!0)}function y(E,N){const S=E.size;let A=-1,z=S-1,_=7,M=0;for(let O=S-1;O>0;O-=2)for(O===6&&O--;;){for(let I=0;I<2;I++)if(!E.isReserved(z,O-I)){let j=!1;M<N.length&&(j=(N[M]>>>_&1)===1),E.set(z,O-I,j),_--,_===-1&&(M++,_=7)}if(z+=A,z<0||S<=z){z-=A,A=-A;break}}}function x(E,N,S){const A=new n;S.forEach(function(I){A.put(I.mode.bit,4),A.put(I.getLength(),c.getCharCountIndicator(I.mode,E)),I.write(A)});const z=e.getSymbolTotalCodewords(E),_=i.getTotalCodewordsCount(E,N),M=(z-_)*8;for(A.getLengthInBits()+4<=M&&A.put(0,4);A.getLengthInBits()%8!==0;)A.putBit(0);const O=(M-A.getLengthInBits())/8;for(let I=0;I<O;I++)A.put(I%2?17:236,8);return k(A,E,N)}function k(E,N,S){const A=e.getSymbolTotalCodewords(N),z=i.getTotalCodewordsCount(N,S),_=A-z,M=i.getBlocksCount(N,S),O=A%M,I=M-O,j=Math.floor(A/M),D=Math.floor(_/M),$=D+1,q=j-D,L=new l(q);let T=0;const F=new Array(M),H=new Array(M);let B=0;const V=new Uint8Array(E.buffer);for(let Z=0;Z<M;Z++){const ee=Z<I?D:$;F[Z]=V.slice(T,T+ee),H[Z]=L.encode(F[Z]),T+=ee,B=Math.max(B,ee)}const U=new Uint8Array(A);let X=0,R,W;for(R=0;R<B;R++)for(W=0;W<M;W++)R<F[W].length&&(U[X++]=F[W][R]);for(R=0;R<q;R++)for(W=0;W<M;W++)U[X++]=H[W][R];return U}function P(E,N,S,A){let z;if(Array.isArray(E))z=p.fromArray(E);else if(typeof E=="string"){let j=N;if(!j){const D=p.rawSplit(E);j=d.getBestVersionForData(D,S)}z=p.fromString(E,j||40)}else throw new Error("Invalid data");const _=d.getBestVersionForData(z,S);if(!_)throw new Error("The amount of data is too big to be stored in a QR Code");if(!N)N=_;else if(N<_)throw new Error(`
299
+ The chosen QR Code version cannot contain this amount of data.
300
+ Minimum version required to store current data is: `+_+`.
301
+ `);const M=x(N,S,z),O=e.getSymbolSize(N),I=new r(O);return g(I,N),v(I),m(I,N),w(I,S,0),N>=7&&b(I,N),y(I,M),isNaN(A)&&(A=s.getBestMask(I,w.bind(null,I,S))),s.applyMask(A,I),w(I,S,A),{modules:I,version:N,errorCorrectionLevel:S,maskPattern:A,segments:z}}return lo.create=function(N,S){if(typeof N>"u"||N==="")throw new Error("No input text");let A=t.M,z,_;return typeof S<"u"&&(A=t.from(S.errorCorrectionLevel,t.M),z=d.from(S.version),_=s.from(S.maskPattern),S.toSJISFunc&&e.setToSJISFunction(S.toSJISFunc)),P(N,z,A,_)},lo}var Ao={},Po={},Cc;function kc(){return Cc||(Cc=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(a){return[a,a]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,a=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:a,scale:a?4:s,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const a=e.getScale(r,o);return Math.floor((r+o.margin*2)*a)},e.qrToImageData=function(r,o,a){const s=o.modules.size,i=o.modules.data,l=e.getScale(s,a),d=Math.floor((s+a.margin*2)*l),f=a.margin*l,c=[a.color.light,a.color.dark];for(let p=0;p<d;p++)for(let g=0;g<d;g++){let v=(p*d+g)*4,m=a.color.light;if(p>=f&&g>=f&&p<d-f&&g<d-f){const b=Math.floor((p-f)/l),w=Math.floor((g-f)/l);m=c[i[b*s+w]?1:0]}r[v++]=m.r,r[v++]=m.g,r[v++]=m.b,r[v]=m.a}}})(Po)),Po}var Sc;function ov(){return Sc||(Sc=1,(function(e){const t=kc();function n(o,a,s){o.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=s,a.width=s,a.style.height=s+"px",a.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(a,s,i){let l=i,d=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(d=r()),l=t.getOptions(l);const f=t.getImageWidth(a.modules.size,l),c=d.getContext("2d"),p=c.createImageData(f,f);return t.qrToImageData(p.data,a,l),n(c,d,f),c.putImageData(p,0,0),d},e.renderToDataURL=function(a,s,i){let l=i;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const d=e.render(a,s,l),f=l.type||"image/png",c=l.rendererOpts||{};return d.toDataURL(f,c.quality)}})(Ao)),Ao}var Io={},Ec;function av(){if(Ec)return Io;Ec=1;const e=kc();function t(o,a){const s=o.a/255,i=a+'="'+o.hex+'"';return s<1?i+" "+a+'-opacity="'+s.toFixed(2).slice(1)+'"':i}function n(o,a,s){let i=o+a;return typeof s<"u"&&(i+=" "+s),i}function r(o,a,s){let i="",l=0,d=!1,f=0;for(let c=0;c<o.length;c++){const p=Math.floor(c%a),g=Math.floor(c/a);!p&&!d&&(d=!0),o[c]?(f++,c>0&&p>0&&o[c-1]||(i+=d?n("M",p+s,.5+g+s):n("m",l,0),l=0,d=!1),p+1<a&&o[c+1]||(i+=n("h",f),f=0)):l++}return i}return Io.render=function(a,s,i){const l=e.getOptions(s),d=a.modules.size,f=a.modules.data,c=d+l.margin*2,p=l.color.light.a?"<path "+t(l.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",g="<path "+t(l.color.dark,"stroke")+' d="'+r(f,d,l.margin)+'"/>',v='viewBox="0 0 '+c+" "+c+'"',b='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+v+' shape-rendering="crispEdges">'+p+g+`</svg>
302
+ `;return typeof i=="function"&&i(null,b),b},Io}var Nc;function sv(){if(Nc)return It;Nc=1;const e=H0(),t=rv(),n=ov(),r=av();function o(a,s,i,l,d){const f=[].slice.call(arguments,1),c=f.length,p=typeof f[c-1]=="function";if(!p&&!e())throw new Error("Callback required as last argument");if(p){if(c<2)throw new Error("Too few arguments provided");c===2?(d=i,i=s,s=l=void 0):c===3&&(s.getContext&&typeof d>"u"?(d=l,l=void 0):(d=l,l=i,i=s,s=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(i=s,s=l=void 0):c===2&&!s.getContext&&(l=i,i=s,s=void 0),new Promise(function(g,v){try{const m=t.create(i,l);g(a(m,s,l))}catch(m){v(m)}})}try{const g=t.create(i,l);d(null,a(g,s,l))}catch(g){d(g)}}return It.create=t.create,It.toCanvas=o.bind(null,n.render),It.toDataURL=o.bind(null,n.renderToDataURL),It.toString=o.bind(null,function(a,s,i){return r.render(a,i)}),It}var iv=sv();const lv=Pp(iv);function Tc({className:e,...t}){return u.jsx("div",{"data-slot":"skeleton",className:K("animate-pulse rounded-md bg-accent",e),...t})}const cv={sm:"size-24",md:"size-36",lg:"size-48"},dv={default:{dark:"#000000",light:"#ffffff"},inverted:{dark:"#ffffff",light:"#000000"}};function uv({value:e,size:t="md",variant:n="default",level:r="medium",alt:o="QR code",className:a}){const[s,i]=C.useState(null),[l,d]=C.useState(!1);C.useEffect(()=>{let c=!1;return d(!1),lv.toDataURL(e,{color:dv[n],errorCorrectionLevel:r,width:512,margin:4}).then(p=>{c||i(p)}).catch(p=>{console.error("[ui-qr-code] Failed to encode:",p),c||d(!0)}),()=>{c=!0}},[e,n,r]);const f=K(cv[t],"rounded-sm",a);return l?u.jsx("div",{className:K(f,"bg-muted flex items-center justify-center"),role:"img","aria-label":"Failed to render QR code",children:u.jsx(ru,{className:"size-1/3 text-muted-foreground"})}):s?u.jsx("div",{className:K(f,"overflow-hidden"),children:u.jsx("img",{src:s,alt:o,className:"size-full"})}):u.jsx(Tc,{className:K(f,n==="inverted"&&"bg-black")})}function fv({delayDuration:e=0,...t}){return u.jsx(l0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function pv({...e}){return u.jsx(c0,{"data-slot":"tooltip",...e})}function hv({...e}){return u.jsx(d0,{"data-slot":"tooltip-trigger",...e})}function gv({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(u0,{children:u.jsxs(f0,{"data-slot":"tooltip-content",sideOffset:t,className:K("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[n,u.jsx(p0,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function mv({className:e,value:t,...n}){return u.jsx(Cg,{"data-slot":"progress",className:K("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:u.jsx(kg,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const vv=on("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function bv({className:e,variant:t,...n}){return u.jsx("div",{"data-slot":"alert",role:"alert",className:K(vv({variant:t}),e),...n})}function wv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-title",className:K("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function yv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-description",className:K("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function xv({...e}){return u.jsx(Ef,{"data-slot":"collapsible",...e})}function Cv({...e}){return u.jsx(Fa,{"data-slot":"collapsible-trigger",...e})}function kv({...e}){return u.jsx($a,{"data-slot":"collapsible-content",...e})}const Mt=e=>e==null?void 0:e===!0||e==="true",_c={"arrow-left":Wd,calendar:Gd,"check-circle-2":ea,"chevron-left":Yd,"chevron-right":Jn,clock:Jd,"credit-card":eu,"external-link":tu,"help-circle":ta,info:en,"loader-2":Qn,mail:er,"map-pin":ou,"message-circle":na,"message-square":tr,package:su,phone:iu,search:cu,"shopping-bag":du,sparkles:ra,truck:fu,user:oa,"x-circle":Xd,"alert-circle":Qo,"book-open":jd},Ac={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},Pc={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},Ic=e=>typeof e=="number"?Ac[String(e)]??"gap-2":typeof e=="string"?Ac[e.trim()]??"gap-2":"gap-2",Sv=({children:e,className:t,onClick:n})=>u.jsx($t,{className:t,onClick:n,children:e}),Ev=({children:e,className:t})=>u.jsx(Ht,{className:t,children:e}),Nv=({children:e,className:t})=>u.jsx(nf,{className:t,children:e}),Tv=({children:e,className:t,onClick:n,variant:r,size:o,disabled:a,title:s})=>u.jsx(Yl,{className:t,variant:r,size:o,onClick:n,disabled:Mt(a),title:s,children:e}),_v=({children:e,className:t,variant:n,hue:r,tone:o})=>u.jsx(v0,{className:K(Pc[o]??"",t),variant:n,hue:r,children:e}),Av=({className:e,onChange:t,...n})=>u.jsx(b0,{className:e,onChange:t,...n}),Pv=({className:e,onChange:t,...n})=>u.jsx(w0,{className:e,onChange:t,...n}),Iv=({children:e,className:t,value:n,defaultValue:r,onChange:o,placeholder:a,disabled:s})=>u.jsxs(y0,{value:n,defaultValue:r,onValueChange:i=>{const l=o;l==null||l({target:{value:i}})},disabled:Mt(s),children:[u.jsx(C0,{className:t,children:u.jsx(x0,{placeholder:a})}),u.jsx(k0,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Mv=({children:e,value:t,disabled:n,className:r})=>u.jsx(S0,{value:t,disabled:Mt(n),className:r,children:e}),Lv=({checked:e,onChange:t,disabled:n,className:r,id:o})=>{const a=e!==void 0,s=t;return u.jsx(T0,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Mt(n),className:r,id:o})},Ov=({checked:e,onChange:t,disabled:n,size:r,className:o,id:a})=>{const s=e!==void 0,i=t;return u.jsx(_0,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Mt(n),size:r,className:o,id:a})},zv=({children:e,htmlFor:t,className:n})=>u.jsx(A0,{htmlFor:t,className:n,children:e}),Dv=({children:e,value:t,defaultValue:n,onChange:r,className:o})=>u.jsx(P0,{value:t,defaultValue:n,onValueChange:a=>{const s=r;s==null||s({target:{value:a}})},className:o,children:e}),Bv=({value:e,disabled:t,className:n,id:r})=>u.jsx(I0,{value:e,disabled:Mt(t),className:n,id:r}),Fv=({className:e})=>u.jsx(M0,{className:e}),$v=({children:e,defaultValue:t,className:n})=>{const[r,o]=C.useState(t);return u.jsx(L0,{value:r,onValueChange:o,className:n,children:e})},Hv=({children:e,className:t})=>u.jsx(z0,{className:t,children:e}),Vv=({children:e,value:t,className:n})=>u.jsx(D0,{className:n,value:t,children:e}),Uv=({children:e,value:t,className:n})=>u.jsx(B0,{className:n,value:t,children:e}),Rv=({children:e,className:t})=>u.jsx(F0,{className:t,children:e}),Wv=({src:e,alt:t,className:n})=>{var r;return u.jsxs(oo,{className:n,children:[u.jsx(ao,{src:e,alt:t}),u.jsx(so,{children:((r=t==null?void 0:t.charAt(0))==null?void 0:r.toUpperCase())||"?"})]})},jv=({width:e,height:t,className:n})=>u.jsx(Tc,{className:n,style:{width:e,height:t}}),qv=({children:e,content:t,className:n})=>u.jsx(fv,{children:u.jsxs(pv,{children:[u.jsx(hv,{asChild:!0,children:u.jsx("span",{className:n,children:e})}),u.jsx(gv,{children:u.jsx("p",{children:String(t)})})]})}),Gv=({value:e,className:t})=>u.jsx(mv,{value:typeof e=="string"?Number(e):e,className:t}),Yv={default:en,destructive:Qo},Kv=({children:e,variant:t,title:n,className:r})=>{const o=t,a=Yv[o||"default"]||en;return u.jsxs(bv,{variant:o,className:r,children:[u.jsx(a,{className:"size-4"}),n?u.jsx(wv,{children:String(n)}):null,e?u.jsx(yv,{children:e}):null]})},Xv=({children:e,defaultOpen:t,className:n})=>u.jsx(xv,{defaultOpen:t==="true"||t===!0,className:n,children:e}),Zv=({children:e,className:t})=>u.jsxs(Cv,{className:K("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[u.jsx(Jn,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),Jv=({children:e,className:t})=>u.jsx(kv,{className:t,children:e}),Qv=({children:e,className:t,tone:n})=>u.jsx("p",{className:K("text-sm",Pc[n]??"",t),children:e}),eb=({children:e,className:t,level:n})=>{const r=`h${n||"2"}`;return u.jsx(r,{className:K("font-semibold tracking-tight",t),children:e})},tb=({children:e,className:t,direction:n,gap:r})=>{const o=n==="row"?"flex-row":"flex-col",a=Ic(r);return u.jsx("div",{className:K("flex",o,a,t),children:e})},nb=({children:e,className:t,gap:n})=>{const r=Ic(n);return u.jsx("div",{className:K("flex flex-row items-center",r,t),children:e})},rb=({children:e,className:t,href:n,target:r,rel:o})=>u.jsx("a",{href:n,target:r,rel:o,className:t,children:e}),ob=({title:e,children:t,className:n})=>u.jsxs($t,{className:K("overflow-hidden p-0 gap-0 shadow-sm",n),children:[e?u.jsx(Ht,{className:"px-6 py-3",children:u.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,u.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),ab=({icon:e,label:t,description:n,onClick:r,className:o})=>{const a=e,s="size-5",i=a?_c[a]:null;return u.jsxs("button",{type:"button",className:K("w-full h-auto px-6 py-6 flex items-center gap-2 justify-start cursor-pointer text-left rounded-none transition-colors hover:bg-accent/70",o),onClick:r,children:[i&&u.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),u.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?u.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,n?u.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(n)}):null]}),u.jsx(Jn,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},sb=({name:e,size:t,className:n})=>{const o={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=_c[a],i=a==="sparkles"?"sparkle-icon":"";return s?u.jsx(s,{className:K(o,i,n)}):u.jsx("span",{className:K("inline-block",o,i,n),"data-icon":a})},ib=({value:e,size:t,variant:n,level:r,alt:o,className:a})=>u.jsx(uv,{value:e,size:t,variant:n,level:r,alt:o,className:a}),lb=()=>({"ui-card":Sv,"ui-card-content":Ev,"ui-card-header":Nv,"ui-button":Tv,"ui-text":Qv,"ui-heading":eb,"ui-badge":_v,"ui-input":Av,"ui-textarea":Pv,"ui-select":Iv,"ui-select-option":Mv,"ui-checkbox":Lv,"ui-switch":Ov,"ui-label":zv,"ui-radio-group":Dv,"ui-radio-group-item":Bv,"ui-stack":tb,"ui-inline":nb,"ui-separator":Fv,"ui-tabs":$v,"ui-tabs-list":Hv,"ui-tabs-trigger":Vv,"ui-tabs-content":Uv,"ui-scroll-area":Rv,"ui-avatar":Wv,"ui-icon":sb,"ui-qr-code":ib,"ui-link":rb,"ui-menu-item":ab,"ui-menu":ob,"ui-skeleton":jv,"ui-tooltip":qv,"ui-progress":Gv,"ui-alert":Kv,"ui-collapsible":Xv,"ui-collapsible-trigger":Zv,"ui-collapsible-content":Jv}),Mc="/api/ecommerce",Lc=async(e,t)=>{const n=t?`${t.replace(/\/$/,"")}${Mc}`:Mc,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),o=await r.json();if(!r.ok)throw new Error(o.error||"API request failed");return o.data},cb=({className:e})=>u.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z",fill:"rgb(15,13,25)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",fill:"rgb(232,218,234)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z",fill:"rgb(15,13,25)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",fill:"rgb(252,248,161)"})})]}),Oc="stackable-dev-badge-styles",db=()=>{if(typeof document>"u"||document.getElementById(Oc))return;const e=document.createElement("style");e.id=Oc,e.textContent=`
291
303
  @keyframes stackable-icon-wiggle {
292
304
  0% { transform: rotate(0deg); }
293
305
  70% { transform: rotate(200deg); }
294
306
  85% { transform: rotate(175deg); }
295
307
  100% { transform: rotate(180deg); }
296
308
  }
297
- `,document.head.appendChild(e)},Tv=e=>{const t=e.some(n=>n.mode==="staging"),o=e.some(n=>n.mode==="dev");return t&&o?"Dev + Staging":t?"Staging Mode":"Dev Mode"},_v=e=>e.mode==="staging"?"STAGING":"DEV",Pv=({className:e="",extensions:t=[],tokenErrors:o=new Map})=>{const[n,r]=x.useState([]),[a,s]=x.useState(!1),[i,l]=x.useState(!1),[u,f]=x.useState(!1),c=x.useRef(null),h=o.size>0;if(x.useEffect(()=>{Nv()},[]),x.useEffect(()=>{if(!h)return;const b=()=>{f(!0),setTimeout(()=>f(!1),600)};b();const m=setInterval(b,4e3);return()=>clearInterval(m)},[h]),x.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=vr(window.location.search);r(v)};b();const m=()=>b();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),n.length===0)return null;const g=b=>{if(b.stopPropagation(),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.delete("_stackable_dev"),m.searchParams.delete("_stackable_staging"),window.location.href=m.toString()};return d.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||u?"translate(-50%, -2px)":"translate(-50%, 0)",zIndex:2147483647,fontFamily:"system-ui, -apple-system, sans-serif",transition:"transform 0.15s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[a&&d.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${h?"#dc2626":"#eab308"}`,borderRadius:"8px 8px 0 0",boxShadow:"0 -4px 16px -4px rgba(0,0,0,0.12), 0 -2px 6px -4px rgba(0,0,0,0.08)",padding:"8px 0",width:"420px",maxWidth:"90vw"},children:n.map((b,m)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<n.length-1?"1px solid #f3f4f6":"none"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[d.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:b.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:b.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:_v(b)}),d.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((v=t.find(w=>w.id===b.extensionId))==null?void 0:v.manifest.name)||b.extensionId})]}),d.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:b.bundleUrl,children:["→ ",b.bundleUrl]}),o.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",o.get(b.extensionId)]})]},b.extensionId)})}),d.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:h?"#dc2626":"#eab308",color:h?"#fff":"#000",padding:"8px 12px",borderRadius:a?"0 0 8px 8px":"8px",boxShadow:i?"0 12px 24px -4px rgba(0,0,0,0.18), 0 6px 10px -4px rgba(0,0,0,0.12)":"0 8px 16px -4px rgba(0,0,0,0.12), 0 4px 6px -4px rgba(0,0,0,0.08)",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",transition:"box-shadow 0.15s ease, border-radius 0.1s ease"},children:[d.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||u?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:d.jsx(Ev,{className:"w-6 h-6"})}),d.jsx("span",{children:Tv(n)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",n.length," extension",n.length>1?"s":"",")"]}),d.jsx("button",{onClick:g,style:{marginLeft:"4px",backgroundColor:"rgba(0, 0, 0, 0.15)",border:"none",borderRadius:"4px",cursor:"pointer",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"inherit",fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseOver:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},Av=800,jt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,Iv=async(e,t,o,n,r)=>{const a=new Map,s=new Map;return await Promise.all(e.filter(i=>{var l;return i.manifest.permissions.includes("data:fetch")||(((l=i.manifest.settingsSchema)==null?void 0:l.length)??0)>0}).map(async i=>{const l=r.find(g=>g.extensionId===i.id),u=l==null?void 0:l.token,f=l==null?void 0:l.mode,c=jt(t,"/proxy-token"),h=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,instanceId:n,extensionId:i.id,...f&&{mode:f},...u&&{devSessionToken:u}})});if(h.ok){const{token:g,encryptionKey:b,settings:m}=await h.json();a.set(i.id,{token:g,encryptionKey:b,settings:m})}else{let g=`Proxy token failed (${h.status})`;f&&!u?g="Session token missing — re-run CLI":f&&(g="Session expired or invalid — re-run CLI"),s.set(i.id,g),console.warn(`[embeddables] Failed to obtain proxy token for extension ${i.id} (${h.status}) — ${g}`)}})),{tokens:a,errors:s}},Mv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),Ov=({instanceId:e,queryApiBase:t,apiBase:o,appId:n,children:r,customerId:a,customerEmail:s,customerName:i})=>{const[l,u]=x.useState([]),[f,c]=x.useState([]),[h,g]=x.useState(new Map),[b,m]=x.useState(new Map),[v,w]=x.useState(!1),[y,k]=x.useState({authenticated:!1,user:null}),[C,_]=x.useState(void 0);x.useEffect(()=>{window.stackable||(window.stackable={emit:(N,S={})=>{const[M,...F]=N.split(":"),A=F.join(":");window.dispatchEvent(new CustomEvent(`stackable:${M}`,{detail:{eventName:A,data:S}}))}})},[]);const P=x.useRef(null),T=x.useRef(new Set),E=x.useMemo(()=>l.filter(N=>N.manifest.permissions.includes("extend:identity")).map(N=>N.id),[l]);x.useEffect(()=>{(async()=>{const S=e;try{if(!S){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),u([]),w(!0);return}if(!o||!n){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),u([]),w(!0);return}const M=await fetch(jt(o,`/instances/${n}/${S}`));if(!M.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${S}`),u([]),w(!0);return}const F=await M.json(),A=vr(typeof window<"u"?window.location.search:""),$=await Tc(F,A),{tokens:H,errors:Z}=await Iv($,o,n,S,A);u($),c(A),g(new Map(H)),m(Z)}catch(M){console.error("Failed to load extensions:",M)}finally{w(!0)}})()},[e,n,o]),x.useEffect(()=>{if(!o||!n||l.length===0)return;const S=setInterval(async()=>{const M=[];await Promise.all(l.filter(F=>{var A;return F.manifest.permissions.includes("data:fetch")||(((A=F.manifest.settingsSchema)==null?void 0:A.length)??0)>0}).map(async F=>{const A=f.find(q=>q.extensionId===F.id),$=A==null?void 0:A.token,H=A==null?void 0:A.mode,Z=jt(o,"/proxy-token"),G=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:n,instanceId:e,extensionId:F.id,...H&&{mode:H},...$&&{devSessionToken:$}})});if(G.ok){const{token:q,encryptionKey:Q,settings:ee}=await G.json();M.push([F.id,{token:q,encryptionKey:Q,settings:ee}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${F.id} (${G.status}) — using stale token`)})),M.length>0&&g(F=>{const A=new Map(F);for(const[$,H]of M)A.set($,H);return A})},3300*1e3);return()=>clearInterval(S)},[l,f,o,n,e]),x.useEffect(()=>{if(h.size===0)return;const N=S=>{const M=S.data;if((M==null?void 0:M.type)!=="extension-ready")return;const F=M.extensionId,A=l.find(Z=>Z.id===F);if(!(A!=null&&A.bundleUrl))return;const $=f.find(Z=>Z.extensionId===F);if(Cc(A.bundleUrl)&&($==null?void 0:$.mode)!=="staging")return;const H=h.get(F);H&&Me(F,{type:"extension-encryption-key",encryptionKey:H.encryptionKey})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[l,f,h]);const z=x.useCallback((N,S)=>{const M=ft();for(const[F,A]of M){if(!A.manifest.permissions.includes("events:identity"))continue;const $=A.manifest.events??[];!$.includes("identity")&&!$.includes(`identity:${N}`)||Me(F,{type:"extension-event",eventType:"identity",payload:{eventName:N,data:{state:S,timestamp:Uo(new Date().toISOString())}}})}},[]),j=x.useCallback(N=>{const S=ft();for(const[M,F]of S){if(!F.manifest.permissions.includes("events:messaging"))continue;const A=F.manifest.events??[];!A.includes("messaging")&&!A.includes("messaging:postback")&&!A.includes(`messaging:postback:${N.data.actionName}`)||Me(M,{type:"extension-event",eventType:"messaging",payload:N})}},[]),O=x.useCallback(N=>{const S=ft();for(const[M,F]of S){if(!F.manifest.permissions.includes("events:activity"))continue;const A=F.manifest.events??[];!A.includes("activity")&&!A.includes(`activity:${N.eventName}`)||Me(M,{type:"extension-event",eventType:"activity",payload:N})}},[]),B=x.useCallback(async N=>{const S=ft(),M=[];for(const[A,$]of S){if(!$.manifest.permissions.includes("extend:identity"))continue;const H=new Promise(Z=>{const G=`enrich_${A}_${Date.now()}`,q=Q=>{const ee=Q.data;(ee==null?void 0:ee.type)!=="extend-identity-response"||ee.id!==G||(window.removeEventListener("message",q),ee.additionalClaims?Z(ee.additionalClaims):Z({}))};window.addEventListener("message",q),setTimeout(()=>{window.removeEventListener("message",q),Z({})},5e3),Me(A,{type:"extend-identity-request",id:G,claims:N})});M.push(H)}if(M.length===0)return{};const F=await Promise.all(M);return Object.assign({},...F)},[]),V=x.useCallback(async N=>{if(!o||!n||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!o,appId:!!n,instanceId:!!e}),null;const S=jt(o,`/instances/${n}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:S,claims:Object.keys(N)});try{const M=await fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!M.ok)return console.warn(`[embeddables] Identity sign failed (${M.status})`),null;const{token:F}=await M.json();return F}catch(M){return console.warn("[embeddables] Identity sign request failed:",M),null}},[o,n,e]),L=x.useCallback(N=>{const S=window.zE;S&&S("messenger","loginUser",async M=>{M(N)})},[]),Y=x.useCallback(()=>{const N=window.zE;N&&N("messenger","logoutUser")},[]),I=x.useCallback(N=>{console.log("[embeddables] Running sign lifecycle for user:",N.id);const{email:S,name:M}=N,F={external_id:String(N.id)};(async()=>{const A=await B({...F,email:S,name:M});console.log("[embeddables] Enriched claims:",A);const $=await V({...F,...A,email:S,name:M});console.log("[embeddables] Sign result:",{hasToken:!!$}),$&&L($)})()},[B,V,L]),D=x.useCallback(N=>{if(E.length>0&&T.current.size<E.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${T.current.size}/${E.length} ready`),P.current=N;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),I(N)},[E,I]);x.useEffect(()=>{if(!v){console.log("[embeddables] Identity effect skipped — extensions not loaded yet");return}if(console.log("[embeddables] Identity effect running",{initialized:v,customerId:!!a,extendExtensions:E.length}),a){console.log("[embeddables] Identity from props:",{customerId:a,customerEmail:s,customerName:i});const N={authenticated:!0,user:{id:String(a),email:s,name:i,provider:"shopify"}};k(S=>{var M,F;return S.authenticated&&((M=S.user)==null?void 0:M.id)===((F=N.user)==null?void 0:F.id)?S:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),D(N.user),z("login",N),N)})}else{if(a===void 0)return;k(N=>N.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),Y(),z("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):N)}},[v,a,s,i,E,D,z,Y]),x.useEffect(()=>{if(!v||a!==void 0)return;const N=()=>{const M=document.getElementById("stackable-identity");if(M)try{const F=JSON.parse(M.textContent??"{}"),A={authenticated:!0,user:{id:String(F.customerId??""),email:F.customerEmail,name:F.customerName,provider:"shopify"}};k($=>{var H,Z;return $.authenticated&&((H=$.user)==null?void 0:H.id)===((Z=A.user)==null?void 0:Z.id)?$:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),D(A.user),z("login",A),A)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else k(F=>F.authenticated?(Y(),z("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):F)};N();const S=new MutationObserver(N);return S.observe(document.head,{childList:!0,subtree:!0}),S.observe(document.body,{childList:!0,subtree:!0}),()=>S.disconnect()},[v,a,D,z,Y]),x.useEffect(()=>{if(!y.authenticated)return;const N=S=>{const M=S.data;if((M==null?void 0:M.type)!=="extension-ready")return;const F=M.extensionId,A=l.find(H=>H.id===F);if(!(A!=null&&A.manifest.permissions.includes("events:identity")))return;const $=A.manifest.events??[];!$.includes("identity")&&!$.includes("identity:login")||Me(F,{type:"extension-event",eventType:"identity",payload:{eventName:"login",data:{state:y,timestamp:Uo(new Date().toISOString())}}})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[y,l]),x.useEffect(()=>{if(E.length===0)return;const N=M=>{const F=M.data;if((F==null?void 0:F.type)!=="extension-ready")return;const A=F.extensionId;if(E.includes(A)&&(T.current.add(A),console.log(`[embeddables] extend:identity extension ready: ${A} (${T.current.size}/${E.length})`),T.current.size>=E.length&&P.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const $=P.current;P.current=null,I($)}};window.addEventListener("message",N);const S=setTimeout(()=>{if(P.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${T.current.size}/${E.length} extensions ready`);const M=P.current;P.current=null,I(M)}},5e3);return()=>{window.removeEventListener("message",N),clearTimeout(S)}},[E,I]),x.useEffect(()=>{const N=S=>{const{detail:M}=S;M!=null&&M.eventName&&(M.eventName==="postback"?j({eventName:"postback",data:{actionName:M.data.actionName,conversationId:M.data.conversationId??"",timestamp:Uo(new Date().toISOString())}}):M.eventName==="context"&&_(F=>({...F,...M.data})))};return window.addEventListener("stackable:messaging",N),()=>window.removeEventListener("stackable:messaging",N)},[j]),x.useEffect(()=>{const N=S=>{const{detail:M}=S;M!=null&&M.eventName&&O({eventName:M.eventName,data:M.data??{}})};return window.addEventListener("stackable:activity",N),()=>window.removeEventListener("stackable:activity",N)},[O]),x.useEffect(()=>{var M;if(!v)return;const N={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:C,identity:y},S=ft();for(const[F,A]of S){if(!A.manifest.permissions.includes("context:read"))continue;const $=(M=h.get(F))==null?void 0:M.settings,H=$?{...N,settings:$}:N;Me(F,{type:"context-push",context:H})}},[v,a,s,i,y,C,h]);const R=x.useMemo(()=>({"data.query":async N=>Sl(N,t),"data.fetch":async(N,S)=>{const M=h.get(N);if(!M)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const F=Mv(S)?S:{url:S.url,method:S.method??"GET",headers:S.headers??{},body:S.body??null},A=jt(o,"/proxy"),$=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":N,"X-Application-Id":n??"",Authorization:`Bearer ${M.token}`},body:JSON.stringify(F)}),H=await $.json();return{status:H.status??$.status,ok:H.ok??$.ok,data:H.data}},"actions.toast":async(N,S)=>{const M={...S.description&&{description:S.description},...S.duration&&{duration:S.duration},...S.position&&{position:S.position},...S.dismissible!=null&&{dismissible:S.dismissible},...S.closeButton!=null&&{closeButton:S.closeButton}};if(S.fetch){const F=$=>new Promise(H=>setTimeout(H,$)),A=Promise.all([R["data.fetch"](N,S.fetch),F(Av)]).then(([$])=>$);gt.promise(A,{loading:S.loading??S.message,success:S.success??S.message,error:S.error??"Something went wrong",...M});return}switch(S.type){case"success":{gt.success(S.message,M);break}case"error":{gt.error(S.message,M);break}case"warning":{gt.warning(S.message,M);break}case"info":{gt.info(S.message,M);break}default:gt(S.message,M)}},"actions.invoke":async N=>(window.dispatchEvent(new CustomEvent(`stackable:action:${N.action}`,{detail:N})),{success:!0}),"context.read":async N=>{var S;return{customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:C,...((S=h.get(N))==null?void 0:S.settings)&&{settings:h.get(N).settings}}}}),[o,n,t,a,s,i,h,y,C]);return v?d.jsxs(d.Fragment,{children:[d.jsx(Rl,{extensions:l,capabilityHandlers:R,components:Cv(),children:r}),d.jsx(Pv,{extensions:l,tokenErrors:b})]}):null};var Lv=(e,t,o,n,r,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(b=>{let m=b==="class",v=m&&a?r.map(w=>a[w]||w):r;m?(l.classList.remove(...v),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(b,g)}),c(g)}function c(g){i&&u.includes(g)&&(l.style.colorScheme=g)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(n)f(n);else try{let g=localStorage.getItem(t)||o,b=s&&g==="system"?h():g;f(b)}catch{}},zv=p.createContext(void 0),Dv={setTheme:e=>{},themes:[]},$v=()=>{var e;return(e=p.useContext(zv))!=null?e:Dv};p.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:n,enableColorScheme:r,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let f=JSON.stringify([o,t,a,e,i,s,n,r]).slice(1,-1);return p.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Lv.toString()})(${f})`}})});const Fv=({...e})=>{const{theme:t="system"}=$v();return d.jsx(Sc,{theme:t,className:"toaster group",icons:{success:d.jsx(Sr,{className:"size-4"}),info:d.jsx(Yt,{className:"size-4"}),warning:d.jsx(ed,{className:"size-4"}),error:d.jsx(Yc,{className:"size-4"}),loading:d.jsx(Go,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Bv={dark:"dark",light:"widget-theme-light"},Hv={dark:"dark",light:"light"},Vv=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:Bv[t],style:{position:"relative",transform:"translateZ(0)"},children:[d.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:d.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),d.jsx(Fv,{position:"bottom-center",theme:Hv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Wv={airplay:Oc,"message-circle":Er,"message-square":Yo,headphones:Gc,"help-circle":Cr,bot:Dc,sparkles:Nr,zap:od},Uv=({className:e})=>d.jsx("svg",{className:X(e,"scale-125"),viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:d.jsx("path",{d:"M10,18 L6,22 L6,18 L10,18 Z M17,6 C19.7614237,6 22,8.23857625 22,11 C22,13.7614237 19.7614237,16 17,16 L7,16 C4.23857625,16 2,13.7614237 2,11 C2,8.23857625 4.23857625,6 7,6 Z",transform:"translate(12, 14) scale(-1, 1) translate(-12, -14)"})}),jv=({className:e})=>d.jsxs("svg",{className:e,viewBox:"0 0 190 190",fill:"currentColor","aria-hidden":"true",children:[d.jsxs("g",{id:"sl-half-right",children:[d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z"})}),d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",opacity:"0.3"})})]}),d.jsxs("g",{id:"sl-half-left",children:[d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z"})}),d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",opacity:"0.3"})})]})]}),El=400,Rv=El*.35,Gv=({icon:e,isOpen:t,onClick:o})=>{const n=Wv[e]??Uv,[r,a]=x.useState("idle"),s=x.useRef(t);x.useEffect(()=>{if(s.current===t)return;s.current=t,a("interstitial");const l=setTimeout(()=>a("idle"),Rv);return()=>clearTimeout(l)},[t]);const i=()=>r==="interstitial"?d.jsx(jv,{}):t?d.jsx(Uc,{}):d.jsx(n,{});return d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(vl,{size:"icon",className:X("h-12 w-12 rounded-full cursor-pointer transition-transform duration-300",t?"scale-115":"scale-100 hover:scale-105"),onClick:o,children:d.jsx("span",{className:X("flex items-center justify-center transition-transform",t&&"rotate-180"),style:{transitionDuration:`${El}ms`},children:i()})})})},qv=({children:e,icon:t,theme:o})=>{const[n,r]=x.useState(!1),[a,s]=x.useState(!0),[i,l]=x.useState(!1),u=x.useCallback(()=>{r(f=>!f)},[]);return x.useEffect(()=>{n&&!i&&l(!0)},[n,i]),x.useEffect(()=>{const f=()=>r(m=>!m),c=()=>r(!0),h=()=>r(!1),g=()=>s(!0),b=()=>{r(!1),s(!1)};return window.addEventListener("stackable:action:toggle",f),window.addEventListener("stackable:action:open",c),window.addEventListener("stackable:action:close",h),window.addEventListener("stackable:action:show",g),window.addEventListener("stackable:action:hide",b),()=>{window.removeEventListener("stackable:action:open",c),window.removeEventListener("stackable:action:close",h),window.removeEventListener("stackable:action:toggle",f),window.removeEventListener("stackable:action:show",g),window.removeEventListener("stackable:action:hide",b)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(Gv,{isOpen:n,icon:t,onClick:u}),i&&d.jsx("div",{"data-id":"widget-container",className:X("overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",n?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:d.jsx(Vv,{theme:o,children:e})})]})},Yv=({href:e,children:t})=>d.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100",children:t}),Xv=(e,t)=>{const[o,n]=x.useState(null),[r,a]=x.useState(!1),[s,i]=x.useState(null);return x.useEffect(()=>{if(!e){n(null);return}(async()=>{a(!0),i(null);try{const u=await Sl({action:"getCustomer",customerId:e},t);n(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:o,loading:r,error:s}},Kv=({customerId:e,customerEmail:t,queryApiBase:o,children:n})=>{var l,u;const{customer:r,loading:a,error:s}=Xv(e,o);if(a)return d.jsx(Lt,{className:"border-none shadow-none bg-transparent",children:d.jsx(zt,{className:"flex items-center justify-center p-6",children:d.jsx(Go,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!r){const f=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=f.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(Lt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(zt,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Jn,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Qn,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),d.jsx(er,{className:"text-lg",children:c})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:f})]}),t&&d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(qo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:n})]})]}),d.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=r.first_name)==null?void 0:l[0])||""}${((u=r.last_name)==null?void 0:u[0])||""}`;return d.jsx(Lt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(zt,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Jn,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Qn,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(r.name)}&background=7c3aed&color=fff&size=128`,alt:r.name}),d.jsx(er,{className:"text-lg",children:i})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:r.name})]}),d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(qo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:r.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:n})]})]})})})},Nl=(e,t)=>{x.useEffect(()=>{const o=t.current;if(!o)return;let n=document.getElementById(e);n||(n=document.createElement("div"),n.id=e,n.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(n));const r=new MutationObserver(()=>{for(;n.firstChild;)o.appendChild(document.adoptNode(n.firstChild))});return r.observe(n,{childList:!0,subtree:!0}),()=>{r.disconnect(),n==null||n.remove()}},[e,t])},Zv=({customization:e})=>{const t=x.useRef(null);return Nl("widget_conversations",t),x.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Jv=({customization:e})=>{const t=x.useRef(null);return Nl("widget_messages",t),x.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},_t="stackable:action",tr=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"context",data:e}}))},or=25,nr=75,Qv=({header:e,buttons:t,queryApiBase:o,customerId:n="",customerEmail:r="",primaryPercent:a=50})=>{const s=Math.max(or,Math.min(nr,a)),{extensions:i}=fr(),l=x.useMemo(()=>i.some(O=>O.enabled&&(O.manifest.targets.includes("slot.header")||O.manifest.targets.includes("slot.content"))),[i]),[u,f]=x.useState(!1),[c,h]=x.useState(!1),[g,b]=x.useState("extensions"),[m,v]=x.useState(s),[w,y]=x.useState("loading"),k=x.useRef(null),C=x.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",messageLog:{targetElement:"#widget_messages"},conversationList:{targetElement:"#widget_conversations"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},messageLog:{hideHeader:!0},conversationList:{hideHeader:!0,hideNewConversationButton:!0}}),!0),[]);x.useEffect(()=>{var Y,I;const O=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),B=(I=(Y=O==null?void 0:O.src)==null?void 0:Y.match(/key=([a-f0-9-]+)/))==null?void 0:I[1];if(B&&fetch(`https://ekr.zdassets.com/compose/${B}`).then(D=>D.text()).then(D=>{var N;const R=(N=D.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:N[1];R&&tr({appId:R})}).catch(()=>{}),C()){y("ready");return}const V=setInterval(()=>{C()&&(y("ready"),clearInterval(V))},100),L=setTimeout(()=>{clearInterval(V),y(D=>D==="ready"?D:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(V),clearTimeout(L)}},[C]);const _=x.useCallback(O=>{!window.zE||!O.length||(console.log("[ZendeskMessenger] setConversationTags",O,{zE:!!window.zE}),window.zE("messenger:set","conversationTags",O))},[]),P=x.useCallback(O=>{!window.zE||!O.length||(console.log("[ZendeskMessenger] setConversationFields",O,{zE:!!window.zE}),window.zE("messenger:set","conversationFields",O))},[]),T=x.useCallback(O=>{if(!window.zE)return;const{tags:B=[],fields:V=[],...L}=O??{};_(B),P(V),window.zE("messenger:ui","newConversation",Object.keys(L).length?L:void 0)},[_,P]),E=x.useCallback(O=>{const{detail:B}=O;B!=null&&B.payload&&T(B.payload)},[T]);x.useEffect(()=>(window.addEventListener(`${_t}:${ht.NEW_CONVERSATION}`,E),()=>{window.removeEventListener(`${_t}:${ht.NEW_CONVERSATION}`,E)}),[E]),x.useEffect(()=>{const O=V=>{const{detail:L}=V;L!=null&&L.payload&&_(L.payload)},B=V=>{const{detail:L}=V;L!=null&&L.payload&&P(L.payload)};return window.addEventListener(`${_t}:${ht.SET_CONVERSATION_TAGS}`,O),window.addEventListener(`${_t}:${ht.SET_CONVERSATION_FIELDS}`,B),()=>{window.removeEventListener(`${_t}:${ht.SET_CONVERSATION_TAGS}`,O),window.removeEventListener(`${_t}:${ht.SET_CONVERSATION_FIELDS}`,B)}},[_,P]),x.useEffect(()=>{if(w!=="ready"||!window.zE)return;const O=window.zE("messenger:on","conversationStarted",L=>{var I,D;const Y=(D=(I=L==null?void 0:L.payload)==null?void 0:I.conversation)==null?void 0:D.id;Y&&tr({conversationId:Y})}),B=window.zE("messenger:on","messagesShown",L=>{var I,D;const Y=(D=(I=L==null?void 0:L.payload)==null?void 0:I.conversation)==null?void 0:D.id;Y&&tr({conversationId:Y})}),V=window.zE("messenger:on","postbackButtonClicked",L=>{var I;const Y=L==null?void 0:L.payload;Y!=null&&Y.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"postback",data:{actionName:Y.actionName,conversationId:((I=Y.conversation)==null?void 0:I.id)??""}}}))});return()=>{typeof O=="function"&&O(),typeof B=="function"&&B(),typeof V=="function"&&V()}},[w]),x.useEffect(()=>{if(!u)return;const O=V=>{if(!k.current)return;const L=k.current.getBoundingClientRect();if((c?L.width:L.height)===0)return;const I=c?(V.clientX-L.left)/L.width*100:(V.clientY-L.top)/L.height*100,D=Math.max(or,Math.min(nr,I));v(D)},B=()=>{f(!1),document.body.style.cursor="",document.body.style.userSelect=""};return document.body.style.cursor=c?"col-resize":"row-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",O),window.addEventListener("mouseup",B),window.addEventListener("blur",B),()=>{window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",B),window.removeEventListener("blur",B),document.body.style.cursor="",document.body.style.userSelect=""}},[u,c]),x.useEffect(()=>{if(!k.current)return;const O=k.current,B=()=>{const L=getComputedStyle(O).flexDirection==="row";h(L)};B();const V=new ResizeObserver(B);return V.observe(O),()=>{V.disconnect()}},[]);const z=x.useCallback(O=>{if(O.detail===2){v(s);return}O.preventDefault(),f(!0)},[s]),j={customerId:n,customerEmail:r};return d.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[d.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),d.jsxs("div",{ref:k,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[l&&d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${m}%`},children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsx("h2",{className:"font-semibold text-sm text-foreground",children:g==="extensions"?"My Profile":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[w==="ready"&&d.jsx("button",{onClick:()=>T({}),className:"rounded-md border border-transparent p-1.5 text-muted-foreground transition-colors hover:cursor-pointer hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",title:"New Conversation",children:d.jsx(Zc,{className:"h-4 w-4"})}),t,d.jsx("button",{onClick:()=>b("conversations"),className:X("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(Yo,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>b("extensions"),className:X("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="extensions"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Profile",children:d.jsx(Tr,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:X("flex flex-col gap-2",g==="conversations"&&"hidden"),children:[d.jsx(Kv,{customerId:n,customerEmail:r,queryApiBase:o,children:d.jsx(Gt,{target:"slot.header",context:j,className:"flex-none"})}),d.jsx(Gt,{target:"slot.content",context:j,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:X("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",g==="extensions"&&"hidden"),children:w==="error"?d.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:d.jsx("p",{children:"Error loading conversations."})}):d.jsx(Zv,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:l?`${100-m}%`:"100%"},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:w==="error"?d.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:d.jsx("p",{children:"Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured."})}):d.jsx(Jv,{})}),d.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[d.jsx(Gt,{target:"slot.footer",context:j,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Yv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Gt,{target:"slot.footer-links",context:j,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:O,index:B})=>d.jsxs(d.Fragment,{children:[B===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),O]})})]})]}),l&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:X("group/resize absolute z-20 flex items-center justify-center",c?"top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize":"w-full h-3 -mt-2.5 cursor-row-resize"),style:c?{left:`${m}%`}:{top:`${m}%`},onMouseDown:z,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":or,"aria-valuemax":nr,"aria-valuenow":Math.round(m),children:d.jsx("div",{className:X("rounded-full bg-foreground/35 dark:bg-white shadow-[0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_rgba(0,0,0,0.22)] transition-all",c?"h-20 w-0.5":"h-0.5 w-20",u?"bg-foreground/70 dark:bg-white opacity-100":"opacity-70 group-hover/resize:bg-foreground/55 dark:group-hover/resize:bg-white group-hover/resize:opacity-100")})}),u&&d.jsx("div",{className:X("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>f(!1)})]})]})]})},eb="ze-snippet",Tl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,tb=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:o=!1,scriptId:n=eb}=t;window.zEMessenger={autorender:o};const r=document.getElementById(n);if(r){if(r.getAttribute("src")===Tl(e))return Promise.resolve();r.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=n,i.src=Tl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},ob=({queryApiBase:e,apiBase:t,appId:o,theme:n,icon:r,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:u})=>{const f=n==="dark"||n==="light"?n:"inherit";return x.useEffect(()=>{u&&tb(u).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[u]),d.jsx(Ov,{instanceId:a,queryApiBase:e,apiBase:t,appId:o,customerId:s,customerEmail:i,customerName:l,children:d.jsx(qv,{theme:f,icon:r,children:d.jsx(Qv,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class nb extends HTMLElement{constructor(){super();sr(this,"mountNode");sr(this,"root");const o=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=zl,o.appendChild(n),this.mountNode=document.createElement("div"),o.appendChild(this.mountNode)}static get observedAttributes(){return["query-api-base","api-base","app-id","instance-id","theme","icon","customer-id","customer-email","customer-name","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var o;(o=this.root)==null||o.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const o=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",o==="dark"),this.root.render(d.jsx(ob,{theme:o,icon:this.getAttribute("icon")??void 0,queryApiBase:this.getAttribute("query-api-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",instanceId:this.getAttribute("instance-id")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0,customerName:this.getAttribute("customer-name")??void 0,snippetKey:this.getAttribute("snippet-key")??""}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",nb)}));
309
+ `,document.head.appendChild(e)},ub=e=>{const t=e.some(r=>r.mode==="staging"),n=e.some(r=>r.mode==="dev");return t&&n?"Dev + Staging":t?"Staging Mode":"Dev Mode"},fb=e=>e.mode==="staging"?"STAGING":"DEV",pb=({className:e="",extensions:t=[],tokenErrors:n=new Map})=>{const[r,o]=C.useState([]),[a,s]=C.useState(!1),[i,l]=C.useState(!1),[d,f]=C.useState(!1),c=C.useRef(null),p=n.size>0;if(C.useEffect(()=>{db()},[]),C.useEffect(()=>{if(!p)return;const v=()=>{f(!0),setTimeout(()=>f(!1),600)};v();const m=setInterval(v,4e3);return()=>clearInterval(m)},[p]),C.useEffect(()=>{if(typeof window>"u")return;const v=()=>{const b=Yo(window.location.search);o(b)};v();const m=()=>v();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),r.length===0)return null;const g=v=>{if(v.stopPropagation(),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.delete("_stackable_dev"),m.searchParams.delete("_stackable_staging"),window.location.href=m.toString()};return u.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||d?"translate(-50%, -2px)":"translate(-50%, 0)",zIndex:2147483647,fontFamily:"system-ui, -apple-system, sans-serif",transition:"transform 0.15s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[a&&u.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${p?"#dc2626":"#eab308"}`,borderRadius:"8px 8px 0 0",boxShadow:"0 -4px 16px -4px rgba(0,0,0,0.12), 0 -2px 6px -4px rgba(0,0,0,0.08)",padding:"8px 0",width:"420px",maxWidth:"90vw"},children:r.map((v,m)=>{var b;return u.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<r.length-1?"1px solid #f3f4f6":"none"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[u.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:v.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:v.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:fb(v)}),u.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((b=t.find(w=>w.id===v.extensionId))==null?void 0:b.manifest.name)||v.extensionId})]}),u.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:v.bundleUrl,children:["→ ",v.bundleUrl]}),n.get(v.extensionId)&&u.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",n.get(v.extensionId)]})]},v.extensionId)})}),u.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:p?"#dc2626":"#eab308",color:p?"#fff":"#000",padding:"8px 12px",borderRadius:a?"0 0 8px 8px":"8px",boxShadow:i?"0 12px 24px -4px rgba(0,0,0,0.18), 0 6px 10px -4px rgba(0,0,0,0.12)":"0 8px 16px -4px rgba(0,0,0,0.12), 0 4px 6px -4px rgba(0,0,0,0.08)",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",transition:"box-shadow 0.15s ease, border-radius 0.1s ease"},children:[u.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||d?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:u.jsx(cb,{className:"w-6 h-6"})}),u.jsx("span",{children:ub(r)}),u.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",r.length," extension",r.length>1?"s":"",")"]}),u.jsx("button",{onClick:g,style:{marginLeft:"4px",backgroundColor:"rgba(0, 0, 0, 0.15)",border:"none",borderRadius:"4px",cursor:"pointer",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"inherit",fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseOver:v=>{v.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:v=>{v.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},hb=800,Xt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,gb=async(e,t,n,r,o)=>{const a=new Map,s=new Map;return await Promise.all(e.filter(i=>{var l;return i.manifest.permissions.includes("data:fetch")||(((l=i.manifest.settingsSchema)==null?void 0:l.length)??0)>0}).map(async i=>{const l=o.find(g=>g.extensionId===i.id),d=l==null?void 0:l.token,f=l==null?void 0:l.mode,c=Xt(t,"/proxy-token"),p=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:n,instanceId:r,extensionId:i.id,...f&&{mode:f},...d&&{devSessionToken:d}})});if(p.ok){const{token:g,encryptionKey:v,settings:m}=await p.json();a.set(i.id,{token:g,encryptionKey:v,settings:m})}else{let g=`Proxy token failed (${p.status})`;f&&!d?g="Session token missing — re-run CLI":f&&(g="Session expired or invalid — re-run CLI"),s.set(i.id,g),console.warn(`[embeddables] Failed to obtain proxy token for extension ${i.id} (${p.status}) — ${g}`)}})),{tokens:a,errors:s}},mb=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),vb=({instanceId:e,queryApiBase:t,apiBase:n,appId:r,children:o,customerId:a,customerEmail:s,customerName:i})=>{const[l,d]=C.useState([]),[f,c]=C.useState([]),[p,g]=C.useState(new Map),[v,m]=C.useState(new Map),[b,w]=C.useState(!1),[y,x]=C.useState({authenticated:!1,user:null}),[k,P]=C.useState(void 0);C.useEffect(()=>{window.stackable||(window.stackable={emit:(L,T={})=>{const[F,...H]=L.split(":"),B=H.join(":");window.dispatchEvent(new CustomEvent(`stackable:${F}`,{detail:{eventName:B,data:T}}))}})},[]);const E=C.useRef(null),N=C.useRef(new Set),S=C.useMemo(()=>l.filter(L=>L.manifest.permissions.includes("extend:identity")).map(L=>L.id),[l]);C.useEffect(()=>{(async()=>{const T=e;try{if(!T){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),d([]),w(!0);return}if(!n||!r){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),d([]),w(!0);return}const F=await fetch(Xt(n,`/instances/${r}/${T}`));if(!F.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${T}`),d([]),w(!0);return}const H=await F.json(),B=Yo(typeof window<"u"?window.location.search:""),V=await Bd(H,B),{tokens:U,errors:X}=await gb(V,n,r,T,B);d(V),c(B),g(new Map(U)),m(X)}catch(F){console.error("Failed to load extensions:",F)}finally{w(!0)}})()},[e,r,n]),C.useEffect(()=>{if(!n||!r||l.length===0)return;const T=setInterval(async()=>{const F=[];await Promise.all(l.filter(H=>{var B;return H.manifest.permissions.includes("data:fetch")||(((B=H.manifest.settingsSchema)==null?void 0:B.length)??0)>0}).map(async H=>{const B=f.find(W=>W.extensionId===H.id),V=B==null?void 0:B.token,U=B==null?void 0:B.mode,X=Xt(n,"/proxy-token"),R=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,instanceId:e,extensionId:H.id,...U&&{mode:U},...V&&{devSessionToken:V}})});if(R.ok){const{token:W,encryptionKey:Z,settings:ee}=await R.json();F.push([H.id,{token:W,encryptionKey:Z,settings:ee}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${H.id} (${R.status}) — using stale token`)})),F.length>0&&g(H=>{const B=new Map(H);for(const[V,U]of F)B.set(V,U);return B})},3300*1e3);return()=>clearInterval(T)},[l,f,n,r,e]),C.useEffect(()=>{if(p.size===0)return;const L=T=>{const F=T.data;if((F==null?void 0:F.type)!=="extension-ready")return;const H=F.extensionId,B=l.find(X=>X.id===H);if(!(B!=null&&B.bundleUrl))return;const V=f.find(X=>X.extensionId===H);if(Od(B.bundleUrl)&&(V==null?void 0:V.mode)!=="staging")return;const U=p.get(H);U&&Me(H,{type:"extension-encryption-key",encryptionKey:U.encryptionKey})};return window.addEventListener("message",L),()=>window.removeEventListener("message",L)},[l,f,p]);const A=C.useCallback((L,T)=>{const F=mt();for(const[H,B]of F){if(!B.manifest.permissions.includes("events:identity"))continue;const V=B.manifest.events??[];!V.includes("identity")&&!V.includes(`identity:${L}`)||Me(H,{type:"extension-event",eventType:"identity",payload:{eventName:L,data:{state:T,timestamp:Xn(new Date().toISOString())}}})}},[]),z=C.useCallback(L=>{const T=mt();for(const[F,H]of T){if(!H.manifest.permissions.includes("events:messaging"))continue;const B=H.manifest.events??[];!B.includes("messaging")&&!B.includes("messaging:postback")&&!B.includes(`messaging:postback:${L.data.actionName}`)||Me(F,{type:"extension-event",eventType:"messaging",payload:L})}},[]),_=C.useCallback(L=>{const T=mt();for(const[F,H]of T){if(!H.manifest.permissions.includes("events:activity"))continue;const B=H.manifest.events??[];!B.includes("activity")&&!B.includes(`activity:${L.eventName}`)||Me(F,{type:"extension-event",eventType:"activity",payload:L})}},[]),M=C.useCallback(async L=>{const T=mt(),F=[];for(const[B,V]of T){if(!V.manifest.permissions.includes("extend:identity"))continue;const U=new Promise(X=>{const R=`enrich_${B}_${Date.now()}`,W=Z=>{const ee=Z.data;(ee==null?void 0:ee.type)!=="extend-identity-response"||ee.id!==R||(window.removeEventListener("message",W),ee.additionalClaims?X(ee.additionalClaims):X({}))};window.addEventListener("message",W),setTimeout(()=>{window.removeEventListener("message",W),X({})},5e3),Me(B,{type:"extend-identity-request",id:R,claims:L})});F.push(U)}if(F.length===0)return{};const H=await Promise.all(F);return Object.assign({},...H)},[]),O=C.useCallback(async L=>{if(!n||!r||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!n,appId:!!r,instanceId:!!e}),null;const T=Xt(n,`/instances/${r}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:T,claims:Object.keys(L)});try{const F=await fetch(T,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(!F.ok)return console.warn(`[embeddables] Identity sign failed (${F.status})`),null;const{token:H}=await F.json();return H}catch(F){return console.warn("[embeddables] Identity sign request failed:",F),null}},[n,r,e]),I=C.useCallback(L=>{const T=window.zE;T&&T("messenger","loginUser",async F=>{F(L)})},[]),j=C.useCallback(()=>{const L=window.zE;L&&L("messenger","logoutUser")},[]),D=C.useCallback(L=>{console.log("[embeddables] Running sign lifecycle for user:",L.id);const{email:T,name:F}=L,H={external_id:String(L.id)};(async()=>{const B=await M({...H,email:T,name:F});console.log("[embeddables] Enriched claims:",B);const V=await O({...H,...B,email:T,name:F});console.log("[embeddables] Sign result:",{hasToken:!!V}),V&&I(V)})()},[M,O,I]),$=C.useCallback(L=>{if(S.length>0&&N.current.size<S.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${N.current.size}/${S.length} ready`),E.current=L;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),D(L)},[S,D]);C.useEffect(()=>{if(!b){console.log("[embeddables] Identity effect skipped — extensions not loaded yet");return}if(console.log("[embeddables] Identity effect running",{initialized:b,customerId:!!a,extendExtensions:S.length}),a){console.log("[embeddables] Identity from props:",{customerId:a,customerEmail:s,customerName:i});const L={authenticated:!0,user:{id:String(a),email:s,name:i,provider:"shopify"}};x(T=>{var F,H;return T.authenticated&&((F=T.user)==null?void 0:F.id)===((H=L.user)==null?void 0:H.id)?T:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),$(L.user),A("login",L),L)})}else{if(a===void 0)return;x(L=>L.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),j(),A("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):L)}},[b,a,s,i,S,$,A,j]),C.useEffect(()=>{if(!b||a!==void 0)return;const L=()=>{const F=document.getElementById("stackable-identity");if(F)try{const H=JSON.parse(F.textContent??"{}"),B={authenticated:!0,user:{id:String(H.customerId??""),email:H.customerEmail,name:H.customerName,provider:"shopify"}};x(V=>{var U,X;return V.authenticated&&((U=V.user)==null?void 0:U.id)===((X=B.user)==null?void 0:X.id)?V:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),$(B.user),A("login",B),B)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else x(H=>H.authenticated?(j(),A("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):H)};L();const T=new MutationObserver(L);return T.observe(document.head,{childList:!0,subtree:!0}),T.observe(document.body,{childList:!0,subtree:!0}),()=>T.disconnect()},[b,a,$,A,j]),C.useEffect(()=>{if(!y.authenticated)return;const L=T=>{const F=T.data;if((F==null?void 0:F.type)!=="extension-ready")return;const H=F.extensionId,B=l.find(U=>U.id===H);if(!(B!=null&&B.manifest.permissions.includes("events:identity")))return;const V=B.manifest.events??[];!V.includes("identity")&&!V.includes("identity:login")||Me(H,{type:"extension-event",eventType:"identity",payload:{eventName:"login",data:{state:y,timestamp:Xn(new Date().toISOString())}}})};return window.addEventListener("message",L),()=>window.removeEventListener("message",L)},[y,l]),C.useEffect(()=>{if(S.length===0)return;const L=F=>{const H=F.data;if((H==null?void 0:H.type)!=="extension-ready")return;const B=H.extensionId;if(S.includes(B)&&(N.current.add(B),console.log(`[embeddables] extend:identity extension ready: ${B} (${N.current.size}/${S.length})`),N.current.size>=S.length&&E.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const V=E.current;E.current=null,D(V)}};window.addEventListener("message",L);const T=setTimeout(()=>{if(E.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${N.current.size}/${S.length} extensions ready`);const F=E.current;E.current=null,D(F)}},5e3);return()=>{window.removeEventListener("message",L),clearTimeout(T)}},[S,D]),C.useEffect(()=>{const L=T=>{const{detail:F}=T;F!=null&&F.eventName&&(F.eventName==="postback"?z({eventName:"postback",data:{actionName:F.data.actionName,conversationId:F.data.conversationId??"",timestamp:Xn(new Date().toISOString())}}):F.eventName==="context"&&P(H=>({...H,...F.data})))};return window.addEventListener("stackable:messaging",L),()=>window.removeEventListener("stackable:messaging",L)},[z]),C.useEffect(()=>{const L=T=>{const{detail:F}=T;F!=null&&F.eventName&&_({eventName:F.eventName,data:F.data??{}})};return window.addEventListener("stackable:activity",L),()=>window.removeEventListener("stackable:activity",L)},[_]),C.useEffect(()=>{var F;if(!b)return;const L={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:k,identity:y},T=mt();for(const[H,B]of T){if(!B.manifest.permissions.includes("context:read"))continue;const V=(F=p.get(H))==null?void 0:F.settings,U=V?{...L,settings:V}:L;Me(H,{type:"context-push",context:U})}},[b,a,s,i,y,k,p]);const q=C.useMemo(()=>({"data.query":async L=>Lc(L,t),"data.fetch":async(L,T)=>{const F=p.get(L);if(!F)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const H=mb(T)?T:{url:T.url,method:T.method??"GET",headers:T.headers??{},body:T.body??null},B=Xt(n,"/proxy"),V=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":L,"X-Application-Id":r??"",Authorization:`Bearer ${F.token}`},body:JSON.stringify(H)}),U=await V.json();return{status:U.status??V.status,ok:U.ok??V.ok,data:U.data}},"actions.toast":async(L,T)=>{const F={...T.description&&{description:T.description},...T.duration&&{duration:T.duration},...T.position&&{position:T.position},...T.dismissible!=null&&{dismissible:T.dismissible},...T.closeButton!=null&&{closeButton:T.closeButton}};if(T.fetch){const H=V=>new Promise(U=>setTimeout(U,V)),B=Promise.all([q["data.fetch"](L,T.fetch),H(hb)]).then(([V])=>V);wt.promise(B,{loading:T.loading??T.message,success:T.success??T.message,error:T.error??"Something went wrong",...F});return}switch(T.type){case"success":{wt.success(T.message,F);break}case"error":{wt.error(T.message,F);break}case"warning":{wt.warning(T.message,F);break}case"info":{wt.info(T.message,F);break}default:wt(T.message,F)}},"actions.invoke":async L=>(window.dispatchEvent(new CustomEvent(`stackable:action:${L.action}`,{detail:L})),{success:!0}),"context.read":async L=>{var T;return{customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:k,...((T=p.get(L))==null?void 0:T.settings)&&{settings:p.get(L).settings}}}}),[n,r,t,a,s,i,p,y,k]);return b?u.jsxs(u.Fragment,{children:[u.jsx(td,{extensions:l,capabilityHandlers:q,components:lb(),children:o}),u.jsx(pb,{extensions:l,tokenErrors:v})]}):null};var bb=(e,t,n,r,o,a,s,i)=>{let l=document.documentElement,d=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(v=>{let m=v==="class",b=m&&a?o.map(w=>a[w]||w):o;m?(l.classList.remove(...b),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(v,g)}),c(g)}function c(g){i&&d.includes(g)&&(l.style.colorScheme=g)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let g=localStorage.getItem(t)||n,v=s&&g==="system"?p():g;f(v)}catch{}},wb=h.createContext(void 0),yb={setTheme:e=>{},themes:[]},xb=()=>{var e;return(e=h.useContext(wb))!=null?e:yb};h.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:d})=>{let f=JSON.stringify([n,t,a,e,i,s,r,o]).slice(1,-1);return h.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${bb.toString()})(${f})`}})});const Cb=({...e})=>{const{theme:t="system"}=xb();return u.jsx(Ld,{theme:t,className:"toaster group",icons:{success:u.jsx(ea,{className:"size-4"}),info:u.jsx(en,{className:"size-4"}),warning:u.jsx(uu,{className:"size-4"}),error:u.jsx(au,{className:"size-4"}),loading:u.jsx(Qn,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},kb={dark:"dark",light:"widget-theme-light"},Sb={dark:"dark",light:"light"},Eb=({children:e,theme:t="inherit"})=>u.jsxs("div",{"data-id":"widget-body",className:kb[t],style:{position:"relative",transform:"translateZ(0)"},children:[u.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:u.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),u.jsx(Cb,{position:"bottom-center",theme:Sb[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Nb={airplay:Rd,"message-circle":na,"message-square":tr,headphones:nu,"help-circle":ta,bot:qd,sparkles:ra,zap:pu},Tb=({className:e})=>u.jsx("svg",{className:K(e,"scale-125"),viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M10,18 L6,22 L6,18 L10,18 Z M17,6 C19.7614237,6 22,8.23857625 22,11 C22,13.7614237 19.7614237,16 17,16 L7,16 C4.23857625,16 2,13.7614237 2,11 C2,8.23857625 4.23857625,6 7,6 Z",transform:"translate(12, 14) scale(-1, 1) translate(-12, -14)"})}),_b=({className:e})=>u.jsxs("svg",{className:e,viewBox:"0 0 190 190",fill:"currentColor","aria-hidden":"true",children:[u.jsxs("g",{id:"sl-half-right",children:[u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z"})}),u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",opacity:"0.3"})})]}),u.jsxs("g",{id:"sl-half-left",children:[u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z"})}),u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",opacity:"0.3"})})]})]}),zc=400,Ab=zc*.35,Pb=({icon:e,isOpen:t,onClick:n})=>{const r=Nb[e]??Tb,[o,a]=C.useState("idle"),s=C.useRef(t);C.useEffect(()=>{if(s.current===t)return;s.current=t,a("interstitial");const l=setTimeout(()=>a("idle"),Ab);return()=>clearTimeout(l)},[t]);const i=()=>o==="interstitial"?u.jsx(_b,{}):t?u.jsx(Qd,{}):u.jsx(r,{});return u.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:u.jsx(Yl,{size:"icon",className:K("h-12 w-12 rounded-full cursor-pointer transition-transform duration-300",t?"scale-115":"scale-100 hover:scale-105"),onClick:n,children:u.jsx("span",{className:K("flex items-center justify-center transition-transform",t&&"rotate-180"),style:{transitionDuration:`${zc}ms`},children:i()})})})},Ib=({children:e,icon:t,theme:n})=>{const[r,o]=C.useState(!1),[a,s]=C.useState(!0),[i,l]=C.useState(!1),d=C.useCallback(()=>{o(f=>!f)},[]);return C.useEffect(()=>{r&&!i&&l(!0)},[r,i]),C.useEffect(()=>{const f=()=>o(m=>!m),c=()=>o(!0),p=()=>o(!1),g=()=>s(!0),v=()=>{o(!1),s(!1)};return window.addEventListener("stackable:action:toggle",f),window.addEventListener("stackable:action:open",c),window.addEventListener("stackable:action:close",p),window.addEventListener("stackable:action:show",g),window.addEventListener("stackable:action:hide",v),()=>{window.removeEventListener("stackable:action:open",c),window.removeEventListener("stackable:action:close",p),window.removeEventListener("stackable:action:toggle",f),window.removeEventListener("stackable:action:show",g),window.removeEventListener("stackable:action:hide",v)}},[]),u.jsxs(u.Fragment,{children:[a&&u.jsx(Pb,{isOpen:r,icon:t,onClick:d}),i&&u.jsx("div",{"data-id":"widget-container",className:K("overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",r?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:u.jsx(Eb,{theme:n,children:e})})]})},Mb=({href:e,children:t})=>u.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100",children:t}),Lb=(e,t)=>{const[n,r]=C.useState(null),[o,a]=C.useState(!1),[s,i]=C.useState(null);return C.useEffect(()=>{if(!e){r(null);return}(async()=>{a(!0),i(null);try{const d=await Lc({action:"getCustomer",customerId:e},t);r(d)}catch(d){i(d)}finally{a(!1)}})()},[e,t]),{customer:n,loading:o,error:s}},Ob=({customerId:e,customerEmail:t,queryApiBase:n,children:r})=>{var l,d;const{customer:o,loading:a,error:s}=Lb(e,n);if(a)return u.jsx($t,{className:"border-none shadow-none bg-transparent",children:u.jsx(Ht,{className:"flex items-center justify-center p-6",children:u.jsx(Qn,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!o){const f=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=f.split(/[\s._-]+/).map(p=>p[0]).join("").slice(0,2).toUpperCase();return u.jsx($t,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:u.jsxs(Ht,{className:"p-4 pb-0 pt-2",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs(oo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[u.jsx(ao,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),u.jsx(so,{className:"text-lg",children:c})]}),u.jsxs("div",{className:"text-center w-full space-y-1",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),u.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:f})]}),t&&u.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[u.jsx(er,{className:"h-3 w-3","aria-hidden":"true"}),u.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),u.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]}),u.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=o.first_name)==null?void 0:l[0])||""}${((d=o.last_name)==null?void 0:d[0])||""}`;return u.jsx($t,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:u.jsx(Ht,{className:"p-4 pb-0 pt-2",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs(oo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[u.jsx(ao,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(o.name)}&background=7c3aed&color=fff&size=128`,alt:o.name}),u.jsx(so,{className:"text-lg",children:i})]}),u.jsxs("div",{className:"text-center w-full space-y-1",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),u.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:o.name})]}),u.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[u.jsx(er,{className:"h-3 w-3","aria-hidden":"true"}),u.jsx("span",{className:"truncate max-w-[200px]",children:o.email})]})}),u.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]})})})},Dc=(e,t)=>{C.useEffect(()=>{const n=t.current;if(!n)return;let r=document.getElementById(e);r||(r=document.createElement("div"),r.id=e,r.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(r));const o=new MutationObserver(()=>{for(;r.firstChild;)n.appendChild(document.adoptNode(r.firstChild))});return o.observe(r,{childList:!0,subtree:!0}),()=>{o.disconnect(),r==null||r.remove()}},[e,t])},zb=({customization:e})=>{const t=C.useRef(null);return Dc("widget_conversations",t),C.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),u.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Db=({customization:e})=>{const t=C.useRef(null);return Dc("widget_messages",t),C.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),u.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Lt="stackable:action",Mo=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"context",data:e}}))},Lo=25,Oo=75,Bb=({header:e,buttons:t,queryApiBase:n,customerId:r="",customerEmail:o="",primaryPercent:a=50})=>{const s=Math.max(Lo,Math.min(Oo,a)),{extensions:i}=Ro(),l=C.useMemo(()=>i.some(_=>_.enabled&&(_.manifest.targets.includes("slot.header")||_.manifest.targets.includes("slot.content"))),[i]),[d,f]=C.useState(!1),[c,p]=C.useState(!1),[g,v]=C.useState("extensions"),[m,b]=C.useState(s),[w,y]=C.useState("loading"),x=C.useRef(null),k=C.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",messageLog:{targetElement:"#widget_messages"},conversationList:{targetElement:"#widget_conversations"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},messageLog:{hideHeader:!0},conversationList:{hideHeader:!0,hideNewConversationButton:!0}}),!0),[]);C.useEffect(()=>{var j,D;const _=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),M=(D=(j=_==null?void 0:_.src)==null?void 0:j.match(/key=([a-f0-9-]+)/))==null?void 0:D[1];if(M&&fetch(`https://ekr.zdassets.com/compose/${M}`).then($=>$.text()).then($=>{var L;const q=(L=$.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:L[1];q&&Mo({appId:q})}).catch(()=>{}),k()){y("ready");return}const O=setInterval(()=>{k()&&(y("ready"),clearInterval(O))},100),I=setTimeout(()=>{clearInterval(O),y($=>$==="ready"?$:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(O),clearTimeout(I)}},[k]);const P=C.useCallback(_=>{!window.zE||!_.length||(console.log("[ZendeskMessenger] setConversationTags",_,{zE:!!window.zE}),window.zE("messenger:set","conversationTags",_))},[]),E=C.useCallback(_=>{!window.zE||!_.length||(console.log("[ZendeskMessenger] setConversationFields",_,{zE:!!window.zE}),window.zE("messenger:set","conversationFields",_))},[]),N=C.useCallback(_=>{if(!window.zE)return;const{tags:M=[],fields:O=[],...I}=_??{};P(M),E(O),window.zE("messenger:ui","newConversation",Object.keys(I).length?I:void 0)},[P,E]),S=C.useCallback(_=>{const{detail:M}=_;M!=null&&M.payload&&N(M.payload)},[N]);C.useEffect(()=>(window.addEventListener(`${Lt}:${bt.NEW_CONVERSATION}`,S),()=>{window.removeEventListener(`${Lt}:${bt.NEW_CONVERSATION}`,S)}),[S]),C.useEffect(()=>{const _=O=>{const{detail:I}=O;I!=null&&I.payload&&P(I.payload)},M=O=>{const{detail:I}=O;I!=null&&I.payload&&E(I.payload)};return window.addEventListener(`${Lt}:${bt.SET_CONVERSATION_TAGS}`,_),window.addEventListener(`${Lt}:${bt.SET_CONVERSATION_FIELDS}`,M),()=>{window.removeEventListener(`${Lt}:${bt.SET_CONVERSATION_TAGS}`,_),window.removeEventListener(`${Lt}:${bt.SET_CONVERSATION_FIELDS}`,M)}},[P,E]),C.useEffect(()=>{if(w!=="ready"||!window.zE)return;const _=window.zE("messenger:on","conversationStarted",I=>{var D,$;const j=($=(D=I==null?void 0:I.payload)==null?void 0:D.conversation)==null?void 0:$.id;j&&Mo({conversationId:j})}),M=window.zE("messenger:on","messagesShown",I=>{var D,$;const j=($=(D=I==null?void 0:I.payload)==null?void 0:D.conversation)==null?void 0:$.id;j&&Mo({conversationId:j})}),O=window.zE("messenger:on","postbackButtonClicked",I=>{var D;const j=I==null?void 0:I.payload;j!=null&&j.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"postback",data:{actionName:j.actionName,conversationId:((D=j.conversation)==null?void 0:D.id)??""}}}))});return()=>{typeof _=="function"&&_(),typeof M=="function"&&M(),typeof O=="function"&&O()}},[w]),C.useEffect(()=>{if(!d)return;const _=O=>{if(!x.current)return;const I=x.current.getBoundingClientRect();if((c?I.width:I.height)===0)return;const D=c?(O.clientX-I.left)/I.width*100:(O.clientY-I.top)/I.height*100,$=Math.max(Lo,Math.min(Oo,D));b($)},M=()=>{f(!1),document.body.style.cursor="",document.body.style.userSelect=""};return document.body.style.cursor=c?"col-resize":"row-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",_),window.addEventListener("mouseup",M),window.addEventListener("blur",M),()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",M),window.removeEventListener("blur",M),document.body.style.cursor="",document.body.style.userSelect=""}},[d,c]),C.useEffect(()=>{if(!x.current)return;const _=x.current,M=()=>{const I=getComputedStyle(_).flexDirection==="row";p(I)};M();const O=new ResizeObserver(M);return O.observe(_),()=>{O.disconnect()}},[]);const A=C.useCallback(_=>{if(_.detail===2){b(s);return}_.preventDefault(),f(!0)},[s]),z={customerId:r,customerEmail:o};return u.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[u.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),u.jsxs("div",{ref:x,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[l&&u.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${m}%`},children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[u.jsx("h2",{className:"font-semibold text-sm text-foreground",children:g==="extensions"?"My Profile":"My Conversations"}),u.jsxs("div",{className:"flex items-center gap-1",children:[e&&u.jsx("div",{className:"flex gap-1",children:e}),u.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[w==="ready"&&u.jsx("button",{onClick:()=>N({}),className:"rounded-md border border-transparent p-1.5 text-muted-foreground transition-colors hover:cursor-pointer hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",title:"New Conversation",children:u.jsx(lu,{className:"h-4 w-4"})}),t,u.jsx("button",{onClick:()=>v("conversations"),className:K("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:u.jsx(tr,{className:"h-4 w-4"})}),u.jsx("button",{onClick:()=>v("extensions"),className:K("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="extensions"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Profile",children:u.jsx(oa,{className:"h-4 w-4"})})]})]})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[u.jsxs("div",{className:K("flex flex-col gap-2",g==="conversations"&&"hidden"),children:[u.jsx(Ob,{customerId:r,customerEmail:o,queryApiBase:n,children:u.jsx(Jt,{target:"slot.header",context:z,className:"flex-none"})}),u.jsx(Jt,{target:"slot.content",context:z,className:"flex flex-col gap-2"})]}),u.jsx("div",{className:K("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",g==="extensions"&&"hidden"),children:w==="error"?u.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:u.jsx("p",{children:"Error loading conversations."})}):u.jsx(zb,{})})]})]}),u.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:l?`${100-m}%`:"100%"},children:[u.jsx("div",{className:"flex-1 overflow-hidden",children:w==="error"?u.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:u.jsx("p",{children:"Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured."})}):u.jsx(Db,{})}),u.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[u.jsx(Jt,{target:"slot.footer",context:z,className:"flex items-center gap-1",fallback:u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"powered by"}),u.jsx(Mb,{href:"https://zendesk.com",children:"Zendesk"})]})}),u.jsx(Jt,{target:"slot.footer-links",context:z,className:"flex items-center gap-1",separator:u.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:_,index:M})=>u.jsxs(u.Fragment,{children:[M===0&&u.jsx("span",{className:"text-zinc-300",children:"+"}),_]})})]})]}),l&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:K("group/resize absolute z-20 flex items-center justify-center",c?"top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize":"w-full h-3 -mt-2.5 cursor-row-resize"),style:c?{left:`${m}%`}:{top:`${m}%`},onMouseDown:A,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Lo,"aria-valuemax":Oo,"aria-valuenow":Math.round(m),children:u.jsx("div",{className:K("rounded-full bg-foreground/35 dark:bg-white shadow-[0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_rgba(0,0,0,0.22)] transition-all",c?"h-20 w-0.5":"h-0.5 w-20",d?"bg-foreground/70 dark:bg-white opacity-100":"opacity-70 group-hover/resize:bg-foreground/55 dark:group-hover/resize:bg-white group-hover/resize:opacity-100")})}),d&&u.jsx("div",{className:K("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>f(!1)})]})]})]})},Fb="ze-snippet",Bc=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,$b=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:n=!1,scriptId:r=Fb}=t;window.zEMessenger={autorender:n};const o=document.getElementById(r);if(o){if(o.getAttribute("src")===Bc(e))return Promise.resolve();o.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=r,i.src=Bc(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Hb=({queryApiBase:e,apiBase:t,appId:n,theme:r,icon:o,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:d})=>{const f=r==="dark"||r==="light"?r:"inherit";return C.useEffect(()=>{d&&$b(d).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[d]),u.jsx(vb,{instanceId:a,queryApiBase:e,apiBase:t,appId:n,customerId:s,customerEmail:i,customerName:l,children:u.jsx(Ib,{theme:f,icon:o,children:u.jsx(Bb,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class Vb extends HTMLElement{constructor(){super();Bo(this,"mountNode");Bo(this,"root");const n=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=jc,n.appendChild(r),this.mountNode=document.createElement("div"),n.appendChild(this.mountNode)}static get observedAttributes(){return["query-api-base","api-base","app-id","instance-id","theme","icon","customer-id","customer-email","customer-name","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var n;(n=this.root)==null||n.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const n=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",n==="dark"),this.root.render(u.jsx(Hb,{theme:n,icon:this.getAttribute("icon")??void 0,queryApiBase:this.getAttribute("query-api-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",instanceId:this.getAttribute("instance-id")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0,customerName:this.getAttribute("customer-name")??void 0,snippetKey:this.getAttribute("snippet-key")??""}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Vb)}));