@stackable-labs/embeddables 1.27.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.js +795 -791
- package/dist/embeddables.css +1 -1
- package/dist/react.js +3451 -3257
- package/dist/stackable-widget.external.js +56 -56
- package/dist/stackable-widget.js +64 -64
- package/dist/ui/src/components/badge.d.ts +1 -1
- package/dist/ui/src/components/button.d.ts +2 -2
- package/dist/ui/src/components/tabs.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,ve){typeof exports=="object"&&typeof module<"u"?ve(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"],ve):(d=typeof globalThis<"u"?globalThis:d||self,ve(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,ve,S,zr){"use strict";var Yv=Object.defineProperty;var qv=(d,ve,S)=>ve in d?Yv(d,ve,{enumerable:!0,configurable:!0,writable:!0,value:S}):d[ve]=S;var Ko=(d,ve,S)=>qv(d,typeof ve!="symbol"?ve+"":ve,S);function Zo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=Zo(S),$t=Zo(zr),yl='/*! tailwindcss v4.2.1 | 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-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-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;--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}.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)}.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}.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-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-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}@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\\: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-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}@keyframes spin{to{transform:rotate(360deg)}}',xl=()=>{try{return"88576596-915a-4875-8510-cfc57473e5ac"}catch{return"dev"}},et=new Map,kl=async(e,t)=>{const r=et.get(e.id);if(r)return r;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const o=document.createElement("iframe");if(o.setAttribute("sandbox","allow-scripts allow-same-origin"),o.style.display="none",o.style.width="0",o.style.height="0",o.style.border="none",e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js")){const i=new URL(e.bundleUrl);i.searchParams.set("__extensionId",e.id),o.src=i.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${i.toString()}`)}else{let i="";try{const u=xl();i=await(await fetch(`${e.bundleUrl}?_b=${u}`)).text()}catch(u){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,u)}const l=`<!DOCTYPE html>
|
|
1
|
+
(function(d,ve){typeof exports=="object"&&typeof module<"u"?ve(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"],ve):(d=typeof globalThis<"u"?globalThis:d||self,ve(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,ve,k,$r){"use strict";var Zv=Object.defineProperty;var Jv=(d,ve,k)=>ve in d?Zv(d,ve,{enumerable:!0,configurable:!0,writable:!0,value:k}):d[ve]=k;var Jo=(d,ve,k)=>Jv(d,typeof ve!="symbol"?ve+"":ve,k);function Qo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=Qo(k),Bt=Qo($r),Cl='/*! tailwindcss v4.2.1 | 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-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-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;--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}.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)}.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}.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-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}@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\\: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-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}@keyframes spin{to{transform:rotate(360deg)}}',El=()=>{try{return"ebc72504-2e31-406e-a678-48fbedf55457"}catch{return"dev"}},et=new Map,Nl=async(e,t)=>{const r=et.get(e.id);if(r)return r;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const o=document.createElement("iframe");if(o.setAttribute("sandbox","allow-scripts allow-same-origin"),o.style.display="none",o.style.width="0",o.style.height="0",o.style.border="none",e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js")){const i=new URL(e.bundleUrl);i.searchParams.set("__extensionId",e.id),o.src=i.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${i.toString()}`)}else{let i="";try{const u=El();i=await(await fetch(`${e.bundleUrl}?_b=${u}`)).text()}catch(u){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,u)}const l=`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
@@ -9,212 +9,212 @@
|
|
|
9
9
|
<script>var __STACKABLE_EXTENSION_ID__ = ${JSON.stringify(e.id)}; var process = { env: { NODE_ENV: "production" } };<\/script>
|
|
10
10
|
<script type="module">${i}<\/script>
|
|
11
11
|
</body>
|
|
12
|
-
</html>`;o.srcdoc=l,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${l.substring(0,300)}`)}t.appendChild(o);const a={extensionId:e.id,iframe:o,manifest:e.manifest,ready:!1,messageHandlers:new Set},s=i=>{const l=i.data;!l||typeof l!="object"||!("type"in l)||("extensionId"in l?l.extensionId:void 0)!==e.id||(l.type==="extension-ready"&&(a.ready=!0),a.messageHandlers.forEach(p=>p(l)))};return window.addEventListener("message",s),et.set(e.id,a),a},Ft=(e,t)=>{const r=et.get(e);if(!(r!=null&&r.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}r.iframe.contentWindow.postMessage(t,"*")},dt=e=>et.get(e),Sl=e=>{const t=et.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),et.delete(e))},Cl=()=>et,El=["ui-card","ui-card-content","ui-card-header","ui-button","ui-text","ui-heading","ui-badge","ui-input","ui-textarea","ui-select","ui-select-option","ui-checkbox","ui-switch","ui-label","ui-radio-group","ui-radio-group-item","ui-stack","ui-inline","ui-separator","ui-tabs","ui-tabs-list","ui-tabs-trigger","ui-tabs-content","ui-scroll-area","ui-avatar","ui-icon","ui-link","ui-menu","ui-menu-item","ui-skeleton","ui-tooltip","ui-progress","ui-alert","ui-collapsible","ui-collapsible-trigger","ui-collapsible-content"],Nl={"ui-card":["className","onClick"],"ui-card-content":["className"],"ui-card-header":["className"],"ui-button":["variant","size","disabled","onClick","type","className","title"],"ui-text":["className","tone"],"ui-heading":["level","className"],"ui-badge":["variant","hue","tone","className"],"ui-input":["type","placeholder","value","onChange","disabled","className","id"],"ui-textarea":["placeholder","value","onChange","disabled","rows","className","id"],"ui-select":["value","defaultValue","onChange","placeholder","disabled","className"],"ui-select-option":["value","disabled","className"],"ui-checkbox":["checked","onChange","disabled","className","id"],"ui-switch":["checked","onChange","disabled","size","className","id"],"ui-label":["htmlFor","className"],"ui-radio-group":["value","defaultValue","onChange","className"],"ui-radio-group-item":["value","disabled","className","id"],"ui-stack":["gap","direction","align","className"],"ui-inline":["gap","align","className"],"ui-separator":["className"],"ui-tabs":["defaultValue","className"],"ui-tabs-list":["className"],"ui-tabs-trigger":["value","className"],"ui-tabs-content":["value","className"],"ui-scroll-area":["className"],"ui-avatar":["src","alt","className"],"ui-icon":["name","size","className"],"ui-link":["href","target","rel","className"],"ui-menu-item":["icon","label","description","onClick","className"],"ui-menu":["title","className"],"ui-skeleton":["width","height","className"],"ui-tooltip":["content","className"],"ui-progress":["value","className"],"ui-alert":["variant","title","className"],"ui-collapsible":["defaultOpen","className"],"ui-collapsible-trigger":["className"],"ui-collapsible-content":["className"]},Tl={"ui-tabs":["ui-tabs-list","ui-tabs-content"],"ui-tabs-list":["ui-tabs-trigger"],"ui-card":["ui-card-header","ui-card-content"],"ui-menu":["ui-menu-item"],"ui-select":["ui-select-option"],"ui-radio-group":["ui-radio-group-item","ui-label","ui-inline"],"ui-collapsible":["ui-collapsible-trigger","ui-collapsible-content"]},_l={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke"},Jo={ADMIN:"org:super_admin"},Qo={ADMIN:"org:admin",OWNER:"org:owner"},Pl=[Jo.ADMIN,Qo.ADMIN,Qo.OWNER];[...Object.values(Jo),...Object.values(Pl)];const Al=e=>{const t=async r=>{const o=r.data;if((o==null?void 0:o.type)!=="capability-request")return;const n=o;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(r.data));const a=n.extensionId;if(!a||!dt(a)){const l=[...Cl().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${n.capability})`);return}const s=dt(a);if(!s)return;const i=_l[n.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:n.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Ft(a,l);return}try{let l;switch(n.capability){case"data.query":l=await e["data.query"](n.payload);break;case"data.fetch":l=await e["data.fetch"](a,n.payload);break;case"actions.toast":l=await e["actions.toast"](a,n.payload);break;case"actions.invoke":l=await e["actions.invoke"](n.payload);break;case"context.read":l=await e["context.read"]();break;default:throw new Error(`Unknown capability: ${n.capability}`)}const u={type:"capability-response",id:n.id,success:!0,data:l};Ft(a,u)}catch(l){const u={type:"capability-response",id:n.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Ft(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},en=S.createContext({extensions:[],components:{},ready:!1}),Il=({extensions:e,capabilityHandlers:t,components:r={},children:o})=>{const[n,a]=S.useState(!1),s=S.useRef(null),i=S.useRef(null);return S.useEffect(()=>{if(!s.current)return;let l=!1;return(async()=>{const p=s.current;if(p){console.log("[ExtensionProvider] Initializing with",e.length,"extensions"),i.current=Al(t);for(const c of e)c.enabled&&!l&&(console.log("[ExtensionProvider] Creating sandbox for",c.id,"bundleUrl:",c.bundleUrl),await kl(c,p),console.log("[ExtensionProvider] Sandbox created for",c.id));l||(console.log("[ExtensionProvider] Ready"),a(!0))}})(),()=>{var p;l=!0;for(const c of e)Sl(c.id);(p=i.current)==null||p.call(i)}},[e,t]),d.jsxs(en.Provider,{value:{extensions:e,components:r,ready:n},children:[d.jsx("div",{ref:s,style:{display:"none"}}),o]})},Ml=()=>S.useContext(en),Ol=e=>El.includes(e),Ll=(e,t)=>{const r={},o=[];if(!t)return{filtered:r,stripped:o};const n=Nl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){r[a]=s;continue}n!=null&&n.includes(a)?r[a]=s:o.push(a)}return{filtered:r,stripped:o}},zl=(e,t)=>{const r=Tl[e];if(!r||!t)return[];const o=[];for(const n of t)n.type!=="text"&&(!n.tag||n.tag==="__fragment"||r.includes(n.tag)||o.push(n.tag));return o},Bt=({target:e,context:t,className:r,separator:o,fallback:n=null,render:a})=>{const{extensions:s,components:i,ready:l}=Ml(),[u,p]=S.useState({}),c=S.useRef(""),h=S.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),m=S.useCallback((v,w,x=0)=>{var N,_,L;if(v.type==="text")return v.text||null;if(!v.tag)return null;if(v.tag==="__fragment")return d.jsx(S.Fragment,{children:(N=v.children)==null?void 0:N.map((M,z)=>m(M,w,z))},x);if(!Ol(v.tag))return console.warn(`[ExtensionHost] Unknown UI tag rejected: <${v.tag}>`),null;const y=i[v.tag];if(!y)return v.tag.startsWith("ui-")?(console.warn(`[ExtensionSlot] Unregistered UI tag: <${v.tag}>`),null):d.jsx(S.Fragment,{children:(_=v.children)==null?void 0:_.map((M,z)=>m(M,w,z))},x);const{filtered:k,stripped:T}=Ll(v.tag,v.attrs);T.length>0&&console.warn(`[ExtensionSlot] Attributes not allowed on <${v.tag}>, stripped: ${T.join(", ")}`);const C=zl(v.tag,v.children);if(C.length>0&&console.warn(`[ExtensionSlot] Invalid children in <${v.tag}>: ${C.join(", ")}`),v.actionId){const M=v.actionId;k.onClick=()=>{const z=w;z==null||z.postMessage({type:"action-invoke",surfaceId:e,actionId:M},"*")}}if(k["data-onchange-id"]){const M=k["data-onchange-id"];delete k["data-onchange-id"],k.onChange=z=>{const U=w;U==null||U.postMessage({type:"action-invoke",surfaceId:e,actionId:M,value:z.target.value},"*")}}const E=(L=v.children)==null?void 0:L.map((M,z)=>m(M,w,z));return S.createElement(y,{...k,key:x},E&&E.length>0?E:void 0)},[e,i]);if(S.useEffect(()=>{const v=h.map(x=>x.id).join(",");if(c.current!==v&&(c.current=v,p({})),!l||h.length===0)return;const w=x=>{const y=x.data;if(!(!y||typeof y!="object"||!h.some(T=>{const C=dt(T.id);return C&&x.source===C.iframe.contentWindow}))){if(y.type==="surface-update"&&y.surfaceId===e){const T=h.find(E=>{const N=dt(E.id);return N&&x.source===N.iframe.contentWindow});if(!T)return;const C=m(y.tree,x.source??null);p(E=>({...E,[T.id]:C}))}y.type==="surface-ready"&&y.surfaceId===e&&t&&h.forEach(T=>{var E;const C=dt(T.id);(E=C==null?void 0:C.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:t},"*")})}};return window.addEventListener("message",w),h.forEach(x=>{var k;const y=dt(x.id);(k=y==null?void 0:y.iframe.contentWindow)==null||k.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,m]),!l)return null;if(h.length===0)return n?d.jsx("div",{"data-extension-slot":e,title:e,className:r,children:n}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),g=b.length>0?b.flatMap((v,w,x)=>{const y=a?a({extensionId:v.id,children:v.children,index:w,total:x.length}):d.jsx(S.Fragment,{children:v.children},v.id),k=d.jsx(S.Fragment,{children:y},`extension:${v.id}`);if(w===0||!o)return[k];const T=x[w-1],C=typeof o=="function"?o({index:w,total:x.length,previousExtensionId:T.id,extensionId:v.id}):o;return[d.jsx(S.Fragment,{children:C},`separator:${T.id}:${v.id}:${w}`),k]}):n;return d.jsx("div",{"data-extension-slot":e,title:e,className:r,children:g})};function Dl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const $l=e=>{switch(e){case"success":return Hl;case"info":return Vl;case"warning":return Wl;case"error":return Ul;default:return null}},Fl=Array(12).fill(0),Bl=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},Fl.map((r,o)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Hl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),Wl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.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"})),Vl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),Ul=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),jl=S.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"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Rl=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Dr=1;class Gl{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:o,...n}=t,a=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Dr++,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:o}),{...l,...t,id:a,dismissible:i,title:o}):l):this.addToast({title:o,...n,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let a=o!==void 0,s;const i=n.then(async u=>{if(s=["resolve",u],S.isValidElement(u))a=!1,this.create({id:o,type:"default",message:u});else if(ql(u)&&!u.ok){a=!1;const c=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,h=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,b=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof r.error=="function"?await r.error(u):r.error,h=typeof r.description=="function"?await r.description(u):r.description,b=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:h,...b})}else if(r.success!==void 0){a=!1;const c=typeof r.success=="function"?await r.success(u):r.success,h=typeof r.description=="function"?await r.description(u):r.description,b=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:o,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],r.error!==void 0){a=!1;const p=typeof r.error=="function"?await r.error(u):r.error,c=typeof r.description=="function"?await r.description(u):r.description,m=typeof p=="object"&&!S.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:c,...m})}}).finally(()=>{a&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,r)=>{const o=(r==null?void 0:r.id)||Dr++;return this.create({jsx:t(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const he=new Gl,Yl=(e,t)=>{const r=(t==null?void 0:t.id)||Dr++;return he.addToast({title:e,...t,id:r}),r},ql=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Xl=Yl,Kl=()=>he.toasts,Zl=()=>he.getActiveToasts(),ut=Object.assign(Xl,{success:he.success,info:he.info,warning:he.warning,error:he.error,custom:he.custom,message:he.message,promise:he.promise,dismiss:he.dismiss,loading:he.loading},{getHistory:Kl,getToasts:Zl});Dl("[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 Ht(e){return e.label!==void 0}const Jl=3,Ql="24px",ec="16px",tn=4e3,tc=356,rc=14,oc=45,nc=200;function Me(...e){return e.filter(Boolean).join(" ")}function ac(e){const[t,r]=e.split("-"),o=[];return t&&o.push(t),r&&o.push(r),o}const sc=e=>{var t,r,o,n,a,s,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:m,setHeights:b,visibleToasts:g,heights:v,index:w,toasts:x,expanded:y,removeToast:k,defaultRichColors:T,closeButton:C,style:E,cancelButtonStyle:N,actionButtonStyle:_,className:L="",descriptionClassName:M="",duration:z,position:U,gap:Y,expandByDefault:Z,classNames:P,icons:$,closeButtonAriaLabel:D="Close toast"}=e,[Q,A]=S.useState(null),[se,ye]=S.useState(null),[R,re]=S.useState(!1),[j,ee]=S.useState(!1),[F,B]=S.useState(!1),[G,oe]=S.useState(!1),[J,X]=S.useState(!1),[le,ce]=S.useState(0),[lt,Je]=S.useState(0),Pe=S.useRef(c.duration||z||tn),Ir=S.useRef(null),me=S.useRef(null),$v=w===0,Fv=w+1<=g,xe=c.type,St=c.dismissible!==!1,Bv=c.className||"",Hv=c.descriptionClassName||"",Mr=S.useMemo(()=>v.findIndex(q=>q.toastId===c.id)||0,[v,c.id]),Wv=S.useMemo(()=>{var q;return(q=c.closeButton)!=null?q:C},[c.closeButton,C]),pl=S.useMemo(()=>c.duration||z||tn,[c.duration,z]),qo=S.useRef(0),Ct=S.useRef(0),hl=S.useRef(0),Et=S.useRef(null),[Vv,Uv]=U.split("-"),gl=S.useMemo(()=>v.reduce((q,de,pe)=>pe>=Mr?q:q+de.height,0),[v,Mr]),ml=Rl(),jv=c.invert||p,Xo=xe==="loading";Ct.current=S.useMemo(()=>Mr*Y+gl,[Mr,gl]),S.useEffect(()=>{Pe.current=pl},[pl]),S.useEffect(()=>{re(!0)},[]),S.useEffect(()=>{const q=me.current;if(q){const de=q.getBoundingClientRect().height;return Je(de),b(pe=>[{toastId:c.id,height:de,position:c.position},...pe]),()=>b(pe=>pe.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),S.useLayoutEffect(()=>{if(!R)return;const q=me.current,de=q.style.height;q.style.height="auto";const pe=q.getBoundingClientRect().height;q.style.height=de,Je(pe),b(ke=>ke.find(ue=>ue.toastId===c.id)?ke.map(ue=>ue.toastId===c.id?{...ue,height:pe}:ue):[{toastId:c.id,height:pe,position:c.position},...ke])},[R,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const Qe=S.useCallback(()=>{ee(!0),ce(Ct.current),b(q=>q.filter(de=>de.toastId!==c.id)),setTimeout(()=>{k(c)},nc)},[c,k,b,Ct]);S.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let q;return y||m||ml?(()=>{if(hl.current<qo.current){const ke=new Date().getTime()-qo.current;Pe.current=Pe.current-ke}hl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(qo.current=new Date().getTime(),q=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Qe()},Pe.current))})(),()=>clearTimeout(q)},[y,m,c,xe,ml,Qe]),S.useEffect(()=>{c.delete&&(Qe(),c.onDismiss==null||c.onDismiss.call(c,c))},[Qe,c.delete]);function Rv(){var q;if($!=null&&$.loading){var de;return S.createElement("div",{className:Me(P==null?void 0:P.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":xe==="loading"},$.loading)}return S.createElement(Bl,{className:Me(P==null?void 0:P.loader,c==null||(q=c.classNames)==null?void 0:q.loader),visible:xe==="loading"})}const Gv=c.icon||($==null?void 0:$[xe])||$l(xe);var vl,bl;return S.createElement("li",{tabIndex:0,ref:me,className:Me(L,Bv,P==null?void 0:P.toast,c==null||(t=c.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[xe],c==null||(r=c.classNames)==null?void 0:r[xe]),"data-sonner-toast":"","data-rich-colors":(vl=c.richColors)!=null?vl:T,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":R,"data-promise":!!c.promise,"data-swiped":J,"data-removed":j,"data-visible":Fv,"data-y-position":Vv,"data-x-position":Uv,"data-index":w,"data-front":$v,"data-swiping":F,"data-dismissible":St,"data-type":xe,"data-invert":jv,"data-swipe-out":G,"data-swipe-direction":se,"data-expanded":!!(y||Z&&R),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${j?le:Ct.current}px`,"--initial-height":Z?"auto":`${lt}px`,...E,...c.style},onDragEnd:()=>{B(!1),A(null),Et.current=null},onPointerDown:q=>{q.button!==2&&(Xo||!St||(Ir.current=new Date,ce(Ct.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(B(!0),Et.current={x:q.clientX,y:q.clientY})))},onPointerUp:()=>{var q,de,pe;if(G||!St)return;Et.current=null;const ke=Number(((q=me.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Or=Number(((de=me.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((pe=Ir.current)==null?void 0:pe.getTime()),Ce=Q==="x"?ke:Or,Lr=Math.abs(Ce)/ue;if(Math.abs(Ce)>=oc||Lr>.11){ce(Ct.current),c.onDismiss==null||c.onDismiss.call(c,c),ye(Q==="x"?ke>0?"right":"left":Or>0?"down":"up"),Qe(),oe(!0);return}else{var Ae,Ie;(Ae=me.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=me.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}X(!1),B(!1),A(null)},onPointerMove:q=>{var de,pe,ke;if(!Et.current||!St||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const ue=q.clientY-Et.current.y,Ce=q.clientX-Et.current.x;var Lr;const Ae=(Lr=e.swipeDirections)!=null?Lr:ac(U);!Q&&(Math.abs(Ce)>1||Math.abs(ue)>1)&&A(Math.abs(Ce)>Math.abs(ue)?"x":"y");let Ie={x:0,y:0};const wl=ct=>1/(1.5+Math.abs(ct)/20);if(Q==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ue<0||Ae.includes("bottom")&&ue>0)Ie.y=ue;else{const ct=ue*wl(ue);Ie.y=Math.abs(ct)<Math.abs(ue)?ct:ue}}else if(Q==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const ct=Ce*wl(Ce);Ie.x=Math.abs(ct)<Math.abs(Ce)?ct:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&X(!0),(pe=me.current)==null||pe.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=me.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Wv&&!c.jsx&&xe!=="loading"?S.createElement("button",{"aria-label":D,"data-disabled":Xo,"data-close-button":!0,onClick:Xo||!St?()=>{}:()=>{Qe(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Me(P==null?void 0:P.closeButton,c==null||(o=c.classNames)==null?void 0:o.closeButton)},(bl=$==null?void 0:$.close)!=null?bl:jl):null,(xe||c.icon||c.promise)&&c.icon!==null&&(($==null?void 0:$[xe])!==null||c.icon)?S.createElement("div",{"data-icon":"",className:Me(P==null?void 0:P.icon,c==null||(n=c.classNames)==null?void 0:n.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Rv():null,c.type!=="loading"?Gv:null):null,S.createElement("div",{"data-content":"",className:Me(P==null?void 0:P.content,c==null||(a=c.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:Me(P==null?void 0:P.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?S.createElement("div",{"data-description":"",className:Me(M,Hv,P==null?void 0:P.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),S.isValidElement(c.cancel)?c.cancel:c.cancel&&Ht(c.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:q=>{Ht(c.cancel)&&St&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,q),Qe())},className:Me(P==null?void 0:P.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,S.isValidElement(c.action)?c.action:c.action&&Ht(c.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||_,onClick:q=>{Ht(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,q),!q.defaultPrevented&&Qe())},className:Me(P==null?void 0:P.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function rn(){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 ic(e,t){const r={};return[e,t].forEach((o,n)=>{const a=n===1,s=a?"--mobile-offset":"--offset",i=a?ec:Ql;function l(u){["top","right","bottom","left"].forEach(p=>{r[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?r[`${s}-${u}`]=i:r[`${s}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(i)}),r}const lc=S.forwardRef(function(t,r){const{id:o,invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:m,duration:b,style:g,visibleToasts:v=Jl,toastOptions:w,dir:x=rn(),gap:y=rc,icons:k,containerAriaLabel:T="Notifications"}=t,[C,E]=S.useState([]),N=S.useMemo(()=>o?C.filter(R=>R.toasterId===o):C.filter(R=>!R.toasterId),[C,o]),_=S.useMemo(()=>Array.from(new Set([a].concat(N.filter(R=>R.position).map(R=>R.position)))),[N,a]),[L,M]=S.useState([]),[z,U]=S.useState(!1),[Y,Z]=S.useState(!1),[P,$]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=S.useRef(null),Q=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=S.useRef(null),se=S.useRef(!1),ye=S.useCallback(R=>{E(re=>{var j;return(j=re.find(ee=>ee.id===R.id))!=null&&j.delete||he.dismiss(R.id),re.filter(({id:ee})=>ee!==R.id)})},[]);return S.useEffect(()=>he.subscribe(R=>{if(R.dismiss){requestAnimationFrame(()=>{E(re=>re.map(j=>j.id===R.id?{...j,delete:!0}:j))});return}setTimeout(()=>{zr.flushSync(()=>{E(re=>{const j=re.findIndex(ee=>ee.id===R.id);return j!==-1?[...re.slice(0,j),{...re[j],...R},...re.slice(j+1)]:[R,...re]})})})}),[C]),S.useEffect(()=>{if(h!=="system"){$(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const R=window.matchMedia("(prefers-color-scheme: dark)");try{R.addEventListener("change",({matches:re})=>{$(re?"dark":"light")})}catch{R.addListener(({matches:j})=>{try{$(j?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),S.useEffect(()=>{C.length<=1&&U(!1)},[C]),S.useEffect(()=>{const R=re=>{var j;if(s.every(B=>re[B]||re.code===B)){var F;U(!0),(F=D.current)==null||F.focus()}re.code==="Escape"&&(document.activeElement===D.current||(j=D.current)!=null&&j.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[s]),S.useEffect(()=>{if(D.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,se.current=!1)}},[D.current]),S.createElement("section",{ref:r,"aria-label":`${T} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((R,re)=>{var j;const[ee,F]=R.split("-");return N.length?S.createElement("ol",{key:R,dir:x==="auto"?rn():x,tabIndex:-1,ref:D,className:u,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":ee,"data-x-position":F,style:{"--front-toast-height":`${((j=L[0])==null?void 0:j.height)||0}px`,"--width":`${tc}px`,"--gap":`${y}px`,...g,...ic(p,c)},onBlur:B=>{se.current&&!B.currentTarget.contains(B.relatedTarget)&&(se.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||se.current||(se.current=!0,A.current=B.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{Y||U(!1)},onDragEnd:()=>U(!1),onPointerDown:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},N.filter(B=>!B.position&&re===0||B.position===R).map((B,G)=>{var oe,J;return S.createElement(sc,{key:B.id,icons:k,index:G,toast:B,defaultRichColors:m,duration:(oe=w==null?void 0:w.duration)!=null?oe:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(J=w==null?void 0:w.closeButton)!=null?J:l,interacting:Y,position:R,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:ye,toasts:N.filter(X=>X.position==B.position),heights:L.filter(X=>X.position==B.position),setHeights:M,expandByDefault:i,gap:y,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),cc=e=>e.startsWith("http")&&!e.endsWith(".js"),on=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}},dc=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t+"=".repeat((4-t.length%4)%4);return atob(r)},uc=(e,t)=>{const r=e.indexOf(":");if(r===-1)return;const o=e.slice(0,r),n=e.slice(r+1);if(!(!o||!n)){if(!n.startsWith("http")){try{const a=JSON.parse(dc(n));if(a.url&&on(a.url))return{extensionId:o,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(on(n))return{extensionId:o,bundleUrl:n,mode:t}}},nn=(e,t,r)=>{const o=e.getAll(t);if(o.length===0)return[];const n=[];for(const a of o){const s=a.split(",");for(const i of s){const l=uc(i,r);l&&n.push(l)}}return n},an=e=>{const t=new URLSearchParams(e);try{const r=nn(t,"_stackable_dev","dev"),o=nn(t,"_stackable_staging","staging"),n=new Map;for(const a of r)n.set(a.extensionId,a);for(const a of o)n.set(a.extensionId,a);return Array.from(n.values())}catch{return[]}},fc=async(e,t)=>t.length===0?e:Promise.all(e.map(async r=>{const o=t.find(n=>n.extensionId===r.id);if(!o)return r;console.log(`[Stackable] Dev override active for ${r.id} → ${o.bundleUrl}`);try{const n=await fetch(`${o.bundleUrl}/manifest.json`);if(n.ok){const a=await n.json();return console.log(`[Stackable] Dev manifest loaded for ${r.id}`,a.permissions),{...r,bundleUrl:o.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${r.id}, using registry manifest`)}return{...r,bundleUrl:o.bundleUrl}}));/**
|
|
12
|
+
</html>`;o.srcdoc=l,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${l.substring(0,300)}`)}t.appendChild(o);const a={extensionId:e.id,iframe:o,manifest:e.manifest,ready:!1,messageHandlers:new Set},s=i=>{const l=i.data;!l||typeof l!="object"||!("type"in l)||("extensionId"in l?l.extensionId:void 0)!==e.id||(l.type==="extension-ready"&&(a.ready=!0),a.messageHandlers.forEach(p=>p(l)))};return window.addEventListener("message",s),et.set(e.id,a),a},Ht=(e,t)=>{const r=et.get(e);if(!(r!=null&&r.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}r.iframe.contentWindow.postMessage(t,"*")},dt=e=>et.get(e),Tl=e=>{const t=et.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),et.delete(e))},_l=()=>et,en={"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"]}},ut=en,Tt=Object.keys(en),Pl=Object.fromEntries(Tt.map(e=>[e,ut[e].attributes]));Object.fromEntries(Tt.filter(e=>ut[e].attributeValues).map(e=>[e,ut[e].attributeValues]));const Al=Object.fromEntries(Tt.filter(e=>ut[e].children).map(e=>[e,ut[e].children]));Object.fromEntries(Tt.map(e=>[e,ut[e].category]));const Il={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke"},tn={ADMIN:"org:super_admin"},rn={ADMIN:"org:admin",OWNER:"org:owner"},Ml=[tn.ADMIN,rn.ADMIN,rn.OWNER];[...Object.values(tn),...Object.values(Ml)];const Ol=e=>{const t=async r=>{const o=r.data;if((o==null?void 0:o.type)!=="capability-request")return;const n=o;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(r.data));const a=n.extensionId;if(!a||!dt(a)){const l=[..._l().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${n.capability})`);return}const s=dt(a);if(!s)return;const i=Il[n.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:n.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Ht(a,l);return}try{let l;switch(n.capability){case"data.query":l=await e["data.query"](n.payload);break;case"data.fetch":l=await e["data.fetch"](a,n.payload);break;case"actions.toast":l=await e["actions.toast"](a,n.payload);break;case"actions.invoke":l=await e["actions.invoke"](n.payload);break;case"context.read":l=await e["context.read"]();break;default:throw new Error(`Unknown capability: ${n.capability}`)}const u={type:"capability-response",id:n.id,success:!0,data:l};Ht(a,u)}catch(l){const u={type:"capability-response",id:n.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Ht(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},on=k.createContext({extensions:[],components:{},ready:!1}),Ll=({extensions:e,capabilityHandlers:t,components:r={},children:o})=>{const[n,a]=k.useState(!1),s=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>{if(!s.current)return;let l=!1;return(async()=>{const p=s.current;if(p){console.log("[ExtensionProvider] Initializing with",e.length,"extensions"),i.current=Ol(t);for(const c of e)c.enabled&&!l&&(console.log("[ExtensionProvider] Creating sandbox for",c.id,"bundleUrl:",c.bundleUrl),await Nl(c,p),console.log("[ExtensionProvider] Sandbox created for",c.id));l||(console.log("[ExtensionProvider] Ready"),a(!0))}})(),()=>{var p;l=!0;for(const c of e)Tl(c.id);(p=i.current)==null||p.call(i)}},[e,t]),d.jsxs(on.Provider,{value:{extensions:e,components:r,ready:n},children:[d.jsx("div",{ref:s,style:{display:"none"}}),o]})},zl=()=>k.useContext(on),Dl=e=>Tt.includes(e),$l=(e,t={})=>{const{surfaceId:r,logPrefix:o="[NodeRenderer]"}=t,n=(a,s,i=0)=>{var m,b,g;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return d.jsx(k.Fragment,{children:(m=a.children)==null?void 0:m.map((v,w)=>n(v,s,w))},i);if(!Dl(a.tag))return console.warn(`${o} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${o} Unregistered UI tag: <${a.tag}>`),null):d.jsx(k.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>n(v,s,w))},i);const{filtered:u,stripped:p}=Fl(a.tag,a.attrs);p.length>0&&console.warn(`${o} Attributes not allowed on <${a.tag}>, stripped: ${p.join(", ")}`);const c=Bl(a.tag,a.children);if(c.length>0&&console.warn(`${o} 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:r,actionId:v},"*")}}if(u["data-onchange-id"]){const v=u["data-onchange-id"];delete u["data-onchange-id"],u.onChange=w=>{const x=s;x==null||x.postMessage({type:"action-invoke",surfaceId:r,actionId:v,value:w.target.value},"*")}}const h=(g=a.children)==null?void 0:g.map((v,w)=>n(v,s,w));return k.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return n},Fl=(e,t)=>{const r={},o=[];if(!t)return{filtered:r,stripped:o};const n=Pl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){r[a]=s;continue}n!=null&&n.includes(a)?r[a]=s:o.push(a)}return{filtered:r,stripped:o}},Bl=(e,t)=>{const r=Al[e];if(!r||!t)return[];const o=[];for(const n of t)n.type!=="text"&&(!n.tag||n.tag==="__fragment"||r.includes(n.tag)||o.push(n.tag));return o},Vt=({target:e,context:t,className:r,separator:o,fallback:n=null,render:a})=>{const{extensions:s,components:i,ready:l}=zl(),[u,p]=k.useState({}),c=k.useRef(""),h=k.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),m=k.useMemo(()=>$l(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(k.useEffect(()=>{const v=h.map(x=>x.id).join(",");if(c.current!==v&&(c.current=v,p({})),!l||h.length===0)return;const w=x=>{const y=x.data;if(!(!y||typeof y!="object"||!h.some(T=>{const C=dt(T.id);return C&&x.source===C.iframe.contentWindow}))){if(y.type==="surface-update"&&y.surfaceId===e){const T=h.find(E=>{const N=dt(E.id);return N&&x.source===N.iframe.contentWindow});if(!T)return;const C=m(y.tree,x.source??null);p(E=>({...E,[T.id]:C}))}y.type==="surface-ready"&&y.surfaceId===e&&t&&h.forEach(T=>{var E;const C=dt(T.id);(E=C==null?void 0:C.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:t},"*")})}};return window.addEventListener("message",w),h.forEach(x=>{var S;const y=dt(x.id);(S=y==null?void 0:y.iframe.contentWindow)==null||S.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,m]),!l)return null;if(h.length===0)return n?d.jsx("div",{"data-extension-slot":e,title:e,className:r,children:n}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),g=b.length>0?b.flatMap((v,w,x)=>{const y=a?a({extensionId:v.id,children:v.children,index:w,total:x.length}):d.jsx(k.Fragment,{children:v.children},v.id),S=d.jsx(k.Fragment,{children:y},`extension:${v.id}`);if(w===0||!o)return[S];const T=x[w-1],C=typeof o=="function"?o({index:w,total:x.length,previousExtensionId:T.id,extensionId:v.id}):o;return[d.jsx(k.Fragment,{children:C},`separator:${T.id}:${v.id}:${w}`),S]}):n;return d.jsx("div",{"data-extension-slot":e,title:e,className:r,children:g})};function Hl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const Vl=e=>{switch(e){case"success":return jl;case"info":return Gl;case"warning":return Rl;case"error":return Yl;default:return null}},Wl=Array(12).fill(0),Ul=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},Wl.map((r,o)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),jl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.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"})),Rl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},k.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"})),Gl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.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"})),Yl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.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"})),ql=k.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"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Xl=()=>{const[e,t]=k.useState(document.hidden);return k.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Fr=1;class Kl{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:o,...n}=t,a=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Fr++,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:o}),{...l,...t,id:a,dismissible:i,title:o}):l):this.addToast({title:o,...n,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let a=o!==void 0,s;const i=n.then(async u=>{if(s=["resolve",u],k.isValidElement(u))a=!1,this.create({id:o,type:"default",message:u});else if(Jl(u)&&!u.ok){a=!1;const c=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,h=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof r.error=="function"?await r.error(u):r.error,h=typeof r.description=="function"?await r.description(u):r.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:h,...b})}else if(r.success!==void 0){a=!1;const c=typeof r.success=="function"?await r.success(u):r.success,h=typeof r.description=="function"?await r.description(u):r.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:o,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],r.error!==void 0){a=!1;const p=typeof r.error=="function"?await r.error(u):r.error,c=typeof r.description=="function"?await r.description(u):r.description,m=typeof p=="object"&&!k.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:c,...m})}}).finally(()=>{a&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,r)=>{const o=(r==null?void 0:r.id)||Fr++;return this.create({jsx:t(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const he=new Kl,Zl=(e,t)=>{const r=(t==null?void 0:t.id)||Fr++;return he.addToast({title:e,...t,id:r}),r},Jl=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ql=Zl,ec=()=>he.toasts,tc=()=>he.getActiveToasts(),ft=Object.assign(Ql,{success:he.success,info:he.info,warning:he.warning,error:he.error,custom:he.custom,message:he.message,promise:he.promise,dismiss:he.dismiss,loading:he.loading},{getHistory:ec,getToasts:tc});Hl("[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 Wt(e){return e.label!==void 0}const rc=3,oc="24px",nc="16px",nn=4e3,ac=356,sc=14,ic=45,lc=200;function Me(...e){return e.filter(Boolean).join(" ")}function cc(e){const[t,r]=e.split("-"),o=[];return t&&o.push(t),r&&o.push(r),o}const dc=e=>{var t,r,o,n,a,s,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:m,setHeights:b,visibleToasts:g,heights:v,index:w,toasts:x,expanded:y,removeToast:S,defaultRichColors:T,closeButton:C,style:E,cancelButtonStyle:N,actionButtonStyle:_,className:O="",descriptionClassName:$="",duration:W,position:j,gap:Y,expandByDefault:Z,classNames:P,icons:z,closeButtonAriaLabel:L="Close toast"}=e,[Q,A]=k.useState(null),[se,ye]=k.useState(null),[R,re]=k.useState(!1),[U,ee]=k.useState(!1),[D,F]=k.useState(!1),[G,oe]=k.useState(!1),[J,X]=k.useState(!1),[le,ce]=k.useState(0),[lt,Je]=k.useState(0),Pe=k.useRef(c.duration||W||nn),Or=k.useRef(null),me=k.useRef(null),Vv=w===0,Wv=w+1<=g,xe=c.type,Ct=c.dismissible!==!1,Uv=c.className||"",jv=c.descriptionClassName||"",Lr=k.useMemo(()=>v.findIndex(q=>q.toastId===c.id)||0,[v,c.id]),Rv=k.useMemo(()=>{var q;return(q=c.closeButton)!=null?q:C},[c.closeButton,C]),vl=k.useMemo(()=>c.duration||W||nn,[c.duration,W]),Ko=k.useRef(0),Et=k.useRef(0),bl=k.useRef(0),Nt=k.useRef(null),[Gv,Yv]=j.split("-"),wl=k.useMemo(()=>v.reduce((q,de,pe)=>pe>=Lr?q:q+de.height,0),[v,Lr]),yl=Xl(),qv=c.invert||p,Zo=xe==="loading";Et.current=k.useMemo(()=>Lr*Y+wl,[Lr,wl]),k.useEffect(()=>{Pe.current=vl},[vl]),k.useEffect(()=>{re(!0)},[]),k.useEffect(()=>{const q=me.current;if(q){const de=q.getBoundingClientRect().height;return Je(de),b(pe=>[{toastId:c.id,height:de,position:c.position},...pe]),()=>b(pe=>pe.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),k.useLayoutEffect(()=>{if(!R)return;const q=me.current,de=q.style.height;q.style.height="auto";const pe=q.getBoundingClientRect().height;q.style.height=de,Je(pe),b(ke=>ke.find(ue=>ue.toastId===c.id)?ke.map(ue=>ue.toastId===c.id?{...ue,height:pe}:ue):[{toastId:c.id,height:pe,position:c.position},...ke])},[R,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const Qe=k.useCallback(()=>{ee(!0),ce(Et.current),b(q=>q.filter(de=>de.toastId!==c.id)),setTimeout(()=>{S(c)},lc)},[c,S,b,Et]);k.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let q;return y||m||yl?(()=>{if(bl.current<Ko.current){const ke=new Date().getTime()-Ko.current;Pe.current=Pe.current-ke}bl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(Ko.current=new Date().getTime(),q=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Qe()},Pe.current))})(),()=>clearTimeout(q)},[y,m,c,xe,yl,Qe]),k.useEffect(()=>{c.delete&&(Qe(),c.onDismiss==null||c.onDismiss.call(c,c))},[Qe,c.delete]);function Xv(){var q;if(z!=null&&z.loading){var de;return k.createElement("div",{className:Me(P==null?void 0:P.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":xe==="loading"},z.loading)}return k.createElement(Ul,{className:Me(P==null?void 0:P.loader,c==null||(q=c.classNames)==null?void 0:q.loader),visible:xe==="loading"})}const Kv=c.icon||(z==null?void 0:z[xe])||Vl(xe);var xl,kl;return k.createElement("li",{tabIndex:0,ref:me,className:Me(O,Uv,P==null?void 0:P.toast,c==null||(t=c.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[xe],c==null||(r=c.classNames)==null?void 0:r[xe]),"data-sonner-toast":"","data-rich-colors":(xl=c.richColors)!=null?xl:T,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":R,"data-promise":!!c.promise,"data-swiped":J,"data-removed":U,"data-visible":Wv,"data-y-position":Gv,"data-x-position":Yv,"data-index":w,"data-front":Vv,"data-swiping":D,"data-dismissible":Ct,"data-type":xe,"data-invert":qv,"data-swipe-out":G,"data-swipe-direction":se,"data-expanded":!!(y||Z&&R),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${U?le:Et.current}px`,"--initial-height":Z?"auto":`${lt}px`,...E,...c.style},onDragEnd:()=>{F(!1),A(null),Nt.current=null},onPointerDown:q=>{q.button!==2&&(Zo||!Ct||(Or.current=new Date,ce(Et.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(F(!0),Nt.current={x:q.clientX,y:q.clientY})))},onPointerUp:()=>{var q,de,pe;if(G||!Ct)return;Nt.current=null;const ke=Number(((q=me.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zr=Number(((de=me.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((pe=Or.current)==null?void 0:pe.getTime()),Ce=Q==="x"?ke:zr,Dr=Math.abs(Ce)/ue;if(Math.abs(Ce)>=ic||Dr>.11){ce(Et.current),c.onDismiss==null||c.onDismiss.call(c,c),ye(Q==="x"?ke>0?"right":"left":zr>0?"down":"up"),Qe(),oe(!0);return}else{var Ae,Ie;(Ae=me.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=me.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}X(!1),F(!1),A(null)},onPointerMove:q=>{var de,pe,ke;if(!Nt.current||!Ct||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const ue=q.clientY-Nt.current.y,Ce=q.clientX-Nt.current.x;var Dr;const Ae=(Dr=e.swipeDirections)!=null?Dr:cc(j);!Q&&(Math.abs(Ce)>1||Math.abs(ue)>1)&&A(Math.abs(Ce)>Math.abs(ue)?"x":"y");let Ie={x:0,y:0};const Sl=ct=>1/(1.5+Math.abs(ct)/20);if(Q==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ue<0||Ae.includes("bottom")&&ue>0)Ie.y=ue;else{const ct=ue*Sl(ue);Ie.y=Math.abs(ct)<Math.abs(ue)?ct:ue}}else if(Q==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const ct=Ce*Sl(Ce);Ie.x=Math.abs(ct)<Math.abs(Ce)?ct:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&X(!0),(pe=me.current)==null||pe.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=me.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Rv&&!c.jsx&&xe!=="loading"?k.createElement("button",{"aria-label":L,"data-disabled":Zo,"data-close-button":!0,onClick:Zo||!Ct?()=>{}:()=>{Qe(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Me(P==null?void 0:P.closeButton,c==null||(o=c.classNames)==null?void 0:o.closeButton)},(kl=z==null?void 0:z.close)!=null?kl:ql):null,(xe||c.icon||c.promise)&&c.icon!==null&&((z==null?void 0:z[xe])!==null||c.icon)?k.createElement("div",{"data-icon":"",className:Me(P==null?void 0:P.icon,c==null||(n=c.classNames)==null?void 0:n.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Xv():null,c.type!=="loading"?Kv:null):null,k.createElement("div",{"data-content":"",className:Me(P==null?void 0:P.content,c==null||(a=c.classNames)==null?void 0:a.content)},k.createElement("div",{"data-title":"",className:Me(P==null?void 0:P.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?k.createElement("div",{"data-description":"",className:Me($,jv,P==null?void 0:P.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),k.isValidElement(c.cancel)?c.cancel:c.cancel&&Wt(c.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:q=>{Wt(c.cancel)&&Ct&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,q),Qe())},className:Me(P==null?void 0:P.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,k.isValidElement(c.action)?c.action:c.action&&Wt(c.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||_,onClick:q=>{Wt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,q),!q.defaultPrevented&&Qe())},className:Me(P==null?void 0:P.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function an(){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 uc(e,t){const r={};return[e,t].forEach((o,n)=>{const a=n===1,s=a?"--mobile-offset":"--offset",i=a?nc:oc;function l(u){["top","right","bottom","left"].forEach(p=>{r[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?r[`${s}-${u}`]=i:r[`${s}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(i)}),r}const fc=k.forwardRef(function(t,r){const{id:o,invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:m,duration:b,style:g,visibleToasts:v=rc,toastOptions:w,dir:x=an(),gap:y=sc,icons:S,containerAriaLabel:T="Notifications"}=t,[C,E]=k.useState([]),N=k.useMemo(()=>o?C.filter(R=>R.toasterId===o):C.filter(R=>!R.toasterId),[C,o]),_=k.useMemo(()=>Array.from(new Set([a].concat(N.filter(R=>R.position).map(R=>R.position)))),[N,a]),[O,$]=k.useState([]),[W,j]=k.useState(!1),[Y,Z]=k.useState(!1),[P,z]=k.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),L=k.useRef(null),Q=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=k.useRef(null),se=k.useRef(!1),ye=k.useCallback(R=>{E(re=>{var U;return(U=re.find(ee=>ee.id===R.id))!=null&&U.delete||he.dismiss(R.id),re.filter(({id:ee})=>ee!==R.id)})},[]);return k.useEffect(()=>he.subscribe(R=>{if(R.dismiss){requestAnimationFrame(()=>{E(re=>re.map(U=>U.id===R.id?{...U,delete:!0}:U))});return}setTimeout(()=>{$r.flushSync(()=>{E(re=>{const U=re.findIndex(ee=>ee.id===R.id);return U!==-1?[...re.slice(0,U),{...re[U],...R},...re.slice(U+1)]:[R,...re]})})})}),[C]),k.useEffect(()=>{if(h!=="system"){z(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const R=window.matchMedia("(prefers-color-scheme: dark)");try{R.addEventListener("change",({matches:re})=>{z(re?"dark":"light")})}catch{R.addListener(({matches:U})=>{try{z(U?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),k.useEffect(()=>{C.length<=1&&j(!1)},[C]),k.useEffect(()=>{const R=re=>{var U;if(s.every(F=>re[F]||re.code===F)){var D;j(!0),(D=L.current)==null||D.focus()}re.code==="Escape"&&(document.activeElement===L.current||(U=L.current)!=null&&U.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[s]),k.useEffect(()=>{if(L.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,se.current=!1)}},[L.current]),k.createElement("section",{ref:r,"aria-label":`${T} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((R,re)=>{var U;const[ee,D]=R.split("-");return N.length?k.createElement("ol",{key:R,dir:x==="auto"?an():x,tabIndex:-1,ref:L,className:u,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":ee,"data-x-position":D,style:{"--front-toast-height":`${((U=O[0])==null?void 0:U.height)||0}px`,"--width":`${ac}px`,"--gap":`${y}px`,...g,...uc(p,c)},onBlur:F=>{se.current&&!F.currentTarget.contains(F.relatedTarget)&&(se.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||se.current||(se.current=!0,A.current=F.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{Y||j(!1)},onDragEnd:()=>j(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},N.filter(F=>!F.position&&re===0||F.position===R).map((F,G)=>{var oe,J;return k.createElement(dc,{key:F.id,icons:S,index:G,toast:F,defaultRichColors:m,duration:(oe=w==null?void 0:w.duration)!=null?oe:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(J=w==null?void 0:w.closeButton)!=null?J:l,interacting:Y,position:R,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:ye,toasts:N.filter(X=>X.position==F.position),heights:O.filter(X=>X.position==F.position),setHeights:$,expandByDefault:i,gap:y,expanded:W,swipeDirections:t.swipeDirections})})):null}))}),pc=e=>e.startsWith("http")&&!e.endsWith(".js"),sn=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}},hc=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t+"=".repeat((4-t.length%4)%4);return atob(r)},gc=(e,t)=>{const r=e.indexOf(":");if(r===-1)return;const o=e.slice(0,r),n=e.slice(r+1);if(!(!o||!n)){if(!n.startsWith("http")){try{const a=JSON.parse(hc(n));if(a.url&&sn(a.url))return{extensionId:o,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(sn(n))return{extensionId:o,bundleUrl:n,mode:t}}},ln=(e,t,r)=>{const o=e.getAll(t);if(o.length===0)return[];const n=[];for(const a of o){const s=a.split(",");for(const i of s){const l=gc(i,r);l&&n.push(l)}}return n},cn=e=>{const t=new URLSearchParams(e);try{const r=ln(t,"_stackable_dev","dev"),o=ln(t,"_stackable_staging","staging"),n=new Map;for(const a of r)n.set(a.extensionId,a);for(const a of o)n.set(a.extensionId,a);return Array.from(n.values())}catch{return[]}},mc=async(e,t)=>t.length===0?e:Promise.all(e.map(async r=>{const o=t.find(n=>n.extensionId===r.id);if(!o)return r;console.log(`[Stackable] Dev override active for ${r.id} → ${o.bundleUrl}`);try{const n=await fetch(`${o.bundleUrl}/manifest.json`);if(n.ok){const a=await n.json();return console.log(`[Stackable] Dev manifest loaded for ${r.id}`,a.permissions),{...r,bundleUrl:o.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${r.id}, using registry manifest`)}return{...r,bundleUrl:o.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
|
|
17
|
+
*/const dn=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).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
|
|
22
|
+
*/const vc=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
|
|
27
|
+
*/const bc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.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
|
|
32
|
+
*/const un=e=>{const t=bc(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
|
|
37
|
+
*/var wc={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
|
|
42
|
+
*/const yc=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
|
|
47
|
+
*/const xc=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:s,...i},l)=>k.createElement("svg",{ref:l,...wc,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:dn("lucide",n),...!a&&!yc(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,p])=>k.createElement(u,p)),...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 ne=(e,t)=>{const r=
|
|
52
|
+
*/const ne=(e,t)=>{const r=k.forwardRef(({className:o,...n},a)=>k.createElement(xc,{ref:a,iconNode:t,className:dn(`lucide-${vc(un(e))}`,`lucide-${e}`,o),...n}));return r.displayName=un(e),r};/**
|
|
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
|
|
57
|
+
*/const kc=ne("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
|
|
62
|
+
*/const Sc=ne("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
|
|
67
|
+
*/const Cc=ne("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
|
|
72
|
+
*/const Ec=ne("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"}]]);/**
|
|
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
|
|
77
|
+
*/const fn=ne("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
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
|
|
82
|
+
*/const pn=ne("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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
|
|
87
|
+
*/const Nc=ne("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
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
|
|
92
|
+
*/const Br=ne("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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
|
|
97
|
+
*/const Tc=ne("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
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
|
|
102
|
+
*/const hn=ne("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"}]]);/**
|
|
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
|
|
107
|
+
*/const gn=ne("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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
|
|
112
|
+
*/const _c=ne("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"}]]);/**
|
|
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
|
|
117
|
+
*/const Pc=ne("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"}]]);/**
|
|
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
|
|
122
|
+
*/const Ac=ne("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
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
|
|
127
|
+
*/const Ic=ne("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
|
|
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
|
|
132
|
+
*/const Mc=ne("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"}]]);/**
|
|
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
|
|
137
|
+
*/const Oc=ne("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"}]]);/**
|
|
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
|
|
142
|
+
*/const Ut=ne("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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
|
|
147
|
+
*/const Hr=ne("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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
|
|
152
|
+
*/const Vr=ne("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"}]]);/**
|
|
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
|
|
157
|
+
*/const Lc=ne("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"}]]);/**
|
|
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
|
|
162
|
+
*/const zc=ne("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"}]]);/**
|
|
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
|
|
167
|
+
*/const mn=ne("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"}]]);/**
|
|
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
|
|
172
|
+
*/const Dc=ne("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"}]]);/**
|
|
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
|
|
177
|
+
*/const $c=ne("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"}]]);/**
|
|
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
|
|
182
|
+
*/const Fc=ne("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"}]]);/**
|
|
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
|
|
187
|
+
*/const Bc=ne("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
|
|
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
|
|
192
|
+
*/const Hc=ne("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"}]]);/**
|
|
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
|
|
197
|
+
*/const Vc=ne("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"}]]);/**
|
|
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
|
|
202
|
+
*/const Wc=ne("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"}]]);/**
|
|
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
|
|
207
|
+
*/const Uc=ne("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"}]]);/**
|
|
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 hn=ne("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"}]]);function gn(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=gn(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function mn(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=gn(e))&&(o&&(o+=" "),o+=t);return o}const Hc=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},Wc=(e,t)=>({classGroupId:e,validator:t}),vn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Vt="-",bn=[],Vc="arbitrary..",Uc=e=>{const t=Rc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return jc(s);const i=s.split(Vt),l=i[0]===""&&i.length>1?1:0;return wn(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=o[s],u=r[s];return l?u?Hc(u,l):l:u||bn}return r[s]||bn}}},wn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],a=r.nextPart.get(n);if(a){const u=wn(e,t+1,a);if(u)return u}const s=r.validators;if(s===null)return;const i=t===0?e.join(Vt):e.slice(t).join(Vt),l=s.length;for(let u=0;u<l;u++){const p=s[u];if(p.validator(i))return p.classGroupId}},jc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?Vc+o:void 0})(),Rc=e=>{const{theme:t,classGroups:r}=e;return Gc(r,t)},Gc=(e,t)=>{const r=vn();for(const o in e){const n=e[o];Hr(n,r,o,t)}return r},Hr=(e,t,r,o)=>{const n=e.length;for(let a=0;a<n;a++){const s=e[a];Yc(s,t,r,o)}},Yc=(e,t,r,o)=>{if(typeof e=="string"){qc(e,t,r);return}if(typeof e=="function"){Xc(e,t,r,o);return}Kc(e,t,r,o)},qc=(e,t,r)=>{const o=e===""?t:yn(t,e);o.classGroupId=r},Xc=(e,t,r,o)=>{if(Zc(e)){Hr(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Wc(r,e))},Kc=(e,t,r,o)=>{const n=Object.entries(e),a=n.length;for(let s=0;s<a;s++){const[i,l]=n[s];Hr(l,yn(t,i),r,o)}},yn=(e,t)=>{let r=e;const o=t.split(Vt),n=o.length;for(let a=0;a<n;a++){const s=o[a];let i=r.nextPart.get(s);i||(i=vn(),r.nextPart.set(s,i)),r=i}return r},Zc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(a,s)=>{r[a]=s,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=o[a])!==void 0)return n(a,s),s},set(a,s){a in r?r[a]=s:n(a,s)}}},Wr="!",xn=":",Qc=[],kn=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),ed=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const a=[];let s=0,i=0,l=0,u;const p=n.length;for(let g=0;g<p;g++){const v=n[g];if(s===0&&i===0){if(v===xn){a.push(n.slice(l,g)),l=g+1;continue}if(v==="/"){u=g;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?n:n.slice(l);let h=c,m=!1;c.endsWith(Wr)?(h=c.slice(0,-1),m=!0):c.startsWith(Wr)&&(h=c.slice(1),m=!0);const b=u&&u>l?u-l:void 0;return kn(a,m,h,b)};if(t){const n=t+xn,a=o;o=s=>s.startsWith(n)?a(s.slice(n.length)):kn(Qc,!1,s,void 0,!0)}if(r){const n=o;o=a=>r({className:a,parseClassName:n})}return o},td=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let n=[];for(let a=0;a<r.length;a++){const s=r[a],i=s[0]==="[",l=t.has(s);i||l?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(s)):n.push(s)}return n.length>0&&(n.sort(),o.push(...n)),o}},rd=e=>({cache:Jc(e.cacheSize),parseClassName:ed(e),sortModifiers:td(e),...Uc(e)}),od=/\s+/,nd=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(od);let l="";for(let u=i.length-1;u>=0;u-=1){const p=i[u],{isExternal:c,modifiers:h,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}=r(p);if(c){l=p+(l.length>0?" "+l:l);continue}let v=!!g,w=o(v?b.substring(0,g):b);if(!w){if(!v){l=p+(l.length>0?" "+l:l);continue}if(w=o(b),!w){l=p+(l.length>0?" "+l:l);continue}v=!1}const x=h.length===0?"":h.length===1?h[0]:a(h).join(":"),y=m?x+Wr:x,k=y+w;if(s.indexOf(k)>-1)continue;s.push(k);const T=n(w,v);for(let C=0;C<T.length;++C){const E=T[C];s.push(y+E)}l=p+(l.length>0?" "+l:l)}return l},ad=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=Sn(r))&&(n&&(n+=" "),n+=o);return n},Sn=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Sn(e[o]))&&(r&&(r+=" "),r+=t);return r},sd=(e,...t)=>{let r,o,n,a;const s=l=>{const u=t.reduce((p,c)=>c(p),e());return r=rd(u),o=r.cache.get,n=r.cache.set,a=i,i(l)},i=l=>{const u=o(l);if(u)return u;const p=nd(l,r);return n(l,p),p};return a=s,(...l)=>a(ad(...l))},id=[],ie=e=>{const t=r=>r[e]||id;return t.isThemeGetter=!0,t},Cn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,En=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ld=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dd=/\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$/,ud=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ue=e=>ld.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),Vr=e=>e.endsWith("%")&&K(e.slice(0,-1)),Fe=e=>cd.test(e),Nn=()=>!0,hd=e=>dd.test(e)&&!ud.test(e),Ur=()=>!1,gd=e=>fd.test(e),md=e=>pd.test(e),vd=e=>!I(e)&&!O(e),bd=e=>Re(e,Mn,Ur),I=e=>Cn.test(e),tt=e=>Re(e,On,hd),Tn=e=>Re(e,Nd,K),wd=e=>Re(e,zn,Nn),yd=e=>Re(e,Ln,Ur),_n=e=>Re(e,An,Ur),xd=e=>Re(e,In,md),Ut=e=>Re(e,Dn,gd),O=e=>En.test(e),Nt=e=>rt(e,On),kd=e=>rt(e,Ln),Pn=e=>rt(e,An),Sd=e=>rt(e,Mn),Cd=e=>rt(e,In),jt=e=>rt(e,Dn,!0),Ed=e=>rt(e,zn,!0),Re=(e,t,r)=>{const o=Cn.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},rt=(e,t,r=!1)=>{const o=En.exec(e);return o?o[1]?t(o[1]):r:!1},An=e=>e==="position"||e==="percentage",In=e=>e==="image"||e==="url",Mn=e=>e==="length"||e==="size"||e==="bg-size",On=e=>e==="length",Nd=e=>e==="number",Ln=e=>e==="family-name",zn=e=>e==="number"||e==="weight",Dn=e=>e==="shadow",Td=sd(()=>{const e=ie("color"),t=ie("font"),r=ie("text"),o=ie("font-weight"),n=ie("tracking"),a=ie("leading"),s=ie("breakpoint"),i=ie("container"),l=ie("spacing"),u=ie("radius"),p=ie("shadow"),c=ie("inset-shadow"),h=ie("text-shadow"),m=ie("drop-shadow"),b=ie("blur"),g=ie("perspective"),v=ie("aspect"),w=ie("ease"),x=ie("animate"),y=()=>["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"],T=()=>[...k(),O,I],C=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],N=()=>[O,I,l],_=()=>[Ue,"full","auto",...N()],L=()=>[je,"none","subgrid",O,I],M=()=>["auto",{span:["full",je,O,I]},je,O,I],z=()=>[je,"auto",O,I],U=()=>["auto","min","max","fr",O,I],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...N()],$=()=>[Ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],D=()=>[Ue,"screen","full","dvw","lvw","svw","min","max","fit",...N()],Q=()=>[Ue,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],A=()=>[e,O,I],se=()=>[...k(),Pn,_n,{position:[O,I]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",Sd,bd,{size:[O,I]}],re=()=>[Vr,Nt,tt],j=()=>["","none","full",u,O,I],ee=()=>["",K,Nt,tt],F=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[K,Vr,Pn,_n],oe=()=>["","none",b,O,I],J=()=>["none",K,O,I],X=()=>["none",K,O,I],le=()=>[K,O,I],ce=()=>[Ue,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fe],breakpoint:[Fe],color:[Nn],container:[Fe],"drop-shadow":[Fe],ease:["in","out","in-out"],font:[vd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fe],shadow:[Fe],spacing:["px",K],text:[Fe],"text-shadow":[Fe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ue,I,O,v]}],container:["container"],columns:[{columns:[K,I,O,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:T()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{"inset-s":_(),start:_()}],end:[{"inset-e":_(),end:_()}],"inset-bs":[{"inset-bs":_()}],"inset-be":[{"inset-be":_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",O,I]}],basis:[{basis:[Ue,"full","auto",i,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,Ue,"auto","initial","none",I]}],grow:[{grow:["",K,O,I]}],shrink:[{shrink:["",K,O,I]}],order:[{order:[je,"first","last","none",O,I]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...D()]}],"min-inline-size":[{"min-inline":["auto",...D()]}],"max-inline-size":[{"max-inline":["none",...D()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],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",r,Nt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ed,wd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vr,I]}],"font-family":[{font:[kd,yd,t]}],"font-features":[{"font-features":[I]}],"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:[n,O,I]}],"line-clamp":[{"line-clamp":[K,"none",O,Tn]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",O,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",O,tt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[K,"auto",O,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,I]}],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",O,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,O,I],radial:["",O,I],conic:[je,O,I]},Cd,xd]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,O,I]}],"outline-w":[{outline:["",K,Nt,tt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",p,jt,Ut]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",c,jt,Ut]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[K,tt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,jt,Ut]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[K,O,I]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],"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":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[O,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,I]}],filter:[{filter:["","none",O,I]}],blur:[{blur:oe()}],brightness:[{brightness:[K,O,I]}],contrast:[{contrast:[K,O,I]}],"drop-shadow":[{"drop-shadow":["","none",m,jt,Ut]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",K,O,I]}],"hue-rotate":[{"hue-rotate":[K,O,I]}],invert:[{invert:["",K,O,I]}],saturate:[{saturate:[K,O,I]}],sepia:[{sepia:["",K,O,I]}],"backdrop-filter":[{"backdrop-filter":["","none",O,I]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[K,O,I]}],"backdrop-contrast":[{"backdrop-contrast":[K,O,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,O,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,O,I]}],"backdrop-invert":[{"backdrop-invert":["",K,O,I]}],"backdrop-opacity":[{"backdrop-opacity":[K,O,I]}],"backdrop-saturate":[{"backdrop-saturate":[K,O,I]}],"backdrop-sepia":[{"backdrop-sepia":["",K,O,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",O,I]}],ease:[{ease:["linear","initial",w,O,I]}],delay:[{delay:[K,O,I]}],animate:[{animate:["none",x,O,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,O,I]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[O,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,I]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,I]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[K,Nt,tt,Tn]}],stroke:[{stroke:["none",...A()]}],"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"]}}),W=(...e)=>Td(mn(e));function Tt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:W("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function _d({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:W("@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 _t({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:W("px-6",e),...t})}const $n=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fn=mn,Rt=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return Fn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const p=r==null?void 0:r[u],c=a==null?void 0:a[u];if(p===null)return null;const h=$n(p)||$n(c);return n[u][h]}),i=r&&Object.entries(r).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,p)=>{let{class:c,className:h,...m}=p;return Object.entries(m).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,c,h]:u},[]);return Fn(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hn(...e){return t=>{let r=!1;const o=e.map(n=>{const a=Bn(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){const a=o[n];typeof a=="function"?a():Bn(e[n],null)}}}}function te(...e){return f.useCallback(Hn(...e),e)}function Pt(e){const t=Pd(e),r=f.forwardRef((o,n)=>{const{children:a,...s}=o,i=f.Children.toArray(a),l=i.find(Id);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:n,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}var Wn=Pt("Slot");function Pd(e){const t=f.forwardRef((r,o)=>{const{children:n,...a}=r;if(f.isValidElement(n)){const s=Od(n),i=Md(a,n.props);return n.type!==f.Fragment&&(i.ref=o?Hn(o,s):s),f.cloneElement(n,i)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vn=Symbol("radix.slottable");function Ad(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Vn,t}function Id(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vn}function Md(e,t){const r={...t};for(const o in t){const n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...i)=>{const l=a(...i);return n(...i),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function Od(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ld=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=Ld.reduce((e,t)=>{const r=Pt(`Primitive.${t}`),o=f.forwardRef((n,a)=>{const{asChild:s,...i}=n,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function zd(e,t){e&&$t.flushSync(()=>e.dispatchEvent(t))}var Un=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"}),Dd="VisuallyHidden",jn=f.forwardRef((e,t)=>d.jsx(H.span,{...e,ref:t,style:{...Un,...e.style}}));jn.displayName=Dd;var $d=jn;function ge(e,t=[]){let r=[];function o(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];const u=c=>{var w;const{scope:h,children:m,...b}=c,g=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=f.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})};u.displayName=a+"Provider";function p(c,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||i,b=f.useContext(m);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,p]}const n=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return n.scopeName=e,[o,Fd(n,...t)]}function Fd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=o.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Rn(e){const t=e+"CollectionProvider",[r,o]=ge(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:w}=g,x=S.useRef(null),y=S.useRef(new Map).current;return d.jsx(n,{scope:v,itemMap:y,collectionRef:x,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Pt(i),u=S.forwardRef((g,v)=>{const{scope:w,children:x}=g,y=a(i,w),k=te(v,y.collectionRef);return d.jsx(l,{ref:k,children:x})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=Pt(p),m=S.forwardRef((g,v)=>{const{scope:w,children:x,...y}=g,k=S.useRef(null),T=te(v,k),C=a(p,w);return S.useEffect(()=>(C.itemMap.set(k,{ref:k,...y}),()=>void C.itemMap.delete(k))),d.jsx(h,{[c]:"",ref:T,children:x})});m.displayName=p;function b(g){const v=a(e+"CollectionConsumer",g);return S.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const y=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,E)=>y.indexOf(C.ref.current)-y.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},b,o]}function V(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var ae=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Bd=f[" useInsertionEffect ".trim().toString()]||ae;function Be({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[n,a,s]=Hd({defaultProp:t,onChange:r}),i=e!==void 0,l=i?e:n;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const c=p.current;c!==i&&console.warn(`${o} 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.`),p.current=i},[i,o])}const u=f.useCallback(p=>{var c;if(i){const h=Wd(p)?p(e):p;h!==e&&((c=s.current)==null||c.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function Hd({defaultProp:e,onChange:t}){const[r,o]=f.useState(e),n=f.useRef(r),a=f.useRef(t);return Bd(()=>{a.current=t},[t]),f.useEffect(()=>{var s;n.current!==r&&((s=a.current)==null||s.call(a,r),n.current=r)},[r,n]),[r,o,a]}function Wd(e){return typeof e=="function"}function Vd(e,t){return f.useReducer((r,o)=>t[r][o]??r,e)}var Ee=e=>{const{present:t,children:r}=e,o=Ud(t),n=typeof r=="function"?r({present:o.isPresent}):f.Children.only(r),a=te(o.ref,jd(n));return typeof r=="function"||o.isPresent?f.cloneElement(n,{ref:a}):null};Ee.displayName="Presence";function Ud(e){const[t,r]=f.useState(),o=f.useRef(null),n=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Vd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Gt(o.current);a.current=i==="mounted"?u:"none"},[i]),ae(()=>{const u=o.current,p=n.current;if(p!==e){const h=a.current,m=Gt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==m?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ae(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,c=m=>{const g=Gt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=Gt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{p.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:f.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Gt(e){return(e==null?void 0:e.animationName)||"none"}function jd(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rd=f[" useId ".trim().toString()]||(()=>{}),Gd=0;function ot(e){const[t,r]=f.useState(Rd());return ae(()=>{r(o=>o??String(Gd++))},[e]),e||(t?`radix-${t}`:"")}var Yt="Collapsible",[Yd]=ge(Yt),[qd,jr]=Yd(Yt),Gn=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:s,...i}=e,[l,u]=Be({prop:o,defaultProp:n??!1,onChange:s,caller:Yt});return d.jsx(qd,{scope:r,disabled:a,contentId:ot(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:d.jsx(H.div,{"data-state":Gr(l),"data-disabled":a?"":void 0,...i,ref:t})})});Gn.displayName=Yt;var Yn="CollapsibleTrigger",qn=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,...o}=e,n=jr(Yn,r);return d.jsx(H.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Gr(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:V(e.onClick,n.onOpenToggle)})});qn.displayName=Yn;var Rr="CollapsibleContent",Xn=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=jr(Rr,e.__scopeCollapsible);return d.jsx(Ee,{present:r||n.open,children:({present:a})=>d.jsx(Xd,{...o,ref:t,present:a})})});Xn.displayName=Rr;var Xd=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:o,children:n,...a}=e,s=jr(Rr,r),[i,l]=f.useState(o),u=f.useRef(null),p=te(t,u),c=f.useRef(0),h=c.current,m=f.useRef(0),b=m.current,g=s.open||i,v=f.useRef(g),w=f.useRef(void 0);return f.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),ae(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const y=x.getBoundingClientRect();c.current=y.height,m.current=y.width,v.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),l(o)}},[s.open,o]),d.jsx(H.div,{"data-state":Gr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&n})});function Gr(e){return e?"open":"closed"}var Kd=Gn,Zd=f.createContext(void 0);function At(e){const t=f.useContext(Zd);return e||t||"ltr"}function fe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function Jd(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);f.useEffect(()=>{const o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var Qd="DismissableLayer",Yr="dismissableLayer.update",eu="dismissableLayer.pointerDownOutside",tu="dismissableLayer.focusOutside",Kn,Zn=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(Zn),[p,c]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),b=te(t,E=>c(E)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=p?g.indexOf(p):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,k=x>=w,T=nu(E=>{const N=E.target,_=[...u.branches].some(L=>L.contains(N));!k||_||(n==null||n(E),s==null||s(E),E.defaultPrevented||i==null||i())},h),C=au(E=>{const N=E.target;[...u.branches].some(L=>L.contains(N))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},h);return Jd(E=>{x===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Kn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Jn(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Kn)}},[p,h,r,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Jn())},[p,u]),f.useEffect(()=>{const E=()=>m({});return document.addEventListener(Yr,E),()=>document.removeEventListener(Yr,E)},[]),d.jsx(H.div,{...l,ref:b,style:{pointerEvents:y?k?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,C.onFocusCapture),onBlurCapture:V(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,T.onPointerDownCapture)})});qr.displayName=Qd;var ru="DismissableLayerBranch",ou=f.forwardRef((e,t)=>{const r=f.useContext(Zn),o=f.useRef(null),n=te(t,o);return f.useEffect(()=>{const a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(H.div,{...e,ref:n})});ou.displayName=ru;function nu(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),o=f.useRef(!1),n=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!o.current){let l=function(){Qn(eu,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function au(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),o=f.useRef(!1);return f.useEffect(()=>{const n=a=>{a.target&&!o.current&&Qn(tu,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Jn(){const e=new CustomEvent(Yr);document.dispatchEvent(e)}function Qn(e,t,r,{discrete:o}){const n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?zd(n,a):n.dispatchEvent(a)}var Xr="focusScope.autoFocusOnMount",Kr="focusScope.autoFocusOnUnmount",ea={bubbles:!1,cancelable:!0},su="FocusScope",ta=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=fe(n),p=fe(a),c=f.useRef(null),h=te(t,g=>l(g)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(o){let g=function(y){if(m.paused||!i)return;const k=y.target;i.contains(k)?c.current=k:Ge(c.current,{select:!0})},v=function(y){if(m.paused||!i)return;const k=y.relatedTarget;k!==null&&(i.contains(k)||Ge(c.current,{select:!0}))},w=function(y){if(document.activeElement===document.body)for(const T of y)T.removedNodes.length>0&&Ge(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(w);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[o,i,m.paused]),f.useEffect(()=>{if(i){na.add(m);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Xr,ea);i.addEventListener(Xr,u),i.dispatchEvent(w),w.defaultPrevented||(iu(fu(ra(i)),{select:!0}),document.activeElement===g&&Ge(i))}return()=>{i.removeEventListener(Xr,u),setTimeout(()=>{const w=new CustomEvent(Kr,ea);i.addEventListener(Kr,p),i.dispatchEvent(w),w.defaultPrevented||Ge(g??document.body,{select:!0}),i.removeEventListener(Kr,p),na.remove(m)},0)}}},[i,u,p,m]);const b=f.useCallback(g=>{if(!r&&!o||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const x=g.currentTarget,[y,k]=lu(x);y&&k?!g.shiftKey&&w===k?(g.preventDefault(),r&&Ge(y,{select:!0})):g.shiftKey&&w===y&&(g.preventDefault(),r&&Ge(k,{select:!0})):w===x&&g.preventDefault()}},[r,o,m.paused]);return d.jsx(H.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});ta.displayName=su;function iu(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(Ge(o,{select:t}),document.activeElement!==r)return}function lu(e){const t=ra(e),r=oa(t,e),o=oa(t.reverse(),e);return[r,o]}function ra(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function oa(e,t){for(const r of e)if(!cu(r,{upTo:t}))return r}function cu(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 du(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&du(e)&&t&&e.select()}}var na=uu();function uu(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=aa(e,t),e.unshift(t)},remove(t){var r;e=aa(e,t),(r=e[0])==null||r.resume()}}}function aa(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function fu(e){return e.filter(t=>t.tagName!=="A")}var pu="Portal",Zr=f.forwardRef((e,t)=>{var i;const{container:r,...o}=e,[n,a]=f.useState(!1);ae(()=>a(!0),[]);const s=r||n&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?zr.createPortal(d.jsx(H.div,{...o,ref:t}),s):null});Zr.displayName=pu;var Jr=0;function hu(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sa()),document.body.insertAdjacentElement("beforeend",e[1]??sa()),Jr++,()=>{Jr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jr--}},[])}function sa(){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 r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Oe.apply(this,arguments)};function ia(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function gu(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var qt="right-scroll-bar-position",Xt="width-before-scroll-bar",mu="with-scroll-bars-hidden",vu="--removed-body-scroll-bar-size";function Qr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function bu(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var wu=typeof window<"u"?f.useLayoutEffect:f.useEffect,la=new WeakMap;function yu(e,t){var r=bu(null,function(o){return e.forEach(function(n){return Qr(n,o)})});return wu(function(){var o=la.get(r);if(o){var n=new Set(o),a=new Set(e),s=r.current;n.forEach(function(i){a.has(i)||Qr(i,null)}),a.forEach(function(i){n.has(i)||Qr(i,s)})}la.set(r,e)},[e]),r}function xu(e){return e}function ku(e,t){t===void 0&&(t=xu);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,o);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(o=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){o=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),r}}}};return n}function Su(e){e===void 0&&(e={});var t=ku(null);return t.options=Oe({async:!0,ssr:!1},e),t}var ca=function(e){var t=e.sideCar,r=ia(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return f.createElement(o,Oe({},r))};ca.isSideCarExport=!0;function Cu(e,t){return e.useMedium(t),ca}var da=Su(),eo=function(){},Kt=f.forwardRef(function(e,t){var r=f.useRef(null),o=f.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),n=o[0],a=o[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,y=e.gapMode,k=ia(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,C=yu([r,t]),E=Oe(Oe({},k),n);return f.createElement(f.Fragment,null,p&&f.createElement(T,{sideCar:da,removeScrollBar:u,shards:c,noRelative:m,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?f.cloneElement(f.Children.only(i),Oe(Oe({},E),{ref:C})):f.createElement(x,Oe({},E,{className:l,ref:C}),i))});Kt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Kt.classNames={fullWidth:Xt,zeroRight:qt};var Eu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Eu();return t&&e.setAttribute("nonce",t),e}function Tu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _u(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pu=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Nu())&&(Tu(t,r),_u(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Au=function(){var e=Pu();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ua=function(){var e=Au(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t},Iu={left:0,top:0,right:0,gap:0},to=function(e){return parseInt(e||"",10)||0},Mu=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[to(r),to(o),to(n)]},Ou=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Iu;var t=Mu(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Lu=ua(),ft="data-scroll-locked",zu=function(e,t,r,o){var n=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
-
.`.concat(
|
|
212
|
+
*/const vn=ne("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"}]]);function bn(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=bn(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function wn(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=bn(e))&&(o&&(o+=" "),o+=t);return o}const jc=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},Rc=(e,t)=>({classGroupId:e,validator:t}),yn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),jt="-",xn=[],Gc="arbitrary..",Yc=e=>{const t=Xc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return qc(s);const i=s.split(jt),l=i[0]===""&&i.length>1?1:0;return kn(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=o[s],u=r[s];return l?u?jc(u,l):l:u||xn}return r[s]||xn}}},kn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],a=r.nextPart.get(n);if(a){const u=kn(e,t+1,a);if(u)return u}const s=r.validators;if(s===null)return;const i=t===0?e.join(jt):e.slice(t).join(jt),l=s.length;for(let u=0;u<l;u++){const p=s[u];if(p.validator(i))return p.classGroupId}},qc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?Gc+o:void 0})(),Xc=e=>{const{theme:t,classGroups:r}=e;return Kc(r,t)},Kc=(e,t)=>{const r=yn();for(const o in e){const n=e[o];Wr(n,r,o,t)}return r},Wr=(e,t,r,o)=>{const n=e.length;for(let a=0;a<n;a++){const s=e[a];Zc(s,t,r,o)}},Zc=(e,t,r,o)=>{if(typeof e=="string"){Jc(e,t,r);return}if(typeof e=="function"){Qc(e,t,r,o);return}ed(e,t,r,o)},Jc=(e,t,r)=>{const o=e===""?t:Sn(t,e);o.classGroupId=r},Qc=(e,t,r,o)=>{if(td(e)){Wr(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Rc(r,e))},ed=(e,t,r,o)=>{const n=Object.entries(e),a=n.length;for(let s=0;s<a;s++){const[i,l]=n[s];Wr(l,Sn(t,i),r,o)}},Sn=(e,t)=>{let r=e;const o=t.split(jt),n=o.length;for(let a=0;a<n;a++){const s=o[a];let i=r.nextPart.get(s);i||(i=yn(),r.nextPart.set(s,i)),r=i}return r},td=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,rd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(a,s)=>{r[a]=s,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=o[a])!==void 0)return n(a,s),s},set(a,s){a in r?r[a]=s:n(a,s)}}},Ur="!",Cn=":",od=[],En=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),nd=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const a=[];let s=0,i=0,l=0,u;const p=n.length;for(let g=0;g<p;g++){const v=n[g];if(s===0&&i===0){if(v===Cn){a.push(n.slice(l,g)),l=g+1;continue}if(v==="/"){u=g;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?n:n.slice(l);let h=c,m=!1;c.endsWith(Ur)?(h=c.slice(0,-1),m=!0):c.startsWith(Ur)&&(h=c.slice(1),m=!0);const b=u&&u>l?u-l:void 0;return En(a,m,h,b)};if(t){const n=t+Cn,a=o;o=s=>s.startsWith(n)?a(s.slice(n.length)):En(od,!1,s,void 0,!0)}if(r){const n=o;o=a=>r({className:a,parseClassName:n})}return o},ad=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let n=[];for(let a=0;a<r.length;a++){const s=r[a],i=s[0]==="[",l=t.has(s);i||l?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(s)):n.push(s)}return n.length>0&&(n.sort(),o.push(...n)),o}},sd=e=>({cache:rd(e.cacheSize),parseClassName:nd(e),sortModifiers:ad(e),...Yc(e)}),id=/\s+/,ld=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(id);let l="";for(let u=i.length-1;u>=0;u-=1){const p=i[u],{isExternal:c,modifiers:h,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}=r(p);if(c){l=p+(l.length>0?" "+l:l);continue}let v=!!g,w=o(v?b.substring(0,g):b);if(!w){if(!v){l=p+(l.length>0?" "+l:l);continue}if(w=o(b),!w){l=p+(l.length>0?" "+l:l);continue}v=!1}const x=h.length===0?"":h.length===1?h[0]:a(h).join(":"),y=m?x+Ur:x,S=y+w;if(s.indexOf(S)>-1)continue;s.push(S);const T=n(w,v);for(let C=0;C<T.length;++C){const E=T[C];s.push(y+E)}l=p+(l.length>0?" "+l:l)}return l},cd=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=Nn(r))&&(n&&(n+=" "),n+=o);return n},Nn=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Nn(e[o]))&&(r&&(r+=" "),r+=t);return r},dd=(e,...t)=>{let r,o,n,a;const s=l=>{const u=t.reduce((p,c)=>c(p),e());return r=sd(u),o=r.cache.get,n=r.cache.set,a=i,i(l)},i=l=>{const u=o(l);if(u)return u;const p=ld(l,r);return n(l,p),p};return a=s,(...l)=>a(cd(...l))},ud=[],ie=e=>{const t=r=>r[e]||ud;return t.isThemeGetter=!0,t},Tn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_n=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hd=/\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$/,gd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,md=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ue=e=>fd.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),jr=e=>e.endsWith("%")&&K(e.slice(0,-1)),Fe=e=>pd.test(e),Pn=()=>!0,bd=e=>hd.test(e)&&!gd.test(e),Rr=()=>!1,wd=e=>md.test(e),yd=e=>vd.test(e),xd=e=>!I(e)&&!M(e),kd=e=>Re(e,zn,Rr),I=e=>Tn.test(e),tt=e=>Re(e,Dn,bd),An=e=>Re(e,Ad,K),Sd=e=>Re(e,Fn,Pn),Cd=e=>Re(e,$n,Rr),In=e=>Re(e,On,Rr),Ed=e=>Re(e,Ln,yd),Rt=e=>Re(e,Bn,wd),M=e=>_n.test(e),_t=e=>rt(e,Dn),Nd=e=>rt(e,$n),Mn=e=>rt(e,On),Td=e=>rt(e,zn),_d=e=>rt(e,Ln),Gt=e=>rt(e,Bn,!0),Pd=e=>rt(e,Fn,!0),Re=(e,t,r)=>{const o=Tn.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},rt=(e,t,r=!1)=>{const o=_n.exec(e);return o?o[1]?t(o[1]):r:!1},On=e=>e==="position"||e==="percentage",Ln=e=>e==="image"||e==="url",zn=e=>e==="length"||e==="size"||e==="bg-size",Dn=e=>e==="length",Ad=e=>e==="number",$n=e=>e==="family-name",Fn=e=>e==="number"||e==="weight",Bn=e=>e==="shadow",Id=dd(()=>{const e=ie("color"),t=ie("font"),r=ie("text"),o=ie("font-weight"),n=ie("tracking"),a=ie("leading"),s=ie("breakpoint"),i=ie("container"),l=ie("spacing"),u=ie("radius"),p=ie("shadow"),c=ie("inset-shadow"),h=ie("text-shadow"),m=ie("drop-shadow"),b=ie("blur"),g=ie("perspective"),v=ie("aspect"),w=ie("ease"),x=ie("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...S(),M,I],C=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],N=()=>[M,I,l],_=()=>[Ue,"full","auto",...N()],O=()=>[je,"none","subgrid",M,I],$=()=>["auto",{span:["full",je,M,I]},je,M,I],W=()=>[je,"auto",M,I],j=()=>["auto","min","max","fr",M,I],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...N()],z=()=>[Ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],L=()=>[Ue,"screen","full","dvw","lvw","svw","min","max","fit",...N()],Q=()=>[Ue,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],A=()=>[e,M,I],se=()=>[...S(),Mn,In,{position:[M,I]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",Td,kd,{size:[M,I]}],re=()=>[jr,_t,tt],U=()=>["","none","full",u,M,I],ee=()=>["",K,_t,tt],D=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[K,jr,Mn,In],oe=()=>["","none",b,M,I],J=()=>["none",K,M,I],X=()=>["none",K,M,I],le=()=>[K,M,I],ce=()=>[Ue,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fe],breakpoint:[Fe],color:[Pn],container:[Fe],"drop-shadow":[Fe],ease:["in","out","in-out"],font:[xd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fe],shadow:[Fe],spacing:["px",K],text:[Fe],"text-shadow":[Fe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ue,I,M,v]}],container:["container"],columns:[{columns:[K,I,M,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:T()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{"inset-s":_(),start:_()}],end:[{"inset-e":_(),end:_()}],"inset-bs":[{"inset-bs":_()}],"inset-be":[{"inset-be":_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",M,I]}],basis:[{basis:[Ue,"full","auto",i,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,Ue,"auto","initial","none",I]}],grow:[{grow:["",K,M,I]}],shrink:[{shrink:["",K,M,I]}],order:[{order:[je,"first","last","none",M,I]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[i,"screen",...z()]}],"min-w":[{"min-w":[i,"screen","none",...z()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,_t,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Pd,Sd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jr,I]}],"font-family":[{font:[Nd,Cd,t]}],"font-features":[{"font-features":[I]}],"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:[n,M,I]}],"line-clamp":[{"line-clamp":[K,"none",M,An]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",M,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",M,tt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[K,"auto",M,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,I]}],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",M,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,M,I],radial:["",M,I],conic:[je,M,I]},_d,Ed]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],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:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,M,I]}],"outline-w":[{outline:["",K,_t,tt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",p,Gt,Rt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",c,Gt,Rt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[K,tt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Gt,Rt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[K,M,I]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[M,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",M,I]}],filter:[{filter:["","none",M,I]}],blur:[{blur:oe()}],brightness:[{brightness:[K,M,I]}],contrast:[{contrast:[K,M,I]}],"drop-shadow":[{"drop-shadow":["","none",m,Gt,Rt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",K,M,I]}],"hue-rotate":[{"hue-rotate":[K,M,I]}],invert:[{invert:["",K,M,I]}],saturate:[{saturate:[K,M,I]}],sepia:[{sepia:["",K,M,I]}],"backdrop-filter":[{"backdrop-filter":["","none",M,I]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[K,M,I]}],"backdrop-contrast":[{"backdrop-contrast":[K,M,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,M,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,M,I]}],"backdrop-invert":[{"backdrop-invert":["",K,M,I]}],"backdrop-opacity":[{"backdrop-opacity":[K,M,I]}],"backdrop-saturate":[{"backdrop-saturate":[K,M,I]}],"backdrop-sepia":[{"backdrop-sepia":["",K,M,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",M,I]}],ease:[{ease:["linear","initial",w,M,I]}],delay:[{delay:[K,M,I]}],animate:[{animate:["none",x,M,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,M,I]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[M,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M,I]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M,I]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[K,_t,tt,An]}],stroke:[{stroke:["none",...A()]}],"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"]}}),B=(...e)=>Id(wn(e));function Pt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:B("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Md({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:B("@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 At({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:B("px-6",e),...t})}const Hn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vn=wn,Yt=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return Vn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const p=r==null?void 0:r[u],c=a==null?void 0:a[u];if(p===null)return null;const h=Hn(p)||Hn(c);return n[u][h]}),i=r&&Object.entries(r).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,p)=>{let{class:c,className:h,...m}=p;return Object.entries(m).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,c,h]:u},[]);return Vn(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Wn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Un(...e){return t=>{let r=!1;const o=e.map(n=>{const a=Wn(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){const a=o[n];typeof a=="function"?a():Wn(e[n],null)}}}}function te(...e){return f.useCallback(Un(...e),e)}function It(e){const t=Od(e),r=f.forwardRef((o,n)=>{const{children:a,...s}=o,i=f.Children.toArray(a),l=i.find(zd);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:n,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}var jn=It("Slot");function Od(e){const t=f.forwardRef((r,o)=>{const{children:n,...a}=r;if(f.isValidElement(n)){const s=$d(n),i=Dd(a,n.props);return n.type!==f.Fragment&&(i.ref=o?Un(o,s):s),f.cloneElement(n,i)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rn=Symbol("radix.slottable");function Ld(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Rn,t}function zd(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rn}function Dd(e,t){const r={...t};for(const o in t){const n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...i)=>{const l=a(...i);return n(...i),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function $d(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Fd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=Fd.reduce((e,t)=>{const r=It(`Primitive.${t}`),o=f.forwardRef((n,a)=>{const{asChild:s,...i}=n,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Bd(e,t){e&&Bt.flushSync(()=>e.dispatchEvent(t))}var Gn=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"}),Hd="VisuallyHidden",Yn=f.forwardRef((e,t)=>d.jsx(H.span,{...e,ref:t,style:{...Gn,...e.style}}));Yn.displayName=Hd;var Vd=Yn;function ge(e,t=[]){let r=[];function o(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];const u=c=>{var w;const{scope:h,children:m,...b}=c,g=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=f.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})};u.displayName=a+"Provider";function p(c,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||i,b=f.useContext(m);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,p]}const n=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return n.scopeName=e,[o,Wd(n,...t)]}function Wd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=o.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function qn(e){const t=e+"CollectionProvider",[r,o]=ge(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:w}=g,x=k.useRef(null),y=k.useRef(new Map).current;return d.jsx(n,{scope:v,itemMap:y,collectionRef:x,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=It(i),u=k.forwardRef((g,v)=>{const{scope:w,children:x}=g,y=a(i,w),S=te(v,y.collectionRef);return d.jsx(l,{ref:S,children:x})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=It(p),m=k.forwardRef((g,v)=>{const{scope:w,children:x,...y}=g,S=k.useRef(null),T=te(v,S),C=a(p,w);return k.useEffect(()=>(C.itemMap.set(S,{ref:S,...y}),()=>void C.itemMap.delete(S))),d.jsx(h,{[c]:"",ref:T,children:x})});m.displayName=p;function b(g){const v=a(e+"CollectionConsumer",g);return k.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const y=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,E)=>y.indexOf(C.ref.current)-y.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},b,o]}function V(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var ae=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ud=f[" useInsertionEffect ".trim().toString()]||ae;function Be({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[n,a,s]=jd({defaultProp:t,onChange:r}),i=e!==void 0,l=i?e:n;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const c=p.current;c!==i&&console.warn(`${o} 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.`),p.current=i},[i,o])}const u=f.useCallback(p=>{var c;if(i){const h=Rd(p)?p(e):p;h!==e&&((c=s.current)==null||c.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function jd({defaultProp:e,onChange:t}){const[r,o]=f.useState(e),n=f.useRef(r),a=f.useRef(t);return Ud(()=>{a.current=t},[t]),f.useEffect(()=>{var s;n.current!==r&&((s=a.current)==null||s.call(a,r),n.current=r)},[r,n]),[r,o,a]}function Rd(e){return typeof e=="function"}function Gd(e,t){return f.useReducer((r,o)=>t[r][o]??r,e)}var Ee=e=>{const{present:t,children:r}=e,o=Yd(t),n=typeof r=="function"?r({present:o.isPresent}):f.Children.only(r),a=te(o.ref,qd(n));return typeof r=="function"||o.isPresent?f.cloneElement(n,{ref:a}):null};Ee.displayName="Presence";function Yd(e){const[t,r]=f.useState(),o=f.useRef(null),n=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Gd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=qt(o.current);a.current=i==="mounted"?u:"none"},[i]),ae(()=>{const u=o.current,p=n.current;if(p!==e){const h=a.current,m=qt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==m?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ae(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,c=m=>{const g=qt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=qt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{p.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:f.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function qt(e){return(e==null?void 0:e.animationName)||"none"}function qd(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Xd=f[" useId ".trim().toString()]||(()=>{}),Kd=0;function ot(e){const[t,r]=f.useState(Xd());return ae(()=>{r(o=>o??String(Kd++))},[e]),e||(t?`radix-${t}`:"")}var Xt="Collapsible",[Zd]=ge(Xt),[Jd,Gr]=Zd(Xt),Xn=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:s,...i}=e,[l,u]=Be({prop:o,defaultProp:n??!1,onChange:s,caller:Xt});return d.jsx(Jd,{scope:r,disabled:a,contentId:ot(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:d.jsx(H.div,{"data-state":qr(l),"data-disabled":a?"":void 0,...i,ref:t})})});Xn.displayName=Xt;var Kn="CollapsibleTrigger",Zn=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,...o}=e,n=Gr(Kn,r);return d.jsx(H.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":qr(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:V(e.onClick,n.onOpenToggle)})});Zn.displayName=Kn;var Yr="CollapsibleContent",Jn=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Gr(Yr,e.__scopeCollapsible);return d.jsx(Ee,{present:r||n.open,children:({present:a})=>d.jsx(Qd,{...o,ref:t,present:a})})});Jn.displayName=Yr;var Qd=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:o,children:n,...a}=e,s=Gr(Yr,r),[i,l]=f.useState(o),u=f.useRef(null),p=te(t,u),c=f.useRef(0),h=c.current,m=f.useRef(0),b=m.current,g=s.open||i,v=f.useRef(g),w=f.useRef(void 0);return f.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),ae(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const y=x.getBoundingClientRect();c.current=y.height,m.current=y.width,v.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),l(o)}},[s.open,o]),d.jsx(H.div,{"data-state":qr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&n})});function qr(e){return e?"open":"closed"}var eu=Xn,tu=f.createContext(void 0);function Mt(e){const t=f.useContext(tu);return e||t||"ltr"}function fe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function ru(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);f.useEffect(()=>{const o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var ou="DismissableLayer",Xr="dismissableLayer.update",nu="dismissableLayer.pointerDownOutside",au="dismissableLayer.focusOutside",Qn,ea=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(ea),[p,c]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),b=te(t,E=>c(E)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=p?g.indexOf(p):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,T=lu(E=>{const N=E.target,_=[...u.branches].some(O=>O.contains(N));!S||_||(n==null||n(E),s==null||s(E),E.defaultPrevented||i==null||i())},h),C=cu(E=>{const N=E.target;[...u.branches].some(O=>O.contains(N))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},h);return ru(E=>{x===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ta(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Qn)}},[p,h,r,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ta())},[p,u]),f.useEffect(()=>{const E=()=>m({});return document.addEventListener(Xr,E),()=>document.removeEventListener(Xr,E)},[]),d.jsx(H.div,{...l,ref:b,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,C.onFocusCapture),onBlurCapture:V(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,T.onPointerDownCapture)})});Kr.displayName=ou;var su="DismissableLayerBranch",iu=f.forwardRef((e,t)=>{const r=f.useContext(ea),o=f.useRef(null),n=te(t,o);return f.useEffect(()=>{const a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(H.div,{...e,ref:n})});iu.displayName=su;function lu(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),o=f.useRef(!1),n=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!o.current){let l=function(){ra(nu,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function cu(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),o=f.useRef(!1);return f.useEffect(()=>{const n=a=>{a.target&&!o.current&&ra(au,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ta(){const e=new CustomEvent(Xr);document.dispatchEvent(e)}function ra(e,t,r,{discrete:o}){const n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?Bd(n,a):n.dispatchEvent(a)}var Zr="focusScope.autoFocusOnMount",Jr="focusScope.autoFocusOnUnmount",oa={bubbles:!1,cancelable:!0},du="FocusScope",na=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=fe(n),p=fe(a),c=f.useRef(null),h=te(t,g=>l(g)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(o){let g=function(y){if(m.paused||!i)return;const S=y.target;i.contains(S)?c.current=S:Ge(c.current,{select:!0})},v=function(y){if(m.paused||!i)return;const S=y.relatedTarget;S!==null&&(i.contains(S)||Ge(c.current,{select:!0}))},w=function(y){if(document.activeElement===document.body)for(const T of y)T.removedNodes.length>0&&Ge(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(w);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[o,i,m.paused]),f.useEffect(()=>{if(i){ia.add(m);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Zr,oa);i.addEventListener(Zr,u),i.dispatchEvent(w),w.defaultPrevented||(uu(mu(aa(i)),{select:!0}),document.activeElement===g&&Ge(i))}return()=>{i.removeEventListener(Zr,u),setTimeout(()=>{const w=new CustomEvent(Jr,oa);i.addEventListener(Jr,p),i.dispatchEvent(w),w.defaultPrevented||Ge(g??document.body,{select:!0}),i.removeEventListener(Jr,p),ia.remove(m)},0)}}},[i,u,p,m]);const b=f.useCallback(g=>{if(!r&&!o||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const x=g.currentTarget,[y,S]=fu(x);y&&S?!g.shiftKey&&w===S?(g.preventDefault(),r&&Ge(y,{select:!0})):g.shiftKey&&w===y&&(g.preventDefault(),r&&Ge(S,{select:!0})):w===x&&g.preventDefault()}},[r,o,m.paused]);return d.jsx(H.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});na.displayName=du;function uu(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(Ge(o,{select:t}),document.activeElement!==r)return}function fu(e){const t=aa(e),r=sa(t,e),o=sa(t.reverse(),e);return[r,o]}function aa(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function sa(e,t){for(const r of e)if(!pu(r,{upTo:t}))return r}function pu(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 hu(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hu(e)&&t&&e.select()}}var ia=gu();function gu(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=la(e,t),e.unshift(t)},remove(t){var r;e=la(e,t),(r=e[0])==null||r.resume()}}}function la(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function mu(e){return e.filter(t=>t.tagName!=="A")}var vu="Portal",Qr=f.forwardRef((e,t)=>{var i;const{container:r,...o}=e,[n,a]=f.useState(!1);ae(()=>a(!0),[]);const s=r||n&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?$r.createPortal(d.jsx(H.div,{...o,ref:t}),s):null});Qr.displayName=vu;var eo=0;function bu(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ca()),document.body.insertAdjacentElement("beforeend",e[1]??ca()),eo++,()=>{eo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),eo--}},[])}function ca(){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 r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Oe.apply(this,arguments)};function da(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function wu(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Kt="right-scroll-bar-position",Zt="width-before-scroll-bar",yu="with-scroll-bars-hidden",xu="--removed-body-scroll-bar-size";function to(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ku(e,t){var r=k.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var Su=typeof window<"u"?f.useLayoutEffect:f.useEffect,ua=new WeakMap;function Cu(e,t){var r=ku(null,function(o){return e.forEach(function(n){return to(n,o)})});return Su(function(){var o=ua.get(r);if(o){var n=new Set(o),a=new Set(e),s=r.current;n.forEach(function(i){a.has(i)||to(i,null)}),a.forEach(function(i){n.has(i)||to(i,s)})}ua.set(r,e)},[e]),r}function Eu(e){return e}function Nu(e,t){t===void 0&&(t=Eu);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,o);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(o=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){o=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),r}}}};return n}function Tu(e){e===void 0&&(e={});var t=Nu(null);return t.options=Oe({async:!0,ssr:!1},e),t}var fa=function(e){var t=e.sideCar,r=da(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return f.createElement(o,Oe({},r))};fa.isSideCarExport=!0;function _u(e,t){return e.useMedium(t),fa}var pa=Tu(),ro=function(){},Jt=f.forwardRef(function(e,t){var r=f.useRef(null),o=f.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),n=o[0],a=o[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,y=e.gapMode,S=da(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,C=Cu([r,t]),E=Oe(Oe({},S),n);return f.createElement(f.Fragment,null,p&&f.createElement(T,{sideCar:pa,removeScrollBar:u,shards:c,noRelative:m,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?f.cloneElement(f.Children.only(i),Oe(Oe({},E),{ref:C})):f.createElement(x,Oe({},E,{className:l,ref:C}),i))});Jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jt.classNames={fullWidth:Zt,zeroRight:Kt};var Pu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Au(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pu();return t&&e.setAttribute("nonce",t),e}function Iu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ou=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Au())&&(Iu(t,r),Mu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lu=function(){var e=Ou();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ha=function(){var e=Lu(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t},zu={left:0,top:0,right:0,gap:0},oo=function(e){return parseInt(e||"",10)||0},Du=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[oo(r),oo(o),oo(n)]},$u=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zu;var t=Du(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Fu=ha(),pt="data-scroll-locked",Bu=function(e,t,r,o){var n=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
+
.`.concat(yu,` {
|
|
214
214
|
overflow: hidden `).concat(o,`;
|
|
215
215
|
padding-right: `).concat(i,"px ").concat(o,`;
|
|
216
216
|
}
|
|
217
|
-
body[`).concat(
|
|
217
|
+
body[`).concat(pt,`] {
|
|
218
218
|
overflow: hidden `).concat(o,`;
|
|
219
219
|
overscroll-behavior: contain;
|
|
220
220
|
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
@@ -227,29 +227,29 @@
|
|
|
227
227
|
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.`).concat(
|
|
230
|
+
.`).concat(Kt,` {
|
|
231
231
|
right: `).concat(i,"px ").concat(o,`;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.`).concat(
|
|
234
|
+
.`).concat(Zt,` {
|
|
235
235
|
margin-right: `).concat(i,"px ").concat(o,`;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.`).concat(
|
|
238
|
+
.`).concat(Kt," .").concat(Kt,` {
|
|
239
239
|
right: 0 `).concat(o,`;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.`).concat(
|
|
242
|
+
.`).concat(Zt," .").concat(Zt,` {
|
|
243
243
|
margin-right: 0 `).concat(o,`;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
body[`).concat(
|
|
247
|
-
`).concat(
|
|
246
|
+
body[`).concat(pt,`] {
|
|
247
|
+
`).concat(xu,": ").concat(i,`px;
|
|
248
248
|
}
|
|
249
|
-
`)},
|
|
249
|
+
`)},ga=function(){var e=parseInt(document.body.getAttribute(pt)||"0",10);return isFinite(e)?e:0},Hu=function(){f.useEffect(function(){return document.body.setAttribute(pt,(ga()+1).toString()),function(){var e=ga()-1;e<=0?document.body.removeAttribute(pt):document.body.setAttribute(pt,e.toString())}},[])},Vu=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;Hu();var a=f.useMemo(function(){return $u(n)},[n]);return f.createElement(Fu,{styles:Bu(a,!t,n,r?"":"!important")})},no=!1;if(typeof window<"u")try{var Qt=Object.defineProperty({},"passive",{get:function(){return no=!0,!0}});window.addEventListener("test",Qt,Qt),window.removeEventListener("test",Qt,Qt)}catch{no=!1}var ht=no?{passive:!1}:!1,Wu=function(e){return e.tagName==="TEXTAREA"},ma=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Wu(e)&&r[t]==="visible")},Uu=function(e){return ma(e,"overflowY")},ju=function(e){return ma(e,"overflowX")},va=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=ba(e,o);if(n){var a=wa(e,o),s=a[1],i=a[2];if(s>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},Ru=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},Gu=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},ba=function(e,t){return e==="v"?Uu(t):ju(t)},wa=function(e,t){return e==="v"?Ru(t):Gu(t)},Yu=function(e,t){return e==="h"&&t==="rtl"?-1:1},qu=function(e,t,r,o,n){var a=Yu(e,window.getComputedStyle(t).direction),s=a*o,i=r.target,l=t.contains(i),u=!1,p=s>0,c=0,h=0;do{if(!i)break;var m=wa(e,i),b=m[0],g=m[1],v=m[2],w=g-v-a*b;(b||w)&&ba(e,i)&&(c+=w,h+=b);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(c)<1||!p&&Math.abs(h)<1)&&(u=!0),u},er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ya=function(e){return[e.deltaX,e.deltaY]},xa=function(e){return e&&"current"in e?e.current:e},Xu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ku=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},
|
|
252
|
+
`)},Zu=0,gt=[];function Ju(e){var t=f.useRef([]),r=f.useRef([0,0]),o=f.useRef(),n=f.useState(Zu++)[0],a=f.useState(ha)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=wu([e.lockRef.current],(e.shards||[]).map(xa),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var w=er(g),x=r.current,y="deltaX"in g?g.deltaX:x[0]-w[0],S="deltaY"in g?g.deltaY:x[1]-w[1],T,C=g.target,E=Math.abs(y)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&C.type==="range")return!1;var N=window.getSelection(),_=N&&N.anchorNode,O=_?_===C||_.contains(C):!1;if(O)return!1;var $=va(E,C);if(!$)return!0;if($?T=E:(T=E==="v"?"h":"v",$=va(E,C)),!$)return!1;if(!o.current&&"changedTouches"in g&&(y||S)&&(o.current=T),!T)return!0;var W=o.current||T;return qu(W,v,g,W==="h"?y:S)},[]),l=f.useCallback(function(g){var v=g;if(!(!gt.length||gt[gt.length-1]!==a)){var w="deltaY"in v?ya(v):er(v),x=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&Xu(T.delta,w)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var y=(s.current.shards||[]).map(xa).filter(Boolean).filter(function(T){return T.contains(v.target)}),S=y.length>0?i(v,y[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(g,v,w,x){var y={name:g,delta:v,target:w,should:x,shadowParent:Qu(w)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(S){return S!==y})},1)},[]),p=f.useCallback(function(g){r.current=er(g),o.current=void 0},[]),c=f.useCallback(function(g){u(g.type,ya(g),g.target,i(g,e.lockRef.current))},[]),h=f.useCallback(function(g){u(g.type,er(g),g.target,i(g,e.lockRef.current))},[]);f.useEffect(function(){return gt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ht),document.addEventListener("touchmove",l,ht),document.addEventListener("touchstart",p,ht),function(){gt=gt.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,ht),document.removeEventListener("touchmove",l,ht),document.removeEventListener("touchstart",p,ht)}},[]);var m=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(a,{styles:Ku(n)}):null,m?f.createElement(Vu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ef=_u(pa,Ju);var ka=f.forwardRef(function(e,t){return f.createElement(Jt,Oe({},e,{ref:t,sideCar:ef}))});ka.classNames=Jt.classNames;var tf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mt=new WeakMap,tr=new WeakMap,rr={},ao=0,Sa=function(e){return e&&(e.host||Sa(e.parentNode))},rf=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=Sa(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},of=function(e,t,r,o){var n=rf(t,Array.isArray(e)?e:[e]);rr[r]||(rr[r]=new WeakMap);var a=rr[r],s=[],i=new Set,l=new Set(n),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};n.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))p(h);else try{var m=h.getAttribute(o),b=m!==null&&m!=="false",g=(mt.get(h)||0)+1,v=(a.get(h)||0)+1;mt.set(h,g),a.set(h,v),s.push(h),g===1&&b&&tr.set(h,!0),v===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return p(t),i.clear(),ao++,function(){s.forEach(function(c){var h=mt.get(c)-1,m=a.get(c)-1;mt.set(c,h),a.set(c,m),h||(tr.has(c)||c.removeAttribute(o),tr.delete(c)),m||c.removeAttribute(r)}),ao--,ao||(mt=new WeakMap,mt=new WeakMap,tr=new WeakMap,rr={})}},nf=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=tf(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),of(o,n,r,"aria-hidden")):function(){return null}},so={exports:{}},io={};/**
|
|
253
253
|
* @license React
|
|
254
254
|
* use-sync-external-store-shim.production.js
|
|
255
255
|
*
|
|
@@ -257,16 +257,16 @@
|
|
|
257
257
|
*
|
|
258
258
|
* This source code is licensed under the MIT license found in the
|
|
259
259
|
* LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/var xa;function tf(){if(xa)return ao;xa=1;var e=S;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var r=typeof Object.is=="function"?Object.is:t,o=e.useState,n=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var m=h(),b=o({inst:{value:m,getSnapshot:h}}),g=b[0].inst,v=b[1];return a(function(){g.value=m,g.getSnapshot=h,l(g)&&v({inst:g})},[c,m,h]),n(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),s(m),m}function l(c){var h=c.getSnapshot;c=c.value;try{var m=h();return!r(c,m)}catch{return!0}}function u(c,h){return h()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return ao.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,ao}var ka;function rf(){return ka||(ka=1,no.exports=tf()),no.exports}var of=rf();function nf(){return of.useSyncExternalStore(af,()=>!0,()=>!1)}function af(){return()=>{}}var so="Avatar",[sf]=ge(so),[lf,Sa]=sf(so),Ca=f.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[n,a]=f.useState("idle");return d.jsx(lf,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:d.jsx(H.span,{...o,ref:t})})});Ca.displayName=so;var Ea="AvatarImage",Na=f.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,s=Sa(Ea,r),i=cf(o,a),l=fe(u=>{n(u),s.onImageLoadingStatusChange(u)});return ae(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(H.img,{...a,ref:t,src:o}):null});Na.displayName=Ea;var Ta="AvatarFallback",_a=f.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...n}=e,a=Sa(Ta,r),[s,i]=f.useState(o===void 0);return f.useEffect(()=>{if(o!==void 0){const l=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(l)}},[o]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(H.span,{...n,ref:t}):null});_a.displayName=Ta;function Pa(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cf(e,{referrerPolicy:t,crossOrigin:r}){const o=nf(),n=f.useRef(null),a=o?(n.current||(n.current=new window.Image),n.current):null,[s,i]=f.useState(()=>Pa(a,e));return ae(()=>{i(Pa(a,e))},[a,e]),ae(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),p=l("error");return a.addEventListener("load",u),a.addEventListener("error",p),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",p)}},[a,r,t]),s}var df=Ca,uf=Na,ff=_a;function tr(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function rr(e){const[t,r]=f.useState(void 0);return ae(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[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;r({width:s,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var or="Checkbox",[pf]=ge(or),[hf,io]=pf(or);function gf(e){const{__scopeCheckbox:t,checked:r,children:o,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:p="on",internal_do_not_use_render:c}=e,[h,m]=Be({prop:r,defaultProp:n??!1,onChange:l,caller:or}),[b,g]=f.useState(null),[v,w]=f.useState(null),x=f.useRef(!1),y=b?!!s||!!b.closest("form"):!0,k={checked:h,disabled:a,setChecked:m,control:b,setControl:g,name:i,form:s,value:p,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Ye(n)?!1:n,isFormControl:y,bubbleInput:v,setBubbleInput:w};return d.jsx(hf,{scope:t,...k,children:mf(c)?c(k):o})}var Aa="CheckboxTrigger",Ia=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:p,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:b}=io(Aa,e),g=te(n,p),v=f.useRef(l);return f.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const x=()=>c(v.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[a,c]),d.jsx(H.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":$a(l),"data-disabled":i?"":void 0,disabled:i,value:s,...o,ref:g,onKeyDown:V(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:V(r,w=>{c(x=>Ye(x)?!0:!x),b&&m&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});Ia.displayName=Aa;var Ma=f.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:p,...c}=e;return d.jsx(gf,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:o,form:p,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(Ia,{...c,ref:t,__scopeCheckbox:r}),h&&d.jsx(Da,{__scopeCheckbox:r})]})})});Ma.displayName=or;var Oa="CheckboxIndicator",La=f.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:o,...n}=e,a=io(Oa,r);return d.jsx(Ee,{present:o||Ye(a.checked)||a.checked===!0,children:d.jsx(H.span,{"data-state":$a(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});La.displayName=Oa;var za="CheckboxBubbleInput",Da=f.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:p,form:c,bubbleInput:h,setBubbleInput:m}=io(za,e),b=te(r,m),g=tr(a),v=rr(o);f.useEffect(()=>{const x=h;if(!x)return;const y=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(y,"checked").set,C=!n.current;if(g!==a&&T){const E=new Event("click",{bubbles:C});x.indeterminate=Ye(a),T.call(x,Ye(a)?!1:a),x.dispatchEvent(E)}},[h,g,a,n]);const w=f.useRef(Ye(a)?!1:a);return d.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:p,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Da.displayName=za;function mf(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function $a(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const vf=["top","right","bottom","left"],qe=Math.min,be=Math.max,nr=Math.round,ar=Math.floor,Le=e=>({x:e,y:e}),bf={left:"right",right:"left",bottom:"top",top:"bottom"};function lo(e,t,r){return be(e,qe(t,r))}function He(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function mt(e){return e.split("-")[1]}function co(e){return e==="x"?"y":"x"}function uo(e){return e==="y"?"height":"width"}function ze(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fo(e){return co(ze(e))}function wf(e,t,r){r===void 0&&(r=!1);const o=mt(e),n=fo(e),a=uo(n);let s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=sr(s)),[s,sr(s)]}function yf(e){const t=sr(e);return[po(e),t,po(t)]}function po(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fa=["left","right"],Ba=["right","left"],xf=["top","bottom"],kf=["bottom","top"];function Sf(e,t,r){switch(e){case"top":case"bottom":return r?t?Ba:Fa:t?Fa:Ba;case"left":case"right":return t?xf:kf;default:return[]}}function Cf(e,t,r,o){const n=mt(e);let a=Sf(We(e),r==="start",o);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(po)))),a}function sr(e){const t=We(e);return bf[t]+e.slice(t.length)}function Ef(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ha(e){return typeof e!="number"?Ef(e):{top:e,right:e,bottom:e,left:e}}function ir(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function Wa(e,t,r){let{reference:o,floating:n}=e;const a=ze(t),s=fo(t),i=uo(s),l=We(t),u=a==="y",p=o.x+o.width/2-n.width/2,c=o.y+o.height/2-n.height/2,h=o[i]/2-n[i]/2;let m;switch(l){case"top":m={x:p,y:o.y-n.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:c};break;case"left":m={x:o.x-n.width,y:c};break;default:m={x:o.x,y:o.y}}switch(mt(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}async function Nf(e,t){var r;t===void 0&&(t={});const{x:o,y:n,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:h=!1,padding:m=0}=He(t,e),b=Ha(m),v=i[h?c==="floating"?"reference":"floating":c],w=ir(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),x=c==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),k=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},T=ir(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-T.top+b.top)/k.y,bottom:(T.bottom-w.bottom+b.bottom)/k.y,left:(w.left-T.left+b.left)/k.x,right:(T.right-w.right+b.right)/k.x}}const Tf=50,_f=async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,i=s.detectOverflow?s:{...s,detectOverflow:Nf},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:c}=Wa(u,o,l),h=o,m=0;const b={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:w,fn:x}=v,{x:y,y:k,data:T,reset:C}=await x({x:p,y:c,initialPlacement:o,placement:h,strategy:n,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});p=y??p,c=k??c,b[w]={...b[w],...T},C&&m<Tf&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:p,y:c}=Wa(u,h,l)),g=-1)}return{x:p,y:c,placement:h,strategy:n,middlewareData:b}},Pf=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=He(e,t)||{};if(u==null)return{};const c=Ha(p),h={x:r,y:o},m=fo(n),b=uo(m),g=await s.getDimensions(u),v=m==="y",w=v?"top":"left",x=v?"bottom":"right",y=v?"clientHeight":"clientWidth",k=a.reference[b]+a.reference[m]-h[m]-a.floating[b],T=h[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=C?C[y]:0;(!E||!await(s.isElement==null?void 0:s.isElement(C)))&&(E=i.floating[y]||a.floating[b]);const N=k/2-T/2,_=E/2-g[b]/2-1,L=qe(c[w],_),M=qe(c[x],_),z=L,U=E-g[b]-M,Y=E/2-g[b]/2+N,Z=lo(z,Y,U),P=!l.arrow&&mt(n)!=null&&Y!==Z&&a.reference[b]/2-(Y<z?L:M)-g[b]/2<0,$=P?Y<z?Y-z:Y-U:0;return{[m]:h[m]+$,data:{[m]:Z,centerOffset:Y-Z-$,...P&&{alignmentOffset:$}},reset:P}}}),Af=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=He(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=We(n),x=ze(i),y=We(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=h||(y||!g?[sr(i)]:yf(i)),C=b!=="none";!h&&C&&T.push(...Cf(i,g,b,k));const E=[i,...T],N=await l.detectOverflow(t,v),_=[];let L=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(N[w]),c){const Y=wf(n,s,k);_.push(N[Y[0]],N[Y[1]])}if(L=[...L,{placement:n,overflows:_}],!_.every(Y=>Y<=0)){var M,z;const Y=(((M=a.flip)==null?void 0:M.index)||0)+1,Z=E[Y];if(Z&&(!(c==="alignment"?x!==ze(Z):!1)||L.every(D=>ze(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:Y,overflows:L},reset:{placement:Z}};let P=(z=L.filter($=>$.overflows[0]<=0).sort(($,D)=>$.overflows[1]-D.overflows[1])[0])==null?void 0:z.placement;if(!P)switch(m){case"bestFit":{var U;const $=(U=L.filter(D=>{if(C){const Q=ze(D.placement);return Q===x||Q==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(Q=>Q>0).reduce((Q,A)=>Q+A,0)]).sort((D,Q)=>D[1]-Q[1])[0])==null?void 0:U[0];$&&(P=$);break}case"initialPlacement":P=i;break}if(n!==P)return{reset:{placement:P}}}return{}}}};function Va(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ua(e){return vf.some(t=>e[t]>=0)}const If=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=He(e,t);switch(n){case"referenceHidden":{const s=await o.detectOverflow(t,{...a,elementContext:"reference"}),i=Va(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ua(i)}}}case"escaped":{const s=await o.detectOverflow(t,{...a,altBoundary:!0}),i=Va(s,r.floating);return{data:{escapedOffsets:i,escaped:Ua(i)}}}default:return{}}}}},ja=new Set(["left","top"]);async function Mf(e,t){const{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=We(r),i=mt(r),l=ze(r)==="y",u=ja.has(s)?-1:1,p=a&&l?-1:1,c=He(t,e);let{mainAxis:h,crossAxis:m,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"&&(m=i==="end"?b*-1:b),l?{x:m*p,y:h*u}:{x:h*u,y:m*p}}const Of=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:n,y:a,placement:s,middlewareData:i}=t,l=await Mf(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}}},Lf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x,y}=w;return{x,y}}},...u}=He(e,t),p={x:r,y:o},c=await a.detectOverflow(t,u),h=ze(We(n)),m=co(h);let b=p[m],g=p[h];if(s){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=b+c[w],k=b-c[x];b=lo(y,b,k)}if(i){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=g+c[w],k=g-c[x];g=lo(y,g,k)}const v=l.fn({...t,[m]:b,[h]:g});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[m]:s,[h]:i}}}}}},zf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=He(e,t),p={x:r,y:o},c=ze(n),h=co(c);let m=p[h],b=p[c];const g=He(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=h==="y"?"height":"width",k=a.reference[h]-a.floating[y]+v.mainAxis,T=a.reference[h]+a.reference[y]-v.mainAxis;m<k?m=k:m>T&&(m=T)}if(u){var w,x;const y=h==="y"?"width":"height",k=ja.has(We(n)),T=a.reference[c]-a.floating[y]+(k&&((w=s.offset)==null?void 0:w[c])||0)+(k?0:v.crossAxis),C=a.reference[c]+a.reference[y]+(k?0:((x=s.offset)==null?void 0:x[c])||0)-(k?v.crossAxis:0);b<T?b=T:b>C&&(b=C)}return{[h]:m,[c]:b}}}},Df=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=He(e,t),p=await s.detectOverflow(t,u),c=We(n),h=mt(n),m=ze(n)==="y",{width:b,height:g}=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 x=g-p.top-p.bottom,y=b-p.left-p.right,k=qe(g-p[v],x),T=qe(b-p[w],y),C=!t.middlewareData.shift;let E=k,N=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=x),C&&!h){const L=be(p.left,0),M=be(p.right,0),z=be(p.top,0),U=be(p.bottom,0);m?N=b-2*(L!==0||M!==0?L+M:be(p.left,p.right)):E=g-2*(z!==0||U!==0?z+U:be(p.top,p.bottom))}await l({...t,availableWidth:N,availableHeight:E});const _=await s.getDimensions(i.floating);return b!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function lr(){return typeof window<"u"}function vt(e){return Ra(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(Ra(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ra(e){return lr()?e instanceof Node||e instanceof we(e).Node:!1}function Ne(e){return lr()?e instanceof Element||e instanceof we(e).Element:!1}function Ve(e){return lr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function Ga(e){return!lr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function It(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function $f(e){return/^(table|td|th)$/.test(vt(e))}function cr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ff=/transform|translate|scale|rotate|perspective|filter/,Bf=/paint|layout|strict|content/,nt=e=>!!e&&e!=="none";let ho;function go(e){const t=Ne(e)?Te(e):e;return nt(t.transform)||nt(t.translate)||nt(t.scale)||nt(t.rotate)||nt(t.perspective)||!mo()&&(nt(t.backdropFilter)||nt(t.filter))||Ff.test(t.willChange||"")||Bf.test(t.contain||"")}function Hf(e){let t=Xe(e);for(;Ve(t)&&!bt(t);){if(go(t))return t;if(cr(t))return null;t=Xe(t)}return null}function mo(){return ho==null&&(ho=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ho}function bt(e){return/^(html|body|#document)$/.test(vt(e))}function Te(e){return we(e).getComputedStyle(e)}function dr(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(vt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ga(e)&&e.host||De(e);return Ga(t)?t.host:t}function Ya(e){const t=Xe(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ve(t)&&It(t)?t:Ya(t)}function Mt(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=Ya(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),s=we(n);if(a){const i=vo(s);return t.concat(s,s.visualViewport||[],It(n)?n:[],i&&r?Mt(i):[])}else return t.concat(n,Mt(n,[],r))}function vo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qa(e){const t=Te(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=Ve(e),a=n?e.offsetWidth:r,s=n?e.offsetHeight:o,i=nr(r)!==a||nr(o)!==s;return i&&(r=a,o=s),{width:r,height:o,$:i}}function bo(e){return Ne(e)?e:e.contextElement}function wt(e){const t=bo(e);if(!Ve(t))return Le(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:a}=qa(t);let s=(a?nr(r.width):r.width)/o,i=(a?nr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Wf=Le(0);function Xa(e){const t=we(e);return!mo()||!t.visualViewport?Wf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==we(e)?!1:t}function at(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=bo(e);let s=Le(1);t&&(o?Ne(o)&&(s=wt(o)):s=wt(e));const i=Vf(a,r,o)?Xa(a):Le(0);let l=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,p=n.width/s.x,c=n.height/s.y;if(a){const h=we(a),m=o&&Ne(o)?we(o):o;let b=h,g=vo(b);for(;g&&o&&m!==b;){const v=wt(g),w=g.getBoundingClientRect(),x=Te(g),y=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,k=w.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,c*=v.y,l+=y,u+=k,b=we(g),g=vo(b)}}return ir({width:p,height:c,x:l,y:u})}function ur(e,t){const r=dr(e).scrollLeft;return t?t.left+r:at(De(e)).left+r}function Ka(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-ur(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Uf(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const a=n==="fixed",s=De(o),i=t?cr(t.floating):!1;if(o===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Le(1);const p=Le(0),c=Ve(o);if((c||!c&&!a)&&((vt(o)!=="body"||It(s))&&(l=dr(o)),c)){const m=at(o);u=wt(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const h=s&&!c&&!a?Ka(s,l):Le(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:r.y*u.y-l.scrollTop*u.y+p.y+h.y}}function jf(e){return Array.from(e.getClientRects())}function Rf(e){const t=De(e),r=dr(e),o=e.ownerDocument.body,n=be(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=be(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-r.scrollLeft+ur(e);const i=-r.scrollTop;return Te(o).direction==="rtl"&&(s+=be(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:s,y:i}}const Za=25;function Gf(e,t){const r=we(e),o=De(e),n=r.visualViewport;let a=o.clientWidth,s=o.clientHeight,i=0,l=0;if(n){a=n.width,s=n.height;const p=mo();(!p||p&&t==="fixed")&&(i=n.offsetLeft,l=n.offsetTop)}const u=ur(o);if(u<=0){const p=o.ownerDocument,c=p.body,h=getComputedStyle(c),m=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(o.clientWidth-c.clientWidth-m);b<=Za&&(a-=b)}else u<=Za&&(a+=u);return{width:a,height:s,x:i,y:l}}function Yf(e,t){const r=at(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=Ve(e)?wt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:s,height:i,x:l,y:u}}function Ja(e,t,r){let o;if(t==="viewport")o=Gf(e,r);else if(t==="document")o=Rf(De(e));else if(Ne(t))o=Yf(t,r);else{const n=Xa(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ir(o)}function Qa(e,t){const r=Xe(e);return r===t||!Ne(r)||bt(r)?!1:Te(r).position==="fixed"||Qa(r,t)}function qf(e,t){const r=t.get(e);if(r)return r;let o=Mt(e,[],!1).filter(i=>Ne(i)&&vt(i)!=="body"),n=null;const a=Te(e).position==="fixed";let s=a?Xe(e):e;for(;Ne(s)&&!bt(s);){const i=Te(s),l=go(s);!l&&i.position==="fixed"&&(n=null),(a?!l&&!n:!l&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||It(s)&&!l&&Qa(e,s))?o=o.filter(p=>p!==s):n=i,s=Xe(s)}return t.set(e,o),o}function Xf(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const s=[...r==="clippingAncestors"?cr(t)?[]:qf(t,this._c):[].concat(r),o],i=Ja(t,s[0],n);let l=i.top,u=i.right,p=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const m=Ja(t,s[h],n);l=be(m.top,l),u=qe(m.right,u),p=qe(m.bottom,p),c=be(m.left,c)}return{width:u-c,height:p-l,x:c,y:l}}function Kf(e){const{width:t,height:r}=qa(e);return{width:t,height:r}}function Zf(e,t,r){const o=Ve(t),n=De(t),a=r==="fixed",s=at(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=ur(n)}if(o||!o&&!a)if((vt(t)!=="body"||It(n))&&(i=dr(t)),o){const m=at(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else n&&u();a&&!o&&n&&u();const p=n&&!o&&!a?Ka(n,i):Le(0),c=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:c,y:h,width:s.width,height:s.height}}function wo(e){return Te(e).position==="static"}function es(e,t){if(!Ve(e)||Te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return De(e)===r&&(r=r.ownerDocument.body),r}function ts(e,t){const r=we(e);if(cr(e))return r;if(!Ve(e)){let n=Xe(e);for(;n&&!bt(n);){if(Ne(n)&&!wo(n))return n;n=Xe(n)}return r}let o=es(e,t);for(;o&&$f(o)&&wo(o);)o=es(o,t);return o&&bt(o)&&wo(o)&&!go(o)?r:o||Hf(e)||r}const Jf=async function(e){const t=this.getOffsetParent||ts,r=this.getDimensions,o=await r(e.floating);return{reference:Zf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Qf(e){return Te(e).direction==="rtl"}const ep={convertOffsetParentRelativeRectToViewportRelativeRect:Uf,getDocumentElement:De,getClippingRect:Xf,getOffsetParent:ts,getElementRects:Jf,getClientRects:jf,getDimensions:Kf,getScale:wt,isElement:Ne,isRTL:Qf};function rs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tp(e,t){let r=null,o;const n=De(e);function a(){var i;clearTimeout(o),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:c,width:h,height:m}=u;if(i||t(),!h||!m)return;const b=ar(c),g=ar(n.clientWidth-(p+h)),v=ar(n.clientHeight-(c+m)),w=ar(p),y={rootMargin:-b+"px "+-g+"px "+-v+"px "+-w+"px",threshold:be(0,qe(1,l))||1};let k=!0;function T(C){const E=C[0].intersectionRatio;if(E!==l){if(!k)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!rs(u,e.getBoundingClientRect())&&s(),k=!1}try{r=new IntersectionObserver(T,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(T,y)}r.observe(e)}return s(!0),a}function rp(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=bo(e),p=n||a?[...u?Mt(u):[],...t?Mt(t):[]]:[];p.forEach(w=>{n&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const c=u&&i?tp(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),r()}),u&&!l&&m.observe(u),t&&m.observe(t));let b,g=l?at(e):null;l&&v();function v(){const w=at(e);g&&!rs(g,w)&&r(),g=w,b=requestAnimationFrame(v)}return r(),()=>{var w;p.forEach(x=>{n&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),c==null||c(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const op=Of,np=Lf,ap=Af,sp=Df,ip=If,os=Pf,lp=zf,cp=(e,t,r)=>{const o=new Map,n={platform:ep,...r},a={...n.platform,_c:o};return _f(e,t,{...n,platform:a})};var dp=typeof document<"u",up=function(){},fr=dp?S.useLayoutEffect:up;function pr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!pr(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){const a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!pr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ns(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function as(e,t){const r=ns(e);return Math.round(t*r)/r}function yo(e){const t=f.useRef(e);return fr(()=>{t.current=e}),t}function fp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,c]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(o);pr(h,o)||m(o);const[b,g]=f.useState(null),[v,w]=f.useState(null),x=f.useCallback(D=>{D!==C.current&&(C.current=D,g(D))},[]),y=f.useCallback(D=>{D!==E.current&&(E.current=D,w(D))},[]),k=a||b,T=s||v,C=f.useRef(null),E=f.useRef(null),N=f.useRef(p),_=l!=null,L=yo(l),M=yo(n),z=yo(u),U=f.useCallback(()=>{if(!C.current||!E.current)return;const D={placement:t,strategy:r,middleware:h};M.current&&(D.platform=M.current),cp(C.current,E.current,D).then(Q=>{const A={...Q,isPositioned:z.current!==!1};Y.current&&!pr(N.current,A)&&(N.current=A,$t.flushSync(()=>{c(A)}))})},[h,t,r,M,z]);fr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,c(D=>({...D,isPositioned:!1})))},[u]);const Y=f.useRef(!1);fr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),fr(()=>{if(k&&(C.current=k),T&&(E.current=T),k&&T){if(L.current)return L.current(k,T,U);U()}},[k,T,U,L,_]);const Z=f.useMemo(()=>({reference:C,floating:E,setReference:x,setFloating:y}),[x,y]),P=f.useMemo(()=>({reference:k,floating:T}),[k,T]),$=f.useMemo(()=>{const D={position:r,left:0,top:0};if(!P.floating)return D;const Q=as(P.floating,p.x),A=as(P.floating,p.y);return i?{...D,transform:"translate("+Q+"px, "+A+"px)",...ns(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:A}},[r,i,P.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:U,refs:Z,elements:P,floatingStyles:$}),[p,U,Z,P,$])}const pp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?os({element:o.current,padding:n}).fn(r):{}:o?os({element:o,padding:n}).fn(r):{}}}},hp=(e,t)=>{const r=op(e);return{name:r.name,fn:r.fn,options:[e,t]}},gp=(e,t)=>{const r=np(e);return{name:r.name,fn:r.fn,options:[e,t]}},mp=(e,t)=>({fn:lp(e).fn,options:[e,t]}),vp=(e,t)=>{const r=ap(e);return{name:r.name,fn:r.fn,options:[e,t]}},bp=(e,t)=>{const r=sp(e);return{name:r.name,fn:r.fn,options:[e,t]}},wp=(e,t)=>{const r=ip(e);return{name:r.name,fn:r.fn,options:[e,t]}},yp=(e,t)=>{const r=pp(e);return{name:r.name,fn:r.fn,options:[e,t]}};var xp="Arrow",ss=f.forwardRef((e,t)=>{const{children:r,width:o=10,height:n=5,...a}=e;return d.jsx(H.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ss.displayName=xp;var kp=ss,xo="Popper",[is,hr]=ge(xo),[Sp,ls]=is(xo),cs=e=>{const{__scopePopper:t,children:r}=e,[o,n]=f.useState(null);return d.jsx(Sp,{scope:t,anchor:o,onAnchorChange:n,children:r})};cs.displayName=xo;var ds="PopperAnchor",us=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...n}=e,a=ls(ds,r),s=f.useRef(null),i=te(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(o==null?void 0:o.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:d.jsx(H.div,{...n,ref:i})});us.displayName=ds;var ko="PopperContent",[Cp,Ep]=is(ko),fs=f.forwardRef((e,t)=>{var F,B,G,oe,J,X;const{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,v=ls(ko,r),[w,x]=f.useState(null),y=te(t,le=>x(le)),[k,T]=f.useState(null),C=rr(k),E=(C==null?void 0:C.width)??0,N=(C==null?void 0:C.height)??0,_=o+(a!=="center"?"-"+a:""),L=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},M=Array.isArray(u)?u:[u],z=M.length>0,U={padding:L,boundary:M.filter(Tp),altBoundary:z},{refs:Y,floatingStyles:Z,placement:P,isPositioned:$,middlewareData:D}=fp({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>rp(...le,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[hp({mainAxis:n+N,alignmentAxis:s}),l&&gp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?mp():void 0,...U}),l&&vp({...U}),bp({...U,apply:({elements:le,rects:ce,availableWidth:lt,availableHeight:Je})=>{const{width:Pe,height:Ir}=ce.reference,me=le.floating.style;me.setProperty("--radix-popper-available-width",`${lt}px`),me.setProperty("--radix-popper-available-height",`${Je}px`),me.setProperty("--radix-popper-anchor-width",`${Pe}px`),me.setProperty("--radix-popper-anchor-height",`${Ir}px`)}}),k&&yp({element:k,padding:i}),_p({arrowWidth:E,arrowHeight:N}),h&&wp({strategy:"referenceHidden",...U})]}),[Q,A]=gs(P),se=fe(b);ae(()=>{$&&(se==null||se())},[$,se]);const ye=(F=D.arrow)==null?void 0:F.x,R=(B=D.arrow)==null?void 0:B.y,re=((G=D.arrow)==null?void 0:G.centerOffset)!==0,[j,ee]=f.useState();return ae(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:$?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[(oe=D.transformOrigin)==null?void 0:oe.x,(J=D.transformOrigin)==null?void 0:J.y].join(" "),...((X=D.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Cp,{scope:r,placedSide:Q,onArrowChange:T,arrowX:ye,arrowY:R,shouldHideArrow:re,children:d.jsx(H.div,{"data-side":Q,"data-align":A,...g,ref:y,style:{...g.style,animation:$?void 0:"none"}})})})});fs.displayName=ko;var ps="PopperArrow",Np={top:"bottom",right:"left",bottom:"top",left:"right"},hs=f.forwardRef(function(t,r){const{__scopePopper:o,...n}=t,a=Ep(ps,o),s=Np[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(kp,{...n,ref:r,style:{...n.style,display:"block"}})})});hs.displayName=ps;function Tp(e){return e!==null}var _p=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;const{placement:r,rects:o,middlewareData:n}=t,s=((v=n.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=gs(r),c={start:"0%",center:"50%",end:"100%"}[p],h=(((w=n.arrow)==null?void 0:w.x)??0)+i/2,m=(((x=n.arrow)==null?void 0:x.y)??0)+l/2;let b="",g="";return u==="bottom"?(b=s?c:`${h}px`,g=`${-l}px`):u==="top"?(b=s?c:`${h}px`,g=`${o.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=s?c:`${m}px`):u==="left"&&(b=`${o.floating.width+l}px`,g=s?c:`${m}px`),{data:{x:b,y:g}}}});function gs(e){const[t,r="center"]=e.split("-");return[t,r]}var ms=cs,vs=us,bs=fs,ws=hs,So="rovingFocusGroup.onEntryFocus",Pp={bubbles:!1,cancelable:!0},Ot="RovingFocusGroup",[Co,ys,Ap]=Rn(Ot),[Ip,gr]=ge(Ot,[Ap]),[Mp,Op]=Ip(Ot),xs=f.forwardRef((e,t)=>d.jsx(Co.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Co.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Lp,{...e,ref:t})})}));xs.displayName=Ot;var Lp=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...c}=e,h=f.useRef(null),m=te(t,h),b=At(a),[g,v]=Be({prop:s,defaultProp:i??null,onChange:l,caller:Ot}),[w,x]=f.useState(!1),y=fe(u),k=ys(r),T=f.useRef(!1),[C,E]=f.useState(0);return f.useEffect(()=>{const N=h.current;if(N)return N.addEventListener(So,y),()=>N.removeEventListener(So,y)},[y]),d.jsx(Mp,{scope:r,orientation:o,dir:b,loop:n,currentTabStopId:g,onItemFocus:f.useCallback(N=>v(N),[v]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>E(N=>N+1),[]),onFocusableItemRemove:f.useCallback(()=>E(N=>N-1),[]),children:d.jsx(H.div,{tabIndex:w||C===0?-1:0,"data-orientation":o,...c,ref:m,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{T.current=!0}),onFocus:V(e.onFocus,N=>{const _=!T.current;if(N.target===N.currentTarget&&_&&!w){const L=new CustomEvent(So,Pp);if(N.currentTarget.dispatchEvent(L),!L.defaultPrevented){const M=k().filter(P=>P.focusable),z=M.find(P=>P.active),U=M.find(P=>P.id===g),Z=[z,U,...M].filter(Boolean).map(P=>P.ref.current);Cs(Z,p)}}T.current=!1}),onBlur:V(e.onBlur,()=>x(!1))})})}),ks="RovingFocusGroupItem",Ss=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:s,...i}=e,l=ot(),u=a||l,p=Op(ks,r),c=p.currentTabStopId===u,h=ys(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=p;return f.useEffect(()=>{if(o)return m(),()=>b()},[o,m,b]),d.jsx(Co.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:d.jsx(H.span,{tabIndex:c?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:V(e.onMouseDown,v=>{o?p.onItemFocus(u):v.preventDefault()}),onFocus:V(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:V(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=$p(v,p.orientation,p.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=h().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")y.reverse();else if(w==="prev"||w==="next"){w==="prev"&&y.reverse();const k=y.indexOf(v.currentTarget);y=p.loop?Fp(y,k+1):y.slice(k+1)}setTimeout(()=>Cs(y))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});Ss.displayName=ks;var zp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $p(e,t,r){const o=Dp(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return zp[o]}function Cs(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function Fp(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Es=xs,Ns=Ss,Bp="Label",Ts=f.forwardRef((e,t)=>d.jsx(H.label,{...e,ref:t,onMouseDown:r=>{var n;r.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ts.displayName=Bp;var Hp=Ts;function Eo(e,[t,r]){return Math.min(r,Math.max(t,e))}var No="Progress",To=100,[Wp]=ge(No),[Vp,Up]=Wp(No),_s=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:o=null,max:n,getValueLabel:a=jp,...s}=e;(n||n===0)&&!Ms(n)&&console.error(Rp(`${n}`,"Progress"));const i=Ms(n)?n:To;o!==null&&!Os(o,i)&&console.error(Gp(`${o}`,"Progress"));const l=Os(o,i)?o:null,u=mr(l)?a(l,i):void 0;return d.jsx(Vp,{scope:r,value:l,max:i,children:d.jsx(H.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":mr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Is(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});_s.displayName=No;var Ps="ProgressIndicator",As=f.forwardRef((e,t)=>{const{__scopeProgress:r,...o}=e,n=Up(Ps,r);return d.jsx(H.div,{"data-state":Is(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...o,ref:t})});As.displayName=Ps;function jp(e,t){return`${Math.round(e/t*100)}%`}function Is(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function mr(e){return typeof e=="number"}function Ms(e){return mr(e)&&!isNaN(e)&&e>0}function Os(e,t){return mr(e)&&!isNaN(e)&&e<=t&&e>=0}function Rp(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${To}\`.`}function Gp(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
260
|
+
*/var Ca;function af(){if(Ca)return io;Ca=1;var e=k;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var r=typeof Object.is=="function"?Object.is:t,o=e.useState,n=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var m=h(),b=o({inst:{value:m,getSnapshot:h}}),g=b[0].inst,v=b[1];return a(function(){g.value=m,g.getSnapshot=h,l(g)&&v({inst:g})},[c,m,h]),n(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),s(m),m}function l(c){var h=c.getSnapshot;c=c.value;try{var m=h();return!r(c,m)}catch{return!0}}function u(c,h){return h()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return io.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,io}var Ea;function sf(){return Ea||(Ea=1,so.exports=af()),so.exports}var lf=sf();function cf(){return lf.useSyncExternalStore(df,()=>!0,()=>!1)}function df(){return()=>{}}var lo="Avatar",[uf]=ge(lo),[ff,Na]=uf(lo),Ta=f.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[n,a]=f.useState("idle");return d.jsx(ff,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:d.jsx(H.span,{...o,ref:t})})});Ta.displayName=lo;var _a="AvatarImage",Pa=f.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,s=Na(_a,r),i=pf(o,a),l=fe(u=>{n(u),s.onImageLoadingStatusChange(u)});return ae(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(H.img,{...a,ref:t,src:o}):null});Pa.displayName=_a;var Aa="AvatarFallback",Ia=f.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...n}=e,a=Na(Aa,r),[s,i]=f.useState(o===void 0);return f.useEffect(()=>{if(o!==void 0){const l=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(l)}},[o]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(H.span,{...n,ref:t}):null});Ia.displayName=Aa;function Ma(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function pf(e,{referrerPolicy:t,crossOrigin:r}){const o=cf(),n=f.useRef(null),a=o?(n.current||(n.current=new window.Image),n.current):null,[s,i]=f.useState(()=>Ma(a,e));return ae(()=>{i(Ma(a,e))},[a,e]),ae(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),p=l("error");return a.addEventListener("load",u),a.addEventListener("error",p),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",p)}},[a,r,t]),s}var hf=Ta,gf=Pa,mf=Ia;function or(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function nr(e){const[t,r]=f.useState(void 0);return ae(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[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;r({width:s,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var ar="Checkbox",[vf]=ge(ar),[bf,co]=vf(ar);function wf(e){const{__scopeCheckbox:t,checked:r,children:o,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:p="on",internal_do_not_use_render:c}=e,[h,m]=Be({prop:r,defaultProp:n??!1,onChange:l,caller:ar}),[b,g]=f.useState(null),[v,w]=f.useState(null),x=f.useRef(!1),y=b?!!s||!!b.closest("form"):!0,S={checked:h,disabled:a,setChecked:m,control:b,setControl:g,name:i,form:s,value:p,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Ye(n)?!1:n,isFormControl:y,bubbleInput:v,setBubbleInput:w};return d.jsx(bf,{scope:t,...S,children:yf(c)?c(S):o})}var Oa="CheckboxTrigger",La=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:p,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:b}=co(Oa,e),g=te(n,p),v=f.useRef(l);return f.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const x=()=>c(v.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[a,c]),d.jsx(H.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":Ha(l),"data-disabled":i?"":void 0,disabled:i,value:s,...o,ref:g,onKeyDown:V(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:V(r,w=>{c(x=>Ye(x)?!0:!x),b&&m&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});La.displayName=Oa;var za=f.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:p,...c}=e;return d.jsx(wf,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:o,form:p,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(La,{...c,ref:t,__scopeCheckbox:r}),h&&d.jsx(Ba,{__scopeCheckbox:r})]})})});za.displayName=ar;var Da="CheckboxIndicator",$a=f.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:o,...n}=e,a=co(Da,r);return d.jsx(Ee,{present:o||Ye(a.checked)||a.checked===!0,children:d.jsx(H.span,{"data-state":Ha(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});$a.displayName=Da;var Fa="CheckboxBubbleInput",Ba=f.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:p,form:c,bubbleInput:h,setBubbleInput:m}=co(Fa,e),b=te(r,m),g=or(a),v=nr(o);f.useEffect(()=>{const x=h;if(!x)return;const y=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(y,"checked").set,C=!n.current;if(g!==a&&T){const E=new Event("click",{bubbles:C});x.indeterminate=Ye(a),T.call(x,Ye(a)?!1:a),x.dispatchEvent(E)}},[h,g,a,n]);const w=f.useRef(Ye(a)?!1:a);return d.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:p,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ba.displayName=Fa;function yf(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function Ha(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const xf=["top","right","bottom","left"],qe=Math.min,be=Math.max,sr=Math.round,ir=Math.floor,Le=e=>({x:e,y:e}),kf={left:"right",right:"left",bottom:"top",top:"bottom"};function uo(e,t,r){return be(e,qe(t,r))}function He(e,t){return typeof e=="function"?e(t):e}function Ve(e){return e.split("-")[0]}function vt(e){return e.split("-")[1]}function fo(e){return e==="x"?"y":"x"}function po(e){return e==="y"?"height":"width"}function ze(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ho(e){return fo(ze(e))}function Sf(e,t,r){r===void 0&&(r=!1);const o=vt(e),n=ho(e),a=po(n);let s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=lr(s)),[s,lr(s)]}function Cf(e){const t=lr(e);return[go(e),t,go(t)]}function go(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Va=["left","right"],Wa=["right","left"],Ef=["top","bottom"],Nf=["bottom","top"];function Tf(e,t,r){switch(e){case"top":case"bottom":return r?t?Wa:Va:t?Va:Wa;case"left":case"right":return t?Ef:Nf;default:return[]}}function _f(e,t,r,o){const n=vt(e);let a=Tf(Ve(e),r==="start",o);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(go)))),a}function lr(e){const t=Ve(e);return kf[t]+e.slice(t.length)}function Pf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ua(e){return typeof e!="number"?Pf(e):{top:e,right:e,bottom:e,left:e}}function cr(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function ja(e,t,r){let{reference:o,floating:n}=e;const a=ze(t),s=ho(t),i=po(s),l=Ve(t),u=a==="y",p=o.x+o.width/2-n.width/2,c=o.y+o.height/2-n.height/2,h=o[i]/2-n[i]/2;let m;switch(l){case"top":m={x:p,y:o.y-n.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:c};break;case"left":m={x:o.x-n.width,y:c};break;default:m={x:o.x,y:o.y}}switch(vt(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}async function Af(e,t){var r;t===void 0&&(t={});const{x:o,y:n,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:h=!1,padding:m=0}=He(t,e),b=Ua(m),v=i[h?c==="floating"?"reference":"floating":c],w=cr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),x=c==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},T=cr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-T.top+b.top)/S.y,bottom:(T.bottom-w.bottom+b.bottom)/S.y,left:(w.left-T.left+b.left)/S.x,right:(T.right-w.right+b.right)/S.x}}const If=50,Mf=async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,i=s.detectOverflow?s:{...s,detectOverflow:Af},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:c}=ja(u,o,l),h=o,m=0;const b={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:w,fn:x}=v,{x:y,y:S,data:T,reset:C}=await x({x:p,y:c,initialPlacement:o,placement:h,strategy:n,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});p=y??p,c=S??c,b[w]={...b[w],...T},C&&m<If&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:p,y:c}=ja(u,h,l)),g=-1)}return{x:p,y:c,placement:h,strategy:n,middlewareData:b}},Of=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=He(e,t)||{};if(u==null)return{};const c=Ua(p),h={x:r,y:o},m=ho(n),b=po(m),g=await s.getDimensions(u),v=m==="y",w=v?"top":"left",x=v?"bottom":"right",y=v?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[m]-h[m]-a.floating[b],T=h[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=C?C[y]:0;(!E||!await(s.isElement==null?void 0:s.isElement(C)))&&(E=i.floating[y]||a.floating[b]);const N=S/2-T/2,_=E/2-g[b]/2-1,O=qe(c[w],_),$=qe(c[x],_),W=O,j=E-g[b]-$,Y=E/2-g[b]/2+N,Z=uo(W,Y,j),P=!l.arrow&&vt(n)!=null&&Y!==Z&&a.reference[b]/2-(Y<W?O:$)-g[b]/2<0,z=P?Y<W?Y-W:Y-j:0;return{[m]:h[m]+z,data:{[m]:Z,centerOffset:Y-Z-z,...P&&{alignmentOffset:z}},reset:P}}}),Lf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=He(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=Ve(n),x=ze(i),y=Ve(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=h||(y||!g?[lr(i)]:Cf(i)),C=b!=="none";!h&&C&&T.push(..._f(i,g,b,S));const E=[i,...T],N=await l.detectOverflow(t,v),_=[];let O=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(N[w]),c){const Y=Sf(n,s,S);_.push(N[Y[0]],N[Y[1]])}if(O=[...O,{placement:n,overflows:_}],!_.every(Y=>Y<=0)){var $,W;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,Z=E[Y];if(Z&&(!(c==="alignment"?x!==ze(Z):!1)||O.every(L=>ze(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:Y,overflows:O},reset:{placement:Z}};let P=(W=O.filter(z=>z.overflows[0]<=0).sort((z,L)=>z.overflows[1]-L.overflows[1])[0])==null?void 0:W.placement;if(!P)switch(m){case"bestFit":{var j;const z=(j=O.filter(L=>{if(C){const Q=ze(L.placement);return Q===x||Q==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Q=>Q>0).reduce((Q,A)=>Q+A,0)]).sort((L,Q)=>L[1]-Q[1])[0])==null?void 0:j[0];z&&(P=z);break}case"initialPlacement":P=i;break}if(n!==P)return{reset:{placement:P}}}return{}}}};function Ra(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ga(e){return xf.some(t=>e[t]>=0)}const zf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=He(e,t);switch(n){case"referenceHidden":{const s=await o.detectOverflow(t,{...a,elementContext:"reference"}),i=Ra(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ga(i)}}}case"escaped":{const s=await o.detectOverflow(t,{...a,altBoundary:!0}),i=Ra(s,r.floating);return{data:{escapedOffsets:i,escaped:Ga(i)}}}default:return{}}}}},Ya=new Set(["left","top"]);async function Df(e,t){const{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=Ve(r),i=vt(r),l=ze(r)==="y",u=Ya.has(s)?-1:1,p=a&&l?-1:1,c=He(t,e);let{mainAxis:h,crossAxis:m,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"&&(m=i==="end"?b*-1:b),l?{x:m*p,y:h*u}:{x:h*u,y:m*p}}const $f=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:n,y:a,placement:s,middlewareData:i}=t,l=await Df(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ff=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x,y}=w;return{x,y}}},...u}=He(e,t),p={x:r,y:o},c=await a.detectOverflow(t,u),h=ze(Ve(n)),m=fo(h);let b=p[m],g=p[h];if(s){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=b+c[w],S=b-c[x];b=uo(y,b,S)}if(i){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=g+c[w],S=g-c[x];g=uo(y,g,S)}const v=l.fn({...t,[m]:b,[h]:g});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[m]:s,[h]:i}}}}}},Bf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=He(e,t),p={x:r,y:o},c=ze(n),h=fo(c);let m=p[h],b=p[c];const g=He(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=h==="y"?"height":"width",S=a.reference[h]-a.floating[y]+v.mainAxis,T=a.reference[h]+a.reference[y]-v.mainAxis;m<S?m=S:m>T&&(m=T)}if(u){var w,x;const y=h==="y"?"width":"height",S=Ya.has(Ve(n)),T=a.reference[c]-a.floating[y]+(S&&((w=s.offset)==null?void 0:w[c])||0)+(S?0:v.crossAxis),C=a.reference[c]+a.reference[y]+(S?0:((x=s.offset)==null?void 0:x[c])||0)-(S?v.crossAxis:0);b<T?b=T:b>C&&(b=C)}return{[h]:m,[c]:b}}}},Hf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=He(e,t),p=await s.detectOverflow(t,u),c=Ve(n),h=vt(n),m=ze(n)==="y",{width:b,height:g}=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 x=g-p.top-p.bottom,y=b-p.left-p.right,S=qe(g-p[v],x),T=qe(b-p[w],y),C=!t.middlewareData.shift;let E=S,N=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=x),C&&!h){const O=be(p.left,0),$=be(p.right,0),W=be(p.top,0),j=be(p.bottom,0);m?N=b-2*(O!==0||$!==0?O+$:be(p.left,p.right)):E=g-2*(W!==0||j!==0?W+j:be(p.top,p.bottom))}await l({...t,availableWidth:N,availableHeight:E});const _=await s.getDimensions(i.floating);return b!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function dr(){return typeof window<"u"}function bt(e){return qa(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(qa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qa(e){return dr()?e instanceof Node||e instanceof we(e).Node:!1}function Ne(e){return dr()?e instanceof Element||e instanceof we(e).Element:!1}function We(e){return dr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function Xa(e){return!dr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function Ot(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function Vf(e){return/^(table|td|th)$/.test(bt(e))}function ur(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Wf=/transform|translate|scale|rotate|perspective|filter/,Uf=/paint|layout|strict|content/,nt=e=>!!e&&e!=="none";let mo;function vo(e){const t=Ne(e)?Te(e):e;return nt(t.transform)||nt(t.translate)||nt(t.scale)||nt(t.rotate)||nt(t.perspective)||!bo()&&(nt(t.backdropFilter)||nt(t.filter))||Wf.test(t.willChange||"")||Uf.test(t.contain||"")}function jf(e){let t=Xe(e);for(;We(t)&&!wt(t);){if(vo(t))return t;if(ur(t))return null;t=Xe(t)}return null}function bo(){return mo==null&&(mo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mo}function wt(e){return/^(html|body|#document)$/.test(bt(e))}function Te(e){return we(e).getComputedStyle(e)}function fr(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xa(e)&&e.host||De(e);return Xa(t)?t.host:t}function Ka(e){const t=Xe(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&Ot(t)?t:Ka(t)}function Lt(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=Ka(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),s=we(n);if(a){const i=wo(s);return t.concat(s,s.visualViewport||[],Ot(n)?n:[],i&&r?Lt(i):[])}else return t.concat(n,Lt(n,[],r))}function wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Za(e){const t=Te(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=We(e),a=n?e.offsetWidth:r,s=n?e.offsetHeight:o,i=sr(r)!==a||sr(o)!==s;return i&&(r=a,o=s),{width:r,height:o,$:i}}function yo(e){return Ne(e)?e:e.contextElement}function yt(e){const t=yo(e);if(!We(t))return Le(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:a}=Za(t);let s=(a?sr(r.width):r.width)/o,i=(a?sr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Rf=Le(0);function Ja(e){const t=we(e);return!bo()||!t.visualViewport?Rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==we(e)?!1:t}function at(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=yo(e);let s=Le(1);t&&(o?Ne(o)&&(s=yt(o)):s=yt(e));const i=Gf(a,r,o)?Ja(a):Le(0);let l=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,p=n.width/s.x,c=n.height/s.y;if(a){const h=we(a),m=o&&Ne(o)?we(o):o;let b=h,g=wo(b);for(;g&&o&&m!==b;){const v=yt(g),w=g.getBoundingClientRect(),x=Te(g),y=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,c*=v.y,l+=y,u+=S,b=we(g),g=wo(b)}}return cr({width:p,height:c,x:l,y:u})}function pr(e,t){const r=fr(e).scrollLeft;return t?t.left+r:at(De(e)).left+r}function Qa(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-pr(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Yf(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const a=n==="fixed",s=De(o),i=t?ur(t.floating):!1;if(o===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Le(1);const p=Le(0),c=We(o);if((c||!c&&!a)&&((bt(o)!=="body"||Ot(s))&&(l=fr(o)),c)){const m=at(o);u=yt(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const h=s&&!c&&!a?Qa(s,l):Le(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:r.y*u.y-l.scrollTop*u.y+p.y+h.y}}function qf(e){return Array.from(e.getClientRects())}function Xf(e){const t=De(e),r=fr(e),o=e.ownerDocument.body,n=be(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=be(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-r.scrollLeft+pr(e);const i=-r.scrollTop;return Te(o).direction==="rtl"&&(s+=be(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:s,y:i}}const es=25;function Kf(e,t){const r=we(e),o=De(e),n=r.visualViewport;let a=o.clientWidth,s=o.clientHeight,i=0,l=0;if(n){a=n.width,s=n.height;const p=bo();(!p||p&&t==="fixed")&&(i=n.offsetLeft,l=n.offsetTop)}const u=pr(o);if(u<=0){const p=o.ownerDocument,c=p.body,h=getComputedStyle(c),m=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(o.clientWidth-c.clientWidth-m);b<=es&&(a-=b)}else u<=es&&(a+=u);return{width:a,height:s,x:i,y:l}}function Zf(e,t){const r=at(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=We(e)?yt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:s,height:i,x:l,y:u}}function ts(e,t,r){let o;if(t==="viewport")o=Kf(e,r);else if(t==="document")o=Xf(De(e));else if(Ne(t))o=Zf(t,r);else{const n=Ja(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cr(o)}function rs(e,t){const r=Xe(e);return r===t||!Ne(r)||wt(r)?!1:Te(r).position==="fixed"||rs(r,t)}function Jf(e,t){const r=t.get(e);if(r)return r;let o=Lt(e,[],!1).filter(i=>Ne(i)&&bt(i)!=="body"),n=null;const a=Te(e).position==="fixed";let s=a?Xe(e):e;for(;Ne(s)&&!wt(s);){const i=Te(s),l=vo(s);!l&&i.position==="fixed"&&(n=null),(a?!l&&!n:!l&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Ot(s)&&!l&&rs(e,s))?o=o.filter(p=>p!==s):n=i,s=Xe(s)}return t.set(e,o),o}function Qf(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const s=[...r==="clippingAncestors"?ur(t)?[]:Jf(t,this._c):[].concat(r),o],i=ts(t,s[0],n);let l=i.top,u=i.right,p=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const m=ts(t,s[h],n);l=be(m.top,l),u=qe(m.right,u),p=qe(m.bottom,p),c=be(m.left,c)}return{width:u-c,height:p-l,x:c,y:l}}function ep(e){const{width:t,height:r}=Za(e);return{width:t,height:r}}function tp(e,t,r){const o=We(t),n=De(t),a=r==="fixed",s=at(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=pr(n)}if(o||!o&&!a)if((bt(t)!=="body"||Ot(n))&&(i=fr(t)),o){const m=at(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else n&&u();a&&!o&&n&&u();const p=n&&!o&&!a?Qa(n,i):Le(0),c=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:c,y:h,width:s.width,height:s.height}}function xo(e){return Te(e).position==="static"}function os(e,t){if(!We(e)||Te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return De(e)===r&&(r=r.ownerDocument.body),r}function ns(e,t){const r=we(e);if(ur(e))return r;if(!We(e)){let n=Xe(e);for(;n&&!wt(n);){if(Ne(n)&&!xo(n))return n;n=Xe(n)}return r}let o=os(e,t);for(;o&&Vf(o)&&xo(o);)o=os(o,t);return o&&wt(o)&&xo(o)&&!vo(o)?r:o||jf(e)||r}const rp=async function(e){const t=this.getOffsetParent||ns,r=this.getDimensions,o=await r(e.floating);return{reference:tp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function op(e){return Te(e).direction==="rtl"}const np={convertOffsetParentRelativeRectToViewportRelativeRect:Yf,getDocumentElement:De,getClippingRect:Qf,getOffsetParent:ns,getElementRects:rp,getClientRects:qf,getDimensions:ep,getScale:yt,isElement:Ne,isRTL:op};function as(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ap(e,t){let r=null,o;const n=De(e);function a(){var i;clearTimeout(o),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:c,width:h,height:m}=u;if(i||t(),!h||!m)return;const b=ir(c),g=ir(n.clientWidth-(p+h)),v=ir(n.clientHeight-(c+m)),w=ir(p),y={rootMargin:-b+"px "+-g+"px "+-v+"px "+-w+"px",threshold:be(0,qe(1,l))||1};let S=!0;function T(C){const E=C[0].intersectionRatio;if(E!==l){if(!S)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!as(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(T,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(T,y)}r.observe(e)}return s(!0),a}function sp(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=yo(e),p=n||a?[...u?Lt(u):[],...t?Lt(t):[]]:[];p.forEach(w=>{n&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const c=u&&i?ap(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),r()}),u&&!l&&m.observe(u),t&&m.observe(t));let b,g=l?at(e):null;l&&v();function v(){const w=at(e);g&&!as(g,w)&&r(),g=w,b=requestAnimationFrame(v)}return r(),()=>{var w;p.forEach(x=>{n&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),c==null||c(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const ip=$f,lp=Ff,cp=Lf,dp=Hf,up=zf,ss=Of,fp=Bf,pp=(e,t,r)=>{const o=new Map,n={platform:np,...r},a={...n.platform,_c:o};return Mf(e,t,{...n,platform:a})};var hp=typeof document<"u",gp=function(){},hr=hp?k.useLayoutEffect:gp;function gr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!gr(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){const a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!gr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function is(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ls(e,t){const r=is(e);return Math.round(t*r)/r}function ko(e){const t=f.useRef(e);return hr(()=>{t.current=e}),t}function mp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,c]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(o);gr(h,o)||m(o);const[b,g]=f.useState(null),[v,w]=f.useState(null),x=f.useCallback(L=>{L!==C.current&&(C.current=L,g(L))},[]),y=f.useCallback(L=>{L!==E.current&&(E.current=L,w(L))},[]),S=a||b,T=s||v,C=f.useRef(null),E=f.useRef(null),N=f.useRef(p),_=l!=null,O=ko(l),$=ko(n),W=ko(u),j=f.useCallback(()=>{if(!C.current||!E.current)return;const L={placement:t,strategy:r,middleware:h};$.current&&(L.platform=$.current),pp(C.current,E.current,L).then(Q=>{const A={...Q,isPositioned:W.current!==!1};Y.current&&!gr(N.current,A)&&(N.current=A,Bt.flushSync(()=>{c(A)}))})},[h,t,r,$,W]);hr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,c(L=>({...L,isPositioned:!1})))},[u]);const Y=f.useRef(!1);hr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),hr(()=>{if(S&&(C.current=S),T&&(E.current=T),S&&T){if(O.current)return O.current(S,T,j);j()}},[S,T,j,O,_]);const Z=f.useMemo(()=>({reference:C,floating:E,setReference:x,setFloating:y}),[x,y]),P=f.useMemo(()=>({reference:S,floating:T}),[S,T]),z=f.useMemo(()=>{const L={position:r,left:0,top:0};if(!P.floating)return L;const Q=ls(P.floating,p.x),A=ls(P.floating,p.y);return i?{...L,transform:"translate("+Q+"px, "+A+"px)",...is(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:A}},[r,i,P.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:j,refs:Z,elements:P,floatingStyles:z}),[p,j,Z,P,z])}const vp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?ss({element:o.current,padding:n}).fn(r):{}:o?ss({element:o,padding:n}).fn(r):{}}}},bp=(e,t)=>{const r=ip(e);return{name:r.name,fn:r.fn,options:[e,t]}},wp=(e,t)=>{const r=lp(e);return{name:r.name,fn:r.fn,options:[e,t]}},yp=(e,t)=>({fn:fp(e).fn,options:[e,t]}),xp=(e,t)=>{const r=cp(e);return{name:r.name,fn:r.fn,options:[e,t]}},kp=(e,t)=>{const r=dp(e);return{name:r.name,fn:r.fn,options:[e,t]}},Sp=(e,t)=>{const r=up(e);return{name:r.name,fn:r.fn,options:[e,t]}},Cp=(e,t)=>{const r=vp(e);return{name:r.name,fn:r.fn,options:[e,t]}};var Ep="Arrow",cs=f.forwardRef((e,t)=>{const{children:r,width:o=10,height:n=5,...a}=e;return d.jsx(H.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});cs.displayName=Ep;var Np=cs,So="Popper",[ds,mr]=ge(So),[Tp,us]=ds(So),fs=e=>{const{__scopePopper:t,children:r}=e,[o,n]=f.useState(null);return d.jsx(Tp,{scope:t,anchor:o,onAnchorChange:n,children:r})};fs.displayName=So;var ps="PopperAnchor",hs=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...n}=e,a=us(ps,r),s=f.useRef(null),i=te(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(o==null?void 0:o.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:d.jsx(H.div,{...n,ref:i})});hs.displayName=ps;var Co="PopperContent",[_p,Pp]=ds(Co),gs=f.forwardRef((e,t)=>{var D,F,G,oe,J,X;const{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,v=us(Co,r),[w,x]=f.useState(null),y=te(t,le=>x(le)),[S,T]=f.useState(null),C=nr(S),E=(C==null?void 0:C.width)??0,N=(C==null?void 0:C.height)??0,_=o+(a!=="center"?"-"+a:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(u)?u:[u],W=$.length>0,j={padding:O,boundary:$.filter(Ip),altBoundary:W},{refs:Y,floatingStyles:Z,placement:P,isPositioned:z,middlewareData:L}=mp({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>sp(...le,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[bp({mainAxis:n+N,alignmentAxis:s}),l&&wp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?yp():void 0,...j}),l&&xp({...j}),kp({...j,apply:({elements:le,rects:ce,availableWidth:lt,availableHeight:Je})=>{const{width:Pe,height:Or}=ce.reference,me=le.floating.style;me.setProperty("--radix-popper-available-width",`${lt}px`),me.setProperty("--radix-popper-available-height",`${Je}px`),me.setProperty("--radix-popper-anchor-width",`${Pe}px`),me.setProperty("--radix-popper-anchor-height",`${Or}px`)}}),S&&Cp({element:S,padding:i}),Mp({arrowWidth:E,arrowHeight:N}),h&&Sp({strategy:"referenceHidden",...j})]}),[Q,A]=bs(P),se=fe(b);ae(()=>{z&&(se==null||se())},[z,se]);const ye=(D=L.arrow)==null?void 0:D.x,R=(F=L.arrow)==null?void 0:F.y,re=((G=L.arrow)==null?void 0:G.centerOffset)!==0,[U,ee]=f.useState();return ae(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:z?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(oe=L.transformOrigin)==null?void 0:oe.x,(J=L.transformOrigin)==null?void 0:J.y].join(" "),...((X=L.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(_p,{scope:r,placedSide:Q,onArrowChange:T,arrowX:ye,arrowY:R,shouldHideArrow:re,children:d.jsx(H.div,{"data-side":Q,"data-align":A,...g,ref:y,style:{...g.style,animation:z?void 0:"none"}})})})});gs.displayName=Co;var ms="PopperArrow",Ap={top:"bottom",right:"left",bottom:"top",left:"right"},vs=f.forwardRef(function(t,r){const{__scopePopper:o,...n}=t,a=Pp(ms,o),s=Ap[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(Np,{...n,ref:r,style:{...n.style,display:"block"}})})});vs.displayName=ms;function Ip(e){return e!==null}var Mp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;const{placement:r,rects:o,middlewareData:n}=t,s=((v=n.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=bs(r),c={start:"0%",center:"50%",end:"100%"}[p],h=(((w=n.arrow)==null?void 0:w.x)??0)+i/2,m=(((x=n.arrow)==null?void 0:x.y)??0)+l/2;let b="",g="";return u==="bottom"?(b=s?c:`${h}px`,g=`${-l}px`):u==="top"?(b=s?c:`${h}px`,g=`${o.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=s?c:`${m}px`):u==="left"&&(b=`${o.floating.width+l}px`,g=s?c:`${m}px`),{data:{x:b,y:g}}}});function bs(e){const[t,r="center"]=e.split("-");return[t,r]}var ws=fs,ys=hs,xs=gs,ks=vs,Eo="rovingFocusGroup.onEntryFocus",Op={bubbles:!1,cancelable:!0},zt="RovingFocusGroup",[No,Ss,Lp]=qn(zt),[zp,vr]=ge(zt,[Lp]),[Dp,$p]=zp(zt),Cs=f.forwardRef((e,t)=>d.jsx(No.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(No.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Fp,{...e,ref:t})})}));Cs.displayName=zt;var Fp=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...c}=e,h=f.useRef(null),m=te(t,h),b=Mt(a),[g,v]=Be({prop:s,defaultProp:i??null,onChange:l,caller:zt}),[w,x]=f.useState(!1),y=fe(u),S=Ss(r),T=f.useRef(!1),[C,E]=f.useState(0);return f.useEffect(()=>{const N=h.current;if(N)return N.addEventListener(Eo,y),()=>N.removeEventListener(Eo,y)},[y]),d.jsx(Dp,{scope:r,orientation:o,dir:b,loop:n,currentTabStopId:g,onItemFocus:f.useCallback(N=>v(N),[v]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>E(N=>N+1),[]),onFocusableItemRemove:f.useCallback(()=>E(N=>N-1),[]),children:d.jsx(H.div,{tabIndex:w||C===0?-1:0,"data-orientation":o,...c,ref:m,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{T.current=!0}),onFocus:V(e.onFocus,N=>{const _=!T.current;if(N.target===N.currentTarget&&_&&!w){const O=new CustomEvent(Eo,Op);if(N.currentTarget.dispatchEvent(O),!O.defaultPrevented){const $=S().filter(P=>P.focusable),W=$.find(P=>P.active),j=$.find(P=>P.id===g),Z=[W,j,...$].filter(Boolean).map(P=>P.ref.current);Ts(Z,p)}}T.current=!1}),onBlur:V(e.onBlur,()=>x(!1))})})}),Es="RovingFocusGroupItem",Ns=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:s,...i}=e,l=ot(),u=a||l,p=$p(Es,r),c=p.currentTabStopId===u,h=Ss(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=p;return f.useEffect(()=>{if(o)return m(),()=>b()},[o,m,b]),d.jsx(No.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:d.jsx(H.span,{tabIndex:c?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:V(e.onMouseDown,v=>{o?p.onItemFocus(u):v.preventDefault()}),onFocus:V(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:V(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Vp(v,p.orientation,p.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=h().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")y.reverse();else if(w==="prev"||w==="next"){w==="prev"&&y.reverse();const S=y.indexOf(v.currentTarget);y=p.loop?Wp(y,S+1):y.slice(S+1)}setTimeout(()=>Ts(y))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});Ns.displayName=Es;var Bp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Hp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Vp(e,t,r){const o=Hp(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Bp[o]}function Ts(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function Wp(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var _s=Cs,Ps=Ns,Up="Label",As=f.forwardRef((e,t)=>d.jsx(H.label,{...e,ref:t,onMouseDown:r=>{var n;r.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));As.displayName=Up;var jp=As;function To(e,[t,r]){return Math.min(r,Math.max(t,e))}var _o="Progress",Po=100,[Rp]=ge(_o),[Gp,Yp]=Rp(_o),Is=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:o=null,max:n,getValueLabel:a=qp,...s}=e;(n||n===0)&&!zs(n)&&console.error(Xp(`${n}`,"Progress"));const i=zs(n)?n:Po;o!==null&&!Ds(o,i)&&console.error(Kp(`${o}`,"Progress"));const l=Ds(o,i)?o:null,u=br(l)?a(l,i):void 0;return d.jsx(Gp,{scope:r,value:l,max:i,children:d.jsx(H.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":br(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ls(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Is.displayName=_o;var Ms="ProgressIndicator",Os=f.forwardRef((e,t)=>{const{__scopeProgress:r,...o}=e,n=Yp(Ms,r);return d.jsx(H.div,{"data-state":Ls(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...o,ref:t})});Os.displayName=Ms;function qp(e,t){return`${Math.round(e/t*100)}%`}function Ls(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function br(e){return typeof e=="number"}function zs(e){return br(e)&&!isNaN(e)&&e>0}function Ds(e,t){return br(e)&&!isNaN(e)&&e<=t&&e>=0}function Xp(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Po}\`.`}function Kp(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
261
261
|
- a positive number
|
|
262
|
-
- less than the value passed to \`max\` (or ${
|
|
262
|
+
- less than the value passed to \`max\` (or ${Po} if no \`max\` prop is set)
|
|
263
263
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
264
264
|
|
|
265
|
-
Defaulting to \`null\`.`}var Yp=_s,qp=As,_o="Radio",[Xp,Ls]=ge(_o),[Kp,Zp]=Xp(_o),zs=f.forwardRef((e,t)=>{const{__scopeRadio:r,name:o,checked:n=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...p}=e,[c,h]=f.useState(null),m=te(t,v=>h(v)),b=f.useRef(!1),g=c?u||!!c.closest("form"):!0;return d.jsxs(Kp,{scope:r,checked:n,disabled:s,children:[d.jsx(H.button,{type:"button",role:"radio","aria-checked":n,"data-state":Bs(n),"data-disabled":s?"":void 0,disabled:s,value:i,...p,ref:m,onClick:V(e.onClick,v=>{n||l==null||l(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&d.jsx(Fs,{control:c,bubbles:!b.current,name:o,value:i,checked:n,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});zs.displayName=_o;var Ds="RadioIndicator",$s=f.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:o,...n}=e,a=Zp(Ds,r);return d.jsx(Ee,{present:o||a.checked,children:d.jsx(H.span,{"data-state":Bs(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})})});$s.displayName=Ds;var Jp="RadioBubbleInput",Fs=f.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=tr(r),u=rr(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==r&&m){const b=new Event("click",{bubbles:o});m.call(p,r),p.dispatchEvent(b)}},[l,r,o]),d.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Fs.displayName=Jp;function Bs(e){return e?"checked":"unchecked"}var Qp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vr="RadioGroup",[eh]=ge(vr,[gr,Ls]),Hs=gr(),Ws=Ls(),[th,rh]=eh(vr),Vs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:o,defaultValue:n,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:p=!0,onValueChange:c,...h}=e,m=Hs(r),b=At(u),[g,v]=Be({prop:a,defaultProp:n??null,onChange:c,caller:vr});return d.jsx(th,{scope:r,name:o,required:s,disabled:i,value:g,onValueChange:v,children:d.jsx(Es,{asChild:!0,...m,orientation:l,dir:b,loop:p,children:d.jsx(H.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Vs.displayName=vr;var Us="RadioGroupItem",js=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:o,...n}=e,a=rh(Us,r),s=a.disabled||o,i=Hs(r),l=Ws(r),u=f.useRef(null),p=te(t,u),c=a.value===n.value,h=f.useRef(!1);return f.useEffect(()=>{const m=g=>{Qp.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),d.jsx(Ns,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(zs,{disabled:s,required:a.required,checked:c,...l,...n,name:a.name,ref:p,onCheck:()=>a.onValueChange(n.value),onKeyDown:V(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:V(n.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});js.displayName=Us;var oh="RadioGroupIndicator",Rs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...o}=e,n=Ws(r);return d.jsx($s,{...n,...o,ref:t})});Rs.displayName=oh;var nh=Vs,ah=js,sh=Rs;function ih(e,t){return f.useReducer((r,o)=>t[r][o]??r,e)}var Po="ScrollArea",[Gs]=ge(Po),[lh,Se]=Gs(Po),Ys=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,l]=f.useState(null),[u,p]=f.useState(null),[c,h]=f.useState(null),[m,b]=f.useState(null),[g,v]=f.useState(null),[w,x]=f.useState(0),[y,k]=f.useState(0),[T,C]=f.useState(!1),[E,N]=f.useState(!1),_=te(t,M=>l(M)),L=At(n);return d.jsx(lh,{scope:r,type:o,dir:L,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:p,content:c,onContentChange:h,scrollbarX:m,onScrollbarXChange:b,scrollbarXEnabled:T,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:E,onScrollbarYEnabledChange:N,onCornerWidthChange:x,onCornerHeightChange:k,children:d.jsx(H.div,{dir:L,...s,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});Ys.displayName=Po;var qs="ScrollAreaViewport",Xs=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:o,nonce:n,...a}=e,s=Se(qs,r),i=f.useRef(null),l=te(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:n}),d.jsx(H.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:o})})]})});Xs.displayName=qs;var $e="ScrollAreaScrollbar",Ks=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return f.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?d.jsx(ch,{...o,ref:t,forceMount:r}):n.type==="scroll"?d.jsx(dh,{...o,ref:t,forceMount:r}):n.type==="auto"?d.jsx(Zs,{...o,ref:t,forceMount:r}):n.type==="always"?d.jsx(Ao,{...o,ref:t}):null});Ks.displayName=$e;var ch=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),[a,s]=f.useState(!1);return f.useEffect(()=>{const i=n.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},p=()=>{l=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",p),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",p)}}},[n.scrollArea,n.scrollHideDelay]),d.jsx(Ee,{present:r||a,children:d.jsx(Zs,{"data-state":a?"visible":"hidden",...o,ref:t})})}),dh=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),a=e.orientation==="horizontal",s=xr(()=>l("SCROLL_END"),100),[i,l]=ih("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 f.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,l]),f.useEffect(()=>{const u=n.viewport,p=a?"scrollLeft":"scrollTop";if(u){let c=u[p];const h=()=>{const m=u[p];c!==m&&(l("SCROLL"),s()),c=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[n.viewport,a,l,s]),d.jsx(Ee,{present:r||i!=="hidden",children:d.jsx(Ao,{"data-state":i==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:V(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:V(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Zs=f.forwardRef((e,t)=>{const r=Se($e,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,s]=f.useState(!1),i=e.orientation==="horizontal",l=xr(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;s(i?u:p)}},10);return yt(r.viewport,l),yt(r.content,l),d.jsx(Ee,{present:o||a,children:d.jsx(Ao,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Ao=f.forwardRef((e,t)=>{const{orientation:r="vertical",...o}=e,n=Se($e,e.__scopeScrollArea),a=f.useRef(null),s=f.useRef(0),[i,l]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ri(i.viewport,i.content),p={...o,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,m){return mh(h,s.current,i,m)}return r==="horizontal"?d.jsx(uh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollLeft,m=oi(h,i,n.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollLeft=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollLeft=c(h,n.dir))}}):r==="vertical"?d.jsx(fh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollTop,m=oi(h,i);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollTop=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollTop=c(h))}}):null}),uh=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarXChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(Qs,{"data-orientation":"horizontal",...n,ref:u,sizes:r,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":yr(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+p.deltaX;e.onWheelScroll(h),ai(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:wr(s.paddingLeft),paddingEnd:wr(s.paddingRight)}})}})}),fh=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarYChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(Qs,{"data-orientation":"vertical",...n,ref:u,sizes:r,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":yr(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollTop+p.deltaY;e.onWheelScroll(h),ai(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:wr(s.paddingTop),paddingEnd:wr(s.paddingBottom)}})}})}),[ph,Js]=Gs($e),Qs=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:p,onResize:c,...h}=e,m=Se($e,r),[b,g]=f.useState(null),v=te(t,_=>g(_)),w=f.useRef(null),x=f.useRef(""),y=m.viewport,k=o.content-o.viewport,T=fe(p),C=fe(l),E=xr(c,10);function N(_){if(w.current){const L=_.clientX-w.current.left,M=_.clientY-w.current.top;u({x:L,y:M})}}return f.useEffect(()=>{const _=L=>{const M=L.target;(b==null?void 0:b.contains(M))&&T(L,k)};return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[y,b,k,T]),f.useEffect(C,[o,C]),yt(b,E),yt(m.content,E),d.jsx(ph,{scope:r,scrollbar:b,hasThumb:n,onThumbChange:fe(a),onThumbPointerUp:fe(s),onThumbPositionChange:C,onThumbPointerDown:fe(i),children:d.jsx(H.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:V(e.onPointerDown,_=>{_.button===0&&(_.target.setPointerCapture(_.pointerId),w.current=b.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),N(_))}),onPointerMove:V(e.onPointerMove,N),onPointerUp:V(e.onPointerUp,_=>{const L=_.target;L.hasPointerCapture(_.pointerId)&&L.releasePointerCapture(_.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),br="ScrollAreaThumb",ei=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Js(br,e.__scopeScrollArea);return d.jsx(Ee,{present:r||n.hasThumb,children:d.jsx(hh,{ref:t,...o})})}),hh=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:o,...n}=e,a=Se(br,r),s=Js(br,r),{onThumbPositionChange:i}=s,l=te(t,c=>s.onThumbChange(c)),u=f.useRef(void 0),p=xr(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(p(),!u.current){const m=vh(c,i);u.current=m,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,p,i]),d.jsx(H.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:V(e.onPointerDownCapture,c=>{const m=c.target.getBoundingClientRect(),b=c.clientX-m.left,g=c.clientY-m.top;s.onThumbPointerDown({x:b,y:g})}),onPointerUp:V(e.onPointerUp,s.onThumbPointerUp)})});ei.displayName=br;var Io="ScrollAreaCorner",ti=f.forwardRef((e,t)=>{const r=Se(Io,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?d.jsx(gh,{...e,ref:t}):null});ti.displayName=Io;var gh=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...o}=e,n=Se(Io,r),[a,s]=f.useState(0),[i,l]=f.useState(0),u=!!(a&&i);return yt(n.scrollbarX,()=>{var c;const p=((c=n.scrollbarX)==null?void 0:c.offsetHeight)||0;n.onCornerHeightChange(p),l(p)}),yt(n.scrollbarY,()=>{var c;const p=((c=n.scrollbarY)==null?void 0:c.offsetWidth)||0;n.onCornerWidthChange(p),s(p)}),u?d.jsx(H.div,{...o,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function wr(e){return e?parseInt(e,10):0}function ri(e,t){const r=e/t;return isNaN(r)?0:r}function yr(e){const t=ri(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function mh(e,t,r,o="ltr"){const n=yr(r),a=n/2,s=t||a,i=n-s,l=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-i,p=r.content-r.viewport,c=o==="ltr"?[0,p]:[p*-1,0];return ni([l,u],c)(e)}function oi(e,t,r="ltr"){const o=yr(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-o,l=r==="ltr"?[0,s]:[s*-1,0],u=Eo(e,l);return ni([0,s],[0,i])(u)}function ni(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function ai(e,t){return e>0&&e<t}var vh=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,i=r.top!==a.top;(s||i)&&t(),r=a,o=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(o)};function xr(e,t){const r=fe(e),o=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),f.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function yt(e,t){const r=fe(t);ae(()=>{let o=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var bh=Ys,wh=Xs,yh=ti,xh=[" ","Enter","ArrowUp","ArrowDown"],kh=[" ","Enter"],st="Select",[kr,Sr,Sh]=Rn(st),[xt]=ge(st,[Sh,hr]),Cr=hr(),[Ch,Ke]=xt(st),[Eh,Nh]=xt(st),si=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:c,disabled:h,required:m,form:b}=e,g=Cr(t),[v,w]=f.useState(null),[x,y]=f.useState(null),[k,T]=f.useState(!1),C=At(u),[E,N]=Be({prop:o,defaultProp:n??!1,onChange:a,caller:st}),[_,L]=Be({prop:s,defaultProp:i,onChange:l,caller:st}),M=f.useRef(null),z=v?b||!!v.closest("form"):!0,[U,Y]=f.useState(new Set),Z=Array.from(U).map(P=>P.props.value).join(";");return d.jsx(ms,{...g,children:d.jsxs(Ch,{required:m,scope:t,trigger:v,onTriggerChange:w,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:k,onValueNodeHasChildrenChange:T,contentId:ot(),value:_,onValueChange:L,open:E,onOpenChange:N,dir:C,triggerPointerDownPosRef:M,disabled:h,children:[d.jsx(kr.Provider,{scope:t,children:d.jsx(Eh,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(P=>{Y($=>new Set($).add(P))},[]),onNativeOptionRemove:f.useCallback(P=>{Y($=>{const D=new Set($);return D.delete(P),D})},[]),children:r})}),z?d.jsxs(_i,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:c,value:_,onChange:P=>L(P.target.value),disabled:h,form:b,children:[_===void 0?d.jsx("option",{value:""}):null,Array.from(U)]},Z):null]})})};si.displayName=st;var ii="SelectTrigger",li=f.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...n}=e,a=Cr(r),s=Ke(ii,r),i=s.disabled||o,l=te(t,s.onTriggerChange),u=Sr(r),p=f.useRef("touch"),[c,h,m]=Ai(g=>{const v=u().filter(y=>!y.disabled),w=v.find(y=>y.value===s.value),x=Ii(v,g,w);x!==void 0&&s.onValueChange(x.value)}),b=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(vs,{asChild:!0,...a,children:d.jsx(H.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":Pi(s.value)?"":void 0,...n,ref:l,onClick:V(n.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&b(g)}),onPointerDown:V(n.onPointerDown,g=>{p.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:V(n.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&xh.includes(g.key)&&(b(),g.preventDefault())})})})});li.displayName=ii;var ci="SelectValue",di=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,children:a,placeholder:s="",...i}=e,l=Ke(ci,r),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,c=te(t,l.onValueNodeChange);return ae(()=>{u(p)},[u,p]),d.jsx(H.span,{...i,ref:c,style:{pointerEvents:"none"},children:Pi(l.value)?d.jsx(d.Fragment,{children:s}):a})});di.displayName=ci;var Th="SelectIcon",ui=f.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...n}=e;return d.jsx(H.span,{"aria-hidden":!0,...n,ref:t,children:o||"▼"})});ui.displayName=Th;var _h="SelectPortal",fi=e=>d.jsx(Zr,{asChild:!0,...e});fi.displayName=_h;var it="SelectContent",pi=f.forwardRef((e,t)=>{const r=Ke(it,e.__scopeSelect),[o,n]=f.useState();if(ae(()=>{n(new DocumentFragment)},[]),!r.open){const a=o;return a?$t.createPortal(d.jsx(hi,{scope:e.__scopeSelect,children:d.jsx(kr.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(gi,{...e,ref:t})});pi.displayName=it;var _e=10,[hi,Ze]=xt(it),Ph="SelectContentImpl",Ah=Pt("SelectContent.RemoveScroll"),gi=f.forwardRef((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v,...w}=e,x=Ke(it,r),[y,k]=f.useState(null),[T,C]=f.useState(null),E=te(t,F=>k(F)),[N,_]=f.useState(null),[L,M]=f.useState(null),z=Sr(r),[U,Y]=f.useState(!1),Z=f.useRef(!1);f.useEffect(()=>{if(y)return ef(y)},[y]),hu();const P=f.useCallback(F=>{const[B,...G]=z().map(X=>X.ref.current),[oe]=G.slice(-1),J=document.activeElement;for(const X of F)if(X===J||(X==null||X.scrollIntoView({block:"nearest"}),X===B&&T&&(T.scrollTop=0),X===oe&&T&&(T.scrollTop=T.scrollHeight),X==null||X.focus(),document.activeElement!==J))return},[z,T]),$=f.useCallback(()=>P([N,y]),[P,N,y]);f.useEffect(()=>{U&&$()},[U,$]);const{onOpenChange:D,triggerPointerDownPosRef:Q}=x;f.useEffect(()=>{if(y){let F={x:0,y:0};const B=oe=>{var J,X;F={x:Math.abs(Math.round(oe.pageX)-(((J=Q.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((X=Q.current)==null?void 0:X.y)??0))}},G=oe=>{F.x<=10&&F.y<=10?oe.preventDefault():y.contains(oe.target)||D(!1),document.removeEventListener("pointermove",B),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",G,{capture:!0})}}},[y,D,Q]),f.useEffect(()=>{const F=()=>D(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[D]);const[A,se]=Ai(F=>{const B=z().filter(J=>!J.disabled),G=B.find(J=>J.ref.current===document.activeElement),oe=Ii(B,F,G);oe&&setTimeout(()=>oe.ref.current.focus())}),ye=f.useCallback((F,B,G)=>{const oe=!Z.current&&!G;(x.value!==void 0&&x.value===B||oe)&&(_(F),oe&&(Z.current=!0))},[x.value]),R=f.useCallback(()=>y==null?void 0:y.focus(),[y]),re=f.useCallback((F,B,G)=>{const oe=!Z.current&&!G;(x.value!==void 0&&x.value===B||oe)&&M(F)},[x.value]),j=o==="popper"?Mo:mi,ee=j===Mo?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(hi,{scope:r,content:y,viewport:T,onViewportChange:C,itemRefCallback:ye,selectedItem:N,onItemLeave:R,itemTextRefCallback:re,focusSelectedItem:$,selectedItemText:L,position:o,isPositioned:U,searchRef:A,children:d.jsx(wa,{as:Ah,allowPinchZoom:!0,children:d.jsx(ta,{asChild:!0,trapped:x.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:V(n,F=>{var B;(B=x.trigger)==null||B.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(qr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(j,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:F=>F.preventDefault(),...w,...ee,onPlaced:()=>Y(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:V(w.onKeyDown,F=>{const B=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!B&&F.key.length===1&&se(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let oe=z().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(F.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const J=F.target,X=oe.indexOf(J);oe=oe.slice(X+1)}setTimeout(()=>P(oe)),F.preventDefault()}})})})})})})});gi.displayName=Ph;var Ih="SelectItemAlignedPosition",mi=f.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...n}=e,a=Ke(it,r),s=Ze(it,r),[i,l]=f.useState(null),[u,p]=f.useState(null),c=te(t,E=>p(E)),h=Sr(r),m=f.useRef(!1),b=f.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=s,y=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&w){const E=a.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),L=w.getBoundingClientRect();if(a.dir!=="rtl"){const J=L.left-N.left,X=_.left-J,le=E.left-X,ce=E.width+le,lt=Math.max(ce,N.width),Je=window.innerWidth-_e,Pe=Eo(X,[_e,Math.max(_e,Je-lt)]);i.style.minWidth=ce+"px",i.style.left=Pe+"px"}else{const J=N.right-L.right,X=window.innerWidth-_.right-J,le=window.innerWidth-E.right-X,ce=E.width+le,lt=Math.max(ce,N.width),Je=window.innerWidth-_e,Pe=Eo(X,[_e,Math.max(_e,Je-lt)]);i.style.minWidth=ce+"px",i.style.right=Pe+"px"}const M=h(),z=window.innerHeight-_e*2,U=g.scrollHeight,Y=window.getComputedStyle(u),Z=parseInt(Y.borderTopWidth,10),P=parseInt(Y.paddingTop,10),$=parseInt(Y.borderBottomWidth,10),D=parseInt(Y.paddingBottom,10),Q=Z+P+U+D+$,A=Math.min(v.offsetHeight*5,Q),se=window.getComputedStyle(g),ye=parseInt(se.paddingTop,10),R=parseInt(se.paddingBottom,10),re=E.top+E.height/2-_e,j=z-re,ee=v.offsetHeight/2,F=v.offsetTop+ee,B=Z+P+F,G=Q-B;if(B<=re){const J=M.length>0&&v===M[M.length-1].ref.current;i.style.bottom="0px";const X=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(j,ee+(J?R:0)+X+$),ce=B+le;i.style.height=ce+"px"}else{const J=M.length>0&&v===M[0].ref.current;i.style.top="0px";const le=Math.max(re,Z+g.offsetTop+(J?ye:0)+ee)+G;i.style.height=le+"px",g.scrollTop=B-re+g.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=A+"px",i.style.maxHeight=z+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,i,u,g,v,w,a.dir,o]);ae(()=>y(),[y]);const[k,T]=f.useState();ae(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(E=>{E&&b.current===!0&&(y(),x==null||x(),b.current=!1)},[y,x]);return d.jsx(Oh,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:d.jsx(H.div,{...n,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});mi.displayName=Ih;var Mh="SelectPopperPosition",Mo=f.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:n=_e,...a}=e,s=Cr(r);return d.jsx(bs,{...s,...a,ref:t,align:o,collisionPadding:n,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)"}})});Mo.displayName=Mh;var[Oh,Oo]=xt(it,{}),Lo="SelectViewport",vi=f.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...n}=e,a=Ze(Lo,r),s=Oo(Lo,r),i=te(t,a.onViewportChange),l=f.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:o}),d.jsx(kr.Slot,{scope:r,children:d.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:V(n.onScroll,u=>{const p=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const m=Math.abs(l.current-p.scrollTop);if(m>0){const b=window.innerHeight-_e*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(g,v);if(w<b){const x=w+m,y=Math.min(b,x),k=x-y;c.style.height=y+"px",c.style.bottom==="0px"&&(p.scrollTop=k>0?k:0,c.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});vi.displayName=Lo;var bi="SelectGroup",[Lh,zh]=xt(bi),Dh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=ot();return d.jsx(Lh,{scope:r,id:n,children:d.jsx(H.div,{role:"group","aria-labelledby":n,...o,ref:t})})});Dh.displayName=bi;var wi="SelectLabel",$h=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=zh(wi,r);return d.jsx(H.div,{id:n.id,...o,ref:t})});$h.displayName=wi;var Er="SelectItem",[Fh,yi]=xt(Er),xi=f.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...s}=e,i=Ke(Er,r),l=Ze(Er,r),u=i.value===o,[p,c]=f.useState(a??""),[h,m]=f.useState(!1),b=te(t,x=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,x,o,n)}),g=ot(),v=f.useRef("touch"),w=()=>{n||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")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(Fh,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:f.useCallback(x=>{c(y=>y||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(kr.ItemSlot,{scope:r,value:o,disabled:n,textValue:p,children:d.jsx(H.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:b,onFocus:V(s.onFocus,()=>m(!0)),onBlur:V(s.onBlur,()=>m(!1)),onClick:V(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:V(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:V(s.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:V(s.onPointerMove,x=>{var y;v.current=x.pointerType,n?(y=l.onItemLeave)==null||y.call(l):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(s.onPointerLeave,x=>{var y;x.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:V(s.onKeyDown,x=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&x.key===" "||(kh.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});xi.displayName=Er;var Lt="SelectItemText",ki=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,...a}=e,s=Ke(Lt,r),i=Ze(Lt,r),l=yi(Lt,r),u=Nh(Lt,r),[p,c]=f.useState(null),h=te(t,w=>c(w),l.onItemTextChange,w=>{var x;return(x=i.itemTextRefCallback)==null?void 0:x.call(i,w,l.value,l.disabled)}),m=p==null?void 0:p.textContent,b=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return ae(()=>(g(b),()=>v(b)),[g,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(H.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?$t.createPortal(a.children,s.valueNode):null]})});ki.displayName=Lt;var Si="SelectItemIndicator",Ci=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return yi(Si,r).isSelected?d.jsx(H.span,{"aria-hidden":!0,...o,ref:t}):null});Ci.displayName=Si;var zo="SelectScrollUpButton",Ei=f.forwardRef((e,t)=>{const r=Ze(zo,e.__scopeSelect),o=Oo(zo,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,o.onScrollButtonChange);return ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?d.jsx(Ti,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Ei.displayName=zo;var Do="SelectScrollDownButton",Ni=f.forwardRef((e,t)=>{const r=Ze(Do,e.__scopeSelect),o=Oo(Do,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,o.onScrollButtonChange);return ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?d.jsx(Ti,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Ni.displayName=Do;var Ti=f.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Ze("SelectScrollButton",r),s=f.useRef(null),i=Sr(r),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),ae(()=>{var p;const u=i().find(c=>c.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),d.jsx(H.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:V(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:V(n.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:V(n.onPointerLeave,()=>{l()})})}),Bh="SelectSeparator",Hh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return d.jsx(H.div,{"aria-hidden":!0,...o,ref:t})});Hh.displayName=Bh;var $o="SelectArrow",Wh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Cr(r),a=Ke($o,r),s=Ze($o,r);return a.open&&s.position==="popper"?d.jsx(ws,{...n,...o,ref:t}):null});Wh.displayName=$o;var Vh="SelectBubbleInput",_i=f.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{const n=f.useRef(null),a=te(o,n),s=tr(t);return f.useEffect(()=>{const i=n.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const c=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(H.select,{...r,style:{...Un,...r.style},ref:a,defaultValue:t})});_i.displayName=Vh;function Pi(e){return e===""||e===void 0}function Ai(e){const t=fe(e),r=f.useRef(""),o=f.useRef(0),n=f.useCallback(s=>{const i=r.current+s;t(i),(function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function Ii(e,t,r){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Uh(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==r));const l=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function Uh(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var jh=si,Rh=li,Gh=di,Yh=ui,qh=fi,Xh=pi,Kh=vi,Zh=xi,Jh=ki,Qh=Ci,eg=Ei,tg=Ni,rg="Separator",Mi="horizontal",og=["horizontal","vertical"],Oi=f.forwardRef((e,t)=>{const{decorative:r,orientation:o=Mi,...n}=e,a=ng(o)?o:Mi,i=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(H.div,{"data-orientation":a,...i,...n,ref:t})});Oi.displayName=rg;function ng(e){return og.includes(e)}var ag=Oi,Nr="Switch",[sg]=ge(Nr),[ig,lg]=sg(Nr),Li=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:p,...c}=e,[h,m]=f.useState(null),b=te(t,y=>m(y)),g=f.useRef(!1),v=h?p||!!h.closest("form"):!0,[w,x]=Be({prop:n,defaultProp:a??!1,onChange:u,caller:Nr});return d.jsxs(ig,{scope:r,checked:w,disabled:i,children:[d.jsx(H.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Fi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:V(e.onClick,y=>{x(k=>!k),v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),v&&d.jsx($i,{control:h,bubbles:!g.current,name:o,value:l,checked:w,required:s,disabled:i,form:p,style:{transform:"translateX(-100%)"}})]})});Li.displayName=Nr;var zi="SwitchThumb",Di=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,n=lg(zi,r);return d.jsx(H.span,{"data-state":Fi(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});Di.displayName=zi;var cg="SwitchBubbleInput",$i=f.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=tr(r),u=rr(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==r&&m){const b=new Event("click",{bubbles:o});m.call(p,r),p.dispatchEvent(b)}},[l,r,o]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$i.displayName=cg;function Fi(e){return e?"checked":"unchecked"}var dg=Li,ug=Di,Tr="Tabs",[fg]=ge(Tr,[gr]),Bi=gr(),[pg,Fo]=fg(Tr),Hi=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=At(i),[c,h]=Be({prop:o,onChange:n,defaultProp:a??"",caller:Tr});return d.jsx(pg,{scope:r,baseId:ot(),value:c,onValueChange:h,orientation:s,dir:p,activationMode:l,children:d.jsx(H.div,{dir:p,"data-orientation":s,...u,ref:t})})});Hi.displayName=Tr;var Wi="TabsList",Vi=f.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...n}=e,a=Fo(Wi,r),s=Bi(r);return d.jsx(Es,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:d.jsx(H.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Vi.displayName=Wi;var Ui="TabsTrigger",ji=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,s=Fo(Ui,r),i=Bi(r),l=Yi(s.baseId,o),u=qi(s.baseId,o),p=o===s.value;return d.jsx(Ns,{asChild:!0,...i,focusable:!n,active:p,children:d.jsx(H.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:V(e.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(o):c.preventDefault()}),onKeyDown:V(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(o)}),onFocus:V(e.onFocus,()=>{const c=s.activationMode!=="manual";!p&&!n&&c&&s.onValueChange(o)})})})});ji.displayName=Ui;var Ri="TabsContent",Gi=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,forceMount:n,children:a,...s}=e,i=Fo(Ri,r),l=Yi(i.baseId,o),u=qi(i.baseId,o),p=o===i.value,c=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:n||p,children:({present:h})=>d.jsx(H.div,{"data-state":p?"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})})});Gi.displayName=Ri;function Yi(e,t){return`${e}-trigger-${t}`}function qi(e,t){return`${e}-content-${t}`}var hg=Hi,gg=Vi,mg=ji,vg=Gi,[_r]=ge("Tooltip",[hr]),Pr=hr(),Xi="TooltipProvider",bg=700,Bo="tooltip.open",[wg,Ho]=_r(Xi),Ki=e=>{const{__scopeTooltip:t,delayDuration:r=bg,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(wg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};Ki.displayName=Xi;var zt="Tooltip",[yg,Dt]=_r(zt),Zi=e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Ho(zt,e.__scopeTooltip),u=Pr(t),[p,c]=f.useState(null),h=ot(),m=f.useRef(0),b=s??l.disableHoverableContent,g=i??l.delayDuration,v=f.useRef(!1),[w,x]=Be({prop:o,defaultProp:n??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Bo))):l.onClose(),a==null||a(E)},caller:zt}),y=f.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),k=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,x(!0)},[x]),T=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),C=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,x(!0),m.current=0},g)},[g,x]);return f.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(ms,{...u,children:d.jsx(yg,{scope:t,contentId:h,open:w,stateAttribute:y,trigger:p,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?C():k()},[l.isOpenDelayedRef,C,k]),onTriggerLeave:f.useCallback(()=>{b?T():(window.clearTimeout(m.current),m.current=0)},[T,b]),onOpen:k,onClose:T,disableHoverableContent:b,children:r})})};Zi.displayName=zt;var Wo="TooltipTrigger",Ji=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Dt(Wo,r),a=Ho(Wo,r),s=Pr(r),i=f.useRef(null),l=te(t,i,n.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(vs,{asChild:!0,...s,children:d.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:V(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:V(e.onBlur,n.onClose),onClick:V(e.onClick,n.onClose)})})});Ji.displayName=Wo;var Vo="TooltipPortal",[xg,kg]=_r(Vo,{forceMount:void 0}),Qi=e=>{const{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Dt(Vo,t);return d.jsx(xg,{scope:t,forceMount:r,children:d.jsx(Ee,{present:r||a.open,children:d.jsx(Zr,{asChild:!0,container:n,children:o})})})};Qi.displayName=Vo;var kt="TooltipContent",el=f.forwardRef((e,t)=>{const r=kg(kt,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,s=Dt(kt,e.__scopeTooltip);return d.jsx(Ee,{present:o||s.open,children:s.disableHoverableContent?d.jsx(tl,{side:n,...a,ref:t}):d.jsx(Sg,{side:n,...a,ref:t})})}),Sg=f.forwardRef((e,t)=>{const r=Dt(kt,e.__scopeTooltip),o=Ho(kt,e.__scopeTooltip),n=f.useRef(null),a=te(t,n),[s,i]=f.useState(null),{trigger:l,onClose:u}=r,p=n.current,{onPointerInTransitChange:c}=o,h=f.useCallback(()=>{i(null),c(!1)},[c]),m=f.useCallback((b,g)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},x=Tg(w,v.getBoundingClientRect()),y=_g(w,x),k=Pg(g.getBoundingClientRect()),T=Ig([...y,...k]);i(T),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const b=v=>m(v,p),g=v=>m(v,l);return l.addEventListener("pointerleave",b),p.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",g)}}},[l,p,m,h]),f.useEffect(()=>{if(s){const b=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},x=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),y=!Ag(w,s);x?h():y&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,p,s,u,h]),d.jsx(tl,{...e,ref:a})}),[Cg,Eg]=_r(zt,{isInside:!1}),Ng=Ad("TooltipContent"),tl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Dt(kt,r),u=Pr(r),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(Bo,p),()=>document.removeEventListener(Bo,p)),[p]),f.useEffect(()=>{if(l.trigger){const c=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&p()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,p]),d.jsx(qr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:p,children:d.jsxs(bs,{"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(Ng,{children:o}),d.jsx(Cg,{scope:r,isInside:!0,children:d.jsx($d,{id:l.contentId,role:"tooltip",children:n||o})})]})})});el.displayName=kt;var rl="TooltipArrow",ol=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Pr(r);return Eg(rl,r).isInside?null:d.jsx(ws,{...n,...o,ref:t})});ol.displayName=rl;function Tg(e,t){const r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function _g(e,t,r=5){const o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function Pg(e){const{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function Ag(e,t){const{x:r,y:o}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>o!=h>o&&r<(c-u)*(o-p)/(h-p)+u&&(n=!n)}return n}function Ig(e){const t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),Mg(t)}function Mg(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let o=e.length-1;o>=0;o--){const n=e[o];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Og=Ki,Lg=Zi,zg=Ji,Dg=Qi,$g=el,Fg=ol;const Bg=Rt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all cursor-pointer 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 nl({className:e,variant:t="default",size:r="default",asChild:o=!1,...n}){const a=o?Wn:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":r,className:W(Bg({variant:t,size:r,className:e})),...n})}const Hg={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"},Wg=Rt("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 Vg({className:e,variant:t="default",hue:r,asChild:o=!1,...n}){const a=o?Wn:"span",s=r?Hg[r]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:W(Wg({variant:t}),s,e),...n})}function Ug({className:e,type:t,...r}){return d.jsx("input",{type:t,"data-slot":"input",className:W("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),...r})}function jg({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:W("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 Rg({...e}){return d.jsx(jh,{"data-slot":"select",...e})}function Gg({...e}){return d.jsx(Gh,{"data-slot":"select-value",...e})}function Yg({className:e,size:t="default",children:r,...o}){return d.jsxs(Rh,{"data-slot":"select-trigger","data-size":t,className:W("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),...o,children:[r,d.jsx(Yh,{asChild:!0,children:d.jsx(dn,{className:"size-4 opacity-50"})})]})}function qg({className:e,children:t,position:r="item-aligned",align:o="center",...n}){return d.jsx(qh,{children:d.jsxs(Xh,{"data-slot":"select-content",className:W("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",r==="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:r,align:o,...n,children:[d.jsx(Kg,{}),d.jsx(Kh,{className:W("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(Zg,{})]})})}function Xg({className:e,children:t,...r}){return d.jsxs(Zh,{"data-slot":"select-item",className:W("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),...r,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(Qh,{children:d.jsx(cn,{className:"size-4"})})}),d.jsx(Jh,{children:t})]})}function Kg({className:e,...t}){return d.jsx(eg,{"data-slot":"select-scroll-up-button",className:W("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Sc,{className:"size-4"})})}function Zg({className:e,...t}){return d.jsx(tg,{"data-slot":"select-scroll-down-button",className:W("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(dn,{className:"size-4"})})}function Jg({className:e,...t}){return d.jsx(Ma,{"data-slot":"checkbox",className:W("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(La,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(cn,{className:"size-3.5"})})})}function Qg({className:e,size:t="default",...r}){return d.jsx(dg,{"data-slot":"switch","data-size":t,className:W("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),...r,children:d.jsx(ug,{"data-slot":"switch-thumb",className:W("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 em({className:e,...t}){return d.jsx(Hp,{"data-slot":"label",className:W("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 tm({className:e,...t}){return d.jsx(nh,{"data-slot":"radio-group",className:W("grid gap-3",e),...t})}function rm({className:e,...t}){return d.jsx(ah,{"data-slot":"radio-group-item",className:W("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(Nc,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function om({className:e,orientation:t="horizontal",decorative:r=!0,...o}){return d.jsx(ag,{"data-slot":"separator",decorative:r,orientation:t,className:W("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),...o})}function nm({className:e,orientation:t="horizontal",...r}){return d.jsx(hg,{"data-slot":"tabs","data-orientation":t,orientation:t,className:W("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...r})}const am=Rt("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",...r}){return d.jsx(gg,{"data-slot":"tabs-list","data-variant":t,className:W(am({variant:t}),e),...r})}function im({className:e,...t}){return d.jsx(mg,{"data-slot":"tabs-trigger",className:W("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 lm({className:e,...t}){return d.jsx(vg,{"data-slot":"tabs-content",className:W("flex-1 outline-none",e),...t})}function cm({className:e,children:t,...r}){return d.jsxs(bh,{"data-slot":"scroll-area",className:W("relative",e),...r,children:[d.jsx(wh,{"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(dm,{}),d.jsx(yh,{})]})}function dm({className:e,orientation:t="vertical",...r}){return d.jsx(Ks,{"data-slot":"scroll-area-scrollbar",orientation:t,className:W("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),...r,children:d.jsx(ei,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Uo({className:e,size:t="default",...r}){return d.jsx(df,{"data-slot":"avatar","data-size":t,className:W("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),...r})}function jo({className:e,...t}){return d.jsx(uf,{"data-slot":"avatar-image",className:W("aspect-square size-full",e),...t})}function Ro({className:e,...t}){return d.jsx(ff,{"data-slot":"avatar-fallback",className:W("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 um({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:W("animate-pulse rounded-md bg-accent",e),...t})}function fm({delayDuration:e=0,...t}){return d.jsx(Og,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function pm({...e}){return d.jsx(Lg,{"data-slot":"tooltip",...e})}function hm({...e}){return d.jsx(zg,{"data-slot":"tooltip-trigger",...e})}function gm({className:e,sideOffset:t=0,children:r,...o}){return d.jsx(Dg,{children:d.jsxs($g,{"data-slot":"tooltip-content",sideOffset:t,className:W("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),...o,children:[r,d.jsx(Fg,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function mm({className:e,value:t,...r}){return d.jsx(Yp,{"data-slot":"progress",className:W("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:d.jsx(qp,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const vm=Rt("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 bm({className:e,variant:t,...r}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:W(vm({variant:t}),e),...r})}function wm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:W("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function ym({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:W("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function xm({...e}){return d.jsx(Kd,{"data-slot":"collapsible",...e})}function km({...e}){return d.jsx(qn,{"data-slot":"collapsible-trigger",...e})}function Sm({...e}){return d.jsx(Xn,{"data-slot":"collapsible-content",...e})}const al={"arrow-left":wc,calendar:xc,"check-circle-2":fn,"chevron-left":kc,"chevron-right":$r,clock:Tc,"credit-card":_c,"external-link":Pc,"help-circle":Cc,info:Wt,"loader-2":Fr,mail:Br,"map-pin":Ac,"message-circle":Ic,"message-square":pn,package:Oc,phone:Lc,search:zc,"shopping-bag":Dc,sparkles:$c,truck:Bc,user:hn,"x-circle":Ec,"alert-circle":un,"book-open":yc},sl={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"},il=e=>typeof e=="number"?sl[String(e)]??"gap-2":typeof e=="string"?sl[e.trim()]??"gap-2":"gap-2",Cm=({children:e,className:t,onClick:r})=>d.jsx(Tt,{className:t,onClick:r,children:e}),Em=({children:e,className:t})=>d.jsx(_t,{className:t,children:e}),Nm=({children:e,className:t})=>d.jsx(_d,{className:t,children:e}),Tm=({children:e,className:t,onClick:r,variant:o,size:n,disabled:a,title:s})=>d.jsx(nl,{className:t,variant:o,size:n,onClick:r,disabled:a,title:s,children:e}),_m=({children:e,className:t,variant:r,hue:o})=>d.jsx(Vg,{className:t,variant:r,hue:o,children:e}),Pm=({className:e,onChange:t,...r})=>d.jsx(Ug,{className:e,onChange:t,...r}),Am=({className:e,onChange:t,...r})=>d.jsx(jg,{className:e,onChange:t,...r}),Im=({children:e,className:t,value:r,defaultValue:o,onChange:n,placeholder:a,disabled:s})=>d.jsxs(Rg,{value:r,defaultValue:o,onValueChange:i=>{const l=n;l==null||l({target:{value:i}})},disabled:s,children:[d.jsx(Yg,{className:t,children:d.jsx(Gg,{placeholder:a})}),d.jsx(qg,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Mm=({children:e,value:t,disabled:r,className:o})=>d.jsx(Xg,{value:t,disabled:r,className:o,children:e}),Om=({checked:e,onChange:t,disabled:r,className:o,id:n})=>{const a=e!==void 0,s=t;return d.jsx(Jg,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:r,className:o,id:n})},Lm=({checked:e,onChange:t,disabled:r,size:o,className:n,id:a})=>{const s=e!==void 0,i=t;return d.jsx(Qg,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:r,size:o,className:n,id:a})},zm=({children:e,htmlFor:t,className:r})=>d.jsx(em,{htmlFor:t,className:r,children:e}),Dm=({children:e,value:t,defaultValue:r,onChange:o,className:n})=>d.jsx(tm,{value:t,defaultValue:r,onValueChange:a=>{const s=o;s==null||s({target:{value:a}})},className:n,children:e}),$m=({value:e,disabled:t,className:r,id:o})=>d.jsx(rm,{value:e,disabled:t,className:r,id:o}),Fm=({className:e})=>d.jsx(om,{className:e}),Bm=({children:e,defaultValue:t,className:r})=>d.jsx(nm,{defaultValue:t,className:r,children:e}),Hm=({children:e,className:t})=>d.jsx(sm,{className:t,children:e}),Wm=({children:e,value:t,className:r})=>d.jsx(im,{className:r,value:t,children:e}),Vm=({children:e,value:t,className:r})=>d.jsx(lm,{className:r,value:t,children:e}),Um=({children:e,className:t})=>d.jsx(cm,{className:t,children:e}),jm=({src:e,alt:t,className:r})=>{var o;return d.jsxs(Uo,{className:r,children:[d.jsx(jo,{src:e,alt:t}),d.jsx(Ro,{children:((o=t==null?void 0:t.charAt(0))==null?void 0:o.toUpperCase())||"?"})]})},Rm=({width:e,height:t,className:r})=>d.jsx(um,{className:r,style:{width:e,height:t}}),Gm=({children:e,content:t,className:r})=>d.jsx(fm,{children:d.jsxs(pm,{children:[d.jsx(hm,{asChild:!0,children:d.jsx("span",{className:r,children:e})}),d.jsx(gm,{children:d.jsx("p",{children:String(t)})})]})}),Ym=({value:e,className:t})=>d.jsx(mm,{value:typeof e=="string"?Number(e):e,className:t}),qm={default:Wt,destructive:un},Xm=({children:e,variant:t,title:r,className:o})=>{const n=t,a=qm[n||"default"]||Wt;return d.jsxs(bm,{variant:n,className:o,children:[d.jsx(a,{className:"size-4"}),r?d.jsx(wm,{children:String(r)}):null,e?d.jsx(ym,{children:e}):null]})},Km=({children:e,defaultOpen:t,className:r})=>d.jsx(xm,{defaultOpen:t==="true"||t===!0,className:r,children:e}),Zm=({children:e,className:t})=>d.jsxs(km,{className:W("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx($r,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),Jm=({children:e,className:t})=>d.jsx(Sm,{className:t,children:e}),Qm=({children:e,className:t})=>d.jsx("p",{className:W("text-sm",t),children:e}),ev=({children:e,className:t,level:r})=>{const o=`h${r||"2"}`;return d.jsx(o,{className:W("font-semibold tracking-tight",t),children:e})},tv=({children:e,className:t,direction:r,gap:o})=>{const n=r==="row"?"flex-row":"flex-col",a=il(o);return d.jsx("div",{className:W("flex",n,a,t),children:e})},rv=({children:e,className:t,gap:r})=>{const o=il(r);return d.jsx("div",{className:W("flex flex-row items-center",o,t),children:e})},ov=({children:e,className:t,href:r,target:o,rel:n})=>d.jsx("a",{href:r,target:o,rel:n,className:t,children:e}),nv=({title:e,children:t,className:r})=>d.jsxs(Tt,{className:W("overflow-hidden p-0 gap-0 shadow-sm",r),children:[e?d.jsx(_t,{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})]}),av=({icon:e,label:t,description:r,onClick:o,className:n})=>{const a=e,s="size-5",i=a?al[a]:null;return d.jsxs("button",{type:"button",className:W("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",n),onClick:o,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,r?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(r)}):null]}),d.jsx($r,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},sv=({name:e,size:t,className:r})=>{const n={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=al[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:W(n,i,r)}):d.jsx("span",{className:W("inline-block",n,i,r),"data-icon":a})},iv=()=>({"ui-card":Cm,"ui-card-content":Em,"ui-card-header":Nm,"ui-button":Tm,"ui-text":Qm,"ui-heading":ev,"ui-badge":_m,"ui-input":Pm,"ui-textarea":Am,"ui-select":Im,"ui-select-option":Mm,"ui-checkbox":Om,"ui-switch":Lm,"ui-label":zm,"ui-radio-group":Dm,"ui-radio-group-item":$m,"ui-stack":tv,"ui-inline":rv,"ui-separator":Fm,"ui-tabs":Bm,"ui-tabs-list":Hm,"ui-tabs-trigger":Wm,"ui-tabs-content":Vm,"ui-scroll-area":Um,"ui-avatar":jm,"ui-icon":sv,"ui-link":ov,"ui-menu-item":av,"ui-menu":nv,"ui-skeleton":Rm,"ui-tooltip":Gm,"ui-progress":Ym,"ui-alert":Xm,"ui-collapsible":Km,"ui-collapsible-trigger":Zm,"ui-collapsible-content":Jm}),ll="/api/ecommerce",cl=async(e,t)=>{const r=t?`${t.replace(/\/$/,"")}${ll}`:ll,o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await o.json();if(!o.ok)throw new Error(n.error||"API request failed");return n.data},lv=({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)"})})]}),dl="stackable-dev-badge-styles",cv=()=>{if(typeof document>"u"||document.getElementById(dl))return;const e=document.createElement("style");e.id=dl,e.textContent=`
|
|
265
|
+
Defaulting to \`null\`.`}var Zp=Is,Jp=Os,Ao="Radio",[Qp,$s]=ge(Ao),[eh,th]=Qp(Ao),Fs=f.forwardRef((e,t)=>{const{__scopeRadio:r,name:o,checked:n=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...p}=e,[c,h]=f.useState(null),m=te(t,v=>h(v)),b=f.useRef(!1),g=c?u||!!c.closest("form"):!0;return d.jsxs(eh,{scope:r,checked:n,disabled:s,children:[d.jsx(H.button,{type:"button",role:"radio","aria-checked":n,"data-state":Ws(n),"data-disabled":s?"":void 0,disabled:s,value:i,...p,ref:m,onClick:V(e.onClick,v=>{n||l==null||l(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&d.jsx(Vs,{control:c,bubbles:!b.current,name:o,value:i,checked:n,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Fs.displayName=Ao;var Bs="RadioIndicator",Hs=f.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:o,...n}=e,a=th(Bs,r);return d.jsx(Ee,{present:o||a.checked,children:d.jsx(H.span,{"data-state":Ws(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})})});Hs.displayName=Bs;var rh="RadioBubbleInput",Vs=f.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=or(r),u=nr(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==r&&m){const b=new Event("click",{bubbles:o});m.call(p,r),p.dispatchEvent(b)}},[l,r,o]),d.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Vs.displayName=rh;function Ws(e){return e?"checked":"unchecked"}var oh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wr="RadioGroup",[nh]=ge(wr,[vr,$s]),Us=vr(),js=$s(),[ah,sh]=nh(wr),Rs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:o,defaultValue:n,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:p=!0,onValueChange:c,...h}=e,m=Us(r),b=Mt(u),[g,v]=Be({prop:a,defaultProp:n??null,onChange:c,caller:wr});return d.jsx(ah,{scope:r,name:o,required:s,disabled:i,value:g,onValueChange:v,children:d.jsx(_s,{asChild:!0,...m,orientation:l,dir:b,loop:p,children:d.jsx(H.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Rs.displayName=wr;var Gs="RadioGroupItem",Ys=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:o,...n}=e,a=sh(Gs,r),s=a.disabled||o,i=Us(r),l=js(r),u=f.useRef(null),p=te(t,u),c=a.value===n.value,h=f.useRef(!1);return f.useEffect(()=>{const m=g=>{oh.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),d.jsx(Ps,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Fs,{disabled:s,required:a.required,checked:c,...l,...n,name:a.name,ref:p,onCheck:()=>a.onValueChange(n.value),onKeyDown:V(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:V(n.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});Ys.displayName=Gs;var ih="RadioGroupIndicator",qs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...o}=e,n=js(r);return d.jsx(Hs,{...n,...o,ref:t})});qs.displayName=ih;var lh=Rs,ch=Ys,dh=qs;function uh(e,t){return f.useReducer((r,o)=>t[r][o]??r,e)}var Io="ScrollArea",[Xs]=ge(Io),[fh,Se]=Xs(Io),Ks=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,l]=f.useState(null),[u,p]=f.useState(null),[c,h]=f.useState(null),[m,b]=f.useState(null),[g,v]=f.useState(null),[w,x]=f.useState(0),[y,S]=f.useState(0),[T,C]=f.useState(!1),[E,N]=f.useState(!1),_=te(t,$=>l($)),O=Mt(n);return d.jsx(fh,{scope:r,type:o,dir:O,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:p,content:c,onContentChange:h,scrollbarX:m,onScrollbarXChange:b,scrollbarXEnabled:T,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:E,onScrollbarYEnabledChange:N,onCornerWidthChange:x,onCornerHeightChange:S,children:d.jsx(H.div,{dir:O,...s,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});Ks.displayName=Io;var Zs="ScrollAreaViewport",Js=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:o,nonce:n,...a}=e,s=Se(Zs,r),i=f.useRef(null),l=te(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:n}),d.jsx(H.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:o})})]})});Js.displayName=Zs;var $e="ScrollAreaScrollbar",Qs=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return f.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?d.jsx(ph,{...o,ref:t,forceMount:r}):n.type==="scroll"?d.jsx(hh,{...o,ref:t,forceMount:r}):n.type==="auto"?d.jsx(ei,{...o,ref:t,forceMount:r}):n.type==="always"?d.jsx(Mo,{...o,ref:t}):null});Qs.displayName=$e;var ph=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),[a,s]=f.useState(!1);return f.useEffect(()=>{const i=n.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},p=()=>{l=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",p),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",p)}}},[n.scrollArea,n.scrollHideDelay]),d.jsx(Ee,{present:r||a,children:d.jsx(ei,{"data-state":a?"visible":"hidden",...o,ref:t})})}),hh=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Sr(()=>l("SCROLL_END"),100),[i,l]=uh("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 f.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,l]),f.useEffect(()=>{const u=n.viewport,p=a?"scrollLeft":"scrollTop";if(u){let c=u[p];const h=()=>{const m=u[p];c!==m&&(l("SCROLL"),s()),c=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[n.viewport,a,l,s]),d.jsx(Ee,{present:r||i!=="hidden",children:d.jsx(Mo,{"data-state":i==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:V(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:V(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ei=f.forwardRef((e,t)=>{const r=Se($e,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,s]=f.useState(!1),i=e.orientation==="horizontal",l=Sr(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;s(i?u:p)}},10);return xt(r.viewport,l),xt(r.content,l),d.jsx(Ee,{present:o||a,children:d.jsx(Mo,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Mo=f.forwardRef((e,t)=>{const{orientation:r="vertical",...o}=e,n=Se($e,e.__scopeScrollArea),a=f.useRef(null),s=f.useRef(0),[i,l]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ai(i.viewport,i.content),p={...o,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,m){return yh(h,s.current,i,m)}return r==="horizontal"?d.jsx(gh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollLeft,m=si(h,i,n.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollLeft=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollLeft=c(h,n.dir))}}):r==="vertical"?d.jsx(mh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollTop,m=si(h,i);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollTop=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollTop=c(h))}}):null}),gh=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarXChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ri,{"data-orientation":"horizontal",...n,ref:u,sizes:r,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":kr(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+p.deltaX;e.onWheelScroll(h),li(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:xr(s.paddingLeft),paddingEnd:xr(s.paddingRight)}})}})}),mh=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarYChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ri,{"data-orientation":"vertical",...n,ref:u,sizes:r,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":kr(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollTop+p.deltaY;e.onWheelScroll(h),li(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:xr(s.paddingTop),paddingEnd:xr(s.paddingBottom)}})}})}),[vh,ti]=Xs($e),ri=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:p,onResize:c,...h}=e,m=Se($e,r),[b,g]=f.useState(null),v=te(t,_=>g(_)),w=f.useRef(null),x=f.useRef(""),y=m.viewport,S=o.content-o.viewport,T=fe(p),C=fe(l),E=Sr(c,10);function N(_){if(w.current){const O=_.clientX-w.current.left,$=_.clientY-w.current.top;u({x:O,y:$})}}return f.useEffect(()=>{const _=O=>{const $=O.target;(b==null?void 0:b.contains($))&&T(O,S)};return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[y,b,S,T]),f.useEffect(C,[o,C]),xt(b,E),xt(m.content,E),d.jsx(vh,{scope:r,scrollbar:b,hasThumb:n,onThumbChange:fe(a),onThumbPointerUp:fe(s),onThumbPositionChange:C,onThumbPointerDown:fe(i),children:d.jsx(H.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:V(e.onPointerDown,_=>{_.button===0&&(_.target.setPointerCapture(_.pointerId),w.current=b.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),N(_))}),onPointerMove:V(e.onPointerMove,N),onPointerUp:V(e.onPointerUp,_=>{const O=_.target;O.hasPointerCapture(_.pointerId)&&O.releasePointerCapture(_.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),yr="ScrollAreaThumb",oi=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ti(yr,e.__scopeScrollArea);return d.jsx(Ee,{present:r||n.hasThumb,children:d.jsx(bh,{ref:t,...o})})}),bh=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:o,...n}=e,a=Se(yr,r),s=ti(yr,r),{onThumbPositionChange:i}=s,l=te(t,c=>s.onThumbChange(c)),u=f.useRef(void 0),p=Sr(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(p(),!u.current){const m=xh(c,i);u.current=m,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,p,i]),d.jsx(H.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:V(e.onPointerDownCapture,c=>{const m=c.target.getBoundingClientRect(),b=c.clientX-m.left,g=c.clientY-m.top;s.onThumbPointerDown({x:b,y:g})}),onPointerUp:V(e.onPointerUp,s.onThumbPointerUp)})});oi.displayName=yr;var Oo="ScrollAreaCorner",ni=f.forwardRef((e,t)=>{const r=Se(Oo,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?d.jsx(wh,{...e,ref:t}):null});ni.displayName=Oo;var wh=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...o}=e,n=Se(Oo,r),[a,s]=f.useState(0),[i,l]=f.useState(0),u=!!(a&&i);return xt(n.scrollbarX,()=>{var c;const p=((c=n.scrollbarX)==null?void 0:c.offsetHeight)||0;n.onCornerHeightChange(p),l(p)}),xt(n.scrollbarY,()=>{var c;const p=((c=n.scrollbarY)==null?void 0:c.offsetWidth)||0;n.onCornerWidthChange(p),s(p)}),u?d.jsx(H.div,{...o,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xr(e){return e?parseInt(e,10):0}function ai(e,t){const r=e/t;return isNaN(r)?0:r}function kr(e){const t=ai(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function yh(e,t,r,o="ltr"){const n=kr(r),a=n/2,s=t||a,i=n-s,l=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-i,p=r.content-r.viewport,c=o==="ltr"?[0,p]:[p*-1,0];return ii([l,u],c)(e)}function si(e,t,r="ltr"){const o=kr(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-o,l=r==="ltr"?[0,s]:[s*-1,0],u=To(e,l);return ii([0,s],[0,i])(u)}function ii(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function li(e,t){return e>0&&e<t}var xh=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,i=r.top!==a.top;(s||i)&&t(),r=a,o=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(o)};function Sr(e,t){const r=fe(e),o=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),f.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function xt(e,t){const r=fe(t);ae(()=>{let o=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var kh=Ks,Sh=Js,Ch=ni,Eh=[" ","Enter","ArrowUp","ArrowDown"],Nh=[" ","Enter"],st="Select",[Cr,Er,Th]=qn(st),[kt]=ge(st,[Th,mr]),Nr=mr(),[_h,Ke]=kt(st),[Ph,Ah]=kt(st),ci=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:c,disabled:h,required:m,form:b}=e,g=Nr(t),[v,w]=f.useState(null),[x,y]=f.useState(null),[S,T]=f.useState(!1),C=Mt(u),[E,N]=Be({prop:o,defaultProp:n??!1,onChange:a,caller:st}),[_,O]=Be({prop:s,defaultProp:i,onChange:l,caller:st}),$=f.useRef(null),W=v?b||!!v.closest("form"):!0,[j,Y]=f.useState(new Set),Z=Array.from(j).map(P=>P.props.value).join(";");return d.jsx(ws,{...g,children:d.jsxs(_h,{required:m,scope:t,trigger:v,onTriggerChange:w,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:T,contentId:ot(),value:_,onValueChange:O,open:E,onOpenChange:N,dir:C,triggerPointerDownPosRef:$,disabled:h,children:[d.jsx(Cr.Provider,{scope:t,children:d.jsx(Ph,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(P=>{Y(z=>new Set(z).add(P))},[]),onNativeOptionRemove:f.useCallback(P=>{Y(z=>{const L=new Set(z);return L.delete(P),L})},[]),children:r})}),W?d.jsxs(Ii,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:c,value:_,onChange:P=>O(P.target.value),disabled:h,form:b,children:[_===void 0?d.jsx("option",{value:""}):null,Array.from(j)]},Z):null]})})};ci.displayName=st;var di="SelectTrigger",ui=f.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...n}=e,a=Nr(r),s=Ke(di,r),i=s.disabled||o,l=te(t,s.onTriggerChange),u=Er(r),p=f.useRef("touch"),[c,h,m]=Oi(g=>{const v=u().filter(y=>!y.disabled),w=v.find(y=>y.value===s.value),x=Li(v,g,w);x!==void 0&&s.onValueChange(x.value)}),b=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(ys,{asChild:!0,...a,children:d.jsx(H.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":Mi(s.value)?"":void 0,...n,ref:l,onClick:V(n.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&b(g)}),onPointerDown:V(n.onPointerDown,g=>{p.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:V(n.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&Eh.includes(g.key)&&(b(),g.preventDefault())})})})});ui.displayName=di;var fi="SelectValue",pi=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,children:a,placeholder:s="",...i}=e,l=Ke(fi,r),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,c=te(t,l.onValueNodeChange);return ae(()=>{u(p)},[u,p]),d.jsx(H.span,{...i,ref:c,style:{pointerEvents:"none"},children:Mi(l.value)?d.jsx(d.Fragment,{children:s}):a})});pi.displayName=fi;var Ih="SelectIcon",hi=f.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...n}=e;return d.jsx(H.span,{"aria-hidden":!0,...n,ref:t,children:o||"▼"})});hi.displayName=Ih;var Mh="SelectPortal",gi=e=>d.jsx(Qr,{asChild:!0,...e});gi.displayName=Mh;var it="SelectContent",mi=f.forwardRef((e,t)=>{const r=Ke(it,e.__scopeSelect),[o,n]=f.useState();if(ae(()=>{n(new DocumentFragment)},[]),!r.open){const a=o;return a?Bt.createPortal(d.jsx(vi,{scope:e.__scopeSelect,children:d.jsx(Cr.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(bi,{...e,ref:t})});mi.displayName=it;var _e=10,[vi,Ze]=kt(it),Oh="SelectContentImpl",Lh=It("SelectContent.RemoveScroll"),bi=f.forwardRef((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v,...w}=e,x=Ke(it,r),[y,S]=f.useState(null),[T,C]=f.useState(null),E=te(t,D=>S(D)),[N,_]=f.useState(null),[O,$]=f.useState(null),W=Er(r),[j,Y]=f.useState(!1),Z=f.useRef(!1);f.useEffect(()=>{if(y)return nf(y)},[y]),bu();const P=f.useCallback(D=>{const[F,...G]=W().map(X=>X.ref.current),[oe]=G.slice(-1),J=document.activeElement;for(const X of D)if(X===J||(X==null||X.scrollIntoView({block:"nearest"}),X===F&&T&&(T.scrollTop=0),X===oe&&T&&(T.scrollTop=T.scrollHeight),X==null||X.focus(),document.activeElement!==J))return},[W,T]),z=f.useCallback(()=>P([N,y]),[P,N,y]);f.useEffect(()=>{j&&z()},[j,z]);const{onOpenChange:L,triggerPointerDownPosRef:Q}=x;f.useEffect(()=>{if(y){let D={x:0,y:0};const F=oe=>{var J,X;D={x:Math.abs(Math.round(oe.pageX)-(((J=Q.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((X=Q.current)==null?void 0:X.y)??0))}},G=oe=>{D.x<=10&&D.y<=10?oe.preventDefault():y.contains(oe.target)||L(!1),document.removeEventListener("pointermove",F),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",G,{capture:!0})}}},[y,L,Q]),f.useEffect(()=>{const D=()=>L(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[L]);const[A,se]=Oi(D=>{const F=W().filter(J=>!J.disabled),G=F.find(J=>J.ref.current===document.activeElement),oe=Li(F,D,G);oe&&setTimeout(()=>oe.ref.current.focus())}),ye=f.useCallback((D,F,G)=>{const oe=!Z.current&&!G;(x.value!==void 0&&x.value===F||oe)&&(_(D),oe&&(Z.current=!0))},[x.value]),R=f.useCallback(()=>y==null?void 0:y.focus(),[y]),re=f.useCallback((D,F,G)=>{const oe=!Z.current&&!G;(x.value!==void 0&&x.value===F||oe)&&$(D)},[x.value]),U=o==="popper"?Lo:wi,ee=U===Lo?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(vi,{scope:r,content:y,viewport:T,onViewportChange:C,itemRefCallback:ye,selectedItem:N,onItemLeave:R,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:O,position:o,isPositioned:j,searchRef:A,children:d.jsx(ka,{as:Lh,allowPinchZoom:!0,children:d.jsx(na,{asChild:!0,trapped:x.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:V(n,D=>{var F;(F=x.trigger)==null||F.focus({preventScroll:!0}),D.preventDefault()}),children:d.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(U,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:D=>D.preventDefault(),...w,...ee,onPlaced:()=>Y(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:V(w.onKeyDown,D=>{const F=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!F&&D.key.length===1&&se(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let oe=W().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(D.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const J=D.target,X=oe.indexOf(J);oe=oe.slice(X+1)}setTimeout(()=>P(oe)),D.preventDefault()}})})})})})})});bi.displayName=Oh;var zh="SelectItemAlignedPosition",wi=f.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...n}=e,a=Ke(it,r),s=Ze(it,r),[i,l]=f.useState(null),[u,p]=f.useState(null),c=te(t,E=>p(E)),h=Er(r),m=f.useRef(!1),b=f.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=s,y=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&w){const E=a.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),O=w.getBoundingClientRect();if(a.dir!=="rtl"){const J=O.left-N.left,X=_.left-J,le=E.left-X,ce=E.width+le,lt=Math.max(ce,N.width),Je=window.innerWidth-_e,Pe=To(X,[_e,Math.max(_e,Je-lt)]);i.style.minWidth=ce+"px",i.style.left=Pe+"px"}else{const J=N.right-O.right,X=window.innerWidth-_.right-J,le=window.innerWidth-E.right-X,ce=E.width+le,lt=Math.max(ce,N.width),Je=window.innerWidth-_e,Pe=To(X,[_e,Math.max(_e,Je-lt)]);i.style.minWidth=ce+"px",i.style.right=Pe+"px"}const $=h(),W=window.innerHeight-_e*2,j=g.scrollHeight,Y=window.getComputedStyle(u),Z=parseInt(Y.borderTopWidth,10),P=parseInt(Y.paddingTop,10),z=parseInt(Y.borderBottomWidth,10),L=parseInt(Y.paddingBottom,10),Q=Z+P+j+L+z,A=Math.min(v.offsetHeight*5,Q),se=window.getComputedStyle(g),ye=parseInt(se.paddingTop,10),R=parseInt(se.paddingBottom,10),re=E.top+E.height/2-_e,U=W-re,ee=v.offsetHeight/2,D=v.offsetTop+ee,F=Z+P+D,G=Q-F;if(F<=re){const J=$.length>0&&v===$[$.length-1].ref.current;i.style.bottom="0px";const X=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(U,ee+(J?R:0)+X+z),ce=F+le;i.style.height=ce+"px"}else{const J=$.length>0&&v===$[0].ref.current;i.style.top="0px";const le=Math.max(re,Z+g.offsetTop+(J?ye:0)+ee)+G;i.style.height=le+"px",g.scrollTop=F-re+g.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=A+"px",i.style.maxHeight=W+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,i,u,g,v,w,a.dir,o]);ae(()=>y(),[y]);const[S,T]=f.useState();ae(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(E=>{E&&b.current===!0&&(y(),x==null||x(),b.current=!1)},[y,x]);return d.jsx($h,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(H.div,{...n,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});wi.displayName=zh;var Dh="SelectPopperPosition",Lo=f.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:n=_e,...a}=e,s=Nr(r);return d.jsx(xs,{...s,...a,ref:t,align:o,collisionPadding:n,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)"}})});Lo.displayName=Dh;var[$h,zo]=kt(it,{}),Do="SelectViewport",yi=f.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...n}=e,a=Ze(Do,r),s=zo(Do,r),i=te(t,a.onViewportChange),l=f.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:o}),d.jsx(Cr.Slot,{scope:r,children:d.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:V(n.onScroll,u=>{const p=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const m=Math.abs(l.current-p.scrollTop);if(m>0){const b=window.innerHeight-_e*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(g,v);if(w<b){const x=w+m,y=Math.min(b,x),S=x-y;c.style.height=y+"px",c.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,c.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});yi.displayName=Do;var xi="SelectGroup",[Fh,Bh]=kt(xi),Hh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=ot();return d.jsx(Fh,{scope:r,id:n,children:d.jsx(H.div,{role:"group","aria-labelledby":n,...o,ref:t})})});Hh.displayName=xi;var ki="SelectLabel",Vh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Bh(ki,r);return d.jsx(H.div,{id:n.id,...o,ref:t})});Vh.displayName=ki;var Tr="SelectItem",[Wh,Si]=kt(Tr),Ci=f.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...s}=e,i=Ke(Tr,r),l=Ze(Tr,r),u=i.value===o,[p,c]=f.useState(a??""),[h,m]=f.useState(!1),b=te(t,x=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,x,o,n)}),g=ot(),v=f.useRef("touch"),w=()=>{n||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")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(Wh,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:f.useCallback(x=>{c(y=>y||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(Cr.ItemSlot,{scope:r,value:o,disabled:n,textValue:p,children:d.jsx(H.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:b,onFocus:V(s.onFocus,()=>m(!0)),onBlur:V(s.onBlur,()=>m(!1)),onClick:V(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:V(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:V(s.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:V(s.onPointerMove,x=>{var y;v.current=x.pointerType,n?(y=l.onItemLeave)==null||y.call(l):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(s.onPointerLeave,x=>{var y;x.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:V(s.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(Nh.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Ci.displayName=Tr;var Dt="SelectItemText",Ei=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,...a}=e,s=Ke(Dt,r),i=Ze(Dt,r),l=Si(Dt,r),u=Ah(Dt,r),[p,c]=f.useState(null),h=te(t,w=>c(w),l.onItemTextChange,w=>{var x;return(x=i.itemTextRefCallback)==null?void 0:x.call(i,w,l.value,l.disabled)}),m=p==null?void 0:p.textContent,b=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return ae(()=>(g(b),()=>v(b)),[g,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(H.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Bt.createPortal(a.children,s.valueNode):null]})});Ei.displayName=Dt;var Ni="SelectItemIndicator",Ti=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return Si(Ni,r).isSelected?d.jsx(H.span,{"aria-hidden":!0,...o,ref:t}):null});Ti.displayName=Ni;var $o="SelectScrollUpButton",_i=f.forwardRef((e,t)=>{const r=Ze($o,e.__scopeSelect),o=zo($o,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,o.onScrollButtonChange);return ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?d.jsx(Ai,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});_i.displayName=$o;var Fo="SelectScrollDownButton",Pi=f.forwardRef((e,t)=>{const r=Ze(Fo,e.__scopeSelect),o=zo(Fo,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,o.onScrollButtonChange);return ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?d.jsx(Ai,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Pi.displayName=Fo;var Ai=f.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Ze("SelectScrollButton",r),s=f.useRef(null),i=Er(r),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),ae(()=>{var p;const u=i().find(c=>c.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),d.jsx(H.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:V(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:V(n.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:V(n.onPointerLeave,()=>{l()})})}),Uh="SelectSeparator",jh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return d.jsx(H.div,{"aria-hidden":!0,...o,ref:t})});jh.displayName=Uh;var Bo="SelectArrow",Rh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Nr(r),a=Ke(Bo,r),s=Ze(Bo,r);return a.open&&s.position==="popper"?d.jsx(ks,{...n,...o,ref:t}):null});Rh.displayName=Bo;var Gh="SelectBubbleInput",Ii=f.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{const n=f.useRef(null),a=te(o,n),s=or(t);return f.useEffect(()=>{const i=n.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const c=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(H.select,{...r,style:{...Gn,...r.style},ref:a,defaultValue:t})});Ii.displayName=Gh;function Mi(e){return e===""||e===void 0}function Oi(e){const t=fe(e),r=f.useRef(""),o=f.useRef(0),n=f.useCallback(s=>{const i=r.current+s;t(i),(function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function Li(e,t,r){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Yh(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==r));const l=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function Yh(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var qh=ci,Xh=ui,Kh=pi,Zh=hi,Jh=gi,Qh=mi,eg=yi,tg=Ci,rg=Ei,og=Ti,ng=_i,ag=Pi,sg="Separator",zi="horizontal",ig=["horizontal","vertical"],Di=f.forwardRef((e,t)=>{const{decorative:r,orientation:o=zi,...n}=e,a=lg(o)?o:zi,i=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(H.div,{"data-orientation":a,...i,...n,ref:t})});Di.displayName=sg;function lg(e){return ig.includes(e)}var cg=Di,_r="Switch",[dg]=ge(_r),[ug,fg]=dg(_r),$i=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:p,...c}=e,[h,m]=f.useState(null),b=te(t,y=>m(y)),g=f.useRef(!1),v=h?p||!!h.closest("form"):!0,[w,x]=Be({prop:n,defaultProp:a??!1,onChange:u,caller:_r});return d.jsxs(ug,{scope:r,checked:w,disabled:i,children:[d.jsx(H.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Vi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:V(e.onClick,y=>{x(S=>!S),v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),v&&d.jsx(Hi,{control:h,bubbles:!g.current,name:o,value:l,checked:w,required:s,disabled:i,form:p,style:{transform:"translateX(-100%)"}})]})});$i.displayName=_r;var Fi="SwitchThumb",Bi=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,n=fg(Fi,r);return d.jsx(H.span,{"data-state":Vi(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});Bi.displayName=Fi;var pg="SwitchBubbleInput",Hi=f.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=or(r),u=nr(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==r&&m){const b=new Event("click",{bubbles:o});m.call(p,r),p.dispatchEvent(b)}},[l,r,o]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hi.displayName=pg;function Vi(e){return e?"checked":"unchecked"}var hg=$i,gg=Bi,Pr="Tabs",[mg]=ge(Pr,[vr]),Wi=vr(),[vg,Ho]=mg(Pr),Ui=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=Mt(i),[c,h]=Be({prop:o,onChange:n,defaultProp:a??"",caller:Pr});return d.jsx(vg,{scope:r,baseId:ot(),value:c,onValueChange:h,orientation:s,dir:p,activationMode:l,children:d.jsx(H.div,{dir:p,"data-orientation":s,...u,ref:t})})});Ui.displayName=Pr;var ji="TabsList",Ri=f.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...n}=e,a=Ho(ji,r),s=Wi(r);return d.jsx(_s,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:d.jsx(H.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Ri.displayName=ji;var Gi="TabsTrigger",Yi=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,s=Ho(Gi,r),i=Wi(r),l=Ki(s.baseId,o),u=Zi(s.baseId,o),p=o===s.value;return d.jsx(Ps,{asChild:!0,...i,focusable:!n,active:p,children:d.jsx(H.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:V(e.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(o):c.preventDefault()}),onKeyDown:V(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(o)}),onFocus:V(e.onFocus,()=>{const c=s.activationMode!=="manual";!p&&!n&&c&&s.onValueChange(o)})})})});Yi.displayName=Gi;var qi="TabsContent",Xi=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,forceMount:n,children:a,...s}=e,i=Ho(qi,r),l=Ki(i.baseId,o),u=Zi(i.baseId,o),p=o===i.value,c=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:n||p,children:({present:h})=>d.jsx(H.div,{"data-state":p?"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})})});Xi.displayName=qi;function Ki(e,t){return`${e}-trigger-${t}`}function Zi(e,t){return`${e}-content-${t}`}var bg=Ui,wg=Ri,yg=Yi,xg=Xi,[Ar]=ge("Tooltip",[mr]),Ir=mr(),Ji="TooltipProvider",kg=700,Vo="tooltip.open",[Sg,Wo]=Ar(Ji),Qi=e=>{const{__scopeTooltip:t,delayDuration:r=kg,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Sg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};Qi.displayName=Ji;var $t="Tooltip",[Cg,Ft]=Ar($t),el=e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Wo($t,e.__scopeTooltip),u=Ir(t),[p,c]=f.useState(null),h=ot(),m=f.useRef(0),b=s??l.disableHoverableContent,g=i??l.delayDuration,v=f.useRef(!1),[w,x]=Be({prop:o,defaultProp:n??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Vo))):l.onClose(),a==null||a(E)},caller:$t}),y=f.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),S=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,x(!0)},[x]),T=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),C=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,x(!0),m.current=0},g)},[g,x]);return f.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(ws,{...u,children:d.jsx(Cg,{scope:t,contentId:h,open:w,stateAttribute:y,trigger:p,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:f.useCallback(()=>{b?T():(window.clearTimeout(m.current),m.current=0)},[T,b]),onOpen:S,onClose:T,disableHoverableContent:b,children:r})})};el.displayName=$t;var Uo="TooltipTrigger",tl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Ft(Uo,r),a=Wo(Uo,r),s=Ir(r),i=f.useRef(null),l=te(t,i,n.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(ys,{asChild:!0,...s,children:d.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:V(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:V(e.onBlur,n.onClose),onClick:V(e.onClick,n.onClose)})})});tl.displayName=Uo;var jo="TooltipPortal",[Eg,Ng]=Ar(jo,{forceMount:void 0}),rl=e=>{const{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Ft(jo,t);return d.jsx(Eg,{scope:t,forceMount:r,children:d.jsx(Ee,{present:r||a.open,children:d.jsx(Qr,{asChild:!0,container:n,children:o})})})};rl.displayName=jo;var St="TooltipContent",ol=f.forwardRef((e,t)=>{const r=Ng(St,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,s=Ft(St,e.__scopeTooltip);return d.jsx(Ee,{present:o||s.open,children:s.disableHoverableContent?d.jsx(nl,{side:n,...a,ref:t}):d.jsx(Tg,{side:n,...a,ref:t})})}),Tg=f.forwardRef((e,t)=>{const r=Ft(St,e.__scopeTooltip),o=Wo(St,e.__scopeTooltip),n=f.useRef(null),a=te(t,n),[s,i]=f.useState(null),{trigger:l,onClose:u}=r,p=n.current,{onPointerInTransitChange:c}=o,h=f.useCallback(()=>{i(null),c(!1)},[c]),m=f.useCallback((b,g)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},x=Ig(w,v.getBoundingClientRect()),y=Mg(w,x),S=Og(g.getBoundingClientRect()),T=zg([...y,...S]);i(T),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const b=v=>m(v,p),g=v=>m(v,l);return l.addEventListener("pointerleave",b),p.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",g)}}},[l,p,m,h]),f.useEffect(()=>{if(s){const b=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},x=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),y=!Lg(w,s);x?h():y&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,p,s,u,h]),d.jsx(nl,{...e,ref:a})}),[_g,Pg]=Ar($t,{isInside:!1}),Ag=Ld("TooltipContent"),nl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ft(St,r),u=Ir(r),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(Vo,p),()=>document.removeEventListener(Vo,p)),[p]),f.useEffect(()=>{if(l.trigger){const c=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&p()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,p]),d.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:p,children:d.jsxs(xs,{"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(Ag,{children:o}),d.jsx(_g,{scope:r,isInside:!0,children:d.jsx(Vd,{id:l.contentId,role:"tooltip",children:n||o})})]})})});ol.displayName=St;var al="TooltipArrow",sl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Ir(r);return Pg(al,r).isInside?null:d.jsx(ks,{...n,...o,ref:t})});sl.displayName=al;function Ig(e,t){const r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Mg(e,t,r=5){const o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function Og(e){const{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function Lg(e,t){const{x:r,y:o}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>o!=h>o&&r<(c-u)*(o-p)/(h-p)+u&&(n=!n)}return n}function zg(e){const t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),Dg(t)}function Dg(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let o=e.length-1;o>=0;o--){const n=e[o];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var $g=Qi,Fg=el,Bg=tl,Hg=rl,Vg=ol,Wg=sl;const Ug=Yt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all cursor-pointer 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 il({className:e,variant:t="default",size:r="default",asChild:o=!1,...n}){const a=o?jn:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":r,className:B(Ug({variant:t,size:r,className:e})),...n})}const jg={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"},Rg=Yt("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 Gg({className:e,variant:t="default",hue:r,asChild:o=!1,...n}){const a=o?jn:"span",s=r?jg[r]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:B(Rg({variant:t}),s,e),...n})}function Yg({className:e,type:t,...r}){return d.jsx("input",{type:t,"data-slot":"input",className:B("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),...r})}function qg({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:B("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 Xg({...e}){return d.jsx(qh,{"data-slot":"select",...e})}function Kg({...e}){return d.jsx(Kh,{"data-slot":"select-value",...e})}function Zg({className:e,size:t="default",children:r,...o}){return d.jsxs(Xh,{"data-slot":"select-trigger","data-size":t,className:B("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),...o,children:[r,d.jsx(Zh,{asChild:!0,children:d.jsx(pn,{className:"size-4 opacity-50"})})]})}function Jg({className:e,children:t,position:r="item-aligned",align:o="center",...n}){return d.jsx(Jh,{children:d.jsxs(Qh,{"data-slot":"select-content",className:B("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",r==="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:r,align:o,...n,children:[d.jsx(em,{}),d.jsx(eg,{className:B("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(tm,{})]})})}function Qg({className:e,children:t,...r}){return d.jsxs(tg,{"data-slot":"select-item",className:B("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),...r,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(og,{children:d.jsx(fn,{className:"size-4"})})}),d.jsx(rg,{children:t})]})}function em({className:e,...t}){return d.jsx(ng,{"data-slot":"select-scroll-up-button",className:B("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Tc,{className:"size-4"})})}function tm({className:e,...t}){return d.jsx(ag,{"data-slot":"select-scroll-down-button",className:B("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(pn,{className:"size-4"})})}function rm({className:e,...t}){return d.jsx(za,{"data-slot":"checkbox",className:B("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($a,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(fn,{className:"size-3.5"})})})}function om({className:e,size:t="default",...r}){return d.jsx(hg,{"data-slot":"switch","data-size":t,className:B("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),...r,children:d.jsx(gg,{"data-slot":"switch-thumb",className:B("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 nm({className:e,...t}){return d.jsx(jp,{"data-slot":"label",className:B("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 am({className:e,...t}){return d.jsx(lh,{"data-slot":"radio-group",className:B("grid gap-3",e),...t})}function sm({className:e,...t}){return d.jsx(ch,{"data-slot":"radio-group-item",className:B("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(dh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Ac,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function im({className:e,orientation:t="horizontal",decorative:r=!0,...o}){return d.jsx(cg,{"data-slot":"separator",decorative:r,orientation:t,className:B("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),...o})}function lm({className:e,orientation:t="horizontal",...r}){return d.jsx(bg,{"data-slot":"tabs","data-orientation":t,orientation:t,className:B("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...r})}const cm=Yt("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 dm({className:e,variant:t="default",...r}){return d.jsx(wg,{"data-slot":"tabs-list","data-variant":t,className:B(cm({variant:t}),e),...r})}function um({className:e,...t}){return d.jsx(yg,{"data-slot":"tabs-trigger",className:B("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 fm({className:e,...t}){return d.jsx(xg,{"data-slot":"tabs-content",className:B("flex-1 outline-none",e),...t})}function pm({className:e,children:t,...r}){return d.jsxs(kh,{"data-slot":"scroll-area",className:B("relative",e),...r,children:[d.jsx(Sh,{"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(hm,{}),d.jsx(Ch,{})]})}function hm({className:e,orientation:t="vertical",...r}){return d.jsx(Qs,{"data-slot":"scroll-area-scrollbar",orientation:t,className:B("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),...r,children:d.jsx(oi,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Ro({className:e,size:t="default",...r}){return d.jsx(hf,{"data-slot":"avatar","data-size":t,className:B("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),...r})}function Go({className:e,...t}){return d.jsx(gf,{"data-slot":"avatar-image",className:B("aspect-square size-full",e),...t})}function Yo({className:e,...t}){return d.jsx(mf,{"data-slot":"avatar-fallback",className:B("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 gm({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:B("animate-pulse rounded-md bg-accent",e),...t})}function mm({delayDuration:e=0,...t}){return d.jsx($g,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function vm({...e}){return d.jsx(Fg,{"data-slot":"tooltip",...e})}function bm({...e}){return d.jsx(Bg,{"data-slot":"tooltip-trigger",...e})}function wm({className:e,sideOffset:t=0,children:r,...o}){return d.jsx(Hg,{children:d.jsxs(Vg,{"data-slot":"tooltip-content",sideOffset:t,className:B("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),...o,children:[r,d.jsx(Wg,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function ym({className:e,value:t,...r}){return d.jsx(Zp,{"data-slot":"progress",className:B("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:d.jsx(Jp,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const xm=Yt("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 km({className:e,variant:t,...r}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:B(xm({variant:t}),e),...r})}function Sm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:B("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Cm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:B("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Em({...e}){return d.jsx(eu,{"data-slot":"collapsible",...e})}function Nm({...e}){return d.jsx(Zn,{"data-slot":"collapsible-trigger",...e})}function Tm({...e}){return d.jsx(Jn,{"data-slot":"collapsible-content",...e})}const ll={"arrow-left":Sc,calendar:Ec,"check-circle-2":gn,"chevron-left":Nc,"chevron-right":Br,clock:Ic,"credit-card":Mc,"external-link":Oc,"help-circle":_c,info:Ut,"loader-2":Hr,mail:Vr,"map-pin":Lc,"message-circle":zc,"message-square":mn,package:$c,phone:Fc,search:Bc,"shopping-bag":Hc,sparkles:Vc,truck:Uc,user:vn,"x-circle":Pc,"alert-circle":hn,"book-open":Cc},cl={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"},dl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},ul=e=>typeof e=="number"?cl[String(e)]??"gap-2":typeof e=="string"?cl[e.trim()]??"gap-2":"gap-2",_m=({children:e,className:t,onClick:r})=>d.jsx(Pt,{className:t,onClick:r,children:e}),Pm=({children:e,className:t})=>d.jsx(At,{className:t,children:e}),Am=({children:e,className:t})=>d.jsx(Md,{className:t,children:e}),Im=({children:e,className:t,onClick:r,variant:o,size:n,disabled:a,title:s})=>d.jsx(il,{className:t,variant:o,size:n,onClick:r,disabled:a,title:s,children:e}),Mm=({children:e,className:t,variant:r,hue:o,tone:n})=>d.jsx(Gg,{className:B(dl[n]??"",t),variant:r,hue:o,children:e}),Om=({className:e,onChange:t,...r})=>d.jsx(Yg,{className:e,onChange:t,...r}),Lm=({className:e,onChange:t,...r})=>d.jsx(qg,{className:e,onChange:t,...r}),zm=({children:e,className:t,value:r,defaultValue:o,onChange:n,placeholder:a,disabled:s})=>d.jsxs(Xg,{value:r,defaultValue:o,onValueChange:i=>{const l=n;l==null||l({target:{value:i}})},disabled:s,children:[d.jsx(Zg,{className:t,children:d.jsx(Kg,{placeholder:a})}),d.jsx(Jg,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Dm=({children:e,value:t,disabled:r,className:o})=>d.jsx(Qg,{value:t,disabled:r,className:o,children:e}),$m=({checked:e,onChange:t,disabled:r,className:o,id:n})=>{const a=e!==void 0,s=t;return d.jsx(rm,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:r,className:o,id:n})},Fm=({checked:e,onChange:t,disabled:r,size:o,className:n,id:a})=>{const s=e!==void 0,i=t;return d.jsx(om,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:r,size:o,className:n,id:a})},Bm=({children:e,htmlFor:t,className:r})=>d.jsx(nm,{htmlFor:t,className:r,children:e}),Hm=({children:e,value:t,defaultValue:r,onChange:o,className:n})=>d.jsx(am,{value:t,defaultValue:r,onValueChange:a=>{const s=o;s==null||s({target:{value:a}})},className:n,children:e}),Vm=({value:e,disabled:t,className:r,id:o})=>d.jsx(sm,{value:e,disabled:t,className:r,id:o}),Wm=({className:e})=>d.jsx(im,{className:e}),Um=({children:e,defaultValue:t,className:r})=>d.jsx(lm,{defaultValue:t,className:r,children:e}),jm=({children:e,className:t})=>d.jsx(dm,{className:t,children:e}),Rm=({children:e,value:t,className:r})=>d.jsx(um,{className:r,value:t,children:e}),Gm=({children:e,value:t,className:r})=>d.jsx(fm,{className:r,value:t,children:e}),Ym=({children:e,className:t})=>d.jsx(pm,{className:t,children:e}),qm=({src:e,alt:t,className:r})=>{var o;return d.jsxs(Ro,{className:r,children:[d.jsx(Go,{src:e,alt:t}),d.jsx(Yo,{children:((o=t==null?void 0:t.charAt(0))==null?void 0:o.toUpperCase())||"?"})]})},Xm=({width:e,height:t,className:r})=>d.jsx(gm,{className:r,style:{width:e,height:t}}),Km=({children:e,content:t,className:r})=>d.jsx(mm,{children:d.jsxs(vm,{children:[d.jsx(bm,{asChild:!0,children:d.jsx("span",{className:r,children:e})}),d.jsx(wm,{children:d.jsx("p",{children:String(t)})})]})}),Zm=({value:e,className:t})=>d.jsx(ym,{value:typeof e=="string"?Number(e):e,className:t}),Jm={default:Ut,destructive:hn},Qm=({children:e,variant:t,title:r,className:o})=>{const n=t,a=Jm[n||"default"]||Ut;return d.jsxs(km,{variant:n,className:o,children:[d.jsx(a,{className:"size-4"}),r?d.jsx(Sm,{children:String(r)}):null,e?d.jsx(Cm,{children:e}):null]})},ev=({children:e,defaultOpen:t,className:r})=>d.jsx(Em,{defaultOpen:t==="true"||t===!0,className:r,children:e}),tv=({children:e,className:t})=>d.jsxs(Nm,{className:B("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Br,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),rv=({children:e,className:t})=>d.jsx(Tm,{className:t,children:e}),ov=({children:e,className:t,tone:r})=>d.jsx("p",{className:B("text-sm",dl[r]??"",t),children:e}),nv=({children:e,className:t,level:r})=>{const o=`h${r||"2"}`;return d.jsx(o,{className:B("font-semibold tracking-tight",t),children:e})},av=({children:e,className:t,direction:r,gap:o})=>{const n=r==="row"?"flex-row":"flex-col",a=ul(o);return d.jsx("div",{className:B("flex",n,a,t),children:e})},sv=({children:e,className:t,gap:r})=>{const o=ul(r);return d.jsx("div",{className:B("flex flex-row items-center",o,t),children:e})},iv=({children:e,className:t,href:r,target:o,rel:n})=>d.jsx("a",{href:r,target:o,rel:n,className:t,children:e}),lv=({title:e,children:t,className:r})=>d.jsxs(Pt,{className:B("overflow-hidden p-0 gap-0 shadow-sm",r),children:[e?d.jsx(At,{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})]}),cv=({icon:e,label:t,description:r,onClick:o,className:n})=>{const a=e,s="size-5",i=a?ll[a]:null;return d.jsxs("button",{type:"button",className:B("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",n),onClick:o,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,r?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(r)}):null]}),d.jsx(Br,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},dv=({name:e,size:t,className:r})=>{const n={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=ll[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:B(n,i,r)}):d.jsx("span",{className:B("inline-block",n,i,r),"data-icon":a})},uv=()=>({"ui-card":_m,"ui-card-content":Pm,"ui-card-header":Am,"ui-button":Im,"ui-text":ov,"ui-heading":nv,"ui-badge":Mm,"ui-input":Om,"ui-textarea":Lm,"ui-select":zm,"ui-select-option":Dm,"ui-checkbox":$m,"ui-switch":Fm,"ui-label":Bm,"ui-radio-group":Hm,"ui-radio-group-item":Vm,"ui-stack":av,"ui-inline":sv,"ui-separator":Wm,"ui-tabs":Um,"ui-tabs-list":jm,"ui-tabs-trigger":Rm,"ui-tabs-content":Gm,"ui-scroll-area":Ym,"ui-avatar":qm,"ui-icon":dv,"ui-link":iv,"ui-menu-item":cv,"ui-menu":lv,"ui-skeleton":Xm,"ui-tooltip":Km,"ui-progress":Zm,"ui-alert":Qm,"ui-collapsible":ev,"ui-collapsible-trigger":tv,"ui-collapsible-content":rv}),fl="/api/ecommerce",pl=async(e,t)=>{const r=t?`${t.replace(/\/$/,"")}${fl}`:fl,o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await o.json();if(!o.ok)throw new Error(n.error||"API request failed");return n.data},fv=({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)"})})]}),hl="stackable-dev-badge-styles",pv=()=>{if(typeof document>"u"||document.getElementById(hl))return;const e=document.createElement("style");e.id=hl,e.textContent=`
|
|
266
266
|
@keyframes stackable-icon-wiggle {
|
|
267
267
|
0% { transform: rotate(0deg); }
|
|
268
268
|
70% { transform: rotate(200deg); }
|
|
269
269
|
85% { transform: rotate(175deg); }
|
|
270
270
|
100% { transform: rotate(180deg); }
|
|
271
271
|
}
|
|
272
|
-
`,document.head.appendChild(e)},dv=e=>{const t=e.some(o=>o.mode==="staging"),r=e.some(o=>o.mode==="dev");return t&&r?"Dev + Staging":t?"Staging Mode":"Dev Mode"},uv=e=>e.mode==="staging"?"STAGING":"DEV",fv=({className:e="",extensions:t=[],tokenErrors:r=new Map})=>{const[o,n]=S.useState([]),[a,s]=S.useState(!1),[i,l]=S.useState(!1),[u,p]=S.useState(!1),c=S.useRef(null),h=r.size>0;if(S.useEffect(()=>{cv()},[]),S.useEffect(()=>{if(!h)return;const b=()=>{p(!0),setTimeout(()=>p(!1),600)};b();const g=setInterval(b,4e3);return()=>clearInterval(g)},[h]),S.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=an(window.location.search);n(v)};b();const g=()=>b();return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[]),o.length===0)return null;const m=b=>{if(b.stopPropagation(),typeof window>"u")return;const g=new URL(window.location.href);g.searchParams.delete("_stackable_dev"),g.searchParams.delete("_stackable_staging"),window.location.href=g.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:o.map((b,g)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:g<o.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:uv(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]}),r.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",r.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(lv,{className:"w-6 h-6"})}),d.jsx("span",{children:dv(o)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",o.length," extension",o.length>1?"s":"",")"]}),d.jsx("button",{onClick:m,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"})]})]})},pv=800,Ar=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,hv=async(e,t,r,o)=>{const n=new Map,a=new Map;return await Promise.all(e.filter(s=>s.manifest.permissions.includes("data:fetch")).map(async s=>{const i=o.find(h=>h.extensionId===s.id),l=i==null?void 0:i.token,u=i==null?void 0:i.mode,p=Ar(t,"/proxy-token"),c=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,extensionId:s.id,...u&&{mode:u},...l&&{devSessionToken:l}})});if(c.ok){const{token:h,encryptionKey:m}=await c.json();n.set(s.id,{token:h,encryptionKey:m})}else{let h=`Proxy token failed (${c.status})`;u&&!l?h="Session token missing — re-run CLI":u&&(h="Session expired or invalid — re-run CLI"),a.set(s.id,h),console.warn(`[embeddables] Failed to obtain proxy token for extension ${s.id} (${c.status}) — ${h}`)}})),{tokens:n,errors:a}},gv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),mv=({instanceId:e,apiBase:t,hostBase:r,appId:o,children:n,customerId:a,customerEmail:s})=>{const[i,l]=S.useState([]),[u,p]=S.useState([]),[c,h]=S.useState(new Map),[m,b]=S.useState(new Map),[g,v]=S.useState(!1);S.useEffect(()=>{(async()=>{const y=e;try{if(!y){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),l([]),v(!0);return}if(!t||!o){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),l([]),v(!0);return}const k=await fetch(Ar(t,`/instances/${o}/${y}`));if(!k.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${y}`),l([]),v(!0);return}const T=await k.json(),C=an(typeof window<"u"?window.location.search:""),E=await fc(T,C),{tokens:N,errors:_}=await hv(E,t,o,C);l(E),p(C),h(new Map(N)),b(_)}catch(k){console.error("Failed to load extensions:",k)}finally{v(!0)}})()},[e,o,t]),S.useEffect(()=>{if(!t||!o||i.length===0)return;const y=setInterval(async()=>{const k=[];await Promise.all(i.filter(T=>T.manifest.permissions.includes("data:fetch")).map(async T=>{const C=u.find(M=>M.extensionId===T.id),E=C==null?void 0:C.token,N=C==null?void 0:C.mode,_=Ar(t,"/proxy-token"),L=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,extensionId:T.id,...N&&{mode:N},...E&&{devSessionToken:E}})});if(L.ok){const{token:M,encryptionKey:z}=await L.json();k.push([T.id,{token:M,encryptionKey:z}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${T.id} (${L.status}) — using stale token`)})),k.length>0&&h(T=>{const C=new Map(T);for(const[E,N]of k)C.set(E,N);return C})},3300*1e3);return()=>clearInterval(y)},[i,u,t,o]),S.useEffect(()=>{if(c.size===0)return;const x=y=>{const k=y.data;if((k==null?void 0:k.type)!=="extension-ready")return;const T=k.extensionId,C=i.find(_=>_.id===T);if(!(C!=null&&C.bundleUrl))return;const E=u.find(_=>_.extensionId===T);if(cc(C.bundleUrl)&&(E==null?void 0:E.mode)!=="staging")return;const N=c.get(T);N&&Ft(T,{type:"extension-encryption-key",encryptionKey:N.encryptionKey})};return window.addEventListener("message",x),()=>window.removeEventListener("message",x)},[i,u,c]);const w=S.useMemo(()=>({"data.query":async x=>cl(x,r),"data.fetch":async(x,y)=>{const k=c.get(x);if(!k)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const T=gv(y)?y:{url:y.url,method:y.method??"GET",headers:y.headers??{},body:y.body??null},C=Ar(t,"/proxy"),E=await fetch(C,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":x,"X-Application-Id":o??"",Authorization:`Bearer ${k.token}`},body:JSON.stringify(T)}),N=await E.json();return{status:N.status??E.status,ok:N.ok??E.ok,data:N.data}},"actions.toast":async(x,y)=>{const k={...y.description&&{description:y.description},...y.duration&&{duration:y.duration},...y.position&&{position:y.position},...y.dismissible!=null&&{dismissible:y.dismissible},...y.closeButton!=null&&{closeButton:y.closeButton}};if(y.fetch){const T=E=>new Promise(N=>setTimeout(N,E)),C=Promise.all([w["data.fetch"](x,y.fetch),T(pv)]).then(([E])=>E);ut.promise(C,{loading:y.loading??y.message,success:y.success??y.message,error:y.error??"Something went wrong",...k});return}switch(y.type){case"success":{ut.success(y.message,k);break}case"error":{ut.error(y.message,k);break}case"warning":{ut.warning(y.message,k);break}case"info":{ut.info(y.message,k);break}default:ut(y.message,k)}},"actions.invoke":async x=>(window.dispatchEvent(new CustomEvent(`ext-action-${x.action}`,{detail:x})),{success:!0}),"context.read":async()=>({customerId:a??"",customerEmail:s??""})}),[t,o,r,a,s,c]);return g?d.jsxs(d.Fragment,{children:[d.jsx(Il,{extensions:i,capabilityHandlers:w,components:iv(),children:n}),d.jsx(fv,{extensions:i,tokenErrors:m})]}):null};var vv=(e,t,r,o,n,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function p(m){(Array.isArray(e)?e:[e]).forEach(b=>{let g=b==="class",v=g&&a?n.map(w=>a[w]||w):n;g?(l.classList.remove(...v),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(b,m)}),c(m)}function c(m){i&&u.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)p(o);else try{let m=localStorage.getItem(t)||r,b=s&&m==="system"?h():m;p(b)}catch{}},bv=f.createContext(void 0),wv={setTheme:e=>{},themes:[]},yv=()=>{var e;return(e=f.useContext(bv))!=null?e:wv};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:o,enableColorScheme:n,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let p=JSON.stringify([r,t,a,e,i,s,o,n]).slice(1,-1);return f.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${vv.toString()})(${p})`}})});const xv=({...e})=>{const{theme:t="system"}=yv();return d.jsx(lc,{theme:t,className:"toaster group",icons:{success:d.jsx(fn,{className:"size-4"}),info:d.jsx(Wt,{className:"size-4"}),warning:d.jsx(Fc,{className:"size-4"}),error:d.jsx(Mc,{className:"size-4"}),loading:d.jsx(Fr,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},kv={dark:"dark",light:"widget-theme-light"},Sv={dark:"dark",light:"light"},Cv=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:kv[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(xv,{position:"bottom-center",theme:Sv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Ev=({onClick:e,icon:t=bc})=>d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(nl,{className:"h-12 w-12 rounded-full",size:"icon",onClick:e,children:d.jsx(t,{className:"h-6 w-6"})})}),Nv=({children:e,icon:t,theme:r})=>{const[o,n]=S.useState(!1),[a,s]=S.useState(!0),i=S.useCallback(()=>{n(l=>!l)},[]);return S.useEffect(()=>{const l=()=>n(m=>!m),u=()=>n(!0),p=()=>n(!1),c=()=>s(!0),h=()=>{n(!1),s(!1)};return window.addEventListener("ext-action-toggle",l),window.addEventListener("ext-action-open",u),window.addEventListener("ext-action-close",p),window.addEventListener("ext-action-show",c),window.addEventListener("ext-action-hide",h),()=>{window.removeEventListener("ext-action-open",u),window.removeEventListener("ext-action-close",p),window.removeEventListener("ext-action-toggle",l),window.removeEventListener("ext-action-show",c),window.removeEventListener("ext-action-hide",h)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(Ev,{onClick:i,icon:t}),o&&d.jsx("div",{"data-id":"widget-container",className:"overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl",style:{"--widget-z":1e3},children:d.jsx(Cv,{theme:r,children:e})})]})},Tv=({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}),_v=(e,t)=>{const[r,o]=S.useState(null),[n,a]=S.useState(!1),[s,i]=S.useState(null);return S.useEffect(()=>{if(!e){o(null);return}(async()=>{a(!0),i(null);try{const u=await cl({action:"getCustomer",customerId:e},t);o(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:r,loading:n,error:s}},Pv=({customerId:e,customerEmail:t,hostBase:r,children:o})=>{var l,u;const{customer:n,loading:a,error:s}=_v(e,r);if(a)return d.jsx(Tt,{className:"border-none shadow-none bg-transparent",children:d.jsx(_t,{className:"flex items-center justify-center p-6",children:d.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!n){const p=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=p.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(Tt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(_t,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Uo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(jo,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(p)}&background=7c3aed&color=fff&size=128`,alt:p}),d.jsx(Ro,{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:p})]}),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(Br,{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:o})]})]}),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=n.first_name)==null?void 0:l[0])||""}${((u=n.last_name)==null?void 0:u[0])||""}`;return d.jsx(Tt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(_t,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Uo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(jo,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(n.name)}&background=7c3aed&color=fff&size=128`,alt:n.name}),d.jsx(Ro,{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:n.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(Br,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:n.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:o})]})]})})})},ul=(e,t)=>{S.useEffect(()=>{const r=t.current;if(!r)return;let o=document.getElementById(e);o||(o=document.createElement("div"),o.id=e,o.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(o));const n=new MutationObserver(()=>{for(;o.firstChild;)r.appendChild(document.adoptNode(o.firstChild))});return n.observe(o,{childList:!0,subtree:!0}),()=>{n.disconnect(),o==null||o.remove()}},[e,t])},Av=({customization:e})=>{const t=S.useRef(null);return ul("widget_conversations",t),S.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Iv=({customization:e})=>{const t=S.useRef(null);return ul("widget_messages",t),S.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Go=25,Yo=75,Mv=({header:e,buttons:t,hostBase:r,customerId:o="",customerEmail:n="",primaryPercent:a=50})=>{const s=Math.max(Go,Math.min(Yo,a)),[i,l]=S.useState("account"),[u,p]=S.useState(s),[c,h]=S.useState(!1),[m,b]=S.useState(!1),[g,v]=S.useState(!1),w=S.useRef(null),x=S.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",conversationList:{targetElement:"#widget_conversations"},messageLog:{targetElement:"#widget_messages"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},conversationList:{hideHeader:!0,hideNewConversationButton:!0},messageLog:{hideHeader:!0}}),!0),[]);S.useEffect(()=>{if(x()){b(!0);return}const C=setInterval(()=>{x()&&(b(!0),clearInterval(C))},100),E=setTimeout(()=>{clearInterval(C),console.warn("Zendesk widget failed to load after 10 seconds")},1e4);return()=>{clearInterval(C),clearTimeout(E)}},[x]);const y=S.useCallback(C=>{const{detail:E}=C;!window.zE||!(E!=null&&E.payload)||window.zE("messenger:ui","newConversation",E.payload)},[]);S.useEffect(()=>(window.addEventListener("ext-action-newConversation",y),()=>{window.removeEventListener("ext-action-newConversation",y)}),[y]),S.useEffect(()=>{if(!g)return;const C=N=>{if(!w.current)return;const _=w.current.getBoundingClientRect();if((c?_.width:_.height)===0)return;const M=c?(N.clientX-_.left)/_.width*100:(N.clientY-_.top)/_.height*100,z=Math.max(Go,Math.min(Yo,M));p(z)},E=()=>{v(!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",C),window.addEventListener("mouseup",E),window.addEventListener("blur",E),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",E),window.removeEventListener("blur",E),document.body.style.cursor="",document.body.style.userSelect=""}},[g,c]),S.useEffect(()=>{if(!w.current)return;const C=w.current,E=()=>{const _=getComputedStyle(C).flexDirection==="row";h(_)};E();const N=new ResizeObserver(E);return N.observe(C),()=>{N.disconnect()}},[]);const k=S.useCallback(C=>{if(C.detail===2){p(s);return}C.preventDefault(),v(!0)},[s]),T={customerId:o,customerEmail:n};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:w,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${u}%`},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:i==="account"?"My Account":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex mr-1 gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[t,d.jsx("button",{onClick:()=>l("account"),className:W("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",i==="account"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Account",children:d.jsx(hn,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>l("conversations"),className:W("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",i==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(pn,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:W("flex flex-col gap-2",i==="conversations"&&"hidden"),children:[d.jsx(Pv,{customerId:o,customerEmail:n,hostBase:r,children:d.jsx(Bt,{target:"slot.header",context:T,className:"flex-none"})}),d.jsx(Bt,{target:"slot.content",context:T,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:W("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",i==="account"&&"hidden"),children:d.jsx(Av,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:`${100-u}%`},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:d.jsx(Iv,{})}),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(Bt,{target:"slot.footer",context:T,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Tv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Bt,{target:"slot.footer-links",context:T,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:C,index:E})=>d.jsxs(d.Fragment,{children:[E===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),C]})})]})]}),d.jsx("div",{className:W("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:`${u}%`}:{top:`${u}%`},onMouseDown:k,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Go,"aria-valuemax":Yo,"aria-valuenow":Math.round(u),children:d.jsx("div",{className:W("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",g?"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")})}),g&&d.jsx("div",{className:W("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>v(!1)})]})]})},Ov="ze-snippet",fl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Lv=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:r=!1,scriptId:o=Ov}=t;window.zEMessenger={autorender:r};const n=document.getElementById(o);if(n){if(n.getAttribute("src")===fl(e))return Promise.resolve();n.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=o,i.src=fl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},zv=({snippetKey:e,instanceId:t,hostBase:r,apiBase:o,appId:n,theme:a,customerId:s,customerEmail:i})=>{const l=a==="dark"||a==="light"?a:"inherit";return S.useEffect(()=>{e&&Lv(e).catch(u=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",u)})},[e]),d.jsx(mv,{instanceId:t,hostBase:r,apiBase:o,appId:n,customerId:s,customerEmail:i,children:d.jsx(Nv,{theme:l,children:d.jsx(Mv,{hostBase:r,customerId:s,customerEmail:i,primaryPercent:40})})})};class Dv extends HTMLElement{constructor(){super();Ko(this,"mountNode");Ko(this,"root");const r=this.attachShadow({mode:"open"}),o=document.createElement("style");o.textContent=yl,r.appendChild(o),this.mountNode=document.createElement("div"),r.appendChild(this.mountNode)}static get observedAttributes(){return["instance","host-base","api-base","app-id","theme","customer-id","customer-email","snippet-key"]}connectedCallback(){this.root=ve.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var r;(r=this.root)==null||r.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const r=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",r==="dark"),this.root.render(d.jsx(zv,{hostBase:this.getAttribute("host-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",theme:r,instanceId:this.getAttribute("instance")??"",snippetKey:this.getAttribute("snippet-key")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Dv)}));
|
|
272
|
+
`,document.head.appendChild(e)},hv=e=>{const t=e.some(o=>o.mode==="staging"),r=e.some(o=>o.mode==="dev");return t&&r?"Dev + Staging":t?"Staging Mode":"Dev Mode"},gv=e=>e.mode==="staging"?"STAGING":"DEV",mv=({className:e="",extensions:t=[],tokenErrors:r=new Map})=>{const[o,n]=k.useState([]),[a,s]=k.useState(!1),[i,l]=k.useState(!1),[u,p]=k.useState(!1),c=k.useRef(null),h=r.size>0;if(k.useEffect(()=>{pv()},[]),k.useEffect(()=>{if(!h)return;const b=()=>{p(!0),setTimeout(()=>p(!1),600)};b();const g=setInterval(b,4e3);return()=>clearInterval(g)},[h]),k.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=cn(window.location.search);n(v)};b();const g=()=>b();return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[]),o.length===0)return null;const m=b=>{if(b.stopPropagation(),typeof window>"u")return;const g=new URL(window.location.href);g.searchParams.delete("_stackable_dev"),g.searchParams.delete("_stackable_staging"),window.location.href=g.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:o.map((b,g)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:g<o.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:gv(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]}),r.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",r.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(fv,{className:"w-6 h-6"})}),d.jsx("span",{children:hv(o)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",o.length," extension",o.length>1?"s":"",")"]}),d.jsx("button",{onClick:m,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"})]})]})},vv=800,Mr=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,bv=async(e,t,r,o)=>{const n=new Map,a=new Map;return await Promise.all(e.filter(s=>s.manifest.permissions.includes("data:fetch")).map(async s=>{const i=o.find(h=>h.extensionId===s.id),l=i==null?void 0:i.token,u=i==null?void 0:i.mode,p=Mr(t,"/proxy-token"),c=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,extensionId:s.id,...u&&{mode:u},...l&&{devSessionToken:l}})});if(c.ok){const{token:h,encryptionKey:m}=await c.json();n.set(s.id,{token:h,encryptionKey:m})}else{let h=`Proxy token failed (${c.status})`;u&&!l?h="Session token missing — re-run CLI":u&&(h="Session expired or invalid — re-run CLI"),a.set(s.id,h),console.warn(`[embeddables] Failed to obtain proxy token for extension ${s.id} (${c.status}) — ${h}`)}})),{tokens:n,errors:a}},wv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),yv=({instanceId:e,apiBase:t,hostBase:r,appId:o,children:n,customerId:a,customerEmail:s})=>{const[i,l]=k.useState([]),[u,p]=k.useState([]),[c,h]=k.useState(new Map),[m,b]=k.useState(new Map),[g,v]=k.useState(!1);k.useEffect(()=>{(async()=>{const y=e;try{if(!y){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),l([]),v(!0);return}if(!t||!o){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),l([]),v(!0);return}const S=await fetch(Mr(t,`/instances/${o}/${y}`));if(!S.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${y}`),l([]),v(!0);return}const T=await S.json(),C=cn(typeof window<"u"?window.location.search:""),E=await mc(T,C),{tokens:N,errors:_}=await bv(E,t,o,C);l(E),p(C),h(new Map(N)),b(_)}catch(S){console.error("Failed to load extensions:",S)}finally{v(!0)}})()},[e,o,t]),k.useEffect(()=>{if(!t||!o||i.length===0)return;const y=setInterval(async()=>{const S=[];await Promise.all(i.filter(T=>T.manifest.permissions.includes("data:fetch")).map(async T=>{const C=u.find($=>$.extensionId===T.id),E=C==null?void 0:C.token,N=C==null?void 0:C.mode,_=Mr(t,"/proxy-token"),O=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,extensionId:T.id,...N&&{mode:N},...E&&{devSessionToken:E}})});if(O.ok){const{token:$,encryptionKey:W}=await O.json();S.push([T.id,{token:$,encryptionKey:W}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${T.id} (${O.status}) — using stale token`)})),S.length>0&&h(T=>{const C=new Map(T);for(const[E,N]of S)C.set(E,N);return C})},3300*1e3);return()=>clearInterval(y)},[i,u,t,o]),k.useEffect(()=>{if(c.size===0)return;const x=y=>{const S=y.data;if((S==null?void 0:S.type)!=="extension-ready")return;const T=S.extensionId,C=i.find(_=>_.id===T);if(!(C!=null&&C.bundleUrl))return;const E=u.find(_=>_.extensionId===T);if(pc(C.bundleUrl)&&(E==null?void 0:E.mode)!=="staging")return;const N=c.get(T);N&&Ht(T,{type:"extension-encryption-key",encryptionKey:N.encryptionKey})};return window.addEventListener("message",x),()=>window.removeEventListener("message",x)},[i,u,c]);const w=k.useMemo(()=>({"data.query":async x=>pl(x,r),"data.fetch":async(x,y)=>{const S=c.get(x);if(!S)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const T=wv(y)?y:{url:y.url,method:y.method??"GET",headers:y.headers??{},body:y.body??null},C=Mr(t,"/proxy"),E=await fetch(C,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":x,"X-Application-Id":o??"",Authorization:`Bearer ${S.token}`},body:JSON.stringify(T)}),N=await E.json();return{status:N.status??E.status,ok:N.ok??E.ok,data:N.data}},"actions.toast":async(x,y)=>{const S={...y.description&&{description:y.description},...y.duration&&{duration:y.duration},...y.position&&{position:y.position},...y.dismissible!=null&&{dismissible:y.dismissible},...y.closeButton!=null&&{closeButton:y.closeButton}};if(y.fetch){const T=E=>new Promise(N=>setTimeout(N,E)),C=Promise.all([w["data.fetch"](x,y.fetch),T(vv)]).then(([E])=>E);ft.promise(C,{loading:y.loading??y.message,success:y.success??y.message,error:y.error??"Something went wrong",...S});return}switch(y.type){case"success":{ft.success(y.message,S);break}case"error":{ft.error(y.message,S);break}case"warning":{ft.warning(y.message,S);break}case"info":{ft.info(y.message,S);break}default:ft(y.message,S)}},"actions.invoke":async x=>(window.dispatchEvent(new CustomEvent(`ext-action-${x.action}`,{detail:x})),{success:!0}),"context.read":async()=>({customerId:a??"",customerEmail:s??""})}),[t,o,r,a,s,c]);return g?d.jsxs(d.Fragment,{children:[d.jsx(Ll,{extensions:i,capabilityHandlers:w,components:uv(),children:n}),d.jsx(mv,{extensions:i,tokenErrors:m})]}):null};var xv=(e,t,r,o,n,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function p(m){(Array.isArray(e)?e:[e]).forEach(b=>{let g=b==="class",v=g&&a?n.map(w=>a[w]||w):n;g?(l.classList.remove(...v),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(b,m)}),c(m)}function c(m){i&&u.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)p(o);else try{let m=localStorage.getItem(t)||r,b=s&&m==="system"?h():m;p(b)}catch{}},kv=f.createContext(void 0),Sv={setTheme:e=>{},themes:[]},Cv=()=>{var e;return(e=f.useContext(kv))!=null?e:Sv};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:o,enableColorScheme:n,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let p=JSON.stringify([r,t,a,e,i,s,o,n]).slice(1,-1);return f.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${xv.toString()})(${p})`}})});const Ev=({...e})=>{const{theme:t="system"}=Cv();return d.jsx(fc,{theme:t,className:"toaster group",icons:{success:d.jsx(gn,{className:"size-4"}),info:d.jsx(Ut,{className:"size-4"}),warning:d.jsx(Wc,{className:"size-4"}),error:d.jsx(Dc,{className:"size-4"}),loading:d.jsx(Hr,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Nv={dark:"dark",light:"widget-theme-light"},Tv={dark:"dark",light:"light"},_v=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:Nv[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(Ev,{position:"bottom-center",theme:Tv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Pv=({onClick:e,icon:t=kc})=>d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(il,{className:"h-12 w-12 rounded-full",size:"icon",onClick:e,children:d.jsx(t,{className:"h-6 w-6"})})}),Av=({children:e,icon:t,theme:r})=>{const[o,n]=k.useState(!1),[a,s]=k.useState(!0),i=k.useCallback(()=>{n(l=>!l)},[]);return k.useEffect(()=>{const l=()=>n(m=>!m),u=()=>n(!0),p=()=>n(!1),c=()=>s(!0),h=()=>{n(!1),s(!1)};return window.addEventListener("ext-action-toggle",l),window.addEventListener("ext-action-open",u),window.addEventListener("ext-action-close",p),window.addEventListener("ext-action-show",c),window.addEventListener("ext-action-hide",h),()=>{window.removeEventListener("ext-action-open",u),window.removeEventListener("ext-action-close",p),window.removeEventListener("ext-action-toggle",l),window.removeEventListener("ext-action-show",c),window.removeEventListener("ext-action-hide",h)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(Pv,{onClick:i,icon:t}),o&&d.jsx("div",{"data-id":"widget-container",className:"overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl",style:{"--widget-z":1e3},children:d.jsx(_v,{theme:r,children:e})})]})},Iv=({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}),Mv=(e,t)=>{const[r,o]=k.useState(null),[n,a]=k.useState(!1),[s,i]=k.useState(null);return k.useEffect(()=>{if(!e){o(null);return}(async()=>{a(!0),i(null);try{const u=await pl({action:"getCustomer",customerId:e},t);o(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:r,loading:n,error:s}},Ov=({customerId:e,customerEmail:t,hostBase:r,children:o})=>{var l,u;const{customer:n,loading:a,error:s}=Mv(e,r);if(a)return d.jsx(Pt,{className:"border-none shadow-none bg-transparent",children:d.jsx(At,{className:"flex items-center justify-center p-6",children:d.jsx(Hr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!n){const p=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=p.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(Pt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(At,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Ro,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Go,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(p)}&background=7c3aed&color=fff&size=128`,alt:p}),d.jsx(Yo,{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:p})]}),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(Vr,{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:o})]})]}),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=n.first_name)==null?void 0:l[0])||""}${((u=n.last_name)==null?void 0:u[0])||""}`;return d.jsx(Pt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(At,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Ro,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Go,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(n.name)}&background=7c3aed&color=fff&size=128`,alt:n.name}),d.jsx(Yo,{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:n.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(Vr,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:n.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:o})]})]})})})},gl=(e,t)=>{k.useEffect(()=>{const r=t.current;if(!r)return;let o=document.getElementById(e);o||(o=document.createElement("div"),o.id=e,o.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(o));const n=new MutationObserver(()=>{for(;o.firstChild;)r.appendChild(document.adoptNode(o.firstChild))});return n.observe(o,{childList:!0,subtree:!0}),()=>{n.disconnect(),o==null||o.remove()}},[e,t])},Lv=({customization:e})=>{const t=k.useRef(null);return gl("widget_conversations",t),k.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},zv=({customization:e})=>{const t=k.useRef(null);return gl("widget_messages",t),k.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},qo=25,Xo=75,Dv=({header:e,buttons:t,hostBase:r,customerId:o="",customerEmail:n="",primaryPercent:a=50})=>{const s=Math.max(qo,Math.min(Xo,a)),[i,l]=k.useState("account"),[u,p]=k.useState(s),[c,h]=k.useState(!1),[m,b]=k.useState(!1),[g,v]=k.useState(!1),w=k.useRef(null),x=k.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",conversationList:{targetElement:"#widget_conversations"},messageLog:{targetElement:"#widget_messages"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},conversationList:{hideHeader:!0,hideNewConversationButton:!0},messageLog:{hideHeader:!0}}),!0),[]);k.useEffect(()=>{if(x()){b(!0);return}const C=setInterval(()=>{x()&&(b(!0),clearInterval(C))},100),E=setTimeout(()=>{clearInterval(C),console.warn("Zendesk widget failed to load after 10 seconds")},1e4);return()=>{clearInterval(C),clearTimeout(E)}},[x]);const y=k.useCallback(C=>{const{detail:E}=C;!window.zE||!(E!=null&&E.payload)||window.zE("messenger:ui","newConversation",E.payload)},[]);k.useEffect(()=>(window.addEventListener("ext-action-newConversation",y),()=>{window.removeEventListener("ext-action-newConversation",y)}),[y]),k.useEffect(()=>{if(!g)return;const C=N=>{if(!w.current)return;const _=w.current.getBoundingClientRect();if((c?_.width:_.height)===0)return;const $=c?(N.clientX-_.left)/_.width*100:(N.clientY-_.top)/_.height*100,W=Math.max(qo,Math.min(Xo,$));p(W)},E=()=>{v(!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",C),window.addEventListener("mouseup",E),window.addEventListener("blur",E),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",E),window.removeEventListener("blur",E),document.body.style.cursor="",document.body.style.userSelect=""}},[g,c]),k.useEffect(()=>{if(!w.current)return;const C=w.current,E=()=>{const _=getComputedStyle(C).flexDirection==="row";h(_)};E();const N=new ResizeObserver(E);return N.observe(C),()=>{N.disconnect()}},[]);const S=k.useCallback(C=>{if(C.detail===2){p(s);return}C.preventDefault(),v(!0)},[s]),T={customerId:o,customerEmail:n};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:w,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${u}%`},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:i==="account"?"My Account":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex mr-1 gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[t,d.jsx("button",{onClick:()=>l("account"),className:B("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",i==="account"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Account",children:d.jsx(vn,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>l("conversations"),className:B("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",i==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(mn,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:B("flex flex-col gap-2",i==="conversations"&&"hidden"),children:[d.jsx(Ov,{customerId:o,customerEmail:n,hostBase:r,children:d.jsx(Vt,{target:"slot.header",context:T,className:"flex-none"})}),d.jsx(Vt,{target:"slot.content",context:T,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:B("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",i==="account"&&"hidden"),children:d.jsx(Lv,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:`${100-u}%`},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:d.jsx(zv,{})}),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(Vt,{target:"slot.footer",context:T,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Iv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Vt,{target:"slot.footer-links",context:T,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:C,index:E})=>d.jsxs(d.Fragment,{children:[E===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),C]})})]})]}),d.jsx("div",{className:B("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:`${u}%`}:{top:`${u}%`},onMouseDown:S,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":qo,"aria-valuemax":Xo,"aria-valuenow":Math.round(u),children:d.jsx("div",{className:B("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",g?"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")})}),g&&d.jsx("div",{className:B("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>v(!1)})]})]})},$v="ze-snippet",ml=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Fv=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:r=!1,scriptId:o=$v}=t;window.zEMessenger={autorender:r};const n=document.getElementById(o);if(n){if(n.getAttribute("src")===ml(e))return Promise.resolve();n.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=o,i.src=ml(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Bv=({snippetKey:e,instanceId:t,hostBase:r,apiBase:o,appId:n,theme:a,customerId:s,customerEmail:i})=>{const l=a==="dark"||a==="light"?a:"inherit";return k.useEffect(()=>{e&&Fv(e).catch(u=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",u)})},[e]),d.jsx(yv,{instanceId:t,hostBase:r,apiBase:o,appId:n,customerId:s,customerEmail:i,children:d.jsx(Av,{theme:l,children:d.jsx(Dv,{hostBase:r,customerId:s,customerEmail:i,primaryPercent:40})})})};class Hv extends HTMLElement{constructor(){super();Jo(this,"mountNode");Jo(this,"root");const r=this.attachShadow({mode:"open"}),o=document.createElement("style");o.textContent=Cl,r.appendChild(o),this.mountNode=document.createElement("div"),r.appendChild(this.mountNode)}static get observedAttributes(){return["instance","host-base","api-base","app-id","theme","customer-id","customer-email","snippet-key"]}connectedCallback(){this.root=ve.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var r;(r=this.root)==null||r.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const r=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",r==="dark"),this.root.render(d.jsx(Bv,{hostBase:this.getAttribute("host-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",theme:r,instanceId:this.getAttribute("instance")??"",snippetKey:this.getAttribute("snippet-key")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Hv)}));
|