From 644f87df5705e467296baec5fd570a2fa8f3bd95 Mon Sep 17 00:00:00 2001 From: Chris Mullins Date: Sat, 19 Oct 2024 20:54:21 -0700 Subject: [PATCH] Night/Light mode --- web2/components/ui/main-nav.tsx | 30 ++- web2/dist/versions/1.0.2/bundle.css | 1 + web2/dist/versions/1.0.2/bundle.js | 327 ++++++++++++++++++++++++++++ web2/dist/versions/1.0.2/index.html | 133 +++++++++++ web2/inline.js | 2 +- web2/lib/settings.tsx | 30 ++- web2/package-lock.json | 4 +- web2/package.json | 2 +- web2/src/index.tsx | 3 - 9 files changed, 515 insertions(+), 17 deletions(-) create mode 100644 web2/dist/versions/1.0.2/bundle.css create mode 100644 web2/dist/versions/1.0.2/bundle.js create mode 100644 web2/dist/versions/1.0.2/index.html diff --git a/web2/components/ui/main-nav.tsx b/web2/components/ui/main-nav.tsx index 57f81514..cb401ac4 100644 --- a/web2/components/ui/main-nav.tsx +++ b/web2/components/ui/main-nav.tsx @@ -1,9 +1,22 @@ import * as React from "react"; import { cn } from "@/lib/utils"; import { NavLink, Link } from "@/components/ui/link"; -import { Settings } from "lucide-react"; +import { Settings, Sun, Moon } from "lucide-react"; import { useSettings } from "@/lib/settings"; +function ThemeSwitcher() { + const { theme, toggleTheme } = useSettings(); + + return ( + + ); +} + export function MainNav({ className, ...props @@ -31,12 +44,15 @@ export function MainNav({ Sniffer - - - +
+ + + + +
); diff --git a/web2/dist/versions/1.0.2/bundle.css b/web2/dist/versions/1.0.2/bundle.css new file mode 100644 index 00000000..b048f4bd --- /dev/null +++ b/web2/dist/versions/1.0.2/bundle.css @@ -0,0 +1 @@ +:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-2{top:.5rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[calc\(100vh-2rem\)\]{height:calc(100vh - 2rem)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-screen{max-height:100vh}.\!min-h-9{min-height:2.25rem!important}.min-h-10{min-height:2.5rem}.min-h-96{min-height:24rem}.w-1\/2{width:50%}.w-1\/5{width:20%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/5{width:60%}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-96{width:24rem}.w-\[150px\]{width:150px}.w-\[160px\]{width:160px}.w-\[180px\]{width:180px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-96{min-width:24rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-72{max-width:18rem}.max-w-96{max-width:24rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.\!cursor-default{cursor:default!important}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.\!select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[3fr_3fr_3fr_1fr\]{grid-template-columns:3fr 3fr 3fr 1fr}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-10{padding-top:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-6xl{font-size:3.75rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.underline-offset-4{text-underline-offset:4px}.underline-offset-8{text-underline-offset:8px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-ring{--tw-ring-color: hsl(var(--ring))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{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,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:border-none:hover{border-style:none}.hover\:border-slate-400:hover{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:bg-accent\/90:active{background-color:hsl(var(--accent) / .9)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=on\]\:bg-accent[data-state=on],.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true],.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.dark\:hover\:border-slate-500:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity))}.dark\:hover\:text-slate-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.dark\:hover\:text-slate-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}}@media (min-width: 1024px){.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}}@media (min-width: 1280px){.xl\:w-1\/5{width:20%}}.dark\:\[\&\:not\(\:has\(svg\)\)\]\:text-red-500:not(:has(svg)):is(.dark *){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\:\[\&\>\*\]\:text-red-500>*:is(.dark *){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.dark\:\[\&\>svg\]\:text-red-500>svg:is(.dark *){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625} diff --git a/web2/dist/versions/1.0.2/bundle.js b/web2/dist/versions/1.0.2/bundle.js new file mode 100644 index 00000000..5bb94325 --- /dev/null +++ b/web2/dist/versions/1.0.2/bundle.js @@ -0,0 +1,327 @@ +"use strict";(()=>{var oN=Object.create;var Q7=Object.defineProperty;var nN=Object.getOwnPropertyDescriptor;var aN=Object.getOwnPropertyNames;var iN=Object.getPrototypeOf,sN=Object.prototype.hasOwnProperty;var Mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lN=(e,t)=>{for(var r in t)Q7(e,r,{get:t[r],enumerable:!0})},uN=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aN(t))!sN.call(e,n)&&n!==r&&Q7(e,n,{get:()=>t[n],enumerable:!(o=nN(t,n))||o.enumerable});return e};var N=(e,t,r)=>(r=e!=null?oN(iN(e)):{},uN(t||!e||!e.__esModule?Q7(r,"default",{value:e,enumerable:!0}):r,e));var GC=Mt(Qe=>{"use strict";var xc=Symbol.for("react.element"),cN=Symbol.for("react.portal"),dN=Symbol.for("react.fragment"),fN=Symbol.for("react.strict_mode"),pN=Symbol.for("react.profiler"),mN=Symbol.for("react.provider"),hN=Symbol.for("react.context"),gN=Symbol.for("react.forward_ref"),vN=Symbol.for("react.suspense"),CN=Symbol.for("react.memo"),wN=Symbol.for("react.lazy"),PC=Symbol.iterator;function xN(e){return e===null||typeof e!="object"?null:(e=PC&&e[PC]||e["@@iterator"],typeof e=="function"?e:null)}var OC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HC=Object.assign,VC={};function xl(e,t,r){this.props=e,this.context=t,this.refs=VC,this.updater=r||OC}xl.prototype.isReactComponent={};xl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FC(){}FC.prototype=xl.prototype;function e4(e,t,r){this.props=e,this.context=t,this.refs=VC,this.updater=r||OC}var t4=e4.prototype=new FC;t4.constructor=e4;HC(t4,xl.prototype);t4.isPureReactComponent=!0;var kC=Array.isArray,DC=Object.prototype.hasOwnProperty,r4={current:null},BC={key:!0,ref:!0,__self:!0,__source:!0};function NC(e,t,r){var o,n={},a=null,s=null;if(t!=null)for(o in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)DC.call(t,o)&&!BC.hasOwnProperty(o)&&(n[o]=t[o]);var u=arguments.length-2;if(u===1)n.children=r;else if(1{"use strict";WC.exports=GC()});var KC=Mt(Dt=>{"use strict";function s4(e,t){var r=e.length;e.push(t);e:for(;0>>1,n=e[o];if(0>>1;oT2(u,r))cT2(d,u)?(e[o]=d,e[c]=r,o=c):(e[o]=u,e[s]=r,o=s);else if(cT2(d,r))e[o]=d,e[c]=r,o=c;else break e}}return t}function T2(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(zC=performance,Dt.unstable_now=function(){return zC.now()}):(n4=Date,jC=n4.now(),Dt.unstable_now=function(){return n4.now()-jC});var zC,n4,jC,Ma=[],Gi=[],SN=1,Rn=null,Yr=3,E2=!1,K1=!1,bc=!1,XC=typeof setTimeout=="function"?setTimeout:null,qC=typeof clearTimeout=="function"?clearTimeout:null,UC=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function l4(e){for(var t=Qn(Gi);t!==null;){if(t.callback===null)k2(Gi);else if(t.startTime<=e)k2(Gi),t.sortIndex=t.expirationTime,s4(Ma,t);else break;t=Qn(Gi)}}function u4(e){if(bc=!1,l4(e),!K1)if(Qn(Ma)!==null)K1=!0,d4(c4);else{var t=Qn(Gi);t!==null&&f4(u4,t.startTime-e)}}function c4(e,t){K1=!1,bc&&(bc=!1,qC(Lc),Lc=-1),E2=!0;var r=Yr;try{for(l4(t),Rn=Qn(Ma);Rn!==null&&(!(Rn.expirationTime>t)||e&&!QC());){var o=Rn.callback;if(typeof o=="function"){Rn.callback=null,Yr=Rn.priorityLevel;var n=o(Rn.expirationTime<=t);t=Dt.unstable_now(),typeof n=="function"?Rn.callback=n:Rn===Qn(Ma)&&k2(Ma),l4(t)}else k2(Ma);Rn=Qn(Ma)}if(Rn!==null)var a=!0;else{var s=Qn(Gi);s!==null&&f4(u4,s.startTime-t),a=!1}return a}finally{Rn=null,Yr=r,E2=!1}}var O2=!1,P2=null,Lc=-1,YC=5,JC=-1;function QC(){return!(Dt.unstable_now()-JCe||125o?(e.sortIndex=r,s4(Gi,e),Qn(Ma)===null&&e===Qn(Gi)&&(bc?(qC(Lc),Lc=-1):bc=!0,f4(u4,r-o))):(e.sortIndex=n,s4(Ma,e),K1||E2||(K1=!0,d4(c4))),e};Dt.unstable_shouldYield=QC;Dt.unstable_wrapCallback=function(e){var t=Yr;return function(){var r=Yr;Yr=t;try{return e.apply(this,arguments)}finally{Yr=r}}}});var tw=Mt((wee,ew)=>{"use strict";ew.exports=KC()});var ab=Mt(sn=>{"use strict";var RN=U(),nn=tw();function te(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),H4=Object.prototype.hasOwnProperty,_N=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rw={},ow={};function MN(e){return H4.call(ow,e)?!0:H4.call(rw,e)?!1:_N.test(e)?ow[e]=!0:(rw[e]=!0,!1)}function AN(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function TN(e,t,r,o){if(t===null||typeof t>"u"||AN(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function po(e,t,r,o,n,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var zr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zr[e]=new po(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];zr[t]=new po(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zr[e]=new po(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zr[e]=new po(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){zr[e]=new po(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zr[e]=new po(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zr[e]=new po(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zr[e]=new po(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zr[e]=new po(e,5,!1,e.toLowerCase(),null,!1,!1)});var _8=/[\-:]([a-z])/g;function M8(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_8,M8);zr[t]=new po(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_8,M8);zr[t]=new po(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_8,M8);zr[t]=new po(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zr[e]=new po(e,1,!1,e.toLowerCase(),null,!1,!1)});zr.xlinkHref=new po("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zr[e]=new po(e,1,!1,e.toLowerCase(),null,!0,!0)});function A8(e,t,r,o){var n=zr.hasOwnProperty(t)?zr[t]:null;(n!==null?n.type!==0:o||!(2u||n[s]!==a[u]){var c=` +`+n[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=u);break}}}finally{m4=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?kc(e):""}function PN(e){switch(e.tag){case 5:return kc(e.type);case 16:return kc("Lazy");case 13:return kc("Suspense");case 19:return kc("SuspenseList");case 0:case 2:case 15:return e=h4(e.type,!1),e;case 11:return e=h4(e.type.render,!1),e;case 1:return e=h4(e.type,!0),e;default:return""}}function B4(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Il:return"Fragment";case Ll:return"Portal";case V4:return"Profiler";case T8:return"StrictMode";case F4:return"Suspense";case D4:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cx:return(e.displayName||"Context")+".Consumer";case ux:return(e._context.displayName||"Context")+".Provider";case P8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case k8:return t=e.displayName||null,t!==null?t:B4(e.type)||"Memo";case zi:t=e._payload,e=e._init;try{return B4(e(t))}catch{}}return null}function kN(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B4(t);case 8:return t===T8?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function n1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EN(e){var t=fx(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(s){o=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(s){o=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function V2(e){e._valueTracker||(e._valueTracker=EN(e))}function px(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=fx(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function df(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function N4(e,t){var r=t.checked;return tr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function aw(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=n1(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mx(e,t){t=t.checked,t!=null&&A8(e,"checked",t,!1)}function Z4(e,t){mx(e,t);var r=n1(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?G4(e,t.type,r):t.hasOwnProperty("defaultValue")&&G4(e,t.type,n1(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function iw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function G4(e,t,r){(t!=="number"||df(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ec=Array.isArray;function Hl(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n"+t.valueOf().toString()+"",t=F2.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uc(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Vc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ON=["Webkit","ms","Moz","O"];Object.keys(Vc).forEach(function(e){ON.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vc[t]=Vc[e]})});function Cx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Vc.hasOwnProperty(e)&&Vc[e]?(""+t).trim():t+"px"}function wx(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=Cx(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var HN=tr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function j4(e,t){if(t){if(HN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(te(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(te(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(te(61))}if(t.style!=null&&typeof t.style!="object")throw Error(te(62))}}function U4(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $4=null;function E8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var X4=null,Vl=null,Fl=null;function uw(e){if(e=cd(e)){if(typeof X4!="function")throw Error(te(280));var t=e.stateNode;t&&(t=Bf(t),X4(e.stateNode,e.type,t))}}function xx(e){Vl?Fl?Fl.push(e):Fl=[e]:Vl=e}function yx(){if(Vl){var e=Vl,t=Fl;if(Fl=Vl=null,uw(e),t)for(e=0;e>>=0,e===0?32:31-(UN(e)/$N|0)|0}var D2=64,B2=4194304;function Oc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hf(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,a=e.pingedLanes,s=r&268435455;if(s!==0){var u=s&~n;u!==0?o=Oc(u):(a&=s,a!==0&&(o=Oc(a)))}else s=r&~n,s!==0?o=Oc(s):a!==0&&(o=Oc(a));if(o===0)return 0;if(t!==0&&t!==o&&!(t&n)&&(n=o&-o,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(o&4&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0r;r++)t.push(e);return t}function ld(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-oa(t),e[t]=r}function JN(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=Dc),Cw=" ",ww=!1;function Zx(e,t){switch(e){case"keyup":return SZ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sl=!1;function _Z(e,t){switch(e){case"compositionend":return Gx(t);case"keypress":return t.which!==32?null:(ww=!0,Cw);case"textInput":return e=t.data,e===Cw&&ww?null:e;default:return null}}function MZ(e,t){if(Sl)return e==="compositionend"||!Z8&&Zx(e,t)?(e=Bx(),tf=D8=Xi=null,Sl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bw(r)}}function Ux(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ux(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $x(){for(var e=window,t=df();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=df(e.document)}return t}function G8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function FZ(e){var t=$x(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Ux(r.ownerDocument.documentElement,r)){if(o!==null&&G8(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,a=Math.min(o.start,n);o=o.end===void 0?a:Math.min(o.end,n),!e.extend&&a>o&&(n=o,o=a,a=n),n=Lw(r,a);var s=Lw(r,o);n&&s&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),a>o?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Rl=null,e8=null,Nc=null,t8=!1;function Iw(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;t8||Rl==null||Rl!==df(o)||(o=Rl,"selectionStart"in o&&G8(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Nc&&Qc(Nc,o)||(Nc=o,o=Cf(e8,"onSelect"),0Al||(e.current=s8[Al],s8[Al]=null,Al--)}function Bt(e,t){Al++,s8[Al]=e.current,e.current=t}var a1={},eo=s1(a1),ko=s1(!1),ss=a1;function Gl(e,t){var r=e.type.contextTypes;if(!r)return a1;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in r)n[a]=t[a];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Eo(e){return e=e.childContextTypes,e!=null}function xf(){jt(ko),jt(eo)}function Ew(e,t,r){if(eo.current!==a1)throw Error(te(168));Bt(eo,t),Bt(ko,r)}function ry(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error(te(108,kN(e)||"Unknown",n));return tr({},r,o)}function yf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||a1,ss=eo.current,Bt(eo,e),Bt(ko,ko.current),!0}function Ow(e,t,r){var o=e.stateNode;if(!o)throw Error(te(169));r?(e=ry(e,t,ss),o.__reactInternalMemoizedMergedChildContext=e,jt(ko),jt(eo),Bt(eo,e)):jt(ko),Bt(ko,r)}var ii=null,Nf=!1,R4=!1;function oy(e){ii===null?ii=[e]:ii.push(e)}function $Z(e){Nf=!0,oy(e)}function l1(){if(!R4&&ii!==null){R4=!0;var e=0,t=It;try{var r=ii;for(It=1;e>=s,n-=s,si=1<<32-oa(t)+n|r<H?(J=A,A=null):J=A.sibling;var Z=g(w,A,I[H],_);if(Z===null){A===null&&(A=J);break}e&&A&&Z.alternate===null&&t(w,A),C=a(Z,C,H),T===null?M=Z:T.sibling=Z,T=Z,A=J}if(H===I.length)return r(w,A),qt&&es(w,H),M;if(A===null){for(;HH?(J=A,A=null):J=A.sibling;var Q=g(w,A,Z.value,_);if(Q===null){A===null&&(A=J);break}e&&A&&Q.alternate===null&&t(w,A),C=a(Q,C,H),T===null?M=Q:T.sibling=Q,T=Q,A=J}if(Z.done)return r(w,A),qt&&es(w,H),M;if(A===null){for(;!Z.done;H++,Z=I.next())Z=m(w,Z.value,_),Z!==null&&(C=a(Z,C,H),T===null?M=Z:T.sibling=Z,T=Z);return qt&&es(w,H),M}for(A=o(w,A);!Z.done;H++,Z=I.next())Z=y(A,w,H,Z.value,_),Z!==null&&(e&&Z.alternate!==null&&A.delete(Z.key===null?H:Z.key),C=a(Z,C,H),T===null?M=Z:T.sibling=Z,T=Z);return e&&A.forEach(function(W){return t(w,W)}),qt&&es(w,H),M}function b(w,C,I,_){if(typeof I=="object"&&I!==null&&I.type===Il&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case H2:e:{for(var M=I.key,T=C;T!==null;){if(T.key===M){if(M=I.type,M===Il){if(T.tag===7){r(w,T.sibling),C=n(T,I.props.children),C.return=w,w=C;break e}}else if(T.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===zi&&Fw(M)===T.type){r(w,T.sibling),C=n(T,I.props),C.ref=Mc(w,T,I),C.return=w,w=C;break e}r(w,T);break}else t(w,T);T=T.sibling}I.type===Il?(C=is(I.props.children,w.mode,_,I.key),C.return=w,w=C):(_=cf(I.type,I.key,I.props,null,w.mode,_),_.ref=Mc(w,C,I),_.return=w,w=_)}return s(w);case Ll:e:{for(T=I.key;C!==null;){if(C.key===T)if(C.tag===4&&C.stateNode.containerInfo===I.containerInfo&&C.stateNode.implementation===I.implementation){r(w,C.sibling),C=n(C,I.children||[]),C.return=w,w=C;break e}else{r(w,C);break}else t(w,C);C=C.sibling}C=O4(I,w.mode,_),C.return=w,w=C}return s(w);case zi:return T=I._init,b(w,C,T(I._payload),_)}if(Ec(I))return x(w,C,I,_);if(Ic(I))return v(w,C,I,_);Y2(w,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,C!==null&&C.tag===6?(r(w,C.sibling),C=n(C,I),C.return=w,w=C):(r(w,C),C=E4(I,w.mode,_),C.return=w,w=C),s(w)):r(w,C)}return b}var zl=sy(!0),ly=sy(!1),If=s1(null),Sf=null,kl=null,U8=null;function $8(){U8=kl=Sf=null}function X8(e){var t=If.current;jt(If),e._currentValue=t}function c8(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function Bl(e,t){Sf=e,U8=kl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Po=!0),e.firstContext=null)}function Pn(e){var t=e._currentValue;if(U8!==e)if(e={context:e,memoizedValue:t,next:null},kl===null){if(Sf===null)throw Error(te(308));kl=e,Sf.dependencies={lanes:0,firstContext:e}}else kl=kl.next=e;return t}var os=null;function q8(e){os===null?os=[e]:os.push(e)}function uy(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,q8(t)):(r.next=n.next,n.next=r),t.interleaved=r,fi(e,o)}function fi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ji=!1;function Y8(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cy(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function e1(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,ct&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,fi(e,r)}return n=o.interleaved,n===null?(t.next=t,q8(o)):(t.next=n.next,n.next=t),o.interleaved=t,fi(e,r)}function of(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,H8(e,r)}}function Dw(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?n=a=s:a=a.next=s,r=r.next}while(r!==null);a===null?n=a=t:a=a.next=t}else n=a=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Rf(e,t,r,o){var n=e.updateQueue;ji=!1;var a=n.firstBaseUpdate,s=n.lastBaseUpdate,u=n.shared.pending;if(u!==null){n.shared.pending=null;var c=u,d=c.next;c.next=null,s===null?a=d:s.next=d,s=c;var p=e.alternate;p!==null&&(p=p.updateQueue,u=p.lastBaseUpdate,u!==s&&(u===null?p.firstBaseUpdate=d:u.next=d,p.lastBaseUpdate=c))}if(a!==null){var m=n.baseState;s=0,p=d=c=null,u=a;do{var g=u.lane,y=u.eventTime;if((o&g)===g){p!==null&&(p=p.next={eventTime:y,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var x=e,v=u;switch(g=t,y=r,v.tag){case 1:if(x=v.payload,typeof x=="function"){m=x.call(y,m,g);break e}m=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,g=typeof x=="function"?x.call(y,m,g):x,g==null)break e;m=tr({},m,g);break e;case 2:ji=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,g=n.effects,g===null?n.effects=[u]:g.push(u))}else y={eventTime:y,lane:g,tag:u.tag,payload:u.payload,callback:u.callback,next:null},p===null?(d=p=y,c=m):p=p.next=y,s|=g;if(u=u.next,u===null){if(u=n.shared.pending,u===null)break;g=u,u=g.next,g.next=null,n.lastBaseUpdate=g,n.shared.pending=null}}while(!0);if(p===null&&(c=m),n.baseState=c,n.firstBaseUpdate=d,n.lastBaseUpdate=p,t=n.shared.interleaved,t!==null){n=t;do s|=n.lane,n=n.next;while(n!==t)}else a===null&&(n.shared.lanes=0);cs|=s,e.lanes=s,e.memoizedState=m}}function Bw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var o=M4.transition;M4.transition={};try{e(!1),t()}finally{It=r,M4.transition=o}}function _y(){return kn().memoizedState}function JZ(e,t,r){var o=r1(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},My(e))Ay(t,r);else if(r=uy(e,t,r,o),r!==null){var n=fo();na(r,e,o,n),Ty(r,t,o)}}function QZ(e,t,r){var o=r1(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(My(e))Ay(t,n);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,u=a(s,r);if(n.hasEagerState=!0,n.eagerState=u,aa(u,s)){var c=t.interleaved;c===null?(n.next=n,q8(t)):(n.next=c.next,c.next=n),t.interleaved=n;return}}catch{}finally{}r=uy(e,t,n,o),r!==null&&(n=fo(),na(r,e,o,n),Ty(r,t,o))}}function My(e){var t=e.alternate;return e===er||t!==null&&t===er}function Ay(e,t){Zc=Mf=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ty(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,H8(e,r)}}var Af={readContext:Pn,useCallback:Jr,useContext:Jr,useEffect:Jr,useImperativeHandle:Jr,useInsertionEffect:Jr,useLayoutEffect:Jr,useMemo:Jr,useReducer:Jr,useRef:Jr,useState:Jr,useDebugValue:Jr,useDeferredValue:Jr,useTransition:Jr,useMutableSource:Jr,useSyncExternalStore:Jr,useId:Jr,unstable_isNewReconciler:!1},KZ={readContext:Pn,useCallback:function(e,t){return Ta().memoizedState=[e,t===void 0?null:t],e},useContext:Pn,useEffect:Zw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,af(4194308,4,by.bind(null,t,e),r)},useLayoutEffect:function(e,t){return af(4194308,4,e,t)},useInsertionEffect:function(e,t){return af(4,2,e,t)},useMemo:function(e,t){var r=Ta();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=Ta();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=JZ.bind(null,er,e),[o.memoizedState,e]},useRef:function(e){var t=Ta();return e={current:e},t.memoizedState=e},useState:Nw,useDebugValue:np,useDeferredValue:function(e){return Ta().memoizedState=e},useTransition:function(){var e=Nw(!1),t=e[0];return e=YZ.bind(null,e[1]),Ta().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=er,n=Ta();if(qt){if(r===void 0)throw Error(te(407));r=r()}else{if(r=t(),Or===null)throw Error(te(349));us&30||my(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,Zw(gy.bind(null,o,a,e),[e]),o.flags|=2048,id(9,hy.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=Ta(),t=Or.identifierPrefix;if(qt){var r=li,o=si;r=(o&~(1<<32-oa(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=nd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=s.createElement(r,{is:o.is}):(e=s.createElement(r),r==="select"&&(s=e,o.multiple?s.multiple=!0:o.size&&(s.size=o.size))):e=s.createElementNS(e,r),e[Pa]=t,e[td]=o,Ny(e,t,!1,!1),t.stateNode=e;e:{switch(s=U4(r,o),r){case"dialog":zt("cancel",e),zt("close",e),n=o;break;case"iframe":case"object":case"embed":zt("load",e),n=o;break;case"video":case"audio":for(n=0;n$l&&(t.flags|=128,o=!0,Ac(a,!1),t.lanes=4194304)}else{if(!o)if(e=_f(s),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ac(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!qt)return Qr(t),null}else 2*pr()-a.renderingStartTime>$l&&r!==1073741824&&(t.flags|=128,o=!0,Ac(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(r=a.last,r!==null?r.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=pr(),t.sibling=null,r=Kt.current,Bt(Kt,o?r&1|2:r&1),t):(Qr(t),null);case 22:case 23:return cp(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?tn&1073741824&&(Qr(t),t.subtreeFlags&6&&(t.flags|=8192)):Qr(t),null;case 24:return null;case 25:return null}throw Error(te(156,t.tag))}function sG(e,t){switch(z8(t),t.tag){case 1:return Eo(t.type)&&xf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jl(),jt(ko),jt(eo),K8(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Q8(t),null;case 13:if(jt(Kt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(te(340));Wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jt(Kt),null;case 4:return jl(),null;case 10:return X8(t.type._context),null;case 22:case 23:return cp(),null;case 24:return null;default:return null}}var Q2=!1,Kr=!1,lG=typeof WeakSet=="function"?WeakSet:Set,ve=null;function El(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){sr(e,t,o)}else r.current=null}function w8(e,t,r){try{r()}catch(o){sr(e,t,o)}}var Qw=!1;function uG(e,t){if(r8=gf,e=$x(),G8(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var s=0,u=-1,c=-1,d=0,p=0,m=e,g=null;t:for(;;){for(var y;m!==r||n!==0&&m.nodeType!==3||(u=s+n),m!==a||o!==0&&m.nodeType!==3||(c=s+o),m.nodeType===3&&(s+=m.nodeValue.length),(y=m.firstChild)!==null;)g=m,m=y;for(;;){if(m===e)break t;if(g===r&&++d===n&&(u=s),g===a&&++p===o&&(c=s),(y=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=y}r=u===-1||c===-1?null:{start:u,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(o8={focusedElem:e,selectionRange:r},gf=!1,ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){t=ve;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,b=x.memoizedState,w=t.stateNode,C=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:ea(t.type,v),b);w.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(te(163))}}catch(_){sr(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}return x=Qw,Qw=!1,x}function Gc(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&w8(t,r,a)}n=n.next}while(n!==o)}}function Wf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function x8(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Wy(e){var t=e.alternate;t!==null&&(e.alternate=null,Wy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pa],delete t[td],delete t[i8],delete t[jZ],delete t[UZ])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zy(e){return e.tag===5||e.tag===3||e.tag===4}function Kw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function y8(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=wf));else if(o!==4&&(e=e.child,e!==null))for(y8(e,t,r),e=e.sibling;e!==null;)y8(e,t,r),e=e.sibling}function b8(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(b8(e,t,r),e=e.sibling;e!==null;)b8(e,t,r),e=e.sibling}var Gr=null,ta=!1;function Wi(e,t,r){for(r=r.child;r!==null;)jy(e,t,r),r=r.sibling}function jy(e,t,r){if(ka&&typeof ka.onCommitFiberUnmount=="function")try{ka.onCommitFiberUnmount(Hf,r)}catch{}switch(r.tag){case 5:Kr||El(r,t);case 6:var o=Gr,n=ta;Gr=null,Wi(e,t,r),Gr=o,ta=n,Gr!==null&&(ta?(e=Gr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Gr.removeChild(r.stateNode));break;case 18:Gr!==null&&(ta?(e=Gr,r=r.stateNode,e.nodeType===8?S4(e.parentNode,r):e.nodeType===1&&S4(e,r),Yc(e)):S4(Gr,r.stateNode));break;case 4:o=Gr,n=ta,Gr=r.stateNode.containerInfo,ta=!0,Wi(e,t,r),Gr=o,ta=n;break;case 0:case 11:case 14:case 15:if(!Kr&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var a=n,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&w8(r,t,s),n=n.next}while(n!==o)}Wi(e,t,r);break;case 1:if(!Kr&&(El(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(u){sr(r,t,u)}Wi(e,t,r);break;case 21:Wi(e,t,r);break;case 22:r.mode&1?(Kr=(o=Kr)||r.memoizedState!==null,Wi(e,t,r),Kr=o):Wi(e,t,r);break;default:Wi(e,t,r)}}function ex(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new lG),t.forEach(function(o){var n=CG.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function Kn(e,t){var r=t.deletions;if(r!==null)for(var o=0;on&&(n=s),o&=~a}if(o=n,o=pr()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*dG(o/1960))-o,10e?16:e,qi===null)var o=!1;else{if(e=qi,qi=null,kf=0,ct&6)throw Error(te(331));var n=ct;for(ct|=4,ve=e.current;ve!==null;){var a=ve,s=a.child;if(ve.flags&16){var u=a.deletions;if(u!==null){for(var c=0;cpr()-lp?as(e,0):sp|=r),Oo(e,t)}function Ky(e,t){t===0&&(e.mode&1?(t=B2,B2<<=1,!(B2&130023424)&&(B2=4194304)):t=1);var r=fo();e=fi(e,t),e!==null&&(ld(e,t,r),Oo(e,r))}function vG(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Ky(e,r)}function CG(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(te(314))}o!==null&&o.delete(t),Ky(e,r)}var eb;eb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ko.current)Po=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Po=!1,aG(e,t,r);Po=!!(e.flags&131072)}else Po=!1,qt&&t.flags&1048576&&ny(t,Lf,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;sf(e,t),e=t.pendingProps;var n=Gl(t,eo.current);Bl(t,r),n=tp(null,t,o,e,n,r);var a=rp();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Eo(o)?(a=!0,yf(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,Y8(t),n.updater=Gf,t.stateNode=n,n._reactInternals=t,f8(t,o,e,r),t=h8(null,t,o,!0,a,r)):(t.tag=0,qt&&a&&W8(t),co(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(sf(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=xG(o),e=ea(o,e),n){case 0:t=m8(null,t,o,e,r);break e;case 1:t=qw(null,t,o,e,r);break e;case 11:t=$w(null,t,o,e,r);break e;case 14:t=Xw(null,t,o,ea(o.type,e),r);break e}throw Error(te(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:ea(o,n),m8(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:ea(o,n),qw(e,t,o,n,r);case 3:e:{if(Fy(t),e===null)throw Error(te(387));o=t.pendingProps,a=t.memoizedState,n=a.element,cy(e,t),Rf(t,o,null,r);var s=t.memoizedState;if(o=s.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Ul(Error(te(423)),t),t=Yw(e,t,o,r,n);break e}else if(o!==n){n=Ul(Error(te(424)),t),t=Yw(e,t,o,r,n);break e}else for(rn=Ki(t.stateNode.containerInfo.firstChild),on=t,qt=!0,ra=null,r=ly(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wl(),o===n){t=pi(e,t,r);break e}co(e,t,o,r)}t=t.child}return t;case 5:return dy(t),e===null&&u8(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,s=n.children,n8(o,n)?s=null:a!==null&&n8(o,a)&&(t.flags|=32),Vy(e,t),co(e,t,s,r),t.child;case 6:return e===null&&u8(t),null;case 13:return Dy(e,t,r);case 4:return J8(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=zl(t,null,o,r):co(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:ea(o,n),$w(e,t,o,n,r);case 7:return co(e,t,t.pendingProps,r),t.child;case 8:return co(e,t,t.pendingProps.children,r),t.child;case 12:return co(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,a=t.memoizedProps,s=n.value,Bt(If,o._currentValue),o._currentValue=s,a!==null)if(aa(a.value,s)){if(a.children===n.children&&!ko.current){t=pi(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){s=a.child;for(var c=u.firstContext;c!==null;){if(c.context===o){if(a.tag===1){c=ui(-1,r&-r),c.tag=2;var d=a.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?c.next=c:(c.next=p.next,p.next=c),d.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),c8(a.return,r,t),u.lanes|=r;break}c=c.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(te(341));s.lanes|=r,u=s.alternate,u!==null&&(u.lanes|=r),c8(s,r,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}co(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Bl(t,r),n=Pn(n),o=o(n),t.flags|=1,co(e,t,o,r),t.child;case 14:return o=t.type,n=ea(o,t.pendingProps),n=ea(o.type,n),Xw(e,t,o,n,r);case 15:return Oy(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:ea(o,n),sf(e,t),t.tag=1,Eo(o)?(e=!0,yf(t)):e=!1,Bl(t,r),Py(t,o,n),f8(t,o,n,r),h8(null,t,o,!0,e,r);case 19:return By(e,t,r);case 22:return Hy(e,t,r)}throw Error(te(156,t.tag))};function tb(e,t){return Mx(e,t)}function wG(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,r,o){return new wG(e,t,r,o)}function fp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xG(e){if(typeof e=="function")return fp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===P8)return 11;if(e===k8)return 14}return 2}function o1(e,t){var r=e.alternate;return r===null?(r=An(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function cf(e,t,r,o,n,a){var s=2;if(o=e,typeof e=="function")fp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Il:return is(r.children,n,a,t);case T8:s=8,n|=8;break;case V4:return e=An(12,r,t,n|2),e.elementType=V4,e.lanes=a,e;case F4:return e=An(13,r,t,n),e.elementType=F4,e.lanes=a,e;case D4:return e=An(19,r,t,n),e.elementType=D4,e.lanes=a,e;case dx:return jf(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ux:s=10;break e;case cx:s=9;break e;case P8:s=11;break e;case k8:s=14;break e;case zi:s=16,o=null;break e}throw Error(te(130,e==null?e:typeof e,""))}return t=An(s,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function is(e,t,r,o){return e=An(7,e,o,t),e.lanes=r,e}function jf(e,t,r,o){return e=An(22,e,o,t),e.elementType=dx,e.lanes=r,e.stateNode={isHidden:!1},e}function E4(e,t,r){return e=An(6,e,null,t),e.lanes=r,e}function O4(e,t,r){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yG(e,t,r,o,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=v4(0),this.expirationTimes=v4(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=v4(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function pp(e,t,r,o,n,a,s,u,c){return e=new yG(e,t,r,u,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=An(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Y8(a),e}function bG(e,t,r){var o=3{"use strict";function ib(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ib)}catch(e){console.error(e)}}ib(),sb.exports=ab()});var ub=Mt(vp=>{"use strict";var lb=Oa();vp.createRoot=lb.createRoot,vp.hydrateRoot=lb.hydrateRoot;var bee});var zL=Mt(_9=>{"use strict";var Dj=U(),Bj=Symbol.for("react.element"),Nj=Symbol.for("react.fragment"),Zj=Object.prototype.hasOwnProperty,Gj=Dj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wj={key:!0,ref:!0,__self:!0,__source:!0};function WL(e,t,r){var o,n={},a=null,s=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(o in t)Zj.call(t,o)&&!Wj.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:Bj,type:e,key:a,ref:s,props:n,_owner:Gj.current}}_9.Fragment=Nj;_9.jsx=WL;_9.jsxs=WL});var Tt=Mt((bae,jL)=>{"use strict";jL.exports=zL()});var Ca=Mt(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isEventSourceSupported=Ct.isReactNative=Ct.ReadyState=Ct.DEFAULT_HEARTBEAT=Ct.UNPARSABLE_JSON_OBJECT=Ct.DEFAULT_RECONNECT_INTERVAL_MS=Ct.DEFAULT_RECONNECT_LIMIT=Ct.SOCKET_IO_PING_CODE=Ct.SOCKET_IO_PATH=Ct.SOCKET_IO_PING_INTERVAL=Ct.DEFAULT_EVENT_SOURCE_OPTIONS=Ct.EMPTY_EVENT_HANDLERS=Ct.DEFAULT_OPTIONS=void 0;var Eq=1,Oq=1e3*Eq;Ct.DEFAULT_OPTIONS={};Ct.EMPTY_EVENT_HANDLERS={};Ct.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:Ct.EMPTY_EVENT_HANDLERS};Ct.SOCKET_IO_PING_INTERVAL=25*Oq;Ct.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket";Ct.SOCKET_IO_PING_CODE="2";Ct.DEFAULT_RECONNECT_LIMIT=20;Ct.DEFAULT_RECONNECT_INTERVAL_MS=5e3;Ct.UNPARSABLE_JSON_OBJECT={};Ct.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3};var YM;(function(e){e[e.UNINSTANTIATED=-1]="UNINSTANTIATED",e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"})(YM||(Ct.ReadyState=YM={}));var Hq=function(){try{return"EventSource"in globalThis}catch{return!1}};Ct.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative";Ct.isEventSourceSupported=!Ct.isReactNative&&Hq()});var F5=Mt(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.resetWebSockets=wa.sharedWebSockets=void 0;wa.sharedWebSockets={};var Vq=function(e){if(e&&wa.sharedWebSockets.hasOwnProperty(e))delete wa.sharedWebSockets[e];else for(var t in wa.sharedWebSockets)wa.sharedWebSockets.hasOwnProperty(t)&&delete wa.sharedWebSockets[t]};wa.resetWebSockets=Vq});var B5=Mt(O1=>{"use strict";Object.defineProperty(O1,"__esModule",{value:!0});O1.setUpSocketIOPing=O1.appendQueryParams=O1.parseSocketIOUrl=void 0;var D5=Ca(),Fq=function(e){if(e){var t=/^https|wss/.test(e),r=e.replace(/^(https?|wss?)(:\/\/)?/,""),o=r.replace(/\/$/,""),n=t?"wss":"ws";return"".concat(n,"://").concat(o).concat(D5.SOCKET_IO_PATH)}else if(e===""){var t=/^https/.test(window.location.protocol),n=t?"wss":"ws",a=window.location.port?":".concat(window.location.port):"";return"".concat(n,"://").concat(window.location.hostname).concat(a).concat(D5.SOCKET_IO_PATH)}return e};O1.parseSocketIOUrl=Fq;var Dq=function(e,t){t===void 0&&(t={});var r=/\?([\w]+=[\w]+)/,o=r.test(e),n="".concat(Object.entries(t).reduce(function(a,s){var u=s[0],c=s[1];return a+"".concat(u,"=").concat(c,"&")},"").slice(0,-1));return"".concat(e).concat(o?"&":"?").concat(n)};O1.appendQueryParams=Dq;var Bq=function(e,t){t===void 0&&(t=D5.SOCKET_IO_PING_INTERVAL);var r=function(){return e(D5.SOCKET_IO_PING_CODE)};return window.setInterval(r,t)};O1.setUpSocketIOPing=Bq});var qm=Mt(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.heartbeat=Nq;var $m=Ca();function Nq(e,t){var r=t||{},o=r.interval,n=o===void 0?$m.DEFAULT_HEARTBEAT.interval:o,a=r.timeout,s=a===void 0?$m.DEFAULT_HEARTBEAT.timeout:a,u=r.message,c=u===void 0?$m.DEFAULT_HEARTBEAT.message:u,d=!1,p=setInterval(function(){try{typeof c=="function"?e.send(c()):e.send(c)}catch{}},n),m=setInterval(function(){d?d=!1:e.close()},s);return e.addEventListener("close",function(){clearInterval(p),clearInterval(m)}),function(){d=!0}}});var N5=Mt(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.resetSubscribers=gn.removeSubscriber=gn.addSubscriber=gn.hasSubscribers=gn.getSubscribers=void 0;var xa={},Zq=[],Gq=function(e){return(0,gn.hasSubscribers)(e)?Array.from(xa[e]):Zq};gn.getSubscribers=Gq;var Wq=function(e){var t;return((t=xa[e])===null||t===void 0?void 0:t.size)>0};gn.hasSubscribers=Wq;var zq=function(e,t){xa[e]=xa[e]||new Set,xa[e].add(t)};gn.addSubscriber=zq;var jq=function(e,t){xa[e].delete(t)};gn.removeSubscriber=jq;var Uq=function(e){if(e&&xa.hasOwnProperty(e))delete xa[e];else for(var t in xa)xa.hasOwnProperty(t)&&delete xa[t]};gn.resetSubscribers=Uq});var G5=Mt(Z5=>{"use strict";Object.defineProperty(Z5,"__esModule",{value:!0});Z5.assertIsWebSocket=qq;Z5.resetGlobalState=Yq;var $q=F5(),Xq=N5();function qq(e,t){if(!t&&!(e instanceof WebSocket))throw new Error("")}function Yq(e){(0,Xq.resetSubscribers)(e),(0,$q.resetWebSockets)(e)}});var JM=Mt(Du=>{"use strict";var W5=Du&&Du.__assign||function(){return W5=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";var z5=Bu&&Bu.__assign||function(){return z5=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";Object.defineProperty(j5,"__esModule",{value:!0});j5.createOrJoinSocket=void 0;var H1=F5(),w0=Ca(),pY=JM(),mY=QM(),Ym=N5(),hY=function(e,t,r,o,n){return function(){if((0,Ym.removeSubscriber)(e,t),!(0,Ym.hasSubscribers)(e)){try{var a=H1.sharedWebSockets[e];a instanceof WebSocket&&(a.onclose=function(s){r.current.onClose&&r.current.onClose(s),o(w0.ReadyState.CLOSED)}),a.close()}catch{}n&&n(),delete H1.sharedWebSockets[e]}}},gY=function(e,t,r,o,n,a,s,u){if(!w0.isEventSourceSupported&&o.current.eventSourceOptions)throw w0.isReactNative?new Error("EventSource is not supported in ReactNative"):new Error("EventSource is not supported");if(o.current.share){var c=null;H1.sharedWebSockets[t]===void 0?(H1.sharedWebSockets[t]=o.current.eventSourceOptions?new EventSource(t,o.current.eventSourceOptions):new WebSocket(t,o.current.protocols),e.current=H1.sharedWebSockets[t],r(w0.ReadyState.CONNECTING),c=(0,mY.attachSharedListeners)(H1.sharedWebSockets[t],t,o,u)):(e.current=H1.sharedWebSockets[t],r(H1.sharedWebSockets[t].readyState));var d={setLastMessage:n,setReadyState:r,optionsRef:o,reconnectCount:s,reconnect:a};return(0,Ym.addSubscriber)(t,d),hY(t,d,o,r,c)}else{if(e.current=o.current.eventSourceOptions?new EventSource(t,o.current.eventSourceOptions):new WebSocket(t,o.current.protocols),r(w0.ReadyState.CONNECTING),!e.current)throw new Error("WebSocket failed to be created");return(0,pY.attachListeners)(e.current,{setLastMessage:n,setReadyState:r},o,a.current,s,u)}};j5.createOrJoinSocket=gY});var rA=Mt(ya=>{"use strict";var vY=ya&&ya.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{d(o.next(p))}catch(m){s(m)}}function c(p){try{d(o.throw(p))}catch(m){s(m)}}function d(p){p.done?a(p.value):n(p.value).then(u,c)}d((o=o.apply(e,t||[])).next())})},CY=ya&&ya.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(p){return c([d,p])}}function c(d){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(o=1,n&&(a=d[0]&2?n.return:d[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,d[1])).done)return a;switch(n=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,n=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.websocketWrapper=void 0;var bY=function(e,t){return new Proxy(e,{get:function(r,o){var n=r[o];return o==="reconnect"?t:typeof n=="function"?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):n},set:function(r,o,n){return/^on/.test(o)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(r[o]=n,!0)}})};Nu.websocketWrapper=bY;Nu.default=Nu.websocketWrapper});var U5=Mt(Gn=>{"use strict";var V1=Gn&&Gn.__assign||function(){return V1=Object.assign||function(e){for(var t,r=1,o=arguments.length;r0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]{"use strict";var $5=Zu&&Zu.__assign||function(){return $5=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";var X5=F1&&F1.__assign||function(){return X5=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.resetGlobalState=Wn.useEventSource=Wn.ReadyState=Wn.useSocketIO=Wn.default=void 0;var FY=U5();Object.defineProperty(Wn,"default",{enumerable:!0,get:function(){return FY.useWebSocket}});var DY=iA();Object.defineProperty(Wn,"useSocketIO",{enumerable:!0,get:function(){return DY.useSocketIO}});var BY=Ca();Object.defineProperty(Wn,"ReadyState",{enumerable:!0,get:function(){return BY.ReadyState}});var NY=uA();Object.defineProperty(Wn,"useEventSource",{enumerable:!0,get:function(){return NY.useEventSource}});var ZY=G5();Object.defineProperty(Wn,"resetGlobalState",{enumerable:!0,get:function(){return ZY.resetGlobalState}})});var sT=Mt(Rt=>{"use strict";var Br=typeof Symbol=="function"&&Symbol.for,ih=Br?Symbol.for("react.element"):60103,sh=Br?Symbol.for("react.portal"):60106,s3=Br?Symbol.for("react.fragment"):60107,l3=Br?Symbol.for("react.strict_mode"):60108,u3=Br?Symbol.for("react.profiler"):60114,c3=Br?Symbol.for("react.provider"):60109,d3=Br?Symbol.for("react.context"):60110,lh=Br?Symbol.for("react.async_mode"):60111,f3=Br?Symbol.for("react.concurrent_mode"):60111,p3=Br?Symbol.for("react.forward_ref"):60112,m3=Br?Symbol.for("react.suspense"):60113,oJ=Br?Symbol.for("react.suspense_list"):60120,h3=Br?Symbol.for("react.memo"):60115,g3=Br?Symbol.for("react.lazy"):60116,nJ=Br?Symbol.for("react.block"):60121,aJ=Br?Symbol.for("react.fundamental"):60117,iJ=Br?Symbol.for("react.responder"):60118,sJ=Br?Symbol.for("react.scope"):60119;function vn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ih:switch(e=e.type,e){case lh:case f3:case s3:case u3:case l3:case m3:return e;default:switch(e=e&&e.$$typeof,e){case d3:case p3:case g3:case h3:case c3:return e;default:return t}}case sh:return t}}}function iT(e){return vn(e)===f3}Rt.AsyncMode=lh;Rt.ConcurrentMode=f3;Rt.ContextConsumer=d3;Rt.ContextProvider=c3;Rt.Element=ih;Rt.ForwardRef=p3;Rt.Fragment=s3;Rt.Lazy=g3;Rt.Memo=h3;Rt.Portal=sh;Rt.Profiler=u3;Rt.StrictMode=l3;Rt.Suspense=m3;Rt.isAsyncMode=function(e){return iT(e)||vn(e)===lh};Rt.isConcurrentMode=iT;Rt.isContextConsumer=function(e){return vn(e)===d3};Rt.isContextProvider=function(e){return vn(e)===c3};Rt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ih};Rt.isForwardRef=function(e){return vn(e)===p3};Rt.isFragment=function(e){return vn(e)===s3};Rt.isLazy=function(e){return vn(e)===g3};Rt.isMemo=function(e){return vn(e)===h3};Rt.isPortal=function(e){return vn(e)===sh};Rt.isProfiler=function(e){return vn(e)===u3};Rt.isStrictMode=function(e){return vn(e)===l3};Rt.isSuspense=function(e){return vn(e)===m3};Rt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===s3||e===f3||e===u3||e===l3||e===m3||e===oJ||typeof e=="object"&&e!==null&&(e.$$typeof===g3||e.$$typeof===h3||e.$$typeof===c3||e.$$typeof===d3||e.$$typeof===p3||e.$$typeof===aJ||e.$$typeof===iJ||e.$$typeof===sJ||e.$$typeof===nJ)};Rt.typeOf=vn});var uT=Mt((O0e,lT)=>{"use strict";lT.exports=sT()});var gT=Mt((H0e,hT)=>{"use strict";var uh=uT(),lJ={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},uJ={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cJ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},pT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ch={};ch[uh.ForwardRef]=cJ;ch[uh.Memo]=pT;function cT(e){return uh.isMemo(e)?pT:ch[e.$$typeof]||lJ}var dJ=Object.defineProperty,fJ=Object.getOwnPropertyNames,dT=Object.getOwnPropertySymbols,pJ=Object.getOwnPropertyDescriptor,mJ=Object.getPrototypeOf,fT=Object.prototype;function mT(e,t,r){if(typeof t!="string"){if(fT){var o=mJ(t);o&&o!==fT&&mT(e,o,r)}var n=fJ(t);dT&&(n=n.concat(dT(t)));for(var a=cT(e),s=cT(t),u=0;u{(function(){var e,t="4.17.21",r=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",a="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,p=2,m=4,g=1,y=2,x=1,v=2,b=4,w=8,C=16,I=32,_=64,M=128,T=256,A=512,H=30,J="...",Z=800,Q=16,W=1,ie=2,q=3,ae=1/0,Y=9007199254740991,me=17976931348623157e292,se=NaN,we=4294967295,Ke=we-1,xt=we>>>1,nt=[["ary",M],["bind",x],["bindKey",v],["curry",w],["curryRight",C],["flip",A],["partial",I],["partialRight",_],["rearg",T]],lt="[object Arguments]",yt="[object Array]",br="[object AsyncFunction]",bt="[object Boolean]",xe="[object Date]",qe="[object DOMException]",_t="[object Error]",at="[object Function]",ut="[object GeneratorFunction]",Ye="[object Map]",Jt="[object Number]",ao="[object Null]",$r="[object Object]",Z1="[object Promise]",nl="[object Proxy]",E="[object RegExp]",D="[object Set]",z="[object String]",ce="[object Symbol]",ue="[object Undefined]",oe="[object WeakMap]",Le="[object WeakSet]",et="[object ArrayBuffer]",Gt="[object DataView]",ar="[object Float32Array]",$n="[object Float64Array]",rc="[object Int8Array]",G1="[object Int16Array]",W1="[object Int32Array]",oc="[object Uint8Array]",al="[object Uint8ClampedArray]",nc="[object Uint16Array]",il="[object Uint32Array]",Ik=/\b__p \+= '';/g,Sk=/\b(__p \+=) '' \+/g,Rk=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rg=/&(?:amp|lt|gt|quot|#39);/g,og=/[&<>"']/g,_k=RegExp(rg.source),Mk=RegExp(og.source),Ak=/<%-([\s\S]+?)%>/g,Tk=/<%([\s\S]+?)%>/g,ng=/<%=([\s\S]+?)%>/g,Pk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kk=/^\w*$/,Ek=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N3=/[\\^$.*+?()[\]{}|]/g,Ok=RegExp(N3.source),Z3=/^\s+/,Hk=/\s/,Vk=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fk=/\{\n\/\* \[wrapped with (.+)\] \*/,Dk=/,? & /,Bk=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nk=/[()=,{}\[\]\/\s]/,Zk=/\\(\\)?/g,Gk=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ag=/\w*$/,Wk=/^[-+]0x[0-9a-f]+$/i,zk=/^0b[01]+$/i,jk=/^\[object .+?Constructor\]$/,Uk=/^0o[0-7]+$/i,$k=/^(?:0|[1-9]\d*)$/,Xk=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,B0=/($^)/,qk=/['\n\r\u2028\u2029\\]/g,N0="\\ud800-\\udfff",Yk="\\u0300-\\u036f",Jk="\\ufe20-\\ufe2f",Qk="\\u20d0-\\u20ff",ig=Yk+Jk+Qk,sg="\\u2700-\\u27bf",lg="a-z\\xdf-\\xf6\\xf8-\\xff",Kk="\\xac\\xb1\\xd7\\xf7",eE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tE="\\u2000-\\u206f",rE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ug="A-Z\\xc0-\\xd6\\xd8-\\xde",cg="\\ufe0e\\ufe0f",dg=Kk+eE+tE+rE,G3="['\u2019]",oE="["+N0+"]",fg="["+dg+"]",Z0="["+ig+"]",pg="\\d+",nE="["+sg+"]",mg="["+lg+"]",hg="[^"+N0+dg+pg+sg+lg+ug+"]",W3="\\ud83c[\\udffb-\\udfff]",aE="(?:"+Z0+"|"+W3+")",gg="[^"+N0+"]",z3="(?:\\ud83c[\\udde6-\\uddff]){2}",j3="[\\ud800-\\udbff][\\udc00-\\udfff]",sl="["+ug+"]",vg="\\u200d",Cg="(?:"+mg+"|"+hg+")",iE="(?:"+sl+"|"+hg+")",wg="(?:"+G3+"(?:d|ll|m|re|s|t|ve))?",xg="(?:"+G3+"(?:D|LL|M|RE|S|T|VE))?",yg=aE+"?",bg="["+cg+"]?",sE="(?:"+vg+"(?:"+[gg,z3,j3].join("|")+")"+bg+yg+")*",lE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lg=bg+yg+sE,cE="(?:"+[nE,z3,j3].join("|")+")"+Lg,dE="(?:"+[gg+Z0+"?",Z0,z3,j3,oE].join("|")+")",fE=RegExp(G3,"g"),pE=RegExp(Z0,"g"),U3=RegExp(W3+"(?="+W3+")|"+dE+Lg,"g"),mE=RegExp([sl+"?"+mg+"+"+wg+"(?="+[fg,sl,"$"].join("|")+")",iE+"+"+xg+"(?="+[fg,sl+Cg,"$"].join("|")+")",sl+"?"+Cg+"+"+wg,sl+"+"+xg,uE,lE,pg,cE].join("|"),"g"),hE=RegExp("["+vg+N0+ig+cg+"]"),gE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],CE=-1,Wt={};Wt[ar]=Wt[$n]=Wt[rc]=Wt[G1]=Wt[W1]=Wt[oc]=Wt[al]=Wt[nc]=Wt[il]=!0,Wt[lt]=Wt[yt]=Wt[et]=Wt[bt]=Wt[Gt]=Wt[xe]=Wt[_t]=Wt[at]=Wt[Ye]=Wt[Jt]=Wt[$r]=Wt[E]=Wt[D]=Wt[z]=Wt[oe]=!1;var Ft={};Ft[lt]=Ft[yt]=Ft[et]=Ft[Gt]=Ft[bt]=Ft[xe]=Ft[ar]=Ft[$n]=Ft[rc]=Ft[G1]=Ft[W1]=Ft[Ye]=Ft[Jt]=Ft[$r]=Ft[E]=Ft[D]=Ft[z]=Ft[ce]=Ft[oc]=Ft[al]=Ft[nc]=Ft[il]=!0,Ft[_t]=Ft[at]=Ft[oe]=!1;var wE={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},xE={"&":"&","<":"<",">":">",'"':""","'":"'"},yE={"&":"&","<":"<",">":">",""":'"',"'":"'"},bE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LE=parseFloat,IE=parseInt,Ig=typeof global=="object"&&global&&global.Object===Object&&global,SE=typeof self=="object"&&self&&self.Object===Object&&self,Pr=Ig||SE||Function("return this")(),$3=typeof tc=="object"&&tc&&!tc.nodeType&&tc,z1=$3&&typeof F0=="object"&&F0&&!F0.nodeType&&F0,Sg=z1&&z1.exports===$3,X3=Sg&&Ig.process,Cn=function(){try{var V=z1&&z1.require&&z1.require("util").types;return V||X3&&X3.binding&&X3.binding("util")}catch{}}(),Rg=Cn&&Cn.isArrayBuffer,_g=Cn&&Cn.isDate,Mg=Cn&&Cn.isMap,Ag=Cn&&Cn.isRegExp,Tg=Cn&&Cn.isSet,Pg=Cn&&Cn.isTypedArray;function qo(V,j,G){switch(G.length){case 0:return V.call(j);case 1:return V.call(j,G[0]);case 2:return V.call(j,G[0],G[1]);case 3:return V.call(j,G[0],G[1],G[2])}return V.apply(j,G)}function RE(V,j,G,ge){for(var Ve=-1,ft=V==null?0:V.length;++Ve-1}function q3(V,j,G){for(var ge=-1,Ve=V==null?0:V.length;++ge-1;);return G}function Bg(V,j){for(var G=V.length;G--&&ll(j,V[G],0)>-1;);return G}function HE(V,j){for(var G=V.length,ge=0;G--;)V[G]===j&&++ge;return ge}var VE=K3(wE),FE=K3(xE);function DE(V){return"\\"+bE[V]}function BE(V,j){return V==null?e:V[j]}function ul(V){return hE.test(V)}function NE(V){return gE.test(V)}function ZE(V){for(var j,G=[];!(j=V.next()).done;)G.push(j.value);return G}function o7(V){var j=-1,G=Array(V.size);return V.forEach(function(ge,Ve){G[++j]=[Ve,ge]}),G}function Ng(V,j){return function(G){return V(j(G))}}function Oi(V,j){for(var G=-1,ge=V.length,Ve=0,ft=[];++G-1}function MO(i,l){var f=this.__data__,h=a2(f,i);return h<0?(++this.size,f.push([i,l])):f[h][1]=l,this}Ya.prototype.clear=IO,Ya.prototype.delete=SO,Ya.prototype.get=RO,Ya.prototype.has=_O,Ya.prototype.set=MO;function Ja(i){var l=-1,f=i==null?0:i.length;for(this.clear();++l=l?i:l)),i}function bn(i,l,f,h,L,R){var P,O=l&d,F=l&p,$=l&m;if(f&&(P=L?f(i,h,L,R):f(i)),P!==e)return P;if(!Qt(i))return i;var X=Fe(i);if(X){if(P=kH(i),!O)return Ro(i,P)}else{var K=qr(i),de=K==at||K==ut;if(Zi(i))return bv(i,O);if(K==$r||K==lt||de&&!L){if(P=F||de?{}:Zv(i),!O)return F?yH(i,zO(P,i)):xH(i,Qg(P,i))}else{if(!Ft[K])return L?i:{};P=EH(i,K,O)}}R||(R=new qn);var ye=R.get(i);if(ye)return ye;R.set(i,P),gC(i)?i.forEach(function(Pe){P.add(bn(Pe,l,f,Pe,i,R))}):mC(i)&&i.forEach(function(Pe,Je){P.set(Je,bn(Pe,l,f,Je,i,R))});var Te=$?F?A7:M7:F?Mo:kr,$e=X?e:Te(i);return wn($e||i,function(Pe,Je){$e&&(Je=Pe,Pe=i[Je]),dc(P,Je,bn(Pe,l,f,Je,i,R))}),P}function jO(i){var l=kr(i);return function(f){return Kg(f,i,l)}}function Kg(i,l,f){var h=f.length;if(i==null)return!h;for(i=Ot(i);h--;){var L=f[h],R=l[L],P=i[L];if(P===e&&!(L in i)||!R(P))return!1}return!0}function ev(i,l,f){if(typeof i!="function")throw new xn(n);return Cc(function(){i.apply(e,f)},l)}function fc(i,l,f,h){var L=-1,R=G0,P=!0,O=i.length,F=[],$=l.length;if(!O)return F;f&&(l=Xt(l,Yo(f))),h?(R=q3,P=!1):l.length>=r&&(R=ac,P=!1,l=new $1(l));e:for(;++LL?0:L+f),h=h===e||h>L?L:ze(h),h<0&&(h+=L),h=f>h?0:CC(h);f0&&f(O)?l>1?Zr(O,l-1,f,h,L):Ei(L,O):h||(L[L.length]=O)}return L}var c7=Mv(),ov=Mv(!0);function Sa(i,l){return i&&c7(i,l,kr)}function d7(i,l){return i&&ov(i,l,kr)}function s2(i,l){return ki(l,function(f){return ri(i[f])})}function q1(i,l){l=Bi(l,i);for(var f=0,h=l.length;i!=null&&fl}function XO(i,l){return i!=null&&Lt.call(i,l)}function qO(i,l){return i!=null&&l in Ot(i)}function YO(i,l,f){return i>=Xr(l,f)&&i=120&&X.length>=120)?new $1(P&&X):e}X=i[0];var K=-1,de=O[0];e:for(;++K-1;)O!==i&&Q0.call(O,F,1),Q0.call(i,F,1);return i}function mv(i,l){for(var f=i?l.length:0,h=f-1;f--;){var L=l[f];if(f==h||L!==R){var R=L;ti(L)?Q0.call(i,L,1):y7(i,L)}}return i}function C7(i,l){return i+t2(Xg()*(l-i+1))}function uH(i,l,f,h){for(var L=-1,R=Ir(e2((l-i)/(f||1)),0),P=G(R);R--;)P[h?R:++L]=i,i+=f;return P}function w7(i,l){var f="";if(!i||l<1||l>Y)return f;do l%2&&(f+=i),l=t2(l/2),l&&(i+=i);while(l);return f}function Xe(i,l){return V7(zv(i,l,Ao),i+"")}function cH(i){return Jg(wl(i))}function dH(i,l){var f=wl(i);return C2(f,X1(l,0,f.length))}function hc(i,l,f,h){if(!Qt(i))return i;l=Bi(l,i);for(var L=-1,R=l.length,P=R-1,O=i;O!=null&&++LL?0:L+l),f=f>L?L:f,f<0&&(f+=L),L=l>f?0:f-l>>>0,l>>>=0;for(var R=G(L);++h>>1,P=i[R];P!==null&&!Qo(P)&&(f?P<=l:P=r){var $=l?null:SH(i);if($)return z0($);P=!1,L=ac,F=new $1}else F=l?[]:O;e:for(;++h=h?i:Ln(i,l,f)}var yv=rO||function(i){return Pr.clearTimeout(i)};function bv(i,l){if(l)return i.slice();var f=i.length,h=Wg?Wg(f):new i.constructor(f);return i.copy(h),h}function S7(i){var l=new i.constructor(i.byteLength);return new Y0(l).set(new Y0(i)),l}function gH(i,l){var f=l?S7(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}function vH(i){var l=new i.constructor(i.source,ag.exec(i));return l.lastIndex=i.lastIndex,l}function CH(i){return cc?Ot(cc.call(i)):{}}function Lv(i,l){var f=l?S7(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}function Iv(i,l){if(i!==l){var f=i!==e,h=i===null,L=i===i,R=Qo(i),P=l!==e,O=l===null,F=l===l,$=Qo(l);if(!O&&!$&&!R&&i>l||R&&P&&F&&!O&&!$||h&&P&&F||!f&&F||!L)return 1;if(!h&&!R&&!$&&i=O)return F;var $=f[h];return F*($=="desc"?-1:1)}}return i.index-l.index}function Sv(i,l,f,h){for(var L=-1,R=i.length,P=f.length,O=-1,F=l.length,$=Ir(R-P,0),X=G(F+$),K=!h;++O1?f[L-1]:e,P=L>2?f[2]:e;for(R=i.length>3&&typeof R=="function"?(L--,R):e,P&&so(f[0],f[1],P)&&(R=L<3?e:R,L=1),l=Ot(l);++h-1?L[R?l[P]:P]:e}}function Pv(i){return ei(function(l){var f=l.length,h=f,L=yn.prototype.thru;for(i&&l.reverse();h--;){var R=l[h];if(typeof R!="function")throw new xn(n);if(L&&!P&&g2(R)=="wrapper")var P=new yn([],!0)}for(h=P?h:f;++h1&&ot.reverse(),X&&FO))return!1;var $=R.get(i),X=R.get(l);if($&&X)return $==l&&X==i;var K=-1,de=!0,ye=f&y?new $1:e;for(R.set(i,l),R.set(l,i);++K1?"& ":"")+l[h],l=l.join(f>2?", ":" "),i.replace(Vk,`{ +/* [wrapped with `+l+`] */ +`)}function HH(i){return Fe(i)||Q1(i)||!!(Ug&&i&&i[Ug])}function ti(i,l){var f=typeof i;return l=l??Y,!!l&&(f=="number"||f!="symbol"&&$k.test(i))&&i>-1&&i%1==0&&i0){if(++l>=Z)return arguments[0]}else l=0;return i.apply(e,arguments)}}function C2(i,l){var f=-1,h=i.length,L=h-1;for(l=l===e?h:l;++f1?i[l-1]:e;return f=typeof f=="function"?(i.pop(),f):e,rC(i,f)});function oC(i){var l=S(i);return l.__chain__=!0,l}function UV(i,l){return l(i),i}function w2(i,l){return l(i)}var $V=ei(function(i){var l=i.length,f=l?i[0]:0,h=this.__wrapped__,L=function(R){return u7(R,i)};return l>1||this.__actions__.length||!(h instanceof tt)||!ti(f)?this.thru(L):(h=h.slice(f,+f+(l?1:0)),h.__actions__.push({func:w2,args:[L],thisArg:e}),new yn(h,this.__chain__).thru(function(R){return l&&!R.length&&R.push(e),R}))});function XV(){return oC(this)}function qV(){return new yn(this.value(),this.__chain__)}function YV(){this.__values__===e&&(this.__values__=vC(this.value()));var i=this.__index__>=this.__values__.length,l=i?e:this.__values__[this.__index__++];return{done:i,value:l}}function JV(){return this}function QV(i){for(var l,f=this;f instanceof n2;){var h=Yv(f);h.__index__=0,h.__values__=e,l?L.__wrapped__=h:l=h;var L=h;f=f.__wrapped__}return L.__wrapped__=i,l}function KV(){var i=this.__wrapped__;if(i instanceof tt){var l=i;return this.__actions__.length&&(l=new tt(this)),l=l.reverse(),l.__actions__.push({func:w2,args:[F7],thisArg:e}),new yn(l,this.__chain__)}return this.thru(F7)}function eF(){return wv(this.__wrapped__,this.__actions__)}var tF=d2(function(i,l,f){Lt.call(i,f)?++i[f]:Qa(i,f,1)});function rF(i,l,f){var h=Fe(i)?kg:UO;return f&&so(i,l,f)&&(l=e),h(i,Ae(l,3))}function oF(i,l){var f=Fe(i)?ki:rv;return f(i,Ae(l,3))}var nF=Tv(Jv),aF=Tv(Qv);function iF(i,l){return Zr(x2(i,l),1)}function sF(i,l){return Zr(x2(i,l),ae)}function lF(i,l,f){return f=f===e?1:ze(f),Zr(x2(i,l),f)}function nC(i,l){var f=Fe(i)?wn:Fi;return f(i,Ae(l,3))}function aC(i,l){var f=Fe(i)?_E:tv;return f(i,Ae(l,3))}var uF=d2(function(i,l,f){Lt.call(i,f)?i[f].push(l):Qa(i,f,[l])});function cF(i,l,f,h){i=_o(i)?i:wl(i),f=f&&!h?ze(f):0;var L=i.length;return f<0&&(f=Ir(L+f,0)),S2(i)?f<=L&&i.indexOf(l,f)>-1:!!L&&ll(i,l,f)>-1}var dF=Xe(function(i,l,f){var h=-1,L=typeof l=="function",R=_o(i)?G(i.length):[];return Fi(i,function(P){R[++h]=L?qo(l,P,f):pc(P,l,f)}),R}),fF=d2(function(i,l,f){Qa(i,f,l)});function x2(i,l){var f=Fe(i)?Xt:lv;return f(i,Ae(l,3))}function pF(i,l,f,h){return i==null?[]:(Fe(l)||(l=l==null?[]:[l]),f=h?e:f,Fe(f)||(f=f==null?[]:[f]),fv(i,l,f))}var mF=d2(function(i,l,f){i[f?0:1].push(l)},function(){return[[],[]]});function hF(i,l,f){var h=Fe(i)?Y3:Vg,L=arguments.length<3;return h(i,Ae(l,4),f,L,Fi)}function gF(i,l,f){var h=Fe(i)?ME:Vg,L=arguments.length<3;return h(i,Ae(l,4),f,L,tv)}function vF(i,l){var f=Fe(i)?ki:rv;return f(i,L2(Ae(l,3)))}function CF(i){var l=Fe(i)?Jg:cH;return l(i)}function wF(i,l,f){(f?so(i,l,f):l===e)?l=1:l=ze(l);var h=Fe(i)?ZO:dH;return h(i,l)}function xF(i){var l=Fe(i)?GO:pH;return l(i)}function yF(i){if(i==null)return 0;if(_o(i))return S2(i)?cl(i):i.length;var l=qr(i);return l==Ye||l==D?i.size:h7(i).length}function bF(i,l,f){var h=Fe(i)?J3:mH;return f&&so(i,l,f)&&(l=e),h(i,Ae(l,3))}var LF=Xe(function(i,l){if(i==null)return[];var f=l.length;return f>1&&so(i,l[0],l[1])?l=[]:f>2&&so(l[0],l[1],l[2])&&(l=[l[0]]),fv(i,Zr(l,1),[])}),y2=oO||function(){return Pr.Date.now()};function IF(i,l){if(typeof l!="function")throw new xn(n);return i=ze(i),function(){if(--i<1)return l.apply(this,arguments)}}function iC(i,l,f){return l=f?e:l,l=i&&l==null?i.length:l,Ka(i,M,e,e,e,e,l)}function sC(i,l){var f;if(typeof l!="function")throw new xn(n);return i=ze(i),function(){return--i>0&&(f=l.apply(this,arguments)),i<=1&&(l=e),f}}var B7=Xe(function(i,l,f){var h=x;if(f.length){var L=Oi(f,vl(B7));h|=I}return Ka(i,h,l,f,L)}),lC=Xe(function(i,l,f){var h=x|v;if(f.length){var L=Oi(f,vl(lC));h|=I}return Ka(l,h,i,f,L)});function uC(i,l,f){l=f?e:l;var h=Ka(i,w,e,e,e,e,e,l);return h.placeholder=uC.placeholder,h}function cC(i,l,f){l=f?e:l;var h=Ka(i,C,e,e,e,e,e,l);return h.placeholder=cC.placeholder,h}function dC(i,l,f){var h,L,R,P,O,F,$=0,X=!1,K=!1,de=!0;if(typeof i!="function")throw new xn(n);l=Sn(l)||0,Qt(f)&&(X=!!f.leading,K="maxWait"in f,R=K?Ir(Sn(f.maxWait)||0,l):R,de="trailing"in f?!!f.trailing:de);function ye(fr){var Jn=h,ni=L;return h=L=e,$=fr,P=i.apply(ni,Jn),P}function Te(fr){return $=fr,O=Cc(Je,l),X?ye(fr):P}function $e(fr){var Jn=fr-F,ni=fr-$,TC=l-Jn;return K?Xr(TC,R-ni):TC}function Pe(fr){var Jn=fr-F,ni=fr-$;return F===e||Jn>=l||Jn<0||K&&ni>=R}function Je(){var fr=y2();if(Pe(fr))return ot(fr);O=Cc(Je,$e(fr))}function ot(fr){return O=e,de&&h?ye(fr):(h=L=e,P)}function Ko(){O!==e&&yv(O),$=0,h=F=L=O=e}function lo(){return O===e?P:ot(y2())}function en(){var fr=y2(),Jn=Pe(fr);if(h=arguments,L=this,F=fr,Jn){if(O===e)return Te(F);if(K)return yv(O),O=Cc(Je,l),ye(F)}return O===e&&(O=Cc(Je,l)),P}return en.cancel=Ko,en.flush=lo,en}var SF=Xe(function(i,l){return ev(i,1,l)}),RF=Xe(function(i,l,f){return ev(i,Sn(l)||0,f)});function _F(i){return Ka(i,A)}function b2(i,l){if(typeof i!="function"||l!=null&&typeof l!="function")throw new xn(n);var f=function(){var h=arguments,L=l?l.apply(this,h):h[0],R=f.cache;if(R.has(L))return R.get(L);var P=i.apply(this,h);return f.cache=R.set(L,P)||R,P};return f.cache=new(b2.Cache||Ja),f}b2.Cache=Ja;function L2(i){if(typeof i!="function")throw new xn(n);return function(){var l=arguments;switch(l.length){case 0:return!i.call(this);case 1:return!i.call(this,l[0]);case 2:return!i.call(this,l[0],l[1]);case 3:return!i.call(this,l[0],l[1],l[2])}return!i.apply(this,l)}}function MF(i){return sC(2,i)}var AF=hH(function(i,l){l=l.length==1&&Fe(l[0])?Xt(l[0],Yo(Ae())):Xt(Zr(l,1),Yo(Ae()));var f=l.length;return Xe(function(h){for(var L=-1,R=Xr(h.length,f);++L=l}),Q1=av(function(){return arguments}())?av:function(i){return ir(i)&&Lt.call(i,"callee")&&!jg.call(i,"callee")},Fe=G.isArray,zF=Rg?Yo(Rg):QO;function _o(i){return i!=null&&I2(i.length)&&!ri(i)}function dr(i){return ir(i)&&_o(i)}function jF(i){return i===!0||i===!1||ir(i)&&io(i)==bt}var Zi=aO||J7,UF=_g?Yo(_g):KO;function $F(i){return ir(i)&&i.nodeType===1&&!wc(i)}function XF(i){if(i==null)return!0;if(_o(i)&&(Fe(i)||typeof i=="string"||typeof i.splice=="function"||Zi(i)||Cl(i)||Q1(i)))return!i.length;var l=qr(i);if(l==Ye||l==D)return!i.size;if(vc(i))return!h7(i).length;for(var f in i)if(Lt.call(i,f))return!1;return!0}function qF(i,l){return mc(i,l)}function YF(i,l,f){f=typeof f=="function"?f:e;var h=f?f(i,l):e;return h===e?mc(i,l,e,f):!!h}function Z7(i){if(!ir(i))return!1;var l=io(i);return l==_t||l==qe||typeof i.message=="string"&&typeof i.name=="string"&&!wc(i)}function JF(i){return typeof i=="number"&&$g(i)}function ri(i){if(!Qt(i))return!1;var l=io(i);return l==at||l==ut||l==br||l==nl}function pC(i){return typeof i=="number"&&i==ze(i)}function I2(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Y}function Qt(i){var l=typeof i;return i!=null&&(l=="object"||l=="function")}function ir(i){return i!=null&&typeof i=="object"}var mC=Mg?Yo(Mg):tH;function QF(i,l){return i===l||m7(i,l,P7(l))}function KF(i,l,f){return f=typeof f=="function"?f:e,m7(i,l,P7(l),f)}function eD(i){return hC(i)&&i!=+i}function tD(i){if(DH(i))throw new Ve(o);return iv(i)}function rD(i){return i===null}function oD(i){return i==null}function hC(i){return typeof i=="number"||ir(i)&&io(i)==Jt}function wc(i){if(!ir(i)||io(i)!=$r)return!1;var l=J0(i);if(l===null)return!0;var f=Lt.call(l,"constructor")&&l.constructor;return typeof f=="function"&&f instanceof f&&$0.call(f)==KE}var G7=Ag?Yo(Ag):rH;function nD(i){return pC(i)&&i>=-Y&&i<=Y}var gC=Tg?Yo(Tg):oH;function S2(i){return typeof i=="string"||!Fe(i)&&ir(i)&&io(i)==z}function Qo(i){return typeof i=="symbol"||ir(i)&&io(i)==ce}var Cl=Pg?Yo(Pg):nH;function aD(i){return i===e}function iD(i){return ir(i)&&qr(i)==oe}function sD(i){return ir(i)&&io(i)==Le}var lD=h2(g7),uD=h2(function(i,l){return i<=l});function vC(i){if(!i)return[];if(_o(i))return S2(i)?Xn(i):Ro(i);if(ic&&i[ic])return ZE(i[ic]());var l=qr(i),f=l==Ye?o7:l==D?z0:wl;return f(i)}function oi(i){if(!i)return i===0?i:0;if(i=Sn(i),i===ae||i===-ae){var l=i<0?-1:1;return l*me}return i===i?i:0}function ze(i){var l=oi(i),f=l%1;return l===l?f?l-f:l:0}function CC(i){return i?X1(ze(i),0,we):0}function Sn(i){if(typeof i=="number")return i;if(Qo(i))return se;if(Qt(i)){var l=typeof i.valueOf=="function"?i.valueOf():i;i=Qt(l)?l+"":l}if(typeof i!="string")return i===0?i:+i;i=Fg(i);var f=zk.test(i);return f||Uk.test(i)?IE(i.slice(2),f?2:8):Wk.test(i)?se:+i}function wC(i){return Ra(i,Mo(i))}function cD(i){return i?X1(ze(i),-Y,Y):i===0?i:0}function gt(i){return i==null?"":Jo(i)}var dD=hl(function(i,l){if(vc(l)||_o(l)){Ra(l,kr(l),i);return}for(var f in l)Lt.call(l,f)&&dc(i,f,l[f])}),xC=hl(function(i,l){Ra(l,Mo(l),i)}),R2=hl(function(i,l,f,h){Ra(l,Mo(l),i,h)}),fD=hl(function(i,l,f,h){Ra(l,kr(l),i,h)}),pD=ei(u7);function mD(i,l){var f=ml(i);return l==null?f:Qg(f,l)}var hD=Xe(function(i,l){i=Ot(i);var f=-1,h=l.length,L=h>2?l[2]:e;for(L&&so(l[0],l[1],L)&&(h=1);++f1),R}),Ra(i,A7(i),f),h&&(f=bn(f,d|p|m,RH));for(var L=l.length;L--;)y7(f,l[L]);return f});function ED(i,l){return bC(i,L2(Ae(l)))}var OD=ei(function(i,l){return i==null?{}:sH(i,l)});function bC(i,l){if(i==null)return{};var f=Xt(A7(i),function(h){return[h]});return l=Ae(l),pv(i,f,function(h,L){return l(h,L[0])})}function HD(i,l,f){l=Bi(l,i);var h=-1,L=l.length;for(L||(L=1,i=e);++hl){var h=i;i=l,l=h}if(f||i%1||l%1){var L=Xg();return Xr(i+L*(l-i+LE("1e-"+((L+"").length-1))),l)}return C7(i,l)}var UD=gl(function(i,l,f){return l=l.toLowerCase(),i+(f?SC(l):l)});function SC(i){return j7(gt(i).toLowerCase())}function RC(i){return i=gt(i),i&&i.replace(Xk,VE).replace(pE,"")}function $D(i,l,f){i=gt(i),l=Jo(l);var h=i.length;f=f===e?h:X1(ze(f),0,h);var L=f;return f-=l.length,f>=0&&i.slice(f,L)==l}function XD(i){return i=gt(i),i&&Mk.test(i)?i.replace(og,FE):i}function qD(i){return i=gt(i),i&&Ok.test(i)?i.replace(N3,"\\$&"):i}var YD=gl(function(i,l,f){return i+(f?"-":"")+l.toLowerCase()}),JD=gl(function(i,l,f){return i+(f?" ":"")+l.toLowerCase()}),QD=Av("toLowerCase");function KD(i,l,f){i=gt(i),l=ze(l);var h=l?cl(i):0;if(!l||h>=l)return i;var L=(l-h)/2;return m2(t2(L),f)+i+m2(e2(L),f)}function eB(i,l,f){i=gt(i),l=ze(l);var h=l?cl(i):0;return l&&h>>0,f?(i=gt(i),i&&(typeof l=="string"||l!=null&&!G7(l))&&(l=Jo(l),!l&&ul(i))?Ni(Xn(i),0,f):i.split(l,f)):[]}var sB=gl(function(i,l,f){return i+(f?" ":"")+j7(l)});function lB(i,l,f){return i=gt(i),f=f==null?0:X1(ze(f),0,i.length),l=Jo(l),i.slice(f,f+l.length)==l}function uB(i,l,f){var h=S.templateSettings;f&&so(i,l,f)&&(l=e),i=gt(i),l=R2({},l,h,Vv);var L=R2({},l.imports,h.imports,Vv),R=kr(L),P=r7(L,R),O,F,$=0,X=l.interpolate||B0,K="__p += '",de=n7((l.escape||B0).source+"|"+X.source+"|"+(X===ng?Gk:B0).source+"|"+(l.evaluate||B0).source+"|$","g"),ye="//# sourceURL="+(Lt.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++CE+"]")+` +`;i.replace(de,function(Pe,Je,ot,Ko,lo,en){return ot||(ot=Ko),K+=i.slice($,en).replace(qk,DE),Je&&(O=!0,K+=`' + +__e(`+Je+`) + +'`),lo&&(F=!0,K+=`'; +`+lo+`; +__p += '`),ot&&(K+=`' + +((__t = (`+ot+`)) == null ? '' : __t) + +'`),$=en+Pe.length,Pe}),K+=`'; +`;var Te=Lt.call(l,"variable")&&l.variable;if(!Te)K=`with (obj) { +`+K+` +} +`;else if(Nk.test(Te))throw new Ve(a);K=(F?K.replace(Ik,""):K).replace(Sk,"$1").replace(Rk,"$1;"),K="function("+(Te||"obj")+`) { +`+(Te?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(O?", __e = _.escape":"")+(F?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+K+`return __p +}`;var $e=MC(function(){return ft(R,ye+"return "+K).apply(e,P)});if($e.source=K,Z7($e))throw $e;return $e}function cB(i){return gt(i).toLowerCase()}function dB(i){return gt(i).toUpperCase()}function fB(i,l,f){if(i=gt(i),i&&(f||l===e))return Fg(i);if(!i||!(l=Jo(l)))return i;var h=Xn(i),L=Xn(l),R=Dg(h,L),P=Bg(h,L)+1;return Ni(h,R,P).join("")}function pB(i,l,f){if(i=gt(i),i&&(f||l===e))return i.slice(0,Zg(i)+1);if(!i||!(l=Jo(l)))return i;var h=Xn(i),L=Bg(h,Xn(l))+1;return Ni(h,0,L).join("")}function mB(i,l,f){if(i=gt(i),i&&(f||l===e))return i.replace(Z3,"");if(!i||!(l=Jo(l)))return i;var h=Xn(i),L=Dg(h,Xn(l));return Ni(h,L).join("")}function hB(i,l){var f=H,h=J;if(Qt(l)){var L="separator"in l?l.separator:L;f="length"in l?ze(l.length):f,h="omission"in l?Jo(l.omission):h}i=gt(i);var R=i.length;if(ul(i)){var P=Xn(i);R=P.length}if(f>=R)return i;var O=f-cl(h);if(O<1)return h;var F=P?Ni(P,0,O).join(""):i.slice(0,O);if(L===e)return F+h;if(P&&(O+=F.length-O),G7(L)){if(i.slice(O).search(L)){var $,X=F;for(L.global||(L=n7(L.source,gt(ag.exec(L))+"g")),L.lastIndex=0;$=L.exec(X);)var K=$.index;F=F.slice(0,K===e?O:K)}}else if(i.indexOf(Jo(L),O)!=O){var de=F.lastIndexOf(L);de>-1&&(F=F.slice(0,de))}return F+h}function gB(i){return i=gt(i),i&&_k.test(i)?i.replace(rg,jE):i}var vB=gl(function(i,l,f){return i+(f?" ":"")+l.toUpperCase()}),j7=Av("toUpperCase");function _C(i,l,f){return i=gt(i),l=f?e:l,l===e?NE(i)?XE(i):PE(i):i.match(l)||[]}var MC=Xe(function(i,l){try{return qo(i,e,l)}catch(f){return Z7(f)?f:new Ve(f)}}),CB=ei(function(i,l){return wn(l,function(f){f=_a(f),Qa(i,f,B7(i[f],i))}),i});function wB(i){var l=i==null?0:i.length,f=Ae();return i=l?Xt(i,function(h){if(typeof h[1]!="function")throw new xn(n);return[f(h[0]),h[1]]}):[],Xe(function(h){for(var L=-1;++LY)return[];var f=we,h=Xr(i,we);l=Ae(l),i-=we;for(var L=t7(h,l);++f0||l<0)?new tt(f):(i<0?f=f.takeRight(-i):i&&(f=f.drop(i)),l!==e&&(l=ze(l),f=l<0?f.dropRight(-l):f.take(l-i)),f)},tt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},tt.prototype.toArray=function(){return this.take(we)},Sa(tt.prototype,function(i,l){var f=/^(?:filter|find|map|reject)|While$/.test(l),h=/^(?:head|last)$/.test(l),L=S[h?"take"+(l=="last"?"Right":""):l],R=h||/^find/.test(l);L&&(S.prototype[l]=function(){var P=this.__wrapped__,O=h?[1]:arguments,F=P instanceof tt,$=O[0],X=F||Fe(P),K=function(Je){var ot=L.apply(S,Ei([Je],O));return h&&de?ot[0]:ot};X&&f&&typeof $=="function"&&$.length!=1&&(F=X=!1);var de=this.__chain__,ye=!!this.__actions__.length,Te=R&&!de,$e=F&&!ye;if(!R&&X){P=$e?P:new tt(this);var Pe=i.apply(P,O);return Pe.__actions__.push({func:w2,args:[K],thisArg:e}),new yn(Pe,de)}return Te&&$e?i.apply(this,O):(Pe=this.thru(K),Te?h?Pe.value()[0]:Pe.value():Pe)})}),wn(["pop","push","shift","sort","splice","unshift"],function(i){var l=j0[i],f=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);S.prototype[i]=function(){var L=arguments;if(h&&!this.__chain__){var R=this.value();return l.apply(Fe(R)?R:[],L)}return this[f](function(P){return l.apply(Fe(P)?P:[],L)})}}),Sa(tt.prototype,function(i,l){var f=S[l];if(f){var h=f.name+"";Lt.call(pl,h)||(pl[h]=[]),pl[h].push({name:l,func:f})}}),pl[f2(e,v).name]=[{name:"wrapper",func:e}],tt.prototype.clone=gO,tt.prototype.reverse=vO,tt.prototype.value=CO,S.prototype.at=$V,S.prototype.chain=XV,S.prototype.commit=qV,S.prototype.next=YV,S.prototype.plant=QV,S.prototype.reverse=KV,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=eF,S.prototype.first=S.prototype.head,ic&&(S.prototype[ic]=JV),S},Hi=qE();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Pr._=Hi,define(function(){return Hi})):z1?((z1.exports=Hi)._=Hi,$3._=Hi):Pr._=Hi}).call(tc)});var So=N(U()),bk=N(ub());var ho=N(U());function cb(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{let t=AG(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let u=s.split(xp);return u[0]===""&&u.length!==1&&u.shift(),mb(u,t)||MG(s)},getConflictingClassGroupIds:(s,u)=>{let c=r[s]||[];return u&&o[s]?[...c,...o[s]]:c}}},mb=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?mb(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(xp);return t.validators.find(({validator:s})=>s(a))?.classGroupId},fb=/^\[(.+)\]$/,MG=e=>{if(fb.test(e)){let t=fb.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},AG=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return PG(Object.entries(e.classGroups),r).forEach(([a,s])=>{wp(s,o,a,t)}),o},wp=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:pb(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(TG(n)){wp(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,s])=>{wp(s,pb(t,a),r,o)})})},pb=(e,t)=>{let r=e;return t.split(xp).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},TG=e=>e.isThemeGetter,PG=(e,t)=>t?e.map(([r,o])=>{let n=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,u])=>[t+s,u])):a);return[r,n]}):e,kG=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,n=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=o.get(a))!==void 0)return n(a,s),s},set(a,s){r.has(a)?r.set(a,s):n(a,s)}}},hb="!",EG=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],a=t.length,s=u=>{let c=[],d=0,p=0,m;for(let b=0;bp?m-p:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:v}};return r?u=>r({className:u,parseClassName:s}):s},OG=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},HG=e=>({cache:kG(e.cacheSize),parseClassName:EG(e),..._G(e)}),VG=/\s+/,FG=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],s=e.trim().split(VG),u="";for(let c=s.length-1;c>=0;c-=1){let d=s[c],{modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=r(d),x=!!y,v=o(x?g.substring(0,y):g);if(!v){if(!x){u=d+(u.length>0?" "+u:u);continue}if(v=o(g),!v){u=d+(u.length>0?" "+u:u);continue}x=!1}let b=OG(p).join(":"),w=m?b+hb:b,C=w+v;if(a.includes(C))continue;a.push(C);let I=n(v,x);for(let _=0;_0?" "+u:u)}return u};function DG(){let e=0,t,r,o="";for(;e{if(typeof e=="string")return e;let t,r="";for(let o=0;om(p),e());return r=HG(d),o=r.cache.get,n=r.cache.set,a=u,u(c)}function u(c){let d=o(c);if(d)return d;let p=FG(c,r);return n(c,p),p}return function(){return a(DG.apply(null,arguments))}}var Ut=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},vb=/^\[(?:([a-z-]+):)?(.+)\]$/i,NG=/^\d+\/\d+$/,ZG=new Set(["px","full","screen"]),GG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WG=/\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$/,zG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,jG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hi=e=>Yl(e)||ZG.has(e)||NG.test(e),u1=e=>Jl(e,"length",eW),Yl=e=>!!e&&!Number.isNaN(Number(e)),Cp=e=>Jl(e,"number",Yl),fd=e=>!!e&&Number.isInteger(Number(e)),$G=e=>e.endsWith("%")&&Yl(e.slice(0,-1)),je=e=>vb.test(e),c1=e=>GG.test(e),XG=new Set(["length","size","percentage"]),qG=e=>Jl(e,XG,Cb),YG=e=>Jl(e,"position",Cb),JG=new Set(["image","url"]),QG=e=>Jl(e,JG,rW),KG=e=>Jl(e,"",tW),pd=()=>!0,Jl=(e,t,r)=>{let o=vb.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},eW=e=>WG.test(e)&&!zG.test(e),Cb=()=>!1,tW=e=>jG.test(e),rW=e=>UG.test(e);var oW=()=>{let e=Ut("colors"),t=Ut("spacing"),r=Ut("blur"),o=Ut("brightness"),n=Ut("borderColor"),a=Ut("borderRadius"),s=Ut("borderSpacing"),u=Ut("borderWidth"),c=Ut("contrast"),d=Ut("grayscale"),p=Ut("hueRotate"),m=Ut("invert"),g=Ut("gap"),y=Ut("gradientColorStops"),x=Ut("gradientColorStopPositions"),v=Ut("inset"),b=Ut("margin"),w=Ut("opacity"),C=Ut("padding"),I=Ut("saturate"),_=Ut("scale"),M=Ut("sepia"),T=Ut("skew"),A=Ut("space"),H=Ut("translate"),J=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",je,t],W=()=>[je,t],ie=()=>["",hi,u1],q=()=>["auto",Yl,je],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>["start","end","center","between","around","evenly","stretch"],we=()=>["","0",je],Ke=()=>["auto","avoid","all","avoid-page","page","left","right","column"],xt=()=>[Yl,je];return{cacheSize:500,separator:":",theme:{colors:[pd],spacing:[hi,u1],blur:["none","",c1,je],brightness:xt(),borderColor:[e],borderRadius:["none","","full",c1,je],borderSpacing:W(),borderWidth:ie(),contrast:xt(),grayscale:we(),hueRotate:xt(),invert:we(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[$G,u1],inset:Q(),margin:Q(),opacity:xt(),padding:W(),saturate:xt(),scale:xt(),sepia:we(),skew:xt(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",je]}],container:["container"],columns:[{columns:[c1]}],"break-after":[{"break-after":Ke()}],"break-before":[{"break-before":Ke()}],"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"],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:[...ae(),je]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fd,je]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",je]}],grow:[{grow:we()}],shrink:[{shrink:we()}],order:[{order:["first","last","none",fd,je]}],"grid-cols":[{"grid-cols":[pd]}],"col-start-end":[{col:["auto",{span:["full",fd,je]},je]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[pd]}],"row-start-end":[{row:["auto",{span:[fd,je]},je]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",je,t]}],"min-w":[{"min-w":[je,t,"min","max","fit"]}],"max-w":[{"max-w":[je,t,"none","full","min","max","fit","prose",{screen:[c1]},c1]}],h:[{h:[je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",c1,u1]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Cp]}],"font-family":[{font:[pd]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",je]}],"line-clamp":[{"line-clamp":["none",Yl,Cp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hi,je]}],"list-image":[{"list-image":["none",je]}],"list-style-type":[{list:["none","disc","decimal",je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hi,u1]}],"underline-offset":[{"underline-offset":["auto",hi,je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),YG]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qG]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},QG]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:Y()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[hi,je]}],"outline-w":[{outline:[hi,u1]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[hi,u1]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",c1,KG]}],"shadow-color":[{shadow:[pd]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":me()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",c1,je]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[I]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",je]}],duration:[{duration:xt()}],ease:[{ease:["linear","in","out","in-out",je]}],delay:[{delay:xt()}],animate:[{animate:["none","spin","ping","pulse","bounce",je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[fd,je]}],"translate-x":[{"translate-x":[H]}],"translate-y":[{"translate-y":[H]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",je]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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",je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hi,u1,Cp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var wb=BG(oW);function ee(...e){return wb(db(e))}var gi=N(U());var md=gi.default.forwardRef(({href:e,className:t,...r},o)=>gi.default.createElement("a",{ref:o,href:e,className:ee("hover:border-slate-400 dark:hover:border-slate-500 text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-300",t),...r}));md.displayName="Link";var Yf=gi.default.forwardRef(({href:e,className:t,...r},o)=>{let[n,a]=(0,gi.useState)(!1);return(0,gi.useEffect)(()=>{let s=()=>{a(window.location.hash===e)};return s(),window.addEventListener("popstate",s),()=>{window.removeEventListener("popstate",s)}},[e]),gi.default.createElement(md,{ref:o,href:e,className:ee({"underline decoration-2 underline-offset-8":n},t),...r})});Yf.displayName="NavLink";var Qf=N(U());var xb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jf=(...e)=>e.filter((t,r,o)=>!!t&&o.indexOf(t)===r).join(" ");var hd=N(U());var yb={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"};var bb=(0,hd.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:s,...u},c)=>(0,hd.createElement)("svg",{ref:c,...yb,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Jf("lucide",n),...u},[...s.map(([d,p])=>(0,hd.createElement)(d,p)),...Array.isArray(a)?a:[a]]));var vt=(e,t)=>{let r=(0,Qf.forwardRef)(({className:o,...n},a)=>(0,Qf.createElement)(bb,{ref:a,iconNode:t,className:Jf(`lucide-${xb(e)}`,o),...n}));return r.displayName=`${e}`,r};var gd=vt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Ql=vt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var vd=vt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Cd=vt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var wd=vt("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);var ms=vt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);var xd=vt("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);var hs=vt("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var gs=vt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var yd=vt("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var vs=vt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var bd=vt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);var Ld=vt("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);var d1=vt("TriangleAlert",[["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"}]]);var vi=vt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var dn=N(U());function Id(e,t){return function(){return e.apply(t,arguments)}}var{toString:nW}=Object.prototype,{getPrototypeOf:Lp}=Object,e9=(e=>t=>{let r=nW.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ia=e=>(e=e.toLowerCase(),t=>e9(t)===e),t9=e=>t=>typeof t===e,{isArray:Kl}=Array,Sd=t9("undefined");function aW(e){return e!==null&&!Sd(e)&&e.constructor!==null&&!Sd(e.constructor)&&ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Sb=ia("ArrayBuffer");function iW(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sb(e.buffer),t}var sW=t9("string"),ln=t9("function"),Rb=t9("number"),r9=e=>e!==null&&typeof e=="object",lW=e=>e===!0||e===!1,Kf=e=>{if(e9(e)!=="object")return!1;let t=Lp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},uW=ia("Date"),cW=ia("File"),dW=ia("Blob"),fW=ia("FileList"),pW=e=>r9(e)&&ln(e.pipe),mW=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ln(e.append)&&((t=e9(e))==="formdata"||t==="object"&&ln(e.toString)&&e.toString()==="[object FormData]"))},hW=ia("URLSearchParams"),[gW,vW,CW,wW]=["ReadableStream","Request","Response","Headers"].map(ia),xW=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rd(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,n;if(typeof e!="object"&&(e=[e]),Kl(e))for(o=0,n=e.length;o0;)if(n=r[o],t===n.toLowerCase())return n;return null}var Cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mb=e=>!Sd(e)&&e!==Cs;function bp(){let{caseless:e}=Mb(this)&&this||{},t={},r=(o,n)=>{let a=e&&_b(t,n)||n;Kf(t[a])&&Kf(o)?t[a]=bp(t[a],o):Kf(o)?t[a]=bp({},o):Kl(o)?t[a]=o.slice():t[a]=o};for(let o=0,n=arguments.length;o(Rd(t,(n,a)=>{r&&ln(n)?e[a]=Id(n,r):e[a]=n},{allOwnKeys:o}),e),bW=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),LW=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},IW=(e,t,r,o)=>{let n,a,s,u={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)s=n[a],(!o||o(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=r!==!1&&Lp(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},SW=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let o=e.indexOf(t,r);return o!==-1&&o===r},RW=e=>{if(!e)return null;if(Kl(e))return e;let t=e.length;if(!Rb(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},_W=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lp(Uint8Array)),MW=(e,t)=>{let o=(e&&e[Symbol.iterator]).call(e),n;for(;(n=o.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},AW=(e,t)=>{let r,o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},TW=ia("HTMLFormElement"),PW=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),Lb=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),kW=ia("RegExp"),Ab=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),o={};Rd(r,(n,a)=>{let s;(s=t(n,a,e))!==!1&&(o[a]=s||n)}),Object.defineProperties(e,o)},EW=e=>{Ab(e,(t,r)=>{if(ln(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=e[r];if(ln(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},OW=(e,t)=>{let r={},o=n=>{n.forEach(a=>{r[a]=!0})};return Kl(e)?o(e):o(String(e).split(t)),r},HW=()=>{},VW=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,yp="abcdefghijklmnopqrstuvwxyz",Ib="0123456789",Tb={DIGIT:Ib,ALPHA:yp,ALPHA_DIGIT:yp+yp.toUpperCase()+Ib},FW=(e=16,t=Tb.ALPHA_DIGIT)=>{let r="",{length:o}=t;for(;e--;)r+=t[Math.random()*o|0];return r};function DW(e){return!!(e&&ln(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var BW=e=>{let t=new Array(10),r=(o,n)=>{if(r9(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[n]=o;let a=Kl(o)?[]:{};return Rd(o,(s,u)=>{let c=r(s,n+1);!Sd(c)&&(a[u]=c)}),t[n]=void 0,a}}return o};return r(e,0)},NW=ia("AsyncFunction"),ZW=e=>e&&(r9(e)||ln(e))&&ln(e.then)&&ln(e.catch),Pb=((e,t)=>e?setImmediate:t?((r,o)=>(Cs.addEventListener("message",({source:n,data:a})=>{n===Cs&&a===r&&o.length&&o.shift()()},!1),n=>{o.push(n),Cs.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ln(Cs.postMessage)),GW=typeof queueMicrotask<"u"?queueMicrotask.bind(Cs):typeof process<"u"&&process.nextTick||Pb,B={isArray:Kl,isArrayBuffer:Sb,isBuffer:aW,isFormData:mW,isArrayBufferView:iW,isString:sW,isNumber:Rb,isBoolean:lW,isObject:r9,isPlainObject:Kf,isReadableStream:gW,isRequest:vW,isResponse:CW,isHeaders:wW,isUndefined:Sd,isDate:uW,isFile:cW,isBlob:dW,isRegExp:kW,isFunction:ln,isStream:pW,isURLSearchParams:hW,isTypedArray:_W,isFileList:fW,forEach:Rd,merge:bp,extend:yW,trim:xW,stripBOM:bW,inherits:LW,toFlatObject:IW,kindOf:e9,kindOfTest:ia,endsWith:SW,toArray:RW,forEachEntry:MW,matchAll:AW,isHTMLForm:TW,hasOwnProperty:Lb,hasOwnProp:Lb,reduceDescriptors:Ab,freezeMethods:EW,toObjectSet:OW,toCamelCase:PW,noop:HW,toFiniteNumber:VW,findKey:_b,global:Cs,isContextDefined:Mb,ALPHABET:Tb,generateString:FW,isSpecCompliantForm:DW,toJSONObject:BW,isAsyncFn:NW,isThenable:ZW,setImmediate:Pb,asap:GW};function eu(e,t,r,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}B.inherits(eu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}});var kb=eu.prototype,Eb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Eb[e]={value:e}});Object.defineProperties(eu,Eb);Object.defineProperty(kb,"isAxiosError",{value:!0});eu.from=(e,t,r,o,n,a)=>{let s=Object.create(kb);return B.toFlatObject(e,s,function(c){return c!==Error.prototype},u=>u!=="isAxiosError"),eu.call(s,e.message,t,r,o,n),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};var He=eu;var o9=null;function Ip(e){return B.isPlainObject(e)||B.isArray(e)}function Hb(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function Ob(e,t,r){return e?e.concat(t).map(function(n,a){return n=Hb(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function WW(e){return B.isArray(e)&&!e.some(Ip)}var zW=B.toFlatObject(B,{},null,function(t){return/^is[A-Z]/.test(t)});function jW(e,t,r){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new(o9||FormData),r=B.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!B.isUndefined(b[v])});let o=r.metaTokens,n=r.visitor||p,a=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(n))throw new TypeError("visitor must be a function");function d(x){if(x===null)return"";if(B.isDate(x))return x.toISOString();if(!c&&B.isBlob(x))throw new He("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(x)||B.isTypedArray(x)?c&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,v,b){let w=x;if(x&&!b&&typeof x=="object"){if(B.endsWith(v,"{}"))v=o?v:v.slice(0,-2),x=JSON.stringify(x);else if(B.isArray(x)&&WW(x)||(B.isFileList(x)||B.endsWith(v,"[]"))&&(w=B.toArray(x)))return v=Hb(v),w.forEach(function(I,_){!(B.isUndefined(I)||I===null)&&t.append(s===!0?Ob([v],_,a):s===null?v:v+"[]",d(I))}),!1}return Ip(x)?!0:(t.append(Ob(b,v,a),d(x)),!1)}let m=[],g=Object.assign(zW,{defaultVisitor:p,convertValue:d,isVisitable:Ip});function y(x,v){if(!B.isUndefined(x)){if(m.indexOf(x)!==-1)throw Error("Circular reference detected in "+v.join("."));m.push(x),B.forEach(x,function(w,C){(!(B.isUndefined(w)||w===null)&&n.call(t,w,B.isString(C)?C.trim():C,v,g))===!0&&y(w,v?v.concat(C):[C])}),m.pop()}}if(!B.isObject(e))throw new TypeError("data must be an object");return y(e),t}var f1=jW;function Vb(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Fb(e,t){this._pairs=[],e&&f1(e,this,t)}var Db=Fb.prototype;Db.append=function(t,r){this._pairs.push([t,r])};Db.toString=function(t){let r=t?function(o){return t.call(this,o,Vb)}:Vb;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var n9=Fb;function UW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _d(e,t,r){if(!t)return e;let o=r&&r.encode||UW,n=r&&r.serialize,a;if(n?a=n(t,r):a=B.isURLSearchParams(t)?t.toString():new n9(t,r).toString(o),a){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var Sp=class{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){B.forEach(this.handlers,function(o){o!==null&&t(o)})}},Rp=Sp;var a9={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Bb=typeof URLSearchParams<"u"?URLSearchParams:n9;var Nb=typeof FormData<"u"?FormData:null;var Zb=typeof Blob<"u"?Blob:null;var Gb={isBrowser:!0,classes:{URLSearchParams:Bb,FormData:Nb,Blob:Zb},protocols:["http","https","file","blob","url","data"]};var Ap={};lN(Ap,{hasBrowserEnv:()=>Mp,hasStandardBrowserEnv:()=>$W,hasStandardBrowserWebWorkerEnv:()=>XW,navigator:()=>_p,origin:()=>qW});var Mp=typeof window<"u"&&typeof document<"u",_p=typeof navigator=="object"&&navigator||void 0,$W=Mp&&(!_p||["ReactNative","NativeScript","NS"].indexOf(_p.product)<0),XW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qW=Mp&&window.location.href||"http://localhost";var mr={...Ap,...Gb};function Tp(e,t){return f1(e,new mr.classes.URLSearchParams,Object.assign({visitor:function(r,o,n,a){return mr.isNode&&B.isBuffer(r)?(this.append(o,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function YW(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function JW(e){let t={},r=Object.keys(e),o,n=r.length,a;for(o=0;o=r.length;return s=!s&&B.isArray(n)?n.length:s,c?(B.hasOwnProp(n,s)?n[s]=[n[s],o]:n[s]=o,!u):((!n[s]||!B.isObject(n[s]))&&(n[s]=[]),t(r,o,n[s],a)&&B.isArray(n[s])&&(n[s]=JW(n[s])),!u)}if(B.isFormData(e)&&B.isFunction(e.entries)){let r={};return B.forEachEntry(e,(o,n)=>{t(YW(o),n,r,0)}),r}return null}var i9=QW;function KW(e,t,r){if(B.isString(e))try{return(t||JSON.parse)(e),B.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var Pp={transitional:a9,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let o=r.getContentType()||"",n=o.indexOf("application/json")>-1,a=B.isObject(t);if(a&&B.isHTMLForm(t)&&(t=new FormData(t)),B.isFormData(t))return n?JSON.stringify(i9(t)):t;if(B.isArrayBuffer(t)||B.isBuffer(t)||B.isStream(t)||B.isFile(t)||B.isBlob(t)||B.isReadableStream(t))return t;if(B.isArrayBufferView(t))return t.buffer;if(B.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Tp(t,this.formSerializer).toString();if((u=B.isFileList(t))||o.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return f1(u?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),KW(t)):t}],transformResponse:[function(t){let r=this.transitional||Pp.transitional,o=r&&r.forcedJSONParsing,n=this.responseType==="json";if(B.isResponse(t)||B.isReadableStream(t))return t;if(t&&B.isString(t)&&(o&&!this.responseType||n)){let s=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?He.from(u,He.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mr.classes.FormData,Blob:mr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],e=>{Pp.headers[e]={}});var tu=Pp;var ez=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wb=e=>{let t={},r,o,n;return e&&e.split(` +`).forEach(function(s){n=s.indexOf(":"),r=s.substring(0,n).trim().toLowerCase(),o=s.substring(n+1).trim(),!(!r||t[r]&&ez[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};var zb=Symbol("internals");function Md(e){return e&&String(e).trim().toLowerCase()}function s9(e){return e===!1||e==null?e:B.isArray(e)?e.map(s9):String(e)}function tz(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}var rz=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function kp(e,t,r,o,n){if(B.isFunction(o))return o.call(this,t,r);if(n&&(t=r),!!B.isString(t)){if(B.isString(o))return t.indexOf(o)!==-1;if(B.isRegExp(o))return o.test(t)}}function oz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function nz(e,t){let r=B.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(n,a,s){return this[o].call(this,t,n,a,s)},configurable:!0})})}var ru=class{constructor(t){t&&this.set(t)}set(t,r,o){let n=this;function a(u,c,d){let p=Md(c);if(!p)throw new Error("header name must be a non-empty string");let m=B.findKey(n,p);(!m||n[m]===void 0||d===!0||d===void 0&&n[m]!==!1)&&(n[m||c]=s9(u))}let s=(u,c)=>B.forEach(u,(d,p)=>a(d,p,c));if(B.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(B.isString(t)&&(t=t.trim())&&!rz(t))s(Wb(t),r);else if(B.isHeaders(t))for(let[u,c]of t.entries())a(c,u,o);else t!=null&&a(r,t,o);return this}get(t,r){if(t=Md(t),t){let o=B.findKey(this,t);if(o){let n=this[o];if(!r)return n;if(r===!0)return tz(n);if(B.isFunction(r))return r.call(this,n,o);if(B.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Md(t),t){let o=B.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||kp(this,this[o],o,r)))}return!1}delete(t,r){let o=this,n=!1;function a(s){if(s=Md(s),s){let u=B.findKey(o,s);u&&(!r||kp(o,o[u],u,r))&&(delete o[u],n=!0)}}return B.isArray(t)?t.forEach(a):a(t),n}clear(t){let r=Object.keys(this),o=r.length,n=!1;for(;o--;){let a=r[o];(!t||kp(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,o={};return B.forEach(this,(n,a)=>{let s=B.findKey(o,a);if(s){r[s]=s9(n),delete r[a];return}let u=t?oz(a):String(a).trim();u!==a&&delete r[a],r[u]=s9(n),o[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return B.forEach(this,(o,n)=>{o!=null&&o!==!1&&(r[n]=t&&B.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let o=new this(t);return r.forEach(n=>o.set(n)),o}static accessor(t){let o=(this[zb]=this[zb]={accessors:{}}).accessors,n=this.prototype;function a(s){let u=Md(s);o[u]||(nz(n,s),o[u]=!0)}return B.isArray(t)?t.forEach(a):a(t),this}};ru.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(ru.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}});B.freezeMethods(ru);var _r=ru;function Ad(e,t){let r=this||tu,o=t||r,n=_r.from(o.headers),a=o.data;return B.forEach(e,function(u){a=u.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function Td(e){return!!(e&&e.__CANCEL__)}function jb(e,t,r){He.call(this,e??"canceled",He.ERR_CANCELED,t,r),this.name="CanceledError"}B.inherits(jb,He,{__CANCEL__:!0});var Ha=jb;function Pd(e,t,r){let o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new He("Request failed with status code "+r.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ep(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function az(e,t){e=e||10;let r=new Array(e),o=new Array(e),n=0,a=0,s;return t=t!==void 0?t:1e3,function(c){let d=Date.now(),p=o[a];s||(s=d),r[n]=c,o[n]=d;let m=a,g=0;for(;m!==n;)g+=r[m++],m=m%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),d-s{r=p,n=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{let p=Date.now(),m=p-r;m>=o?s(d,p):(n=d,a||(a=setTimeout(()=>{a=null,s(n)},o-m)))},()=>n&&s(n)]}var $b=iz;var ou=(e,t,r=3)=>{let o=0,n=Ub(50,250);return $b(a=>{let s=a.loaded,u=a.lengthComputable?a.total:void 0,c=s-o,d=n(c),p=s<=u;o=s;let m={loaded:s,total:u,progress:u?s/u:void 0,bytes:c,rate:d||void 0,estimated:d&&u&&p?(u-s)/d:void 0,event:a,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(m)},r)},Op=(e,t)=>{let r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Hp=e=>(...t)=>B.asap(()=>e(...t));var Xb=mr.hasStandardBrowserEnv?function(){let t=mr.navigator&&/(msie|trident)/i.test(mr.navigator.userAgent),r=document.createElement("a"),o;function n(a){let s=a;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=n(window.location.href),function(s){let u=B.isString(s)?n(s):s;return u.protocol===o.protocol&&u.host===o.host}}():function(){return function(){return!0}}();var qb=mr.hasStandardBrowserEnv?{write(e,t,r,o,n,a){let s=[e+"="+encodeURIComponent(t)];B.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),B.isString(o)&&s.push("path="+o),B.isString(n)&&s.push("domain="+n),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Fp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function kd(e,t){return e&&!Vp(t)?Fp(e,t):t}var Yb=e=>e instanceof _r?{...e}:e;function sa(e,t){t=t||{};let r={};function o(d,p,m){return B.isPlainObject(d)&&B.isPlainObject(p)?B.merge.call({caseless:m},d,p):B.isPlainObject(p)?B.merge({},p):B.isArray(p)?p.slice():p}function n(d,p,m){if(B.isUndefined(p)){if(!B.isUndefined(d))return o(void 0,d,m)}else return o(d,p,m)}function a(d,p){if(!B.isUndefined(p))return o(void 0,p)}function s(d,p){if(B.isUndefined(p)){if(!B.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function u(d,p,m){if(m in t)return o(d,p);if(m in e)return o(void 0,d)}let c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(d,p)=>n(Yb(d),Yb(p),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),function(p){let m=c[p]||n,g=m(e[p],t[p],p);B.isUndefined(g)&&m!==u||(r[p]=g)}),r}var l9=e=>{let t=sa({},e),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:a,headers:s,auth:u}=t;t.headers=s=_r.from(s),t.url=_d(kd(t.baseURL,t.url),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let c;if(B.isFormData(r)){if(mr.hasStandardBrowserEnv||mr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){let[d,...p]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([d||"multipart/form-data",...p].join("; "))}}if(mr.hasStandardBrowserEnv&&(o&&B.isFunction(o)&&(o=o(t)),o||o!==!1&&Xb(t.url))){let d=n&&a&&qb.read(a);d&&s.set(n,d)}return t};var sz=typeof XMLHttpRequest<"u",Jb=sz&&function(e){return new Promise(function(r,o){let n=l9(e),a=n.data,s=_r.from(n.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:d}=n,p,m,g,y,x;function v(){y&&y(),x&&x(),n.cancelToken&&n.cancelToken.unsubscribe(p),n.signal&&n.signal.removeEventListener("abort",p)}let b=new XMLHttpRequest;b.open(n.method.toUpperCase(),n.url,!0),b.timeout=n.timeout;function w(){if(!b)return;let I=_r.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:I,config:e,request:b};Pd(function(A){r(A),v()},function(A){o(A),v()},M),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(o(new He("Request aborted",He.ECONNABORTED,e,b)),b=null)},b.onerror=function(){o(new He("Network Error",He.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let _=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",M=n.transitional||a9;n.timeoutErrorMessage&&(_=n.timeoutErrorMessage),o(new He(_,M.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,b)),b=null},a===void 0&&s.setContentType(null),"setRequestHeader"in b&&B.forEach(s.toJSON(),function(_,M){b.setRequestHeader(M,_)}),B.isUndefined(n.withCredentials)||(b.withCredentials=!!n.withCredentials),u&&u!=="json"&&(b.responseType=n.responseType),d&&([g,x]=ou(d,!0),b.addEventListener("progress",g)),c&&b.upload&&([m,y]=ou(c),b.upload.addEventListener("progress",m),b.upload.addEventListener("loadend",y)),(n.cancelToken||n.signal)&&(p=I=>{b&&(o(!I||I.type?new Ha(null,e,b):I),b.abort(),b=null)},n.cancelToken&&n.cancelToken.subscribe(p),n.signal&&(n.signal.aborted?p():n.signal.addEventListener("abort",p)));let C=Ep(n.url);if(C&&mr.protocols.indexOf(C)===-1){o(new He("Unsupported protocol "+C+":",He.ERR_BAD_REQUEST,e));return}b.send(a||null)})};var lz=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,n,a=function(d){if(!n){n=!0,u();let p=d instanceof Error?d:this.reason;o.abort(p instanceof He?p:new Ha(p instanceof Error?p.message:p))}},s=t&&setTimeout(()=>{s=null,a(new He(`timeout ${t} of ms exceeded`,He.ETIMEDOUT))},t),u=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));let{signal:c}=o;return c.unsubscribe=()=>B.asap(u),c}},Qb=lz;var uz=function*(e,t){let r=e.byteLength;if(!t||r{let n=cz(e,t),a=0,s,u=c=>{s||(s=!0,o&&o(c))};return new ReadableStream({async pull(c){try{let{done:d,value:p}=await n.next();if(d){u(),c.close();return}let m=p.byteLength;if(r){let g=a+=m;r(g)}c.enqueue(new Uint8Array(p))}catch(d){throw u(d),d}},cancel(c){return u(c),n.return()}},{highWaterMark:2})};var c9=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",eL=c9&&typeof ReadableStream=="function",fz=c9&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),tL=(e,...t)=>{try{return!!e(...t)}catch{return!1}},pz=eL&&tL(()=>{let e=!1,t=new Request(mr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Kb=64*1024,Bp=eL&&tL(()=>B.isReadableStream(new Response("").body)),u9={stream:Bp&&(e=>e.body)};c9&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!u9[t]&&(u9[t]=B.isFunction(e[t])?r=>r[t]():(r,o)=>{throw new He(`Response type '${t}' is not supported`,He.ERR_NOT_SUPPORT,o)})})})(new Response);var mz=async e=>{if(e==null)return 0;if(B.isBlob(e))return e.size;if(B.isSpecCompliantForm(e))return(await new Request(mr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(B.isArrayBufferView(e)||B.isArrayBuffer(e))return e.byteLength;if(B.isURLSearchParams(e)&&(e=e+""),B.isString(e))return(await fz(e)).byteLength},hz=async(e,t)=>{let r=B.toFiniteNumber(e.getContentLength());return r??mz(t)},rL=c9&&(async e=>{let{url:t,method:r,data:o,signal:n,cancelToken:a,timeout:s,onDownloadProgress:u,onUploadProgress:c,responseType:d,headers:p,withCredentials:m="same-origin",fetchOptions:g}=l9(e);d=d?(d+"").toLowerCase():"text";let y=Qb([n,a&&a.toAbortSignal()],s),x,v=y&&y.unsubscribe&&(()=>{y.unsubscribe()}),b;try{if(c&&pz&&r!=="get"&&r!=="head"&&(b=await hz(p,o))!==0){let M=new Request(t,{method:"POST",body:o,duplex:"half"}),T;if(B.isFormData(o)&&(T=M.headers.get("content-type"))&&p.setContentType(T),M.body){let[A,H]=Op(b,ou(Hp(c)));o=Dp(M.body,Kb,A,H)}}B.isString(m)||(m=m?"include":"omit");let w="credentials"in Request.prototype;x=new Request(t,{...g,signal:y,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:o,duplex:"half",credentials:w?m:void 0});let C=await fetch(x),I=Bp&&(d==="stream"||d==="response");if(Bp&&(u||I&&v)){let M={};["status","statusText","headers"].forEach(J=>{M[J]=C[J]});let T=B.toFiniteNumber(C.headers.get("content-length")),[A,H]=u&&Op(T,ou(Hp(u),!0))||[];C=new Response(Dp(C.body,Kb,A,()=>{H&&H(),v&&v()}),M)}d=d||"text";let _=await u9[B.findKey(u9,d)||"text"](C,e);return!I&&v&&v(),await new Promise((M,T)=>{Pd(M,T,{data:_,headers:_r.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:x})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,e,x),{cause:w.cause||w}):He.from(w,w&&w.code,e,x)}});var Np={http:o9,xhr:Jb,fetch:rL};B.forEach(Np,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var oL=e=>`- ${e}`,gz=e=>B.isFunction(e)||e===null||e===!1,d9={getAdapter:e=>{e=B.isArray(e)?e:[e];let{length:t}=e,r,o,n={};for(let a=0;a`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build")),s=t?a.length>1?`since : +`+a.map(oL).join(` +`):" "+oL(a[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o},adapters:Np};function Zp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ha(null,e)}function f9(e){return Zp(e),e.headers=_r.from(e.headers),e.data=Ad.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),d9.getAdapter(e.adapter||tu.adapter)(e).then(function(o){return Zp(e),o.data=Ad.call(e,e.transformResponse,o),o.headers=_r.from(o.headers),o},function(o){return Td(o)||(Zp(e),o&&o.response&&(o.response.data=Ad.call(e,e.transformResponse,o.response),o.response.headers=_r.from(o.response.headers))),Promise.reject(o)})}var p9="1.7.7";var Gp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gp[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var nL={};Gp.transitional=function(t,r,o){function n(a,s){return"[Axios v"+p9+"] Transitional option '"+a+"'"+s+(o?". "+o:"")}return(a,s,u)=>{if(t===!1)throw new He(n(s," has been removed"+(r?" in "+r:"")),He.ERR_DEPRECATED);return r&&!nL[s]&&(nL[s]=!0,console.warn(n(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,u):!0}};function vz(e,t,r){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);let o=Object.keys(e),n=o.length;for(;n-- >0;){let a=o[n],s=t[a];if(s){let u=e[a],c=u===void 0||s(u,a,e);if(c!==!0)throw new He("option "+a+" must be "+c,He.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}var m9={assertOptions:vz,validators:Gp};var p1=m9.validators,nu=class{constructor(t){this.defaults=t,this.interceptors={request:new Rp,response:new Rp}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;let a=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` +`+a):o.stack=a}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=sa(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:a}=r;o!==void 0&&m9.assertOptions(o,{silentJSONParsing:p1.transitional(p1.boolean),forcedJSONParsing:p1.transitional(p1.boolean),clarifyTimeoutError:p1.transitional(p1.boolean)},!1),n!=null&&(B.isFunction(n)?r.paramsSerializer={serialize:n}:m9.assertOptions(n,{encode:p1.function,serialize:p1.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=a&&B.merge(a.common,a[r.method]);a&&B.forEach(["delete","get","head","post","put","patch","common"],x=>{delete a[x]}),r.headers=_r.concat(s,a);let u=[],c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(c=c&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});let d=[];this.interceptors.response.forEach(function(v){d.push(v.fulfilled,v.rejected)});let p,m=0,g;if(!c){let x=[f9.bind(this),void 0];for(x.unshift.apply(x,u),x.push.apply(x,d),g=x.length,p=Promise.resolve(r);m{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](n);o._listeners=null}),this.promise.then=n=>{let a,s=new Promise(u=>{o.subscribe(u),a=u}).then(n);return s.cancel=function(){o.unsubscribe(a)},s},t(function(a,s,u){o.reason||(o.reason=new Ha(a,s,u),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},aL=Wp;function zp(e){return function(r){return e.apply(null,r)}}function jp(e){return B.isObject(e)&&e.isAxiosError===!0}var Up={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Up).forEach(([e,t])=>{Up[t]=e});var iL=Up;function sL(e){let t=new Ed(e),r=Id(Ed.prototype.request,t);return B.extend(r,Ed.prototype,t,{allOwnKeys:!0}),B.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return sL(sa(e,n))},r}var Cr=sL(tu);Cr.Axios=Ed;Cr.CanceledError=Ha;Cr.CancelToken=aL;Cr.isCancel=Td;Cr.VERSION=p9;Cr.toFormData=f1;Cr.AxiosError=He;Cr.Cancel=Cr.CanceledError;Cr.all=function(t){return Promise.all(t)};Cr.spread=zp;Cr.isAxiosError=jp;Cr.mergeConfig=sa;Cr.AxiosHeaders=_r;Cr.formToJSON=e=>i9(B.isHTMLForm(e)?new FormData(e):e);Cr.getAdapter=d9.getAdapter;Cr.HttpStatusCode=iL;Cr.default=Cr;var h9=Cr;var{Axios:Ene,AxiosError:Cz,CanceledError:One,isCancel:Hne,CancelToken:Vne,VERSION:Fne,all:Dne,Cancel:Bne,isAxiosError:Nne,spread:Zne,toFormData:Gne,AxiosHeaders:Wne,HttpStatusCode:zne,formToJSON:jne,getAdapter:Une,mergeConfig:$ne}=h9;var it;(function(e){e.assertEqual=n=>n;function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let a={};for(let s of n)a[s]=s;return a},e.getValidEnumValues=n=>{let a=e.objectKeys(n).filter(u=>typeof n[n[u]]!="number"),s={};for(let u of a)s[u]=n[u];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(a){return n[a]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&a.push(s);return a},e.find=(n,a)=>{for(let s of n)if(a(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function o(n,a=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=o,e.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(it||(it={}));var Xp;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Xp||(Xp={}));var he=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),m1=e=>{switch(typeof e){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(e)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(e)?he.array:e===null?he.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?he.promise:typeof Map<"u"&&e instanceof Map?he.map:typeof Set<"u"&&e instanceof Set?he.set:typeof Date<"u"&&e instanceof Date?he.date:he.object;default:return he.unknown}},re=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wz=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),un=class e extends Error{constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(a){return a.message},o={_errors:[]},n=a=>{for(let s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let u=o,c=0;for(;cr.message){let r={},o=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};un.create=e=>new un(e);var su=(e,t)=>{let r;switch(e.code){case re.invalid_type:e.received===he.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:r=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case re.invalid_union:r="Invalid input";break;case re.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case re.invalid_enum_value:r=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:r="Invalid function arguments";break;case re.invalid_return_type:r="Invalid function return type";break;case re.invalid_date:r="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case re.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case re.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case re.custom:r="Invalid input";break;case re.invalid_intersection_types:r="Intersection results could not be merged";break;case re.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:r="Number must be finite";break;default:r=t.defaultError,it.assertNever(e)}return{message:r}},cL=su;function xz(e){cL=e}function g9(){return cL}var v9=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,a=[...r,...n.path||[]],s={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let u="",c=o.filter(d=>!!d).slice().reverse();for(let d of c)u=d(s,{data:t,defaultError:u}).message;return{...n,path:a,message:u}},yz=[];function pe(e,t){let r=g9(),o=v9({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===su?void 0:su].filter(n=>!!n)});e.common.issues.push(o)}var to=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return Oe;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let a=await n.key,s=await n.value;o.push({key:a,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:a,value:s}=n;if(a.status==="aborted"||s.status==="aborted")return Oe;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[a.value]=s.value)}return{status:t.value,value:o}}},Oe=Object.freeze({status:"aborted"}),iu=e=>({status:"dirty",value:e}),mo=e=>({status:"valid",value:e}),qp=e=>e.status==="aborted",Yp=e=>e.status==="dirty",Vd=e=>e.status==="valid",Fd=e=>typeof Promise<"u"&&e instanceof Promise;function C9(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)}function dL(e,t,r,o,n){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r}var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));var Od,Hd,On=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},lL=(e,t)=>{if(Vd(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new un(e.common.issues);return this._error=r,this._error}}};function Ne(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,u)=>{var c,d;let{message:p}=e;return s.code==="invalid_enum_value"?{message:p??u.defaultError}:typeof u.data>"u"?{message:(c=p??o)!==null&&c!==void 0?c:u.defaultError}:s.code!=="invalid_type"?{message:u.defaultError}:{message:(d=p??r)!==null&&d!==void 0?d:u.defaultError}},description:n}}var Ze=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return m1(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:m1(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new to,ctx:{common:t.parent.common,data:t.data,parsedType:m1(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Fd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){var o;let n={common:{issues:[],async:(o=r?.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:m1(t)},a=this._parseSync({data:t,path:n.path,parent:n});return lL(n,a)}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:m1(t)},n=this._parse({data:t,path:o.path,parent:o}),a=await(Fd(n)?n:Promise.resolve(n));return lL(o,a)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,a)=>{let s=t(n),u=()=>a.addIssue({code:re.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(u(),!1)):s?!0:(u(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new cn({schema:this,typeName:ke.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return En.create(this,this._def)}nullable(){return Fa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xi.create(this,this._def)}promise(){return v1.create(this,this._def)}or(t){return Ss.create([this,t],this._def)}and(t){return Rs.create(this,t,this._def)}transform(t){return new cn({...Ne(this._def),schema:this,typeName:ke.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ps({...Ne(this._def),innerType:this,defaultValue:r,typeName:ke.ZodDefault})}brand(){return new Dd({typeName:ke.ZodBranded,type:this,...Ne(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ks({...Ne(this._def),innerType:this,catchValue:r,typeName:ke.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Bd.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},bz=/^c[^\s-]{8,}$/i,Lz=/^[0-9a-z]+$/,Iz=/^[0-9A-HJKMNP-TV-Z]{26}$/,Sz=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Rz=/^[a-z0-9_-]{21}$/i,_z=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Mz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Az="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",$p,Tz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pz=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,kz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,fL="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ez=new RegExp(`^${fL}$`);function pL(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Oz(e){return new RegExp(`^${pL(e)}$`)}function mL(e){let t=`${fL}T${pL(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Hz(e,t){return!!((t==="v4"||!t)&&Tz.test(e)||(t==="v6"||!t)&&Pz.test(e))}var h1=class e extends Ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==he.string){let a=this._getOrReturnCtx(t);return pe(a,{code:re.invalid_type,expected:he.string,received:a.parsedType}),Oe}let o=new to,n;for(let a of this._def.checks)if(a.kind==="min")t.data.lengtha.value&&(n=this._getOrReturnCtx(t,n),pe(n,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="length"){let s=t.data.length>a.value,u=t.data.lengtht.test(n),{validation:r,code:re.invalid_string,...Ie.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}datetime(t){var r,o;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(o=t?.local)!==null&&o!==void 0?o:!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Ie.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ie.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ie.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ie.errToObj(r)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new h1({checks:[],typeName:ke.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Ne(e)})};function Vz(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,a=parseInt(e.toFixed(n).replace(".","")),s=parseInt(t.toFixed(n).replace(".",""));return a%s/Math.pow(10,n)}var ws=class e extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==he.number){let a=this._getOrReturnCtx(t);return pe(a,{code:re.invalid_type,expected:he.number,received:a.parsedType}),Oe}let o,n=new to;for(let a of this._def.checks)a.kind==="int"?it.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?t.dataa.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),pe(o,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Vz(t.data,a.value)!==0&&(o=this._getOrReturnCtx(t,o),pe(o,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{code:re.not_finite,message:a.message}),n.dirty()):it.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ie.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ie.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ie.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ie.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:Ie.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.valuenew ws({checks:[],typeName:ke.ZodNumber,coerce:e?.coerce||!1,...Ne(e)});var xs=class e extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==he.bigint){let a=this._getOrReturnCtx(t);return pe(a,{code:re.invalid_type,expected:he.bigint,received:a.parsedType}),Oe}let o,n=new to;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.dataa.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),pe(o,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),pe(o,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):it.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ie.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ie.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ie.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ie.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:Ie.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new xs({checks:[],typeName:ke.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Ne(e)})};var ys=class extends Ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==he.boolean){let o=this._getOrReturnCtx(t);return pe(o,{code:re.invalid_type,expected:he.boolean,received:o.parsedType}),Oe}return mo(t.data)}};ys.create=e=>new ys({typeName:ke.ZodBoolean,coerce:e?.coerce||!1,...Ne(e)});var bs=class e extends Ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==he.date){let a=this._getOrReturnCtx(t);return pe(a,{code:re.invalid_type,expected:he.date,received:a.parsedType}),Oe}if(isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return pe(a,{code:re.invalid_date}),Oe}let o=new to,n;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()a.value&&(n=this._getOrReturnCtx(t,n),pe(n,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()):it.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew bs({checks:[],coerce:e?.coerce||!1,typeName:ke.ZodDate,...Ne(e)});var lu=class extends Ze{_parse(t){if(this._getType(t)!==he.symbol){let o=this._getOrReturnCtx(t);return pe(o,{code:re.invalid_type,expected:he.symbol,received:o.parsedType}),Oe}return mo(t.data)}};lu.create=e=>new lu({typeName:ke.ZodSymbol,...Ne(e)});var Ls=class extends Ze{_parse(t){if(this._getType(t)!==he.undefined){let o=this._getOrReturnCtx(t);return pe(o,{code:re.invalid_type,expected:he.undefined,received:o.parsedType}),Oe}return mo(t.data)}};Ls.create=e=>new Ls({typeName:ke.ZodUndefined,...Ne(e)});var Is=class extends Ze{_parse(t){if(this._getType(t)!==he.null){let o=this._getOrReturnCtx(t);return pe(o,{code:re.invalid_type,expected:he.null,received:o.parsedType}),Oe}return mo(t.data)}};Is.create=e=>new Is({typeName:ke.ZodNull,...Ne(e)});var g1=class extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return mo(t.data)}};g1.create=e=>new g1({typeName:ke.ZodAny,...Ne(e)});var wi=class extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mo(t.data)}};wi.create=e=>new wi({typeName:ke.ZodUnknown,...Ne(e)});var la=class extends Ze{_parse(t){let r=this._getOrReturnCtx(t);return pe(r,{code:re.invalid_type,expected:he.never,received:r.parsedType}),Oe}};la.create=e=>new la({typeName:ke.ZodNever,...Ne(e)});var uu=class extends Ze{_parse(t){if(this._getType(t)!==he.undefined){let o=this._getOrReturnCtx(t);return pe(o,{code:re.invalid_type,expected:he.void,received:o.parsedType}),Oe}return mo(t.data)}};uu.create=e=>new uu({typeName:ke.ZodVoid,...Ne(e)});var xi=class e extends Ze{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==he.array)return pe(r,{code:re.invalid_type,expected:he.array,received:r.parsedType}),Oe;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,u=r.data.lengthn.maxLength.value&&(pe(r,{code:re.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,u)=>n.type._parseAsync(new On(r,s,r.path,u)))).then(s=>to.mergeArray(o,s));let a=[...r.data].map((s,u)=>n.type._parseSync(new On(r,s,r.path,u)));return to.mergeArray(o,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Ie.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Ie.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Ie.toString(r)}})}nonempty(t){return this.min(1,t)}};xi.create=(e,t)=>new xi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ke.ZodArray,...Ne(t)});function au(e){if(e instanceof Ho){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=En.create(au(o))}return new Ho({...e._def,shape:()=>t})}else return e instanceof xi?new xi({...e._def,type:au(e.element)}):e instanceof En?En.create(au(e.unwrap())):e instanceof Fa?Fa.create(au(e.unwrap())):e instanceof Va?Va.create(e.items.map(t=>au(t))):e}var Ho=class e extends Ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=it.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==he.object){let d=this._getOrReturnCtx(t);return pe(d,{code:re.invalid_type,expected:he.object,received:d.parsedType}),Oe}let{status:o,ctx:n}=this._processInputParams(t),{shape:a,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof la&&this._def.unknownKeys==="strip"))for(let d in n.data)s.includes(d)||u.push(d);let c=[];for(let d of s){let p=a[d],m=n.data[d];c.push({key:{status:"valid",value:d},value:p._parse(new On(n,m,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof la){let d=this._def.unknownKeys;if(d==="passthrough")for(let p of u)c.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(d==="strict")u.length>0&&(pe(n,{code:re.unrecognized_keys,keys:u}),o.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let p of u){let m=n.data[p];c.push({key:{status:"valid",value:p},value:d._parse(new On(n,m,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let d=[];for(let p of c){let m=await p.key,g=await p.value;d.push({key:m,value:g,alwaysSet:p.alwaysSet})}return d}).then(d=>to.mergeObjectSync(o,d)):to.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{var n,a,s,u;let c=(s=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,r,o).message)!==null&&s!==void 0?s:o.defaultError;return r.code==="unrecognized_keys"?{message:(u=Ie.errToObj(t).message)!==null&&u!==void 0?u:c}:{message:c}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ke.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return it.objectKeys(t).forEach(o=>{t[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return it.objectKeys(this.shape).forEach(o=>{t[o]||(r[o]=this.shape[o])}),new e({...this._def,shape:()=>r})}deepPartial(){return au(this)}partial(t){let r={};return it.objectKeys(this.shape).forEach(o=>{let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return it.objectKeys(this.shape).forEach(o=>{if(t&&!t[o])r[o]=this.shape[o];else{let a=this.shape[o];for(;a instanceof En;)a=a._def.innerType;r[o]=a}}),new e({...this._def,shape:()=>r})}keyof(){return hL(it.objectKeys(this.shape))}};Ho.create=(e,t)=>new Ho({shape:()=>e,unknownKeys:"strip",catchall:la.create(),typeName:ke.ZodObject,...Ne(t)});Ho.strictCreate=(e,t)=>new Ho({shape:()=>e,unknownKeys:"strict",catchall:la.create(),typeName:ke.ZodObject,...Ne(t)});Ho.lazycreate=(e,t)=>new Ho({shape:e,unknownKeys:"strip",catchall:la.create(),typeName:ke.ZodObject,...Ne(t)});var Ss=class extends Ze{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(a){for(let u of a)if(u.result.status==="valid")return u.result;for(let u of a)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let s=a.map(u=>new un(u.ctx.common.issues));return pe(r,{code:re.invalid_union,unionErrors:s}),Oe}if(r.common.async)return Promise.all(o.map(async a=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let a,s=[];for(let c of o){let d={...r,common:{...r.common,issues:[]},parent:null},p=c._parseSync({data:r.data,path:r.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:d}),d.common.issues.length&&s.push(d.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let u=s.map(c=>new un(c));return pe(r,{code:re.invalid_union,unionErrors:u}),Oe}}get options(){return this._def.options}};Ss.create=(e,t)=>new Ss({options:e,typeName:ke.ZodUnion,...Ne(t)});var Ci=e=>e instanceof _s?Ci(e.schema):e instanceof cn?Ci(e.innerType()):e instanceof Ms?[e.value]:e instanceof As?e.options:e instanceof Ts?it.objectValues(e.enum):e instanceof Ps?Ci(e._def.innerType):e instanceof Ls?[void 0]:e instanceof Is?[null]:e instanceof En?[void 0,...Ci(e.unwrap())]:e instanceof Fa?[null,...Ci(e.unwrap())]:e instanceof Dd||e instanceof Es?Ci(e.unwrap()):e instanceof ks?Ci(e._def.innerType):[],w9=class e extends Ze{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==he.object)return pe(r,{code:re.invalid_type,expected:he.object,received:r.parsedType}),Oe;let o=this.discriminator,n=r.data[o],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(pe(r,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let a of r){let s=Ci(a.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of s){if(n.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);n.set(u,a)}}return new e({typeName:ke.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ne(o)})}};function Jp(e,t){let r=m1(e),o=m1(t);if(e===t)return{valid:!0,data:e};if(r===he.object&&o===he.object){let n=it.objectKeys(t),a=it.objectKeys(e).filter(u=>n.indexOf(u)!==-1),s={...e,...t};for(let u of a){let c=Jp(e[u],t[u]);if(!c.valid)return{valid:!1};s[u]=c.data}return{valid:!0,data:s}}else if(r===he.array&&o===he.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let a=0;a{if(qp(a)||qp(s))return Oe;let u=Jp(a.value,s.value);return u.valid?((Yp(a)||Yp(s))&&r.dirty(),{status:r.value,value:u.data}):(pe(o,{code:re.invalid_intersection_types}),Oe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([a,s])=>n(a,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Rs.create=(e,t,r)=>new Rs({left:e,right:t,typeName:ke.ZodIntersection,...Ne(r)});var Va=class e extends Ze{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==he.array)return pe(o,{code:re.invalid_type,expected:he.array,received:o.parsedType}),Oe;if(o.data.lengththis._def.items.length&&(pe(o,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...o.data].map((s,u)=>{let c=this._def.items[u]||this._def.rest;return c?c._parse(new On(o,s,o.path,u)):null}).filter(s=>!!s);return o.common.async?Promise.all(a).then(s=>to.mergeArray(r,s)):to.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Va.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Va({items:e,typeName:ke.ZodTuple,rest:null,...Ne(t)})};var x9=class e extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==he.object)return pe(o,{code:re.invalid_type,expected:he.object,received:o.parsedType}),Oe;let n=[],a=this._def.keyType,s=this._def.valueType;for(let u in o.data)n.push({key:a._parse(new On(o,u,o.path,u)),value:s._parse(new On(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?to.mergeObjectAsync(r,n):to.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Ze?new e({keyType:t,valueType:r,typeName:ke.ZodRecord,...Ne(o)}):new e({keyType:h1.create(),valueType:t,typeName:ke.ZodRecord,...Ne(r)})}},cu=class extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==he.map)return pe(o,{code:re.invalid_type,expected:he.map,received:o.parsedType}),Oe;let n=this._def.keyType,a=this._def.valueType,s=[...o.data.entries()].map(([u,c],d)=>({key:n._parse(new On(o,u,o.path,[d,"key"])),value:a._parse(new On(o,c,o.path,[d,"value"]))}));if(o.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let c of s){let d=await c.key,p=await c.value;if(d.status==="aborted"||p.status==="aborted")return Oe;(d.status==="dirty"||p.status==="dirty")&&r.dirty(),u.set(d.value,p.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let c of s){let d=c.key,p=c.value;if(d.status==="aborted"||p.status==="aborted")return Oe;(d.status==="dirty"||p.status==="dirty")&&r.dirty(),u.set(d.value,p.value)}return{status:r.value,value:u}}}};cu.create=(e,t,r)=>new cu({valueType:t,keyType:e,typeName:ke.ZodMap,...Ne(r)});var du=class e extends Ze{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==he.set)return pe(o,{code:re.invalid_type,expected:he.set,received:o.parsedType}),Oe;let n=this._def;n.minSize!==null&&o.data.sizen.maxSize.value&&(pe(o,{code:re.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function s(c){let d=new Set;for(let p of c){if(p.status==="aborted")return Oe;p.status==="dirty"&&r.dirty(),d.add(p.value)}return{status:r.value,value:d}}let u=[...o.data.values()].map((c,d)=>a._parse(new On(o,c,o.path,d)));return o.common.async?Promise.all(u).then(c=>s(c)):s(u)}min(t,r){return new e({...this._def,minSize:{value:t,message:Ie.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Ie.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};du.create=(e,t)=>new du({valueType:e,minSize:null,maxSize:null,typeName:ke.ZodSet,...Ne(t)});var y9=class e extends Ze{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==he.function)return pe(r,{code:re.invalid_type,expected:he.function,received:r.parsedType}),Oe;function o(u,c){return v9({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,g9(),su].filter(d=>!!d),issueData:{code:re.invalid_arguments,argumentsError:c}})}function n(u,c){return v9({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,g9(),su].filter(d=>!!d),issueData:{code:re.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof v1){let u=this;return mo(async function(...c){let d=new un([]),p=await u._def.args.parseAsync(c,a).catch(y=>{throw d.addIssue(o(c,y)),d}),m=await Reflect.apply(s,this,p);return await u._def.returns._def.type.parseAsync(m,a).catch(y=>{throw d.addIssue(n(m,y)),d})})}else{let u=this;return mo(function(...c){let d=u._def.args.safeParse(c,a);if(!d.success)throw new un([o(c,d.error)]);let p=Reflect.apply(s,this,d.data),m=u._def.returns.safeParse(p,a);if(!m.success)throw new un([n(p,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Va.create(t).rest(wi.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||Va.create([]).rest(wi.create()),returns:r||wi.create(),typeName:ke.ZodFunction,...Ne(o)})}},_s=class extends Ze{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};_s.create=(e,t)=>new _s({getter:e,typeName:ke.ZodLazy,...Ne(t)});var Ms=class extends Ze{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:re.invalid_literal,expected:this._def.value}),Oe}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ms.create=(e,t)=>new Ms({value:e,typeName:ke.ZodLiteral,...Ne(t)});function hL(e,t){return new As({values:e,typeName:ke.ZodEnum,...Ne(t)})}var As=class e extends Ze{constructor(){super(...arguments),Od.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return pe(r,{expected:it.joinValues(o),received:r.parsedType,code:re.invalid_type}),Oe}if(C9(this,Od,"f")||dL(this,Od,new Set(this._def.values),"f"),!C9(this,Od,"f").has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return pe(r,{received:r.data,code:re.invalid_enum_value,options:o}),Oe}return mo(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};Od=new WeakMap;As.create=hL;var Ts=class extends Ze{constructor(){super(...arguments),Hd.set(this,void 0)}_parse(t){let r=it.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==he.string&&o.parsedType!==he.number){let n=it.objectValues(r);return pe(o,{expected:it.joinValues(n),received:o.parsedType,code:re.invalid_type}),Oe}if(C9(this,Hd,"f")||dL(this,Hd,new Set(it.getValidEnumValues(this._def.values)),"f"),!C9(this,Hd,"f").has(t.data)){let n=it.objectValues(r);return pe(o,{received:o.data,code:re.invalid_enum_value,options:n}),Oe}return mo(t.data)}get enum(){return this._def.values}};Hd=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:ke.ZodNativeEnum,...Ne(t)});var v1=class extends Ze{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==he.promise&&r.common.async===!1)return pe(r,{code:re.invalid_type,expected:he.promise,received:r.parsedType}),Oe;let o=r.parsedType===he.promise?r.data:Promise.resolve(r.data);return mo(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};v1.create=(e,t)=>new v1({type:e,typeName:ke.ZodPromise,...Ne(t)});var cn=class extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,a={addIssue:s=>{pe(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let s=n.transform(o.data,a);if(o.common.async)return Promise.resolve(s).then(async u=>{if(r.value==="aborted")return Oe;let c=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return c.status==="aborted"?Oe:c.status==="dirty"||r.value==="dirty"?iu(c.value):c});{if(r.value==="aborted")return Oe;let u=this._def.schema._parseSync({data:s,path:o.path,parent:o});return u.status==="aborted"?Oe:u.status==="dirty"||r.value==="dirty"?iu(u.value):u}}if(n.type==="refinement"){let s=u=>{let c=n.refinement(u,a);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){let u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?Oe:(u.status==="dirty"&&r.dirty(),s(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?Oe:(u.status==="dirty"&&r.dirty(),s(u.value).then(()=>({status:r.value,value:u.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Vd(s))return s;let u=n.transform(s.value,a);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Vd(s)?Promise.resolve(n.transform(s.value,a)).then(u=>({status:r.value,value:u})):s);it.assertNever(n)}};cn.create=(e,t,r)=>new cn({schema:e,typeName:ke.ZodEffects,effect:t,...Ne(r)});cn.createWithPreprocess=(e,t,r)=>new cn({schema:t,effect:{type:"preprocess",transform:e},typeName:ke.ZodEffects,...Ne(r)});var En=class extends Ze{_parse(t){return this._getType(t)===he.undefined?mo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};En.create=(e,t)=>new En({innerType:e,typeName:ke.ZodOptional,...Ne(t)});var Fa=class extends Ze{_parse(t){return this._getType(t)===he.null?mo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fa.create=(e,t)=>new Fa({innerType:e,typeName:ke.ZodNullable,...Ne(t)});var Ps=class extends Ze{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===he.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ps.create=(e,t)=>new Ps({innerType:e,typeName:ke.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ne(t)});var ks=class extends Ze{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Fd(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new un(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new un(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};ks.create=(e,t)=>new ks({innerType:e,typeName:ke.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ne(t)});var fu=class extends Ze{_parse(t){if(this._getType(t)!==he.nan){let o=this._getOrReturnCtx(t);return pe(o,{code:re.invalid_type,expected:he.nan,received:o.parsedType}),Oe}return{status:"valid",value:t.data}}};fu.create=e=>new fu({typeName:ke.ZodNaN,...Ne(e)});var Fz=Symbol("zod_brand"),Dd=class extends Ze{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Bd=class e extends Ze{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Oe:a.status==="dirty"?(r.dirty(),iu(a.value)):this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?Oe:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:ke.ZodPipeline})}},Es=class extends Ze{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Vd(n)&&(n.value=Object.freeze(n.value)),n);return Fd(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};Es.create=(e,t)=>new Es({innerType:e,typeName:ke.ZodReadonly,...Ne(t)});function gL(e,t={},r){return e?g1.create().superRefine((o,n)=>{var a,s;if(!e(o)){let u=typeof t=="function"?t(o):typeof t=="string"?{message:t}:t,c=(s=(a=u.fatal)!==null&&a!==void 0?a:r)!==null&&s!==void 0?s:!0,d=typeof u=="string"?{message:u}:u;n.addIssue({code:"custom",...d,fatal:c})}}):g1.create()}var Dz={object:Ho.lazycreate},ke;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ke||(ke={}));var Bz=(e,t={message:`Input not instance of ${e.name}`})=>gL(r=>r instanceof e,t),vL=h1.create,CL=ws.create,Nz=fu.create,Zz=xs.create,wL=ys.create,Gz=bs.create,Wz=lu.create,zz=Ls.create,jz=Is.create,Uz=g1.create,$z=wi.create,Xz=la.create,qz=uu.create,Yz=xi.create,Jz=Ho.create,Qz=Ho.strictCreate,Kz=Ss.create,ej=w9.create,tj=Rs.create,rj=Va.create,oj=x9.create,nj=cu.create,aj=du.create,ij=y9.create,sj=_s.create,lj=Ms.create,uj=As.create,cj=Ts.create,dj=v1.create,uL=cn.create,fj=En.create,pj=Fa.create,mj=cn.createWithPreprocess,hj=Bd.create,gj=()=>vL().optional(),vj=()=>CL().optional(),Cj=()=>wL().optional(),wj={string:e=>h1.create({...e,coerce:!0}),number:e=>ws.create({...e,coerce:!0}),boolean:e=>ys.create({...e,coerce:!0}),bigint:e=>xs.create({...e,coerce:!0}),date:e=>bs.create({...e,coerce:!0})},xj=Oe,k=Object.freeze({__proto__:null,defaultErrorMap:su,setErrorMap:xz,getErrorMap:g9,makeIssue:v9,EMPTY_PATH:yz,addIssueToContext:pe,ParseStatus:to,INVALID:Oe,DIRTY:iu,OK:mo,isAborted:qp,isDirty:Yp,isValid:Vd,isAsync:Fd,get util(){return it},get objectUtil(){return Xp},ZodParsedType:he,getParsedType:m1,ZodType:Ze,datetimeRegex:mL,ZodString:h1,ZodNumber:ws,ZodBigInt:xs,ZodBoolean:ys,ZodDate:bs,ZodSymbol:lu,ZodUndefined:Ls,ZodNull:Is,ZodAny:g1,ZodUnknown:wi,ZodNever:la,ZodVoid:uu,ZodArray:xi,ZodObject:Ho,ZodUnion:Ss,ZodDiscriminatedUnion:w9,ZodIntersection:Rs,ZodTuple:Va,ZodRecord:x9,ZodMap:cu,ZodSet:du,ZodFunction:y9,ZodLazy:_s,ZodLiteral:Ms,ZodEnum:As,ZodNativeEnum:Ts,ZodPromise:v1,ZodEffects:cn,ZodTransformer:cn,ZodOptional:En,ZodNullable:Fa,ZodDefault:Ps,ZodCatch:ks,ZodNaN:fu,BRAND:Fz,ZodBranded:Dd,ZodPipeline:Bd,ZodReadonly:Es,custom:gL,Schema:Ze,ZodSchema:Ze,late:Dz,get ZodFirstPartyTypeKind(){return ke},coerce:wj,any:Uz,array:Yz,bigint:Zz,boolean:wL,date:Gz,discriminatedUnion:ej,effect:uL,enum:uj,function:ij,instanceof:Bz,intersection:tj,lazy:sj,literal:lj,map:nj,nan:Nz,nativeEnum:cj,never:Xz,null:jz,nullable:pj,number:CL,object:Jz,oboolean:Cj,onumber:vj,optional:fj,ostring:gj,pipeline:hj,preprocess:mj,promise:dj,record:oj,set:aj,strictObject:Qz,string:vL,symbol:Wz,transformer:uL,tuple:rj,undefined:zz,union:Kz,unknown:$z,void:qz,NEVER:xj,ZodIssueCode:re,quotelessJson:wz,ZodError:un});function yj(e,t){let r={...e};for(let o of t)delete r[o];return r}var bj=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;function Lj(e){let t=e.url,r=e.params;return r&&(t=t.replace(bj,(o,n)=>n in r?`${r[n]}`:o)),t}function xL(e,t,r){return e.find(o=>o.method===t&&o.path===r)}function Ij(e){let t=new FormData;for(let r in e)t.append(r,e[r]);return{data:t}}var b9=class extends Error{constructor(e,t,r,o){super(e),this.config=t,this.data=r,this.cause=o}},Sj={name:"form-data",request:async(e,t)=>{if(typeof t.data!="object"||Array.isArray(t.data))throw new b9("Zodios: multipart/form-data body must be an object",t);let r=Ij(t.data);return{...t,data:r.data,headers:{...t.headers,...r.headers}}}};function Rj(){return Sj}var _j={name:"form-url",request:async(e,t)=>{if(typeof t.data!="object"||Array.isArray(t.data))throw new b9("Zodios: application/x-www-form-urlencoded body must be an object",t);return{...t,data:new URLSearchParams(t.data).toString(),headers:{...t.headers,"Content-Type":"application/x-www-form-urlencoded"}}}};function Mj(){return _j}function yL(e,t){return{request:async(r,o)=>({...o,headers:{...o.headers,[e]:t}})}}function bL(e){return[!0,"response","all"].includes(e)}function LL(e){return[!0,"request","all"].includes(e)}function Aj({validate:e,transform:t,sendDefaults:r}){return{name:"zod-validation",request:LL(e)?async(o,n)=>{let a=xL(o,n.method,n.url);if(!a)throw new Error(`No endpoint found for ${n.method} ${n.url}`);let{parameters:s}=a;if(!s)return n;let u={...n,queries:{...n.queries},headers:{...n.headers},params:{...n.params}},c={Query:m=>{var g;return(g=u.queries)==null?void 0:g[m]},Body:m=>u.data,Header:m=>{var g;return(g=u.headers)==null?void 0:g[m]},Path:m=>{var g;return(g=u.params)==null?void 0:g[m]}},d={Query:(m,g)=>u.queries[m]=g,Body:(m,g)=>u.data=g,Header:(m,g)=>u.headers[m]=g,Path:(m,g)=>u.params[m]=g},p=LL(t);for(let m of s){let{name:g,schema:y,type:x}=m,v=c[x](g);if(r||v!==void 0){let b=await y.safeParseAsync(v);if(!b.success)throw new b9(`Zodios: Invalid ${x} parameter '${g}'`,n,v,b.error);p&&d[x](g,b.data)}}return u}:void 0,response:bL(e)?async(o,n,a)=>{var s,u,c,d;let p=xL(o,n.method,n.url);if(!p)throw new Error(`No endpoint found for ${n.method} ${n.url}`);if((u=(s=a.headers)==null?void 0:s["content-type"])!=null&&u.includes("application/json")||(d=(c=a.headers)==null?void 0:c["content-type"])!=null&&d.includes("application/vnd.api+json")){let m=await p.response.safeParseAsync(a.data);if(!m.success)throw new b9(`Zodios: Invalid response from endpoint '${p.method} ${p.path}' +status: ${a.status} ${a.statusText} +cause: +${m.error.message} +received: +${JSON.stringify(a.data,null,2)}`,n,a.data,m.error);bL(t)&&(a.data=m.data)}return a}:void 0}}var IL=class{constructor(e,t){this.plugins=[],this.key=`${e}-${t}`}indexOf(e){return this.plugins.findIndex(t=>t?.name===e)}use(e){if(e.name){let t=this.indexOf(e.name);if(t!==-1)return this.plugins[t]=e,{key:this.key,value:t}}return this.plugins.push(e),{key:this.key,value:this.plugins.length-1}}eject(e){if(typeof e=="string"){let t=this.indexOf(e);if(t===-1)throw new Error(`Plugin with name '${e}' not found`);this.plugins[t]=void 0}else{if(e.key!==this.key)throw new Error(`Plugin with key '${e.key}' is not registered for endpoint '${this.key}'`);this.plugins[e.value]=void 0}}async interceptRequest(e,t){let r=t;for(let o of this.plugins)o!=null&&o.request&&(r=await o.request(e,r));return r}async interceptResponse(e,t,r){let o=r;for(let n=this.plugins.length-1;n>=0;n--){let a=this.plugins[n];a&&(o=o.then(a!=null&&a.response?s=>a.response(e,t,s):void 0,a!=null&&a.error?s=>a.error(e,t,s):void 0))}return o}count(){return this.plugins.reduce((e,t)=>t?e+1:e,0)}};function SL(e){let t=new Set;for(let o of e){let n=`${o.method} ${o.path}`;if(t.has(n))throw new Error(`Zodios: Duplicate path '${n}'`);t.add(n)}let r=new Set;for(let o of e)if(o.alias){if(r.has(o.alias))throw new Error(`Zodios: Duplicate alias '${o.alias}'`);r.add(o.alias)}for(let o of e)if(o.parameters&&o.parameters.filter(n=>n.type==="Body").length>1)throw new Error(`Zodios: Multiple body parameters in endpoint '${o.path}'`)}function RL(e){return SL(e),e}var Tj=class{constructor(e,t,r){this.endpointPlugins=new Map;let o;if(!e)throw Array.isArray(t)?new Error("Zodios: missing base url"):new Error("Zodios: missing api description");let n;if(typeof e=="string"&&Array.isArray(t))n=e,this.api=t,o=r||{};else if(Array.isArray(e)&&!Array.isArray(t))this.api=e,o=t||{};else throw new Error("Zodios: api must be an array");SL(this.api),this.options={validate:!0,transform:!0,sendDefaults:!1,...o},this.options.axiosInstance?this.axiosInstance=this.options.axiosInstance:this.axiosInstance=h9.create({...this.options.axiosConfig}),n&&(this.axiosInstance.defaults.baseURL=n),this.injectAliasEndpoints(),this.initPlugins(),[!0,"all","request","response"].includes(this.options.validate)&&this.use(Aj(this.options))}initPlugins(){this.endpointPlugins.set("any-any",new IL("any","any")),this.api.forEach(e=>{let t=new IL(e.method,e.path);switch(e.requestFormat){case"binary":t.use(yL("Content-Type","application/octet-stream"));break;case"form-data":t.use(Rj());break;case"form-url":t.use(Mj());break;case"text":t.use(yL("Content-Type","text/plain"));break}this.endpointPlugins.set(`${e.method}-${e.path}`,t)})}getAnyEndpointPlugins(){return this.endpointPlugins.get("any-any")}findAliasEndpointPlugins(e){let t=this.api.find(r=>r.alias===e);if(t)return this.endpointPlugins.get(`${t.method}-${t.path}`)}findEnpointPlugins(e,t){return this.endpointPlugins.get(`${e}-${t}`)}get baseURL(){return this.axiosInstance.defaults.baseURL}get axios(){return this.axiosInstance}use(...e){if(typeof e[0]=="object")return this.getAnyEndpointPlugins().use(e[0]);if(typeof e[0]=="string"&&typeof e[1]=="object"){let t=this.findAliasEndpointPlugins(e[0]);if(!t)throw new Error(`Zodios: no alias '${e[0]}' found to register plugin`);return t.use(e[1])}else if(typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="object"){let t=this.findEnpointPlugins(e[0],e[1]);if(!t)throw new Error(`Zodios: no endpoint '${e[0]} ${e[1]}' found to register plugin`);return t.use(e[2])}throw new Error("Zodios: invalid plugin registration")}eject(e){var t;if(typeof e=="string"){this.getAnyEndpointPlugins().eject(e);return}(t=this.endpointPlugins.get(e.key))==null||t.eject(e)}injectAliasEndpoints(){this.api.forEach(e=>{e.alias&&(["post","put","patch","delete"].includes(e.method)?this[e.alias]=(t,r)=>this.request({...r,method:e.method,url:e.path,data:t}):this[e.alias]=t=>this.request({...t,method:e.method,url:e.path}))})}async request(e){let t=e,r=this.getAnyEndpointPlugins(),o=this.findEnpointPlugins(t.method,t.url);t=await r.interceptRequest(this.api,t),o&&(t=await o.interceptRequest(this.api,t));let n=this.axiosInstance.request({...yj(t,["params","queries"]),url:Lj(t),params:t.queries});return o&&(n=o.interceptResponse(this.api,t,n)),n=r.interceptResponse(this.api,t,n),(await n).data}async get(e,...[t]){return this.request({...t,method:"get",url:e})}async post(e,t,...[r]){return this.request({...r,method:"post",url:e,data:t})}async put(e,t,...[r]){return this.request({...r,method:"put",url:e,data:t})}async patch(e,t,...[r]){return this.request({...r,method:"patch",url:e,data:t})}async delete(e,t,...[r]){return this.request({...r,method:"delete",url:e,data:t})}},Qp=Tj;var Wd=k.enum(["rgbw","cct","rgb_cct","rgb","fut089","fut091","fut020"]),Kp=k.object({alias:k.string(),id:k.number().int().optional(),device_id:k.number().int(),group_id:k.number().int(),device_type:Wd}).passthrough(),_L=k.object({alias:k.string(),device_id:k.number().int(),group_id:k.number().int()}).partial().passthrough(),Hr=k.object({success:k.boolean(),error:k.string().describe("If an error occurred, message specifying what went wrong").optional()}).passthrough(),S9=k.enum(["ON","OFF"]),n6=k.enum(["brightness","rgb","color_temp","onoff"]),Zd=k.object({alias:k.string(),state:S9.describe("On/Off state"),color:k.object({r:k.number().int(),g:k.number().int(),b:k.number().int()}).passthrough(),level:k.number().int().gte(0).lte(100),kelvin:k.number().int().gte(0).lte(100),color_mode:n6.describe(`Describes the current color mode of the bulb. Useful for HomeAssistant. +`)}).partial().passthrough(),ML=k.object({state:Zd.describe("Group state with a static set of fields"),device:k.object({id:k.number(),device_id:k.number(),device_type:Wd,group_id:k.number(),alias:k.string()}).passthrough()}).passthrough(),AL=k.object({firmware:k.string().describe("Always set to 'milight-hub'"),version:k.string().describe("Semver version string"),ip_address:k.string(),reset_reason:k.string().describe("Reason the system was last rebooted"),variant:k.string().describe("Firmware variant (e.g., d1_mini, nodemcuv2)"),free_heap:k.number().int().describe("Amount of free heap remaining (measured in bytes)"),arduino_version:k.string().describe("Version of Arduino SDK firmware was built with"),queue_stats:k.object({length:k.number().int().describe("Number of enqueued packets to be sent"),dropped_packets:k.number().int().describe("Number of packets that have been dropped since last reboot")}).partial().passthrough()}).partial().passthrough(),e6=k.object({success:k.boolean(),message:k.string()}).passthrough(),TL=k.object({command:k.enum(["restart","clear_wifi_config"])}).passthrough(),Nd=k.enum(["Off","Slow toggle","Fast toggle","Slow blip","Fast blip","Flicker","On"]),t6=k.enum(["LOW","MID","HIGH"]),PL=k.enum(["state","status","brightness","level","hue","saturation","color","mode","kelvin","color_temp","bulb_mode","computed_color","effect","device_id","group_id","device_type","oh_color","hex_color","color_mode"]),L9=k.object({admin_username:k.string().describe("If specified along with a password, HTTP basic auth will be enabled to access the web interface and the REST API.").default(""),admin_password:k.string().describe("If specified along with a username, HTTP basic auth will be enabled to access the web interface and the REST API.").default(""),ce_pin:k.number().int().describe("CE pin to use for SPI radio (nRF24, LT8900)").default(4),csn_pin:k.number().int().describe("CSN pin to use with nRF24").default(15),reset_pin:k.number().int().describe("Reset pin to use with LT8900").default(0),led_pin:k.number().int().describe("Pin to control for status LED. Set to a negative value to invert on/off status.").default(-2),packet_repeats:k.number().int().describe("Number of times to resend the same 2.4 GHz milight packet when a command is sent.").default(50),http_repeat_factor:k.number().int().describe("Packet repeats resulting from REST commands will be multiplied by this number.").default(1),auto_restart_period:k.number().int().describe("Automatically restart the device after the number of specified minutes. Use 0 to disable.").default(0),mqtt_server:k.union([k.string(),k.string()]).describe("MQTT server to connect to. Can contain port number in the form 'mqtt-hostname:1883'. Leave empty to disable MQTT.").nullable(),mqtt_username:k.string().describe("If specified, use this username to authenticate with the MQTT server."),mqtt_password:k.string().describe("If specified, use this password to authenticate with the MQTT server."),mqtt_topic_pattern:k.string().describe("Topic pattern to listen on for commands. More detail on the format in README."),mqtt_update_topic_pattern:k.string().describe("Topic pattern individual intercepted commands will be sent to. More detail on the format in README."),mqtt_state_topic_pattern:k.string().describe("Topic pattern device state will be sent to. More detail on the format in README."),mqtt_client_status_topic:k.string().describe("Topic client status will be sent to."),mqtt_retain:k.boolean().describe("If true, messages sent to state and client status topics will be published with the retain flag.").default(!0),simple_mqtt_client_status:k.boolean().describe("If true, will use a simple enum flag (`connected` or `disconnected`) to indicate status. If false, will send a rich JSON message including IP address, version, etc.").default(!0),radio_interface_type:k.enum(["nRF24","LT8900"]).describe("Type of radio interface to use. NRF24 is better supported and more common. Only use LT8900 if you're sure you mean to!").default("nRF24"),discovery_port:k.number().int().describe("UDP port used for milight's discovery protocol. Set to 0 to disable.").default(48899),listen_repeats:k.number().int().describe("Controls how many cycles are spent listening for packets. Set to 0 to disable passive listening.").default(3),state_flush_interval:k.number().int().describe("Controls how many miliseconds must pass between states being flushed to persistent storage. Set to 0 to disable throttling.").default(1e4),mqtt_state_rate_limit:k.number().int().describe("Controls how many miliseconds must pass between MQTT state updates. Set to 0 to disable throttling.").default(500),mqtt_debounce_delay:k.number().int().describe("Controls how much time has to pass after the last status update was queued.").default(500),packet_repeat_throttle_threshold:k.number().int().describe("Controls how packet repeats are throttled. Packets sent with less time (measured in milliseconds) between them than this value (in milliseconds) will cause packet repeats to be throttled down. More than this value will unthrottle up.").default(200),packet_repeat_throttle_sensitivity:k.number().int().gte(0).lte(1e3).describe("Controls how packet repeats are throttled. Higher values cause packets to be throttled up and down faster. Set to 0 to disable throttling.").default(0),packet_repeat_minimum:k.number().int().describe("Controls how far throttling can decrease the number of repeated packets").default(3),enable_automatic_mode_switching:k.boolean().describe("When making updates to hue or white temperature in a different bulb mode, switch back to the original bulb mode after applying the setting change.").default(!1),led_mode_wifi_config:Nd,led_mode_wifi_failed:Nd,led_mode_operating:Nd,led_mode_packet:Nd,led_mode_packet_count:k.number().int().describe("Number of times the LED will flash when packets are changing").default(3),hostname:k.string().regex(/[a-zA-Z0-9-]+/).describe("Hostname that will be advertized on a DHCP request").default("milight-hub"),rf24_power_level:k.enum(["MIN","LOW","HIGH","MAX"]).describe("Power level used when packets are sent. See nRF24 documentation for further detail.").default("MAX"),rf24_listen_channel:t6,wifi_static_ip:k.string().describe("If specified, the static IP address to use"),wifi_static_ip_gateway:k.string().describe("If specified along with static IP, the gateway address to use"),wifi_static_ip_netmask:k.string().describe("If specified along with static IP, the netmask to use"),packet_repeats_per_loop:k.number().int().describe("Packets are sent asynchronously. This number controls the number of repeats sent during each iteration. Increase this number to improve packet throughput. Decrease to improve system multi-tasking.").default(10),home_assistant_discovery_prefix:k.string().describe("If specified along with MQTT settings, will enable HomeAssistant MQTT discovery using the specified discovery prefix. HomeAssistant's default is `homeassistant/`.").default("homeassistant/"),wifi_mode:k.enum(["b","g","n"]).describe("Forces WiFi into the spcified mode. Try using B or G mode if you are having stability issues. Changing this may cause the device to momentarily lose connection to the network.").default("n"),rf24_channels:k.array(t6).describe("Defines which channels we send on. Each remote type has three channels. We can send on any subset of these."),gateway_configs:k.array(k.array(k.number().int())).describe("List of UDP servers, stored as 3-long arrays. Elements are 1) remote ID to bind to, 2) UDP port to listen on, 3) protocol version (5 or 6)"),group_state_fields:k.array(PL),group_id_aliases:k.object({}).partial().passthrough().describe(`DEPRECATED (use /aliases routes instead) + +Keys are aliases, values are 3-long arrays with same schema as items in 'device_ids'. +`),default_transition_period:k.number().int().describe(`Default number of milliseconds between transition packets. Set this value lower for more granular transitions, or higher if +you are having performance issues during transitions. +`)}).partial().passthrough(),Pj=k.object({packet_info:k.string()}).partial().passthrough(),I9=k.union([k.number(),k.string()]).describe("2-byte device ID. Can be decimal or hexadecimal."),pu=k.object({state:S9.describe("On/Off state"),status:S9.describe("On/Off state"),hue:k.number().int().gte(0).lte(359).describe("Color hue. Will change bulb to color mode."),saturation:k.number().int().gte(0).lte(100).describe("Color saturation. Will normally change bulb to color mode."),kelvin:k.number().int().gte(0).lte(100).describe("White temperature. 0 is coolest, 100 is warmest."),temperature:k.number().int().gte(0).lte(100).describe("Alias for `kelvin`."),color_temp:k.number().int().gte(153).lte(370).describe("White temperature measured in mireds. Lower values are cooler."),mode:k.number().int().describe("Party mode ID. Actual effect depends on the bulb."),color:k.union([k.string(),k.object({r:k.number().int(),g:k.number().int(),b:k.number().int()}).partial().passthrough()]),level:k.number().int().gte(0).lte(100).describe("Brightness on a 0-100 scale."),brightness:k.number().int().gte(0).lte(255).describe("Brightness on a 0-255 scale."),effect:k.enum(["night_mode","white_mode"]),transition:k.number().describe(`Enables a transition from current state to the provided state. +`),color_mode:n6.describe(`Describes the current color mode of the bulb. Useful for HomeAssistant. +`)}).partial().passthrough(),r6=k.enum(["unpair","pair","set_white","night_mode","level_up","level_down","temperature_up","temperature_down","next_mode","previous_mode","mode_speed_down","mode_speed_up","toggle"]),kL=k.enum(["hue","saturation","brightness","level","kelvin","color_temp","color","status"]),Gd=k.union([k.number(),k.string()]),a6=k.object({field:kL.describe(`If transitioning 'status': * If transitioning to 'OFF', will fade to 0 brightness and then turn off. * If transitioning to 'ON', will turn on, set brightness to 0, and fade to brightness 100. +`),start_value:Gd.describe("Either an int value or a color"),end_value:Gd.describe("Either an int value or a color"),duration:k.number().describe("Duration of transition, measured in seconds"),period:k.number().int().describe("Length of time between updates in a transition, measured in milliseconds")}).partial().passthrough(),EL=k.object({command:k.union([r6,k.object({command:k.literal("transition"),args:a6}).partial().passthrough()]),commands:k.array(r6)}).partial().passthrough(),o6=pu.and(EL),OL=k.object({packet:k.string().regex(/([A-Fa-f0-9]{2}[ ])+/).describe("Raw packet to send"),num_repeats:k.number().int().gte(1).describe("Number of repeated packets to send")}).partial().passthrough(),i6=k.object({device_id:k.number().int().gte(0).lte(65536),group_id:k.number().int().gte(0).lte(8),device_type:Wd.describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")}).passthrough(),R9=a6.and(k.object({id:k.number().int(),last_sent:k.number().int().describe("Timestamp since last update was sent."),bulb:i6,type:k.enum(["field","color"]).describe(`Specifies whether this is a simple field transition, or a color transition. +`),current_value:Gd,end_value:Gd}).partial().passthrough()),HL=R9.and(i6),VL=k.object({t:k.literal("packet").describe("Type of message").optional(),d:k.object({di:k.number().int().describe("Device ID"),gi:k.number().int().describe("Group ID"),rt:Wd.describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")}).passthrough().describe("The bulb that the packet is for"),p:k.array(k.number().int()).describe("Raw packet data"),s:Zd.describe("Group state with a static set of fields"),u:k.object({}).partial().passthrough().describe("The command represented by the packet")}).passthrough(),kj=VL,Ej=k.array(k.unknown()),At={RemoteType:Wd,Alias:Kp,putAliasesId_Body:_L,BooleanResponse:Hr,State:S9,ColorMode:n6,NormalizedGroupState:Zd,GatewayListItem:ML,About:AL,BooleanResponseWithMessage:e6,postSystem_Body:TL,LedMode:Nd,RF24Channel:t6,GroupStateField:PL,Settings:L9,ReadPacket:Pj,device_id:I9,GroupState:pu,GroupStateCommand:r6,TransitionField:kL,TransitionValue:Gd,TransitionArgs:a6,GroupStateCommands:EL,putGatewaysDeviceIdRemoteTypeGroupId_Body:o6,postRaw_commandsRemoteType_Body:OL,BulbId:i6,TransitionData:R9,postTransitions_Body:HL,PacketMessage:VL,WebSocketMessage:kj,DeviceId:Ej},FL=RL([{method:"get",path:"/about",alias:"getAbout",requestFormat:"json",response:AL},{method:"post",path:"/aliases",alias:"postAliases",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Kp}],response:k.object({id:k.number().int()}).partial().passthrough()},{method:"get",path:"/aliases",alias:"getAliases",requestFormat:"json",response:k.object({aliases:k.array(Kp),page:k.number().int(),count:k.number().int(),num_pages:k.number().int()}).partial().passthrough()},{method:"get",path:"/aliases.bin",alias:"getAliases_bin",requestFormat:"json",response:k.void()},{method:"post",path:"/aliases.bin",alias:"postAliases_bin",requestFormat:"form-data",parameters:[{name:"body",type:"Body",schema:k.object({file:k.instanceof(File)}).partial().passthrough()}],response:Hr},{method:"put",path:"/aliases/:id",alias:"putAliasesId",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:_L},{name:"id",type:"Path",schema:k.number().int()}],response:Hr},{method:"delete",path:"/aliases/:id",alias:"deleteAliasesId",requestFormat:"json",parameters:[{name:"id",type:"Path",schema:k.number().int()}],response:Hr},{method:"post",path:"/backup",alias:"postBackup",requestFormat:"form-data",parameters:[{name:"body",type:"Body",schema:k.object({file:k.instanceof(File)}).partial().passthrough()}],response:e6,errors:[{status:400,description:"error",schema:e6}]},{method:"get",path:"/backup",alias:"getBackup",requestFormat:"json",response:k.void()},{method:"post",path:"/firmware",alias:"postFirmware",requestFormat:"form-data",parameters:[{name:"body",description:"Firmware file",type:"Body",schema:k.object({fileName:k.instanceof(File)}).partial().passthrough()}],response:k.void(),errors:[{status:500,description:"server error",schema:k.void()}]},{method:"get",path:"/gateway_traffic",alias:"getGateway_traffic",description:"Read a packet from any remote type. Does not return a response until a packet is read.",requestFormat:"json",response:k.object({packet_info:k.string()}).partial().passthrough()},{method:"get",path:"/gateway_traffic/:remoteType",alias:"getGateway_trafficRemoteType",description:"Read a packet from the given remote type. Does not return a response until a packet is read. If `remote-type` is unspecified, will read from all remote types simultaneously.",requestFormat:"json",parameters:[{name:"remoteType",type:"Path",schema:k.enum(["rgbw","cct","rgb_cct","rgb","fut089","fut091","fut020"]).describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")}],response:k.object({packet_info:k.string()}).partial().passthrough()},{method:"get",path:"/gateways",alias:"getGateways",requestFormat:"json",response:k.array(ML)},{method:"get",path:"/gateways/:deviceAlias",alias:"getGatewaysDeviceAlias",requestFormat:"json",parameters:[{name:"deviceAlias",type:"Path",schema:k.string().describe("Device alias saved in settings")}],response:pu,errors:[{status:404,description:"provided device alias does not exist",schema:k.void()}]},{method:"put",path:"/gateways/:deviceAlias",alias:"putGatewaysDeviceAlias",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o6},{name:"deviceAlias",type:"Path",schema:k.string().describe("Device alias saved in settings")},{name:"blockOnQueue",type:"Query",schema:k.boolean().describe("If true, response will block on update packets being sent before returning").optional()},{name:"fmt",type:"Query",schema:k.literal("normalized").describe("If set to `normalized`, the response will be in normalized format.").optional()}],response:k.union([Hr,pu,Zd]),errors:[{status:400,description:"error with request",schema:Hr}]},{method:"delete",path:"/gateways/:deviceAlias",alias:"deleteGatewaysDeviceAlias",description:"Usets all known values for state fields for the corresponding device. If MQTT is configured, the retained state message corresponding to this device will also be deleted.",requestFormat:"json",parameters:[{name:"deviceAlias",type:"Path",schema:k.string().describe("Device alias saved in settings")}],response:Hr},{method:"get",path:"/gateways/:deviceId/:remoteType/:groupId",alias:"getGatewaysDeviceIdRemoteTypeGroupId",description:"If `blockOnQueue` is provided, a response will not be returned until any unprocessed packets in the command queue are finished sending.",requestFormat:"json",parameters:[{name:"deviceId",type:"Path",schema:I9},{name:"remoteType",type:"Path",schema:k.enum(["rgbw","cct","rgb_cct","rgb","fut089","fut091","fut020"]).describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")},{name:"groupId",type:"Path",schema:k.number().int().gte(0).lte(8).describe("Group ID. Should be 0-8, depending on remote type. Group 0 is a 'wildcard' group. All bulbs paired with the same device ID will respond to commands sent to Group 0.")},{name:"blockOnQueue",type:"Query",schema:k.boolean().describe("If true, response will block on update packets being sent before returning").optional()}],response:pu},{method:"put",path:"/gateways/:deviceId/:remoteType/:groupId",alias:"putGatewaysDeviceIdRemoteTypeGroupId",description:`Update state of the bulbs with the provided parameters. Existing parameters will be unchanged. +if `blockOnQueue` is set to true, the response will not return until packets corresponding to the commands sent are processed, and the updated `GroupState` will be returned. If `blockOnQueue` is false or not provided, a simple response indicating success will be returned. +if `fmt` is set to `normalized`, the response will be in normalized format.`,requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o6},{name:"deviceId",type:"Path",schema:I9},{name:"remoteType",type:"Path",schema:k.enum(["rgbw","cct","rgb_cct","rgb","fut089","fut091","fut020"]).describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")},{name:"groupId",type:"Path",schema:k.number().int().gte(0).lte(8).describe("Group ID. Should be 0-8, depending on remote type. Group 0 is a 'wildcard' group. All bulbs paired with the same device ID will respond to commands sent to Group 0.")},{name:"blockOnQueue",type:"Query",schema:k.boolean().describe("If true, response will block on update packets being sent before returning").optional()},{name:"fmt",type:"Query",schema:k.literal("normalized").describe("If set to `normalized`, the response will be in normalized format.").optional()}],response:k.union([Hr,pu,Zd]),errors:[{status:400,description:"error with request",schema:Hr}]},{method:"delete",path:"/gateways/:deviceId/:remoteType/:groupId",alias:"deleteGatewaysDeviceIdRemoteTypeGroupId",description:"Usets all known values for state fields for the corresponding device. If MQTT is configured, the retained state message corresponding to this device will also be deleted.",requestFormat:"json",parameters:[{name:"deviceId",type:"Path",schema:I9},{name:"remoteType",type:"Path",schema:k.enum(["rgbw","cct","rgb_cct","rgb","fut089","fut091","fut020"]).describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")},{name:"groupId",type:"Path",schema:k.number().int().gte(0).lte(8).describe("Group ID. Should be 0-8, depending on remote type. Group 0 is a 'wildcard' group. All bulbs paired with the same device ID will respond to commands sent to Group 0.")}],response:Hr},{method:"post",path:"/raw_commands/:remoteType",alias:"postRaw_commandsRemoteType",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:OL},{name:"remoteType",type:"Path",schema:k.enum(["rgbw","cct","rgb_cct","rgb","fut089","fut091","fut020"]).describe("Type of remote to read a packet from. If unspecified, will read packets from all remote types.")}],response:k.void()},{method:"get",path:"/remote_configs",alias:"getRemote_configs",requestFormat:"json",response:k.void()},{method:"get",path:"/settings",alias:"getSettings",requestFormat:"json",response:L9},{method:"put",path:"/settings",alias:"putSettings",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:L9}],response:Hr},{method:"post",path:"/settings",alias:"postSettings",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:L9}],response:Hr},{method:"post",path:"/system",alias:"postSystem",description:`Send commands to the system. Supported commands: +1. `restart`. Restart the ESP8266. +1. `clear_wifi_config`. Clears on-board wifi information. ESP8266 will reboot and enter wifi config mode. +`,requestFormat:"json",parameters:[{name:"body",type:"Body",schema:TL}],response:Hr,errors:[{status:400,description:"error",schema:Hr}]},{method:"get",path:"/transitions",alias:"getTransitions",requestFormat:"json",response:k.array(R9)},{method:"post",path:"/transitions",alias:"postTransitions",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:HL}],response:Hr,errors:[{status:400,description:"error",schema:Hr}]},{method:"get",path:"/transitions/:id",alias:"getTransitionsId",requestFormat:"json",parameters:[{name:"id",type:"Path",schema:k.number().int().describe("ID of transition. This will be an auto-incrementing number reset after a restart.")}],response:R9,errors:[{status:404,description:"Provided transition ID not found",schema:k.void()}]},{method:"delete",path:"/transitions/:id",alias:"deleteTransitionsId",requestFormat:"json",parameters:[{name:"id",type:"Path",schema:k.number().int().describe("ID of transition. This will be an auto-incrementing number reset after a restart.")}],response:Hr,errors:[{status:404,description:"Provided transition ID not found",schema:Hr}]}]),Hn=new Qp(FL);function DL(e,t){return new Qp(e,FL,t)}var BL=(0,dn.createContext)(null),NL=({children:e})=>{let[t,r]=(0,dn.useState)(null),[o,n]=(0,dn.useState)(!0),[a,s]=(0,dn.useState)("light");(0,dn.useEffect)(()=>{Hn.getSettings().then(g=>{r(g),n(!1)});let d=localStorage.getItem("theme"),p=window.matchMedia("(prefers-color-scheme: dark)").matches;s(d||(p?"dark":"light"))},[]);let u=d=>{let p={...t,...d};r(p),Hn.putSettings(p)},c=()=>{let d=a==="dark"?"light":"dark";s(d),localStorage.setItem("theme",d)};return(0,dn.useEffect)(()=>{a==="dark"?document.body.className="dark":document.body.className=""},[a]),dn.default.createElement(BL.Provider,{value:{settings:t,updateSettings:u,isLoading:o,theme:a,toggleTheme:c}},e)},zd=()=>{let e=(0,dn.useContext)(BL);if(!e)throw new Error("useSettings must be used within a SettingsProvider");return e};function Oj(){let{theme:e,toggleTheme:t}=zd();return ho.createElement("button",{onClick:t,className:"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100"},e==="dark"?ho.createElement(vs,{size:20}):ho.createElement(ms,{size:20}))}function ZL({className:e,...t}){let{settings:r,isLoading:o}=zd();return ho.createElement("div",{className:"w-full"},ho.createElement("div",{className:"flex h-16 items-center px-4 justify-between"},ho.createElement("div",{className:"flex items-center"},ho.createElement(md,{className:"hover:text-slate-900 dark:hover:text-slate-100 text-slate-900 dark:text-slate-100 text-lg font-bold",href:"#/dashboard"},o?"MiLight Hub":`MiLight Hub: ${r?.hostname}`),ho.createElement("nav",{className:ee("flex items-center space-x-4 lg:space-x-6 mx-6",e),...t},ho.createElement(Yf,{href:"#/dashboard"},"Dashboard"),ho.createElement(Yf,{href:"#/sniffer"},"Sniffer"))),ho.createElement("div",{className:"flex items-center space-x-4"},ho.createElement(Oj,null),ho.createElement(md,{href:"#/settings",className:"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100"},ho.createElement(yd,{size:24})))))}var eh=N(U());var Ge=N(U());var Vo=N(U());var jd=Vo.forwardRef(({className:e,...t},r)=>Vo.createElement("div",{ref:r,className:ee("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));jd.displayName="Card";var C1=Vo.forwardRef(({className:e,...t},r)=>Vo.createElement("div",{ref:r,className:ee("flex flex-col space-y-1.5 p-6",e),...t}));C1.displayName="CardHeader";var w1=Vo.forwardRef(({className:e,...t},r)=>Vo.createElement("h3",{ref:r,className:ee("text-2xl font-semibold leading-none tracking-tight",e),...t}));w1.displayName="CardTitle";var Hj=Vo.forwardRef(({className:e,...t},r)=>Vo.createElement("p",{ref:r,className:ee("text-sm text-muted-foreground",e),...t}));Hj.displayName="CardDescription";var x1=Vo.forwardRef(({className:e,...t},r)=>Vo.createElement("div",{ref:r,className:ee("p-6 pt-0",e),...t}));x1.displayName="CardContent";var Vj=Vo.forwardRef(({className:e,...t},r)=>Vo.createElement("div",{ref:r,className:ee("flex items-center p-6 pt-0",e),...t}));Vj.displayName="CardFooter";var Ud=N(U());var Ba=N(U(),1);function Se(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var GL=N(U(),1);function Fj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function s6(...e){return t=>e.forEach(r=>Fj(r,t))}function Ue(...e){return GL.useCallback(s6(...e),e)}var Vn=N(U(),1),l6=N(Tt(),1);function UL(e,t){let r=Vn.createContext(t),o=a=>{let{children:s,...u}=a,c=Vn.useMemo(()=>u,Object.values(u));return(0,l6.jsx)(r.Provider,{value:c,children:s})};o.displayName=e+"Provider";function n(a){let s=Vn.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function Da(e,t=[]){let r=[];function o(a,s){let u=Vn.createContext(s),c=r.length;r=[...r,s];let d=m=>{let{scope:g,children:y,...x}=m,v=g?.[e]?.[c]||u,b=Vn.useMemo(()=>x,Object.values(x));return(0,l6.jsx)(v.Provider,{value:b,children:y})};d.displayName=a+"Provider";function p(m,g){let y=g?.[e]?.[c]||u,x=Vn.useContext(y);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,p]}let n=()=>{let a=r.map(s=>Vn.createContext(s));return function(u){let c=u?.[e]||a;return Vn.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return n.scopeName=e,[o,zj(n,...t)]}function zj(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let s=o.reduce((u,{useScope:c,scopeName:d})=>{let m=c(a)[`__scope${d}`];return{...u,...m}},{});return Vn.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var y1=N(U(),1);var mu=N(U(),1);function lr(e){let t=mu.useRef(e);return mu.useEffect(()=>{t.current=e}),mu.useMemo(()=>(...r)=>t.current?.(...r),[])}function Vr({prop:e,defaultProp:t,onChange:r=()=>{}}){let[o,n]=jj({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:o,u=lr(r),c=y1.useCallback(d=>{if(a){let m=typeof d=="function"?d(e):d;m!==e&&u(m)}else n(d)},[a,e,n,u]);return[s,c]}function jj({defaultProp:e,onChange:t}){let r=y1.useState(e),[o]=r,n=y1.useRef(o),a=lr(t);return y1.useEffect(()=>{n.current!==o&&(a(o),n.current=o)},[o,n,a]),r}var M9=N(U(),1);function hu(e){let t=M9.useRef({value:e,previous:e});return M9.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var XL=N(U(),1);var $L=N(U(),1),rr=globalThis?.document?$L.useLayoutEffect:()=>{};function gu(e){let[t,r]=XL.useState(void 0);return rr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let a=n[0],s,u;if("borderBoxSize"in a){let c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,u=d.blockSize}else s=e.offsetWidth,u=e.offsetHeight;r({width:s,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var qL=N(U(),1),YL=N(Oa(),1);var jr=N(U(),1);var vu=N(Tt(),1),Fo=jr.forwardRef((e,t)=>{let{children:r,...o}=e,n=jr.Children.toArray(r),a=n.find($j);if(a){let s=a.props.children,u=n.map(c=>c===a?jr.Children.count(s)>1?jr.Children.only(null):jr.isValidElement(s)?s.props.children:null:c);return(0,vu.jsx)(u6,{...o,ref:t,children:jr.isValidElement(s)?jr.cloneElement(s,void 0,u):null})}return(0,vu.jsx)(u6,{...o,ref:t,children:r})});Fo.displayName="Slot";var u6=jr.forwardRef((e,t)=>{let{children:r,...o}=e;if(jr.isValidElement(r)){let n=qj(r);return jr.cloneElement(r,{...Xj(o,r.props),ref:t?s6(t,n):n})}return jr.Children.count(r)>1?jr.Children.only(null):null});u6.displayName="SlotClone";var Uj=({children:e})=>(0,vu.jsx)(vu.Fragment,{children:e});function $j(e){return jr.isValidElement(e)&&e.type===Uj}function Xj(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...u)=>{a(...u),n(...u)}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function qj(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var JL=N(Tt(),1),Yj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=Yj.reduce((e,t)=>{let r=qL.forwardRef((o,n)=>{let{asChild:a,...s}=o,u=a?Fo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,JL.jsx)(u,{...s,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function A9(e,t){e&&YL.flushSync(()=>e.dispatchEvent(t))}var Os=N(Tt(),1),c6="Switch",[Jj,Gae]=Da(c6),[Qj,Kj]=Jj(c6),QL=Ba.forwardRef((e,t)=>{let{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:s,disabled:u,value:c="on",onCheckedChange:d,form:p,...m}=e,[g,y]=Ba.useState(null),x=Ue(t,I=>y(I)),v=Ba.useRef(!1),b=g?p||!!g.closest("form"):!0,[w=!1,C]=Vr({prop:n,defaultProp:a,onChange:d});return(0,Os.jsxs)(Qj,{scope:r,checked:w,disabled:u,children:[(0,Os.jsx)(be.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":tI(w),"data-disabled":u?"":void 0,disabled:u,value:c,...m,ref:x,onClick:Se(e.onClick,I=>{C(_=>!_),b&&(v.current=I.isPropagationStopped(),v.current||I.stopPropagation())})}),b&&(0,Os.jsx)(eU,{control:g,bubbles:!v.current,name:o,value:c,checked:w,required:s,disabled:u,form:p,style:{transform:"translateX(-100%)"}})]})});QL.displayName=c6;var KL="SwitchThumb",eI=Ba.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=Kj(KL,r);return(0,Os.jsx)(be.span,{"data-state":tI(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});eI.displayName=KL;var eU=e=>{let{control:t,checked:r,bubbles:o=!0,...n}=e,a=Ba.useRef(null),s=hu(r),u=gu(t);return Ba.useEffect(()=>{let c=a.current,d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==r&&m){let g=new Event("click",{bubbles:o});m.call(c,r),c.dispatchEvent(g)}},[s,r,o]),(0,Os.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function tI(e){return e?"checked":"unchecked"}var d6=QL,rI=eI;var $d=Ud.forwardRef(({className:e,...t},r)=>Ud.createElement(d6,{className:ee("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r},Ud.createElement(rI,{className:ee("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));$d.displayName=d6.displayName;var Fr=N(U());var Nt=N(U(),1);var T9=N(U(),1);var rU=T9.useId||(()=>{}),oU=0;function Na(e){let[t,r]=T9.useState(rU());return rr(()=>{e||r(o=>o??String(oU++))},[e]),e||(t?`radix-${t}`:"")}var or=N(U(),1);var oI=N(U(),1);function nI(e,t=globalThis?.document){let r=lr(e);oI.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var p6=N(Tt(),1),nU="DismissableLayer",f6="dismissableLayer.update",aU="dismissableLayer.pointerDownOutside",iU="dismissableLayer.focusOutside",aI,sI=or.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cu=or.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...c}=e,d=or.useContext(sI),[p,m]=or.useState(null),g=p?.ownerDocument??globalThis?.document,[,y]=or.useState({}),x=Ue(t,A=>m(A)),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),C=p?v.indexOf(p):-1,I=d.layersWithOutsidePointerEventsDisabled.size>0,_=C>=w,M=lU(A=>{let H=A.target,J=[...d.branches].some(Z=>Z.contains(H));!_||J||(n?.(A),s?.(A),A.defaultPrevented||u?.())},g),T=uU(A=>{let H=A.target;[...d.branches].some(Z=>Z.contains(H))||(a?.(A),s?.(A),A.defaultPrevented||u?.())},g);return nI(A=>{C===d.layers.size-1&&(o?.(A),!A.defaultPrevented&&u&&(A.preventDefault(),u()))},g),or.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(aI=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),iI(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=aI)}},[p,g,r,d]),or.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),iI())},[p,d]),or.useEffect(()=>{let A=()=>y({});return document.addEventListener(f6,A),()=>document.removeEventListener(f6,A)},[]),(0,p6.jsx)(be.div,{...c,ref:x,style:{pointerEvents:I?_?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,M.onPointerDownCapture)})});Cu.displayName=nU;var sU="DismissableLayerBranch",lI=or.forwardRef((e,t)=>{let r=or.useContext(sI),o=or.useRef(null),n=Ue(t,o);return or.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,p6.jsx)(be.div,{...e,ref:n})});lI.displayName=sU;function lU(e,t=globalThis?.document){let r=lr(e),o=or.useRef(!1),n=or.useRef(()=>{});return or.useEffect(()=>{let a=u=>{if(u.target&&!o.current){let d=function(){uI(aU,r,p,{discrete:!0})};var c=d;let p={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=d,t.addEventListener("click",n.current,{once:!0})):d()}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 uU(e,t=globalThis?.document){let r=lr(e),o=or.useRef(!1);return or.useEffect(()=>{let n=a=>{a.target&&!o.current&&uI(iU,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 iI(){let e=new CustomEvent(f6);document.dispatchEvent(e)}function uI(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?A9(n,a):n.dispatchEvent(a)}var cI=Cu,dI=lI;var Fn=N(U(),1);var gI=N(Tt(),1),m6="focusScope.autoFocusOnMount",h6="focusScope.autoFocusOnUnmount",fI={bubbles:!1,cancelable:!0},dU="FocusScope",Xd=Fn.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[u,c]=Fn.useState(null),d=lr(n),p=lr(a),m=Fn.useRef(null),g=Ue(t,v=>c(v)),y=Fn.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Fn.useEffect(()=>{if(o){let C=function(T){if(y.paused||!u)return;let A=T.target;u.contains(A)?m.current=A:b1(m.current,{select:!0})},I=function(T){if(y.paused||!u)return;let A=T.relatedTarget;A!==null&&(u.contains(A)||b1(m.current,{select:!0}))},_=function(T){if(document.activeElement===document.body)for(let H of T)H.removedNodes.length>0&&b1(u)};var v=C,b=I,w=_;document.addEventListener("focusin",C),document.addEventListener("focusout",I);let M=new MutationObserver(_);return u&&M.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",I),M.disconnect()}}},[o,u,y.paused]),Fn.useEffect(()=>{if(u){mI.add(y);let v=document.activeElement;if(!u.contains(v)){let w=new CustomEvent(m6,fI);u.addEventListener(m6,d),u.dispatchEvent(w),w.defaultPrevented||(fU(vU(vI(u)),{select:!0}),document.activeElement===v&&b1(u))}return()=>{u.removeEventListener(m6,d),setTimeout(()=>{let w=new CustomEvent(h6,fI);u.addEventListener(h6,p),u.dispatchEvent(w),w.defaultPrevented||b1(v??document.body,{select:!0}),u.removeEventListener(h6,p),mI.remove(y)},0)}}},[u,d,p,y]);let x=Fn.useCallback(v=>{if(!r&&!o||y.paused)return;let b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){let C=v.currentTarget,[I,_]=pU(C);I&&_?!v.shiftKey&&w===_?(v.preventDefault(),r&&b1(I,{select:!0})):v.shiftKey&&w===I&&(v.preventDefault(),r&&b1(_,{select:!0})):w===C&&v.preventDefault()}},[r,o,y.paused]);return(0,gI.jsx)(be.div,{tabIndex:-1,...s,ref:g,onKeyDown:x})});Xd.displayName=dU;function fU(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(b1(o,{select:t}),document.activeElement!==r)return}function pU(e){let t=vI(e),r=pI(t,e),o=pI(t.reverse(),e);return[r,o]}function vI(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let 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 pI(e,t){for(let r of e)if(!mU(r,{upTo:t}))return r}function mU(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 b1(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hU(e)&&t&&e.select()}}var mI=gU();function gU(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=hI(e,t),e.unshift(t)},remove(t){e=hI(e,t),e[0]?.resume()}}}function hI(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function vU(e){return e.filter(t=>t.tagName!=="A")}var P9=N(U(),1),CI=N(Oa(),1);var wI=N(Tt(),1),CU="Portal",Hs=P9.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=P9.useState(!1);rr(()=>a(!0),[]);let s=r||n&&globalThis?.document?.body;return s?CI.default.createPortal((0,wI.jsx)(be.div,{...o,ref:t}),s):null});Hs.displayName=CU;var Do=N(U(),1);var xI=N(U(),1);function wU(e,t){return xI.useReducer((r,o)=>t[r][o]??r,e)}var Vs=e=>{let{present:t,children:r}=e,o=xU(t),n=typeof r=="function"?r({present:o.isPresent}):Do.Children.only(r),a=Ue(o.ref,yU(n));return typeof r=="function"||o.isPresent?Do.cloneElement(n,{ref:a}):null};Vs.displayName="Presence";function xU(e){let[t,r]=Do.useState(),o=Do.useRef({}),n=Do.useRef(e),a=Do.useRef("none"),s=e?"mounted":"unmounted",[u,c]=wU(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Do.useEffect(()=>{let d=k9(o.current);a.current=u==="mounted"?d:"none"},[u]),rr(()=>{let d=o.current,p=n.current;if(p!==e){let g=a.current,y=k9(d);e?c("MOUNT"):y==="none"||d?.display==="none"?c("UNMOUNT"):c(p&&g!==y?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,c]),rr(()=>{if(t){let d,p=t.ownerDocument.defaultView??window,m=y=>{let v=k9(o.current).includes(y.animationName);if(y.target===t&&v&&(c("ANIMATION_END"),!n.current)){let b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=y=>{y.target===t&&(a.current=k9(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:Do.useCallback(d=>{d&&(o.current=getComputedStyle(d)),r(d)},[])}}function k9(e){return e?.animationName||"none"}function yU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bI=N(U(),1),g6=0;function E9(){bI.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??yI()),document.body.insertAdjacentElement("beforeend",e[1]??yI()),g6++,()=>{g6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),g6--}},[])}function yI(){let 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 Bo=function(){return Bo=Object.assign||function(t){for(var r,o=1,n=arguments.length;o"u")return MU;var t=AU(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])}};var TU=Yd(),wu="data-scroll-locked",PU=function(e,t,r,o){var n=e.left,a=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` + .`.concat(v6,` { + overflow: hidden `).concat(o,`; + padding-right: `).concat(u,"px ").concat(o,`; + } + body[`).concat(wu,`] { + overflow: hidden `).concat(o,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&` + padding-left: `.concat(n,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(u,"px ").concat(o,`; + `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(o,";")].filter(Boolean).join(""),` + } + + .`).concat(Fs,` { + right: `).concat(u,"px ").concat(o,`; + } + + .`).concat(Ds,` { + margin-right: `).concat(u,"px ").concat(o,`; + } + + .`).concat(Fs," .").concat(Fs,` { + right: 0 `).concat(o,`; + } + + .`).concat(Ds," .").concat(Ds,` { + margin-right: 0 `).concat(o,`; + } + + body[`).concat(wu,`] { + `).concat(C6,": ").concat(u,`px; + } +`)},kI=function(){var e=parseInt(document.body.getAttribute(wu)||"0",10);return isFinite(e)?e:0},kU=function(){xu.useEffect(function(){return document.body.setAttribute(wu,(kI()+1).toString()),function(){var e=kI()-1;e<=0?document.body.removeAttribute(wu):document.body.setAttribute(wu,e.toString())}},[])},_6=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;kU();var a=xu.useMemo(function(){return R6(n)},[n]);return xu.createElement(TU,{styles:PU(a,!t,n,r?"":"!important")})};var M6=!1;if(typeof window<"u")try{Jd=Object.defineProperty({},"passive",{get:function(){return M6=!0,!0}}),window.addEventListener("test",Jd,Jd),window.removeEventListener("test",Jd,Jd)}catch{M6=!1}var Jd,Bs=M6?{passive:!1}:!1;var EU=function(e){return e.tagName==="TEXTAREA"},EI=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!EU(e)&&r[t]==="visible")},OU=function(e){return EI(e,"overflowY")},HU=function(e){return EI(e,"overflowX")},A6=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=OI(e,o);if(n){var a=HI(e,o),s=a[1],u=a[2];if(s>u)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},VU=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},FU=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},OI=function(e,t){return e==="v"?OU(t):HU(t)},HI=function(e,t){return e==="v"?VU(t):FU(t)},DU=function(e,t){return e==="h"&&t==="rtl"?-1:1},VI=function(e,t,r,o,n){var a=DU(e,window.getComputedStyle(t).direction),s=a*o,u=r.target,c=t.contains(u),d=!1,p=s>0,m=0,g=0;do{var y=HI(e,u),x=y[0],v=y[1],b=y[2],w=v-b-a*x;(x||w)&&OI(e,u)&&(m+=w,g+=x),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(p&&(n&&Math.abs(m)<1||!n&&s>m)||!p&&(n&&Math.abs(g)<1||!n&&-s>g))&&(d=!0),d};var D9=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},FI=function(e){return[e.deltaX,e.deltaY]},DI=function(e){return e&&"current"in e?e.current:e},BU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},NU=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},ZU=0,yu=[];function BI(e){var t=$t.useRef([]),r=$t.useRef([0,0]),o=$t.useRef(),n=$t.useState(ZU++)[0],a=$t.useState(Yd)[0],s=$t.useRef(e);$t.useEffect(function(){s.current=e},[e]),$t.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var v=LI([e.lockRef.current],(e.shards||[]).map(DI),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var u=$t.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var w=D9(v),C=r.current,I="deltaX"in v?v.deltaX:C[0]-w[0],_="deltaY"in v?v.deltaY:C[1]-w[1],M,T=v.target,A=Math.abs(I)>Math.abs(_)?"h":"v";if("touches"in v&&A==="h"&&T.type==="range")return!1;var H=A6(A,T);if(!H)return!0;if(H?M=A:(M=A==="v"?"h":"v",H=A6(A,T)),!H)return!1;if(!o.current&&"changedTouches"in v&&(I||_)&&(o.current=M),!M)return!0;var J=o.current||M;return VI(J,b,v,J==="h"?I:_,!0)},[]),c=$t.useCallback(function(v){var b=v;if(!(!yu.length||yu[yu.length-1]!==a)){var w="deltaY"in b?FI(b):D9(b),C=t.current.filter(function(M){return M.name===b.type&&(M.target===b.target||b.target===M.shadowParent)&&BU(M.delta,w)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var I=(s.current.shards||[]).map(DI).filter(Boolean).filter(function(M){return M.contains(b.target)}),_=I.length>0?u(b,I[0]):!s.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),d=$t.useCallback(function(v,b,w,C){var I={name:v,delta:b,target:w,should:C,shadowParent:GU(w)};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(_){return _!==I})},1)},[]),p=$t.useCallback(function(v){r.current=D9(v),o.current=void 0},[]),m=$t.useCallback(function(v){d(v.type,FI(v),v.target,u(v,e.lockRef.current))},[]),g=$t.useCallback(function(v){d(v.type,D9(v),v.target,u(v,e.lockRef.current))},[]);$t.useEffect(function(){return yu.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Bs),document.addEventListener("touchmove",c,Bs),document.addEventListener("touchstart",p,Bs),function(){yu=yu.filter(function(v){return v!==a}),document.removeEventListener("wheel",c,Bs),document.removeEventListener("touchmove",c,Bs),document.removeEventListener("touchstart",p,Bs)}},[]);var y=e.removeScrollBar,x=e.inert;return $t.createElement($t.Fragment,null,x?$t.createElement(a,{styles:NU(n)}):null,y?$t.createElement(_6,{gapMode:e.gapMode}):null)}function GU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var NI=y6(F9,BI);var ZI=B9.forwardRef(function(e,t){return B9.createElement(qd,Bo({},e,{ref:t,sideCar:NI}))});ZI.classNames=qd.classNames;var Qd=ZI;var WU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bu=new WeakMap,N9=new WeakMap,Z9={},T6=0,GI=function(e){return e&&(e.host||GI(e.parentNode))},zU=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=GI(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})},jU=function(e,t,r,o){var n=zU(t,Array.isArray(e)?e:[e]);Z9[r]||(Z9[r]=new WeakMap);var a=Z9[r],s=[],u=new Set,c=new Set(n),d=function(m){!m||u.has(m)||(u.add(m),d(m.parentNode))};n.forEach(d);var p=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(g){if(u.has(g))p(g);else try{var y=g.getAttribute(o),x=y!==null&&y!=="false",v=(bu.get(g)||0)+1,b=(a.get(g)||0)+1;bu.set(g,v),a.set(g,b),s.push(g),v===1&&x&&N9.set(g,!0),b===1&&g.setAttribute(r,"true"),x||g.setAttribute(o,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return p(t),u.clear(),T6++,function(){s.forEach(function(m){var g=bu.get(m)-1,y=a.get(m)-1;bu.set(m,g),a.set(m,y),g||(N9.has(m)||m.removeAttribute(o),N9.delete(m)),y||m.removeAttribute(r)}),T6--,T6||(bu=new WeakMap,bu=new WeakMap,N9=new WeakMap,Z9={})}},G9=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||WU(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live]"))),jU(o,n,r,"aria-hidden")):function(){return null}};var Pt=N(Tt(),1),P6="Dialog",[WI,O1e]=Da(P6),[UU,ua]=WI(P6),zI=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:s=!0}=e,u=Nt.useRef(null),c=Nt.useRef(null),[d=!1,p]=Vr({prop:o,defaultProp:n,onChange:a});return(0,Pt.jsx)(UU,{scope:t,triggerRef:u,contentRef:c,contentId:Na(),titleId:Na(),descriptionId:Na(),open:d,onOpenChange:p,onOpenToggle:Nt.useCallback(()=>p(m=>!m),[p]),modal:s,children:r})};zI.displayName=P6;var jI="DialogTrigger",UI=Nt.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=ua(jI,r),a=Ue(t,n.triggerRef);return(0,Pt.jsx)(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":O6(n.open),...o,ref:a,onClick:Se(e.onClick,n.onOpenToggle)})});UI.displayName=jI;var k6="DialogPortal",[$U,$I]=WI(k6,{forceMount:void 0}),XI=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=ua(k6,t);return(0,Pt.jsx)($U,{scope:t,forceMount:r,children:Nt.Children.map(o,s=>(0,Pt.jsx)(Vs,{present:r||a.open,children:(0,Pt.jsx)(Hs,{asChild:!0,container:n,children:s})}))})};XI.displayName=k6;var W9="DialogOverlay",qI=Nt.forwardRef((e,t)=>{let r=$I(W9,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=ua(W9,e.__scopeDialog);return a.modal?(0,Pt.jsx)(Vs,{present:o||a.open,children:(0,Pt.jsx)(XU,{...n,ref:t})}):null});qI.displayName=W9;var XU=Nt.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=ua(W9,r);return(0,Pt.jsx)(Qd,{as:Fo,allowPinchZoom:!0,shards:[n.contentRef],children:(0,Pt.jsx)(be.div,{"data-state":O6(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ns="DialogContent",YI=Nt.forwardRef((e,t)=>{let r=$I(Ns,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=ua(Ns,e.__scopeDialog);return(0,Pt.jsx)(Vs,{present:o||a.open,children:a.modal?(0,Pt.jsx)(qU,{...n,ref:t}):(0,Pt.jsx)(YU,{...n,ref:t})})});YI.displayName=Ns;var qU=Nt.forwardRef((e,t)=>{let r=ua(Ns,e.__scopeDialog),o=Nt.useRef(null),n=Ue(t,r.contentRef,o);return Nt.useEffect(()=>{let a=o.current;if(a)return G9(a)},[]),(0,Pt.jsx)(JI,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,a=>{let s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,a=>a.preventDefault())})}),YU=Nt.forwardRef((e,t)=>{let r=ua(Ns,e.__scopeDialog),o=Nt.useRef(!1),n=Nt.useRef(!1);return(0,Pt.jsx)(JI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),JI=Nt.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...s}=e,u=ua(Ns,r),c=Nt.useRef(null),d=Ue(t,c);return E9(),(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(Xd,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Pt.jsx)(Cu,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":O6(u.open),...s,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(JU,{titleId:u.titleId}),(0,Pt.jsx)(KU,{contentRef:c,descriptionId:u.descriptionId})]})]})}),E6="DialogTitle",QI=Nt.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=ua(E6,r);return(0,Pt.jsx)(be.h2,{id:n.titleId,...o,ref:t})});QI.displayName=E6;var KI="DialogDescription",eS=Nt.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=ua(KI,r);return(0,Pt.jsx)(be.p,{id:n.descriptionId,...o,ref:t})});eS.displayName=KI;var tS="DialogClose",rS=Nt.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=ua(tS,r);return(0,Pt.jsx)(be.button,{type:"button",...o,ref:t,onClick:Se(e.onClick,()=>n.onOpenChange(!1))})});rS.displayName=tS;function O6(e){return e?"open":"closed"}var oS="DialogTitleWarning",[H1e,nS]=UL(oS,{contentName:Ns,titleName:E6,docsSlug:"dialog"}),JU=({titleId:e})=>{let t=nS(oS),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Nt.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},QU="DialogDescriptionWarning",KU=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nS(QU).contentName}}.`;return Nt.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},aS=zI,iS=UI,sS=XI,H6=qI,V6=YI,F6=QI,D6=eS,lS=rS;var Kd=aS,uS=iS,t$=sS;var cS=Fr.forwardRef(({className:e,...t},r)=>Fr.createElement(H6,{ref:r,className:ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));cS.displayName=H6.displayName;var Lu=Fr.forwardRef(({className:e,children:t,closeButton:r=!0,...o},n)=>Fr.createElement(t$,null,Fr.createElement(cS,null),Fr.createElement(V6,{ref:n,className:ee("fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o},Fr.createElement("div",{className:ee("relative",r?"pr-6":"")},t,r&&Fr.createElement(lS,{className:"absolute right-0 top-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},Fr.createElement(vi,{className:"h-4 w-4"}),Fr.createElement("span",{className:"sr-only"},"Close"))))));Lu.displayName=V6.displayName;var e0=({className:e,...t})=>Fr.createElement("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});e0.displayName="DialogHeader";var B6=({className:e,...t})=>Fr.createElement("div",{className:ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});B6.displayName="DialogFooter";var t0=Fr.forwardRef(({className:e,...t},r)=>Fr.createElement(F6,{ref:r,className:ee("text-lg font-semibold leading-none tracking-tight",e),...t}));t0.displayName=F6.displayName;var N6=Fr.forwardRef(({className:e,...t},r)=>Fr.createElement(D6,{ref:r,className:ee("text-sm text-muted-foreground",e),...t}));N6.displayName=D6.displayName;var dS=N(U());function z9({state:e}){let t="gray",r=e.color_mode||"white";return e.state==="ON"&&(r==="rgb"&&e.color?t=`rgba(${e.color.r}, ${e.color.g}, ${e.color.b}, 1)`:e.color_mode==="color_temp"&&e.kelvin!==void 0?e.kelvin<50?t="lightblue":t="orange":r==="white"&&(t="yellow")),dS.default.createElement(wd,{size:24,style:{color:t}})}var yi=N(U());var j9=N(U());function fS(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,hS=pS,Dn=(e,t)=>r=>{var o;if(t?.variants==null)return hS(e,r?.class,r?.className);let{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(d=>{let p=r?.[d],m=a?.[d];if(p===null)return null;let g=mS(p)||mS(m);return n[d][g]}),u=r&&Object.entries(r).reduce((d,p)=>{let[m,g]=p;return g===void 0||(d[m]=g),d},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,p)=>{let{class:m,className:g,...y}=p;return Object.entries(y).every(x=>{let[v,b]=x;return Array.isArray(b)?b.includes({...a,...u}[v]):{...a,...u}[v]===b})?[...d,m,g]:d},[]);return hS(e,s,c,r?.class,r?.className)};var r$=Dn("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Zt=j9.forwardRef(({className:e,variant:t,size:r,asChild:o=!1,...n},a)=>j9.createElement(o?Fo:"button",{className:ee(r$({variant:t,size:r,className:e})),ref:a,...n}));Zt.displayName="Button";var o$=({title:e,description:t,open:r,setOpen:o,onConfirm:n,onCancel:a,confirmText:s="Confirm",cancelText:u="Cancel"})=>yi.createElement(Kd,{open:r,onOpenChange:o},yi.createElement(Lu,null,yi.createElement(e0,null,yi.createElement(t0,null,e)),yi.createElement(N6,{className:"my-4"},t),yi.createElement(B6,null,yi.createElement(Zt,{onClick:()=>{o(!1),a?.()},variant:"outline"},u),yi.createElement(Zt,{onClick:()=>{o(!1),n?.()},variant:"destructive"},s)))),gS=o$;var rt=N(U());var St=N(U(),1),a0=e=>e.type==="checkbox",Su=e=>e instanceof Date,go=e=>e==null,RS=e=>typeof e=="object",wr=e=>!go(e)&&!Array.isArray(e)&&RS(e)&&!Su(e),_S=e=>wr(e)&&e.target?a0(e.target)?e.target.checked:e.target.value:e,n$=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,MS=(e,t)=>e.has(n$(t)),a$=e=>{let t=e.constructor&&e.constructor.prototype;return wr(t)&&t.hasOwnProperty("isPrototypeOf")},z6=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function No(e){let t,r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(z6&&(e instanceof Blob||e instanceof FileList))&&(r||wr(e)))if(t=r?[]:{},!r&&!a$(e))t=e;else for(let o in e)e.hasOwnProperty(o)&&(t[o]=No(e[o]));else return e;return t}var K9=e=>Array.isArray(e)?e.filter(Boolean):[],ur=e=>e===void 0,le=(e,t,r)=>{if(!t||!wr(e))return r;let o=K9(t.split(/[,[\].]+?/)).reduce((n,a)=>go(n)?n:n[a],e);return ur(o)||o===e?ur(e[t])?r:e[t]:o},Bn=e=>typeof e=="boolean",j6=e=>/^\w*$/.test(e),AS=e=>K9(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pt=(e,t,r)=>{let o=-1,n=j6(t)?[t]:AS(t),a=n.length,s=a-1;for(;++oSt.default.useContext(TS),e5=e=>{let{children:t,...r}=e;return St.default.createElement(TS.Provider,{value:r},t)},PS=(e,t,r,o=!0)=>{let n={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(n,a,{get:()=>{let s=a;return t._proxyFormState[s]!==ca.all&&(t._proxyFormState[s]=!o||ca.all),r&&(r[s]=!0),e[s]}});return n},Zo=e=>wr(e)&&!Object.keys(e).length,kS=(e,t,r,o)=>{r(e);let{name:n,...a}=e;return Zo(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!o||ca.all))},o0=e=>Array.isArray(e)?e:[e],ES=(e,t,r)=>!e||!t||e===t||o0(e).some(o=>o&&(r?o===t:o.startsWith(t)||t.startsWith(o)));function U6(e){let t=St.default.useRef(e);t.current=e,St.default.useEffect(()=>{let r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function i$(e){let t=oo(),{control:r=t.control,disabled:o,name:n,exact:a}=e||{},[s,u]=St.default.useState(r._formState),c=St.default.useRef(!0),d=St.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),p=St.default.useRef(n);return p.current=n,U6({disabled:o,next:m=>c.current&&ES(p.current,m.name,a)&&kS(m,d.current,r._updateFormState)&&u({...r._formState,...m}),subject:r._subjects.state}),St.default.useEffect(()=>(c.current=!0,d.current.isValid&&r._updateValid(!0),()=>{c.current=!1}),[r]),PS(s,r,d.current,!1)}var Za=e=>typeof e=="string",OS=(e,t,r,o,n)=>Za(e)?(o&&t.watch.add(e),le(r,e,n)):Array.isArray(e)?e.map(a=>(o&&t.watch.add(a),le(r,a))):(o&&(t.watchAll=!0),r);function s$(e){let t=oo(),{control:r=t.control,name:o,defaultValue:n,disabled:a,exact:s}=e||{},u=St.default.useRef(o);u.current=o,U6({disabled:a,subject:r._subjects.values,next:p=>{ES(u.current,p.name,s)&&d(No(OS(u.current,r._names,p.values||r._formValues,!1,n)))}});let[c,d]=St.default.useState(r._getWatch(o,n));return St.default.useEffect(()=>r._removeUnmounted()),c}function l$(e){let t=oo(),{name:r,disabled:o,control:n=t.control,shouldUnregister:a}=e,s=MS(n._names.array,r),u=s$({control:n,name:r,defaultValue:le(n._formValues,r,le(n._defaultValues,r,e.defaultValue)),exact:!0}),c=i$({control:n,name:r,exact:!0}),d=St.default.useRef(n.register(r,{...e.rules,value:u,...Bn(e.disabled)?{disabled:e.disabled}:{}}));return St.default.useEffect(()=>{let p=n._options.shouldUnregister||a,m=(g,y)=>{let x=le(n._fields,g);x&&x._f&&(x._f.mount=y)};if(m(r,!0),p){let g=No(le(n._options.defaultValues,r));pt(n._defaultValues,r,g),ur(le(n._formValues,r))&&pt(n._formValues,r,g)}return()=>{(s?p&&!n._state.action:p)?n.unregister(r):m(r,!1)}},[r,n,s,a]),St.default.useEffect(()=>{le(n._fields,r)&&n._updateDisabledField({disabled:o,fields:n._fields,name:r,value:le(n._fields,r)._f.value})},[o,r,n]),{field:{name:r,value:u,...Bn(o)||c.disabled?{disabled:c.disabled||o}:{},onChange:St.default.useCallback(p=>d.current.onChange({target:{value:_S(p),name:r},type:X9.CHANGE}),[r]),onBlur:St.default.useCallback(()=>d.current.onBlur({target:{value:le(n._formValues,r),name:r},type:X9.BLUR}),[r,n]),ref:St.default.useCallback(p=>{let m=le(n._fields,r);m&&p&&(m._f.ref={focus:()=>p.focus(),select:()=>p.select(),setCustomValidity:g=>p.setCustomValidity(g),reportValidity:()=>p.reportValidity()})},[n._fields,r])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!le(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!le(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!le(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!le(c.validatingFields,r)},error:{enumerable:!0,get:()=>le(c.errors,r)}})}}var I1=e=>e.render(l$(e));var $6=(e,t,r,o,n)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[o]:n||!0}}:{};var vS=e=>({isOnSubmit:!e||e===ca.onSubmit,isOnBlur:e===ca.onBlur,isOnChange:e===ca.onChange,isOnAll:e===ca.all,isOnTouch:e===ca.onTouched}),CS=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length)))),n0=(e,t,r,o)=>{for(let n of r||Object.keys(e)){let a=le(e,n);if(a){let{_f:s,...u}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],n)&&!o)return!0;if(s.ref&&t(s.ref,s.name)&&!o)return!0;if(n0(u,t))break}else if(wr(u)&&n0(u,t))break}}},u$=(e,t,r)=>{let o=o0(le(e,r));return pt(o,"root",t[r]),pt(e,r,o),e},X6=e=>e.type==="file",Li=e=>typeof e=="function",q9=e=>{if(!z6)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$9=e=>Za(e),q6=e=>e.type==="radio",Y9=e=>e instanceof RegExp,wS={value:!1,isValid:!1},xS={value:!0,isValid:!0},HS=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ur(e[0].attributes.value)?ur(e[0].value)||e[0].value===""?xS:{value:e[0].value,isValid:!0}:xS:wS}return wS},yS={isValid:!1,value:null},VS=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,yS):yS;function bS(e,t,r="validate"){if($9(e)||Array.isArray(e)&&e.every($9)||Bn(e)&&!e)return{type:r,message:$9(e)?e:"",ref:t}}var Iu=e=>wr(e)&&!Y9(e)?e:{value:e,message:""},LS=async(e,t,r,o,n)=>{let{ref:a,refs:s,required:u,maxLength:c,minLength:d,min:p,max:m,pattern:g,validate:y,name:x,valueAsNumber:v,mount:b,disabled:w}=e._f,C=le(t,x);if(!b||w)return{};let I=s?s[0]:a,_=W=>{o&&I.reportValidity&&(I.setCustomValidity(Bn(W)?"":W||""),I.reportValidity())},M={},T=q6(a),A=a0(a),H=T||A,J=(v||X6(a))&&ur(a.value)&&ur(C)||q9(a)&&a.value===""||C===""||Array.isArray(C)&&!C.length,Z=$6.bind(null,x,r,M),Q=(W,ie,q,ae=bi.maxLength,Y=bi.minLength)=>{let me=W?ie:q;M[x]={type:W?ae:Y,message:me,ref:a,...Z(W?ae:Y,me)}};if(n?!Array.isArray(C)||!C.length:u&&(!H&&(J||go(C))||Bn(C)&&!C||A&&!HS(s).isValid||T&&!VS(s).isValid)){let{value:W,message:ie}=$9(u)?{value:!!u,message:u}:Iu(u);if(W&&(M[x]={type:bi.required,message:ie,ref:I,...Z(bi.required,ie)},!r))return _(ie),M}if(!J&&(!go(p)||!go(m))){let W,ie,q=Iu(m),ae=Iu(p);if(!go(C)&&!isNaN(C)){let Y=a.valueAsNumber||C&&+C;go(q.value)||(W=Y>q.value),go(ae.value)||(ie=Ynew Date(new Date().toDateString()+" "+Ke),se=a.type=="time",we=a.type=="week";Za(q.value)&&C&&(W=se?me(C)>me(q.value):we?C>q.value:Y>new Date(q.value)),Za(ae.value)&&C&&(ie=se?me(C)+W.value,ae=!go(ie.value)&&C.length<+ie.value;if((q||ae)&&(Q(q,W.message,ie.message),!r))return _(M[x].message),M}if(g&&!J&&Za(C)){let{value:W,message:ie}=Iu(g);if(Y9(W)&&!C.match(W)&&(M[x]={type:bi.pattern,message:ie,ref:a,...Z(bi.pattern,ie)},!r))return _(ie),M}if(y){if(Li(y)){let W=await y(C,t),ie=bS(W,I);if(ie&&(M[x]={...ie,...Z(bi.validate,ie.message)},!r))return _(ie.message),M}else if(wr(y)){let W={};for(let ie in y){if(!Zo(W)&&!r)break;let q=bS(await y[ie](C,t),I,ie);q&&(W={...q,...Z(ie,q.message)},_(q.message),r&&(M[x]=W))}if(!Zo(W)&&(M[x]={ref:I,...W},!r))return M}}return _(!0),M};function c$(e,t){let r=t.slice(0,-1).length,o=0;for(;o{let e=[];return{get observers(){return e},next:n=>{for(let a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},J9=e=>go(e)||!RS(e);function L1(e,t){if(J9(e)||J9(t))return e===t;if(Su(e)&&Su(t))return e.getTime()===t.getTime();let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n of r){let a=e[n];if(!o.includes(n))return!1;if(n!=="ref"){let s=t[n];if(Su(a)&&Su(s)||wr(a)&&wr(s)||Array.isArray(a)&&Array.isArray(s)?!L1(a,s):a!==s)return!1}}return!0}var FS=e=>e.type==="select-multiple",f$=e=>q6(e)||a0(e),G6=e=>q9(e)&&e.isConnected,DS=e=>{for(let t in e)if(Li(e[t]))return!0;return!1};function Q9(e,t={}){let r=Array.isArray(e);if(wr(e)||r)for(let o in e)Array.isArray(e[o])||wr(e[o])&&!DS(e[o])?(t[o]=Array.isArray(e[o])?[]:{},Q9(e[o],t[o])):go(e[o])||(t[o]=!0);return t}function BS(e,t,r){let o=Array.isArray(e);if(wr(e)||o)for(let n in e)Array.isArray(e[n])||wr(e[n])&&!DS(e[n])?ur(t)||J9(r[n])?r[n]=Array.isArray(e[n])?Q9(e[n],[]):{...Q9(e[n])}:BS(e[n],go(t)?{}:t[n],r[n]):r[n]=!L1(e[n],t[n]);return r}var U9=(e,t)=>BS(e,t,Q9(t)),NS=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:o})=>ur(e)?e:t?e===""?NaN:e&&+e:r&&Za(e)?new Date(e):o?o(e):e;function W6(e){let t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return X6(t)?t.files:q6(t)?VS(e.refs).value:FS(t)?[...t.selectedOptions].map(({value:r})=>r):a0(t)?HS(e.refs).value:NS(ur(t.value)?e.ref.value:t.value,e)}var p$=(e,t,r,o)=>{let n={};for(let a of e){let s=le(t,a);s&&pt(n,a,s._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:o}},r0=e=>ur(e)?e:Y9(e)?e.source:wr(e)?Y9(e.value)?e.value.source:e.value:e,IS="AsyncFunction",m$=e=>(!e||!e.validate)&&!!(Li(e.validate)&&e.validate.constructor.name===IS||wr(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===IS)),h$=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function SS(e,t,r){let o=le(e,r);if(o||j6(r))return{error:o,name:r};let n=r.split(".");for(;n.length;){let a=n.join("."),s=le(t,a),u=le(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(u&&u.type)return{name:a,error:u};n.pop()}return{name:r}}var g$=(e,t,r,o,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(t||e):(r?o.isOnBlur:n.isOnBlur)?!e:(r?o.isOnChange:n.isOnChange)?e:!0,v$=(e,t)=>!K9(le(e,t)).length&&Mr(e,t),C$={mode:ca.onSubmit,reValidateMode:ca.onChange,shouldFocusError:!0};function w$(e={}){let t={...C$,...e},r={submitCount:0,isDirty:!1,isLoading:Li(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},o={},n=wr(t.defaultValues)||wr(t.values)?No(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:No(n),s={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0,p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={values:Z6(),array:Z6(),state:Z6()},g=vS(t.mode),y=vS(t.reValidateMode),x=t.criteriaMode===ca.all,v=E=>D=>{clearTimeout(d),d=setTimeout(E,D)},b=async E=>{if(p.isValid||E){let D=t.resolver?Zo((await H()).errors):await Z(o,!0);D!==r.isValid&&m.state.next({isValid:D})}},w=(E,D)=>{(p.isValidating||p.validatingFields)&&((E||Array.from(u.mount)).forEach(z=>{z&&(D?pt(r.validatingFields,z,D):Mr(r.validatingFields,z))}),m.state.next({validatingFields:r.validatingFields,isValidating:!Zo(r.validatingFields)}))},C=(E,D=[],z,ce,ue=!0,oe=!0)=>{if(ce&&z){if(s.action=!0,oe&&Array.isArray(le(o,E))){let Le=z(le(o,E),ce.argA,ce.argB);ue&&pt(o,E,Le)}if(oe&&Array.isArray(le(r.errors,E))){let Le=z(le(r.errors,E),ce.argA,ce.argB);ue&&pt(r.errors,E,Le),v$(r.errors,E)}if(p.touchedFields&&oe&&Array.isArray(le(r.touchedFields,E))){let Le=z(le(r.touchedFields,E),ce.argA,ce.argB);ue&&pt(r.touchedFields,E,Le)}p.dirtyFields&&(r.dirtyFields=U9(n,a)),m.state.next({name:E,isDirty:W(E,D),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else pt(a,E,D)},I=(E,D)=>{pt(r.errors,E,D),m.state.next({errors:r.errors})},_=E=>{r.errors=E,m.state.next({errors:r.errors,isValid:!1})},M=(E,D,z,ce)=>{let ue=le(o,E);if(ue){let oe=le(a,E,ur(z)?le(n,E):z);ur(oe)||ce&&ce.defaultChecked||D?pt(a,E,D?oe:W6(ue._f)):ae(E,oe),s.mount&&b()}},T=(E,D,z,ce,ue)=>{let oe=!1,Le=!1,et={name:E},Gt=!!(le(o,E)&&le(o,E)._f&&le(o,E)._f.disabled);if(!z||ce){p.isDirty&&(Le=r.isDirty,r.isDirty=et.isDirty=W(),oe=Le!==et.isDirty);let ar=Gt||L1(le(n,E),D);Le=!!(!Gt&&le(r.dirtyFields,E)),ar||Gt?Mr(r.dirtyFields,E):pt(r.dirtyFields,E,!0),et.dirtyFields=r.dirtyFields,oe=oe||p.dirtyFields&&Le!==!ar}if(z){let ar=le(r.touchedFields,E);ar||(pt(r.touchedFields,E,z),et.touchedFields=r.touchedFields,oe=oe||p.touchedFields&&ar!==z)}return oe&&ue&&m.state.next(et),oe?et:{}},A=(E,D,z,ce)=>{let ue=le(r.errors,E),oe=p.isValid&&Bn(D)&&r.isValid!==D;if(e.delayError&&z?(c=v(()=>I(E,z)),c(e.delayError)):(clearTimeout(d),c=null,z?pt(r.errors,E,z):Mr(r.errors,E)),(z?!L1(ue,z):ue)||!Zo(ce)||oe){let Le={...ce,...oe&&Bn(D)?{isValid:D}:{},errors:r.errors,name:E};r={...r,...Le},m.state.next(Le)}},H=async E=>{w(E,!0);let D=await t.resolver(a,t.context,p$(E||u.mount,o,t.criteriaMode,t.shouldUseNativeValidation));return w(E),D},J=async E=>{let{errors:D}=await H(E);if(E)for(let z of E){let ce=le(D,z);ce?pt(r.errors,z,ce):Mr(r.errors,z)}else r.errors=D;return D},Z=async(E,D,z={valid:!0})=>{for(let ce in E){let ue=E[ce];if(ue){let{_f:oe,...Le}=ue;if(oe){let et=u.array.has(oe.name),Gt=ue._f&&m$(ue._f);Gt&&p.validatingFields&&w([ce],!0);let ar=await LS(ue,a,x,t.shouldUseNativeValidation&&!D,et);if(Gt&&p.validatingFields&&w([ce]),ar[oe.name]&&(z.valid=!1,D))break;!D&&(le(ar,oe.name)?et?u$(r.errors,ar,oe.name):pt(r.errors,oe.name,ar[oe.name]):Mr(r.errors,oe.name))}!Zo(Le)&&await Z(Le,D,z)}}return z.valid},Q=()=>{for(let E of u.unMount){let D=le(o,E);D&&(D._f.refs?D._f.refs.every(z=>!G6(z)):!G6(D._f.ref))&&bt(E)}u.unMount=new Set},W=(E,D)=>(E&&D&&pt(a,E,D),!L1(xt(),n)),ie=(E,D,z)=>OS(E,u,{...s.mount?a:ur(D)?n:Za(E)?{[E]:D}:D},z,D),q=E=>K9(le(s.mount?a:n,E,e.shouldUnregister?le(n,E,[]):[])),ae=(E,D,z={})=>{let ce=le(o,E),ue=D;if(ce){let oe=ce._f;oe&&(!oe.disabled&&pt(a,E,NS(D,oe)),ue=q9(oe.ref)&&go(D)?"":D,FS(oe.ref)?[...oe.ref.options].forEach(Le=>Le.selected=ue.includes(Le.value)):oe.refs?a0(oe.ref)?oe.refs.length>1?oe.refs.forEach(Le=>(!Le.defaultChecked||!Le.disabled)&&(Le.checked=Array.isArray(ue)?!!ue.find(et=>et===Le.value):ue===Le.value)):oe.refs[0]&&(oe.refs[0].checked=!!ue):oe.refs.forEach(Le=>Le.checked=Le.value===ue):X6(oe.ref)?oe.ref.value="":(oe.ref.value=ue,oe.ref.type||m.values.next({name:E,values:{...a}})))}(z.shouldDirty||z.shouldTouch)&&T(E,ue,z.shouldTouch,z.shouldDirty,!0),z.shouldValidate&&Ke(E)},Y=(E,D,z)=>{for(let ce in D){let ue=D[ce],oe=`${E}.${ce}`,Le=le(o,oe);(u.array.has(E)||!J9(ue)||Le&&!Le._f)&&!Su(ue)?Y(oe,ue,z):ae(oe,ue,z)}},me=(E,D,z={})=>{let ce=le(o,E),ue=u.array.has(E),oe=No(D);pt(a,E,oe),ue?(m.array.next({name:E,values:{...a}}),(p.isDirty||p.dirtyFields)&&z.shouldDirty&&m.state.next({name:E,dirtyFields:U9(n,a),isDirty:W(E,oe)})):ce&&!ce._f&&!go(oe)?Y(E,oe,z):ae(E,oe,z),CS(E,u)&&m.state.next({...r}),m.values.next({name:s.mount?E:void 0,values:{...a}})},se=async E=>{s.mount=!0;let D=E.target,z=D.name,ce=!0,ue=le(o,z),oe=()=>D.type?W6(ue._f):_S(E),Le=et=>{ce=Number.isNaN(et)||L1(et,le(a,z,et))};if(ue){let et,Gt,ar=oe(),$n=E.type===X9.BLUR||E.type===X9.FOCUS_OUT,rc=!h$(ue._f)&&!t.resolver&&!le(r.errors,z)&&!ue._f.deps||g$($n,le(r.touchedFields,z),r.isSubmitted,y,g),G1=CS(z,u,$n);pt(a,z,ar),$n?(ue._f.onBlur&&ue._f.onBlur(E),c&&c(0)):ue._f.onChange&&ue._f.onChange(E);let W1=T(z,ar,$n,!1),oc=!Zo(W1)||G1;if(!$n&&m.values.next({name:z,type:E.type,values:{...a}}),rc)return p.isValid&&(e.mode==="onBlur"?$n&&b():b()),oc&&m.state.next({name:z,...G1?{}:W1});if(!$n&&G1&&m.state.next({...r}),t.resolver){let{errors:al}=await H([z]);if(Le(ar),ce){let nc=SS(r.errors,o,z),il=SS(al,o,nc.name||z);et=il.error,z=il.name,Gt=Zo(al)}}else w([z],!0),et=(await LS(ue,a,x,t.shouldUseNativeValidation))[z],w([z]),Le(ar),ce&&(et?Gt=!1:p.isValid&&(Gt=await Z(o,!0)));ce&&(ue._f.deps&&Ke(ue._f.deps),A(z,Gt,et,W1))}},we=(E,D)=>{if(le(r.errors,D)&&E.focus)return E.focus(),1},Ke=async(E,D={})=>{let z,ce,ue=o0(E);if(t.resolver){let oe=await J(ur(E)?E:ue);z=Zo(oe),ce=E?!ue.some(Le=>le(oe,Le)):z}else E?(ce=(await Promise.all(ue.map(async oe=>{let Le=le(o,oe);return await Z(Le&&Le._f?{[oe]:Le}:Le)}))).every(Boolean),!(!ce&&!r.isValid)&&b()):ce=z=await Z(o);return m.state.next({...!Za(E)||p.isValid&&z!==r.isValid?{}:{name:E},...t.resolver||!E?{isValid:z}:{},errors:r.errors}),D.shouldFocus&&!ce&&n0(o,we,E?ue:u.mount),ce},xt=E=>{let D={...s.mount?a:n};return ur(E)?D:Za(E)?le(D,E):E.map(z=>le(D,z))},nt=(E,D)=>({invalid:!!le((D||r).errors,E),isDirty:!!le((D||r).dirtyFields,E),error:le((D||r).errors,E),isValidating:!!le(r.validatingFields,E),isTouched:!!le((D||r).touchedFields,E)}),lt=E=>{E&&o0(E).forEach(D=>Mr(r.errors,D)),m.state.next({errors:E?r.errors:{}})},yt=(E,D,z)=>{let ce=(le(o,E,{_f:{}})._f||{}).ref,ue=le(r.errors,E)||{},{ref:oe,message:Le,type:et,...Gt}=ue;pt(r.errors,E,{...Gt,...D,ref:ce}),m.state.next({name:E,errors:r.errors,isValid:!1}),z&&z.shouldFocus&&ce&&ce.focus&&ce.focus()},br=(E,D)=>Li(E)?m.values.subscribe({next:z=>E(ie(void 0,D),z)}):ie(E,D,!0),bt=(E,D={})=>{for(let z of E?o0(E):u.mount)u.mount.delete(z),u.array.delete(z),D.keepValue||(Mr(o,z),Mr(a,z)),!D.keepError&&Mr(r.errors,z),!D.keepDirty&&Mr(r.dirtyFields,z),!D.keepTouched&&Mr(r.touchedFields,z),!D.keepIsValidating&&Mr(r.validatingFields,z),!t.shouldUnregister&&!D.keepDefaultValue&&Mr(n,z);m.values.next({values:{...a}}),m.state.next({...r,...D.keepDirty?{isDirty:W()}:{}}),!D.keepIsValid&&b()},xe=({disabled:E,name:D,field:z,fields:ce,value:ue})=>{if(Bn(E)&&s.mount||E){let oe=E?void 0:ur(ue)?W6(z?z._f:le(ce,D)._f):ue;pt(a,D,oe),T(D,oe,!1,!1,!0)}},qe=(E,D={})=>{let z=le(o,E),ce=Bn(D.disabled)||Bn(e.disabled);return pt(o,E,{...z||{},_f:{...z&&z._f?z._f:{ref:{name:E}},name:E,mount:!0,...D}}),u.mount.add(E),z?xe({field:z,disabled:Bn(D.disabled)?D.disabled:e.disabled,name:E,value:D.value}):M(E,!0,D.value),{...ce?{disabled:D.disabled||e.disabled}:{},...t.progressive?{required:!!D.required,min:r0(D.min),max:r0(D.max),minLength:r0(D.minLength),maxLength:r0(D.maxLength),pattern:r0(D.pattern)}:{},name:E,onChange:se,onBlur:se,ref:ue=>{if(ue){qe(E,D),z=le(o,E);let oe=ur(ue.value)&&ue.querySelectorAll&&ue.querySelectorAll("input,select,textarea")[0]||ue,Le=f$(oe),et=z._f.refs||[];if(Le?et.find(Gt=>Gt===oe):oe===z._f.ref)return;pt(o,E,{_f:{...z._f,...Le?{refs:[...et.filter(G6),oe,...Array.isArray(le(n,E))?[{}]:[]],ref:{type:oe.type,name:E}}:{ref:oe}}}),M(E,!1,void 0,oe)}else z=le(o,E,{}),z._f&&(z._f.mount=!1),(t.shouldUnregister||D.shouldUnregister)&&!(MS(u.array,E)&&s.action)&&u.unMount.add(E)}}},_t=()=>t.shouldFocusError&&n0(o,we,u.mount),at=E=>{Bn(E)&&(m.state.next({disabled:E}),n0(o,(D,z)=>{let ce=le(o,z);ce&&(D.disabled=ce._f.disabled||E,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(ue=>{ue.disabled=ce._f.disabled||E}))},0,!1))},ut=(E,D)=>async z=>{let ce;z&&(z.preventDefault&&z.preventDefault(),z.persist&&z.persist());let ue=No(a);if(m.state.next({isSubmitting:!0}),t.resolver){let{errors:oe,values:Le}=await H();r.errors=oe,ue=Le}else await Z(o);if(Mr(r.errors,"root"),Zo(r.errors)){m.state.next({errors:{}});try{await E(ue,z)}catch(oe){ce=oe}}else D&&await D({...r.errors},z),_t(),setTimeout(_t);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Zo(r.errors)&&!ce,submitCount:r.submitCount+1,errors:r.errors}),ce)throw ce},Ye=(E,D={})=>{le(o,E)&&(ur(D.defaultValue)?me(E,No(le(n,E))):(me(E,D.defaultValue),pt(n,E,No(D.defaultValue))),D.keepTouched||Mr(r.touchedFields,E),D.keepDirty||(Mr(r.dirtyFields,E),r.isDirty=D.defaultValue?W(E,No(le(n,E))):W()),D.keepError||(Mr(r.errors,E),p.isValid&&b()),m.state.next({...r}))},Jt=(E,D={})=>{let z=E?No(E):n,ce=No(z),ue=Zo(E),oe=ue?n:ce;if(D.keepDefaultValues||(n=z),!D.keepValues){if(D.keepDirtyValues)for(let Le of u.mount)le(r.dirtyFields,Le)?pt(oe,Le,le(a,Le)):me(Le,le(oe,Le));else{if(z6&&ur(E))for(let Le of u.mount){let et=le(o,Le);if(et&&et._f){let Gt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(q9(Gt)){let ar=Gt.closest("form");if(ar){ar.reset();break}}}}o={}}a=e.shouldUnregister?D.keepDefaultValues?No(n):{}:No(oe),m.array.next({values:{...oe}}),m.values.next({values:{...oe}})}u={mount:D.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!p.isValid||!!D.keepIsValid||!!D.keepDirtyValues,s.watch=!!e.shouldUnregister,m.state.next({submitCount:D.keepSubmitCount?r.submitCount:0,isDirty:ue?!1:D.keepDirty?r.isDirty:!!(D.keepDefaultValues&&!L1(E,n)),isSubmitted:D.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ue?{}:D.keepDirtyValues?D.keepDefaultValues&&a?U9(n,a):r.dirtyFields:D.keepDefaultValues&&E?U9(n,E):D.keepDirty?r.dirtyFields:{},touchedFields:D.keepTouched?r.touchedFields:{},errors:D.keepErrors?r.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ao=(E,D)=>Jt(Li(E)?E(a):E,D);return{control:{register:qe,unregister:bt,getFieldState:nt,handleSubmit:ut,setError:yt,_executeSchema:H,_getWatch:ie,_getDirty:W,_updateValid:b,_removeUnmounted:Q,_updateFieldArray:C,_updateDisabledField:xe,_getFieldArray:q,_reset:Jt,_resetDefaultValues:()=>Li(t.defaultValues)&&t.defaultValues().then(E=>{ao(E,t.resetOptions),m.state.next({isLoading:!1})}),_updateFormState:E=>{r={...r,...E}},_disableForm:at,_subjects:m,_proxyFormState:p,_setErrors:_,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(E){s=E},get _defaultValues(){return n},get _names(){return u},set _names(E){u=E},get _formState(){return r},set _formState(E){r=E},get _options(){return t},set _options(E){t={...t,...E}}},trigger:Ke,register:qe,handleSubmit:ut,watch:br,setValue:me,getValues:xt,reset:ao,resetField:Ye,clearErrors:lt,unregister:bt,setError:yt,setFocus:(E,D={})=>{let z=le(o,E),ce=z&&z._f;if(ce){let ue=ce.refs?ce.refs[0]:ce.ref;ue.focus&&(ue.focus(),D.shouldSelect&&ue.select())}},getFieldState:nt}}function t5(e={}){let t=St.default.useRef(),r=St.default.useRef(),[o,n]=St.default.useState({isDirty:!1,isValidating:!1,isLoading:Li(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Li(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...w$(e),formState:o});let a=t.current.control;return a._options=e,U6({subject:a._subjects.state,next:s=>{kS(s,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),St.default.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),St.default.useEffect(()=>{if(a._proxyFormState.isDirty){let s=a._getDirty();s!==o.isDirty&&a._subjects.state.next({isDirty:s})}},[a,o.isDirty]),St.default.useEffect(()=>{e.values&&!L1(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[e.values,a]),St.default.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),St.default.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),St.default.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),t.current.formState=PS(o,a),t.current}var ZS=(e,t,r)=>{if(e&&"reportValidity"in e){let o=le(r,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},Y6=(e,t)=>{for(let r in t.fields){let o=t.fields[r];o&&o.ref&&"reportValidity"in o.ref?ZS(o.ref,r,e):o.refs&&o.refs.forEach(n=>ZS(n,r,e))}},GS=(e,t)=>{t.shouldUseNativeValidation&&Y6(e,t);let r={};for(let o in e){let n=le(t.fields,o),a=Object.assign(e[o]||{},{ref:n&&n.ref});if(x$(t.names||Object.keys(e),o)){let s=Object.assign({},le(r,o));pt(s,"root",a),pt(r,o,s)}else pt(r,o,a)}return r},x$=(e,t)=>e.some(r=>r.startsWith(t+"."));var y$=function(e,t){for(var r={};e.length;){var o=e[0],n=o.code,a=o.message,s=o.path.join(".");if(!r[s])if("unionErrors"in o){var u=o.unionErrors[0].errors[0];r[s]={message:u.message,type:u.code}}else r[s]={message:a,type:n};if("unionErrors"in o&&o.unionErrors.forEach(function(p){return p.errors.forEach(function(m){return e.push(m)})}),t){var c=r[s].types,d=c&&c[o.code];r[s]=$6(s,t,r,n,d?[].concat(d,o.message):o.message)}e.shift()}return r},r5=function(e,t,r){return r===void 0&&(r={}),function(o,n,a){try{return Promise.resolve(function(s,u){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](o,t)).then(function(d){return a.shouldUseNativeValidation&&Y6({},a),{errors:{},values:r.raw?o:d}})}catch(d){return u(d)}return c&&c.then?c.then(void 0,u):c}(0,function(s){if(function(u){return Array.isArray(u?.errors)}(s))return{values:{},errors:GS(y$(s.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw s}))}catch(s){return Promise.reject(s)}}};var nr=N(U());var o5=N(U());var WS=N(U(),1);var zS=N(Tt(),1),b$="Label",jS=WS.forwardRef((e,t)=>(0,zS.jsx)(be.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));jS.displayName=b$;var J6=jS;var I$=Dn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Q6=o5.forwardRef(({className:e,...t},r)=>o5.createElement(J6,{ref:r,className:ee(I$(),e),...t}));Q6.displayName=J6.displayName;var US=e5,$S=nr.createContext({}),fn=({...e})=>nr.createElement($S.Provider,{value:{name:e.name}},nr.createElement(I1,{...e})),n5=()=>{let e=nr.useContext($S),t=nr.useContext(XS),{getFieldState:r,formState:o}=oo(),n=r(e.name,o);if(!e)throw new Error("useFormField should be used within ");let{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...n}},XS=nr.createContext({}),pn=nr.forwardRef(({className:e,...t},r)=>{let o=nr.useId();return nr.createElement(XS.Provider,{value:{id:o}},nr.createElement("div",{ref:r,className:ee("space-y-2",e),...t}))});pn.displayName="FormItem";var mn=nr.forwardRef(({className:e,...t},r)=>{let{error:o,formItemId:n}=n5();return nr.createElement(Q6,{ref:r,className:ee(o&&"text-destructive",e),htmlFor:n,...t})});mn.displayName="FormLabel";var Go=nr.forwardRef(({...e},t)=>{let{error:r,formItemId:o,formDescriptionId:n,formMessageId:a}=n5();return nr.createElement(Fo,{ref:t,id:o,"aria-describedby":r?`${n} ${a}`:`${n}`,"aria-invalid":!!r,...e})});Go.displayName="FormControl";var Zs=nr.forwardRef(({className:e,...t},r)=>{let{formDescriptionId:o}=n5();return nr.createElement("p",{ref:r,id:o,className:ee("text-sm text-muted-foreground",e),...t})});Zs.displayName="FormDescription";var S1=nr.forwardRef(({className:e,children:t,...r},o)=>{let{error:n,formMessageId:a}=n5(),s=n?String(n?.message):t;return s?nr.createElement("p",{ref:o,id:a,className:ee("text-sm font-medium text-destructive",e),...r},s):null});S1.displayName="FormMessage";var a5=N(U());var Wo=a5.forwardRef(({className:e,type:t,...r},o)=>a5.createElement("input",{type:t,className:ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));Wo.displayName="Input";var kt=N(U());var fe=N(U(),1),hm=N(Oa(),1);function Ru(e,[t,r]){return Math.min(r,Math.max(t,e))}var R1=N(U(),1);var Ii=N(U(),1),qS=N(Tt(),1);function YS(e,t=[]){let r=[];function o(a,s){let u=Ii.createContext(s),c=r.length;r=[...r,s];function d(m){let{scope:g,children:y,...x}=m,v=g?.[e][c]||u,b=Ii.useMemo(()=>x,Object.values(x));return(0,qS.jsx)(v.Provider,{value:b,children:y})}function p(m,g){let y=g?.[e][c]||u,x=Ii.useContext(y);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,p]}let n=()=>{let a=r.map(s=>Ii.createContext(s));return function(u){let c=u?.[e]||a;return Ii.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return n.scopeName=e,[o,S$(n,...t)]}function S$(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let s=o.reduce((u,{useScope:c,scopeName:d})=>{let m=c(a)[`__scope${d}`];return{...u,...m}},{});return Ii.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var i5=N(Tt(),1);function _1(e){let t=e+"CollectionProvider",[r,o]=YS(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{let{scope:x,children:v}=y,b=R1.default.useRef(null),w=R1.default.useRef(new Map).current;return(0,i5.jsx)(n,{scope:x,itemMap:w,collectionRef:b,children:v})};s.displayName=t;let u=e+"CollectionSlot",c=R1.default.forwardRef((y,x)=>{let{scope:v,children:b}=y,w=a(u,v),C=Ue(x,w.collectionRef);return(0,i5.jsx)(Fo,{ref:C,children:b})});c.displayName=u;let d=e+"CollectionItemSlot",p="data-radix-collection-item",m=R1.default.forwardRef((y,x)=>{let{scope:v,children:b,...w}=y,C=R1.default.useRef(null),I=Ue(x,C),_=a(d,v);return R1.default.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),(0,i5.jsx)(Fo,{[p]:"",ref:I,children:b})});m.displayName=d;function g(y){let x=a(e+"CollectionConsumer",y);return R1.default.useCallback(()=>{let b=x.collectionRef.current;if(!b)return[];let w=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((_,M)=>w.indexOf(_.ref.current)-w.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:m},g,o]}var s5=N(U(),1),R$=N(Tt(),1),_$=s5.createContext(void 0);function M1(e){let t=s5.useContext(_$);return e||t||"ltr"}var hn=N(U(),1);var JS=["top","right","bottom","left"];var Ga=Math.min,vo=Math.max,s0=Math.round,l0=Math.floor,Si=e=>({x:e,y:e}),M$={left:"right",right:"left",bottom:"top",top:"bottom"},A$={start:"end",end:"start"};function u5(e,t,r){return vo(e,Ga(t,r))}function Wa(e,t){return typeof e=="function"?e(t):e}function za(e){return e.split("-")[0]}function Gs(e){return e.split("-")[1]}function c5(e){return e==="x"?"y":"x"}function d5(e){return e==="y"?"height":"width"}function Ri(e){return["top","bottom"].includes(za(e))?"y":"x"}function f5(e){return c5(Ri(e))}function QS(e,t,r){r===void 0&&(r=!1);let o=Gs(e),n=f5(e),a=d5(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=i0(s)),[s,i0(s)]}function KS(e){let t=i0(e);return[l5(e),t,l5(t)]}function l5(e){return e.replace(/start|end/g,t=>A$[t])}function T$(e,t,r){let o=["left","right"],n=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?n:o:t?o:n;case"left":case"right":return t?a:s;default:return[]}}function eR(e,t,r,o){let n=Gs(e),a=T$(za(e),r==="start",o);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(l5)))),a}function i0(e){return e.replace(/left|right|bottom|top/g,t=>M$[t])}function P$(e){return{top:0,right:0,bottom:0,left:0,...e}}function K6(e){return typeof e!="number"?P$(e):{top:e,right:e,bottom:e,left:e}}function Ws(e){let{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 tR(e,t,r){let{reference:o,floating:n}=e,a=Ri(t),s=f5(t),u=d5(s),c=za(t),d=a==="y",p=o.x+o.width/2-n.width/2,m=o.y+o.height/2-n.height/2,g=o[u]/2-n[u]/2,y;switch(c){case"top":y={x:p,y:o.y-n.height};break;case"bottom":y={x:p,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:m};break;case"left":y={x:o.x-n.width,y:m};break;default:y={x:o.x,y:o.y}}switch(Gs(t)){case"start":y[s]-=g*(r&&d?-1:1);break;case"end":y[s]+=g*(r&&d?-1:1);break}return y}var nR=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,u=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t)),d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:m}=tR(d,o,c),g=o,y={},x=0;for(let v=0;v({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:s,elements:u,middlewareData:c}=t,{element:d,padding:p=0}=Wa(e,t)||{};if(d==null)return{};let m=K6(p),g={x:r,y:o},y=f5(n),x=d5(y),v=await s.getDimensions(d),b=y==="y",w=b?"top":"left",C=b?"bottom":"right",I=b?"clientHeight":"clientWidth",_=a.reference[x]+a.reference[y]-g[y]-a.floating[x],M=g[y]-a.reference[y],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d)),A=T?T[I]:0;(!A||!await(s.isElement==null?void 0:s.isElement(T)))&&(A=u.floating[I]||a.floating[x]);let H=_/2-M/2,J=A/2-v[x]/2-1,Z=Ga(m[w],J),Q=Ga(m[C],J),W=Z,ie=A-v[x]-Q,q=A/2-v[x]/2+H,ae=u5(W,q,ie),Y=!c.arrow&&Gs(n)!=null&&q!==ae&&a.reference[x]/2-(qq<=0)){var Q,W;let q=(((Q=a.flip)==null?void 0:Q.index)||0)+1,ae=A[q];if(ae)return{data:{index:q,overflows:Z},reset:{placement:ae}};let Y=(W=Z.filter(me=>me.overflows[0]<=0).sort((me,se)=>me.overflows[1]-se.overflows[1])[0])==null?void 0:W.placement;if(!Y)switch(y){case"bestFit":{var ie;let me=(ie=Z.filter(se=>{if(T){let we=Ri(se.placement);return we===C||we==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(we=>we>0).reduce((we,Ke)=>we+Ke,0)]).sort((se,we)=>se[1]-we[1])[0])==null?void 0:ie[0];me&&(Y=me);break}case"initialPlacement":Y=u;break}if(n!==Y)return{reset:{placement:Y}}}return{}}}};function rR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oR(e){return JS.some(t=>e[t]>=0)}var sR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=Wa(e,t);switch(o){case"referenceHidden":{let a=await _u(t,{...n,elementContext:"reference"}),s=rR(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:oR(s)}}}case"escaped":{let a=await _u(t,{...n,altBoundary:!0}),s=rR(a,r.floating);return{data:{escapedOffsets:s,escaped:oR(s)}}}default:return{}}}}};async function k$(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=za(r),u=Gs(r),c=Ri(r)==="y",d=["left","top"].includes(s)?-1:1,p=a&&c?-1:1,m=Wa(t,e),{mainAxis:g,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof x=="number"&&(y=u==="end"?x*-1:x),c?{x:y*p,y:g*d}:{x:g*d,y:y*p}}var lR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:s,middlewareData:u}=t,c=await k$(t,e);return s===((r=u.offset)==null?void 0:r.placement)&&(o=u.arrow)!=null&&o.alignmentOffset?{}:{x:n+c.x,y:a+c.y,data:{...c,placement:s}}}}},uR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:b=>{let{x:w,y:C}=b;return{x:w,y:C}}},...c}=Wa(e,t),d={x:r,y:o},p=await _u(t,c),m=Ri(za(n)),g=c5(m),y=d[g],x=d[m];if(a){let b=g==="y"?"top":"left",w=g==="y"?"bottom":"right",C=y+p[b],I=y-p[w];y=u5(C,y,I)}if(s){let b=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=x+p[b],I=x-p[w];x=u5(C,x,I)}let v=u.fn({...t,[g]:y,[m]:x});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[g]:a,[m]:s}}}}}},cR=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=Wa(e,t),p={x:r,y:o},m=Ri(n),g=c5(m),y=p[g],x=p[m],v=Wa(u,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){let I=g==="y"?"height":"width",_=a.reference[g]-a.floating[I]+b.mainAxis,M=a.reference[g]+a.reference[I]-b.mainAxis;y<_?y=_:y>M&&(y=M)}if(d){var w,C;let I=g==="y"?"width":"height",_=["top","left"].includes(za(n)),M=a.reference[m]-a.floating[I]+(_&&((w=s.offset)==null?void 0:w[m])||0)+(_?0:b.crossAxis),T=a.reference[m]+a.reference[I]+(_?0:((C=s.offset)==null?void 0:C[m])||0)-(_?b.crossAxis:0);xT&&(x=T)}return{[g]:y,[m]:x}}}},dR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:s,elements:u}=t,{apply:c=()=>{},...d}=Wa(e,t),p=await _u(t,d),m=za(n),g=Gs(n),y=Ri(n)==="y",{width:x,height:v}=a.floating,b,w;m==="top"||m==="bottom"?(b=m,w=g===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(w=m,b=g==="end"?"top":"bottom");let C=v-p.top-p.bottom,I=x-p.left-p.right,_=Ga(v-p[b],C),M=Ga(x-p[w],I),T=!t.middlewareData.shift,A=_,H=M;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(H=I),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=C),T&&!g){let Z=vo(p.left,0),Q=vo(p.right,0),W=vo(p.top,0),ie=vo(p.bottom,0);y?H=x-2*(Z!==0||Q!==0?Z+Q:vo(p.left,p.right)):A=v-2*(W!==0||ie!==0?W+ie:vo(p.top,p.bottom))}await c({...t,availableWidth:H,availableHeight:A});let J=await s.getDimensions(u.floating);return x!==J.width||v!==J.height?{reset:{rects:!0}}:{}}}};function p5(){return typeof window<"u"}function js(e){return pR(e)?(e.nodeName||"").toLowerCase():"#document"}function zo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function da(e){var t;return(t=(pR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pR(e){return p5()?e instanceof Node||e instanceof zo(e).Node:!1}function Nn(e){return p5()?e instanceof Element||e instanceof zo(e).Element:!1}function fa(e){return p5()?e instanceof HTMLElement||e instanceof zo(e).HTMLElement:!1}function fR(e){return!p5()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zo(e).ShadowRoot}function Mu(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!["inline","contents"].includes(n)}function mR(e){return["table","td","th"].includes(js(e))}function u0(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function m5(e){let t=h5(),r=Nn(e)?Zn(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(r.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(r.contain||"").includes(o))}function hR(e){let t=_i(e);for(;fa(t)&&!Us(t);){if(m5(t))return t;if(u0(t))return null;t=_i(t)}return null}function h5(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Us(e){return["html","body","#document"].includes(js(e))}function Zn(e){return zo(e).getComputedStyle(e)}function c0(e){return Nn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _i(e){if(js(e)==="html")return e;let t=e.assignedSlot||e.parentNode||fR(e)&&e.host||da(e);return fR(t)?t.host:t}function gR(e){let t=_i(e);return Us(t)?e.ownerDocument?e.ownerDocument.body:e.body:fa(t)&&Mu(t)?t:gR(t)}function zs(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=gR(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),s=zo(n);if(a){let u=g5(s);return t.concat(s,s.visualViewport||[],Mu(n)?n:[],u&&r?zs(u):[])}return t.concat(n,zs(n,[],r))}function g5(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wR(e){let t=Zn(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=fa(e),a=n?e.offsetWidth:r,s=n?e.offsetHeight:o,u=s0(r)!==a||s0(o)!==s;return u&&(r=a,o=s),{width:r,height:o,$:u}}function rm(e){return Nn(e)?e:e.contextElement}function Au(e){let t=rm(e);if(!fa(t))return Si(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=wR(t),s=(a?s0(r.width):r.width)/o,u=(a?s0(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}var E$=Si(0);function xR(e){let t=zo(e);return!h5()||!t.visualViewport?E$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O$(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==zo(e)?!1:t}function $s(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=rm(e),s=Si(1);t&&(o?Nn(o)&&(s=Au(o)):s=Au(e));let u=O$(a,r,o)?xR(a):Si(0),c=(n.left+u.x)/s.x,d=(n.top+u.y)/s.y,p=n.width/s.x,m=n.height/s.y;if(a){let g=zo(a),y=o&&Nn(o)?zo(o):o,x=g,v=g5(x);for(;v&&o&&y!==x;){let b=Au(v),w=v.getBoundingClientRect(),C=Zn(v),I=w.left+(v.clientLeft+parseFloat(C.paddingLeft))*b.x,_=w.top+(v.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,d*=b.y,p*=b.x,m*=b.y,c+=I,d+=_,x=zo(v),v=g5(x)}}return Ws({width:p,height:m,x:c,y:d})}function H$(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",s=da(o),u=t?u0(t.floating):!1;if(o===s||u&&a)return r;let c={scrollLeft:0,scrollTop:0},d=Si(1),p=Si(0),m=fa(o);if((m||!m&&!a)&&((js(o)!=="body"||Mu(s))&&(c=c0(o)),fa(o))){let g=$s(o);d=Au(o),p.x=g.x+o.clientLeft,p.y=g.y+o.clientTop}return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+p.x,y:r.y*d.y-c.scrollTop*d.y+p.y}}function V$(e){return Array.from(e.getClientRects())}function tm(e,t){let r=c0(e).scrollLeft;return t?t.left+r:$s(da(e)).left+r}function F$(e){let t=da(e),r=c0(e),o=e.ownerDocument.body,n=vo(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=vo(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+tm(e),u=-r.scrollTop;return Zn(o).direction==="rtl"&&(s+=vo(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:s,y:u}}function D$(e,t){let r=zo(e),o=da(e),n=r.visualViewport,a=o.clientWidth,s=o.clientHeight,u=0,c=0;if(n){a=n.width,s=n.height;let d=h5();(!d||d&&t==="fixed")&&(u=n.offsetLeft,c=n.offsetTop)}return{width:a,height:s,x:u,y:c}}function B$(e,t){let r=$s(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=fa(e)?Au(e):Si(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,c=n*a.x,d=o*a.y;return{width:s,height:u,x:c,y:d}}function vR(e,t,r){let o;if(t==="viewport")o=D$(e,r);else if(t==="document")o=F$(da(e));else if(Nn(t))o=B$(t,r);else{let n=xR(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return Ws(o)}function yR(e,t){let r=_i(e);return r===t||!Nn(r)||Us(r)?!1:Zn(r).position==="fixed"||yR(r,t)}function N$(e,t){let r=t.get(e);if(r)return r;let o=zs(e,[],!1).filter(u=>Nn(u)&&js(u)!=="body"),n=null,a=Zn(e).position==="fixed",s=a?_i(e):e;for(;Nn(s)&&!Us(s);){let u=Zn(s),c=m5(s);!c&&u.position==="fixed"&&(n=null),(a?!c&&!n:!c&&u.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Mu(s)&&!c&&yR(e,s))?o=o.filter(p=>p!==s):n=u,s=_i(s)}return t.set(e,o),o}function Z$(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?u0(t)?[]:N$(t,this._c):[].concat(r),o],u=s[0],c=s.reduce((d,p)=>{let m=vR(t,p,n);return d.top=vo(m.top,d.top),d.right=Ga(m.right,d.right),d.bottom=Ga(m.bottom,d.bottom),d.left=vo(m.left,d.left),d},vR(t,u,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function G$(e){let{width:t,height:r}=wR(e);return{width:t,height:r}}function W$(e,t,r){let o=fa(t),n=da(t),a=r==="fixed",s=$s(e,!0,a,t),u={scrollLeft:0,scrollTop:0},c=Si(0);if(o||!o&&!a)if((js(t)!=="body"||Mu(n))&&(u=c0(t)),o){let y=$s(t,!0,a,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else n&&(c.x=tm(n));let d=0,p=0;if(n&&!o&&!a){let y=n.getBoundingClientRect();p=y.top+u.scrollTop,d=y.left+u.scrollLeft-tm(n,y)}let m=s.left+u.scrollLeft-c.x-d,g=s.top+u.scrollTop-c.y-p;return{x:m,y:g,width:s.width,height:s.height}}function em(e){return Zn(e).position==="static"}function CR(e,t){if(!fa(e)||Zn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return da(e)===r&&(r=r.ownerDocument.body),r}function bR(e,t){let r=zo(e);if(u0(e))return r;if(!fa(e)){let n=_i(e);for(;n&&!Us(n);){if(Nn(n)&&!em(n))return n;n=_i(n)}return r}let o=CR(e,t);for(;o&&mR(o)&&em(o);)o=CR(o,t);return o&&Us(o)&&em(o)&&!m5(o)?r:o||hR(e)||r}var z$=async function(e){let t=this.getOffsetParent||bR,r=this.getDimensions,o=await r(e.floating);return{reference:W$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function j$(e){return Zn(e).direction==="rtl"}var LR={convertOffsetParentRelativeRectToViewportRelativeRect:H$,getDocumentElement:da,getClippingRect:Z$,getOffsetParent:bR,getElementRects:z$,getClientRects:V$,getDimensions:G$,getScale:Au,isElement:Nn,isRTL:j$};function U$(e,t){let r=null,o,n=da(e);function a(){var u;clearTimeout(o),(u=r)==null||u.disconnect(),r=null}function s(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),a();let{left:d,top:p,width:m,height:g}=e.getBoundingClientRect();if(u||t(),!m||!g)return;let y=l0(p),x=l0(n.clientWidth-(d+m)),v=l0(n.clientHeight-(p+g)),b=l0(d),C={rootMargin:-y+"px "+-x+"px "+-v+"px "+-b+"px",threshold:vo(0,Ga(1,c))||1},I=!0;function _(M){let T=M[0].intersectionRatio;if(T!==c){if(!I)return s();T?s(!1,T):o=setTimeout(()=>{s(!1,1e-7)},1e3)}I=!1}try{r=new IntersectionObserver(_,{...C,root:n.ownerDocument})}catch{r=new IntersectionObserver(_,C)}r.observe(e)}return s(!0),a}function d0(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=rm(e),p=n||a?[...d?zs(d):[],...zs(t)]:[];p.forEach(w=>{n&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});let m=d&&u?U$(d,r):null,g=-1,y=null;s&&(y=new ResizeObserver(w=>{let[C]=w;C&&C.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),r()}),d&&!c&&y.observe(d),y.observe(t));let x,v=c?$s(e):null;c&&b();function b(){let w=$s(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&r(),v=w,x=requestAnimationFrame(b)}return r(),()=>{var w;p.forEach(C=>{n&&C.removeEventListener("scroll",r),a&&C.removeEventListener("resize",r)}),m?.(),(w=y)==null||w.disconnect(),y=null,c&&cancelAnimationFrame(x)}}var IR=lR;var SR=uR,RR=iR,_R=dR,MR=sR,om=aR;var AR=cR,nm=(e,t,r)=>{let o=new Map,n={platform:LR,...r},a={...n.platform,_c:o};return nR(e,t,{...n,platform:a})};var xr=N(U(),1),w5=N(U(),1),PR=N(Oa(),1),v5=typeof document<"u"?w5.useLayoutEffect:w5.useEffect;function C5(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(!C5(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;){let a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!C5(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function kR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function TR(e,t){let r=kR(e);return Math.round(t*r)/r}function am(e){let t=xr.useRef(e);return v5(()=>{t.current=e}),t}function ER(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[p,m]=xr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=xr.useState(o);C5(g,o)||y(o);let[x,v]=xr.useState(null),[b,w]=xr.useState(null),C=xr.useCallback(se=>{se!==T.current&&(T.current=se,v(se))},[]),I=xr.useCallback(se=>{se!==A.current&&(A.current=se,w(se))},[]),_=a||x,M=s||b,T=xr.useRef(null),A=xr.useRef(null),H=xr.useRef(p),J=c!=null,Z=am(c),Q=am(n),W=am(d),ie=xr.useCallback(()=>{if(!T.current||!A.current)return;let se={placement:t,strategy:r,middleware:g};Q.current&&(se.platform=Q.current),nm(T.current,A.current,se).then(we=>{let Ke={...we,isPositioned:W.current!==!1};q.current&&!C5(H.current,Ke)&&(H.current=Ke,PR.flushSync(()=>{m(Ke)}))})},[g,t,r,Q,W]);v5(()=>{d===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,m(se=>({...se,isPositioned:!1})))},[d]);let q=xr.useRef(!1);v5(()=>(q.current=!0,()=>{q.current=!1}),[]),v5(()=>{if(_&&(T.current=_),M&&(A.current=M),_&&M){if(Z.current)return Z.current(_,M,ie);ie()}},[_,M,ie,Z,J]);let ae=xr.useMemo(()=>({reference:T,floating:A,setReference:C,setFloating:I}),[C,I]),Y=xr.useMemo(()=>({reference:_,floating:M}),[_,M]),me=xr.useMemo(()=>{let se={position:r,left:0,top:0};if(!Y.floating)return se;let we=TR(Y.floating,p.x),Ke=TR(Y.floating,p.y);return u?{...se,transform:"translate("+we+"px, "+Ke+"px)",...kR(Y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:we,top:Ke}},[r,u,Y.floating,p.x,p.y]);return xr.useMemo(()=>({...p,update:ie,refs:ae,elements:Y,floatingStyles:me}),[p,ie,ae,Y,me])}var $$=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?om({element:o.current,padding:n}).fn(r):{}:o?om({element:o,padding:n}).fn(r):{}}}},OR=(e,t)=>({...IR(e),options:[e,t]}),HR=(e,t)=>({...SR(e),options:[e,t]}),VR=(e,t)=>({...AR(e),options:[e,t]}),FR=(e,t)=>({...RR(e),options:[e,t]}),DR=(e,t)=>({..._R(e),options:[e,t]});var BR=(e,t)=>({...MR(e),options:[e,t]});var NR=(e,t)=>({...$$(e),options:[e,t]});var ZR=N(U(),1);var im=N(Tt(),1),X$="Arrow",GR=ZR.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,im.jsx)(be.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,im.jsx)("polygon",{points:"0,0 30,0 15,10"})})});GR.displayName=X$;var WR=GR;var Mi=N(U(),1),zR=N(Tt(),1);function jR(e,t=[]){let r=[];function o(a,s){let u=Mi.createContext(s),c=r.length;r=[...r,s];function d(m){let{scope:g,children:y,...x}=m,v=g?.[e][c]||u,b=Mi.useMemo(()=>x,Object.values(x));return(0,zR.jsx)(v.Provider,{value:b,children:y})}function p(m,g){let y=g?.[e][c]||u,x=Mi.useContext(y);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,p]}let n=()=>{let a=r.map(s=>Mi.createContext(s));return function(u){let c=u?.[e]||a;return Mi.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return n.scopeName=e,[o,Y$(n,...t)]}function Y$(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let s=o.reduce((u,{useScope:c,scopeName:d})=>{let m=c(a)[`__scope${d}`];return{...u,...m}},{});return Mi.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var A1=N(Tt(),1);var sm="Popper",[UR,lm]=jR(sm),[J$,$R]=UR(sm),XR=e=>{let{__scopePopper:t,children:r}=e,[o,n]=hn.useState(null);return(0,A1.jsx)(J$,{scope:t,anchor:o,onAnchorChange:n,children:r})};XR.displayName=sm;var qR="PopperAnchor",YR=hn.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=$R(qR,r),s=hn.useRef(null),u=Ue(t,s);return hn.useEffect(()=>{a.onAnchorChange(o?.current||s.current)}),o?null:(0,A1.jsx)(be.div,{...n,ref:u})});YR.displayName=qR;var um="PopperContent",[Q$,K$]=UR(um),JR=hn.forwardRef((e,t)=>{let{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:x,...v}=e,b=$R(um,r),[w,C]=hn.useState(null),I=Ue(t,xe=>C(xe)),[_,M]=hn.useState(null),T=gu(_),A=T?.width??0,H=T?.height??0,J=o+(a!=="center"?"-"+a:""),Z=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},Q=Array.isArray(d)?d:[d],W=Q.length>0,ie={padding:Z,boundary:Q.filter(tX),altBoundary:W},{refs:q,floatingStyles:ae,placement:Y,isPositioned:me,middlewareData:se}=ER({strategy:"fixed",placement:J,whileElementsMounted:(...xe)=>d0(...xe,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[OR({mainAxis:n+H,alignmentAxis:s}),c&&HR({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?VR():void 0,...ie}),c&&FR({...ie}),DR({...ie,apply:({elements:xe,rects:qe,availableWidth:_t,availableHeight:at})=>{let{width:ut,height:Ye}=qe.reference,Jt=xe.floating.style;Jt.setProperty("--radix-popper-available-width",`${_t}px`),Jt.setProperty("--radix-popper-available-height",`${at}px`),Jt.setProperty("--radix-popper-anchor-width",`${ut}px`),Jt.setProperty("--radix-popper-anchor-height",`${Ye}px`)}}),_&&NR({element:_,padding:u}),rX({arrowWidth:A,arrowHeight:H}),g&&BR({strategy:"referenceHidden",...ie})]}),[we,Ke]=e_(Y),xt=lr(x);rr(()=>{me&&xt?.()},[me,xt]);let nt=se.arrow?.x,lt=se.arrow?.y,yt=se.arrow?.centerOffset!==0,[br,bt]=hn.useState();return rr(()=>{w&&bt(window.getComputedStyle(w).zIndex)},[w]),(0,A1.jsx)("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:me?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:br,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(" "),...se.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,A1.jsx)(Q$,{scope:r,placedSide:we,onArrowChange:M,arrowX:nt,arrowY:lt,shouldHideArrow:yt,children:(0,A1.jsx)(be.div,{"data-side":we,"data-align":Ke,...v,ref:I,style:{...v.style,animation:me?void 0:"none"}})})})});JR.displayName=um;var QR="PopperArrow",eX={top:"bottom",right:"left",bottom:"top",left:"right"},KR=hn.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=K$(QR,o),s=eX[a.placedSide];return(0,A1.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:(0,A1.jsx)(WR,{...n,ref:r,style:{...n.style,display:"block"}})})});KR.displayName=QR;function tX(e){return e!==null}var rX=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:o,middlewareData:n}=t,s=n.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,p]=e_(r),m={start:"0%",center:"50%",end:"100%"}[p],g=(n.arrow?.x??0)+u/2,y=(n.arrow?.y??0)+c/2,x="",v="";return d==="bottom"?(x=s?m:`${g}px`,v=`${-c}px`):d==="top"?(x=s?m:`${g}px`,v=`${o.floating.height+c}px`):d==="right"?(x=`${-c}px`,v=s?m:`${y}px`):d==="left"&&(x=`${o.floating.width+c}px`,v=s?m:`${y}px`),{data:{x,y:v}}}});function e_(e){let[t,r="center"]=e.split("-");return[t,r]}var t_=XR,r_=YR,o_=JR,n_=KR;var a_=N(U(),1);var i_=N(Tt(),1),nX="VisuallyHidden",Tu=a_.forwardRef((e,t)=>(0,i_.jsx)(be.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Tu.displayName=nX;var Me=N(Tt(),1),aX=[" ","Enter","ArrowUp","ArrowDown"],iX=[" ","Enter"],p0="Select",[y5,b5,sX]=_1(p0),[Pu,ble]=Da(p0,[sX,lm]),L5=lm(),[lX,T1]=Pu(p0),[uX,cX]=Pu(p0),s_=e=>{let{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:s,defaultValue:u,onValueChange:c,dir:d,name:p,autoComplete:m,disabled:g,required:y,form:x}=e,v=L5(t),[b,w]=fe.useState(null),[C,I]=fe.useState(null),[_,M]=fe.useState(!1),T=M1(d),[A=!1,H]=Vr({prop:o,defaultProp:n,onChange:a}),[J,Z]=Vr({prop:s,defaultProp:u,onChange:c}),Q=fe.useRef(null),W=b?x||!!b.closest("form"):!0,[ie,q]=fe.useState(new Set),ae=Array.from(ie).map(Y=>Y.props.value).join(";");return(0,Me.jsx)(t_,{...v,children:(0,Me.jsxs)(lX,{required:y,scope:t,trigger:b,onTriggerChange:w,valueNode:C,onValueNodeChange:I,valueNodeHasChildren:_,onValueNodeHasChildrenChange:M,contentId:Na(),value:J,onValueChange:Z,open:A,onOpenChange:H,dir:T,triggerPointerDownPosRef:Q,disabled:g,children:[(0,Me.jsx)(y5.Provider,{scope:t,children:(0,Me.jsx)(uX,{scope:e.__scopeSelect,onNativeOptionAdd:fe.useCallback(Y=>{q(me=>new Set(me).add(Y))},[]),onNativeOptionRemove:fe.useCallback(Y=>{q(me=>{let se=new Set(me);return se.delete(Y),se})},[]),children:r})}),W?(0,Me.jsxs)(k_,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:m,value:J,onChange:Y=>Z(Y.target.value),disabled:g,form:x,children:[J===void 0?(0,Me.jsx)("option",{value:""}):null,Array.from(ie)]},ae):null]})})};s_.displayName=p0;var l_="SelectTrigger",u_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=L5(r),s=T1(l_,r),u=s.disabled||o,c=Ue(t,s.onTriggerChange),d=b5(r),p=fe.useRef("touch"),[m,g,y]=E_(v=>{let b=d().filter(I=>!I.disabled),w=b.find(I=>I.value===s.value),C=O_(b,v,w);C!==void 0&&s.onValueChange(C.value)}),x=v=>{u||(s.onOpenChange(!0),y()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return(0,Me.jsx)(r_,{asChild:!0,...a,children:(0,Me.jsx)(be.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:u,"data-disabled":u?"":void 0,"data-placeholder":P_(s.value)?"":void 0,...n,ref:c,onClick:Se(n.onClick,v=>{v.currentTarget.focus(),p.current!=="mouse"&&x(v)}),onPointerDown:Se(n.onPointerDown,v=>{p.current=v.pointerType;let b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(x(v),v.preventDefault())}),onKeyDown:Se(n.onKeyDown,v=>{let b=m.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(b&&v.key===" ")&&aX.includes(v.key)&&(x(),v.preventDefault())})})})});u_.displayName=l_;var c_="SelectValue",d_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:s="",...u}=e,c=T1(c_,r),{onValueNodeHasChildrenChange:d}=c,p=a!==void 0,m=Ue(t,c.onValueNodeChange);return rr(()=>{d(p)},[d,p]),(0,Me.jsx)(be.span,{...u,ref:m,style:{pointerEvents:"none"},children:P_(c.value)?(0,Me.jsx)(Me.Fragment,{children:s}):a})});d_.displayName=c_;var dX="SelectIcon",f_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,Me.jsx)(be.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});f_.displayName=dX;var fX="SelectPortal",p_=e=>(0,Me.jsx)(Hs,{asChild:!0,...e});p_.displayName=fX;var Xs="SelectContent",m_=fe.forwardRef((e,t)=>{let r=T1(Xs,e.__scopeSelect),[o,n]=fe.useState();if(rr(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?hm.createPortal((0,Me.jsx)(h_,{scope:e.__scopeSelect,children:(0,Me.jsx)(y5.Slot,{scope:e.__scopeSelect,children:(0,Me.jsx)("div",{children:e.children})})}),a):null}return(0,Me.jsx)(g_,{...e,ref:t})});m_.displayName=Xs;var pa=10,[h_,P1]=Pu(Xs),pX="SelectContentImpl",g_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:u,sideOffset:c,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:x,hideWhenDetached:v,avoidCollisions:b,...w}=e,C=T1(Xs,r),[I,_]=fe.useState(null),[M,T]=fe.useState(null),A=Ue(t,xe=>_(xe)),[H,J]=fe.useState(null),[Z,Q]=fe.useState(null),W=b5(r),[ie,q]=fe.useState(!1),ae=fe.useRef(!1);fe.useEffect(()=>{if(I)return G9(I)},[I]),E9();let Y=fe.useCallback(xe=>{let[qe,..._t]=W().map(Ye=>Ye.ref.current),[at]=_t.slice(-1),ut=document.activeElement;for(let Ye of xe)if(Ye===ut||(Ye?.scrollIntoView({block:"nearest"}),Ye===qe&&M&&(M.scrollTop=0),Ye===at&&M&&(M.scrollTop=M.scrollHeight),Ye?.focus(),document.activeElement!==ut))return},[W,M]),me=fe.useCallback(()=>Y([H,I]),[Y,H,I]);fe.useEffect(()=>{ie&&me()},[ie,me]);let{onOpenChange:se,triggerPointerDownPosRef:we}=C;fe.useEffect(()=>{if(I){let xe={x:0,y:0},qe=at=>{xe={x:Math.abs(Math.round(at.pageX)-(we.current?.x??0)),y:Math.abs(Math.round(at.pageY)-(we.current?.y??0))}},_t=at=>{xe.x<=10&&xe.y<=10?at.preventDefault():I.contains(at.target)||se(!1),document.removeEventListener("pointermove",qe),we.current=null};return we.current!==null&&(document.addEventListener("pointermove",qe),document.addEventListener("pointerup",_t,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",qe),document.removeEventListener("pointerup",_t,{capture:!0})}}},[I,se,we]),fe.useEffect(()=>{let xe=()=>se(!1);return window.addEventListener("blur",xe),window.addEventListener("resize",xe),()=>{window.removeEventListener("blur",xe),window.removeEventListener("resize",xe)}},[se]);let[Ke,xt]=E_(xe=>{let qe=W().filter(ut=>!ut.disabled),_t=qe.find(ut=>ut.ref.current===document.activeElement),at=O_(qe,xe,_t);at&&setTimeout(()=>at.ref.current.focus())}),nt=fe.useCallback((xe,qe,_t)=>{let at=!ae.current&&!_t;(C.value!==void 0&&C.value===qe||at)&&(J(xe),at&&(ae.current=!0))},[C.value]),lt=fe.useCallback(()=>I?.focus(),[I]),yt=fe.useCallback((xe,qe,_t)=>{let at=!ae.current&&!_t;(C.value!==void 0&&C.value===qe||at)&&Q(xe)},[C.value]),br=o==="popper"?cm:v_,bt=br===cm?{side:u,sideOffset:c,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:x,hideWhenDetached:v,avoidCollisions:b}:{};return(0,Me.jsx)(h_,{scope:r,content:I,viewport:M,onViewportChange:T,itemRefCallback:nt,selectedItem:H,onItemLeave:lt,itemTextRefCallback:yt,focusSelectedItem:me,selectedItemText:Z,position:o,isPositioned:ie,searchRef:Ke,children:(0,Me.jsx)(Qd,{as:Fo,allowPinchZoom:!0,children:(0,Me.jsx)(Xd,{asChild:!0,trapped:C.open,onMountAutoFocus:xe=>{xe.preventDefault()},onUnmountAutoFocus:Se(n,xe=>{C.trigger?.focus({preventScroll:!0}),xe.preventDefault()}),children:(0,Me.jsx)(Cu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:xe=>xe.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:(0,Me.jsx)(br,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:xe=>xe.preventDefault(),...w,...bt,onPlaced:()=>q(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Se(w.onKeyDown,xe=>{let qe=xe.ctrlKey||xe.altKey||xe.metaKey;if(xe.key==="Tab"&&xe.preventDefault(),!qe&&xe.key.length===1&&xt(xe.key),["ArrowUp","ArrowDown","Home","End"].includes(xe.key)){let at=W().filter(ut=>!ut.disabled).map(ut=>ut.ref.current);if(["ArrowUp","End"].includes(xe.key)&&(at=at.slice().reverse()),["ArrowUp","ArrowDown"].includes(xe.key)){let ut=xe.target,Ye=at.indexOf(ut);at=at.slice(Ye+1)}setTimeout(()=>Y(at)),xe.preventDefault()}})})})})})})});g_.displayName=pX;var mX="SelectItemAlignedPosition",v_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=T1(Xs,r),s=P1(Xs,r),[u,c]=fe.useState(null),[d,p]=fe.useState(null),m=Ue(t,A=>p(A)),g=b5(r),y=fe.useRef(!1),x=fe.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:C}=s,I=fe.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&d&&v&&b&&w){let A=a.trigger.getBoundingClientRect(),H=d.getBoundingClientRect(),J=a.valueNode.getBoundingClientRect(),Z=w.getBoundingClientRect();if(a.dir!=="rtl"){let ut=Z.left-H.left,Ye=J.left-ut,Jt=A.left-Ye,ao=A.width+Jt,$r=Math.max(ao,H.width),Z1=window.innerWidth-pa,nl=Ru(Ye,[pa,Math.max(pa,Z1-$r)]);u.style.minWidth=ao+"px",u.style.left=nl+"px"}else{let ut=H.right-Z.right,Ye=window.innerWidth-J.right-ut,Jt=window.innerWidth-A.right-Ye,ao=A.width+Jt,$r=Math.max(ao,H.width),Z1=window.innerWidth-pa,nl=Ru(Ye,[pa,Math.max(pa,Z1-$r)]);u.style.minWidth=ao+"px",u.style.right=nl+"px"}let Q=g(),W=window.innerHeight-pa*2,ie=v.scrollHeight,q=window.getComputedStyle(d),ae=parseInt(q.borderTopWidth,10),Y=parseInt(q.paddingTop,10),me=parseInt(q.borderBottomWidth,10),se=parseInt(q.paddingBottom,10),we=ae+Y+ie+se+me,Ke=Math.min(b.offsetHeight*5,we),xt=window.getComputedStyle(v),nt=parseInt(xt.paddingTop,10),lt=parseInt(xt.paddingBottom,10),yt=A.top+A.height/2-pa,br=W-yt,bt=b.offsetHeight/2,xe=b.offsetTop+bt,qe=ae+Y+xe,_t=we-qe;if(qe<=yt){let ut=Q.length>0&&b===Q[Q.length-1].ref.current;u.style.bottom="0px";let Ye=d.clientHeight-v.offsetTop-v.offsetHeight,Jt=Math.max(br,bt+(ut?lt:0)+Ye+me),ao=qe+Jt;u.style.height=ao+"px"}else{let ut=Q.length>0&&b===Q[0].ref.current;u.style.top="0px";let Jt=Math.max(yt,ae+v.offsetTop+(ut?nt:0)+bt)+_t;u.style.height=Jt+"px",v.scrollTop=qe-yt+v.offsetTop}u.style.margin=`${pa}px 0`,u.style.minHeight=Ke+"px",u.style.maxHeight=W+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[g,a.trigger,a.valueNode,u,d,v,b,w,a.dir,o]);rr(()=>I(),[I]);let[_,M]=fe.useState();rr(()=>{d&&M(window.getComputedStyle(d).zIndex)},[d]);let T=fe.useCallback(A=>{A&&x.current===!0&&(I(),C?.(),x.current=!1)},[I,C]);return(0,Me.jsx)(gX,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:(0,Me.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:(0,Me.jsx)(be.div,{...n,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});v_.displayName=mX;var hX="SelectPopperPosition",cm=fe.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=pa,...a}=e,s=L5(r);return(0,Me.jsx)(o_,{...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)"}})});cm.displayName=hX;var[gX,gm]=Pu(Xs,{}),dm="SelectViewport",C_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=P1(dm,r),s=gm(dm,r),u=Ue(t,a.onViewportChange),c=fe.useRef(0);return(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.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}),(0,Me.jsx)(y5.Slot,{scope:r,children:(0,Me.jsx)(be.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:Se(n.onScroll,d=>{let p=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=s;if(g?.current&&m){let y=Math.abs(c.current-p.scrollTop);if(y>0){let x=window.innerHeight-pa*2,v=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),w=Math.max(v,b);if(w0?_:0,m.style.justifyContent="flex-end")}}}c.current=p.scrollTop})})})]})});C_.displayName=dm;var w_="SelectGroup",[vX,CX]=Pu(w_),wX=fe.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Na();return(0,Me.jsx)(vX,{scope:r,id:n,children:(0,Me.jsx)(be.div,{role:"group","aria-labelledby":n,...o,ref:t})})});wX.displayName=w_;var x_="SelectLabel",y_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=CX(x_,r);return(0,Me.jsx)(be.div,{id:n.id,...o,ref:t})});y_.displayName=x_;var x5="SelectItem",[xX,b_]=Pu(x5),L_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...s}=e,u=T1(x5,r),c=P1(x5,r),d=u.value===o,[p,m]=fe.useState(a??""),[g,y]=fe.useState(!1),x=Ue(t,C=>c.itemRefCallback?.(C,o,n)),v=Na(),b=fe.useRef("touch"),w=()=>{n||(u.onValueChange(o),u.onOpenChange(!1))};if(o==="")throw new Error("A 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(0,Me.jsx)(xX,{scope:r,value:o,disabled:n,textId:v,isSelected:d,onItemTextChange:fe.useCallback(C=>{m(I=>I||(C?.textContent??"").trim())},[]),children:(0,Me.jsx)(y5.ItemSlot,{scope:r,value:o,disabled:n,textValue:p,children:(0,Me.jsx)(be.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:x,onFocus:Se(s.onFocus,()=>y(!0)),onBlur:Se(s.onBlur,()=>y(!1)),onClick:Se(s.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Se(s.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Se(s.onPointerDown,C=>{b.current=C.pointerType}),onPointerMove:Se(s.onPointerMove,C=>{b.current=C.pointerType,n?c.onItemLeave?.():b.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(s.onPointerLeave,C=>{C.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Se(s.onKeyDown,C=>{c.searchRef?.current!==""&&C.key===" "||(iX.includes(C.key)&&w(),C.key===" "&&C.preventDefault())})})})})});L_.displayName=x5;var f0="SelectItemText",I_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,s=T1(f0,r),u=P1(f0,r),c=b_(f0,r),d=cX(f0,r),[p,m]=fe.useState(null),g=Ue(t,w=>m(w),c.onItemTextChange,w=>u.itemTextRefCallback?.(w,c.value,c.disabled)),y=p?.textContent,x=fe.useMemo(()=>(0,Me.jsx)("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=d;return rr(()=>(v(x),()=>b(x)),[v,b,x]),(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(be.span,{id:c.textId,...a,ref:g}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?hm.createPortal(a.children,s.valueNode):null]})});I_.displayName=f0;var S_="SelectItemIndicator",R_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return b_(S_,r).isSelected?(0,Me.jsx)(be.span,{"aria-hidden":!0,...o,ref:t}):null});R_.displayName=S_;var fm="SelectScrollUpButton",__=fe.forwardRef((e,t)=>{let r=P1(fm,e.__scopeSelect),o=gm(fm,e.__scopeSelect),[n,a]=fe.useState(!1),s=Ue(t,o.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let c=function(){let p=d.scrollTop>0;a(p)};var u=c;let d=r.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),n?(0,Me.jsx)(A_,{...e,ref:s,onAutoScroll:()=>{let{viewport:u,selectedItem:c}=r;u&&c&&(u.scrollTop=u.scrollTop-c.offsetHeight)}}):null});__.displayName=fm;var pm="SelectScrollDownButton",M_=fe.forwardRef((e,t)=>{let r=P1(pm,e.__scopeSelect),o=gm(pm,e.__scopeSelect),[n,a]=fe.useState(!1),s=Ue(t,o.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let c=function(){let p=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)d.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),n?(0,Me.jsx)(A_,{...e,ref:s,onAutoScroll:()=>{let{viewport:u,selectedItem:c}=r;u&&c&&(u.scrollTop=u.scrollTop+c.offsetHeight)}}):null});M_.displayName=pm;var A_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=P1("SelectScrollButton",r),s=fe.useRef(null),u=b5(r),c=fe.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return fe.useEffect(()=>()=>c(),[c]),rr(()=>{u().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,Me.jsx)(be.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:Se(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:Se(n.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:Se(n.onPointerLeave,()=>{c()})})}),yX="SelectSeparator",T_=fe.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,Me.jsx)(be.div,{"aria-hidden":!0,...o,ref:t})});T_.displayName=yX;var mm="SelectArrow",bX=fe.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=L5(r),a=T1(mm,r),s=P1(mm,r);return a.open&&s.position==="popper"?(0,Me.jsx)(n_,{...n,...o,ref:t}):null});bX.displayName=mm;function P_(e){return e===""||e===void 0}var k_=fe.forwardRef((e,t)=>{let{value:r,...o}=e,n=fe.useRef(null),a=Ue(t,n),s=hu(r);return fe.useEffect(()=>{let u=n.current,c=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==r&&p){let m=new Event("change",{bubbles:!0});p.call(u,r),u.dispatchEvent(m)}},[s,r]),(0,Me.jsx)(Tu,{asChild:!0,children:(0,Me.jsx)("select",{...o,ref:a,defaultValue:r})})});k_.displayName="BubbleSelect";function E_(e){let t=lr(e),r=fe.useRef(""),o=fe.useRef(0),n=fe.useCallback(s=>{let u=r.current+s;t(u),function c(d){r.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>c(""),1e3))}(u)},[t]),a=fe.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return fe.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function O_(e,t,r){let n=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1,s=LX(e,Math.max(a,0));n.length===1&&(s=s.filter(d=>d!==r));let c=s.find(d=>d.textValue.toLowerCase().startsWith(n.toLowerCase()));return c!==r?c:void 0}function LX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var H_=s_,vm=u_,V_=d_,F_=f_,D_=p_,Cm=m_,B_=C_;var wm=y_,xm=L_,N_=I_,Z_=R_,ym=__,bm=M_,Lm=T_;var I5=H_;var S5=V_,m0=kt.forwardRef(({className:e,children:t,...r},o)=>kt.createElement(vm,{ref:o,className:ee("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r},t,kt.createElement(F_,{asChild:!0},kt.createElement(Ql,{className:"h-4 w-4 opacity-50"}))));m0.displayName=vm.displayName;var G_=kt.forwardRef(({className:e,...t},r)=>kt.createElement(ym,{ref:r,className:ee("flex cursor-default items-center justify-center py-1",e),...t},kt.createElement(vd,{className:"h-4 w-4"})));G_.displayName=ym.displayName;var W_=kt.forwardRef(({className:e,...t},r)=>kt.createElement(bm,{ref:r,className:ee("flex cursor-default items-center justify-center py-1",e),...t},kt.createElement(Ql,{className:"h-4 w-4"})));W_.displayName=bm.displayName;var h0=kt.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>kt.createElement(D_,null,kt.createElement(Cm,{ref:n,className:ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",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,...o},kt.createElement(G_,null),kt.createElement(B_,{className:ee("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),kt.createElement(W_,null))));h0.displayName=Cm.displayName;var SX=kt.forwardRef(({className:e,...t},r)=>kt.createElement(wm,{ref:r,className:ee("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));SX.displayName=wm.displayName;var g0=kt.forwardRef(({className:e,children:t,...r},o)=>kt.createElement(xm,{ref:o,className:ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r},kt.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},kt.createElement(Z_,null,kt.createElement(gd,{className:"h-4 w-4"}))),kt.createElement(N_,null,t)));g0.displayName=xm.displayName;var RX=kt.forwardRef(({className:e,...t},r)=>kt.createElement(Lm,{ref:r,className:ee("-mx-1 my-1 h-px bg-muted",e),...t}));RX.displayName=Lm.displayName;var ha=N(U());var ma=N(U(),1);var Ai=N(U(),1),z_=N(Tt(),1);function j_(e,t=[]){let r=[];function o(a,s){let u=Ai.createContext(s),c=r.length;r=[...r,s];function d(m){let{scope:g,children:y,...x}=m,v=g?.[e][c]||u,b=Ai.useMemo(()=>x,Object.values(x));return(0,z_.jsx)(v.Provider,{value:b,children:y})}function p(m,g){let y=g?.[e][c]||u,x=Ai.useContext(y);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,p]}let n=()=>{let a=r.map(s=>Ai.createContext(s));return function(u){let c=u?.[e]||a;return Ai.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return n.scopeName=e,[o,_X(n,...t)]}function _X(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let s=o.reduce((u,{useScope:c,scopeName:d})=>{let m=c(a)[`__scope${d}`];return{...u,...m}},{});return Ai.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Dr=N(U(),1);var Ti=N(U(),1),U_=N(Tt(),1);function $_(e,t=[]){let r=[];function o(a,s){let u=Ti.createContext(s),c=r.length;r=[...r,s];function d(m){let{scope:g,children:y,...x}=m,v=g?.[e][c]||u,b=Ti.useMemo(()=>x,Object.values(x));return(0,U_.jsx)(v.Provider,{value:b,children:y})}function p(m,g){let y=g?.[e][c]||u,x=Ti.useContext(y);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,p]}let n=()=>{let a=r.map(s=>Ti.createContext(s));return function(u){let c=u?.[e]||a;return Ti.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return n.scopeName=e,[o,MX(n,...t)]}function MX(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let s=o.reduce((u,{useScope:c,scopeName:d})=>{let m=c(a)[`__scope${d}`];return{...u,...m}},{});return Ti.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var k1=N(Tt(),1),Im="rovingFocusGroup.onEntryFocus",AX={bubbles:!1,cancelable:!0},R5="RovingFocusGroup",[Sm,X_,TX]=_1(R5),[PX,Rm]=$_(R5,[TX]),[kX,EX]=PX(R5),q_=Dr.forwardRef((e,t)=>(0,k1.jsx)(Sm.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,k1.jsx)(Sm.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,k1.jsx)(OX,{...e,ref:t})})}));q_.displayName=R5;var OX=Dr.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...m}=e,g=Dr.useRef(null),y=Ue(t,g),x=M1(a),[v=null,b]=Vr({prop:s,defaultProp:u,onChange:c}),[w,C]=Dr.useState(!1),I=lr(d),_=X_(r),M=Dr.useRef(!1),[T,A]=Dr.useState(0);return Dr.useEffect(()=>{let H=g.current;if(H)return H.addEventListener(Im,I),()=>H.removeEventListener(Im,I)},[I]),(0,k1.jsx)(kX,{scope:r,orientation:o,dir:x,loop:n,currentTabStopId:v,onItemFocus:Dr.useCallback(H=>b(H),[b]),onItemShiftTab:Dr.useCallback(()=>C(!0),[]),onFocusableItemAdd:Dr.useCallback(()=>A(H=>H+1),[]),onFocusableItemRemove:Dr.useCallback(()=>A(H=>H-1),[]),children:(0,k1.jsx)(be.div,{tabIndex:w||T===0?-1:0,"data-orientation":o,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{M.current=!0}),onFocus:Se(e.onFocus,H=>{let J=!M.current;if(H.target===H.currentTarget&&J&&!w){let Z=new CustomEvent(Im,AX);if(H.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){let Q=_().filter(Y=>Y.focusable),W=Q.find(Y=>Y.active),ie=Q.find(Y=>Y.id===v),ae=[W,ie,...Q].filter(Boolean).map(Y=>Y.ref.current);Q_(ae,p)}}M.current=!1}),onBlur:Se(e.onBlur,()=>C(!1))})})}),Y_="RovingFocusGroupItem",J_=Dr.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,...s}=e,u=Na(),c=a||u,d=EX(Y_,r),p=d.currentTabStopId===c,m=X_(r),{onFocusableItemAdd:g,onFocusableItemRemove:y}=d;return Dr.useEffect(()=>{if(o)return g(),()=>y()},[o,g,y]),(0,k1.jsx)(Sm.ItemSlot,{scope:r,id:c,focusable:o,active:n,children:(0,k1.jsx)(be.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Se(e.onMouseDown,x=>{o?d.onItemFocus(c):x.preventDefault()}),onFocus:Se(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Se(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let v=FX(x,d.orientation,d.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=m().filter(C=>C.focusable).map(C=>C.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();let C=w.indexOf(x.currentTarget);w=d.loop?DX(w,C+1):w.slice(C+1)}setTimeout(()=>Q_(w))}})})})});J_.displayName=Y_;var HX={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VX(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function FX(e,t,r){let o=VX(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return HX[o]}function Q_(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function DX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var K_=q_,eM=J_;var tM=N(U(),1);var rM=N(Tt(),1),NX="Toggle",_5=tM.forwardRef((e,t)=>{let{pressed:r,defaultPressed:o=!1,onPressedChange:n,...a}=e,[s=!1,u]=Vr({prop:r,onChange:n,defaultProp:o});return(0,rM.jsx)(be.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Se(e.onClick,()=>{e.disabled||u(!s)})})});_5.displayName=NX;var _m=_5;var Co=N(Tt(),1),ku="ToggleGroup",[nM,$le]=j_(ku,[Rm]),aM=Rm(),Mm=ma.default.forwardRef((e,t)=>{let{type:r,...o}=e;if(r==="single")return(0,Co.jsx)(GX,{...o,ref:t});if(r==="multiple")return(0,Co.jsx)(WX,{...o,ref:t});throw new Error(`Missing prop \`type\` expected on \`${ku}\``)});Mm.displayName=ku;var[iM,sM]=nM(ku),GX=ma.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[s,u]=Vr({prop:r,defaultProp:o,onChange:n});return(0,Co.jsx)(iM,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:u,onItemDeactivate:ma.default.useCallback(()=>u(""),[u]),children:(0,Co.jsx)(lM,{...a,ref:t})})}),WX=ma.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[s=[],u]=Vr({prop:r,defaultProp:o,onChange:n}),c=ma.default.useCallback(p=>u((m=[])=>[...m,p]),[u]),d=ma.default.useCallback(p=>u((m=[])=>m.filter(g=>g!==p)),[u]);return(0,Co.jsx)(iM,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:d,children:(0,Co.jsx)(lM,{...a,ref:t})})});Mm.displayName=ku;var[zX,jX]=nM(ku),lM=ma.default.forwardRef((e,t)=>{let{__scopeToggleGroup:r,disabled:o=!1,rovingFocus:n=!0,orientation:a,dir:s,loop:u=!0,...c}=e,d=aM(r),p=M1(s),m={role:"group",dir:p,...c};return(0,Co.jsx)(zX,{scope:r,rovingFocus:n,disabled:o,children:n?(0,Co.jsx)(K_,{asChild:!0,...d,orientation:a,dir:p,loop:u,children:(0,Co.jsx)(be.div,{...m,ref:t})}):(0,Co.jsx)(be.div,{...m,ref:t})})}),M5="ToggleGroupItem",uM=ma.default.forwardRef((e,t)=>{let r=sM(M5,e.__scopeToggleGroup),o=jX(M5,e.__scopeToggleGroup),n=aM(e.__scopeToggleGroup),a=r.value.includes(e.value),s=o.disabled||e.disabled,u={...e,pressed:a,disabled:s},c=ma.default.useRef(null);return o.rovingFocus?(0,Co.jsx)(eM,{asChild:!0,...n,focusable:!s,active:a,ref:c,children:(0,Co.jsx)(oM,{...u,ref:t})}):(0,Co.jsx)(oM,{...u,ref:t})});uM.displayName=M5;var oM=ma.default.forwardRef((e,t)=>{let{__scopeToggleGroup:r,value:o,...n}=e,a=sM(M5,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=a.type==="single"?s:void 0;return(0,Co.jsx)(_5,{...u,...n,ref:t,onPressedChange:c=>{c?a.onItemActivate(o):a.onItemDeactivate(o)}})}),Am=Mm,Tm=uM;var A5=N(U());var Pm=Dn("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),$X=A5.forwardRef(({className:e,variant:t,size:r,...o},n)=>A5.createElement(_m,{ref:n,className:ee(Pm({variant:t,size:r,className:e})),...o}));$X.displayName=_m.displayName;var cM=ha.createContext({size:"default",variant:"default"}),ga=ha.forwardRef(({className:e,variant:t,size:r,children:o,...n},a)=>ha.createElement(Am,{ref:a,className:ee("flex items-center gap-1",e),...n},ha.createElement(cM.Provider,{value:{variant:t,size:r}},o)));ga.displayName=Am.displayName;var jo=ha.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>{let s=ha.useContext(cM);return ha.createElement(Tm,{ref:a,className:ee(Pm({variant:s.variant||r,size:s.size||o}),e),...n},t)});jo.displayName=Tm.displayName;var dM={rgbw:"Compatible with FUT014, FUT016, FUT103, FUT005, FUT006, FUT007 bulbs.",cct:"Compatible with FUT011, FUT017, FUT019 bulbs.",rgb_cct:"Compatible with FUT012, FUT013, FUT014, FUT015, FUT103, FUT104, FUT105, and many RGB/CCT LED Strip Controllers.",rgb:"Compatible with most RGB LED Strip Controllers.",fut089:"Compatible with most newer RGB + dual white bulbs and controllers.",fut091:"Compatible with most newer dual white bulbs and controllers.",fut020:"Compatible with some RGB LED strip controllers."},fM={rgbw:{brightness:!0,color:!0,colorTemp:!1},cct:{brightness:!0,color:!1,colorTemp:!0},rgb_cct:{brightness:!0,color:!0,colorTemp:!0},rgb:{brightness:!0,color:!0,colorTemp:!1},fut089:{brightness:!0,color:!0,colorTemp:!0},fut091:{brightness:!0,color:!1,colorTemp:!0},fut020:{brightness:!0,color:!0,colorTemp:!1}};var XX=k.object({name:k.string().min(1,{message:"Name is required."}),device_type:k.nativeEnum(At.RemoteType.Values),device_id:k.string().regex(/^(0x[0-9A-Fa-f]+|[0-9]+)$/,{message:"Invalid device ID format. It should be a hexadecimal number starting with 0x or a decimal number."}),group_id:k.number().int().min(0).max(8)}),qX=e=>{switch(e){case At.RemoteType.Values.fut089:return 8;case At.RemoteType.Values.rgb:return 1;default:return 4}};function YX({onSubmit:e}){let t=t5({resolver:r5(XX),defaultValues:{group_id:0}}),r=a=>{let s=a.device_id.startsWith("0x")?parseInt(a.device_id,16):parseInt(a.device_id,10),u={...a,alias:a.name,device_id:s};e(u)},o=t.watch("device_type"),n=qX(o);return rt.default.createElement(US,{...t},rt.default.createElement("form",{onSubmit:t.handleSubmit(r),className:"space-y-8"},rt.default.createElement(fn,{control:t.control,name:"name",render:({field:a})=>rt.default.createElement(pn,null,rt.default.createElement(mn,null,"Name"),rt.default.createElement(Go,null,rt.default.createElement(Wo,{autoComplete:"off",placeholder:"Name for this light",...a})),rt.default.createElement(S1,null))}),rt.default.createElement(fn,{control:t.control,name:"device_type",render:({field:a})=>rt.default.createElement(pn,null,rt.default.createElement(mn,null,"Remote Type"),rt.default.createElement(I5,{onValueChange:a.onChange,defaultValue:a.value},rt.default.createElement(Go,null,rt.default.createElement(m0,null,rt.default.createElement(S5,{placeholder:"Select a remote type"}))),rt.default.createElement(h0,{className:"max-w-96"},Object.values(At.RemoteType.Values).map(s=>rt.default.createElement(g0,{key:s,value:s,className:"group"},rt.default.createElement("div",{className:"flex flex-col items-start max-w-72"},rt.default.createElement("div",{className:"font-medium"},s),rt.default.createElement("div",{className:"text-sm text-muted-foreground break-words w-full text-left"},dM[s])))))),rt.default.createElement(S1,null))}),rt.default.createElement(fn,{control:t.control,name:"device_id",render:({field:a})=>rt.default.createElement(pn,null,rt.default.createElement(mn,null,"Device ID"),rt.default.createElement(Go,null,rt.default.createElement(Wo,{type:"text",autoComplete:"off",placeholder:"Enter device ID",...a})),rt.default.createElement(S1,null))}),rt.default.createElement(fn,{control:t.control,name:"group_id",render:({field:a})=>rt.default.createElement(pn,null,rt.default.createElement(mn,null,"Group ID"),rt.default.createElement(Go,null,rt.default.createElement(ga,{type:"single",variant:"outline",value:a.value.toString(),onValueChange:s=>a.onChange(parseInt(s,10))},Array.from({length:n},(s,u)=>rt.default.createElement(jo,{key:u,value:(u+1).toString()},u+1)))),rt.default.createElement(S1,null))}),rt.default.createElement(Zt,{type:"submit"},"Submit")))}var pM=YX;var Ee=N(U());var qs=N(U());var Ht=N(U(),1);var Ar=N(Tt(),1),mM=["PageUp","PageDown"],hM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],gM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Eu="Slider",[km,JX,QX]=_1(Eu),[vM,bue]=Da(Eu,[QX]),[KX,T5]=vM(Eu),CM=Ht.forwardRef((e,t)=>{let{name:r,min:o=0,max:n=100,step:a=1,orientation:s="horizontal",disabled:u=!1,minStepsBetweenThumbs:c=0,defaultValue:d=[o],value:p,onValueChange:m=()=>{},onValueCommit:g=()=>{},inverted:y=!1,form:x,...v}=e,b=Ht.useRef(new Set),w=Ht.useRef(0),I=s==="horizontal"?eq:tq,[_=[],M]=Vr({prop:p,defaultProp:d,onChange:Q=>{[...b.current][w.current]?.focus(),m(Q)}}),T=Ht.useRef(_);function A(Q){let W=iq(_,Q);Z(Q,W)}function H(Q){Z(Q,w.current)}function J(){let Q=T.current[w.current];_[w.current]!==Q&&g(_)}function Z(Q,W,{commit:ie}={commit:!1}){let q=cq(a),ae=dq(Math.round((Q-o)/a)*a+o,q),Y=Ru(ae,[o,n]);M((me=[])=>{let se=nq(me,Y,W);if(uq(se,c*a)){w.current=se.indexOf(Y);let we=String(se)!==String(me);return we&&ie&&g(se),we?se:me}else return me})}return(0,Ar.jsx)(KX,{scope:e.__scopeSlider,name:r,disabled:u,min:o,max:n,valueIndexToChangeRef:w,thumbs:b.current,values:_,orientation:s,form:x,children:(0,Ar.jsx)(km.Provider,{scope:e.__scopeSlider,children:(0,Ar.jsx)(km.Slot,{scope:e.__scopeSlider,children:(0,Ar.jsx)(I,{"aria-disabled":u,"data-disabled":u?"":void 0,...v,ref:t,onPointerDown:Se(v.onPointerDown,()=>{u||(T.current=_)}),min:o,max:n,inverted:y,onSlideStart:u?void 0:A,onSlideMove:u?void 0:H,onSlideEnd:u?void 0:J,onHomeKeyDown:()=>!u&&Z(o,0,{commit:!0}),onEndKeyDown:()=>!u&&Z(n,_.length-1,{commit:!0}),onStepKeyDown:({event:Q,direction:W})=>{if(!u){let ae=mM.includes(Q.key)||Q.shiftKey&&hM.includes(Q.key)?10:1,Y=w.current,me=_[Y],se=a*ae*W;Z(me+se,Y,{commit:!0})}}})})})})});CM.displayName=Eu;var[wM,xM]=vM(Eu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eq=Ht.forwardRef((e,t)=>{let{min:r,max:o,dir:n,inverted:a,onSlideStart:s,onSlideMove:u,onSlideEnd:c,onStepKeyDown:d,...p}=e,[m,g]=Ht.useState(null),y=Ue(t,I=>g(I)),x=Ht.useRef(),v=M1(n),b=v==="ltr",w=b&&!a||!b&&a;function C(I){let _=x.current||m.getBoundingClientRect(),M=[0,_.width],A=Hm(M,w?[r,o]:[o,r]);return x.current=_,A(I-_.left)}return(0,Ar.jsx)(wM,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,Ar.jsx)(yM,{dir:v,"data-orientation":"horizontal",...p,ref:y,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:I=>{let _=C(I.clientX);s?.(_)},onSlideMove:I=>{let _=C(I.clientX);u?.(_)},onSlideEnd:()=>{x.current=void 0,c?.()},onStepKeyDown:I=>{let M=gM[w?"from-left":"from-right"].includes(I.key);d?.({event:I,direction:M?-1:1})}})})}),tq=Ht.forwardRef((e,t)=>{let{min:r,max:o,inverted:n,onSlideStart:a,onSlideMove:s,onSlideEnd:u,onStepKeyDown:c,...d}=e,p=Ht.useRef(null),m=Ue(t,p),g=Ht.useRef(),y=!n;function x(v){let b=g.current||p.current.getBoundingClientRect(),w=[0,b.height],I=Hm(w,y?[o,r]:[r,o]);return g.current=b,I(v-b.top)}return(0,Ar.jsx)(wM,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:(0,Ar.jsx)(yM,{"data-orientation":"vertical",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{let b=x(v.clientY);a?.(b)},onSlideMove:v=>{let b=x(v.clientY);s?.(b)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:v=>{let w=gM[y?"from-bottom":"from-top"].includes(v.key);c?.({event:v,direction:w?-1:1})}})})}),yM=Ht.forwardRef((e,t)=>{let{__scopeSlider:r,onSlideStart:o,onSlideMove:n,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:u,onStepKeyDown:c,...d}=e,p=T5(Eu,r);return(0,Ar.jsx)(be.span,{...d,ref:t,onKeyDown:Se(e.onKeyDown,m=>{m.key==="Home"?(s(m),m.preventDefault()):m.key==="End"?(u(m),m.preventDefault()):mM.concat(hM).includes(m.key)&&(c(m),m.preventDefault())}),onPointerDown:Se(e.onPointerDown,m=>{let g=m.target;g.setPointerCapture(m.pointerId),m.preventDefault(),p.thumbs.has(g)?g.focus():o(m)}),onPointerMove:Se(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&n(m)}),onPointerUp:Se(e.onPointerUp,m=>{let g=m.target;g.hasPointerCapture(m.pointerId)&&(g.releasePointerCapture(m.pointerId),a(m))})})}),bM="SliderTrack",LM=Ht.forwardRef((e,t)=>{let{__scopeSlider:r,...o}=e,n=T5(bM,r);return(0,Ar.jsx)(be.span,{"data-disabled":n.disabled?"":void 0,"data-orientation":n.orientation,...o,ref:t})});LM.displayName=bM;var Em="SliderRange",IM=Ht.forwardRef((e,t)=>{let{__scopeSlider:r,...o}=e,n=T5(Em,r),a=xM(Em,r),s=Ht.useRef(null),u=Ue(t,s),c=n.values.length,d=n.values.map(g=>RM(g,n.min,n.max)),p=c>1?Math.min(...d):0,m=100-Math.max(...d);return(0,Ar.jsx)(be.span,{"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,...o,ref:u,style:{...e.style,[a.startEdge]:p+"%",[a.endEdge]:m+"%"}})});IM.displayName=Em;var Om="SliderThumb",SM=Ht.forwardRef((e,t)=>{let r=JX(e.__scopeSlider),[o,n]=Ht.useState(null),a=Ue(t,u=>n(u)),s=Ht.useMemo(()=>o?r().findIndex(u=>u.ref.current===o):-1,[r,o]);return(0,Ar.jsx)(rq,{...e,ref:a,index:s})}),rq=Ht.forwardRef((e,t)=>{let{__scopeSlider:r,index:o,name:n,...a}=e,s=T5(Om,r),u=xM(Om,r),[c,d]=Ht.useState(null),p=Ue(t,C=>d(C)),m=c?s.form||!!c.closest("form"):!0,g=gu(c),y=s.values[o],x=y===void 0?0:RM(y,s.min,s.max),v=aq(o,s.values.length),b=g?.[u.size],w=b?sq(b,x,u.direction):0;return Ht.useEffect(()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}},[c,s.thumbs]),(0,Ar.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${x}% + ${w}px)`},children:[(0,Ar.jsx)(km.ItemSlot,{scope:e.__scopeSlider,children:(0,Ar.jsx)(be.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":s.min,"aria-valuenow":y,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:p,style:y===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{s.valueIndexToChangeRef.current=o})})}),m&&(0,Ar.jsx)(oq,{name:n??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:y},o)]})});SM.displayName=Om;var oq=e=>{let{value:t,...r}=e,o=Ht.useRef(null),n=hu(t);return Ht.useEffect(()=>{let a=o.current,s=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(n!==t&&c){let d=new Event("input",{bubbles:!0});c.call(a,t),a.dispatchEvent(d)}},[n,t]),(0,Ar.jsx)("input",{style:{display:"none"},...r,ref:o,defaultValue:t})};function nq(e=[],t,r){let o=[...e];return o[r]=t,o.sort((n,a)=>n-a)}function RM(e,t,r){let a=100/(r-t)*(e-t);return Ru(a,[0,100])}function aq(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function iq(e,t){if(e.length===1)return 0;let r=e.map(n=>Math.abs(n-t)),o=Math.min(...r);return r.indexOf(o)}function sq(e,t,r){let o=e/2,a=Hm([0,50],[0,o]);return(o-a(t)*r)*r}function lq(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function uq(e,t){if(t>0){let r=lq(e);return Math.min(...r)>=t}return!0}function Hm(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function cq(e){return(String(e).split(".")[1]||"").length}function dq(e,t){let r=Math.pow(10,t);return Math.round(e*r)/r}var Vm=CM,_M=LM,MM=IM,AM=SM;var P5=qs.forwardRef(({className:e,gradient:t,...r},o)=>qs.createElement(Vm,{ref:o,className:ee("relative flex w-full touch-none select-none items-center cursor-pointer",e),...r},qs.createElement(_M,{className:ee("relative h-2 w-full grow overflow-hidden rounded-full",t?"":"bg-secondary"),style:{background:t}},qs.createElement(MM,{className:ee("absolute",t?"":"h-full bg-primary")})),qs.createElement(AM,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));P5.displayName=Vm.displayName;function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{r:t,g:r,b:o,a:n}=e,a=Math.max(t,r,o),s=a-Math.min(t,r,o),u=s?a===t?(r-o)/s:a===r?2+(o-t)/s:4+(t-r)/s:0;return{h:60*(u<0?u+6:u),s:a?s/a*E1:0,v:a/Hu*E1,a:n}};var pq=e=>{var{h:t,s:r,v:o,a:n}=e,a=(200-r)*o/E1;return{h:t,s:a>0&&a<200?r*o/E1/(a<=E1?a:200-a)*E1:0,l:a/2,a:n}};var Mue={grad:Fm/400,turn:Fm,rad:Fm/(Math.PI*2)};var TM=e=>{var{r:t,g:r,b:o}=e,n=t<<16|r<<8|o;return"#"+(a=>new Array(7-a.length).join("0")+a)(n.toString(16))},mq=e=>{var{r:t,g:r,b:o,a:n}=e,a=typeof n=="number"&&(n*255|256).toString(16).slice(1);return""+TM({r:t,g:r,b:o,a:n})+(a||"")},Bm=e=>Dm(hq(e)),hq=e=>{var t=e.replace("#","");/^#?/.test(e)&&t.length===3&&(e="#"+t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2));var r=new RegExp("[A-Za-z0-9]{2}","g"),[o,n,a=0,s]=e.match(r).map(u=>parseInt(u,16));return{r:o,g:n,b:a,a:(s??255)/Hu}},k5=e=>{var{h:t,s:r,v:o,a:n}=e,a=t/60,s=r/E1,u=o/E1,c=Math.floor(a)%6,d=a-Math.floor(a),p=Hu*u*(1-s),m=Hu*u*(1-s*d),g=Hu*u*(1-s*(1-d));u*=Hu;var y={};switch(c){case 0:y.r=u,y.g=g,y.b=p;break;case 1:y.r=m,y.g=u,y.b=p;break;case 2:y.r=p,y.g=u,y.b=g;break;case 3:y.r=p,y.g=m,y.b=u;break;case 4:y.r=g,y.g=p,y.b=u;break;case 5:y.r=u,y.g=p,y.b=m;break}return y.r=Math.round(y.r),y.g=Math.round(y.g),y.b=Math.round(y.b),Ce({},y,{a:n})};var gq=e=>{var{r:t,g:r,b:o}=e;return{r:t,g:r,b:o}},vq=e=>{var{h:t,s:r,l:o}=e;return{h:t,s:r,l:o}},Nm=e=>TM(k5(e));var Cq=e=>{var{h:t,s:r,v:o}=e;return{h:t,s:r,v:o}};var wq=e=>{var{r:t,g:r,b:o}=e,n=function(p){return p<=.04045?p/12.92:Math.pow((p+.055)/1.055,2.4)},a=n(t/255),s=n(r/255),u=n(o/255),c={};return c.x=a*.4124+s*.3576+u*.1805,c.y=a*.2126+s*.7152+u*.0722,c.bri=a*.0193+s*.1192+u*.9505,c},PM=e=>{var t,r,o,n,a,s,u,c,d;return typeof e=="string"&&Zm(e)?(s=Bm(e),c=e):typeof e!="string"&&(s=e),s&&(o=Cq(s),a=pq(s),n=k5(s),d=mq(n),c=Nm(s),r=vq(a),t=gq(n),u=wq(t)),{rgb:t,hsl:r,hsv:o,rgba:n,hsla:a,hsva:s,hex:c,hexa:d,xy:u}};var Zm=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e);var Uo=N(U());var Vu=N(U());function Gm(e){var t=(0,Vu.useRef)(e);return(0,Vu.useEffect)(()=>{t.current=e}),(0,Vu.useCallback)((r,o)=>t.current&&t.current(r,o),[])}var Fu=e=>"touches"in e,Wm=e=>{!Fu(e)&&e.preventDefault&&e.preventDefault()},kM=function(t,r,o){return r===void 0&&(r=0),o===void 0&&(o=1),t>o?o:t{var r=e.getBoundingClientRect(),o=Fu(t)?t.touches[0]:t;return{left:kM((o.pageX-(r.left+window.pageXOffset))/r.width),top:kM((o.pageY-(r.top+window.pageYOffset))/r.height),width:r.width,height:r.height,x:o.pageX-(r.left+window.pageXOffset),y:o.pageY-(r.top+window.pageYOffset)}};var EM=N(Tt()),xq=["prefixCls","className","onMove","onDown"],OM=Uo.default.forwardRef((e,t)=>{var{prefixCls:r="w-color-interactive",className:o,onMove:n,onDown:a}=e,s=Ou(e,xq),u=(0,Uo.useRef)(null),c=(0,Uo.useRef)(!1),[d,p]=(0,Uo.useState)(!1),m=Gm(n),g=Gm(a),y=C=>c.current&&!Fu(C)?!1:(c.current=Fu(C),!0),x=(0,Uo.useCallback)(C=>{Wm(C);var I=Fu(C)?C.touches.length>0:C.buttons>0;I&&u.current?m&&m(zm(u.current,C),C):p(!1)},[m]),v=(0,Uo.useCallback)(()=>p(!1),[]),b=(0,Uo.useCallback)(C=>{var I=C?window.addEventListener:window.removeEventListener;I(c.current?"touchmove":"mousemove",x),I(c.current?"touchend":"mouseup",v)},[]);(0,Uo.useEffect)(()=>(b(d),()=>{d&&b(!1)}),[d,b]);var w=(0,Uo.useCallback)(C=>{Wm(C.nativeEvent),y(C.nativeEvent)&&(g&&g(zm(u.current,C.nativeEvent),C.nativeEvent),p(!0))},[g]);return(0,EM.jsx)("div",Ce({},s,{className:[r,o||""].filter(Boolean).join(" "),style:Ce({},s.style,{touchAction:"none"}),ref:u,tabIndex:0,onMouseDown:w,onTouchStart:w}))});OM.displayName="Interactive";var HM=OM;var Fue=N(U()),E5=N(Tt()),yq="rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",VM=e=>{var{className:t,color:r,left:o,top:n,style:a,prefixCls:s}=e,u=Ce({},a,{position:"absolute",top:n,left:o}),c=s+"-pointer "+(t||"");return(0,E5.jsx)("div",{className:c,style:u,children:(0,E5.jsx)("div",{className:s+"-fill",style:{width:10,height:10,transform:"translate(-5px, -5px)",boxShadow:yq,borderRadius:"50%",backgroundColor:"#fff"},children:(0,E5.jsx)("div",{style:{inset:0,borderRadius:"50%",position:"absolute",backgroundColor:r}})})})};var FM=Math.PI*2,bq=(e,t)=>(e%t+t)%t,Lq=(e,t)=>Math.sqrt(e*e+t*t);function DM(e){var{width:t=0}=e,r=t/2;return{width:t,radius:r,cx:r,cy:r}}function BM(e,t){var{cx:r,cy:o}=DM(e),n=NM(e),a=(180+ZM(e,t.h,!0))*(FM/360),s=t.s/100*n,u=e.direction==="clockwise"?-1:1;return{x:r+s*Math.cos(a)*u,y:o+s*Math.sin(a)*u}}function NM(e){var{width:t=0}=e;return t/2}function ZM(e,t,r){var o=e.angle||0,n=e.direction;return r&&n==="clockwise"?t=o+t:n==="clockwise"?t=360-o+t:r&&n==="anticlockwise"?t=o+180-t:n==="anticlockwise"&&(t=o-t),bq(t,360)}function GM(e,t,r){var{cx:o,cy:n}=DM(e),a=NM(e);t=o-t,r=n-r;var s=ZM(e,Math.atan2(-r,-t)*(360/FM)),u=Math.min(Lq(t,r),a);return{h:Math.round(s),s:Math.round(100/a*u)}}var Ys=N(Tt()),Iq=["prefixCls","radius","pointer","className","style","width","height","oval","direction","angle","color","onChange"],Sq="conic-gradient(red, yellow, lime, aqua, blue, magenta, red)",Rq="conic-gradient(red, magenta, blue, aqua, lime, yellow, red)",zM=WM.default.forwardRef((e,t)=>{var{prefixCls:r="w-color-wheel",radius:o=0,pointer:n,className:a,style:s,width:u=200,height:c=200,oval:d,direction:p="anticlockwise",angle:m=180,color:g,onChange:y}=e,x=Ou(e,Iq),v=typeof g=="string"&&Zm(g)?Bm(g):g||{},b=g?Nm(v):"",w=BM({width:u},v),C={top:"0",left:"0",color:b},I=(T,A)=>{var H=GM({width:u},u-T.x,c-T.y),J={h:H.h,s:H.s,v:v.v,a:v.a};y&&y(PM(J))},_={zIndex:1,transform:"translate("+w.x+"px, "+w.y+"px) "+(d==="x"||d==="X"?"scaleY(2)":d==="y"||d==="Y"?"scaleX(2)":"")},M=n&&typeof n=="function"?n(Ce({prefixCls:r,style:_},C)):(0,Ys.jsx)(VM,Ce({prefixCls:r,style:_},C));return(0,Ys.jsxs)(HM,Ce({className:[r,a||""].filter(Boolean).join(" ")},x,{style:Ce({position:"relative",width:u,transform:d==="x"||d==="X"?"scaleY(0.5)":d==="y"||d==="Y"?"scaleX(0.5)":"",height:c},s),ref:t,onMove:I,onDown:I,children:[M,(0,Ys.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:p==="anticlockwise"?Sq:Rq,transform:"rotateZ("+(m+90)+"deg)",inset:0}}),(0,Ys.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"radial-gradient(circle closest-side, #fff, transparent)",inset:0}}),(0,Ys.jsx)("div",{style:{backgroundColor:"#000",borderRadius:"50%",position:"absolute",inset:0,opacity:typeof v.v=="number"?1-v.v/100:0}})]}))});zM.displayName="Wheel";var jM=zM;var _q="/",Js=DL(_q);var Qs=N(U());function UM(e,t){let[r,o]=(0,Qs.useState)({value:e,serial:0}),n=(0,Qs.useRef)(null),a=(0,Qs.useRef)(0);return(0,Qs.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),[r,c=>{let d=Date.now(),p=d-a.current,m=g=>{a.current=d;let y=typeof c=="function"?c(g.value):c;return{value:typeof g.value=="object"&&typeof y=="object"?{...g.value,...y}:y,serial:g.serial+1}};p>=t?o(m):(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{o(m)},t-p))},()=>{o({value:e,serial:0}),a.current=0,n.current&&clearTimeout(n.current)}]}function $M({name:e,state:t,id:r,updateState:o,onClose:n,onNameChange:a}){let[s,u,c]=UM({},500),d=(0,Ee.useRef)(0),p=async Z=>{let Q=await Js.putGatewaysDeviceIdRemoteTypeGroupId(Z,{params:{remoteType:r.device_type,deviceId:r.device_id,groupId:r.group_id},queries:{fmt:"normalized",blockOnQueue:!0}});Q&&o(Q)},m=Z=>{o(Z);let Q=Date.now();Q-d.current>=500?(p(Z),d.current=Q,c()):u(W=>({...W,...Z}))},g=async Z=>await p({command:Z});(0,Ee.useEffect)(()=>{if(Object.keys(s.value).length>0){let Z=Date.now();Z-d.current>=500&&(p(s.value),d.current=Z,c())}},[s]);let y=Z=>{m({state:Z?"ON":"OFF"})},x=Z=>{m({level:Z[0]})},v=Z=>{m({kelvin:Z[0]}),o({color_mode:At.ColorMode.Values.color_temp})},b=Z=>{let Q=k5(Z.hsva);m({color:{r:Q.r,g:Q.g,b:Q.b}}),o({color_mode:At.ColorMode.Values.rgb})},w=Dm(t.color?{...t.color,a:1}:{r:255,g:255,b:255,a:1}),C=Z=>{o({color_mode:Z}),Z===At.ColorMode.Values.color_temp?g(At.GroupStateCommand.Values.set_white):Z===At.ColorMode.Values.rgb?m({color:{r:t.color?.r||255,g:t.color?.g||0,b:t.color?.b||255}}):Z===At.ColorMode.Values.onoff&&g(At.GroupStateCommand.Values.night_mode)},I=fM[r.device_type],[_,M]=(0,Ee.useState)(!1),[T,A]=(0,Ee.useState)(e),H=()=>{M(!0)},J=()=>{M(!1),a(T)};return Ee.default.createElement(jd,{className:"w-96 min-h-96 flex flex-col"},Ee.default.createElement(C1,{className:"flex flex-row items-center justify-between space-y-0 pb-4"},Ee.default.createElement("div",{className:"flex items-center space-x-2"},n&&Ee.default.createElement("button",{onClick:n,className:"p2 hover:bg-muted border-none hover:border-none","aria-label":"Close"},Ee.default.createElement(vi,{size:20})),_?Ee.default.createElement(Wo,{value:T,onChange:Z=>A(Z.target.value),onBlur:J,onKeyPress:Z=>Z.key==="Enter"&&J(),className:"text-lg font-medium w-40"}):Ee.default.createElement(w1,{className:"text-lg font-medium"},e),Ee.default.createElement("button",{onClick:_?J:H,className:"p-1 hover:bg-muted rounded-full","aria-label":_?"Save name":"Edit name"},Ee.default.createElement(hs,{size:16})),Ee.default.createElement("div",{className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center",title:`Mode: ${t.color_mode}`},Ee.default.createElement(z9,{state:t}))),Ee.default.createElement("div",{className:"flex items-center space-x-2"},Ee.default.createElement($d,{checked:t.state==="ON",onCheckedChange:y,"aria-label":"Toggle light"}))),Ee.default.createElement(x1,{className:"flex flex-col flex-grow"},t.state==="ON"?Ee.default.createElement("div",{className:"flex flex-col items-center justify-center space-y-4 h-full"},I.color&&Ee.default.createElement("div",{className:"w-full"},Ee.default.createElement("div",{className:"flex items-center"},Ee.default.createElement("label",{className:"text-sm font-medium ml-2"},"Color")),Ee.default.createElement("div",{className:"mt-2 flex justify-center"},Ee.default.createElement(jM,{width:150,height:150,color:w,onChange:b}))),I.brightness&&Ee.default.createElement("div",{className:"w-full"},Ee.default.createElement("label",{className:"text-sm font-medium"},"Brightness"),Ee.default.createElement(P5,{value:[t.level||0],max:100,step:1,className:"mt-2",onValueChange:x})),I.colorTemp&&Ee.default.createElement("div",{className:"w-full"},Ee.default.createElement("label",{className:"text-sm font-medium"},"Color Temperature"),Ee.default.createElement(P5,{value:[t.kelvin||0],max:100,step:1,className:"mt-2 py-2",onValueChange:v,gradient:"linear-gradient(to right, lightblue, white, orange)"})),Ee.default.createElement("div",{className:"flex flex-col mt-4 w-full"},Ee.default.createElement("div",{className:"text-sm font-medium"},"Mode"),Ee.default.createElement(ga,{type:"single",value:t.color_mode,onValueChange:C,"aria-label":"Select light mode",className:"justify-normal"},I.colorTemp&&Ee.default.createElement(jo,{value:At.ColorMode.Values.color_temp},Ee.default.createElement(vs,{size:16,className:"mr-2"}),"White"),I.color&&Ee.default.createElement(jo,{value:At.ColorMode.Values.rgb},Ee.default.createElement(xd,{size:16,className:"mr-2"}),"Color"),Ee.default.createElement(jo,{value:At.ColorMode.Values.onoff},Ee.default.createElement(ms,{size:16,className:"mr-2"}),"Night")))):Ee.default.createElement("div",{className:"flex flex-col items-center justify-center flex-grow"},Ee.default.createElement("p",{className:"text-muted-foreground"},"Light is off")),Ee.default.createElement("div",{className:"flex-grow"}),Ee.default.createElement("div",{className:"flex justify-end space-x-4 mt-4"},Ee.default.createElement(Zt,{size:"sm",onClick:()=>g(At.GroupStateCommand.Values.pair)},"Pair"),Ee.default.createElement(Zt,{variant:"destructive",size:"sm",onClick:()=>g(At.GroupStateCommand.Values.unpair)},"Unpair"))))}var XM=N(U());function $o({className:e,...t}){return XM.default.createElement("div",{className:ee("animate-pulse rounded-md bg-muted",e),...t})}var V5=N(U()),Mq=1,Aq=1e6;var jm=0;function Tq(){return jm=(jm+1)%Number.MAX_SAFE_INTEGER,jm.toString()}var Um=new Map,qM=e=>{if(Um.has(e))return;let t=setTimeout(()=>{Um.delete(e),v0({type:"REMOVE_TOAST",toastId:e})},Aq);Um.set(e,t)},Pq=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Mq)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?qM(r):e.toasts.forEach(o=>{qM(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},O5=[],H5={toasts:[]};function v0(e){H5=Pq(H5,e),O5.forEach(t=>{t(H5)})}function kq({...e}){let t=Tq(),r=n=>v0({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>v0({type:"DISMISS_TOAST",toastId:t});return v0({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function va(){let[e,t]=V5.useState(H5);return V5.useEffect(()=>(O5.push(t),()=>{let r=O5.indexOf(t);r>-1&&O5.splice(r,1)}),[e]),{...e,toast:kq,dismiss:r=>v0({type:"DISMISS_TOAST",toastId:r})}}var $a=N(U()),dA=N(cA()),fA=(0,$a.createContext)(null),pA=({children:e})=>{let{lastJsonMessage:t,sendJsonMessage:r}=(0,dA.default)(`ws://${window.location.hostname}:81`,{share:!0,shouldReconnect:()=>!1}),[o,n]=(0,$a.useState)([]);return(0,$a.useEffect)(()=>{t!==null&&n(a=>[...a,t])},[t]),$a.default.createElement(fA.Provider,{value:{lastMessage:o[o.length-1],allMessages:o}},e)},q5=()=>{let e=(0,$a.useContext)(fA);if(!e)throw new Error("useWebSocketContext must be used within a WebSocketProvider");return e};var Xa=N(U());function Km(e,t){return e.device_id===t.device_id&&e.device_type===t.device_type&&e.group_id===t.group_id}function mA(e,t){switch(t.type){case"UPDATE_STATE":return{...e,lights:e.lights.map(o=>Km(o.device,t.device)?{...o,state:{...o.state,...t.payload}}:o)};case"SET_LIGHTS":return{...e,lights:t.lights,isLoading:!1};case"DELETE_LIGHT":return{...e,lights:e.lights.filter(o=>!Km(o.device,t.device))};case"ADD_LIGHT":console.log(t.device);let r={id:t.device.id,device_id:t.device.device_id,device_type:t.device.device_type,group_id:t.device.group_id,alias:t.device.alias};return{...e,lights:[...e.lights,{device:r,state:{state:"OFF"}}]};case"UPDATE_LIGHT_NAME":return{...e,lights:e.lights.map(o=>Km(o.device,t.device)?{...o,device:{...o.device,alias:t.name}}:o)};default:return e}}var hA=(0,Xa.createContext)(null),gA=({children:e})=>{let[t,r]=(0,Xa.useReducer)(mA,{lights:[],isLoading:!0});return(0,Xa.useEffect)(()=>{(async()=>{let n=await Hn.getGateways();r({type:"SET_LIGHTS",lights:n})})()},[]),Xa.default.createElement(hA.Provider,{value:{lightStates:t,dispatch:r}},e)},vA=()=>{let e=(0,Xa.useContext)(hA);if(!e)throw new Error("useLightState must be used within a LightProvider");return e};function CA(){let{lightStates:e,dispatch:t}=vA(),{lastMessage:r}=q5(),[o,n]=(0,Ge.useState)(!1),[a,s]=(0,Ge.useState)(!1),[u,c]=(0,Ge.useState)(null),[d,p]=(0,Ge.useState)(null),[m,g]=(0,Ge.useState)(!1),y=va();(0,Ge.useEffect)(()=>{r&&r.t=="packet"&&t({type:"UPDATE_STATE",device:{device_id:r.d.di,group_id:r.d.gi,device_type:r.d.rt},payload:r.s})},[r]);let x=(T,A)=>{t({type:"UPDATE_STATE",device:T.device,payload:A})},v=(T,A)=>{let H={state:A?"ON":"OFF"};x(T,H),Js.putGatewaysDeviceIdRemoteTypeGroupId(H,{params:{remoteType:T.device.device_type,deviceId:T.device.device_id,groupId:T.device.group_id},queries:{fmt:"normalized"}})},b=async T=>{try{let A=await Js.postAliases(T);t({type:"ADD_LIGHT",device:{...T,id:A.id}}),g(!1)}catch{y.toast({title:"Error adding light",description:"Please try again",variant:"destructive"})}},w=T=>{c(T),s(!0)},C=async()=>{u&&(await Js.deleteAliasesId(void 0,{params:{id:u.device.id}}),t({type:"DELETE_LIGHT",device:u.device}),c(null)),s(!1)},I=()=>{c(null),s(!1)},_=T=>{p(T.device.id)},M=(T,A)=>{Js.putAliasesId({alias:A},{params:{id:T.device.id}}),t({type:"UPDATE_LIGHT_NAME",device:T.device,name:A})};return Ge.default.createElement("div",{className:"flex items-center justify-center mt-10"},Ge.default.createElement(jd,{className:"w-96"},Ge.default.createElement(C1,null,Ge.default.createElement(w1,{className:"text-lg font-medium"},"Lights")),Ge.default.createElement(x1,null,e.isLoading?Ge.default.createElement("div",{className:"flex justify-center items-center h-24"},Ge.default.createElement("div",{className:"space-y-4"},Ge.default.createElement($o,{className:"h-4 w-[250px]"}),Ge.default.createElement($o,{className:"ml-2 h-4 w-[250px]"}),Ge.default.createElement($o,{className:"h-4 w-[250px]"}))):e.lights.map((T,A)=>Ge.default.createElement("div",{key:A,className:"flex items-center justify-between py-2 cursor-pointer",onClick:()=>_(T)},Ge.default.createElement("div",{className:"flex items-center"},o&&Ge.default.createElement("button",{className:ee("text-red-500 hover:text-red-700 mr-2","transition-transform duration-300 ease-in-out","transform scale-100"),onClick:H=>{H.stopPropagation(),w(T)},"aria-label":`Delete ${T.device.alias}`},Ge.default.createElement(Ld,{size:16})),Ge.default.createElement("div",{className:"mr-2"},Ge.default.createElement(z9,{state:T.state})),Ge.default.createElement("span",null,T.device.alias)),Ge.default.createElement($d,{checked:T.state.state==="ON",onClick:H=>{H.stopPropagation()},onCheckedChange:H=>{v(T,H)},"aria-label":`Toggle ${T.device.alias}`}))),Ge.default.createElement("div",{className:"flex justify-end mt-4"},Ge.default.createElement("button",{className:ee("text-gray-500 hover:text-gray-700 mr-2","transition-all duration-300 ease-in-out",{"rotate-180":o}),onClick:()=>n(!o),"aria-label":"Toggle delete mode"},Ge.default.createElement(hs,{size:16})),Ge.default.createElement(Kd,{open:m,onOpenChange:g},Ge.default.createElement(uS,{asChild:!0},Ge.default.createElement("button",{className:"text-gray-500 hover:text-gray-700","aria-label":"Add new light",onClick:()=>g(!0)},Ge.default.createElement(gs,{size:24}))),Ge.default.createElement(Lu,{className:"w-1/2 min-w-96 max-w-2xl"},Ge.default.createElement(e0,null,Ge.default.createElement(t0,{className:"mb-4"},"Add new light")),Ge.default.createElement(pM,{onSubmit:b})))))),a&&Ge.default.createElement(gS,{open:a,setOpen:s,onConfirm:C,onCancel:I,title:"Confirm Deletion",description:`Are you sure you want to delete ${u?.device.alias}?`}),d&&Ge.default.createElement(Kd,{open:!!d,onOpenChange:()=>p(null)},Ge.default.createElement(Lu,{className:"p-0 border-none bg-transparent",closeButton:!1},(()=>{let T=e.lights.find(A=>A.device.id===d);return T&&Ge.default.createElement($M,{name:T.device.alias,state:T.state,id:T.device,updateState:A=>{x(T,A)},onClose:()=>p(null),onNameChange:A=>{M(T,A)}})})())))}function wA(){return eh.default.createElement("div",{className:"flex flex-col items-center justify-center"},eh.default.createElement(CA,null))}var x0=N(U());function xA(){return x0.default.createElement("div",{className:"flex flex-col items-center justify-center h-full bg-background text-foreground"},x0.default.createElement("h1",{className:"text-6xl font-bold mb-4"},"404"),x0.default.createElement("p",{className:"text-xl mb-8"},"Page Not Found"),x0.default.createElement("a",{href:"#/dashboard",className:"text-primary hover:underline"},"Go back to Dashboard"))}var Nr=N(U());var Xo=N(U());function yA({className:e,items:t,children:r,...o}){let[n,a]=Xo.useState(t[0]?.id||""),s=Xo.Children.toArray(r),u=s.filter(Xo.isValidElement).map(c=>c.props.navId);return Xo.useEffect(()=>{t.forEach(c=>{u.includes(c.id)||console.warn(`Item id "${c.id}" does not match any child's navId`)})},[t,u]),Xo.createElement("div",{className:"container flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0"},Xo.createElement("nav",{className:"flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1 mb-4 -mx-4 xl:w-1/5"},t.map(c=>Xo.createElement(Zt,{key:c.id,variant:"ghost",className:ee(n===c.id?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),onClick:()=>a(c.id)},c.title))),Xo.createElement("div",{className:"mt-4 w-full"},s.find(c=>Xo.isValidElement(c)&&c.props.navId===n)))}var D0=N(U());var Yt=N(U());var De=N(U());var y0=e=>e instanceof k.ZodOptional||e instanceof k.ZodNullable?y0(e.unwrap()):e instanceof k.ZodDefault?y0(e.removeDefault()):e instanceof k.ZodUnion?y0(e.options[0]):e,GY=({field:e,fieldType:t})=>{let r=oo(),o=At.Settings.shape[e],n=y0(o);if(n instanceof k.ZodString||n instanceof k.ZodNumber){let a=t||"text";return t?a=t:n instanceof k.ZodString?a="text":n instanceof k.ZodNumber&&(a="number"),De.createElement(I1,{control:r.control,name:e,render:({field:s})=>De.createElement(Wo,{type:a,...s,value:s.value,onChange:u=>a==="number"?s.onChange(Number.isNaN(u.target.valueAsNumber)?u.target.value:u.target.valueAsNumber):s.onChange(u.target.value)})})}else{if(n instanceof k.ZodEnum)return n.options.length<=4?De.createElement(I1,{control:r.control,name:e,render:({field:s})=>De.createElement(ga,{type:"single",variant:"outline",onValueChange:u=>{s.onChange(u)},onBlur:()=>{},value:s.value},n.options.map(u=>De.createElement(jo,{key:u,value:u},u)))}):De.createElement(I1,{control:r.control,name:e,render:({field:s})=>De.createElement(I5,{onValueChange:u=>{s.onChange(u),s.onBlur()},value:s.value},De.createElement(Go,null,De.createElement(m0,null,De.createElement(S5,{placeholder:"Select an option"}))),De.createElement(h0,null,n.options.map(u=>De.createElement(g0,{key:u,value:u,className:"group"},De.createElement("div",{className:"flex flex-col items-start max-w-72"},De.createElement("div",{className:"font-medium"},u))))))});if(n instanceof k.ZodBoolean)return De.createElement(I1,{control:r.control,name:e,render:({field:a})=>De.createElement(ga,{type:"single",variant:"outline",onValueChange:s=>{a.onChange(s==="true"),a.onBlur()},value:a.value?"true":"false"},De.createElement(jo,{value:"true"},"Enabled"),De.createElement(jo,{value:"false"},"Disabled"))});if(n instanceof k.ZodArray){let a=y0(n.element);if(a instanceof k.ZodEnum)return De.createElement(I1,{control:r.control,name:e,render:({field:s})=>De.createElement(ga,{type:"multiple",variant:"outline",onValueChange:u=>{s.onChange(u),s.onBlur()},value:s.value},a.options.map(u=>De.createElement(jo,{key:u,value:u},u)))})}else return De.createElement(De.Fragment,null)}},WY=({field:e,nameOverride:t,children:r,className:o})=>{let n=oo(),a=At.Settings.shape[e],s=n.getFieldState(e);return De.createElement(fn,{key:e,control:n.control,name:e,render:({field:u})=>De.createElement(pn,{className:o},De.createElement(mn,{className:"flex items-center h-8"},De.createElement("span",null,t||e.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase())),s.isDirty&&De.createElement("span",{className:"text-lg text-muted-foreground ml-1"},"*")),De.createElement(Go,null,r),De.createElement(Zs,null,a.description),De.createElement(S1,null))})},zY=({fields:e,fieldNames:t,fieldTypes:r})=>{let o=oo();return De.createElement("div",{className:"space-y-4"},e.map(n=>De.createElement(fn,{key:n,control:o.control,name:n,render:({field:a})=>De.createElement(WY,{field:n,nameOverride:t?.[n]},De.createElement(GY,{field:n,fieldType:r?.[n]}))})))},Vt=({title:e,description:t,fields:r,fieldNames:o,fieldTypes:n,children:a})=>De.createElement("div",null,e&&De.createElement("h2",{className:"text-2xl font-bold"},e),t&&De.createElement("p",{className:"text-sm text-gray-500"},t),e&&De.createElement("hr",{className:"my-4"}),De.createElement(zY,{fields:r,fieldNames:o,fieldTypes:n}),a),xo=({children:e})=>De.createElement("div",{className:"flex flex-col space-y-10 max-w-xl"},e);var E3=N(U());var no=N(U());function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function bA(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(ba(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y5(e){var t=bA(e,"string");return ba(t)=="symbol"?t:t+""}function el(e,t,r){return(t=Y5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Re(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,o=Array(t);r0?hr(Xu,--bo):0,Uu--,yr===10&&(Uu=1,o3--),yr}function Lo(){return yr=bo2||$u(yr)>3?"":" "}function XA(e,t){for(;--t&&Lo()&&!(yr<48||yr>102||yr>57&&yr<65||yr>70&&yr<97););return Yu(e,_0()+(t<6&&jn()==32&&Lo()==32))}function nh(e){for(;Lo();)switch(yr){case e:return bo;case 34:case 39:e!==34&&e!==39&&nh(yr);break;case 40:e===41&&nh(e);break;case 92:Lo();break}return bo}function qA(e,t){for(;Lo()&&e+yr!==57;)if(e+yr===84&&jn()===47)break;return"/*"+Yu(t,bo-1)+"*"+tl(e===47?e:Lo())}function YA(e){for(;!$u(jn());)Lo();return Yu(e,bo)}function KA(e){return a3(i3("",null,null,null,[""],e=n3(e),0,[0],e))}function i3(e,t,r,o,n,a,s,u,c){for(var d=0,p=0,m=s,g=0,y=0,x=0,v=1,b=1,w=1,C=0,I="",_=n,M=a,T=o,A=I;b;)switch(x=C,C=Lo()){case 40:if(x!=108&&hr(A,m-1)==58){S0(A+=st(Ju(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:A+=Ju(C);break;case 9:case 10:case 13:case 32:A+=$A(x);break;case 92:A+=XA(_0()-1,7);continue;case 47:switch(jn()){case 42:case 47:ju(qY(qA(Lo(),_0()),t,r),c);break;default:A+="/"}break;case 123*v:u[d++]=yo(A)*w;case 125*v:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+p:w==-1&&(A=st(A,/\f/g,"")),y>0&&yo(A)-m&&ju(y>32?QA(A+";",o,r,m-1):QA(st(A," ","")+";",o,r,m-2),c);break;case 59:A+=";";default:if(ju(T=JA(A,t,r,d,p,n,u,I,_=[],M=[],m),a),C===123)if(p===0)i3(A,t,T,T,_,a,m,u,M);else switch(g===99&&hr(A,3)===110?100:g){case 100:case 108:case 109:case 115:i3(e,T,T,o&&ju(JA(e,T,T,0,0,n,u,I,n,_=[],m),M),n,M,m,u,o?_:M);break;default:i3(A,T,T,T,[""],M,0,u,M)}}d=p=y=0,v=w=1,I=A="",m=s;break;case 58:m=1+yo(A),y=x;default:if(v<1){if(C==123)--v;else if(C==125&&v++==0&&UA()==125)continue}switch(A+=tl(C),C*v){case 38:w=p>0?1:(A+="\f",-1);break;case 44:u[d++]=(yo(A)-1)*w,w=1;break;case 64:jn()===45&&(A+=Ju(Lo())),g=jn(),p=m=yo(I=A+=YA(_0())),C++;break;case 45:x===45&&yo(A)==2&&(v=0)}}return a}function JA(e,t,r,o,n,a,s,u,c,d,p){for(var m=n-1,g=n===0?a:[""],y=zu(g),x=0,v=0,b=0;x0?g[w]+" "+C:st(C,/&\f/g,g[w])))&&(c[b++]=I);return R0(e,t,r,n===0?Gu:u,c,d,p)}function qY(e,t,r){return R0(e,t,r,e3,tl(jA()),D1(e,2,-2),0)}function QA(e,t,r,o){return R0(e,t,r,Wu,D1(e,0,o),D1(e,o+1,-1),o)}function rl(e,t){for(var r="",o=zu(e),n=0;n6)switch(hr(e,t+1)){case 109:if(hr(e,t+4)!==45)break;case 102:return st(e,/(.+:)(.+)-([^]+)/,"$1"+dt+"$2-$3$1"+I0+(hr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~S0(e,"stretch")?aT(st(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(hr(e,t+1)!==115)break;case 6444:switch(hr(e,yo(e)-3-(~S0(e,"!important")&&10))){case 107:return st(e,":",":"+dt)+e;case 101:return st(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dt+(hr(e,14)===45?"inline-":"")+"box$3$1"+dt+"$2$3$1"+Ur+"$2box$3")+e}break;case 5936:switch(hr(e,t+11)){case 114:return dt+e+Ur+st(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dt+e+Ur+st(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dt+e+Ur+st(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dt+e+Ur+e+e}return e}var tJ=function(t,r,o,n){if(t.length>-1&&!t.return)switch(t.type){case Wu:t.return=aT(t.value,t.length);break;case t3:return rl([qu(t,{value:st(t.value,"@","@"+dt)})],n);case Gu:if(t.length)return oh(t.props,function(a){switch(rh(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rl([qu(t,{props:[st(a,/:(read-\w+)/,":"+I0+"$1")]})],n);case"::placeholder":return rl([qu(t,{props:[st(a,/:(plac\w+)/,":"+dt+"input-$1")]}),qu(t,{props:[st(a,/:(plac\w+)/,":"+I0+"$1")]}),qu(t,{props:[st(a,/:(plac\w+)/,Ur+"input-$1")]})],n)}return""})}},rJ=[tJ],ah=function(t){var r=t.key;if(r==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var n=t.stylisPlugins||rJ,a={},s,u=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),w=1;w=4;++o,n-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var CT={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var gJ=!1,vJ=/[A-Z]|^ms/g,CJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bT=function(t){return t.charCodeAt(1)===45},wT=function(t){return t!=null&&typeof t!="boolean"},ph=oT(function(e){return bT(e)?e:e.replace(vJ,"-$&").toLowerCase()}),xT=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(CJ,function(o,n,a){return qa={name:n,styles:a,next:qa},n})}return CT[t]!==1&&!bT(t)&&typeof r=="number"&&r!==0?r+"px":r},wJ="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function M0(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return qa={name:n.name,styles:n.styles,next:qa},n.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)qa={name:s.name,styles:s.styles,next:qa},s=s.next;var u=a.styles+";";return u}return xJ(e,t,r)}case"function":{if(e!==void 0){var c=qa,d=r(e);return qa=c,M0(e,t,d)}break}}var p=r;if(t==null)return p;var m=t[p];return m!==void 0?m:p}function xJ(e,t,r){var o="";if(Array.isArray(r))for(var n=0;n2?r-2:0),n=2;n-1}function MJ(e){return P0(e)?window.innerHeight:e.clientHeight}function VT(e){return P0(e)?window.pageYOffset:e.scrollTop}function S3(e,t){if(P0(e)){window.scrollTo(0,t);return}e.scrollTop=t}function AJ(e){var t=getComputedStyle(e),r=t.position==="absolute",o=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var n=e;n=n.parentElement;)if(t=getComputedStyle(n),!(r&&t.position==="static")&&o.test(t.overflow+t.overflowY+t.overflowX))return n;return document.documentElement}function TJ(e,t,r,o){return r*((e=e/o-1)*e*e+1)+t}function L3(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T0,n=VT(e),a=t-n,s=10,u=0;function c(){u+=s;var d=TJ(u,n,a,r);S3(e,d),ur.bottom?S3(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+n,e.scrollHeight)):o.top-n1?r-1:0),n=1;n=x)return{placement:"bottom",maxHeight:t};if(J>=x&&!s)return a&&L3(c,Z,W),{placement:"bottom",maxHeight:t};if(!s&&J>=o||s&&A>=o){a&&L3(c,Z,W);var ie=s?A-_:J-_;return{placement:"bottom",maxHeight:ie}}if(n==="auto"||s){var q=t,ae=s?T:H;return ae>=o&&(q=Math.min(ae-_-u,t)),{placement:"top",maxHeight:q}}if(n==="bottom")return a&&S3(c,Z),{placement:"bottom",maxHeight:t};break;case"top":if(T>=x)return{placement:"top",maxHeight:t};if(H>=x&&!s)return a&&L3(c,Q,W),{placement:"top",maxHeight:t};if(!s&&H>=o||s&&T>=o){var Y=t;return(!s&&H>=o||s&&T>=o)&&(Y=s?T-M:H-M),a&&L3(c,Q,W),{placement:"top",maxHeight:Y}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return d}function FJ(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var GT=function(t){return t==="auto"?"bottom":t},WT=function(t,r){var o,n=t.placement,a=t.theme,s=a.borderRadius,u=a.spacing,c=a.colors;return Re((o={label:"menu"},el(o,FJ(n),"100%"),el(o,"position","absolute"),el(o,"width","100%"),el(o,"zIndex",1),o),r?{}:{backgroundColor:c.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:u.menuGutter,marginTop:u.menuGutter})},zT=(0,Tr.createContext)(null),jT=function(t){var r=t.children,o=t.minMenuHeight,n=t.maxMenuHeight,a=t.menuPlacement,s=t.menuPosition,u=t.menuShouldScrollIntoView,c=t.theme,d=(0,Tr.useContext)(zT)||{},p=d.setPortalPlacement,m=(0,Tr.useRef)(null),g=(0,Tr.useState)(n),y=La(g,2),x=y[0],v=y[1],b=(0,Tr.useState)(null),w=La(b,2),C=w[0],I=w[1],_=c.spacing.controlHeight;return b3(function(){var M=m.current;if(M){var T=s==="fixed",A=u&&!T,H=VJ({maxHeight:n,menuEl:M,minHeight:o,placement:a,shouldScroll:A,isFixedPosition:T,controlHeight:_});v(H.maxHeight),I(H.placement),p?.(H.placement)}},[n,a,s,u,o,p,_]),r({ref:m,placerProps:Re(Re({},t),{},{placement:C||GT(a),maxHeight:x})})},DJ=function(t){var r=t.children,o=t.innerRef,n=t.innerProps;return _e("div",Ce({},cr(t,"menu",{menu:!0}),{ref:o},n),r)},BJ=DJ,UT=function(t,r){var o=t.maxHeight,n=t.theme.spacing.baseUnit;return Re({maxHeight:o,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:n,paddingTop:n})},NJ=function(t){var r=t.children,o=t.innerProps,n=t.innerRef,a=t.isMulti;return _e("div",Ce({},cr(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:n},o),r)},$T=function(t,r){var o=t.theme,n=o.spacing.baseUnit,a=o.colors;return Re({textAlign:"center"},r?{}:{color:a.neutral40,padding:"".concat(n*2,"px ").concat(n*3,"px")})},XT=$T,qT=$T,ZJ=function(t){var r=t.children,o=r===void 0?"No options":r,n=t.innerProps,a=zn(t,OJ);return _e("div",Ce({},cr(Re(Re({},a),{},{children:o,innerProps:n}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),o)},GJ=function(t){var r=t.children,o=r===void 0?"Loading...":r,n=t.innerProps,a=zn(t,HJ);return _e("div",Ce({},cr(Re(Re({},a),{},{children:o,innerProps:n}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),o)},YT=function(t){var r=t.rect,o=t.offset,n=t.position;return{left:r.left,position:n,top:o,width:r.width,zIndex:1}},WJ=function(t){var r=t.appendTo,o=t.children,n=t.controlElement,a=t.innerProps,s=t.menuPlacement,u=t.menuPosition,c=(0,Tr.useRef)(null),d=(0,Tr.useRef)(null),p=(0,Tr.useState)(GT(s)),m=La(p,2),g=m[0],y=m[1],x=(0,Tr.useMemo)(function(){return{setPortalPlacement:y}},[]),v=(0,Tr.useState)(null),b=La(v,2),w=b[0],C=b[1],I=(0,Tr.useCallback)(function(){if(n){var A=PJ(n),H=u==="fixed"?0:window.pageYOffset,J=A[g]+H;(J!==w?.offset||A.left!==w?.rect.left||A.width!==w?.rect.width)&&C({offset:J,rect:A})}},[n,u,g,w?.offset,w?.rect.left,w?.rect.width]);b3(function(){I()},[I]);var _=(0,Tr.useCallback)(function(){typeof d.current=="function"&&(d.current(),d.current=null),n&&c.current&&(d.current=d0(n,c.current,I,{elementResize:"ResizeObserver"in window}))},[n,I]);b3(function(){_()},[_]);var M=(0,Tr.useCallback)(function(A){c.current=A,_()},[_]);if(!r&&u!=="fixed"||!w)return null;var T=_e("div",Ce({ref:M},cr(Re(Re({},t),{},{offset:w.offset,position:u,rect:w.rect}),"menuPortal",{"menu-portal":!0}),a),o);return _e(zT.Provider,{value:x},r?(0,ET.createPortal)(T,r):T)},JT=function(t){var r=t.isDisabled,o=t.isRtl;return{label:"container",direction:o?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},zJ=function(t){var r=t.children,o=t.innerProps,n=t.isDisabled,a=t.isRtl;return _e("div",Ce({},cr(t,"container",{"--is-disabled":n,"--is-rtl":a}),o),r)},QT=function(t,r){var o=t.theme.spacing,n=t.isMulti,a=t.hasValue,s=t.selectProps.controlShouldRenderValue;return Re({alignItems:"center",display:n&&a&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(o.baseUnit/2,"px ").concat(o.baseUnit*2,"px")})},jJ=function(t){var r=t.children,o=t.innerProps,n=t.isMulti,a=t.hasValue;return _e("div",Ce({},cr(t,"valueContainer",{"value-container":!0,"value-container--is-multi":n,"value-container--has-value":a}),o),r)},KT=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},UJ=function(t){var r=t.children,o=t.innerProps;return _e("div",Ce({},cr(t,"indicatorsContainer",{indicators:!0}),o),r)},kT,$J=["size"],XJ=["innerProps","isRtl","size"];var qJ={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},eP=function(t){var r=t.size,o=zn(t,$J);return _e("svg",Ce({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:qJ},o))},xh=function(t){return _e(eP,Ce({size:20},t),_e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},tP=function(t){return _e(eP,Ce({size:20},t),_e("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},rP=function(t,r){var o=t.isFocused,n=t.theme,a=n.spacing.baseUnit,s=n.colors;return Re({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:o?s.neutral60:s.neutral20,padding:a*2,":hover":{color:o?s.neutral80:s.neutral40}})},oP=rP,YJ=function(t){var r=t.children,o=t.innerProps;return _e("div",Ce({},cr(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),o),r||_e(tP,null))},nP=rP,JJ=function(t){var r=t.children,o=t.innerProps;return _e("div",Ce({},cr(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),o),r||_e(xh,null))},aP=function(t,r){var o=t.isDisabled,n=t.theme,a=n.spacing.baseUnit,s=n.colors;return Re({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:o?s.neutral10:s.neutral20,marginBottom:a*2,marginTop:a*2})},QJ=function(t){var r=t.innerProps;return _e("span",Ce({},r,cr(t,"indicatorSeparator",{"indicator-separator":!0})))},KJ=AT(kT||(kT=TT([` + 0%, 80%, 100% { opacity: 0; } + 40% { opacity: 1; } +`]))),iP=function(t,r){var o=t.isFocused,n=t.size,a=t.theme,s=a.colors,u=a.spacing.baseUnit;return Re({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},r?{}:{color:o?s.neutral60:s.neutral20,padding:u*2})},gh=function(t){var r=t.delay,o=t.offset;return _e("span",{css:A0({animation:"".concat(KJ," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:o?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},eQ=function(t){var r=t.innerProps,o=t.isRtl,n=t.size,a=n===void 0?4:n,s=zn(t,XJ);return _e("div",Ce({},cr(Re(Re({},s),{},{innerProps:r,isRtl:o,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),_e(gh,{delay:0,offset:o}),_e(gh,{delay:160,offset:!0}),_e(gh,{delay:320,offset:!o}))},sP=function(t,r){var o=t.isDisabled,n=t.isFocused,a=t.theme,s=a.colors,u=a.borderRadius,c=a.spacing;return Re({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:o?s.neutral5:s.neutral0,borderColor:o?s.neutral10:n?s.primary:s.neutral20,borderRadius:u,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:n?s.primary:s.neutral30}})},tQ=function(t){var r=t.children,o=t.isDisabled,n=t.isFocused,a=t.innerRef,s=t.innerProps,u=t.menuIsOpen;return _e("div",Ce({ref:a},cr(t,"control",{control:!0,"control--is-disabled":o,"control--is-focused":n,"control--menu-is-open":u}),s,{"aria-disabled":o||void 0}),r)},rQ=tQ,oQ=["data"],lP=function(t,r){var o=t.theme.spacing;return r?{}:{paddingBottom:o.baseUnit*2,paddingTop:o.baseUnit*2}},nQ=function(t){var r=t.children,o=t.cx,n=t.getStyles,a=t.getClassNames,s=t.Heading,u=t.headingProps,c=t.innerProps,d=t.label,p=t.theme,m=t.selectProps;return _e("div",Ce({},cr(t,"group",{group:!0}),c),_e(s,Ce({},u,{selectProps:m,theme:p,getStyles:n,getClassNames:a,cx:o}),d),_e("div",null,r))},uP=function(t,r){var o=t.theme,n=o.colors,a=o.spacing;return Re({label:"group",cursor:"default",display:"block"},r?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},aQ=function(t){var r=HT(t);r.data;var o=zn(r,oQ);return _e("div",Ce({},cr(t,"groupHeading",{"group-heading":!0}),o))},iQ=nQ,sQ=["innerRef","isDisabled","isHidden","inputClassName"],cP=function(t,r){var o=t.isDisabled,n=t.value,a=t.theme,s=a.spacing,u=a.colors;return Re(Re({visibility:o?"hidden":"visible",transform:n?"translateZ(0)":""},lQ),r?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:u.neutral80})},dP={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},lQ={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Re({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},dP)},uQ=function(t){return Re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},dP)},cQ=function(t){var r=t.cx,o=t.value,n=HT(t),a=n.innerRef,s=n.isDisabled,u=n.isHidden,c=n.inputClassName,d=zn(n,sQ);return _e("div",Ce({},cr(t,"input",{"input-container":!0}),{"data-value":o||""}),_e("input",Ce({className:r({input:!0},c),ref:a,style:uQ(u),disabled:s},d)))},dQ=cQ,fP=function(t,r){var o=t.theme,n=o.spacing,a=o.borderRadius,s=o.colors;return Re({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:s.neutral10,borderRadius:a/2,margin:n.baseUnit/2})},pP=function(t,r){var o=t.theme,n=o.borderRadius,a=o.colors,s=t.cropWithEllipsis;return Re({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:n/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},mP=function(t,r){var o=t.theme,n=o.spacing,a=o.borderRadius,s=o.colors,u=t.isFocused;return Re({alignItems:"center",display:"flex"},r?{}:{borderRadius:a/2,backgroundColor:u?s.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},hP=function(t){var r=t.children,o=t.innerProps;return _e("div",o,r)},fQ=hP,pQ=hP;function mQ(e){var t=e.children,r=e.innerProps;return _e("div",Ce({role:"button"},r),t||_e(xh,{size:14}))}var hQ=function(t){var r=t.children,o=t.components,n=t.data,a=t.innerProps,s=t.isDisabled,u=t.removeProps,c=t.selectProps,d=o.Container,p=o.Label,m=o.Remove;return _e(d,{data:n,innerProps:Re(Re({},cr(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),a),selectProps:c},_e(p,{data:n,innerProps:Re({},cr(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},r),_e(m,{data:n,innerProps:Re(Re({},cr(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},u),selectProps:c}))},gQ=hQ,gP=function(t,r){var o=t.isDisabled,n=t.isFocused,a=t.isSelected,s=t.theme,u=s.spacing,c=s.colors;return Re({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:a?c.primary:n?c.primary25:"transparent",color:o?c.neutral20:a?c.neutral0:"inherit",padding:"".concat(u.baseUnit*2,"px ").concat(u.baseUnit*3,"px"),":active":{backgroundColor:o?void 0:a?c.primary:c.primary50}})},vQ=function(t){var r=t.children,o=t.isDisabled,n=t.isFocused,a=t.isSelected,s=t.innerRef,u=t.innerProps;return _e("div",Ce({},cr(t,"option",{option:!0,"option--is-disabled":o,"option--is-focused":n,"option--is-selected":a}),{ref:s,"aria-disabled":o},u),r)},CQ=vQ,vP=function(t,r){var o=t.theme,n=o.spacing,a=o.colors;return Re({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:a.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},wQ=function(t){var r=t.children,o=t.innerProps;return _e("div",Ce({},cr(t,"placeholder",{placeholder:!0}),o),r)},xQ=wQ,CP=function(t,r){var o=t.isDisabled,n=t.theme,a=n.spacing,s=n.colors;return Re({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:o?s.neutral40:s.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},yQ=function(t){var r=t.children,o=t.isDisabled,n=t.innerProps;return _e("div",Ce({},cr(t,"singleValue",{"single-value":!0,"single-value--is-disabled":o}),n),r)},bQ=yQ,ol={ClearIndicator:JJ,Control:rQ,DropdownIndicator:YJ,DownChevron:tP,CrossIcon:xh,Group:iQ,GroupHeading:aQ,IndicatorsContainer:UJ,IndicatorSeparator:QJ,Input:dQ,LoadingIndicator:eQ,Menu:BJ,MenuList:NJ,MenuPortal:WJ,LoadingMessage:GJ,NoOptionsMessage:ZJ,MultiValue:gQ,MultiValueContainer:fQ,MultiValueLabel:pQ,MultiValueRemove:mQ,Option:CQ,Placeholder:xQ,SelectContainer:zJ,SingleValue:bQ,ValueContainer:jJ},wP=function(t){return Re(Re({},ol),t.components)};var xP=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function LQ(e,t){return!!(e===t||xP(e)&&xP(t))}function IQ(e,t){if(e.length!==t.length)return!1;for(var r=0;r1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return s?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.");default:return""}},onFocus:function(t){var r=t.context,o=t.focused,n=t.options,a=t.label,s=a===void 0?"":a,u=t.selectValue,c=t.isDisabled,d=t.isSelected,p=t.isAppleDevice,m=function(v,b){return v&&v.length?"".concat(v.indexOf(b)+1," of ").concat(v.length):""};if(r==="value"&&u)return"value ".concat(s," focused, ").concat(m(u,o),".");if(r==="menu"&&p){var g=c?" disabled":"",y="".concat(d?" selected":"").concat(g);return"".concat(s).concat(y,", ").concat(m(n,o),".")}return""},onFilter:function(t){var r=t.inputValue,o=t.resultsMessage;return"".concat(o).concat(r?" for search term "+r:"",".")}},MQ=function(t){var r=t.ariaSelection,o=t.focusedOption,n=t.focusedValue,a=t.focusableOptions,s=t.isFocused,u=t.selectValue,c=t.selectProps,d=t.id,p=t.isAppleDevice,m=c.ariaLiveMessages,g=c.getOptionLabel,y=c.inputValue,x=c.isMulti,v=c.isOptionDisabled,b=c.isSearchable,w=c.menuIsOpen,C=c.options,I=c.screenReaderStatus,_=c.tabSelectsValue,M=c.isLoading,T=c["aria-label"],A=c["aria-live"],H=(0,mt.useMemo)(function(){return Re(Re({},_Q),m||{})},[m]),J=(0,mt.useMemo)(function(){var ae="";if(r&&H.onChange){var Y=r.option,me=r.options,se=r.removedValue,we=r.removedValues,Ke=r.value,xt=function(qe){return Array.isArray(qe)?null:qe},nt=se||Y||xt(Ke),lt=nt?g(nt):"",yt=me||we||void 0,br=yt?yt.map(g):[],bt=Re({isDisabled:nt&&v(nt,u),label:lt,labels:br},r);ae=H.onChange(bt)}return ae},[r,H,v,u,g]),Z=(0,mt.useMemo)(function(){var ae="",Y=o||n,me=!!(o&&u&&u.includes(o));if(Y&&H.onFocus){var se={focused:Y,label:g(Y),isDisabled:v(Y,u),isSelected:me,options:a,context:Y===o?"menu":"value",selectValue:u,isAppleDevice:p};ae=H.onFocus(se)}return ae},[o,n,g,v,H,a,u,p]),Q=(0,mt.useMemo)(function(){var ae="";if(w&&C.length&&!M&&H.onFilter){var Y=I({count:a.length});ae=H.onFilter({inputValue:y,resultsMessage:Y})}return ae},[a,y,w,H,C,I,M]),W=r?.action==="initial-input-focus",ie=(0,mt.useMemo)(function(){var ae="";if(H.guidance){var Y=n?"value":w?"menu":"input";ae=H.guidance({"aria-label":T,context:Y,isDisabled:o&&v(o,u),isMulti:x,isSearchable:b,tabSelectsValue:_,isInitialFocus:W})}return ae},[T,o,n,x,v,b,w,H,u,_,W]),q=_e(mt.Fragment,null,_e("span",{id:"aria-selection"},J),_e("span",{id:"aria-focused"},Z),_e("span",{id:"aria-results"},Q),_e("span",{id:"aria-guidance"},ie));return _e(mt.Fragment,null,_e(bP,{id:d},W&&q),_e(bP,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!W&&q))},AQ=MQ,Lh=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],TQ=new RegExp("["+Lh.map(function(e){return e.letters}).join("")+"]","g"),OP={};for(R3=0;R3-1}},OQ=["innerRef"];function HQ(e){var t=e.innerRef,r=zn(e,OQ),o=ZT(r,"onExited","in","enter","exit","appear");return _e("input",Ce({ref:t},o,{css:A0({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var VQ=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function FQ(e){var t=e.isEnabled,r=e.onBottomArrive,o=e.onBottomLeave,n=e.onTopArrive,a=e.onTopLeave,s=(0,mt.useRef)(!1),u=(0,mt.useRef)(!1),c=(0,mt.useRef)(0),d=(0,mt.useRef)(null),p=(0,mt.useCallback)(function(b,w){if(d.current!==null){var C=d.current,I=C.scrollTop,_=C.scrollHeight,M=C.clientHeight,T=d.current,A=w>0,H=_-M-I,J=!1;H>w&&s.current&&(o&&o(b),s.current=!1),A&&u.current&&(a&&a(b),u.current=!1),A&&w>H?(r&&!s.current&&r(b),T.scrollTop=_,J=!0,s.current=!0):!A&&-w>I&&(n&&!u.current&&n(b),T.scrollTop=0,J=!0,u.current=!0),J&&VQ(b)}},[r,o,n,a]),m=(0,mt.useCallback)(function(b){p(b,b.deltaY)},[p]),g=(0,mt.useCallback)(function(b){c.current=b.changedTouches[0].clientY},[]),y=(0,mt.useCallback)(function(b){var w=c.current-b.changedTouches[0].clientY;p(b,w)},[p]),x=(0,mt.useCallback)(function(b){if(b){var w=BT?{passive:!1}:!1;b.addEventListener("wheel",m,w),b.addEventListener("touchstart",g,w),b.addEventListener("touchmove",y,w)}},[y,g,m]),v=(0,mt.useCallback)(function(b){b&&(b.removeEventListener("wheel",m,!1),b.removeEventListener("touchstart",g,!1),b.removeEventListener("touchmove",y,!1))},[y,g,m]);return(0,mt.useEffect)(function(){if(t){var b=d.current;return x(b),function(){v(b)}}},[t,x,v]),function(b){d.current=b}}var IP=["boxSizing","height","overflow","paddingRight","position"],SP={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function RP(e){e.preventDefault()}function _P(e){e.stopPropagation()}function MP(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function AP(){return"ontouchstart"in window||navigator.maxTouchPoints}var TP=!!(typeof window<"u"&&window.document&&window.document.createElement),E0=0,Ku={capture:!1,passive:!1};function DQ(e){var t=e.isEnabled,r=e.accountForScrollbars,o=r===void 0?!0:r,n=(0,mt.useRef)({}),a=(0,mt.useRef)(null),s=(0,mt.useCallback)(function(c){if(TP){var d=document.body,p=d&&d.style;if(o&&IP.forEach(function(x){var v=p&&p[x];n.current[x]=v}),o&&E0<1){var m=parseInt(n.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,y=window.innerWidth-g+m||0;Object.keys(SP).forEach(function(x){var v=SP[x];p&&(p[x]=v)}),p&&(p.paddingRight="".concat(y,"px"))}d&&AP()&&(d.addEventListener("touchmove",RP,Ku),c&&(c.addEventListener("touchstart",MP,Ku),c.addEventListener("touchmove",_P,Ku))),E0+=1}},[o]),u=(0,mt.useCallback)(function(c){if(TP){var d=document.body,p=d&&d.style;E0=Math.max(E0-1,0),o&&E0<1&&IP.forEach(function(m){var g=n.current[m];p&&(p[m]=g)}),d&&AP()&&(d.removeEventListener("touchmove",RP,Ku),c&&(c.removeEventListener("touchstart",MP,Ku),c.removeEventListener("touchmove",_P,Ku)))}},[o]);return(0,mt.useEffect)(function(){if(t){var c=a.current;return s(c),function(){u(c)}}},[t,s,u]),function(c){a.current=c}}var BQ=function(t){var r=t.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},NQ={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function ZQ(e){var t=e.children,r=e.lockEnabled,o=e.captureEnabled,n=o===void 0?!0:o,a=e.onBottomArrive,s=e.onBottomLeave,u=e.onTopArrive,c=e.onTopLeave,d=FQ({isEnabled:n,onBottomArrive:a,onBottomLeave:s,onTopArrive:u,onTopLeave:c}),p=DQ({isEnabled:r}),m=function(y){d(y),p(y)};return _e(mt.Fragment,null,r&&_e("div",{onClick:BQ,css:NQ}),t(m))}var GQ={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},WQ=function(t){var r=t.name,o=t.onFocus;return _e("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:o,css:GQ,value:"",onChange:function(){}})},zQ=WQ;function Ih(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function jQ(){return Ih(/^iPhone/i)}function VP(){return Ih(/^Mac/i)}function UQ(){return Ih(/^iPad/i)||VP()&&navigator.maxTouchPoints>1}function $Q(){return jQ()||UQ()}function XQ(){return VP()||$Q()}var qQ=function(t){return t.label},YQ=function(t){return t.label},JQ=function(t){return t.value},QQ=function(t){return!!t.isDisabled},KQ={clearIndicator:nP,container:JT,control:sP,dropdownIndicator:oP,group:lP,groupHeading:uP,indicatorsContainer:KT,indicatorSeparator:aP,input:cP,loadingIndicator:iP,loadingMessage:qT,menu:WT,menuList:UT,menuPortal:YT,multiValue:fP,multiValueLabel:pP,multiValueRemove:mP,noOptionsMessage:XT,option:gP,placeholder:vP,singleValue:CP,valueContainer:QT};var eK={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},tK=4,FP=4,rK=38,oK=FP*2,nK={baseUnit:FP,controlHeight:rK,menuGutter:oK},yh={borderRadius:tK,colors:eK,spacing:nK},aK={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:wh(),captureMenuScroll:!wh(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:EQ(),formatGroupLabel:qQ,getOptionLabel:YQ,getOptionValue:JQ,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:QQ,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!FT(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var r=t.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function PP(e,t,r,o){var n=NP(e,t,r),a=ZP(e,t,r),s=BP(e,t),u=T3(e,t);return{type:"option",data:t,isDisabled:n,isSelected:a,label:s,value:u,index:o}}function A3(e,t){return e.options.map(function(r,o){if("options"in r){var n=r.options.map(function(s,u){return PP(e,s,t,u)}).filter(function(s){return EP(e,s)});return n.length>0?{type:"group",data:r,options:n,index:o}:void 0}var a=PP(e,r,t,o);return EP(e,a)?a:void 0}).filter(NT)}function DP(e){return e.reduce(function(t,r){return r.type==="group"?t.push.apply(t,K5(r.options.map(function(o){return o.data}))):t.push(r.data),t},[])}function kP(e,t){return e.reduce(function(r,o){return o.type==="group"?r.push.apply(r,K5(o.options.map(function(n){return{data:n.data,id:"".concat(t,"-").concat(o.index,"-").concat(n.index)}}))):r.push({data:o.data,id:"".concat(t,"-").concat(o.index)}),r},[])}function iK(e,t){return DP(A3(e,t))}function EP(e,t){var r=e.inputValue,o=r===void 0?"":r,n=t.data,a=t.isSelected,s=t.label,u=t.value;return(!WP(e)||!a)&&GP(e,{label:s,value:u,data:n},o)}function sK(e,t){var r=e.focusedValue,o=e.selectValue,n=o.indexOf(r);if(n>-1){var a=t.indexOf(r);if(a>-1)return r;if(n-1?r:t[0]}var bh=function(t,r){var o,n=(o=t.find(function(a){return a.data===r}))===null||o===void 0?void 0:o.id;return n||null},BP=function(t,r){return t.getOptionLabel(r)},T3=function(t,r){return t.getOptionValue(r)};function NP(e,t,r){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,r):!1}function ZP(e,t,r){if(r.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,r);var o=T3(e,t);return r.some(function(n){return T3(e,n)===o})}function GP(e,t,r){return e.filterOption?e.filterOption(t,r):!0}var WP=function(t){var r=t.hideSelectedOptions,o=t.isMulti;return r===void 0?o:r},uK=1,Sh=function(e){PA(r,e);var t=OA(r);function r(o){var n;if(MA(this,r),n=t.call(this,o),n.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},n.blockOptionHover=!1,n.isComposing=!1,n.commonProps=void 0,n.initialTouchX=0,n.initialTouchY=0,n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.isAppleDevice=XQ(),n.controlRef=null,n.getControlRef=function(c){n.controlRef=c},n.focusedOptionRef=null,n.getFocusedOptionRef=function(c){n.focusedOptionRef=c},n.menuListRef=null,n.getMenuListRef=function(c){n.menuListRef=c},n.inputRef=null,n.getInputRef=function(c){n.inputRef=c},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(c,d){var p=n.props,m=p.onChange,g=p.name;d.name=g,n.ariaOnChange(c,d),m(c,d)},n.setValue=function(c,d,p){var m=n.props,g=m.closeMenuOnSelect,y=m.isMulti,x=m.inputValue;n.onInputChange("",{action:"set-value",prevInputValue:x}),g&&(n.setState({inputIsHiddenAfterUpdate:!y}),n.onMenuClose()),n.setState({clearFocusValueOnUpdate:!0}),n.onChange(c,{action:d,option:p})},n.selectOption=function(c){var d=n.props,p=d.blurInputOnSelect,m=d.isMulti,g=d.name,y=n.state.selectValue,x=m&&n.isOptionSelected(c,y),v=n.isOptionDisabled(c,y);if(x){var b=n.getOptionValue(c);n.setValue(y.filter(function(w){return n.getOptionValue(w)!==b}),"deselect-option",c)}else if(!v)m?n.setValue([].concat(K5(y),[c]),"select-option",c):n.setValue(c,"select-option");else{n.ariaOnChange(c,{action:"select-option",option:c,name:g});return}p&&n.blurInput()},n.removeValue=function(c){var d=n.props.isMulti,p=n.state.selectValue,m=n.getOptionValue(c),g=p.filter(function(x){return n.getOptionValue(x)!==m}),y=k0(d,g,g[0]||null);n.onChange(y,{action:"remove-value",removedValue:c}),n.focusInput()},n.clearValue=function(){var c=n.state.selectValue;n.onChange(k0(n.props.isMulti,[],null),{action:"clear",removedValues:c})},n.popValue=function(){var c=n.props.isMulti,d=n.state.selectValue,p=d[d.length-1],m=d.slice(0,d.length-1),g=k0(c,m,m[0]||null);p&&n.onChange(g,{action:"pop-value",removedValue:p})},n.getFocusedOptionId=function(c){return bh(n.state.focusableOptionsWithIds,c)},n.getFocusableOptionsWithIds=function(){return kP(A3(n.props,n.state.selectValue),n.getElementId("option"))},n.getValue=function(){return n.state.selectValue},n.cx=function(){for(var c=arguments.length,d=new Array(c),p=0;py||g>y}},n.onTouchEnd=function(c){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(c.target)&&n.menuListRef&&!n.menuListRef.contains(c.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(c){n.userIsDragging||n.onControlMouseDown(c)},n.onClearIndicatorTouchEnd=function(c){n.userIsDragging||n.onClearIndicatorMouseDown(c)},n.onDropdownIndicatorTouchEnd=function(c){n.userIsDragging||n.onDropdownIndicatorMouseDown(c)},n.handleInputChange=function(c){var d=n.props.inputValue,p=c.currentTarget.value;n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange(p,{action:"input-change",prevInputValue:d}),n.props.menuIsOpen||n.onMenuOpen()},n.onInputFocus=function(c){n.props.onFocus&&n.props.onFocus(c),n.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(c){var d=n.props.inputValue;if(n.menuListRef&&n.menuListRef.contains(document.activeElement)){n.inputRef.focus();return}n.props.onBlur&&n.props.onBlur(c),n.onInputChange("",{action:"input-blur",prevInputValue:d}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1})},n.onOptionHover=function(c){if(!(n.blockOptionHover||n.state.focusedOption===c)){var d=n.getFocusableOptions(),p=d.indexOf(c);n.setState({focusedOption:c,focusedOptionId:p>-1?n.getFocusedOptionId(c):null})}},n.shouldHideSelectedOptions=function(){return WP(n.props)},n.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),n.focus()},n.onKeyDown=function(c){var d=n.props,p=d.isMulti,m=d.backspaceRemovesValue,g=d.escapeClearsValue,y=d.inputValue,x=d.isClearable,v=d.isDisabled,b=d.menuIsOpen,w=d.onKeyDown,C=d.tabSelectsValue,I=d.openMenuOnFocus,_=n.state,M=_.focusedOption,T=_.focusedValue,A=_.selectValue;if(!v&&!(typeof w=="function"&&(w(c),c.defaultPrevented))){switch(n.blockOptionHover=!0,c.key){case"ArrowLeft":if(!p||y)return;n.focusValue("previous");break;case"ArrowRight":if(!p||y)return;n.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(T)n.removeValue(T);else{if(!m)return;p?n.popValue():x&&n.clearValue()}break;case"Tab":if(n.isComposing||c.shiftKey||!b||!C||!M||I&&n.isOptionSelected(M,A))return;n.selectOption(M);break;case"Enter":if(c.keyCode===229)break;if(b){if(!M||n.isComposing)return;n.selectOption(M);break}return;case"Escape":b?(n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange("",{action:"menu-close",prevInputValue:y}),n.onMenuClose()):x&&g&&n.clearValue();break;case" ":if(y)return;if(!b){n.openMenu("first");break}if(!M)return;n.selectOption(M);break;case"ArrowUp":b?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":b?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!b)return;n.focusOption("pageup");break;case"PageDown":if(!b)return;n.focusOption("pagedown");break;case"Home":if(!b)return;n.focusOption("first");break;case"End":if(!b)return;n.focusOption("last");break;default:return}c.preventDefault()}},n.state.instancePrefix="react-select-"+(n.props.instanceId||++uK),n.state.selectValue=vh(o.value),o.menuIsOpen&&n.state.selectValue.length){var a=n.getFocusableOptionsWithIds(),s=n.buildFocusableOptions(),u=s.indexOf(n.state.selectValue[0]);n.state.focusableOptionsWithIds=a,n.state.focusedOption=s[u],n.state.focusedOptionId=bh(a,s[u])}return n}return TA(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ch(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(n){var a=this.props,s=a.isDisabled,u=a.menuIsOpen,c=this.state.isFocused;(c&&!s&&n.isDisabled||c&&u&&!n.menuIsOpen)&&this.focusInput(),c&&s&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!s&&n.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ch(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(n,a){this.props.onInputChange(n,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var a=this,s=this.state,u=s.selectValue,c=s.isFocused,d=this.buildFocusableOptions(),p=n==="first"?0:d.length-1;if(!this.props.isMulti){var m=d.indexOf(u[0]);m>-1&&(p=m)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:d[p],focusedOptionId:this.getFocusedOptionId(d[p])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(n){var a=this.state,s=a.selectValue,u=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=s.indexOf(u);u||(c=-1);var d=s.length-1,p=-1;if(s.length){switch(n){case"previous":c===0?p=0:c===-1?p=d:p=c-1;break;case"next":c>-1&&c0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,s=this.state.focusedOption,u=this.getFocusableOptions();if(u.length){var c=0,d=u.indexOf(s);s||(d=-1),n==="up"?c=d>0?d-1:u.length-1:n==="down"?c=(d+1)%u.length:n==="pageup"?(c=d-a,c<0&&(c=0)):n==="pagedown"?(c=d+a,c>u.length-1&&(c=u.length-1)):n==="last"&&(c=u.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:u[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(u[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(yh):Re(Re({},yh),this.props.theme):yh}},{key:"getCommonProps",value:function(){var n=this.clearValue,a=this.cx,s=this.getStyles,u=this.getClassNames,c=this.getValue,d=this.selectOption,p=this.setValue,m=this.props,g=m.isMulti,y=m.isRtl,x=m.options,v=this.hasValue();return{clearValue:n,cx:a,getStyles:s,getClassNames:u,getValue:c,hasValue:v,isMulti:g,isRtl:y,options:x,selectOption:d,selectProps:m,setValue:p,theme:this.getTheme()}}},{key:"hasValue",value:function(){var n=this.state.selectValue;return n.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,a=n.isClearable,s=n.isMulti;return a===void 0?s:a}},{key:"isOptionDisabled",value:function(n,a){return NP(this.props,n,a)}},{key:"isOptionSelected",value:function(n,a){return ZP(this.props,n,a)}},{key:"filterOption",value:function(n,a){return GP(this.props,n,a)}},{key:"formatOptionLabel",value:function(n,a){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,u=this.state.selectValue;return this.props.formatOptionLabel(n,{context:a,inputValue:s,selectValue:u})}else return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var n=this.props,a=n.isDisabled,s=n.isSearchable,u=n.inputId,c=n.inputValue,d=n.tabIndex,p=n.form,m=n.menuIsOpen,g=n.required,y=this.getComponents(),x=y.Input,v=this.state,b=v.inputIsHidden,w=v.ariaSelection,C=this.commonProps,I=u||this.getElementId("input"),_=Re(Re(Re({"aria-autocomplete":"list","aria-expanded":m,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},m&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?w?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?wt.createElement(x,Ce({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:I,innerRef:this.getInputRef,isDisabled:a,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:d,form:p,type:"text",value:c},_)):wt.createElement(HQ,Ce({id:I,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:T0,onFocus:this.onInputFocus,disabled:a,tabIndex:d,inputMode:"none",form:p,value:""},_))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,a=this.getComponents(),s=a.MultiValue,u=a.MultiValueContainer,c=a.MultiValueLabel,d=a.MultiValueRemove,p=a.SingleValue,m=a.Placeholder,g=this.commonProps,y=this.props,x=y.controlShouldRenderValue,v=y.isDisabled,b=y.isMulti,w=y.inputValue,C=y.placeholder,I=this.state,_=I.selectValue,M=I.focusedValue,T=I.isFocused;if(!this.hasValue()||!x)return w?null:wt.createElement(m,Ce({},g,{key:"placeholder",isDisabled:v,isFocused:T,innerProps:{id:this.getElementId("placeholder")}}),C);if(b)return _.map(function(H,J){var Z=H===M,Q="".concat(n.getOptionLabel(H),"-").concat(n.getOptionValue(H));return wt.createElement(s,Ce({},g,{components:{Container:u,Label:c,Remove:d},isFocused:Z,isDisabled:v,key:Q,index:J,removeProps:{onClick:function(){return n.removeValue(H)},onTouchEnd:function(){return n.removeValue(H)},onMouseDown:function(ie){ie.preventDefault()}},data:H}),n.formatOptionLabel(H,"value"))});if(w)return null;var A=_[0];return wt.createElement(p,Ce({},g,{data:A,isDisabled:v}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents(),a=n.ClearIndicator,s=this.commonProps,u=this.props,c=u.isDisabled,d=u.isLoading,p=this.state.isFocused;if(!this.isClearable()||!a||c||!this.hasValue()||d)return null;var m={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return wt.createElement(a,Ce({},s,{innerProps:m,isFocused:p}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents(),a=n.LoadingIndicator,s=this.commonProps,u=this.props,c=u.isDisabled,d=u.isLoading,p=this.state.isFocused;if(!a||!d)return null;var m={"aria-hidden":"true"};return wt.createElement(a,Ce({},s,{innerProps:m,isDisabled:c,isFocused:p}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),a=n.DropdownIndicator,s=n.IndicatorSeparator;if(!a||!s)return null;var u=this.commonProps,c=this.props.isDisabled,d=this.state.isFocused;return wt.createElement(s,Ce({},u,{isDisabled:c,isFocused:d}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents(),a=n.DropdownIndicator;if(!a)return null;var s=this.commonProps,u=this.props.isDisabled,c=this.state.isFocused,d={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return wt.createElement(a,Ce({},s,{innerProps:d,isDisabled:u,isFocused:c}))}},{key:"renderMenu",value:function(){var n=this,a=this.getComponents(),s=a.Group,u=a.GroupHeading,c=a.Menu,d=a.MenuList,p=a.MenuPortal,m=a.LoadingMessage,g=a.NoOptionsMessage,y=a.Option,x=this.commonProps,v=this.state.focusedOption,b=this.props,w=b.captureMenuScroll,C=b.inputValue,I=b.isLoading,_=b.loadingMessage,M=b.minMenuHeight,T=b.maxMenuHeight,A=b.menuIsOpen,H=b.menuPlacement,J=b.menuPosition,Z=b.menuPortalTarget,Q=b.menuShouldBlockScroll,W=b.menuShouldScrollIntoView,ie=b.noOptionsMessage,q=b.onMenuScrollToTop,ae=b.onMenuScrollToBottom;if(!A)return null;var Y=function(lt,yt){var br=lt.type,bt=lt.data,xe=lt.isDisabled,qe=lt.isSelected,_t=lt.label,at=lt.value,ut=v===bt,Ye=xe?void 0:function(){return n.onOptionHover(bt)},Jt=xe?void 0:function(){return n.selectOption(bt)},ao="".concat(n.getElementId("option"),"-").concat(yt),$r={id:ao,onClick:Jt,onMouseMove:Ye,onMouseOver:Ye,tabIndex:-1,role:"option","aria-selected":n.isAppleDevice?void 0:qe};return wt.createElement(y,Ce({},x,{innerProps:$r,data:bt,isDisabled:xe,isSelected:qe,key:ao,label:_t,type:br,value:at,isFocused:ut,innerRef:ut?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(lt.data,"menu"))},me;if(this.hasOptions())me=this.getCategorizedOptions().map(function(nt){if(nt.type==="group"){var lt=nt.data,yt=nt.options,br=nt.index,bt="".concat(n.getElementId("group"),"-").concat(br),xe="".concat(bt,"-heading");return wt.createElement(s,Ce({},x,{key:bt,data:lt,options:yt,Heading:u,headingProps:{id:xe,data:nt.data},label:n.formatGroupLabel(nt.data)}),nt.options.map(function(qe){return Y(qe,"".concat(br,"-").concat(qe.index))}))}else if(nt.type==="option")return Y(nt,"".concat(nt.index))});else if(I){var se=_({inputValue:C});if(se===null)return null;me=wt.createElement(m,x,se)}else{var we=ie({inputValue:C});if(we===null)return null;me=wt.createElement(g,x,we)}var Ke={minMenuHeight:M,maxMenuHeight:T,menuPlacement:H,menuPosition:J,menuShouldScrollIntoView:W},xt=wt.createElement(jT,Ce({},x,Ke),function(nt){var lt=nt.ref,yt=nt.placerProps,br=yt.placement,bt=yt.maxHeight;return wt.createElement(c,Ce({},x,Ke,{innerRef:lt,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:I,placement:br}),wt.createElement(ZQ,{captureEnabled:w,onTopArrive:q,onBottomArrive:ae,lockEnabled:Q},function(xe){return wt.createElement(d,Ce({},x,{innerRef:function(_t){n.getMenuListRef(_t),xe(_t)},innerProps:{role:"listbox","aria-multiselectable":x.isMulti,id:n.getElementId("listbox")},isLoading:I,maxHeight:bt,focusedOption:v}),me)}))});return Z||J==="fixed"?wt.createElement(p,Ce({},x,{appendTo:Z,controlElement:this.controlRef,menuPlacement:H,menuPosition:J}),xt):xt}},{key:"renderFormField",value:function(){var n=this,a=this.props,s=a.delimiter,u=a.isDisabled,c=a.isMulti,d=a.name,p=a.required,m=this.state.selectValue;if(p&&!this.hasValue()&&!u)return wt.createElement(zQ,{name:d,onFocus:this.onValueInputFocus});if(!(!d||u))if(c)if(s){var g=m.map(function(v){return n.getOptionValue(v)}).join(s);return wt.createElement("input",{name:d,type:"hidden",value:g})}else{var y=m.length>0?m.map(function(v,b){return wt.createElement("input",{key:"i-".concat(b),name:d,type:"hidden",value:n.getOptionValue(v)})}):wt.createElement("input",{name:d,type:"hidden",value:""});return wt.createElement("div",null,y)}else{var x=m[0]?this.getOptionValue(m[0]):"";return wt.createElement("input",{name:d,type:"hidden",value:x})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,a=this.state,s=a.ariaSelection,u=a.focusedOption,c=a.focusedValue,d=a.isFocused,p=a.selectValue,m=this.getFocusableOptions();return wt.createElement(AQ,Ce({},n,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:u,focusedValue:c,isFocused:d,selectValue:p,focusableOptions:m,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),a=n.Control,s=n.IndicatorsContainer,u=n.SelectContainer,c=n.ValueContainer,d=this.props,p=d.className,m=d.id,g=d.isDisabled,y=d.menuIsOpen,x=this.state.isFocused,v=this.commonProps=this.getCommonProps();return wt.createElement(u,Ce({},v,{className:p,innerProps:{id:m,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:x}),this.renderLiveRegion(),wt.createElement(a,Ce({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:x,menuIsOpen:y}),wt.createElement(c,Ce({},v,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),wt.createElement(s,Ce({},v,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,a){var s=a.prevProps,u=a.clearFocusValueOnUpdate,c=a.inputIsHiddenAfterUpdate,d=a.ariaSelection,p=a.isFocused,m=a.prevWasFocused,g=a.instancePrefix,y=n.options,x=n.value,v=n.menuIsOpen,b=n.inputValue,w=n.isMulti,C=vh(x),I={};if(s&&(x!==s.value||y!==s.options||v!==s.menuIsOpen||b!==s.inputValue)){var _=v?iK(n,C):[],M=v?kP(A3(n,C),"".concat(g,"-option")):[],T=u?sK(a,C):null,A=lK(a,_),H=bh(M,A);I={selectValue:C,focusedOption:A,focusedOptionId:H,focusableOptionsWithIds:M,focusedValue:T,clearFocusValueOnUpdate:!1}}var J=c!=null&&n!==s?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},Z=d,Q=p&&m;return p&&!Q&&(Z={value:k0(w,C,C[0]||null),options:C,action:"initial-input-focus"},Q=!m),d?.action==="initial-input-focus"&&(Z=null),Re(Re(Re({},I),J),{},{prevProps:n,ariaSelection:Z,prevWasFocused:Q})}}]),r}(mt.Component);Sh.defaultProps=aK;var Q2e=N(Oa());var cK=(0,Rh.forwardRef)(function(e,t){var r=_A(e);return zP.createElement(Sh,Ce({ref:t},r))}),jP=cK;var Ia=N(U());function _h(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,a;for(a=0;a=0)&&(r[n]=e[n]);return r}var dK=["color"],UP=(0,Ia.forwardRef)(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=_h(e,dK);return(0,Ia.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),(0,Ia.createElement)("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});var fK=["color"],$P=(0,Ia.forwardRef)(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=_h(e,fK);return(0,Ia.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),(0,Ia.createElement)("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});var pK=["color"],Mh=(0,Ia.forwardRef)(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=_h(e,pK);return(0,Ia.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),(0,Ia.createElement)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});var mK=(e,t)=>{let{value:r,onChange:o,options:n=[],styles:a=AK,classNames:s=MK,...u}=e,c=no.useId();return no.createElement(jP,{instanceId:c,ref:t,value:r,onChange:o,options:n,unstyled:!0,components:{DropdownIndicator:TK,ClearIndicator:PK,MultiValueRemove:kK,Option:EK,...e.components},styles:a,classNames:s,...u})},O0=no.forwardRef(mK),Ah={base:"flex !min-h-9 w-full rounded-md border border-input bg-transparent pl-3 py-1 pr-1 gap-1 text-sm shadow-sm transition-colors hover:cursor-pointer",focus:"outline-none ring-1 ring-ring",disabled:"cursor-not-allowed opacity-50"},hK="text-sm text-muted-foreground",gK="gap-1",vK="inline-flex items-center gap-2 rounded-md border border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 px-1.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",CK="gap-1",wK="p-1 rounded-md",xK="bg-border",yK="p-1 rounded-md",bK="p-1 mt-1 border bg-popover shadow-md rounded-md text-popover-foreground",LK="py-2 px-1 text-secondary-foreground text-sm font-semibold",P3={base:"hover:cursor-pointer hover:bg-accent hover:text-accent-foreground px-2 py-1.5 rounded-sm !text-sm !cursor-default !select-none !outline-none font-sans",focus:"active:bg-accent/90 bg-accent text-accent-foreground",disabled:"pointer-events-none opacity-50",selected:""},IK="text-accent-foreground p-2 bg-accent border border-dashed border-border rounded-sm",SK="flex items-center justify-center h-4 w-4 opacity-50",RK="text-accent-foreground p-2 bg-accent",_K=e=>({clearIndicator:t=>ee(wK,e?.clearIndicator?.(t)),container:t=>ee(e?.container?.(t)),control:t=>ee(Ah.base,t.isDisabled&&Ah.disabled,t.isFocused&&Ah.focus,e?.control?.(t)),dropdownIndicator:t=>ee(yK,e?.dropdownIndicator?.(t)),group:t=>ee(e?.group?.(t)),groupHeading:t=>ee(LK,e?.groupHeading?.(t)),indicatorsContainer:t=>ee(CK,e?.indicatorsContainer?.(t)),indicatorSeparator:t=>ee(xK,e?.indicatorSeparator?.(t)),input:t=>ee(e?.input?.(t)),loadingIndicator:t=>ee(SK,e?.loadingIndicator?.(t)),loadingMessage:t=>ee(RK,e?.loadingMessage?.(t)),menu:t=>ee(bK,e?.menu?.(t)),menuList:t=>ee(e?.menuList?.(t)),menuPortal:t=>ee(e?.menuPortal?.(t)),multiValue:t=>ee(vK,e?.multiValue?.(t)),multiValueLabel:t=>ee(e?.multiValueLabel?.(t)),multiValueRemove:t=>ee(e?.multiValueRemove?.(t)),noOptionsMessage:t=>ee(IK,e?.noOptionsMessage?.(t)),option:t=>ee(P3.base,t.isFocused&&P3.focus,t.isDisabled&&P3.disabled,t.isSelected&&P3.selected,e?.option?.(t)),placeholder:t=>ee(hK,e?.placeholder?.(t)),singleValue:t=>ee(e?.singleValue?.(t)),valueContainer:t=>ee(gK,e?.valueContainer?.(t))}),MK=_K({}),AK={input:e=>({...e,"input:focus":{boxShadow:"none"}}),multiValueLabel:e=>({...e,whiteSpace:"normal",overflow:"visible"}),control:e=>({...e,transition:"none"}),menuList:e=>({...e,"::-webkit-scrollbar":{background:"transparent"},"::-webkit-scrollbar-track":{background:"transparent"},"::-webkit-scrollbar-thumb":{background:"hsl(var(--border))"},"::-webkit-scrollbar-thumb:hover":{background:"transparent"}})},TK=e=>no.createElement(ol.DropdownIndicator,{...e},no.createElement(UP,{className:"h-4 w-4 opacity-50"})),PK=e=>no.createElement(ol.ClearIndicator,{...e},no.createElement(Mh,{className:"h-3.5 w-3.5 opacity-50"})),kK=e=>no.createElement(ol.MultiValueRemove,{...e},no.createElement(Mh,{className:"h-3 w-3 opacity-50"})),EK=e=>no.createElement(ol.Option,{...e},no.createElement("div",{className:"flex items-center justify-between"},no.createElement("div",null,e.data.label),e.isSelected&&no.createElement($P,null)));var k3={Default:{mqtt_topic_pattern:"milight/commands/:device_id/:device_type/:group_id",mqtt_update_topic_pattern:"milight/updates/:device_id/:device_type/:group_id",mqtt_state_topic_pattern:"milight/state/:device_id/:device_type/:group_id",mqtt_client_status_topic:"milight/client_status",simple_mqtt_client_status:!0},Custom:{}},OK=({})=>{let e=oo(),[t,r]=(0,E3.useState)("Custom");(0,E3.useEffect)(()=>{let a=e.getValues();for(let[s,u]of Object.entries(k3))if(o(a,u)){r(s);break}},[]);let o=(a,s)=>Object.keys(s).every(u=>a[u]===s[u]),n=a=>{if(r(a),a!=="Custom"){let s=k3[a];for(let[u,c]of Object.entries(s))e.setValue(u,c,{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0});e.handleSubmit(u=>{console.log(u)})()}};return Yt.createElement("div",{className:"mt-4 flex flex-col gap-4"},Yt.createElement(fn,{control:e.control,name:"topic_fields_preset",render:()=>Yt.createElement(pn,null,Yt.createElement(mn,null,"Preset"),Yt.createElement(Go,null,Yt.createElement(O0,{options:Object.keys(k3).map(a=>({label:a,value:a})),value:{label:t,value:t},onChange:a=>n(a?.value)})),Yt.createElement(Zs,null,'Customize the MQTT topic patterns. Use the "Default" preset for standard configurations.'))}),t!=="Custom"&&Yt.createElement("div",{className:"preview-fields"},Yt.createElement("h4",{className:"text-sm font-medium"},"Preview:"),Yt.createElement("ul",null,Object.entries(k3[t]).map(([a,s])=>Yt.createElement("li",{key:a,className:"mt-2"},Yt.createElement("div",null,Yt.createElement("strong",{className:"text-sm font-medium"},a.replace(/_/g," ").replace(/\b\w/g,u=>u.toUpperCase()),":")),Yt.createElement("div",null,Yt.createElement("code",{className:"bg-muted text-sm rounded"},s.toString())),Yt.createElement("div",{className:"text-sm text-muted-foreground"},At.Settings.shape[a].description))))),t==="Custom"&&Yt.createElement(Vt,{fields:["mqtt_topic_pattern","mqtt_update_topic_pattern","mqtt_state_topic_pattern","mqtt_client_status_topic","simple_mqtt_client_status"]}))},XP=()=>Yt.createElement(xo,null,Yt.createElement(Vt,{title:"MQTT Connection",fields:["mqtt_server","mqtt_username","mqtt_password"],fieldTypes:{mqtt_password:"password"}}),Yt.createElement(Vt,{title:"MQTT Topics",fields:[]},Yt.createElement(OK,null)),Yt.createElement(Vt,{title:"Home Assistant MQTT Discovery",fields:["home_assistant_discovery_prefix"]}),Yt.createElement(Vt,{title:"Advanced",fields:["mqtt_state_rate_limit","mqtt_debounce_delay","mqtt_retain"]}));var O3=N(U());var qP=()=>O3.createElement(xo,null,O3.createElement(Vt,{title:"Radio Pins",fields:["ce_pin","csn_pin","reset_pin"],fieldNames:{ce_pin:"Chip Enable (CE) Pin",csn_pin:"Chip Select Not (CSN) Pin",reset_pin:"Reset Pin"}}),O3.createElement(Vt,{title:"LED",fields:["led_pin","led_mode_operating","led_mode_packet","led_mode_wifi_config","led_mode_wifi_failed","led_mode_packet_count"],fieldNames:{led_pin:"LED Pin",led_mode_operating:"LED Mode: Idle",led_mode_packet:"LED Mode: Packet Sent/Received",led_mode_wifi_config:"LED Mode: WiFi in Config Mode",led_mode_wifi_failed:"LED Mode: WiFi Connection Failed",led_mode_packet_count:"LED Packet Blink Count"}}));var H3=N(U());var YP=()=>H3.createElement(xo,null,H3.createElement(Vt,{title:"Security",fields:["admin_username","admin_password"],fieldTypes:{admin_password:"password"}}),H3.createElement(Vt,{title:"WiFi",fields:["hostname","wifi_static_ip","wifi_static_ip_gateway","wifi_static_ip_netmask","wifi_mode"],fieldNames:{wifi_static_ip:"Static IP",wifi_static_ip_gateway:"Static IP Gateway",wifi_static_ip_netmask:"Static IP Netmask"}}));var ne=N(U());var B1=N(U());var HK=Dn("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive dark:[&:not(:has(svg))]:text-red-500 dark:[&>svg]:text-red-500 dark:[&>*]:text-red-500"}},defaultVariants:{variant:"default"}}),Th=B1.forwardRef(({className:e,variant:t,...r},o)=>B1.createElement("div",{ref:o,role:"alert",className:ee(HK({variant:t}),e),...r}));Th.displayName="Alert";var Ph=B1.forwardRef(({className:e,...t},r)=>B1.createElement("h5",{ref:r,className:ee("mb-1 font-medium leading-none tracking-tight",e),...t}));Ph.displayName="AlertTitle";var kh=B1.forwardRef(({className:e,...t},r)=>B1.createElement("div",{ref:r,className:ee("text-sm [&_p]:leading-relaxed",e),...t}));kh.displayName="AlertDescription";var H0=N(U());function VK(e,t){let r=e.split(".").map(Number),o=t.split(".").map(Number);for(let n=0;ns)return 1;if(a{let{toast:e}=va();return ne.createElement("div",{className:"space-y-2 mt-10"},ne.createElement(Zt,{variant:"destructive",onClick:async()=>{try{e({title:"Reboot initiated",description:"The device will restart shortly.",variant:"default"});let r=await Hn.postSystem({command:"restart"});r.success||e({title:"Error initiating reboot",description:r.error,variant:"destructive"})}catch(r){r instanceof Error?e({title:"Error initiating reboot",description:r.message,variant:"destructive"}):e({title:"Error initiating reboot",description:"An unknown error occurred.",variant:"destructive"})}}},"Reboot Now"))},DK=()=>{let{toast:e}=va(),[t,r]=ne.useState(null),o=a=>{console.log(a.target.files);let s=a.target.files?.[0];r(s||null)};console.log(t);let n=async()=>{if(e({title:"Uploading backup",description:"Please wait while your backup is uploaded.",variant:"default"}),!!t)try{let a=await Hn.postBackup({file:t});a.success?e({title:"Success",description:a.message,variant:"default"}):e({title:"Error uploading backup",description:a.message,variant:"destructive"})}catch(a){e({title:"Error uploading backup",description:a instanceof Error?a.message:"An unknown error occurred",variant:"destructive"})}finally{r(null)}};return ne.createElement("div",{className:"space-y-4"},ne.createElement("p",{className:"text-sm text-muted-foreground"},"Backups contain configuration data and devices you've registered with the hub. It does not contain states of lights."),ne.createElement("div",{className:"space-y-2"},ne.createElement("h3",{className:"text-lg font-medium"},"Create Backup"),ne.createElement(Zt,{variant:"secondary",asChild:!0},ne.createElement("a",{href:"/backup",download:"espmh-backup.bin"},"Download Backup"))),ne.createElement("div",{className:"space-y-2"},ne.createElement("h3",{className:"text-lg font-medium mt-10"},"Restore Backup"),ne.createElement("form",{onSubmit:n},ne.createElement("div",{className:"flex items-center space-x-2"},ne.createElement(Wo,{type:"file",id:"backupFile",onChange:o,value:t?void 0:"",accept:".bin",className:"flex-grow"}),ne.createElement(Zt,{type:"submit",disabled:!t,onClick:n,variant:"secondary"},"Upload Backup")))))},BK=({currentVersion:e,variant:t})=>{let{toast:r}=va(),[o,n]=ne.useState(null),[a,s]=ne.useState(!1),[u,c]=ne.useState(null),d=x=>{let v=x.target.files?.[0];n(v||null)},p=async()=>{r({title:"Update started",description:"Do not turn off the device until the update is complete.",variant:"default"}),Hn.postFirmware({file:o}).then(()=>{r({title:"Success",description:"The update is complete. The device will restart.",variant:"default"})}).catch(x=>{r({title:"Error uploading firmware",description:x.message,variant:"destructive"})})},m=async()=>{s(!0);try{let v=await(await fetch("https://api.github.com/repos/sidoh/esp8266_milight_hub/releases/latest")).json();c({version:v.tag_name,url:v.html_url,body:v.body,download_links:v.assets.map(b=>({name:b.name,url:b.browser_download_url})),release_date:v.published_at})}catch{r({title:"Error checking latest version",description:"Failed to fetch the latest version from GitHub.",variant:"destructive"})}finally{s(!1)}},g=ne.useMemo(()=>!e||!u?!1:VK(u.version,e)>0,[e,u]),y=ne.useMemo(()=>!u||!t?null:u.download_links.find(x=>x.name.toLowerCase().includes(t.toLowerCase())),[u,t]);return console.log(t,u),ne.createElement("div",{className:"space-y-4"},ne.createElement(Th,{variant:"destructive"},ne.createElement(d1,{className:"h-4 w-4"}),ne.createElement(Ph,null,"Warning"),ne.createElement(kh,null,"Always create a backup before updating firmware!")),ne.createElement("div",{className:"space-y-2"},ne.createElement("h3",{className:"text-lg font-medium"},"Upload Firmware"),ne.createElement("form",{onSubmit:p},ne.createElement("div",{className:"flex items-center space-x-2"},ne.createElement(Wo,{type:"file",id:"firmwareFile",onChange:d,value:o?void 0:"",accept:".bin",className:"flex-grow"}),ne.createElement(Zt,{type:"submit",disabled:!o,onClick:p,variant:"secondary"},"Upload Firmware")))),!u&&ne.createElement("div",{className:"space-y-2"},ne.createElement("h3",{className:"text-lg font-medium"},"Check for Updates"),ne.createElement("div",{className:"flex items-center space-x-2"},ne.createElement(Zt,{onClick:m,disabled:a,variant:"secondary"},a?"Checking...":"Check Latest Version"))),u&&ne.createElement("div",{className:"space-y-2 border p-4 rounded-md"},ne.createElement("h3",{className:"text-lg font-medium"},"Latest Version Information"),ne.createElement("hr",{className:"my-4"}),g&&ne.createElement("p",{className:"text-green-600 font-semibold"},"A new version is available!"),ne.createElement("p",null,ne.createElement("strong",null,"Version:")," ",u.version),ne.createElement("p",null,ne.createElement("strong",null,"Release Date:")," ",new Date(u.release_date).toLocaleString()),ne.createElement("p",null,ne.createElement("strong",null,"Release Notes:")),ne.createElement("pre",{className:"whitespace-pre-wrap text-sm bg-muted p-2 rounded-md"},u.body),ne.createElement("div",{className:"space-x-2"},ne.createElement(Zt,{asChild:!0,variant:"outline"},ne.createElement("a",{href:u.url,target:"_blank",rel:"noopener noreferrer"},"View on GitHub")),y&&ne.createElement(Zt,{asChild:!0,variant:"secondary"},ne.createElement("a",{href:y.url,download:!0},"Download Firmware")))))},NK=({systemInfo:e,isLoading:t})=>t?ne.createElement("div",{className:"space-y-2"},ne.createElement($o,{className:"h-4 w-[200px]"}),ne.createElement($o,{className:"h-4 w-[150px]"}),ne.createElement($o,{className:"h-4 w-[180px]"}),ne.createElement($o,{className:"h-4 w-[160px]"})):e?ne.createElement("div",{className:"space-y-2"},ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Firmware:")," ",e?.firmware),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Version:")," ",e?.version),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"IP Address:")," ",e?.ip_address),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Variant:")," ",e?.variant),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Free Heap:")," ",e?.free_heap," bytes"),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Arduino Version:")," ",e?.arduino_version),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Last Reset Reason:")," ",e?.reset_reason),ne.createElement("div",{className:"flex"},ne.createElement("strong",{className:"w-40"},"Dropped Packets:")," ",e?.queue_stats?.dropped_packets)):ne.createElement(ne.Fragment,null," "),JP=()=>{let[e,t]=(0,H0.useState)(null),[r,o]=(0,H0.useState)(!0),{toast:n}=va();return(0,H0.useEffect)(()=>{(async()=>{try{let s=await Hn.getAbout();t(s)}catch(s){console.error("Failed to fetch system info:",s),n({title:"Error fetching system info",description:"Failed to load system information.",variant:"destructive"})}finally{o(!1)}})()},[]),ne.createElement(xo,null,ne.createElement(Vt,{title:"System Information",fields:[]},ne.createElement(NK,{systemInfo:e,isLoading:r})),ne.createElement(Vt,{title:"Firmware",fields:[]},ne.createElement(BK,{currentVersion:e?.version||null,variant:e?.variant||null})),ne.createElement(Vt,{title:"Backups",fields:[]},ne.createElement(DK,null)),ne.createElement(Vt,{title:"Reboot",fields:["auto_restart_period"]},ne.createElement(FK,null)))};var V0=N(U());var QP=()=>V0.createElement(xo,null,V0.createElement(Vt,{title:"Device",fields:["radio_interface_type","rf24_power_level","rf24_channels","rf24_listen_channel"]}),V0.createElement(Vt,{title:"Repeats",fields:["packet_repeats","packet_repeats_per_loop","listen_repeats"]}),V0.createElement(Vt,{title:"Throttling",fields:["packet_repeat_throttle_sensitivity","packet_repeat_throttle_threshold","packet_repeat_minimum"]}));var gr=N(U()),ec=N(U());var Eh={HomeAssistant:["state","brightness","computed_color","mode","color_temp","color_mode"],Custom:[]},ZK=()=>{let e=oo(),[t,r]=(0,ec.useState)("");return(0,ec.useEffect)(()=>{let o=e.watch("group_state_fields"),n={};o?.forEach(a=>{switch(a){case"state":case"status":n[a]="ON";break;case"brightness":n[a]=75;break;case"level":n[a]=191;break;case"hue":n[a]=180;break;case"saturation":n[a]=100;break;case"color":n[a]={r:0,g:255,b:255};break;case"mode":n[a]=1;break;case"kelvin":n[a]=100;break;case"color_temp":n[a]=370;break;case"bulb_mode":n[a]="white";break;case"computed_color":n.color={r:255,g:255,b:255};break;case"effect":n[a]="1";break;case"device_id":n[a]=1;break;case"group_id":n[a]=1;break;case"device_type":n[a]="rgb_cct";break;case"oh_color":n.color="0,255,255";break;case"hex_color":n.color="#00FFFF";break;case"color_mode":n[a]="rgb";break}}),r(JSON.stringify(n,null,2))},[e.watch("group_state_fields")]),gr.createElement("div",{className:"flex flex-col gap-2 mt-4"},gr.createElement("div",{className:"text-sm font-medium"},"Preview"),gr.createElement("pre",{className:"text-sm text-muted-foreground"},t))},GK=({})=>{let e=oo(),[t,r]=(0,ec.useState)("Custom");(0,ec.useEffect)(()=>{let a=new Set(e.getValues("group_state_fields"));for(let[s,u]of Object.entries(Eh))if(o(a,new Set(u))){r(s);break}},[]);let o=(a,s)=>a.size===s.size&&[...a].every(u=>s.has(u)),n=a=>{r(a),a!=="Custom"&&e.setValue("group_state_fields",Eh[a],{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0})};return gr.createElement("div",{className:"mt-4 flex flex-col gap-4"},gr.createElement(fn,{control:e.control,name:"group_state_fields_preset",render:()=>gr.createElement(pn,null,gr.createElement(mn,null,"Preset"),gr.createElement(Go,null,gr.createElement(O0,{options:Object.keys(Eh).map(a=>({label:a,value:a})),value:{label:t,value:t},onChange:a=>n(a?.value)})),gr.createElement(Zs,null,"Customize the fields sent in MQTT state updates and in REST API responses. If you're using HomeAssistant, use the preset to ensure compatibility."))}),t==="Custom"&&gr.createElement(fn,{key:"group_state_fields",control:e.control,name:"group_state_fields",render:({field:a})=>gr.createElement(pn,null,gr.createElement(mn,null,"Custom Fields"),gr.createElement(Go,null,gr.createElement(O0,{isMulti:!0,options:Object.entries(At.GroupStateField.Values).map(([s,u])=>({label:s,value:s})),value:a.value?.map(s=>({label:s,value:s})),onChange:s=>{a.onChange(s.map(u=>u.value))}})))}),gr.createElement(ZK,null))},KP=()=>gr.createElement(xo,null,gr.createElement(Vt,{title:"State Fields",fields:[]},gr.createElement(GK,null)),gr.createElement(Vt,{title:"Miscellaneous",fields:["enable_automatic_mode_switching","default_transition_period","state_flush_interval"]}));var Et=N(U());var WK=[{value:"5",label:"v5"},{value:"6",label:"v6"}],zK=()=>{let{setValue:e,getValues:t}=oo(),[r,o]=Et.useState(()=>t("gateway_configs")||[]),[n,a]=Et.useState(!1),s=()=>{o([...r,[0,0,6]]),a(!0)},u=p=>{o(r.filter((m,g)=>g!==p)),a(!0)},c=(p,m,g)=>{let y=[...r];y[p][m]=g,o(y),a(!0)},d=()=>{e("gateway_configs",r,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),a(!1)};return Et.createElement(xo,null,Et.createElement(Vt,{title:"Gateway Configurations",fields:[]},Et.createElement("div",{className:"grid grid-cols-[3fr_3fr_3fr_1fr] gap-2 mb-2 font-semibold"},Et.createElement("div",null,"Remote ID"),Et.createElement("div",null,"UDP Port"),Et.createElement("div",null,"Protocol"),Et.createElement("div",null,Et.createElement(Zt,{onClick:s,variant:"secondary",size:"icon",className:"rounded-full","aria-label":"Add gateway config"},Et.createElement(gs,{className:"h-4 w-4"})))),r.map((p,m)=>Et.createElement("div",{key:m,className:"grid grid-cols-[3fr_3fr_3fr_1fr] gap-2 mb-2 items-center"},Et.createElement(Wo,{type:"number",value:p[0],onChange:g=>c(m,0,parseInt(g.target.value)),placeholder:"Remote ID"}),Et.createElement(Wo,{type:"number",value:p[1],onChange:g=>c(m,1,parseInt(g.target.value)),placeholder:"UDP Port"}),Et.createElement(ga,{type:"single",value:p[2].toString(),onValueChange:g=>c(m,2,parseInt(g))},WK.map(g=>Et.createElement(jo,{key:g.value,value:g.value},g.label))),Et.createElement("div",{className:"flex justify-center"},Et.createElement(Zt,{onClick:()=>u(m),variant:"ghost",size:"icon",className:"text-red-500 hover:text-red-700 hover:bg-red-100","aria-label":"Remove gateway config"},Et.createElement(bd,{className:"h-4 w-4"}))))),Et.createElement("div",{className:"flex justify-between mt-2"},Et.createElement(Zt,{onClick:d,disabled:!n},"Save Changes")),Et.createElement("div",{className:"text-sm text-muted-foreground mt-4"},Et.createElement("p",null,"Add servers which mimic the UDP protocol used by official Milight gateways. You should only use this if you're trying to integrate with a device or service that requires it. MQTT and the REST API are more reliable!"))))},ek=()=>Et.createElement(xo,null,Et.createElement(Vt,{title:"Discovery",fields:["discovery_port"]}),Et.createElement(zK,null));var rk=N(tk());var jK=[{title:"Network",id:"network"},{title:"Hardware",id:"hardware"},{title:"MQTT",id:"mqtt"},{title:"Radio",id:"radio"},{title:"State",id:"state"},{title:"UDP",id:"udp"},{title:"System",id:"system"}];function Oh(){let{settings:e,isLoading:t}=zd(),r=t5({resolver:r5(At.Settings),defaultValues:{},mode:"onBlur"}),o=(0,D0.useCallback)((0,rk.debounce)(()=>{let n={};for(let a in r.formState.dirtyFields)n[a]=r.getValues(a);Object.keys(n).length>0&&Hn.putSettings(n).then(()=>{r.reset(r.getValues())})},300),[r]);return(0,D0.useEffect)(()=>{let n=r.watch((a,{name:s})=>{!s||!(s in At.Settings.shape)||o()});return()=>n.unsubscribe()},[r]),(0,D0.useEffect)(()=>{e&&r.reset(e)},[e]),t?Nr.createElement("div",{className:"flex justify-center h-screen space-x-4"},Nr.createElement("div",{className:"w-1/5 h-full max-h-96"},Nr.createElement($o,{className:"w-full h-full"})),Nr.createElement("div",{className:"w-3/5 h-full flex flex-col space-y-4"},Nr.createElement($o,{className:"w-full h-10"}),Nr.createElement($o,{className:"w-full h-10"}),Nr.createElement($o,{className:"w-full h-10"}))):Nr.createElement(e5,{...r},Nr.createElement("form",{onBlur:o,onSubmit:n=>{n.preventDefault(),r.handleSubmit(o)()}},Nr.createElement(yA,{items:jK},Nr.createElement(YP,{navId:"network"}),Nr.createElement(qP,{navId:"hardware"}),Nr.createElement(XP,{navId:"mqtt"}),Nr.createElement(QP,{navId:"radio"}),Nr.createElement(KP,{navId:"state"}),Nr.createElement(ek,{navId:"udp"}),Nr.createElement(JP,{navId:"system"}))))}var N1=N(U());var Io=N(U());var Be=N(U(),1),nk=N(Oa(),1);var ht=N(Tt(),1),Bh="ToastProvider",[Nh,UK,$K]=_1("Toast"),[ak,L9e]=Da("Toast",[$K]),[XK,F3]=ak(Bh),ik=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:s}=e,[u,c]=Be.useState(null),[d,p]=Be.useState(0),m=Be.useRef(!1),g=Be.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bh}\`. Expected non-empty \`string\`.`),(0,ht.jsx)(Nh.Provider,{scope:t,children:(0,ht.jsx)(XK,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:a,toastCount:d,viewport:u,onViewportChange:c,onToastAdd:Be.useCallback(()=>p(y=>y+1),[]),onToastRemove:Be.useCallback(()=>p(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:g,children:s})})};ik.displayName=Bh;var sk="ToastViewport",qK=["F8"],Vh="toast.viewportPause",Fh="toast.viewportResume",lk=Be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=qK,label:n="Notifications ({hotkey})",...a}=e,s=F3(sk,r),u=UK(r),c=Be.useRef(null),d=Be.useRef(null),p=Be.useRef(null),m=Be.useRef(null),g=Ue(t,m,s.onViewportChange),y=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;Be.useEffect(()=>{let b=w=>{o.length!==0&&o.every(I=>w[I]||w.code===I)&&m.current?.focus()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[o]),Be.useEffect(()=>{let b=c.current,w=m.current;if(x&&b&&w){let C=()=>{if(!s.isClosePausedRef.current){let T=new CustomEvent(Vh);w.dispatchEvent(T),s.isClosePausedRef.current=!0}},I=()=>{if(s.isClosePausedRef.current){let T=new CustomEvent(Fh);w.dispatchEvent(T),s.isClosePausedRef.current=!1}},_=T=>{!b.contains(T.relatedTarget)&&I()},M=()=>{b.contains(document.activeElement)||I()};return b.addEventListener("focusin",C),b.addEventListener("focusout",_),b.addEventListener("pointermove",C),b.addEventListener("pointerleave",M),window.addEventListener("blur",C),window.addEventListener("focus",I),()=>{b.removeEventListener("focusin",C),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",C),b.removeEventListener("pointerleave",M),window.removeEventListener("blur",C),window.removeEventListener("focus",I)}}},[x,s.isClosePausedRef]);let v=Be.useCallback(({tabbingDirection:b})=>{let C=u().map(I=>{let _=I.ref.current,M=[_,...lee(_)];return b==="forwards"?M:M.reverse()});return(b==="forwards"?C.reverse():C).flat()},[u]);return Be.useEffect(()=>{let b=m.current;if(b){let w=C=>{let I=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!I){let M=document.activeElement,T=C.shiftKey;if(C.target===b&&T){d.current?.focus();return}let J=v({tabbingDirection:T?"backwards":"forwards"}),Z=J.findIndex(Q=>Q===M);Hh(J.slice(Z+1))?C.preventDefault():T?d.current?.focus():p.current?.focus()}};return b.addEventListener("keydown",w),()=>b.removeEventListener("keydown",w)}},[u,v]),(0,ht.jsxs)(dI,{ref:c,role:"region","aria-label":n.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&(0,ht.jsx)(Dh,{ref:d,onFocusFromOutsideViewport:()=>{let b=v({tabbingDirection:"forwards"});Hh(b)}}),(0,ht.jsx)(Nh.Slot,{scope:r,children:(0,ht.jsx)(be.ol,{tabIndex:-1,...a,ref:g})}),x&&(0,ht.jsx)(Dh,{ref:p,onFocusFromOutsideViewport:()=>{let b=v({tabbingDirection:"backwards"});Hh(b)}})]})});lk.displayName=sk;var uk="ToastFocusProxy",Dh=Be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=F3(uk,r);return(0,ht.jsx)(Tu,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:s=>{let u=s.relatedTarget;!a.viewport?.contains(u)&&o()}})});Dh.displayName=uk;var D3="Toast",YK="toast.swipeStart",JK="toast.swipeMove",QK="toast.swipeCancel",KK="toast.swipeEnd",ck=Be.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...s}=e,[u=!0,c]=Vr({prop:o,defaultProp:n,onChange:a});return(0,ht.jsx)(Vs,{present:r||u,children:(0,ht.jsx)(ree,{open:u,...s,ref:t,onClose:()=>c(!1),onPause:lr(e.onPause),onResume:lr(e.onResume),onSwipeStart:Se(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Se(e.onSwipeMove,d=>{let{x:p,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Se(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Se(e.onSwipeEnd,d=>{let{x:p,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),c(!1)})})})});ck.displayName=D3;var[eee,tee]=ak(D3,{onClose(){}}),ree=Be.forwardRef((e,t)=>{let{__scopeToast:r,type:o="foreground",duration:n,open:a,onClose:s,onEscapeKeyDown:u,onPause:c,onResume:d,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:g,onSwipeEnd:y,...x}=e,v=F3(D3,r),[b,w]=Be.useState(null),C=Ue(t,q=>w(q)),I=Be.useRef(null),_=Be.useRef(null),M=n||v.duration,T=Be.useRef(0),A=Be.useRef(M),H=Be.useRef(0),{onToastAdd:J,onToastRemove:Z}=v,Q=lr(()=>{b?.contains(document.activeElement)&&v.viewport?.focus(),s()}),W=Be.useCallback(q=>{!q||q===1/0||(window.clearTimeout(H.current),T.current=new Date().getTime(),H.current=window.setTimeout(Q,q))},[Q]);Be.useEffect(()=>{let q=v.viewport;if(q){let ae=()=>{W(A.current),d?.()},Y=()=>{let me=new Date().getTime()-T.current;A.current=A.current-me,window.clearTimeout(H.current),c?.()};return q.addEventListener(Vh,Y),q.addEventListener(Fh,ae),()=>{q.removeEventListener(Vh,Y),q.removeEventListener(Fh,ae)}}},[v.viewport,M,c,d,W]),Be.useEffect(()=>{a&&!v.isClosePausedRef.current&&W(M)},[a,M,v.isClosePausedRef,W]),Be.useEffect(()=>(J(),()=>Z()),[J,Z]);let ie=Be.useMemo(()=>b?vk(b):null,[b]);return v.viewport?(0,ht.jsxs)(ht.Fragment,{children:[ie&&(0,ht.jsx)(oee,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:ie}),(0,ht.jsx)(eee,{scope:r,onClose:Q,children:nk.createPortal((0,ht.jsx)(Nh.ItemSlot,{scope:r,children:(0,ht.jsx)(cI,{asChild:!0,onEscapeKeyDown:Se(u,()=>{v.isFocusedToastEscapeKeyDownRef.current||Q(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,ht.jsx)(be.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":v.swipeDirection,...x,ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Se(e.onKeyDown,q=>{q.key==="Escape"&&(u?.(q.nativeEvent),q.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,Q()))}),onPointerDown:Se(e.onPointerDown,q=>{q.button===0&&(I.current={x:q.clientX,y:q.clientY})}),onPointerMove:Se(e.onPointerMove,q=>{if(!I.current)return;let ae=q.clientX-I.current.x,Y=q.clientY-I.current.y,me=!!_.current,se=["left","right"].includes(v.swipeDirection),we=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,Ke=se?we(0,ae):0,xt=se?0:we(0,Y),nt=q.pointerType==="touch"?10:2,lt={x:Ke,y:xt},yt={originalEvent:q,delta:lt};me?(_.current=lt,V3(JK,m,yt,{discrete:!1})):ok(lt,v.swipeDirection,nt)?(_.current=lt,V3(YK,p,yt,{discrete:!1}),q.target.setPointerCapture(q.pointerId)):(Math.abs(ae)>nt||Math.abs(Y)>nt)&&(I.current=null)}),onPointerUp:Se(e.onPointerUp,q=>{let ae=_.current,Y=q.target;if(Y.hasPointerCapture(q.pointerId)&&Y.releasePointerCapture(q.pointerId),_.current=null,I.current=null,ae){let me=q.currentTarget,se={originalEvent:q,delta:ae};ok(ae,v.swipeDirection,v.swipeThreshold)?V3(KK,y,se,{discrete:!0}):V3(QK,g,se,{discrete:!0}),me.addEventListener("click",we=>we.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),oee=e=>{let{__scopeToast:t,children:r,...o}=e,n=F3(D3,t),[a,s]=Be.useState(!1),[u,c]=Be.useState(!1);return iee(()=>s(!0)),Be.useEffect(()=>{let d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),u?null:(0,ht.jsx)(Hs,{asChild:!0,children:(0,ht.jsx)(Tu,{...o,children:a&&(0,ht.jsxs)(ht.Fragment,{children:[n.label," ",r]})})})},nee="ToastTitle",dk=Be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ht.jsx)(be.div,{...o,ref:t})});dk.displayName=nee;var aee="ToastDescription",fk=Be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ht.jsx)(be.div,{...o,ref:t})});fk.displayName=aee;var pk="ToastAction",mk=Be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,ht.jsx)(gk,{altText:r,asChild:!0,children:(0,ht.jsx)(Zh,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${pk}\`. Expected non-empty \`string\`.`),null)});mk.displayName=pk;var hk="ToastClose",Zh=Be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=tee(hk,r);return(0,ht.jsx)(gk,{asChild:!0,children:(0,ht.jsx)(be.button,{type:"button",...o,ref:t,onClick:Se(e.onClick,n.onClose)})})});Zh.displayName=hk;var gk=Be.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,ht.jsx)(be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function vk(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),see(o)){let n=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let s=o.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...vk(o))}}),t}function V3(e,t,r,{discrete:o}){let n=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?A9(n,a):n.dispatchEvent(a)}var ok=(e,t,r=0)=>{let o=Math.abs(e.x),n=Math.abs(e.y),a=o>n;return t==="left"||t==="right"?a&&o>r:!a&&n>r};function iee(e=()=>{}){let t=lr(e);rr(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function see(e){return e.nodeType===e.ELEMENT_NODE}function lee(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let 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 Hh(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Ck=ik,Gh=lk,Wh=ck,zh=dk,jh=fk,Uh=mk,$h=Zh;var wk=Ck,Xh=Io.forwardRef(({className:e,...t},r)=>Io.createElement(Gh,{ref:r,className:ee("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Xh.displayName=Gh.displayName;var cee=Dn("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),qh=Io.forwardRef(({className:e,variant:t,...r},o)=>Io.createElement(Wh,{ref:o,className:ee(cee({variant:t}),e),...r}));qh.displayName=Wh.displayName;var dee=Io.forwardRef(({className:e,...t},r)=>Io.createElement(Uh,{ref:r,className:ee("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));dee.displayName=Uh.displayName;var Yh=Io.forwardRef(({className:e,...t},r)=>Io.createElement($h,{ref:r,className:ee("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t},Io.createElement(vi,{className:"h-4 w-4"})));Yh.displayName=$h.displayName;var Jh=Io.forwardRef(({className:e,...t},r)=>Io.createElement(zh,{ref:r,className:ee("text-sm font-semibold",e),...t}));Jh.displayName=zh.displayName;var Qh=Io.forwardRef(({className:e,...t},r)=>Io.createElement(jh,{ref:r,className:ee("text-sm opacity-90",e),...t}));Qh.displayName=jh.displayName;function xk(){let{toasts:e}=va();return N1.createElement(wk,null,e.map(function({id:t,title:r,description:o,action:n,...a}){return N1.createElement(qh,{key:t,...a},N1.createElement("div",{className:"grid gap-1"},r&&N1.createElement(Jh,null,r),o&&N1.createElement(Qh,null,o)),n,N1.createElement(Yh,null))}),N1.createElement(Xh,null))}var We=N(U());var yk=N(U());var fee=Dn("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function B3({className:e,variant:t,...r}){return yk.createElement("div",{className:ee(fee({variant:t}),e),...r})}var pee=e=>e.map(t=>t.toString(16).padStart(2,"0").toUpperCase()).join(" ");function mee(){let{allMessages:e}=q5(),[t,r]=(0,We.useState)(null),o=va(),n=u=>{navigator.clipboard.writeText(u).then(()=>{o.toast({title:"Copied to clipboard",description:"Device ID has been copied to clipboard"})}).catch(c=>{console.error("Failed to copy: ",c)})},a=()=>[...e].reverse().map((u,c)=>We.default.createElement(Zt,{key:c,variant:"ghost",className:"w-full text-left justify-start flex flex-col items-start p-2 h-auto",onClick:()=>r(u)},We.default.createElement("div",{className:"flex space-x-2 mb-1"},We.default.createElement(B3,{variant:"secondary"},"Device ID: ",u.d.di),We.default.createElement(B3,{variant:"secondary"},"Group ID: ",u.d.gi),We.default.createElement(B3,{variant:"secondary"},"Remote Type: ",u.d.rt)),u.u&&Object.keys(u.u).length>0?We.default.createElement("span",{className:"text-sm text-muted-foreground"},"Command: ",Object.keys(u.u)[0]," = ",JSON.stringify(Object.values(u.u)[0])):We.default.createElement("span",{className:"text-sm text-muted-foreground"},"No command"))),s=u=>We.default.createElement("div",{className:"space-y-2"},We.default.createElement("p",{className:"flex items-center"},We.default.createElement("strong",null,"Device ID:"),We.default.createElement("span",{className:"ml-2"},u.d.di),We.default.createElement(Zt,{variant:"ghost",size:"icon",className:"h-6 w-6 ml-2",onClick:()=>n(u.d.di.toString())},We.default.createElement(Cd,{className:"h-4 w-4"}))),We.default.createElement("p",null,We.default.createElement("strong",null,"Group ID:")," ",u.d.gi),We.default.createElement("p",null,We.default.createElement("strong",null,"Remote Type:")," ",u.d.rt),We.default.createElement("p",null,We.default.createElement("strong",null,"Packet:")," ",We.default.createElement("code",{className:"bg-muted text-sm p-1 rounded"},pee(u.p))),We.default.createElement("div",null,We.default.createElement("strong",null,"State:"),We.default.createElement("pre",{className:"text-xs mt-1"},JSON.stringify(u.s,null,2))),u.u&&Object.keys(u.u).length>0&&We.default.createElement("div",null,We.default.createElement("strong",null,"Command:"),Object.entries(u.u).map(([c,d])=>We.default.createElement("div",{key:c,className:"ml-2"},We.default.createElement("strong",null,c,":")," ",JSON.stringify(d)))));return We.default.createElement("div",{className:"grid grid-cols-2 h-[calc(100vh-2rem)] border rounded-lg overflow-hidden"},We.default.createElement("div",{className:"h-full overflow-y-auto border-r"},We.default.createElement(C1,{className:"border-b"},We.default.createElement(w1,null,"Event List")),We.default.createElement(x1,{className:"mt-5"},a())),We.default.createElement("div",{className:"h-full overflow-y-auto"},We.default.createElement(C1,{className:"border-b"},We.default.createElement(w1,null,"Event Details")),We.default.createElement(x1,{className:"mt-5"},t?s(t):We.default.createElement("p",{className:"text-muted-foreground"},"Select an event to view details"))))}function Kh(){return We.default.createElement("div",{className:"container mx-auto p-4"},We.default.createElement(mee,null))}var eg={"/dashboard":wA,"/not-found":xA,"/settings":Oh,"/sniffer":Kh};function Lk(){let[e,t]=(0,So.useState)(null);(0,So.useEffect)(()=>{let o=()=>{let n=window.location.hash.slice(1);t(n)};return window.addEventListener("hashchange",o),o(),()=>{window.removeEventListener("hashchange",o)}},[]);let r=e?eg[e]||eg["/not-found"]:eg["/dashboard"];return So.default.createElement(gA,null,So.default.createElement(NL,null,So.default.createElement(pA,null,So.default.createElement("div",{className:"bg-background text-foreground flex flex-col items-center justify-start"},So.default.createElement("div",{className:"container mx-auto px-4"},So.default.createElement(ZL,null),So.default.createElement("main",{className:"flex flex-col pt-10"},r&&So.default.createElement(r,null)),So.default.createElement(xk,null))))))}var tg=document.getElementById("page");tg?(tg.innerHTML="",(0,bk.createRoot)(tg).render(So.default.createElement(Lk,null))):console.error("Could not find element with id 'page'");})(); +/*! Bundled license information: + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +scheduler/cjs/scheduler.production.min.js: + (** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react-dom/cjs/react-dom.production.min.js: + (** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react/cjs/react-jsx-runtime.production.min.js: + (** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react-is/cjs/react-is.production.min.js: + (** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +lodash/lodash.js: + (** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +lucide-react/dist/esm/shared/src/utils.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/defaultAttributes.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/Icon.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/createLucideIcon.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/check.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/chevron-down.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/chevron-up.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/copy.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/lightbulb.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/moon.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/palette.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/pencil.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/plus.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/settings.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/sun.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/trash-2.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/trash.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/triangle-alert.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/x.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/lucide-react.js: + (** + * @license lucide-react v0.447.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) +*/ diff --git a/web2/dist/versions/1.0.2/index.html b/web2/dist/versions/1.0.2/index.html new file mode 100644 index 00000000..dce33970 --- /dev/null +++ b/web2/dist/versions/1.0.2/index.html @@ -0,0 +1,133 @@ + + + + + + +MiLight Hub + + + + + +
+
Loading...
+
+ + diff --git a/web2/inline.js b/web2/inline.js index 95ed59f1..8a439246 100644 --- a/web2/inline.js +++ b/web2/inline.js @@ -23,7 +23,7 @@ const html = ` - +
Loading...
diff --git a/web2/lib/settings.tsx b/web2/lib/settings.tsx index c31384bf..76c53698 100644 --- a/web2/lib/settings.tsx +++ b/web2/lib/settings.tsx @@ -8,6 +8,8 @@ interface SettingsContextType { settings: Settings | null; isLoading: boolean; updateSettings: (newSettings: Partial) => void; + theme: "light" | "dark"; + toggleTheme: () => void; } const SettingsContext = createContext(null); @@ -15,21 +17,44 @@ const SettingsContext = createContext(null); export const SettingsProvider: React.FC<{ children: ReactNode }> = ({ children }) => { const [settings, setSettings] = useState(null); const [isLoading, setIsLoading] = useState(true); + const [theme, setTheme] = useState<"light" | "dark">("light"); + useEffect(() => { api.getSettings().then((fetchedSettings) => { setSettings(fetchedSettings); setIsLoading(false); }); + + // Initialize theme from localStorage or system preference + const savedTheme = localStorage.getItem("theme"); + const prefersDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches; + const initialTheme = savedTheme ? savedTheme : (prefersDarkMode ? "dark" : "light"); + + setTheme(initialTheme as "light" | "dark"); }, []); const updateSettings = (newSettings: Partial) => { const updatedSettings = { ...settings, ...newSettings }; setSettings(updatedSettings); - api.putSettings(updatedSettings); + api.putSettings(updatedSettings); + }; + + const toggleTheme = () => { + const newTheme = theme === "dark" ? "light" : "dark"; + setTheme(newTheme); + localStorage.setItem("theme", newTheme); }; + useEffect(() => { + if (theme === "dark") { + document.body.className = "dark"; + } else { + document.body.className = ""; + } + }, [theme]); + return ( - + {children} ); @@ -43,4 +68,3 @@ export const useSettings = () => { } return context; }; - diff --git a/web2/package-lock.json b/web2/package-lock.json index e8d843ff..48d49c08 100644 --- a/web2/package-lock.json +++ b/web2/package-lock.json @@ -1,12 +1,12 @@ { "name": "esp8266_milight_hub_ui", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "esp8266_milight_hub_ui", - "version": "1.0.1", + "version": "1.0.2", "license": "ISC", "dependencies": { "@headlessui/react": "^2.1.9", diff --git a/web2/package.json b/web2/package.json index ca1e6560..5cce97cc 100644 --- a/web2/package.json +++ b/web2/package.json @@ -1,6 +1,6 @@ { "name": "esp8266_milight_hub_ui", - "version": "1.0.1", + "version": "1.0.2", "description": "", "main": "index.js", "scripts": { diff --git a/web2/src/index.tsx b/web2/src/index.tsx index b65b7a40..d4277587 100644 --- a/web2/src/index.tsx +++ b/web2/src/index.tsx @@ -24,9 +24,6 @@ export default function App() { ); useEffect(() => { - // Add dark class to body - document.body.classList.add("dark"); - const handleHashChange = () => { const hash = window.location.hash.slice(1); setCurrentPage(hash as keyof typeof PAGES);