diff --git a/ui/dist/assets/index-CVqrGJzH.css b/ui/dist/assets/index-CVqrGJzH.css deleted file mode 100644 index 41ff633f..00000000 --- a/ui/dist/assets/index-CVqrGJzH.css +++ /dev/null @@ -1 +0,0 @@ -*,: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}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--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%}*,: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: }.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}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.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-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-screen{max-height:100vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.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))}.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))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-center{align-items:center}.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-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.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-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-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-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * 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-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.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-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.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-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-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-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.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}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.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-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}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.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-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / 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-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.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;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-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}.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))}}.animate-in{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}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.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}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.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\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / 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))}.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\]\: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-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{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-\[state\=closed\]\:animate-out[data-state=closed],.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-\[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\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.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-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.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%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-52{width:13rem}.sm\:w-56{width:14rem}.sm\:w-64{width:16rem}.sm\:w-\[35em\]{width:35em}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.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\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.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\:block{display:block}.md\:hidden{display:none}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>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))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/ui/dist/assets/index-VYJgHfoP.css b/ui/dist/assets/index-VYJgHfoP.css new file mode 100644 index 00000000..b4eb18a9 --- /dev/null +++ b/ui/dist/assets/index-VYJgHfoP.css @@ -0,0 +1 @@ +*,: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}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--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%}*,: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: }.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}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.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-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-screen{max-height:100vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.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))}.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))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-center{align-items:center}.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-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.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-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-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-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * 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-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.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-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.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-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-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-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.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}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.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-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-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.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-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / 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-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.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;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-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}.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))}}.animate-in{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}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.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}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.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\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / 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))}.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\]\: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-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{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-\[state\=closed\]\:animate-out[data-state=closed],.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-\[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\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.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-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.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%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-52{width:13rem}.sm\:w-56{width:14rem}.sm\:w-64{width:16rem}.sm\:w-\[35em\]{width:35em}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.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\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.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\:block{display:block}.md\:hidden{display:none}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>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))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/ui/dist/assets/index-hbqdRXOp.js b/ui/dist/assets/index-vWJSQP8e.js similarity index 99% rename from ui/dist/assets/index-hbqdRXOp.js rename to ui/dist/assets/index-vWJSQP8e.js index f832f0fd..994a00ed 100644 --- a/ui/dist/assets/index-hbqdRXOp.js +++ b/ui/dist/assets/index-vWJSQP8e.js @@ -236,4 +236,4 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,o){function i(c,f){if(!s[c]){if(!n[c]){var d=typeof tu=="function"&&tu;if(!f&&d)return d(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=s[c]={exports:{}};n[c][0].call(m.exports,function(y){var p=n[c][1][y];return i(p||y)},m,m.exports,r,n,s,o)}return s[c].exports}for(var a=typeof tu=="function"&&tu,l=0;l>2,m=(3&c)<<4|f>>4,y=1<_?(15&f)<<2|d>>6:64,p=2<_?63&d:64,x.push(a.charAt(h)+a.charAt(m)+a.charAt(y)+a.charAt(p));return x.join("")},s.decode=function(l){var c,f,d,h,m,y,p=0,x=0,g="data:";if(l.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var v,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|_):new Array(0|_);p>4,f=(15&h)<<4|(m=a.indexOf(l.charAt(p++)))>>2,d=(3&m)<<6|(y=a.indexOf(l.charAt(p++))),v[x++]=c,m!==64&&(v[x++]=f),y!==64&&(v[x++]=d);return v}},{"./support":30,"./utils":32}],2:[function(r,n,s){var o=r("./external"),i=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function c(f,d,h,m,y){this.compressedSize=f,this.uncompressedSize=d,this.crc32=h,this.compression=m,this.compressedContent=y}c.prototype={getContentWorker:function(){var f=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return f.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(f,d,h){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var o=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var o=r("./utils"),i=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(c,f,d,h){var m=i,y=h+d;c^=-1;for(var p=h;p>>8^m[255&(c^f[p])];return-1^c}(0|l,a,a.length,0):function(c,f,d,h){var m=i,y=h+d;c^=-1;for(var p=h;p>>8^m[255&(c^f.charCodeAt(p))];return-1^c}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),c=o?"uint8array":"array";function f(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,d.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},s.compressWorker=function(d){return new f("Deflate",d)},s.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function o(m,y){var p,x="";for(p=0;p>>=8;return x}function i(m,y,p,x,g,v){var _,C,E=m.file,T=m.compression,P=v!==c.utf8encode,O=a.transformTo("string",v(E.name)),j=a.transformTo("string",c.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",v(L)),R=a.transformTo("string",c.utf8encode(L)),F=j.length!==E.name.length,b=R.length!==L.length,V="",te="",W="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};y&&!p||(Q.crc32=m.crc32,Q.compressedSize=m.compressedSize,Q.uncompressedSize=m.uncompressedSize);var z=0;y&&(z|=8),P||!F&&!b||(z|=2048);var $=0,de=0;Z&&($|=16),g==="UNIX"?(de=798,$|=function(se,Ee){var fe=se;return se||(fe=Ee?16893:33204),(65535&fe)<<16}(E.unixPermissions,Z)):(de=20,$|=function(se){return 63&(se||0)}(E.dosPermissions)),_=I.getUTCHours(),_<<=6,_|=I.getUTCMinutes(),_<<=5,_|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=o(1,1)+o(f(O),4)+j,V+="up"+o(te.length,2)+te),b&&(W=o(1,1)+o(f(q),4)+R,V+="uc"+o(W.length,2)+W);var ne="";return ne+=` -\0`,ne+=o(z,2),ne+=T.magic,ne+=o(_,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(O.length,2),ne+=o(V.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ne+O+V,dirRecord:d.CENTRAL_FILE_HEADER+o(de,2)+ne+o(q.length,2)+"\0\0\0\0"+o($,4)+o(x,4)+O+V+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),f=r("../crc32"),d=r("../signature");function h(m,y,p,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=p,this.encodeFileName=x,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,l),h.prototype.push=function(m){var y=m.meta.percent||0,p=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(y+100*(p-x-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var y=this.streamFiles&&!m.file.dir;if(y){var p=i(m,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var y=this.streamFiles&&!m.file.dir,p=i(m,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),y)this.push({data:function(x){return d.DATA_DESCRIPTOR+o(x.crc32,4)+o(x.compressedSize,4)+o(x.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,y=0;y=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=i},{"../utils":32}],19:[function(r,n,s){var o=r("./Uint8ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var o=r("./ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");n.exports=function(d){var h=o.getTypeOf(d);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new c(d):i.uint8array?new f(o.transformTo("uint8array",d)):new a(o.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var o=r("./GenericWorker"),i=r("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}i.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:i.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var o=r("./GenericWorker"),i=r("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=i(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,i),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}i.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){c.dataIsReady=!0,c.data=f,c.max=f&&f.length||0,c.type=o.getTypeOf(f),c.isPaused||c._tickAndRepeat()},function(f){c.error(f)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var l=0;l "+i:i}},n.exports=o},{}],29:[function(r,n,s){var o=r("../utils"),i=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),f=r("../external"),d=null;if(c.nodestream)try{d=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(y,p){return new f.Promise(function(x,g){var v=[],_=y._internalType,C=y._outputType,E=y._mimeType;y.on("data",function(T,P){v.push(T),p&&p(P)}).on("error",function(T){v=[],g(T)}).on("end",function(){try{var T=function(P,O,j){switch(P){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),j);case"base64":return l.encode(O);default:return o.transformTo(P,O)}}(C,function(P,O){var j,L=0,q=null,R=0;for(j=0;j"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var o=r("./utils"),i=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),f=0;f<256;f++)c[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;c[254]=c[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}s.utf8encode=function(m){return i.nodebuffer?a.newBufferFrom(m,"utf-8"):function(y){var p,x,g,v,_,C=y.length,E=0;for(v=0;v>>6:(x<65536?p[_++]=224|x>>>12:(p[_++]=240|x>>>18,p[_++]=128|x>>>12&63),p[_++]=128|x>>>6&63),p[_++]=128|63&x);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(y){var p,x,g,v,_=y.length,C=new Array(2*_);for(p=x=0;p<_;)if((g=y[p++])<128)C[x++]=g;else if(4<(v=c[g]))C[x++]=65533,p+=v-1;else{for(g&=v===2?31:v===3?15:7;1>10&1023,C[x++]=56320|1023&g)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),o.applyFromCharCode(C)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(d,l),d.prototype.processChunk=function(m){var y=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=y;(y=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),y.set(p,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var x=function(v,_){var C;for((_=_||v.length)>v.length&&(_=v.length),C=_-1;0<=C&&(192&v[C])==128;)C--;return C<0||C===0?_:C+c[v[C]]>_?C:_}(y),g=y;x!==y.length&&(i.uint8array?(g=y.subarray(0,x),this.leftOver=y.subarray(x,y.length)):(g=y.slice(0,x),this.leftOver=y.slice(x,y.length))),this.push({data:s.utf8decode(g),meta:m.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(h,l),h.prototype.processChunk=function(m){this.push({data:s.utf8encode(m.data),meta:m.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var o=r("./support"),i=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(p){return p}function f(p,x){for(var g=0;g>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var y,p,x,g=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4>>6:(m<65536?h[x++]=224|m>>>12:(h[x++]=240|m>>>18,h[x++]=128|m>>>12&63),h[x++]=128|m>>>6&63),h[x++]=128|63&m);return h},s.buf2binstring=function(d){return f(d,d.length)},s.binstring2buf=function(d){for(var h=new o.Buf8(d.length),m=0,y=h.length;m>10&1023,v[y++]=56320|1023&p)}return f(v,y)},s.utf8border=function(d,h){var m;for((h=h||d.length)>d.length&&(h=d.length),m=h-1;0<=m&&(192&d[m])==128;)m--;return m<0||m===0?h:m+l[d[m]]>h?m:h}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,a,l){for(var c=65535&o|0,f=o>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3>>1:i>>>1;a[l]=i}return a}();n.exports=function(i,a,l,c){var f=o,d=c+l;i^=-1;for(var h=c;h>>8^f[255&(i^a[h])];return-1^i}},{}],46:[function(r,n,s){var o,i=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),f=r("./messages"),d=0,h=4,m=0,y=-2,p=-1,x=4,g=2,v=8,_=9,C=286,E=30,T=19,P=2*C+1,O=15,j=3,L=258,q=L+j+1,R=42,F=113,b=1,V=2,te=3,W=4;function Z(k,J){return k.msg=f[J],J}function I(k){return(k<<1)-(4k.avail_out&&(G=k.avail_out),G!==0&&(i.arraySet(k.output,J.pending_buf,J.pending_out,G,k.next_out),k.next_out+=G,J.pending_out+=G,k.total_out+=G,k.avail_out-=G,J.pending-=G,J.pending===0&&(J.pending_out=0))}function $(k,J){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function de(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var G,D,S=k.max_chain_length,N=k.strstart,A=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,he=k.strstart+L,Le=H[N+A-1],Oe=H[N+A];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(G=J)+A]===Oe&&H[G+A-1]===Le&&H[G]===H[N]&&H[++G]===H[N+1]){N+=2,G++;do;while(H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&NM&&--S!=0);return A<=k.lookahead?A:k.lookahead}function Ee(k){var J,G,D,S,N,A,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(i.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=G=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--G;);for(J=G=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--G;);S+=ee}if(k.strm.avail_in===0)break;if(A=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=A.avail_in,H=j)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<=j&&(k.ins_h=(k.ins_h<=j)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-j),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=j){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<=j&&(k.ins_h=(k.ins_h<=j&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-j,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-j),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<k.pending_buf_size-5&&(G=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ee(k),k.lookahead===0&&J===d)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+G;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,$(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===h?($(k,!0),k.strm.avail_out===0?te:W):(k.strstart>k.block_start&&($(k,!1),k.strm.avail_out),b)}),new be(4,4,8,4,fe),new be(4,5,16,8,fe),new be(4,6,32,32,fe),new be(4,4,16,16,ge),new be(8,16,32,32,ge),new be(8,16,128,128,ge),new be(8,32,128,256,ge),new be(32,128,258,1024,ge),new be(32,258,258,4096,ge)],s.deflateInit=function(k,J){return qe(k,J,v,15,8,0)},s.deflateInit2=qe,s.deflateReset=Se,s.deflateResetKeep=Te,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?y:(k.state.gzhead=J,m):y},s.deflate=function(k,J){var G,D,S,N;if(!k||!k.state||5>8&255),de(D,D.gzhead.time>>16&255),de(D,D.gzhead.time>>24&255),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(de(D,255&D.gzhead.extra.length),de(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=c(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(de(D,0),de(D,0),de(D,0),de(D,0),de(D,0),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,3),D.status=F);else{var A=v+(D.w_bits-8<<4)<<8;A|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(A|=32),A+=31-A%31,D.status=F,ne(D,A),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)de(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(de(D,255&k.adler),de(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,m}else if(k.avail_in===0&&I(J)<=I(G)&&J!==h)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==d&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Ee(M),M.lookahead===0)){if(H===d)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===h?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):D.strategy===3?function(M,H){for(var X,ee,he,Le,Oe=M.window;;){if(M.lookahead<=L){if(Ee(M),M.lookahead<=L&&H===d)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=j&&0M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=j?(X=a._tr_tally(M,1,M.match_length-j),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===h?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):o[D.level].func(D,J);if(Y!==te&&Y!==W||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),m;if(Y===V&&(J===1?a._tr_align(D):J!==5&&(a._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,m}return J!==h?m:D.wrap<=0?1:(D.wrap===2?(de(D,255&k.adler),de(D,k.adler>>8&255),de(D,k.adler>>16&255),de(D,k.adler>>24&255),de(D,255&k.total_in),de(D,k.total_in>>8&255),de(D,k.total_in>>16&255),de(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0=G.w_size&&(N===0&&(Q(G.head),G.strstart=0,G.block_start=0,G.insert=0),H=new i.Buf8(G.w_size),i.arraySet(H,J,X-G.w_size,G.w_size,0),J=H,X=G.w_size),A=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ee(G);G.lookahead>=j;){for(D=G.strstart,S=G.lookahead-(j-1);G.ins_h=(G.ins_h<>>=j=O>>>24,_-=j,(j=O>>>16&255)===0)V[f++]=65535&O;else{if(!(16&j)){if(!(64&j)){O=C[(65535&O)+(v&(1<>>=j,_-=j),_<15&&(v+=b[l++]<<_,_+=8,v+=b[l++]<<_,_+=8),O=E[v&P];r:for(;;){if(v>>>=j=O>>>24,_-=j,!(16&(j=O>>>16&255))){if(!(64&j)){O=E[(65535&O)+(v&(1<>>=j,_-=j,(j=f-d)>3,v&=(1<<(_-=L<<3))-1,o.next_in=l,o.next_out=f,o.avail_in=l>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(R){var F;return R&&R.state?(F=R.state,R.total_in=R.total_out=F.total=0,R.msg="",F.wrap&&(R.adler=1&F.wrap),F.mode=y,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(p),F.distcode=F.distdyn=new o.Buf32(x),F.sane=1,F.back=-1,h):m}function C(R){var F;return R&&R.state?((F=R.state).wsize=0,F.whave=0,F.wnext=0,_(R)):m}function E(R,F){var b,V;return R&&R.state?(V=R.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=W.wsize?(o.arraySet(W.window,F,b-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(V<(te=W.wsize-W.wnext)&&(te=V),o.arraySet(W.window,F,b-V,te,W.wnext),(V-=te)?(o.arraySet(W.window,F,b-V,V,0),W.wnext=V,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,b.check=a(b.check,N,2,0),$=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){R.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){R.msg="unknown compression method",b.mode=30;break}if($-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){R.msg="invalid window size",b.mode=30;break}b.dmax=1<>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0,b.mode=3;case 3:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.time=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),$=z=0,b.mode=4;case 4:for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0,b.mode=5;case 5:if(1024&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),o.arraySet(b.head.extra,V,W,se,k)),512&b.flags&&(b.check=a(b.check,V,se,W)),I-=se,W+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=V[W+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se>9&1,b.head.done=!0),R.adler=b.check=0,b.mode=12;break;case 10:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}R.adler=b.check=g(z),$=z=0,b.mode=11;case 11:if(b.havedict===0)return R.next_out=Z,R.avail_out=Q,R.next_in=W,R.avail_in=I,b.hold=z,b.bits=$,2;R.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&$,$-=7&$,b.mode=27;break}for(;$<3;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}switch(b.last=1&z,$-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,$-=2;break e;case 2:b.mode=17;break;case 3:R.msg="invalid block type",b.mode=30}z>>>=2,$-=2;break;case 14:for(z>>>=7&$,$-=7&$;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if((65535&z)!=(z>>>16^65535)){R.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,$=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I>>=5,$-=5,b.ndist=1+(31&z),z>>>=5,$-=5,b.ncode=4+(15&z),z>>>=4,$-=4,286>>=3,$-=3}for(;b.have<19;)b.lens[A[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,G={bits:b.lenbits},J=c(0,b.lens,0,19,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(Pe<16)z>>>=ge,$-=ge,b.lens[b.have++]=Pe;else{if(Pe===16){for(D=ge+2;$>>=ge,$-=ge,b.have===0){R.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,$-=2}else if(Pe===17){for(D=ge+3;$>>=ge)),z>>>=3,$-=3}else{for(D=ge+7;$>>=ge)),z>>>=7,$-=7}if(b.have+se>b.nlen+b.ndist){R.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){R.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,G={bits:b.lenbits},J=c(f,b.lens,0,b.nlen,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,G={bits:b.distbits},J=c(d,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,G),b.distbits=G.bits,J){R.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){R.next_out=Z,R.avail_out=Q,R.next_in=W,R.avail_in=I,b.hold=z,b.bits=$,l(R,ne),Z=R.next_out,te=R.output,Q=R.avail_out,W=R.next_in,V=R.input,I=R.avail_in,z=b.hold,$=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;be=(S=b.lencode[z&(1<>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(be&&!(240&be)){for(Te=ge,Se=be,qe=Pe;be=(S=b.lencode[qe+((z&(1<>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Te,$-=Te,b.back+=Te}if(z>>>=ge,$-=ge,b.back+=ge,b.length=Pe,be===0){b.mode=26;break}if(32&be){b.back=-1,b.mode=12;break}if(64&be){R.msg="invalid literal/length code",b.mode=30;break}b.extra=15&be,b.mode=22;case 22:if(b.extra){for(D=b.extra;$>>=b.extra,$-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;be=(S=b.distcode[z&(1<>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(!(240&be)){for(Te=ge,Se=be,qe=Pe;be=(S=b.distcode[qe+((z&(1<>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Te,$-=Te,b.back+=Te}if(z>>>=ge,$-=ge,b.back+=ge,64&be){R.msg="invalid distance code",b.mode=30;break}b.offset=Pe,b.extra=15&be,b.mode=24;case 24:if(b.extra){for(D=b.extra;$>>=b.extra,$-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){R.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){R.msg="invalid distance too far back",b.mode=30;break}Ee=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),fe=b.window}else fe=te,Ee=Z-b.offset,se=b.length;for(QP?(j=Ee[fe+x[F]],$[de+x[F]]):(j=96,0),v=1<>Z)+(_-=v)]=O<<24|j<<16|L|0,_!==0;);for(v=1<>=1;if(v!==0?(z&=v-1,z+=v):z=0,F++,--ne[R]==0){if(R===V)break;R=d[h+x[F]]}if(te>>7)]}function de(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,A){S.bi_valid>g-A?(S.bi_buf|=N<>g-S.bi_valid,S.bi_valid+=A-g):(S.bi_buf|=N<>>=1,A<<=1,0<--N;);return A>>>1}function fe(S,N,A){var Y,M,H=new Array(x+1),X=0;for(Y=1;Y<=x;Y++)H[Y]=X=X+A[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ee(H[ee]++,ee))}}function ge(S){var N;for(N=0;N>1;1<=A;A--)Te(S,H,A);for(M=he;A=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Te(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=A,S.heap[--S.heap_max]=Y,H[2*M]=H[2*A]+H[2*Y],S.depth[M]=(S.depth[A]>=S.depth[Y]?S.depth[A]:S.depth[Y])+1,H[2*A+1]=H[2*Y+1]=M,S.heap[1]=M++,Te(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Oe,St){var Vr,Wt,Vn,et,Wn,Bn,Wr=St.dyn_tree,yc=St.max_code,wc=St.stat_desc.static_tree,Qo=St.stat_desc.has_stree,xc=St.stat_desc.extra_bits,Jo=St.stat_desc.extra_base,_n=St.stat_desc.max_length,Rs=0;for(et=0;et<=x;et++)Oe.bl_count[et]=0;for(Wr[2*Oe.heap[Oe.heap_max]+1]=0,Vr=Oe.heap_max+1;Vr>=7;M>>=1)if(1&Le&&ee.dyn_ltree[2*he]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(he=32;he>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=A+5,A+4<=M&&N!==-1?D(S,N,A,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Se(S,q,R)):(ne(S,4+(Y?1:0),3),function(ee,he,Le,Oe){var St;for(ne(ee,he-257,5),ne(ee,Le-1,5),ne(ee,Oe-4,4),St=0;St>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&A,S.last_lit++,N===0?S.dyn_ltree[2*A]++:(S.matches++,N--,S.dyn_ltree[2*(b[A]+d+1)]++,S.dyn_dtree[2*$(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,q),function(N){N.bi_valid===16?(de(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(o){(function(i,a){if(!i.setImmediate){var l,c,f,d,h=1,m={},y=!1,p=i.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(i);x=x&&x.setTimeout?x:i,l={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){v(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,E=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=E,C}}()?(d="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(C){i.postMessage(d+C,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){v(C.data)},function(C){f.port2.postMessage(C)}):p&&"onreadystatechange"in p.createElement("script")?(c=p.documentElement,function(C){var E=p.createElement("script");E.onreadystatechange=function(){v(C),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(C){setTimeout(v,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),T=0;T"u"?o===void 0?this:o:self)}).call(this,typeof Cc<"u"?Cc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(kC);var h5=kC.exports;const p5=cm(h5);function m5(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const g5=async(e,t)=>{const r=new p5;t.forEach(o=>{r.file(o.name,o.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},Dl=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},v5=e=>Dl(e).split(" ")[0],y5=async()=>jt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),w5=async e=>await jt().collection("domains").getOne(e),Yp=async e=>e.id?await jt().collection("domains").update(e.id,e):await jt().collection("domains").create(e),x5=async e=>await jt().collection("domains").delete(e),_5=(e,t)=>jt().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),b5=e=>{jt().collection("domains").unsubscribe(e)},S5=()=>{const e=vf(),t=Ss(),r=()=>{t("/edit")},n=d=>{t(`/edit?id=${d}`)},s=d=>{t(`/history?domain=${d}`)},o=async d=>{try{await x5(d),a(i.filter(h=>h.id!==d))}catch(h){console.error("Error deleting domain:",h)}},[i,a]=w.useState([]);w.useEffect(()=>{(async()=>{const h=await y5();a(h)})()},[]);const l=async d=>{const h=i.filter(x=>x.id===d),m=h[0].enabled,y=h[0];y.enabled=!m,await Yp(y);const p=i.map(x=>x.id===d?{...x,checked:!m}:x);a(p)},c=async d=>{try{b5(d.id),_5(d.id,h=>{console.log(h);const m=i.map(y=>y.id===h.id?{...h}:y);a(m)}),d.rightnow=!0,await Yp(d),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:u.jsxs(u.Fragment,{children:["执行失败,请查看",u.jsx(Kn,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},f=async d=>{const h=`${d.id}-${d.domain}.zip`,m=[{name:`${d.domain}.pem`,content:d.certificate?d.certificate:""},{name:`${d.domain}.key`,content:d.privateKey?d.privateKey:""}];await g5(h,m)};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(xv,{}),u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),u.jsx(Lt,{onClick:r,children:"新增域名"})]}),i.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-40",children:"域名"}),u.jsx("div",{className:"w-48",children:"有效期限"}),u.jsx("div",{className:"w-32",children:"最近执行状态"}),u.jsx("div",{className:"w-64",children:"最近执行阶段"}),u.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),u.jsx("div",{className:"w-32",children:"是否启用"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),i.map(d=>{var h,m,y,p,x,g;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:d.domain}),u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx("div",{children:d.expiredAt?u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"有效期90天"}),u.jsxs("div",{children:[v5(d.expiredAt),"到期"]})]}):"---"})}),u.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((h=d.expand)!=null&&h.lastDeployment)?u.jsx(u.Fragment,{children:((m=d.expand.lastDeployment)==null?void 0:m.phase)==="deploy"&&((y=d.expand.lastDeployment)!=null&&y.phaseSuccess)?u.jsx(n1,{size:16,className:"text-green-700"}):u.jsx(s1,{size:16,className:"text-red-700"})}):"---"}),u.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((p=d.expand)!=null&&p.lastDeployment)?u.jsx(hk,{phase:(x=d.expand.lastDeployment)==null?void 0:x.phase,phaseSuccess:(g=d.expand.lastDeployment)==null?void 0:g.phaseSuccess}):"---"}),u.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?Dl(d.lastDeployedAt):"---"}),u.jsx("div",{className:"sm:w-32 flex items-center",children:u.jsx(yC,{children:u.jsxs(u5,{children:[u.jsx(d5,{children:u.jsx(Yk,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),u.jsx(bv,{children:u.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:d.enabled?"禁用":"启用"})})]})})}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>s(d.id),children:"部署历史"}),u.jsxs(sw,{when:!!d.enabled,children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>c(d),children:"立即部署"})]}),u.jsxs(sw,{when:!!d.expiredAt,children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>f(d),children:"下载"})]}),!d.enabled&&u.jsxs(u.Fragment,{children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsxs(d3,{children:[u.jsx(f3,{asChild:!0,children:u.jsx(Lt,{variant:"link",className:"p-0",children:"删除"})}),u.jsxs(Ak,{children:[u.jsxs(Mk,{children:[u.jsx(Lk,{children:"删除域名"}),u.jsx(Fk,{children:"确定要删除域名吗?"})]}),u.jsxs(Ik,{children:[u.jsx(Uk,{children:"取消"}),u.jsx(zk,{onClick:()=>{o(d.id)},children:"确认"})]})]})]}),u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>n(d.id),children:"编辑"})]})]})]},d.id)})]}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(kp,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),u.jsx(Lt,{onClick:r,className:"mt-3",children:"添加域名"})]})})]})})},ht=w.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:we("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 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:n,...r}));ht.displayName="Input";var mc=e=>e.type==="checkbox",Ei=e=>e instanceof Date,fr=e=>e==null;const CC=e=>typeof e=="object";var Gt=e=>!fr(e)&&!Array.isArray(e)&&CC(e)&&!Ei(e),EC=e=>Gt(e)&&e.target?mc(e.target)?e.target.checked:e.target.value:e,k5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,TC=(e,t)=>e.has(k5(t)),C5=e=>{const t=e.constructor&&e.constructor.prototype;return Gt(t)&&t.hasOwnProperty("isPrototypeOf")},Sv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function xr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Sv&&(e instanceof Blob||e instanceof FileList))&&(r||Gt(e)))if(t=r?[]:{},!r&&!C5(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=xr(e[n]));else return e;return t}var bf=e=>Array.isArray(e)?e.filter(Boolean):[],It=e=>e===void 0,ce=(e,t,r)=>{if(!t||!Gt(e))return r;const n=bf(t.split(/[,[\].]+?/)).reduce((s,o)=>fr(s)?s:s[o],e);return It(n)||n===e?It(e[t])?r:e[t]:n},Rn=e=>typeof e=="boolean",kv=e=>/^\w*$/.test(e),RC=e=>bf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ct=(e,t,r)=>{let n=-1;const s=kv(t)?[t]:RC(t),o=s.length,i=o-1;for(;++nGe.useContext(NC),E5=e=>{const{children:t,...r}=e;return Ge.createElement(NC.Provider,{value:r},t)};var PC=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==an.all&&(t._proxyFormState[i]=!n||an.all),r&&(r[i]=!0),e[i]}});return s},Nr=e=>Gt(e)&&!Object.keys(e).length,jC=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Nr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||an.all))},tl=e=>Array.isArray(e)?e:[e],DC=(e,t,r)=>!e||!t||e===t||tl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Cv(e){const t=Ge.useRef(e);t.current=e,Ge.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function T5(e){const t=Sf(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,a]=Ge.useState(r._formState),l=Ge.useRef(!0),c=Ge.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=Ge.useRef(s);return f.current=s,Cv({disabled:n,next:d=>l.current&&DC(f.current,d.name,o)&&jC(d,c.current,r._updateFormState)&&a({...r._formState,...d}),subject:r._subjects.state}),Ge.useEffect(()=>(l.current=!0,c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),PC(i,r,c.current,!1)}var Pn=e=>typeof e=="string",OC=(e,t,r,n,s)=>Pn(e)?(n&&t.watch.add(e),ce(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),ce(r,o))):(n&&(t.watchAll=!0),r);function R5(e){const t=Sf(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},a=Ge.useRef(n);a.current=n,Cv({disabled:o,subject:r._subjects.values,next:f=>{DC(a.current,f.name,i)&&c(xr(OC(a.current,r._names,f.values||r._formValues,!1,s)))}});const[l,c]=Ge.useState(r._getWatch(n,s));return Ge.useEffect(()=>r._removeUnmounted()),l}function N5(e){const t=Sf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=TC(s._names.array,r),a=R5({control:s,name:r,defaultValue:ce(s._formValues,r,ce(s._defaultValues,r,e.defaultValue)),exact:!0}),l=T5({control:s,name:r}),c=Ge.useRef(s.register(r,{...e.rules,value:a,...Rn(e.disabled)?{disabled:e.disabled}:{}}));return Ge.useEffect(()=>{const f=s._options.shouldUnregister||o,d=(h,m)=>{const y=ce(s._fields,h);y&&y._f&&(y._f.mount=m)};if(d(r,!0),f){const h=xr(ce(s._options.defaultValues,r));ct(s._defaultValues,r,h),It(ce(s._formValues,r))&&ct(s._formValues,r,h)}return()=>{(i?f&&!s._state.action:f)?s.unregister(r):d(r,!1)}},[r,s,i,o]),Ge.useEffect(()=>{ce(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ce(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Rn(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:Ge.useCallback(f=>c.current.onChange({target:{value:EC(f),name:r},type:ud.CHANGE}),[r]),onBlur:Ge.useCallback(()=>c.current.onBlur({target:{value:ce(s._formValues,r),name:r},type:ud.BLUR}),[r,s]),ref:f=>{const d=ce(s._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ce(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!ce(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ce(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ce(l.validatingFields,r)},error:{enumerable:!0,get:()=>ce(l.errors,r)}})}}const P5=e=>e.render(N5(e));var AC=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},aw=e=>({isOnSubmit:!e||e===an.onSubmit,isOnBlur:e===an.onBlur,isOnChange:e===an.onChange,isOnAll:e===an.all,isOnTouch:e===an.onTouched}),lw=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const rl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=ce(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!n)break;if(i.ref&&t(i.ref,i.name)&&!n)break;rl(a,t)}else Gt(a)&&rl(a,t)}}};var j5=(e,t,r)=>{const n=tl(ce(e,r));return ct(n,"root",t[r]),ct(e,r,n),e},Ev=e=>e.type==="file",Bs=e=>typeof e=="function",dd=e=>{if(!Sv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ku=e=>Pn(e),Tv=e=>e.type==="radio",fd=e=>e instanceof RegExp;const cw={value:!1,isValid:!1},uw={value:!0,isValid:!0};var MC=e=>{if(Array.isArray(e)){if(e.length>1){const 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&&!It(e[0].attributes.value)?It(e[0].value)||e[0].value===""?uw:{value:e[0].value,isValid:!0}:uw:cw}return cw};const dw={isValid:!1,value:null};var IC=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,dw):dw;function fw(e,t,r="validate"){if(ku(e)||Array.isArray(e)&&e.every(ku)||Rn(e)&&!e)return{type:r,message:ku(e)?e:"",ref:t}}var ci=e=>Gt(e)&&!fd(e)?e:{value:e,message:""},hw=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:f,max:d,pattern:h,validate:m,name:y,valueAsNumber:p,mount:x,disabled:g}=e._f,v=ce(t,y);if(!x||g)return{};const _=i?i[0]:o,C=R=>{n&&_.reportValidity&&(_.setCustomValidity(Rn(R)?"":R||""),_.reportValidity())},E={},T=Tv(o),P=mc(o),O=T||P,j=(p||Ev(o))&&It(o.value)&&It(v)||dd(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,L=AC.bind(null,y,r,E),q=(R,F,b,V=Gn.maxLength,te=Gn.minLength)=>{const W=R?F:b;E[y]={type:R?V:te,message:W,ref:o,...L(R?V:te,W)}};if(s?!Array.isArray(v)||!v.length:a&&(!O&&(j||fr(v))||Rn(v)&&!v||P&&!MC(i).isValid||T&&!IC(i).isValid)){const{value:R,message:F}=ku(a)?{value:!!a,message:a}:ci(a);if(R&&(E[y]={type:Gn.required,message:F,ref:_,...L(Gn.required,F)},!r))return C(F),E}if(!j&&(!fr(f)||!fr(d))){let R,F;const b=ci(d),V=ci(f);if(!fr(v)&&!isNaN(v)){const te=o.valueAsNumber||v&&+v;fr(b.value)||(R=te>b.value),fr(V.value)||(F=tenew Date(new Date().toDateString()+" "+Q),Z=o.type=="time",I=o.type=="week";Pn(b.value)&&v&&(R=Z?W(v)>W(b.value):I?v>b.value:te>new Date(b.value)),Pn(V.value)&&v&&(F=Z?W(v)+R.value,V=!fr(F.value)&&v.length<+F.value;if((b||V)&&(q(b,R.message,F.message),!r))return C(E[y].message),E}if(h&&!j&&Pn(v)){const{value:R,message:F}=ci(h);if(fd(R)&&!v.match(R)&&(E[y]={type:Gn.pattern,message:F,ref:o,...L(Gn.pattern,F)},!r))return C(F),E}if(m){if(Bs(m)){const R=await m(v,t),F=fw(R,_);if(F&&(E[y]={...F,...L(Gn.validate,F.message)},!r))return C(F.message),E}else if(Gt(m)){let R={};for(const F in m){if(!Nr(R)&&!r)break;const b=fw(await m[F](v,t),_,F);b&&(R={...b,...L(F,b.message)},C(b.message),r&&(E[y]=R))}if(!Nr(R)&&(E[y]={ref:_,...R},!r))return E}}return C(!0),E};function D5(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},hd=e=>fr(e)||!CC(e);function Ro(e,t){if(hd(e)||hd(t))return e===t;if(Ei(e)&&Ei(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const o=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Ei(o)&&Ei(i)||Gt(o)&&Gt(i)||Array.isArray(o)&&Array.isArray(i)?!Ro(o,i):o!==i)return!1}}return!0}var LC=e=>e.type==="select-multiple",A5=e=>Tv(e)||mc(e),Ch=e=>dd(e)&&e.isConnected,FC=e=>{for(const t in e)if(Bs(e[t]))return!0;return!1};function pd(e,t={}){const r=Array.isArray(e);if(Gt(e)||r)for(const n in e)Array.isArray(e[n])||Gt(e[n])&&!FC(e[n])?(t[n]=Array.isArray(e[n])?[]:{},pd(e[n],t[n])):fr(e[n])||(t[n]=!0);return t}function zC(e,t,r){const n=Array.isArray(e);if(Gt(e)||n)for(const s in e)Array.isArray(e[s])||Gt(e[s])&&!FC(e[s])?It(t)||hd(r[s])?r[s]=Array.isArray(e[s])?pd(e[s],[]):{...pd(e[s])}:zC(e[s],fr(t)?{}:t[s],r[s]):r[s]=!Ro(e[s],t[s]);return r}var ru=(e,t)=>zC(e,t,pd(t)),UC=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>It(e)?e:t?e===""?NaN:e&&+e:r&&Pn(e)?new Date(e):n?n(e):e;function Eh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Ev(t)?t.files:Tv(t)?IC(e.refs).value:LC(t)?[...t.selectedOptions].map(({value:r})=>r):mc(t)?MC(e.refs).value:UC(It(t.value)?e.ref.value:t.value,e)}var M5=(e,t,r,n)=>{const s={};for(const o of e){const i=ce(t,o);i&&ct(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Aa=e=>It(e)?e:fd(e)?e.source:Gt(e)?fd(e.value)?e.value.source:e.value:e,I5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pw(e,t,r){const n=ce(e,r);if(n||kv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=ce(t,o),a=ce(e,o);if(i&&!Array.isArray(i)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:r}}var L5=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,F5=(e,t)=>!bf(ce(e,t)).length&&Bt(e,t);const z5={mode:an.onSubmit,reValidateMode:an.onChange,shouldFocusError:!0};function U5(e={}){let t={...z5,...e},r={submitCount:0,isDirty:!1,isLoading:Bs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Gt(t.defaultValues)||Gt(t.values)?xr(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:xr(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:kh(),array:kh(),state:kh()},h=aw(t.mode),m=aw(t.reValidateMode),y=t.criteriaMode===an.all,p=S=>N=>{clearTimeout(c),c=setTimeout(S,N)},x=async S=>{if(f.isValid||S){const N=t.resolver?Nr((await O()).errors):await L(n,!0);N!==r.isValid&&d.state.next({isValid:N})}},g=(S,N)=>{(f.isValidating||f.validatingFields)&&((S||Array.from(a.mount)).forEach(A=>{A&&(N?ct(r.validatingFields,A,N):Bt(r.validatingFields,A))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Nr(r.validatingFields)}))},v=(S,N=[],A,Y,M=!0,H=!0)=>{if(Y&&A){if(i.action=!0,H&&Array.isArray(ce(n,S))){const X=A(ce(n,S),Y.argA,Y.argB);M&&ct(n,S,X)}if(H&&Array.isArray(ce(r.errors,S))){const X=A(ce(r.errors,S),Y.argA,Y.argB);M&&ct(r.errors,S,X),F5(r.errors,S)}if(f.touchedFields&&H&&Array.isArray(ce(r.touchedFields,S))){const X=A(ce(r.touchedFields,S),Y.argA,Y.argB);M&&ct(r.touchedFields,S,X)}f.dirtyFields&&(r.dirtyFields=ru(s,o)),d.state.next({name:S,isDirty:R(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ct(o,S,N)},_=(S,N)=>{ct(r.errors,S,N),d.state.next({errors:r.errors})},C=S=>{r.errors=S,d.state.next({errors:r.errors,isValid:!1})},E=(S,N,A,Y)=>{const M=ce(n,S);if(M){const H=ce(o,S,It(A)?ce(s,S):A);It(H)||Y&&Y.defaultChecked||N?ct(o,S,N?H:Eh(M._f)):V(S,H),i.mount&&x()}},T=(S,N,A,Y,M)=>{let H=!1,X=!1;const ee={name:S},he=!!(ce(n,S)&&ce(n,S)._f&&ce(n,S)._f.disabled);if(!A||Y){f.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=R(),H=X!==ee.isDirty);const Le=he||Ro(ce(s,S),N);X=!!(!he&&ce(r.dirtyFields,S)),Le||he?Bt(r.dirtyFields,S):ct(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||f.dirtyFields&&X!==!Le}if(A){const Le=ce(r.touchedFields,S);Le||(ct(r.touchedFields,S,A),ee.touchedFields=r.touchedFields,H=H||f.touchedFields&&Le!==A)}return H&&M&&d.state.next(ee),H?ee:{}},P=(S,N,A,Y)=>{const M=ce(r.errors,S),H=f.isValid&&Rn(N)&&r.isValid!==N;if(e.delayError&&A?(l=p(()=>_(S,A)),l(e.delayError)):(clearTimeout(c),l=null,A?ct(r.errors,S,A):Bt(r.errors,S)),(A?!Ro(M,A):M)||!Nr(Y)||H){const X={...Y,...H&&Rn(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},d.state.next(X)}},O=async S=>{g(S,!0);const N=await t.resolver(o,t.context,M5(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return g(S),N},j=async S=>{const{errors:N}=await O(S);if(S)for(const A of S){const Y=ce(N,A);Y?ct(r.errors,A,Y):Bt(r.errors,A)}else r.errors=N;return N},L=async(S,N,A={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);g([Y],!0);const he=await hw(M,o,y,t.shouldUseNativeValidation&&!N,ee);if(g([Y]),he[H.name]&&(A.valid=!1,N))break;!N&&(ce(he,H.name)?ee?j5(r.errors,he,H.name):ct(r.errors,H.name,he[H.name]):Bt(r.errors,H.name))}X&&await L(X,N,A)}}return A.valid},q=()=>{for(const S of a.unMount){const N=ce(n,S);N&&(N._f.refs?N._f.refs.every(A=>!Ch(A)):!Ch(N._f.ref))&&Ee(S)}a.unMount=new Set},R=(S,N)=>(S&&N&&ct(o,S,N),!Ro(z(),s)),F=(S,N,A)=>OC(S,a,{...i.mount?o:It(N)?s:Pn(S)?{[S]:N}:N},A,N),b=S=>bf(ce(i.mount?o:s,S,e.shouldUnregister?ce(s,S,[]):[])),V=(S,N,A={})=>{const Y=ce(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&ct(o,S,UC(N,H)),M=dd(H.ref)&&fr(N)?"":N,LC(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?mc(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):Ev(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||d.values.next({name:S,values:{...o}})))}(A.shouldDirty||A.shouldTouch)&&T(S,M,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&Q(S)},te=(S,N,A)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=ce(n,H);(a.array.has(S)||!hd(M)||X&&!X._f)&&!Ei(M)?te(H,M,A):V(H,M,A)}},W=(S,N,A={})=>{const Y=ce(n,S),M=a.array.has(S),H=xr(N);ct(o,S,H),M?(d.array.next({name:S,values:{...o}}),(f.isDirty||f.dirtyFields)&&A.shouldDirty&&d.state.next({name:S,dirtyFields:ru(s,o),isDirty:R(S,H)})):Y&&!Y._f&&!fr(H)?te(S,H,A):V(S,H,A),lw(S,a)&&d.state.next({...r}),d.values.next({name:i.mount?S:void 0,values:{...o}})},Z=async S=>{i.mount=!0;const N=S.target;let A=N.name,Y=!0;const M=ce(n,A),H=()=>N.type?Eh(M._f):EC(S),X=ee=>{Y=Number.isNaN(ee)||ee===ce(o,A,ee)};if(M){let ee,he;const Le=H(),Oe=S.type===ud.BLUR||S.type===ud.FOCUS_OUT,St=!I5(M._f)&&!t.resolver&&!ce(r.errors,A)&&!M._f.deps||L5(Oe,ce(r.touchedFields,A),r.isSubmitted,m,h),Vr=lw(A,a,Oe);ct(o,A,Le),Oe?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Wt=T(A,Le,Oe,!1),Vn=!Nr(Wt)||Vr;if(!Oe&&d.values.next({name:A,type:S.type,values:{...o}}),St)return f.isValid&&x(),Vn&&d.state.next({name:A,...Vr?{}:Wt});if(!Oe&&Vr&&d.state.next({...r}),t.resolver){const{errors:et}=await O([A]);if(X(Le),Y){const Wn=pw(r.errors,n,A),Bn=pw(et,n,Wn.name||A);ee=Bn.error,A=Bn.name,he=Nr(et)}}else g([A],!0),ee=(await hw(M,o,y,t.shouldUseNativeValidation))[A],g([A]),X(Le),Y&&(ee?he=!1:f.isValid&&(he=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),P(A,he,ee,Wt))}},I=(S,N)=>{if(ce(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let A,Y;const M=tl(S);if(t.resolver){const H=await j(It(S)?S:M);A=Nr(H),Y=S?!M.some(X=>ce(H,X)):A}else S?(Y=(await Promise.all(M.map(async H=>{const X=ce(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&x()):Y=A=await L(n);return d.state.next({...!Pn(S)||f.isValid&&A!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:A}:{},errors:r.errors}),N.shouldFocus&&!Y&&rl(n,I,S?M:a.mount),Y},z=S=>{const N={...i.mount?o:s};return It(S)?N:Pn(S)?ce(N,S):S.map(A=>ce(N,A))},$=(S,N)=>({invalid:!!ce((N||r).errors,S),isDirty:!!ce((N||r).dirtyFields,S),error:ce((N||r).errors,S),isValidating:!!ce(r.validatingFields,S),isTouched:!!ce((N||r).touchedFields,S)}),de=S=>{S&&tl(S).forEach(N=>Bt(r.errors,N)),d.state.next({errors:S?r.errors:{}})},ne=(S,N,A)=>{const Y=(ce(n,S,{_f:{}})._f||{}).ref,M=ce(r.errors,S)||{},{ref:H,message:X,type:ee,...he}=M;ct(r.errors,S,{...he,...N,ref:Y}),d.state.next({name:S,errors:r.errors,isValid:!1}),A&&A.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Bs(S)?d.values.subscribe({next:A=>S(F(void 0,N),A)}):F(S,N,!0),Ee=(S,N={})=>{for(const A of S?tl(S):a.mount)a.mount.delete(A),a.array.delete(A),N.keepValue||(Bt(n,A),Bt(o,A)),!N.keepError&&Bt(r.errors,A),!N.keepDirty&&Bt(r.dirtyFields,A),!N.keepTouched&&Bt(r.touchedFields,A),!N.keepIsValidating&&Bt(r.validatingFields,A),!t.shouldUnregister&&!N.keepDefaultValue&&Bt(s,A);d.values.next({values:{...o}}),d.state.next({...r,...N.keepDirty?{isDirty:R()}:{}}),!N.keepIsValid&&x()},fe=({disabled:S,name:N,field:A,fields:Y,value:M})=>{if(Rn(S)&&i.mount||S){const H=S?void 0:It(M)?Eh(A?A._f:ce(Y,N)._f):M;ct(o,N,H),T(N,H,!1,!1,!0)}},ge=(S,N={})=>{let A=ce(n,S);const Y=Rn(N.disabled);return ct(n,S,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),A?fe({field:A,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Aa(N.min),max:Aa(N.max),minLength:Aa(N.minLength),maxLength:Aa(N.maxLength),pattern:Aa(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ge(S,N),A=ce(n,S);const H=It(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=A5(H),ee=A._f.refs||[];if(X?ee.find(he=>he===H):H===A._f.ref)return;ct(n,S,{_f:{...A._f,...X?{refs:[...ee.filter(Ch),H,...Array.isArray(ce(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else A=ce(n,S,{}),A._f&&(A._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(TC(a.array,S)&&i.action)&&a.unMount.add(S)}}},be=()=>t.shouldFocusError&&rl(n,I,a.mount),Pe=S=>{Rn(S)&&(d.state.next({disabled:S}),rl(n,(N,A)=>{const Y=ce(n,A);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},Te=(S,N)=>async A=>{let Y;A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let M=xr(o);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await O();r.errors=H,M=X}else await L(n);if(Bt(r.errors,"root"),Nr(r.errors)){d.state.next({errors:{}});try{await S(M,A)}catch(H){Y=H}}else N&&await N({...r.errors},A),be(),setTimeout(be);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Se=(S,N={})=>{ce(n,S)&&(It(N.defaultValue)?W(S,xr(ce(s,S))):(W(S,N.defaultValue),ct(s,S,xr(N.defaultValue))),N.keepTouched||Bt(r.touchedFields,S),N.keepDirty||(Bt(r.dirtyFields,S),r.isDirty=N.defaultValue?R(S,xr(ce(s,S))):R()),N.keepError||(Bt(r.errors,S),f.isValid&&x()),d.state.next({...r}))},qe=(S,N={})=>{const A=S?xr(S):s,Y=xr(A),M=Nr(S),H=M?s:Y;if(N.keepDefaultValues||(s=A),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)ce(r.dirtyFields,X)?ct(H,X,ce(o,X)):W(X,ce(H,X));else{if(Sv&&It(S))for(const X of a.mount){const ee=ce(n,X);if(ee&&ee._f){const he=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(dd(he)){const Le=he.closest("form");if(Le){Le.reset();break}}}}n={}}o=e.shouldUnregister?N.keepDefaultValues?xr(s):{}:xr(H),d.array.next({values:{...H}}),d.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!N.keepIsValid||!!N.keepDirtyValues,i.watch=!!e.shouldUnregister,d.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ro(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&o?ru(s,o):r.dirtyFields:N.keepDefaultValues&&S?ru(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>qe(Bs(S)?S(o):S,N);return{control:{register:ge,unregister:Ee,getFieldState:$,handleSubmit:Te,setError:ne,_executeSchema:O,_getWatch:F,_getDirty:R,_updateValid:x,_removeUnmounted:q,_updateFieldArray:v,_updateDisabledField:fe,_getFieldArray:b,_reset:qe,_resetDefaultValues:()=>Bs(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Pe,_subjects:d,_proxyFormState:f,_setErrors:C,get _fields(){return n},get _formValues(){return o},get _state(){return i},set _state(S){i=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ge,handleSubmit:Te,watch:se,setValue:W,getValues:z,reset:k,resetField:Se,clearErrors:de,unregister:Ee,setError:ne,setFocus:(S,N={})=>{const A=ce(n,S),Y=A&&A._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:$}}function pa(e={}){const t=Ge.useRef(),r=Ge.useRef(),[n,s]=Ge.useState({isDirty:!1,isValidating:!1,isLoading:Bs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Bs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...U5(e),formState:n});const o=t.current.control;return o._options=e,Cv({subject:o._subjects.state,next:i=>{jC(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),Ge.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ge.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),Ge.useEffect(()=>{e.values&&!Ro(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),Ge.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),Ge.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),Ge.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=PC(n,o),t.current}const mw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ce(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},$C=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?mw(n.ref,r,e):n.refs&&n.refs.forEach(s=>mw(s,r,e))}},$5=(e,t)=>{t.shouldUseNativeValidation&&$C(e,t);const r={};for(const n in e){const s=ce(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(V5(t.names||Object.keys(e),n)){const i=Object.assign({},ce(r,n));ct(i,"root",o),ct(r,n,i)}else ct(r,n,o)}return r},V5=(e,t)=>e.some(r=>r.startsWith(t+"."));var W5=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var l=r[i].types,c=l&&l[n.code];r[i]=AC(i,t,r,s,c?[].concat(c,n.message):n.message)}e.shift()}return r},ma=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(c){return o.shouldUseNativeValidation&&$C({},o),{errors:{},values:r.raw?n:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:$5(W5(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Qe;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Qe||(Qe={}));var Zp;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Zp||(Zp={}));const ye=Qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zs=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},ie=Qe.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"]),B5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const 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){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,l=0;for(;lr.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const Xi=(e,t)=>{let r;switch(e.code){case ie.invalid_type:e.received===ye.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Qe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${Qe.joinValues(e.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Qe.joinValues(e.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${Qe.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.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}"`:Qe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ie.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 ie.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 ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=t.defaultError,Qe.assertNever(e)}return{message:r}};let VC=Xi;function H5(e){VC=e}function md(){return VC}const gd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Y5=[];function pe(e,t){const r=md(),n=gd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Xi?void 0:Xi].filter(s=>!!s)});e.common.issues.push(n)}class lr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return Ie;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,i=await s.value;n.push({key:o,value:i})}return lr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}}const Ie=Object.freeze({status:"aborted"}),Ti=e=>({status:"dirty",value:e}),pr=e=>({status:"valid",value:e}),Gp=e=>e.status==="aborted",Kp=e=>e.status==="dirty",Ol=e=>e.status==="valid",Al=e=>typeof Promise<"u"&&e instanceof Promise;function vd(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function WC(e,t,r,n,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));var $a,Va;class Ln{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}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}}const gw=(e,t)=>{if(Ol(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;const r=new Lr(e.common.issues);return this._error=r,this._error}}};function Fe(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var l,c;const{message:f}=e;return i.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(l=f??n)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=f??r)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Be{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 zs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new lr,ctx:{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Al(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return gw(s,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(Al(s)?s:Promise.resolve(s));return gw(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ie.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new yn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return An.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fn.create(this,this._def)}promise(){return Ji.create(this,this._def)}or(t){return Fl.create([this,t],this._def)}and(t){return zl.create(this,t,this._def)}transform(t){return new yn({...Fe(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Bl({...Fe(this._def),innerType:this,defaultValue:r,typeName:Ae.ZodDefault})}brand(){return new Rv({typeName:Ae.ZodBranded,type:this,...Fe(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Hl({...Fe(this._def),innerType:this,catchValue:r,typeName:Ae.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return gc.create(this,t)}readonly(){return Yl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Z5=/^c[^\s-]{8,}$/i,G5=/^[0-9a-z]+$/,K5=/^[0-9A-HJKMNP-TV-Z]{26}$/,q5=/^[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,X5=/^[a-z0-9_-]{21}$/i,Q5=/^[-+]?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)?)??$/,J5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ez="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Th;const 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])$/,rz=/^(([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})))$/,nz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,BC="((\\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])))",sz=new RegExp(`^${BC}$`);function HC(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(`^${HC(e)}$`)}function YC(e){let t=`${BC}T${HC(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function iz(e,t){return!!((t==="v4"||!t)&&tz.test(e)||(t==="v6"||!t)&&rz.test(e))}class cn extends Be{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.string,received:o.parsedType}),Ie}const n=new lr;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.lengtht.test(s),{validation:r,code:ie.invalid_string,...Ce.errToObj(n)})}_addCheck(t){return new cn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...Ce.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ce.errToObj(r)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new cn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new cn({...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(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new cn({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Fe(e)})};function az(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class oo extends Be{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)!==ye.number){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.number,received:o.parsedType}),Ie}let n;const s=new lr;for(const o of this._def.checks)o.kind==="int"?Qe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?az(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_finite,message:o.message}),s.dirty()):Qe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new oo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new oo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Qe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew oo({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Fe(e)});class io extends Be{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)!==ye.bigint){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.bigint,received:o.parsedType}),Ie}let n;const s=new lr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Qe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new io({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Fe(e)})};class Ml extends Be{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.boolean,received:n.parsedType}),Ie}return pr(t.data)}}Ml.create=e=>new Ml({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Fe(e)});class Wo extends Be{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.date,received:o.parsedType}),Ie}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_date}),Ie}const n=new lr;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Qe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(r)})}get minDate(){let t=null;for(const 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(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew Wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Fe(e)});class yd extends Be{_parse(t){if(this._getType(t)!==ye.symbol){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.symbol,received:n.parsedType}),Ie}return pr(t.data)}}yd.create=e=>new yd({typeName:Ae.ZodSymbol,...Fe(e)});class Il extends Be{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.undefined,received:n.parsedType}),Ie}return pr(t.data)}}Il.create=e=>new Il({typeName:Ae.ZodUndefined,...Fe(e)});class Ll extends Be{_parse(t){if(this._getType(t)!==ye.null){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.null,received:n.parsedType}),Ie}return pr(t.data)}}Ll.create=e=>new Ll({typeName:Ae.ZodNull,...Fe(e)});class Qi extends Be{constructor(){super(...arguments),this._any=!0}_parse(t){return pr(t.data)}}Qi.create=e=>new Qi({typeName:Ae.ZodAny,...Fe(e)});class Do extends Be{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pr(t.data)}}Do.create=e=>new Do({typeName:Ae.ZodUnknown,...Fe(e)});class ys extends Be{_parse(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ie.invalid_type,expected:ye.never,received:r.parsedType}),Ie}}ys.create=e=>new ys({typeName:Ae.ZodNever,...Fe(e)});class wd extends Be{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.void,received:n.parsedType}),Ie}return pr(t.data)}}wd.create=e=>new wd({typeName:Ae.ZodVoid,...Fe(e)});class fn extends Be{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ye.array)return pe(r,{code:ie.invalid_type,expected:ye.array,received:r.parsedType}),Ie;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,a=r.data.lengths.maxLength.value&&(pe(r,{code:ie.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Ln(r,i,r.path,a)))).then(i=>lr.mergeArray(n,i));const o=[...r.data].map((i,a)=>s.type._parseSync(new Ln(r,i,r.path,a)));return lr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new fn({...this._def,minLength:{value:t,message:Ce.toString(r)}})}max(t,r){return new fn({...this._def,maxLength:{value:t,message:Ce.toString(r)}})}length(t,r){return new fn({...this._def,exactLength:{value:t,message:Ce.toString(r)}})}nonempty(t){return this.min(1,t)}}fn.create=(e,t)=>new fn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Fe(t)});function di(e){if(e instanceof Tt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=An.create(di(n))}return new Tt({...e._def,shape:()=>t})}else return e instanceof fn?new fn({...e._def,type:di(e.element)}):e instanceof An?An.create(di(e.unwrap())):e instanceof lo?lo.create(di(e.unwrap())):e instanceof Fn?Fn.create(e.items.map(t=>di(t))):e}class Tt extends Be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Qe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return pe(c,{code:ie.invalid_type,expected:ye.object,received:c.parsedType}),Ie}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ys&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const f=o[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:f._parse(new Ln(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof ys){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of a)l.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(c==="strict")a.length>0&&(pe(s,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of a){const d=s.data[f];l.push({key:{status:"valid",value:f},value:c._parse(new Ln(s,d,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of l){const d=await f.key,h=await f.value;c.push({key:d,value:h,alwaysSet:f.alwaysSet})}return c}).then(c=>lr.mergeObjectSync(n,c)):lr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Ce.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Tt({...this._def,unknownKeys:"strip"})}passthrough(){return new Tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ae.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Tt({...this._def,catchall:t})}pick(t){const r={};return Qe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Tt({...this._def,shape:()=>r})}omit(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Tt({...this._def,shape:()=>r})}deepPartial(){return di(this)}partial(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Tt({...this._def,shape:()=>r})}required(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof An;)o=o._def.innerType;r[n]=o}}),new Tt({...this._def,shape:()=>r})}keyof(){return ZC(Qe.objectKeys(this.shape))}}Tt.create=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strip",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});Tt.strictCreate=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strict",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});Tt.lazycreate=(e,t)=>new Tt({shape:e,unknownKeys:"strip",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});class Fl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Lr(a.ctx.common.issues));return pe(r,{code:ie.invalid_union,unionErrors:i}),Ie}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},f=l._parseSync({data:r.data,path:r.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Lr(l));return pe(r,{code:ie.invalid_union,unionErrors:a}),Ie}}get options(){return this._def.options}}Fl.create=(e,t)=>new Fl({options:e,typeName:Ae.ZodUnion,...Fe(t)});const qn=e=>e instanceof $l?qn(e.schema):e instanceof yn?qn(e.innerType()):e instanceof Vl?[e.value]:e instanceof ao?e.options:e instanceof Wl?Qe.objectValues(e.enum):e instanceof Bl?qn(e._def.innerType):e instanceof Il?[void 0]:e instanceof Ll?[null]:e instanceof An?[void 0,...qn(e.unwrap())]:e instanceof lo?[null,...qn(e.unwrap())]:e instanceof Rv||e instanceof Yl?qn(e.unwrap()):e instanceof Hl?qn(e._def.innerType):[];class kf extends Be{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return pe(r,{code:ie.invalid_type,expected:ye.object,received:r.parsedType}),Ie;const n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(pe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const o of r){const i=qn(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new kf({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Fe(n)})}}function qp(e,t){const r=zs(e),n=zs(t);if(e===t)return{valid:!0,data:e};if(r===ye.object&&n===ye.object){const s=Qe.objectKeys(t),o=Qe.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=qp(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(r===ye.array&&n===ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{if(Gp(o)||Gp(i))return Ie;const a=qp(o.value,i.value);return a.valid?((Kp(o)||Kp(i))&&r.dirty(),{status:r.value,value:a.data}):(pe(n,{code:ie.invalid_intersection_types}),Ie)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}zl.create=(e,t,r)=>new zl({left:e,right:t,typeName:Ae.ZodIntersection,...Fe(r)});class Fn extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.array)return pe(n,{code:ie.invalid_type,expected:ye.array,received:n.parsedType}),Ie;if(n.data.lengththis._def.items.length&&(pe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ln(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>lr.mergeArray(r,i)):lr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Fn({...this._def,rest:t})}}Fn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:e,typeName:Ae.ZodTuple,rest:null,...Fe(t)})};class Ul extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return pe(n,{code:ie.invalid_type,expected:ye.object,received:n.parsedType}),Ie;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in n.data)s.push({key:o._parse(new Ln(n,a,n.path,a)),value:i._parse(new Ln(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?lr.mergeObjectAsync(r,s):lr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Be?new Ul({keyType:t,valueType:r,typeName:Ae.ZodRecord,...Fe(n)}):new Ul({keyType:cn.create(),valueType:t,typeName:Ae.ZodRecord,...Fe(r)})}}class xd extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.map)return pe(n,{code:ie.invalid_type,expected:ye.map,received:n.parsedType}),Ie;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new Ln(n,a,n.path,[c,"key"])),value:o._parse(new Ln(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,f=await l.value;if(c.status==="aborted"||f.status==="aborted")return Ie;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,f=l.value;if(c.status==="aborted"||f.status==="aborted")return Ie;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}}}}xd.create=(e,t,r)=>new xd({valueType:t,keyType:e,typeName:Ae.ZodMap,...Fe(r)});class Bo extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.set)return pe(n,{code:ie.invalid_type,expected:ye.set,received:n.parsedType}),Ie;const s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(pe(n,{code:ie.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const f of l){if(f.status==="aborted")return Ie;f.status==="dirty"&&r.dirty(),c.add(f.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>o._parse(new Ln(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,r){return new Bo({...this._def,minSize:{value:t,message:Ce.toString(r)}})}max(t,r){return new Bo({...this._def,maxSize:{value:t,message:Ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Bo.create=(e,t)=>new Bo({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Fe(t)});class $i extends Be{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.function)return pe(r,{code:ie.invalid_type,expected:ye.function,received:r.parsedType}),Ie;function n(a,l){return gd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Xi].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function s(a,l){return gd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Xi].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Ji){const a=this;return pr(async function(...l){const c=new Lr([]),f=await a._def.args.parseAsync(l,o).catch(m=>{throw c.addIssue(n(l,m)),c}),d=await Reflect.apply(i,this,f);return await a._def.returns._def.type.parseAsync(d,o).catch(m=>{throw c.addIssue(s(d,m)),c})})}else{const a=this;return pr(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Lr([n(l,c.error)]);const f=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(f,o);if(!d.success)throw new Lr([s(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $i({...this._def,args:Fn.create(t).rest(Do.create())})}returns(t){return new $i({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new $i({args:t||Fn.create([]).rest(Do.create()),returns:r||Do.create(),typeName:Ae.ZodFunction,...Fe(n)})}}class $l extends Be{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$l.create=(e,t)=>new $l({getter:e,typeName:Ae.ZodLazy,...Fe(t)});class Vl extends Be{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}Vl.create=(e,t)=>new Vl({value:e,typeName:Ae.ZodLiteral,...Fe(t)});function ZC(e,t){return new ao({values:e,typeName:Ae.ZodEnum,...Fe(t)})}class ao extends Be{constructor(){super(...arguments),$a.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{expected:Qe.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Ie}if(vd(this,$a)||WC(this,$a,new Set(this._def.values)),!vd(this,$a).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Ie}return pr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ao.create(t,{...this._def,...r})}exclude(t,r=this._def){return ao.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}$a=new WeakMap;ao.create=ZC;class Wl extends Be{constructor(){super(...arguments),Va.set(this,void 0)}_parse(t){const r=Qe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ye.string&&n.parsedType!==ye.number){const s=Qe.objectValues(r);return pe(n,{expected:Qe.joinValues(s),received:n.parsedType,code:ie.invalid_type}),Ie}if(vd(this,Va)||WC(this,Va,new Set(Qe.getValidEnumValues(this._def.values))),!vd(this,Va).has(t.data)){const s=Qe.objectValues(r);return pe(n,{received:n.data,code:ie.invalid_enum_value,options:s}),Ie}return pr(t.data)}get enum(){return this._def.values}}Va=new WeakMap;Wl.create=(e,t)=>new Wl({values:e,typeName:Ae.ZodNativeEnum,...Fe(t)});class Ji extends Be{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.promise&&r.common.async===!1)return pe(r,{code:ie.invalid_type,expected:ye.promise,received:r.parsedType}),Ie;const n=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return pr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ji.create=(e,t)=>new Ji({type:e,typeName:Ae.ZodPromise,...Fe(t)});class yn extends Be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{pe(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return Ie;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Ie:l.status==="dirty"||r.value==="dirty"?Ti(l.value):l});{if(r.value==="aborted")return Ie;const a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?Ie:a.status==="dirty"||r.value==="dirty"?Ti(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ie:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ie:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ol(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ol(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);Qe.assertNever(s)}}yn.create=(e,t,r)=>new yn({schema:e,typeName:Ae.ZodEffects,effect:t,...Fe(r)});yn.createWithPreprocess=(e,t,r)=>new yn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Fe(r)});class An extends Be{_parse(t){return this._getType(t)===ye.undefined?pr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}An.create=(e,t)=>new An({innerType:e,typeName:Ae.ZodOptional,...Fe(t)});class lo extends Be{_parse(t){return this._getType(t)===ye.null?pr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ae.ZodNullable,...Fe(t)});class Bl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ye.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Bl.create=(e,t)=>new Bl({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Fe(t)});class Hl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Al(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Hl.create=(e,t)=>new Hl({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Fe(t)});class _d extends Be{_parse(t){if(this._getType(t)!==ye.nan){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.nan,received:n.parsedType}),Ie}return{status:"valid",value:t.data}}}_d.create=e=>new _d({typeName:Ae.ZodNaN,...Fe(e)});const lz=Symbol("zod_brand");class Rv extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class gc extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Ie:o.status==="dirty"?(r.dirty(),Ti(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ie:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new gc({in:t,out:r,typeName:Ae.ZodPipeline})}}class Yl extends Be{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Ol(s)&&(s.value=Object.freeze(s.value)),s);return Al(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Yl.create=(e,t)=>new Yl({innerType:e,typeName:Ae.ZodReadonly,...Fe(t)});function GC(e,t={},r){return e?Qi.create().superRefine((n,s)=>{var o,i;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Qi.create()}const cz={object:Tt.lazycreate};var Ae;(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"})(Ae||(Ae={}));const uz=(e,t={message:`Input not instance of ${e.name}`})=>GC(r=>r instanceof e,t),KC=cn.create,qC=oo.create,dz=_d.create,fz=io.create,XC=Ml.create,hz=Wo.create,pz=yd.create,mz=Il.create,gz=Ll.create,vz=Qi.create,yz=Do.create,wz=ys.create,xz=wd.create,_z=fn.create,bz=Tt.create,Sz=Tt.strictCreate,kz=Fl.create,Cz=kf.create,Ez=zl.create,Tz=Fn.create,Rz=Ul.create,Nz=xd.create,Pz=Bo.create,jz=$i.create,Dz=$l.create,Oz=Vl.create,Az=ao.create,Mz=Wl.create,Iz=Ji.create,vw=yn.create,Lz=An.create,Fz=lo.create,zz=yn.createWithPreprocess,Uz=gc.create,$z=()=>KC().optional(),Vz=()=>qC().optional(),Wz=()=>XC().optional(),Bz={string:e=>cn.create({...e,coerce:!0}),number:e=>oo.create({...e,coerce:!0}),boolean:e=>Ml.create({...e,coerce:!0}),bigint:e=>io.create({...e,coerce:!0}),date:e=>Wo.create({...e,coerce:!0})},Hz=Ie;var He=Object.freeze({__proto__:null,defaultErrorMap:Xi,setErrorMap:H5,getErrorMap:md,makeIssue:gd,EMPTY_PATH:Y5,addIssueToContext:pe,ParseStatus:lr,INVALID:Ie,DIRTY:Ti,OK:pr,isAborted:Gp,isDirty:Kp,isValid:Ol,isAsync:Al,get util(){return Qe},get objectUtil(){return Zp},ZodParsedType:ye,getParsedType:zs,ZodType:Be,datetimeRegex:YC,ZodString:cn,ZodNumber:oo,ZodBigInt:io,ZodBoolean:Ml,ZodDate:Wo,ZodSymbol:yd,ZodUndefined:Il,ZodNull:Ll,ZodAny:Qi,ZodUnknown:Do,ZodNever:ys,ZodVoid:wd,ZodArray:fn,ZodObject:Tt,ZodUnion:Fl,ZodDiscriminatedUnion:kf,ZodIntersection:zl,ZodTuple:Fn,ZodRecord:Ul,ZodMap:xd,ZodSet:Bo,ZodFunction:$i,ZodLazy:$l,ZodLiteral:Vl,ZodEnum:ao,ZodNativeEnum:Wl,ZodPromise:Ji,ZodEffects:yn,ZodTransformer:yn,ZodOptional:An,ZodNullable:lo,ZodDefault:Bl,ZodCatch:Hl,ZodNaN:_d,BRAND:lz,ZodBranded:Rv,ZodPipeline:gc,ZodReadonly:Yl,custom:GC,Schema:Be,ZodSchema:Be,late:cz,get ZodFirstPartyTypeKind(){return Ae},coerce:Bz,any:vz,array:_z,bigint:fz,boolean:XC,date:hz,discriminatedUnion:Cz,effect:vw,enum:Az,function:jz,instanceof:uz,intersection:Ez,lazy:Dz,literal:Oz,map:Nz,nan:dz,nativeEnum:Mz,never:wz,null:gz,nullable:Fz,number:qC,object:bz,oboolean:Wz,onumber:Vz,optional:Lz,ostring:$z,pipeline:Uz,preprocess:zz,promise:Iz,record:Rz,set:Pz,strictObject:Sz,string:KC,symbol:pz,transformer:vw,tuple:Tz,undefined:mz,union:kz,unknown:yz,void:xz,NEVER:Hz,ZodIssueCode:ie,quotelessJson:B5,ZodError:Lr}),Yz="Label",QC=w.forwardRef((e,t)=>u.jsx(De.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));QC.displayName=Yz;var JC=QC;const Zz=Jl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Zl=w.forwardRef(({className:e,...t},r)=>u.jsx(JC,{ref:r,className:we(Zz(),e),...t}));Zl.displayName=JC.displayName;const ga=E5,eE=w.createContext({}),at=({...e})=>u.jsx(eE.Provider,{value:{name:e.name},children:u.jsx(P5,{...e})}),Cf=()=>{const e=w.useContext(eE),t=w.useContext(tE),{getFieldState:r,formState:n}=Sf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within ");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},tE=w.createContext({}),rt=w.forwardRef(({className:e,...t},r)=>{const n=w.useId();return u.jsx(tE.Provider,{value:{id:n},children:u.jsx("div",{ref:r,className:we("space-y-2",e),...t})})});rt.displayName="FormItem";const nt=w.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Cf();return u.jsx(Zl,{ref:r,className:we(n&&"text-destructive",e),htmlFor:s,...t})});nt.displayName="FormLabel";const st=w.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=Cf();return u.jsx(hs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});st.displayName="FormControl";const Gz=w.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Cf();return u.jsx("p",{ref:r,id:n,className:we("text-sm text-muted-foreground",e),...t})});Gz.displayName="FormDescription";const Xe=w.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=Cf(),i=s?String(s==null?void 0:s.message):t;return i?u.jsx("p",{ref:n,id:o,className:we("text-sm font-medium text-destructive",e),...r,children:i}):null});Xe.displayName="FormMessage";function Xp(e,[t,r]){return Math.min(r,Math.max(t,e))}var Kz=[" ","Enter","ArrowUp","ArrowDown"],qz=[" ","Enter"],vc="Select",[Ef,Tf,Xz]=Yd(vc),[va,xU]=Er(vc,[Xz,ua]),Rf=ua(),[Qz,mo]=va(vc),[Jz,e6]=va(vc),rE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:d,disabled:h,required:m}=e,y=Rf(t),[p,x]=w.useState(null),[g,v]=w.useState(null),[_,C]=w.useState(!1),E=ec(c),[T=!1,P]=ps({prop:n,defaultProp:s,onChange:o}),[O,j]=ps({prop:i,defaultProp:a,onChange:l}),L=w.useRef(null),q=p?!!p.closest("form"):!0,[R,F]=w.useState(new Set),b=Array.from(R).map(V=>V.props.value).join(";");return u.jsx(kg,{...y,children:u.jsxs(Qz,{required:m,scope:t,trigger:p,onTriggerChange:x,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:On(),value:O,onValueChange:j,open:T,onOpenChange:P,dir:E,triggerPointerDownPosRef:L,disabled:h,children:[u.jsx(Ef.Provider,{scope:t,children:u.jsx(Jz,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(V=>{F(te=>new Set(te).add(V))},[]),onNativeOptionRemove:w.useCallback(V=>{F(te=>{const W=new Set(te);return W.delete(V),W})},[]),children:r})}),q?u.jsxs(RE,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:O,onChange:V=>j(V.target.value),disabled:h,children:[O===void 0?u.jsx("option",{value:""}):null,Array.from(R)]},b):null]})})};rE.displayName=vc;var nE="SelectTrigger",sE=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Rf(r),i=mo(nE,r),a=i.disabled||n,l=ze(t,i.onTriggerChange),c=Tf(r),[f,d,h]=NE(y=>{const p=c().filter(v=>!v.disabled),x=p.find(v=>v.value===i.value),g=PE(p,y,x);g!==void 0&&i.onValueChange(g.value)}),m=()=>{a||(i.onOpenChange(!0),h())};return u.jsx(Cg,{asChild:!0,...o,children:u.jsx(De.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":TE(i.value)?"":void 0,...s,ref:l,onClick:le(s.onClick,y=>{y.currentTarget.focus()}),onPointerDown:le(s.onPointerDown,y=>{const p=y.target;p.hasPointerCapture(y.pointerId)&&p.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)},y.preventDefault())}),onKeyDown:le(s.onKeyDown,y=>{const p=f.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&d(y.key),!(p&&y.key===" ")&&Kz.includes(y.key)&&(m(),y.preventDefault())})})})});sE.displayName=nE;var oE="SelectValue",iE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...a}=e,l=mo(oE,r),{onValueNodeHasChildrenChange:c}=l,f=o!==void 0,d=ze(t,l.onValueNodeChange);return rr(()=>{c(f)},[c,f]),u.jsx(De.span,{...a,ref:d,style:{pointerEvents:"none"},children:TE(l.value)?u.jsx(u.Fragment,{children:i}):o})});iE.displayName=oE;var t6="SelectIcon",aE=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return u.jsx(De.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});aE.displayName=t6;var r6="SelectPortal",lE=e=>u.jsx(rc,{asChild:!0,...e});lE.displayName=r6;var Ho="SelectContent",cE=w.forwardRef((e,t)=>{const r=mo(Ho,e.__scopeSelect),[n,s]=w.useState();if(rr(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?xs.createPortal(u.jsx(uE,{scope:e.__scopeSelect,children:u.jsx(Ef.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(dE,{...e,ref:t})});cE.displayName=Ho;var Jn=10,[uE,go]=va(Ho),n6="SelectContentImpl",dE=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x,...g}=e,v=mo(Ho,r),[_,C]=w.useState(null),[E,T]=w.useState(null),P=ze(t,fe=>C(fe)),[O,j]=w.useState(null),[L,q]=w.useState(null),R=Tf(r),[F,b]=w.useState(!1),V=w.useRef(!1);w.useEffect(()=>{if(_)return Rg(_)},[_]),pg();const te=w.useCallback(fe=>{const[ge,...be]=R().map(Se=>Se.ref.current),[Pe]=be.slice(-1),Te=document.activeElement;for(const Se of fe)if(Se===Te||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===ge&&E&&(E.scrollTop=0),Se===Pe&&E&&(E.scrollTop=E.scrollHeight),Se==null||Se.focus(),document.activeElement!==Te))return},[R,E]),W=w.useCallback(()=>te([O,_]),[te,O,_]);w.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=v;w.useEffect(()=>{if(_){let fe={x:0,y:0};const ge=Pe=>{var Te,Se;fe={x:Math.abs(Math.round(Pe.pageX)-(((Te=I.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((Se=I.current)==null?void 0:Se.y)??0))}},be=Pe=>{fe.x<=10&&fe.y<=10?Pe.preventDefault():_.contains(Pe.target)||Z(!1),document.removeEventListener("pointermove",ge),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,Z,I]),w.useEffect(()=>{const fe=()=>Z(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[Z]);const[Q,z]=NE(fe=>{const ge=R().filter(Te=>!Te.disabled),be=ge.find(Te=>Te.ref.current===document.activeElement),Pe=PE(ge,fe,be);Pe&&setTimeout(()=>Pe.ref.current.focus())}),$=w.useCallback((fe,ge,be)=>{const Pe=!V.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&(j(fe),Pe&&(V.current=!0))},[v.value]),de=w.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=w.useCallback((fe,ge,be)=>{const Pe=!V.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&q(fe)},[v.value]),se=n==="popper"?Qp:fE,Ee=se===Qp?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x}:{};return u.jsx(uE,{scope:r,content:_,viewport:E,onViewportChange:T,itemRefCallback:$,selectedItem:O,onItemLeave:de,itemTextRefCallback:ne,focusSelectedItem:W,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:u.jsx(Jd,{as:hs,allowPinchZoom:!0,children:u.jsx(Zd,{asChild:!0,trapped:v.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:le(s,fe=>{var ge;(ge=v.trigger)==null||ge.focus({preventScroll:!0}),fe.preventDefault()}),children:u.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:u.jsx(se,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:fe=>fe.preventDefault(),...g,...Ee,onPlaced:()=>b(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:le(g.onKeyDown,fe=>{const ge=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!ge&&fe.key.length===1&&z(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let Pe=R().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(Pe=Pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const Te=fe.target,Se=Pe.indexOf(Te);Pe=Pe.slice(Se+1)}setTimeout(()=>te(Pe)),fe.preventDefault()}})})})})})})});dE.displayName=n6;var s6="SelectItemAlignedPosition",fE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=mo(Ho,r),i=go(Ho,r),[a,l]=w.useState(null),[c,f]=w.useState(null),d=ze(t,P=>f(P)),h=Tf(r),m=w.useRef(!1),y=w.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:g,focusSelectedItem:v}=i,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&p&&x&&g){const P=o.trigger.getBoundingClientRect(),O=c.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),L=g.getBoundingClientRect();if(o.dir!=="rtl"){const Te=L.left-O.left,Se=j.left-Te,qe=P.left-Se,k=P.width+qe,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=Xp(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const Te=O.right-L.right,Se=window.innerWidth-j.right-Te,qe=window.innerWidth-P.right-Se,k=P.width+qe,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=Xp(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=h(),R=window.innerHeight-Jn*2,F=p.scrollHeight,b=window.getComputedStyle(c),V=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),W=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=V+te+F+Z+W,Q=Math.min(x.offsetHeight*5,I),z=window.getComputedStyle(p),$=parseInt(z.paddingTop,10),de=parseInt(z.paddingBottom,10),ne=P.top+P.height/2-Jn,se=R-ne,Ee=x.offsetHeight/2,fe=x.offsetTop+Ee,ge=V+te+fe,be=I-ge;if(ge<=ne){const Te=x===q[q.length-1].ref.current;a.style.bottom="0px";const Se=c.clientHeight-p.offsetTop-p.offsetHeight,qe=Math.max(se,Ee+(Te?de:0)+Se+W),k=ge+qe;a.style.height=k+"px"}else{const Te=x===q[0].ref.current;a.style.top="0px";const qe=Math.max(ne,V+p.offsetTop+(Te?$:0)+Ee)+be;a.style.height=qe+"px",p.scrollTop=ge-ne+p.offsetTop}a.style.margin=`${Jn}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=R+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,a,c,p,x,g,o.dir,n]);rr(()=>_(),[_]);const[C,E]=w.useState();rr(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const T=w.useCallback(P=>{P&&y.current===!0&&(_(),v==null||v(),y.current=!1)},[_,v]);return u.jsx(i6,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:u.jsx(De.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});fE.displayName=s6;var o6="SelectPopperPosition",Qp=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Jn,...o}=e,i=Rf(r);return u.jsx(Eg,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});Qp.displayName=o6;var[i6,Nv]=va(Ho,{}),Jp="SelectViewport",hE=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=go(Jp,r),i=Nv(Jp,r),a=ze(t,o.onViewportChange),l=w.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),u.jsx(Ef.Slot,{scope:r,children:u.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:le(s.onScroll,c=>{const f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const m=Math.abs(l.current-f.scrollTop);if(m>0){const y=window.innerHeight-Jn*2,p=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),g=Math.max(p,x);if(g0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});hE.displayName=Jp;var pE="SelectGroup",[a6,l6]=va(pE),mE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=On();return u.jsx(a6,{scope:r,id:s,children:u.jsx(De.div,{role:"group","aria-labelledby":s,...n,ref:t})})});mE.displayName=pE;var gE="SelectLabel",vE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=l6(gE,r);return u.jsx(De.div,{id:s.id,...n,ref:t})});vE.displayName=gE;var bd="SelectItem",[c6,yE]=va(bd),wE=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,a=mo(bd,r),l=go(bd,r),c=a.value===n,[f,d]=w.useState(o??""),[h,m]=w.useState(!1),y=ze(t,g=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,g,n,s)}),p=On(),x=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")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 u.jsx(c6,{scope:r,value:n,disabled:s,textId:p,isSelected:c,onItemTextChange:w.useCallback(g=>{d(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(Ef.ItemSlot,{scope:r,value:n,disabled:s,textValue:f,children:u.jsx(De.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:y,onFocus:le(i.onFocus,()=>m(!0)),onBlur:le(i.onBlur,()=>m(!1)),onPointerUp:le(i.onPointerUp,x),onPointerMove:le(i.onPointerMove,g=>{var v;s?(v=l.onItemLeave)==null||v.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(i.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:le(i.onKeyDown,g=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&g.key===" "||(qz.includes(g.key)&&x(),g.key===" "&&g.preventDefault())})})})})});wE.displayName=bd;var Wa="SelectItemText",xE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=mo(Wa,r),a=go(Wa,r),l=yE(Wa,r),c=e6(Wa,r),[f,d]=w.useState(null),h=ze(t,g=>d(g),l.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,l.value,l.disabled)}),m=f==null?void 0:f.textContent,y=w.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=c;return rr(()=>(p(y),()=>x(y)),[p,x,y]),u.jsxs(u.Fragment,{children:[u.jsx(De.span,{id:l.textId,...o,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?xs.createPortal(o.children,i.valueNode):null]})});xE.displayName=Wa;var _E="SelectItemIndicator",bE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return yE(_E,r).isSelected?u.jsx(De.span,{"aria-hidden":!0,...n,ref:t}):null});bE.displayName=_E;var em="SelectScrollUpButton",SE=w.forwardRef((e,t)=>{const r=go(em,e.__scopeSelect),n=Nv(em,e.__scopeSelect),[s,o]=w.useState(!1),i=ze(t,n.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(CE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});SE.displayName=em;var tm="SelectScrollDownButton",kE=w.forwardRef((e,t)=>{const r=go(tm,e.__scopeSelect),n=Nv(tm,e.__scopeSelect),[s,o]=w.useState(!1),i=ze(t,n.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(CE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});kE.displayName=tm;var CE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=go("SelectScrollButton",r),i=w.useRef(null),a=Tf(r),l=w.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),rr(()=>{var f;const c=a().find(d=>d.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),u.jsx(De.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:le(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:le(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:le(s.onPointerLeave,()=>{l()})})}),u6="SelectSeparator",EE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return u.jsx(De.div,{"aria-hidden":!0,...n,ref:t})});EE.displayName=u6;var rm="SelectArrow",d6=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Rf(r),o=mo(rm,r),i=go(rm,r);return o.open&&i.position==="popper"?u.jsx(Tg,{...s,...n,ref:t}):null});d6.displayName=rm;function TE(e){return e===""||e===void 0}var RE=w.forwardRef((e,t)=>{const{value:r,...n}=e,s=w.useRef(null),o=ze(t,s),i=mv(r);return w.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==r&&f){const d=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(d)}},[i,r]),u.jsx(pc,{asChild:!0,children:u.jsx("select",{...n,ref:o,defaultValue:r})})});RE.displayName="BubbleSelect";function NE(e){const t=Pt(e),r=w.useRef(""),n=w.useRef(0),s=w.useCallback(i=>{const a=r.current+i;t(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function PE(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=f6(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function f6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var h6=rE,jE=sE,p6=iE,m6=aE,g6=lE,DE=cE,v6=hE,y6=mE,OE=vE,AE=wE,w6=xE,x6=bE,ME=SE,IE=kE,LE=EE;const yw=h6,ww=y6,xw=p6,nm=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(jE,{ref:n,className:we("flex 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,children:[t,u.jsx(m6,{asChild:!0,children:u.jsx(r1,{className:"h-4 w-4 opacity-50"})})]}));nm.displayName=jE.displayName;const FE=w.forwardRef(({className:e,...t},r)=>u.jsx(ME,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(UP,{className:"h-4 w-4"})}));FE.displayName=ME.displayName;const zE=w.forwardRef(({className:e,...t},r)=>u.jsx(IE,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(r1,{className:"h-4 w-4"})}));zE.displayName=IE.displayName;const sm=w.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>u.jsx(g6,{children:u.jsxs(DE,{ref:s,className:we("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,...n,children:[u.jsx(FE,{}),u.jsx(v6,{className:we("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(zE,{})]})}));sm.displayName=DE.displayName;const om=w.forwardRef(({className:e,...t},r)=>u.jsx(OE,{ref:r,className:we("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));om.displayName=OE.displayName;const im=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(AE,{ref:n,className:we("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,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(x6,{children:u.jsx(t1,{className:"h-4 w-4"})})}),u.jsx(w6,{children:t})]}));im.displayName=AE.displayName;const _6=w.forwardRef(({className:e,...t},r)=>u.jsx(LE,{ref:r,className:we("-mx-1 my-1 h-px bg-muted",e),...t}));_6.displayName=LE.displayName;const am=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),b6=Array.from(am.keys()),S6=$g,k6=Vg,C6=Wg,UE=w.forwardRef(({className:e,...t},r)=>u.jsx(oc,{ref:r,className:we("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}));UE.displayName=oc.displayName;const $E=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(C6,{children:[u.jsx(UE,{}),u.jsxs(ic,{ref:n,className:we("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,u.jsxs(rf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(cg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$E.displayName=ic.displayName;const VE=({className:e,...t})=>u.jsx("div",{className:we("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});VE.displayName="DialogHeader";const WE=w.forwardRef(({className:e,...t},r)=>u.jsx(ac,{ref:r,className:we("text-lg font-semibold leading-none tracking-tight",e),...t}));WE.displayName=ac.displayName;const E6=w.forwardRef(({className:e,...t},r)=>u.jsx(lc,{ref:r,className:we("text-sm text-muted-foreground",e),...t}));E6.displayName=lc.displayName;const Oo=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),Pv=He.union([He.literal("aliyun"),He.literal("tencent"),He.literal("ssh")],{message:"请选择云服务商"}),T6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,secretId:He.string().min(1).max(64),secretKey:He.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const f=await pv(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,m])=>{i.setError(h,{type:"manual",message:m.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(at,{control:i.control,name:"name",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"secretId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SecretId"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入SecretId",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"secretKey",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SecretKey"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入SecretKey",...l})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})},R6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,accessKeyId:He.string().min(1).max(64),accessSecretId:He.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const f=await pv(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,m])=>{i.setError(h,{type:"manual",message:m.message})});return}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(at,{control:i.control,name:"name",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"accessKeyId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"AccessKeyId"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入AccessKeyId",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"accessSecretId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"AccessKeySecret"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入AccessKeySecret",...l})}),u.jsx(Xe,{})]})}),u.jsx(Xe,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})};var jv="Radio",[N6,BE]=Er(jv),[P6,j6]=N6(jv),HE=w.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:l,...c}=e,[f,d]=w.useState(null),h=ze(t,p=>d(p)),m=w.useRef(!1),y=f?!!f.closest("form"):!0;return u.jsxs(P6,{scope:r,checked:s,disabled:i,children:[u.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":GE(s),"data-disabled":i?"":void 0,disabled:i,value:a,...c,ref:h,onClick:le(e.onClick,p=>{s||l==null||l(),y&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),y&&u.jsx(D6,{control:f,bubbles:!m.current,name:n,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});HE.displayName=jv;var YE="RadioIndicator",ZE=w.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=j6(YE,r);return u.jsx(vr,{present:n||o.checked,children:u.jsx(De.span,{"data-state":GE(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});ZE.displayName=YE;var D6=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=w.useRef(null),i=mv(r),a=_g(t);return w.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&d){const h=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(h)}},[i,r,n]),u.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function GE(e){return e?"checked":"unchecked"}var O6=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dv="RadioGroup",[A6,_U]=Er(Dv,[Xd,BE]),KE=Xd(),qE=BE(),[M6,I6]=A6(Dv),XE=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:d,...h}=e,m=KE(r),y=ec(c),[p,x]=ps({prop:o,defaultProp:s,onChange:d});return u.jsx(M6,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:x,children:u.jsx($1,{asChild:!0,...m,orientation:l,dir:y,loop:f,children:u.jsx(De.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:y,...h,ref:t})})})});XE.displayName=Dv;var QE="RadioGroupItem",JE=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=I6(QE,r),i=o.disabled||n,a=KE(r),l=qE(r),c=w.useRef(null),f=ze(t,c),d=o.value===s.value,h=w.useRef(!1);return w.useEffect(()=>{const m=p=>{O6.includes(p.key)&&(h.current=!0)},y=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),u.jsx(V1,{asChild:!0,...a,focusable:!i,active:d,children:u.jsx(HE,{disabled:i,required:o.required,checked:d,...l,...s,name:o.name,ref:f,onCheck:()=>o.onValueChange(s.value),onKeyDown:le(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:le(s.onFocus,()=>{var m;h.current&&((m=c.current)==null||m.click())})})})});JE.displayName=QE;var L6="RadioGroupIndicator",eT=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=qE(r);return u.jsx(ZE,{...s,...n,ref:t})});eT.displayName=L6;var tT=XE,rT=JE,F6=eT;const Ov=w.forwardRef(({className:e,...t},r)=>u.jsx(tT,{className:we("grid gap-2",e),...t,ref:r}));Ov.displayName=tT.displayName;const Av=w.forwardRef(({className:e,...t},r)=>u.jsx(rT,{ref:r,className:we("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(F6,{className:"flex items-center justify-center",children:u.jsx(o1,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Av.displayName=rT.displayName;const nT=w.forwardRef(({className:e,...t},r)=>u.jsx("textarea",{className:we("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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:r,...t}));nT.displayName="Textarea";const z6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,host:He.string().ip({message:"请输入合法的IP地址"}),port:He.string().min(1).max(5),username:He.string().min(1).max(64),password:He.string().min(0).max(64),key:He.string().min(0).max(20480),keyFile:He.string().optional(),command:He.string().min(1).max(2048),certPath:He.string().min(0).max(2048),keyPath:He.string().min(0).max(2048)});let o={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",host:o.host,port:o.port,username:o.username,password:o.password,key:o.key,keyFile:o.keyFile,certPath:o.certPath,keyPath:o.keyPath,command:o.command}}),a=async c=>{console.log(c);const f={id:c.id,name:c.name,configType:c.configType,config:{host:c.host,port:c.port,username:c.username,password:c.password,key:c.key,command:c.command,certPath:c.certPath,keyPath:c.keyPath}};try{const d=await pv(f);if(t(),f.id=d.id,f.created=d.created,f.updated=d.updated,c.id){n(f);return}r(f)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})});return}},l=async c=>{var h;const f=(h=c.target.files)==null?void 0:h[0];if(!f)return;const d=await m5(f);i.setValue("key",d),i.setValue("keyFile","")};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-3",children:[u.jsx(at,{control:i.control,name:"name",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:c})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:c})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...c})}),u.jsx(Xe,{})]})}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx(at,{control:i.control,name:"host",render:({field:c})=>u.jsxs(rt,{className:"grow",children:[u.jsx(nt,{children:"服务器IP"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Host",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"port",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SSH端口"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Port",...c,type:"number"})}),u.jsx(Xe,{})]})})]}),u.jsx(at,{control:i.control,name:"username",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"用户名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入用户名",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"password",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入密码",...c,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"key",render:({field:c})=>u.jsxs(rt,{hidden:!0,children:[u.jsx(nt,{children:"Key(使用证书登录)"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Key",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"keyFile",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"Key(使用证书登录)"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Key",...c,type:"file",onChange:l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"certPath",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"证书上传路径"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入证书上传路径",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"keyPath",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"私钥上传路径"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入私钥上传路径",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"command",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"Command"}),u.jsx(st,{children:u.jsx(nT,{placeholder:"请输入要执行的命令",...c})}),u.jsx(Xe,{})]})}),u.jsx(Xe,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})};function nl({trigger:e,op:t,data:r,className:n}){const[s,o]=w.useState(!1),i=Array.from(Oo.keys()),[a,l]=w.useState((r==null?void 0:r.configType)||"");let c=u.jsx(u.Fragment,{children:" "});switch(a){case"tencent":c=u.jsx(T6,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":c=u.jsx(R6,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":c=u.jsx(z6,{data:r,onAfterReq:()=>{o(!1)}});break}const f=d=>d==a?"border-primary":"";return u.jsxs(S6,{onOpenChange:o,open:s,children:[u.jsx(k6,{asChild:!0,className:we(n),children:e}),u.jsxs($E,{className:"sm:max-w-[600px] w-full",children:[u.jsx(VE,{children:u.jsxs(WE,{children:[t=="add"?"添加":"编辑","授权"]})}),u.jsxs("div",{className:"container",children:[u.jsx(Zl,{children:"服务商"}),u.jsx(Ov,{value:a,className:"flex mt-3 space-x-2",onValueChange:d=>{console.log(d),l(d)},children:i.map(d=>{var h,m;return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs(Zl,{children:[u.jsx(Av,{value:d,hidden:!0}),u.jsxs("div",{className:we("flex items-center space-x-2 border p-2 rounded cursor-pointer",f(d)),children:[u.jsx("img",{src:(h=Oo.get(d))==null?void 0:h[1],className:"h-6"}),u.jsx("div",{children:(m=Oo.get(d))==null?void 0:m[0]})]})]})},d)})}),c]})]})]})}const U6=()=>{const{config:{accesses:e}}=hc(),[t,r]=w.useState(),n=po();w.useEffect(()=>{const y=new URLSearchParams(n.search).get("id");y&&(async()=>{const x=await w5(y);r(x)})()},[n.search]);const s=He.object({id:He.string().optional(),domain:He.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),access:He.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:He.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:He.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),o=pa({resolver:ma(s),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});w.useEffect(()=>{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=w.useState(t?t.targetType:""),l=e.filter(m=>{if(i=="")return!0;const y=o.getValues().targetType.split("-");return m.configType===y[0]}),{toast:c}=vf(),f=Ss(),d=async m=>{const y={id:m.id,crontab:"0 0 * * *",domain:m.domain,access:m.access,targetAccess:m.targetAccess,targetType:m.targetType};try{await Yp(y);let p="域名编辑成功";y.id==""&&(p="域名添加成功"),c({title:"成功",description:p}),f("/")}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{o.setError(g,{type:"manual",message:v.message})});return}},h=m=>o.getValues().targetType==m?"border-primary":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(xv,{}),u.jsxs("div",{className:"border-b h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(d),className:"space-y-8",children:[u.jsx(at,{control:o.control,name:"domain",render:({field:m})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"域名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入域名",...m})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"access",render:({field:m})=>u.jsxs(rt,{children:[u.jsxs(nt,{className:"flex w-full justify-between",children:[u.jsx("div",{children:"DNS 服务商授权配置"}),u.jsx(nl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(x0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(st,{children:u.jsxs(yw,{...m,value:m.value,onValueChange:y=>{o.setValue("access",y)},children:[u.jsx(nm,{children:u.jsx(xw,{placeholder:"请选择授权配置"})}),u.jsx(sm,{children:u.jsxs(ww,{children:[u.jsx(om,{children:"服务商授权配置"}),e.map(y=>{var p;return u.jsx(im,{value:y.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(p=Oo.get(y.configType))==null?void 0:p[1]}),u.jsx("div",{children:y.name})]})},y.id)})]})})]})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"targetType",render:({field:m})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"部署服务类型"}),u.jsx(st,{children:u.jsx(Ov,{className:"flex mt-3 space-x-2",onValueChange:y=>{a(y),o.setValue("targetType",y)},...m,children:b6.map(y=>{var p,x;return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs(Zl,{children:[u.jsx(Av,{value:y,id:y,hidden:!0}),u.jsxs("div",{className:we("flex items-center space-x-2 border p-2 rounded cursor-pointer",h(y)),children:[u.jsx("img",{src:(p=am.get(y))==null?void 0:p[1],className:"h-6"}),u.jsx("div",{children:(x=am.get(y))==null?void 0:x[0]})]})]})},y)})})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"targetAccess",render:({field:m})=>u.jsxs(rt,{children:[u.jsxs(nt,{className:"w-full flex justify-between",children:[u.jsx("div",{children:"部署服务商授权配置"}),u.jsx(nl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(x0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(st,{children:u.jsxs(yw,{...m,onValueChange:y=>{o.setValue("targetAccess",y)},children:[u.jsx(nm,{children:u.jsx(xw,{placeholder:"请选择授权配置"})}),u.jsx(sm,{children:u.jsxs(ww,{children:[u.jsx(om,{children:"服务商授权配置"}),l.map(y=>{var p;return u.jsx(im,{value:y.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(p=Oo.get(y.configType))==null?void 0:p[1]}),u.jsx("div",{children:y.name})]})},y.id)})]})})]})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})]})})},$6=()=>{const{config:e,deleteAccess:t}=hc(),{accesses:r}=e,n=async s=>{const o=await Z4(s);t(o.id)};return u.jsxs("div",{className:"",children:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),u.jsx(nl,{trigger:u.jsx(Lt,{children:"添加授权"}),op:"add"})]}),r.length===0?u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(VP,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),u.jsx(nl,{trigger:u.jsx(Lt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"名称"}),u.jsx("div",{className:"w-48",children:"服务商"}),u.jsx("div",{className:"w-52",children:"创建时间"}),u.jsx("div",{className:"w-52",children:"更新时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.map(s=>{var o,i;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:s.name}),u.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[u.jsx("img",{src:(o=Oo.get(s.configType))==null?void 0:o[1],className:"w-6"}),u.jsx("div",{children:(i=Oo.get(s.configType))==null?void 0:i[0]})]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&Dl(s.created)]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&Dl(s.updated)]}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(nl,{trigger:u.jsx(Lt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>{n(s)},children:"删除"})]})]},s.id)})]})]})},V6=Jl("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"}},defaultVariants:{variant:"default"}}),sT=w.forwardRef(({className:e,variant:t,...r},n)=>u.jsx("div",{ref:n,role:"alert",className:we(V6({variant:t}),e),...r}));sT.displayName="Alert";const oT=w.forwardRef(({className:e,...t},r)=>u.jsx("h5",{ref:r,className:we("mb-1 font-medium leading-none tracking-tight",e),...t}));oT.displayName="AlertTitle";const iT=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:we("text-sm [&_p]:leading-relaxed",e),...t}));iT.displayName="AlertDescription";function W6(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var Mv="ScrollArea",[aT,bU]=Er(Mv),[B6,en]=aT(Mv),lT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,l]=w.useState(null),[c,f]=w.useState(null),[d,h]=w.useState(null),[m,y]=w.useState(null),[p,x]=w.useState(null),[g,v]=w.useState(0),[_,C]=w.useState(0),[E,T]=w.useState(!1),[P,O]=w.useState(!1),j=ze(t,q=>l(q)),L=ec(s);return u.jsx(B6,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:f,content:d,onContentChange:h,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:p,onScrollbarYChange:x,scrollbarYEnabled:P,onScrollbarYEnabledChange:O,onCornerWidthChange:v,onCornerHeightChange:C,children:u.jsx(De.div,{dir:L,...i,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});lT.displayName=Mv;var cT="ScrollAreaViewport",uT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=en(cT,r),a=w.useRef(null),l=ze(t,a,i.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(De.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});uT.displayName=cT;var $n="ScrollAreaScrollbar",Iv=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return w.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?u.jsx(H6,{...n,ref:t,forceMount:r}):s.type==="scroll"?u.jsx(Y6,{...n,ref:t,forceMount:r}):s.type==="auto"?u.jsx(dT,{...n,ref:t,forceMount:r}):s.type==="always"?u.jsx(Lv,{...n,ref:t}):null});Iv.displayName=$n;var H6=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),[o,i]=w.useState(!1);return w.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},f=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),u.jsx(vr,{present:r||o,children:u.jsx(dT,{"data-state":o?"visible":"hidden",...n,ref:t})})}),Y6=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Pf(()=>l("SCROLL_END"),100),[a,l]=W6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,s.scrollHideDelay,l]),w.useEffect(()=>{const c=s.viewport,f=o?"scrollLeft":"scrollTop";if(c){let d=c[f];const h=()=>{const m=c[f];d!==m&&(l("SCROLL"),i()),d=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[s.viewport,o,l,i]),u.jsx(vr,{present:r||a!=="hidden",children:u.jsx(Lv,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:le(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:le(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),dT=w.forwardRef((e,t)=>{const r=en($n,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=w.useState(!1),a=e.orientation==="horizontal",l=Pf(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,s=en($n,e.__scopeScrollArea),o=w.useRef(null),i=w.useRef(0),[a,l]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=gT(a.viewport,a.content),f={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function d(h,m){return Q6(h,i.current,a,m)}return r==="horizontal"?u.jsx(Z6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=_w(h,a,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=d(h,s.dir))}}):r==="vertical"?u.jsx(G6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=_w(h,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=d(h))}}):null}),Z6=w.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en($n,e.__scopeScrollArea),[i,a]=w.useState(),l=w.useRef(null),c=ze(t,l,o.onScrollbarXChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(hT,{"data-orientation":"horizontal",...s,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Nf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),yT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:kd(i.paddingLeft),paddingEnd:kd(i.paddingRight)}})}})}),G6=w.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en($n,e.__scopeScrollArea),[i,a]=w.useState(),l=w.useRef(null),c=ze(t,l,o.onScrollbarYChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(hT,{"data-orientation":"vertical",...s,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Nf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),yT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:kd(i.paddingTop),paddingEnd:kd(i.paddingBottom)}})}})}),[K6,fT]=aT($n),hT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:f,onResize:d,...h}=e,m=en($n,r),[y,p]=w.useState(null),x=ze(t,j=>p(j)),g=w.useRef(null),v=w.useRef(""),_=m.viewport,C=n.content-n.viewport,E=Pt(f),T=Pt(l),P=Pf(d,10);function O(j){if(g.current){const L=j.clientX-g.current.left,q=j.clientY-g.current.top;c({x:L,y:q})}}return w.useEffect(()=>{const j=L=>{const q=L.target;(y==null?void 0:y.contains(q))&&E(L,C)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[_,y,C,E]),w.useEffect(T,[n,T]),ea(y,P),ea(m.content,P),u.jsx(K6,{scope:r,scrollbar:y,hasThumb:s,onThumbChange:Pt(o),onThumbPointerUp:Pt(i),onThumbPositionChange:T,onThumbPointerDown:Pt(a),children:u.jsx(De.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:le(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),g.current=y.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),O(j))}),onPointerMove:le(e.onPointerMove,O),onPointerUp:le(e.onPointerUp,j=>{const L=j.target;L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),Sd="ScrollAreaThumb",pT=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=fT(Sd,e.__scopeScrollArea);return u.jsx(vr,{present:r||s.hasThumb,children:u.jsx(q6,{ref:t,...n})})}),q6=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=en(Sd,r),i=fT(Sd,r),{onThumbPositionChange:a}=i,l=ze(t,d=>i.onThumbChange(d)),c=w.useRef(),f=Pf(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(f(),!c.current){const m=J6(d,a);c.current=m,a()}};return a(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,f,a]),u.jsx(De.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:le(e.onPointerDownCapture,d=>{const m=d.target.getBoundingClientRect(),y=d.clientX-m.left,p=d.clientY-m.top;i.onThumbPointerDown({x:y,y:p})}),onPointerUp:le(e.onPointerUp,i.onThumbPointerUp)})});pT.displayName=Sd;var Fv="ScrollAreaCorner",mT=w.forwardRef((e,t)=>{const r=en(Fv,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?u.jsx(X6,{...e,ref:t}):null});mT.displayName=Fv;var X6=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=en(Fv,r),[o,i]=w.useState(0),[a,l]=w.useState(0),c=!!(o&&a);return ea(s.scrollbarX,()=>{var d;const f=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(f),l(f)}),ea(s.scrollbarY,()=>{var d;const f=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(f),i(f)}),c?u.jsx(De.div,{...n,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function kd(e){return e?parseInt(e,10):0}function gT(e,t){const r=e/t;return isNaN(r)?0:r}function Nf(e){const t=gT(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Q6(e,t,r,n="ltr"){const s=Nf(r),o=s/2,i=t||o,a=s-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return vT([l,c],d)(e)}function _w(e,t,r="ltr"){const n=Nf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,l=r==="ltr"?[0,i]:[i*-1,0],c=Xp(e,l);return vT([0,i],[0,a])(c)}function vT(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function yT(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,a=r.top!==o.top;(i||a)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Pf(e,t){const r=Pt(e),n=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),w.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ea(e,t){const r=Pt(t);rr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var wT=lT,eU=uT,tU=mT;const xT=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(wT,{ref:n,className:we("relative overflow-hidden",e),...r,children:[u.jsx(eU,{className:"h-full w-full rounded-[inherit]",children:t}),u.jsx(_T,{}),u.jsx(tU,{})]}));xT.displayName=wT.displayName;const _T=w.forwardRef(({className:e,orientation:t="vertical",...r},n)=>u.jsx(Iv,{ref:n,orientation:t,className:we("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:u.jsx(pT,{className:"relative flex-1 rounded-full bg-border"})}));_T.displayName=Iv.displayName;const rU=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await jt().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},nU=()=>{const e=Ss(),[t,r]=w.useState(),[n]=MP(),s=n.get("domain");return w.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await rU(i);r(a.items)})()},[s]),u.jsxs(xT,{className:"h-[80vh] overflow-hidden",children:[u.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"域名"}),u.jsx("div",{className:"w-24",children:"状态"}),u.jsx("div",{className:"w-56",children:"阶段"}),u.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),u.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?u.jsx(n1,{size:16,className:"text-green-700"}):u.jsx(s1,{size:16,className:"text-red-700"})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx(hk,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Dl(o.deployedAt)}),u.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:u.jsxs(uS,{children:[u.jsx(dS,{asChild:!0,children:u.jsx(Lt,{variant:"link",className:"p-0",children:"日志"})}),u.jsxs(Bg,{className:"sm:max-w-5xl",children:[u.jsx(hS,{children:u.jsxs(pS,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),u.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&u.jsx(u.Fragment,{children:o.log.check.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&u.jsx(u.Fragment,{children:o.log.apply.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&u.jsx(u.Fragment,{children:o.log.deploy.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):u.jsx(u.Fragment,{children:u.jsxs(sT,{className:"max-w-[40em] mx-auto mt-20",children:[u.jsx(oT,{children:"暂无数据"}),u.jsxs(iT,{children:[u.jsxs("div",{className:"flex items-center mt-5",children:[u.jsx("div",{children:u.jsx(BP,{className:"text-yellow-400",size:36})}),u.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),u.jsx("div",{className:"mt-2 flex justify-end",children:u.jsx(Lt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},lm=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",sU=He.object({username:He.string().email({message:"请输入正确的邮箱地址"}),password:He.string().min(10,{message:"密码至少10个字符"})}),oU=()=>{const e=pa({resolver:ma(sU),defaultValues:{username:"",password:""}}),t=async n=>{try{await jt().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=lm(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=Ss();return u.jsxs("div",{className:"max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md",children:[u.jsx("div",{className:"flex justify-center mb-10",children:u.jsx("img",{src:"/vite.svg",className:"w-16"})}),u.jsx(ga,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[u.jsx(at,{control:e.control,name:"username",render:({field:n})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"用户名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"email",...n})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:e.control,name:"password",render:({field:n})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"shadcn",...n,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"登录"})})]})})]})},iU=()=>jt().authStore.isValid&&jt().authStore.isAdmin?u.jsx(J_,{to:"/"}):u.jsx("div",{className:"container",children:u.jsx(lg,{})}),aU=He.object({oldPassword:He.string().min(10,{message:"密码至少10个字符"}),newPassword:He.string().min(10,{message:"密码至少10个字符"}),confirmPassword:He.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),lU=()=>{const{toast:e}=vf(),t=Ss(),r=pa({resolver:ma(aU),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await jt().admins.authWithPassword((o=jt().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(a){const l=lm(a);r.setError("oldPassword",{message:l})}try{await jt().admins.update((i=jt().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),jt().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=lm(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return u.jsx(u.Fragment,{children:u.jsx(ga,{...r,children:u.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8",children:[u.jsx(at,{control:r.control,name:"oldPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"当前密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"当前密码",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:r.control,name:"newPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"新密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"newPassword",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:r.control,name:"confirmPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"确认密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"confirmPassword",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"确认修改"})})]})})})},cU=()=>u.jsxs("div",{children:[u.jsx(xv,{}),u.jsx("div",{className:"text-muted-foreground",children:"设置密码"}),u.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3",children:u.jsx(lg,{})})]}),uU=xP([{path:"/",element:u.jsx(q4,{}),children:[{path:"/",element:u.jsx(S5,{})},{path:"/edit",element:u.jsx(U6,{})},{path:"/access",element:u.jsx($6,{})},{path:"/history",element:u.jsx(nU,{})},{path:"/setting",element:u.jsx(cU,{}),children:[{path:"/setting/password",element:u.jsx(lU,{})}]}]},{path:"/login",element:u.jsx(iU,{}),children:[{path:"/login",element:u.jsx(oU,{})}]},{path:"/about",element:u.jsx("div",{children:"About"})}]);Rh.createRoot(document.getElementById("root")).render(u.jsx(Ge.StrictMode,{children:u.jsx(NP,{router:uU})}))});export default dU(); +\0`,ne+=o(z,2),ne+=T.magic,ne+=o(_,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(O.length,2),ne+=o(V.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ne+O+V,dirRecord:d.CENTRAL_FILE_HEADER+o(de,2)+ne+o(q.length,2)+"\0\0\0\0"+o($,4)+o(x,4)+O+V+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),f=r("../crc32"),d=r("../signature");function h(m,y,p,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=p,this.encodeFileName=x,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,l),h.prototype.push=function(m){var y=m.meta.percent||0,p=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(y+100*(p-x-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var y=this.streamFiles&&!m.file.dir;if(y){var p=i(m,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var y=this.streamFiles&&!m.file.dir,p=i(m,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),y)this.push({data:function(x){return d.DATA_DESCRIPTOR+o(x.crc32,4)+o(x.compressedSize,4)+o(x.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,y=0;y=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=i},{"../utils":32}],19:[function(r,n,s){var o=r("./Uint8ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var o=r("./ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");n.exports=function(d){var h=o.getTypeOf(d);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new c(d):i.uint8array?new f(o.transformTo("uint8array",d)):new a(o.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var o=r("./GenericWorker"),i=r("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}i.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:i.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var o=r("./GenericWorker"),i=r("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=i(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,i),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}i.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){c.dataIsReady=!0,c.data=f,c.max=f&&f.length||0,c.type=o.getTypeOf(f),c.isPaused||c._tickAndRepeat()},function(f){c.error(f)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var l=0;l "+i:i}},n.exports=o},{}],29:[function(r,n,s){var o=r("../utils"),i=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),f=r("../external"),d=null;if(c.nodestream)try{d=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(y,p){return new f.Promise(function(x,g){var v=[],_=y._internalType,C=y._outputType,E=y._mimeType;y.on("data",function(T,P){v.push(T),p&&p(P)}).on("error",function(T){v=[],g(T)}).on("end",function(){try{var T=function(P,O,j){switch(P){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),j);case"base64":return l.encode(O);default:return o.transformTo(P,O)}}(C,function(P,O){var j,L=0,q=null,R=0;for(j=0;j"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var o=r("./utils"),i=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),f=0;f<256;f++)c[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;c[254]=c[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}s.utf8encode=function(m){return i.nodebuffer?a.newBufferFrom(m,"utf-8"):function(y){var p,x,g,v,_,C=y.length,E=0;for(v=0;v>>6:(x<65536?p[_++]=224|x>>>12:(p[_++]=240|x>>>18,p[_++]=128|x>>>12&63),p[_++]=128|x>>>6&63),p[_++]=128|63&x);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(y){var p,x,g,v,_=y.length,C=new Array(2*_);for(p=x=0;p<_;)if((g=y[p++])<128)C[x++]=g;else if(4<(v=c[g]))C[x++]=65533,p+=v-1;else{for(g&=v===2?31:v===3?15:7;1>10&1023,C[x++]=56320|1023&g)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),o.applyFromCharCode(C)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(d,l),d.prototype.processChunk=function(m){var y=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=y;(y=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),y.set(p,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var x=function(v,_){var C;for((_=_||v.length)>v.length&&(_=v.length),C=_-1;0<=C&&(192&v[C])==128;)C--;return C<0||C===0?_:C+c[v[C]]>_?C:_}(y),g=y;x!==y.length&&(i.uint8array?(g=y.subarray(0,x),this.leftOver=y.subarray(x,y.length)):(g=y.slice(0,x),this.leftOver=y.slice(x,y.length))),this.push({data:s.utf8decode(g),meta:m.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(h,l),h.prototype.processChunk=function(m){this.push({data:s.utf8encode(m.data),meta:m.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var o=r("./support"),i=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(p){return p}function f(p,x){for(var g=0;g>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var y,p,x,g=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4>>6:(m<65536?h[x++]=224|m>>>12:(h[x++]=240|m>>>18,h[x++]=128|m>>>12&63),h[x++]=128|m>>>6&63),h[x++]=128|63&m);return h},s.buf2binstring=function(d){return f(d,d.length)},s.binstring2buf=function(d){for(var h=new o.Buf8(d.length),m=0,y=h.length;m>10&1023,v[y++]=56320|1023&p)}return f(v,y)},s.utf8border=function(d,h){var m;for((h=h||d.length)>d.length&&(h=d.length),m=h-1;0<=m&&(192&d[m])==128;)m--;return m<0||m===0?h:m+l[d[m]]>h?m:h}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,a,l){for(var c=65535&o|0,f=o>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3>>1:i>>>1;a[l]=i}return a}();n.exports=function(i,a,l,c){var f=o,d=c+l;i^=-1;for(var h=c;h>>8^f[255&(i^a[h])];return-1^i}},{}],46:[function(r,n,s){var o,i=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),f=r("./messages"),d=0,h=4,m=0,y=-2,p=-1,x=4,g=2,v=8,_=9,C=286,E=30,T=19,P=2*C+1,O=15,j=3,L=258,q=L+j+1,R=42,F=113,b=1,V=2,te=3,W=4;function Z(k,J){return k.msg=f[J],J}function I(k){return(k<<1)-(4k.avail_out&&(G=k.avail_out),G!==0&&(i.arraySet(k.output,J.pending_buf,J.pending_out,G,k.next_out),k.next_out+=G,J.pending_out+=G,k.total_out+=G,k.avail_out-=G,J.pending-=G,J.pending===0&&(J.pending_out=0))}function $(k,J){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function de(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var G,D,S=k.max_chain_length,N=k.strstart,A=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,he=k.strstart+L,Le=H[N+A-1],Oe=H[N+A];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(G=J)+A]===Oe&&H[G+A-1]===Le&&H[G]===H[N]&&H[++G]===H[N+1]){N+=2,G++;do;while(H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&NM&&--S!=0);return A<=k.lookahead?A:k.lookahead}function Ee(k){var J,G,D,S,N,A,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(i.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=G=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--G;);for(J=G=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--G;);S+=ee}if(k.strm.avail_in===0)break;if(A=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=A.avail_in,H=j)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<=j&&(k.ins_h=(k.ins_h<=j)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-j),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=j){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<=j&&(k.ins_h=(k.ins_h<=j&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-j,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-j),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<k.pending_buf_size-5&&(G=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ee(k),k.lookahead===0&&J===d)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+G;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,$(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===h?($(k,!0),k.strm.avail_out===0?te:W):(k.strstart>k.block_start&&($(k,!1),k.strm.avail_out),b)}),new be(4,4,8,4,fe),new be(4,5,16,8,fe),new be(4,6,32,32,fe),new be(4,4,16,16,ge),new be(8,16,32,32,ge),new be(8,16,128,128,ge),new be(8,32,128,256,ge),new be(32,128,258,1024,ge),new be(32,258,258,4096,ge)],s.deflateInit=function(k,J){return qe(k,J,v,15,8,0)},s.deflateInit2=qe,s.deflateReset=Se,s.deflateResetKeep=Te,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?y:(k.state.gzhead=J,m):y},s.deflate=function(k,J){var G,D,S,N;if(!k||!k.state||5>8&255),de(D,D.gzhead.time>>16&255),de(D,D.gzhead.time>>24&255),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(de(D,255&D.gzhead.extra.length),de(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=c(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(de(D,0),de(D,0),de(D,0),de(D,0),de(D,0),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,3),D.status=F);else{var A=v+(D.w_bits-8<<4)<<8;A|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(A|=32),A+=31-A%31,D.status=F,ne(D,A),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)de(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(de(D,255&k.adler),de(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,m}else if(k.avail_in===0&&I(J)<=I(G)&&J!==h)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==d&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Ee(M),M.lookahead===0)){if(H===d)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===h?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):D.strategy===3?function(M,H){for(var X,ee,he,Le,Oe=M.window;;){if(M.lookahead<=L){if(Ee(M),M.lookahead<=L&&H===d)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=j&&0M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=j?(X=a._tr_tally(M,1,M.match_length-j),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===h?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):o[D.level].func(D,J);if(Y!==te&&Y!==W||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),m;if(Y===V&&(J===1?a._tr_align(D):J!==5&&(a._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,m}return J!==h?m:D.wrap<=0?1:(D.wrap===2?(de(D,255&k.adler),de(D,k.adler>>8&255),de(D,k.adler>>16&255),de(D,k.adler>>24&255),de(D,255&k.total_in),de(D,k.total_in>>8&255),de(D,k.total_in>>16&255),de(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0=G.w_size&&(N===0&&(Q(G.head),G.strstart=0,G.block_start=0,G.insert=0),H=new i.Buf8(G.w_size),i.arraySet(H,J,X-G.w_size,G.w_size,0),J=H,X=G.w_size),A=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ee(G);G.lookahead>=j;){for(D=G.strstart,S=G.lookahead-(j-1);G.ins_h=(G.ins_h<>>=j=O>>>24,_-=j,(j=O>>>16&255)===0)V[f++]=65535&O;else{if(!(16&j)){if(!(64&j)){O=C[(65535&O)+(v&(1<>>=j,_-=j),_<15&&(v+=b[l++]<<_,_+=8,v+=b[l++]<<_,_+=8),O=E[v&P];r:for(;;){if(v>>>=j=O>>>24,_-=j,!(16&(j=O>>>16&255))){if(!(64&j)){O=E[(65535&O)+(v&(1<>>=j,_-=j,(j=f-d)>3,v&=(1<<(_-=L<<3))-1,o.next_in=l,o.next_out=f,o.avail_in=l>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(R){var F;return R&&R.state?(F=R.state,R.total_in=R.total_out=F.total=0,R.msg="",F.wrap&&(R.adler=1&F.wrap),F.mode=y,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(p),F.distcode=F.distdyn=new o.Buf32(x),F.sane=1,F.back=-1,h):m}function C(R){var F;return R&&R.state?((F=R.state).wsize=0,F.whave=0,F.wnext=0,_(R)):m}function E(R,F){var b,V;return R&&R.state?(V=R.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=W.wsize?(o.arraySet(W.window,F,b-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(V<(te=W.wsize-W.wnext)&&(te=V),o.arraySet(W.window,F,b-V,te,W.wnext),(V-=te)?(o.arraySet(W.window,F,b-V,V,0),W.wnext=V,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,b.check=a(b.check,N,2,0),$=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){R.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){R.msg="unknown compression method",b.mode=30;break}if($-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){R.msg="invalid window size",b.mode=30;break}b.dmax=1<>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0,b.mode=3;case 3:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.time=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),$=z=0,b.mode=4;case 4:for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0,b.mode=5;case 5:if(1024&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),o.arraySet(b.head.extra,V,W,se,k)),512&b.flags&&(b.check=a(b.check,V,se,W)),I-=se,W+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=V[W+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se>9&1,b.head.done=!0),R.adler=b.check=0,b.mode=12;break;case 10:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}R.adler=b.check=g(z),$=z=0,b.mode=11;case 11:if(b.havedict===0)return R.next_out=Z,R.avail_out=Q,R.next_in=W,R.avail_in=I,b.hold=z,b.bits=$,2;R.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&$,$-=7&$,b.mode=27;break}for(;$<3;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}switch(b.last=1&z,$-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,$-=2;break e;case 2:b.mode=17;break;case 3:R.msg="invalid block type",b.mode=30}z>>>=2,$-=2;break;case 14:for(z>>>=7&$,$-=7&$;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if((65535&z)!=(z>>>16^65535)){R.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,$=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I>>=5,$-=5,b.ndist=1+(31&z),z>>>=5,$-=5,b.ncode=4+(15&z),z>>>=4,$-=4,286>>=3,$-=3}for(;b.have<19;)b.lens[A[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,G={bits:b.lenbits},J=c(0,b.lens,0,19,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(Pe<16)z>>>=ge,$-=ge,b.lens[b.have++]=Pe;else{if(Pe===16){for(D=ge+2;$>>=ge,$-=ge,b.have===0){R.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,$-=2}else if(Pe===17){for(D=ge+3;$>>=ge)),z>>>=3,$-=3}else{for(D=ge+7;$>>=ge)),z>>>=7,$-=7}if(b.have+se>b.nlen+b.ndist){R.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){R.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,G={bits:b.lenbits},J=c(f,b.lens,0,b.nlen,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,G={bits:b.distbits},J=c(d,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,G),b.distbits=G.bits,J){R.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){R.next_out=Z,R.avail_out=Q,R.next_in=W,R.avail_in=I,b.hold=z,b.bits=$,l(R,ne),Z=R.next_out,te=R.output,Q=R.avail_out,W=R.next_in,V=R.input,I=R.avail_in,z=b.hold,$=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;be=(S=b.lencode[z&(1<>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(be&&!(240&be)){for(Te=ge,Se=be,qe=Pe;be=(S=b.lencode[qe+((z&(1<>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Te,$-=Te,b.back+=Te}if(z>>>=ge,$-=ge,b.back+=ge,b.length=Pe,be===0){b.mode=26;break}if(32&be){b.back=-1,b.mode=12;break}if(64&be){R.msg="invalid literal/length code",b.mode=30;break}b.extra=15&be,b.mode=22;case 22:if(b.extra){for(D=b.extra;$>>=b.extra,$-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;be=(S=b.distcode[z&(1<>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(!(240&be)){for(Te=ge,Se=be,qe=Pe;be=(S=b.distcode[qe+((z&(1<>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Te,$-=Te,b.back+=Te}if(z>>>=ge,$-=ge,b.back+=ge,64&be){R.msg="invalid distance code",b.mode=30;break}b.offset=Pe,b.extra=15&be,b.mode=24;case 24:if(b.extra){for(D=b.extra;$>>=b.extra,$-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){R.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){R.msg="invalid distance too far back",b.mode=30;break}Ee=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),fe=b.window}else fe=te,Ee=Z-b.offset,se=b.length;for(QP?(j=Ee[fe+x[F]],$[de+x[F]]):(j=96,0),v=1<>Z)+(_-=v)]=O<<24|j<<16|L|0,_!==0;);for(v=1<>=1;if(v!==0?(z&=v-1,z+=v):z=0,F++,--ne[R]==0){if(R===V)break;R=d[h+x[F]]}if(te>>7)]}function de(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,A){S.bi_valid>g-A?(S.bi_buf|=N<>g-S.bi_valid,S.bi_valid+=A-g):(S.bi_buf|=N<>>=1,A<<=1,0<--N;);return A>>>1}function fe(S,N,A){var Y,M,H=new Array(x+1),X=0;for(Y=1;Y<=x;Y++)H[Y]=X=X+A[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ee(H[ee]++,ee))}}function ge(S){var N;for(N=0;N>1;1<=A;A--)Te(S,H,A);for(M=he;A=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Te(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=A,S.heap[--S.heap_max]=Y,H[2*M]=H[2*A]+H[2*Y],S.depth[M]=(S.depth[A]>=S.depth[Y]?S.depth[A]:S.depth[Y])+1,H[2*A+1]=H[2*Y+1]=M,S.heap[1]=M++,Te(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Oe,St){var Vr,Wt,Vn,et,Wn,Bn,Wr=St.dyn_tree,yc=St.max_code,wc=St.stat_desc.static_tree,Qo=St.stat_desc.has_stree,xc=St.stat_desc.extra_bits,Jo=St.stat_desc.extra_base,_n=St.stat_desc.max_length,Rs=0;for(et=0;et<=x;et++)Oe.bl_count[et]=0;for(Wr[2*Oe.heap[Oe.heap_max]+1]=0,Vr=Oe.heap_max+1;Vr>=7;M>>=1)if(1&Le&&ee.dyn_ltree[2*he]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(he=32;he>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=A+5,A+4<=M&&N!==-1?D(S,N,A,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Se(S,q,R)):(ne(S,4+(Y?1:0),3),function(ee,he,Le,Oe){var St;for(ne(ee,he-257,5),ne(ee,Le-1,5),ne(ee,Oe-4,4),St=0;St>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&A,S.last_lit++,N===0?S.dyn_ltree[2*A]++:(S.matches++,N--,S.dyn_ltree[2*(b[A]+d+1)]++,S.dyn_dtree[2*$(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,q),function(N){N.bi_valid===16?(de(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(o){(function(i,a){if(!i.setImmediate){var l,c,f,d,h=1,m={},y=!1,p=i.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(i);x=x&&x.setTimeout?x:i,l={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){v(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,E=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=E,C}}()?(d="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(C){i.postMessage(d+C,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){v(C.data)},function(C){f.port2.postMessage(C)}):p&&"onreadystatechange"in p.createElement("script")?(c=p.documentElement,function(C){var E=p.createElement("script");E.onreadystatechange=function(){v(C),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(C){setTimeout(v,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),T=0;T"u"?o===void 0?this:o:self)}).call(this,typeof Cc<"u"?Cc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(kC);var h5=kC.exports;const p5=cm(h5);function m5(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const g5=async(e,t)=>{const r=new p5;t.forEach(o=>{r.file(o.name,o.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},Dl=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},v5=e=>Dl(e).split(" ")[0],y5=async()=>jt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),w5=async e=>await jt().collection("domains").getOne(e),Yp=async e=>e.id?await jt().collection("domains").update(e.id,e):await jt().collection("domains").create(e),x5=async e=>await jt().collection("domains").delete(e),_5=(e,t)=>jt().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),b5=e=>{jt().collection("domains").unsubscribe(e)},S5=()=>{const e=vf(),t=Ss(),r=()=>{t("/edit")},n=d=>{t(`/edit?id=${d}`)},s=d=>{t(`/history?domain=${d}`)},o=async d=>{try{await x5(d),a(i.filter(h=>h.id!==d))}catch(h){console.error("Error deleting domain:",h)}},[i,a]=w.useState([]);w.useEffect(()=>{(async()=>{const h=await y5();a(h)})()},[]);const l=async d=>{const h=i.filter(x=>x.id===d),m=h[0].enabled,y=h[0];y.enabled=!m,await Yp(y);const p=i.map(x=>x.id===d?{...x,checked:!m}:x);a(p)},c=async d=>{try{b5(d.id),_5(d.id,h=>{console.log(h);const m=i.map(y=>y.id===h.id?{...h}:y);a(m)}),d.rightnow=!0,await Yp(d),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:u.jsxs(u.Fragment,{children:["执行失败,请查看",u.jsx(Kn,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},f=async d=>{const h=`${d.id}-${d.domain}.zip`,m=[{name:`${d.domain}.pem`,content:d.certificate?d.certificate:""},{name:`${d.domain}.key`,content:d.privateKey?d.privateKey:""}];await g5(h,m)};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(xv,{}),u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),u.jsx(Lt,{onClick:r,children:"新增域名"})]}),i.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-40",children:"域名"}),u.jsx("div",{className:"w-48",children:"有效期限"}),u.jsx("div",{className:"w-32",children:"最近执行状态"}),u.jsx("div",{className:"w-64",children:"最近执行阶段"}),u.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),u.jsx("div",{className:"w-32",children:"是否启用"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),i.map(d=>{var h,m,y,p,x,g;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:d.domain}),u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx("div",{children:d.expiredAt?u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"有效期90天"}),u.jsxs("div",{children:[v5(d.expiredAt),"到期"]})]}):"---"})}),u.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((h=d.expand)!=null&&h.lastDeployment)?u.jsx(u.Fragment,{children:((m=d.expand.lastDeployment)==null?void 0:m.phase)==="deploy"&&((y=d.expand.lastDeployment)!=null&&y.phaseSuccess)?u.jsx(n1,{size:16,className:"text-green-700"}):u.jsx(s1,{size:16,className:"text-red-700"})}):"---"}),u.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((p=d.expand)!=null&&p.lastDeployment)?u.jsx(hk,{phase:(x=d.expand.lastDeployment)==null?void 0:x.phase,phaseSuccess:(g=d.expand.lastDeployment)==null?void 0:g.phaseSuccess}):"---"}),u.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?Dl(d.lastDeployedAt):"---"}),u.jsx("div",{className:"sm:w-32 flex items-center",children:u.jsx(yC,{children:u.jsxs(u5,{children:[u.jsx(d5,{children:u.jsx(Yk,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),u.jsx(bv,{children:u.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:d.enabled?"禁用":"启用"})})]})})}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>s(d.id),children:"部署历史"}),u.jsxs(sw,{when:!!d.enabled,children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>c(d),children:"立即部署"})]}),u.jsxs(sw,{when:!!d.expiredAt,children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>f(d),children:"下载"})]}),!d.enabled&&u.jsxs(u.Fragment,{children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsxs(d3,{children:[u.jsx(f3,{asChild:!0,children:u.jsx(Lt,{variant:"link",className:"p-0",children:"删除"})}),u.jsxs(Ak,{children:[u.jsxs(Mk,{children:[u.jsx(Lk,{children:"删除域名"}),u.jsx(Fk,{children:"确定要删除域名吗?"})]}),u.jsxs(Ik,{children:[u.jsx(Uk,{children:"取消"}),u.jsx(zk,{onClick:()=>{o(d.id)},children:"确认"})]})]})]}),u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>n(d.id),children:"编辑"})]})]})]},d.id)})]}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(kp,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),u.jsx(Lt,{onClick:r,className:"mt-3",children:"添加域名"})]})})]})})},ht=w.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:we("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 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:n,...r}));ht.displayName="Input";var mc=e=>e.type==="checkbox",Ei=e=>e instanceof Date,fr=e=>e==null;const CC=e=>typeof e=="object";var Gt=e=>!fr(e)&&!Array.isArray(e)&&CC(e)&&!Ei(e),EC=e=>Gt(e)&&e.target?mc(e.target)?e.target.checked:e.target.value:e,k5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,TC=(e,t)=>e.has(k5(t)),C5=e=>{const t=e.constructor&&e.constructor.prototype;return Gt(t)&&t.hasOwnProperty("isPrototypeOf")},Sv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function xr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Sv&&(e instanceof Blob||e instanceof FileList))&&(r||Gt(e)))if(t=r?[]:{},!r&&!C5(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=xr(e[n]));else return e;return t}var bf=e=>Array.isArray(e)?e.filter(Boolean):[],It=e=>e===void 0,ce=(e,t,r)=>{if(!t||!Gt(e))return r;const n=bf(t.split(/[,[\].]+?/)).reduce((s,o)=>fr(s)?s:s[o],e);return It(n)||n===e?It(e[t])?r:e[t]:n},Rn=e=>typeof e=="boolean",kv=e=>/^\w*$/.test(e),RC=e=>bf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ct=(e,t,r)=>{let n=-1;const s=kv(t)?[t]:RC(t),o=s.length,i=o-1;for(;++nGe.useContext(NC),E5=e=>{const{children:t,...r}=e;return Ge.createElement(NC.Provider,{value:r},t)};var PC=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==an.all&&(t._proxyFormState[i]=!n||an.all),r&&(r[i]=!0),e[i]}});return s},Nr=e=>Gt(e)&&!Object.keys(e).length,jC=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Nr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||an.all))},tl=e=>Array.isArray(e)?e:[e],DC=(e,t,r)=>!e||!t||e===t||tl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Cv(e){const t=Ge.useRef(e);t.current=e,Ge.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function T5(e){const t=Sf(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,a]=Ge.useState(r._formState),l=Ge.useRef(!0),c=Ge.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=Ge.useRef(s);return f.current=s,Cv({disabled:n,next:d=>l.current&&DC(f.current,d.name,o)&&jC(d,c.current,r._updateFormState)&&a({...r._formState,...d}),subject:r._subjects.state}),Ge.useEffect(()=>(l.current=!0,c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),PC(i,r,c.current,!1)}var Pn=e=>typeof e=="string",OC=(e,t,r,n,s)=>Pn(e)?(n&&t.watch.add(e),ce(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),ce(r,o))):(n&&(t.watchAll=!0),r);function R5(e){const t=Sf(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},a=Ge.useRef(n);a.current=n,Cv({disabled:o,subject:r._subjects.values,next:f=>{DC(a.current,f.name,i)&&c(xr(OC(a.current,r._names,f.values||r._formValues,!1,s)))}});const[l,c]=Ge.useState(r._getWatch(n,s));return Ge.useEffect(()=>r._removeUnmounted()),l}function N5(e){const t=Sf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=TC(s._names.array,r),a=R5({control:s,name:r,defaultValue:ce(s._formValues,r,ce(s._defaultValues,r,e.defaultValue)),exact:!0}),l=T5({control:s,name:r}),c=Ge.useRef(s.register(r,{...e.rules,value:a,...Rn(e.disabled)?{disabled:e.disabled}:{}}));return Ge.useEffect(()=>{const f=s._options.shouldUnregister||o,d=(h,m)=>{const y=ce(s._fields,h);y&&y._f&&(y._f.mount=m)};if(d(r,!0),f){const h=xr(ce(s._options.defaultValues,r));ct(s._defaultValues,r,h),It(ce(s._formValues,r))&&ct(s._formValues,r,h)}return()=>{(i?f&&!s._state.action:f)?s.unregister(r):d(r,!1)}},[r,s,i,o]),Ge.useEffect(()=>{ce(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ce(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Rn(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:Ge.useCallback(f=>c.current.onChange({target:{value:EC(f),name:r},type:ud.CHANGE}),[r]),onBlur:Ge.useCallback(()=>c.current.onBlur({target:{value:ce(s._formValues,r),name:r},type:ud.BLUR}),[r,s]),ref:f=>{const d=ce(s._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ce(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!ce(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ce(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ce(l.validatingFields,r)},error:{enumerable:!0,get:()=>ce(l.errors,r)}})}}const P5=e=>e.render(N5(e));var AC=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},aw=e=>({isOnSubmit:!e||e===an.onSubmit,isOnBlur:e===an.onBlur,isOnChange:e===an.onChange,isOnAll:e===an.all,isOnTouch:e===an.onTouched}),lw=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const rl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=ce(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!n)break;if(i.ref&&t(i.ref,i.name)&&!n)break;rl(a,t)}else Gt(a)&&rl(a,t)}}};var j5=(e,t,r)=>{const n=tl(ce(e,r));return ct(n,"root",t[r]),ct(e,r,n),e},Ev=e=>e.type==="file",Bs=e=>typeof e=="function",dd=e=>{if(!Sv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ku=e=>Pn(e),Tv=e=>e.type==="radio",fd=e=>e instanceof RegExp;const cw={value:!1,isValid:!1},uw={value:!0,isValid:!0};var MC=e=>{if(Array.isArray(e)){if(e.length>1){const 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&&!It(e[0].attributes.value)?It(e[0].value)||e[0].value===""?uw:{value:e[0].value,isValid:!0}:uw:cw}return cw};const dw={isValid:!1,value:null};var IC=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,dw):dw;function fw(e,t,r="validate"){if(ku(e)||Array.isArray(e)&&e.every(ku)||Rn(e)&&!e)return{type:r,message:ku(e)?e:"",ref:t}}var ci=e=>Gt(e)&&!fd(e)?e:{value:e,message:""},hw=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:f,max:d,pattern:h,validate:m,name:y,valueAsNumber:p,mount:x,disabled:g}=e._f,v=ce(t,y);if(!x||g)return{};const _=i?i[0]:o,C=R=>{n&&_.reportValidity&&(_.setCustomValidity(Rn(R)?"":R||""),_.reportValidity())},E={},T=Tv(o),P=mc(o),O=T||P,j=(p||Ev(o))&&It(o.value)&&It(v)||dd(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,L=AC.bind(null,y,r,E),q=(R,F,b,V=Gn.maxLength,te=Gn.minLength)=>{const W=R?F:b;E[y]={type:R?V:te,message:W,ref:o,...L(R?V:te,W)}};if(s?!Array.isArray(v)||!v.length:a&&(!O&&(j||fr(v))||Rn(v)&&!v||P&&!MC(i).isValid||T&&!IC(i).isValid)){const{value:R,message:F}=ku(a)?{value:!!a,message:a}:ci(a);if(R&&(E[y]={type:Gn.required,message:F,ref:_,...L(Gn.required,F)},!r))return C(F),E}if(!j&&(!fr(f)||!fr(d))){let R,F;const b=ci(d),V=ci(f);if(!fr(v)&&!isNaN(v)){const te=o.valueAsNumber||v&&+v;fr(b.value)||(R=te>b.value),fr(V.value)||(F=tenew Date(new Date().toDateString()+" "+Q),Z=o.type=="time",I=o.type=="week";Pn(b.value)&&v&&(R=Z?W(v)>W(b.value):I?v>b.value:te>new Date(b.value)),Pn(V.value)&&v&&(F=Z?W(v)+R.value,V=!fr(F.value)&&v.length<+F.value;if((b||V)&&(q(b,R.message,F.message),!r))return C(E[y].message),E}if(h&&!j&&Pn(v)){const{value:R,message:F}=ci(h);if(fd(R)&&!v.match(R)&&(E[y]={type:Gn.pattern,message:F,ref:o,...L(Gn.pattern,F)},!r))return C(F),E}if(m){if(Bs(m)){const R=await m(v,t),F=fw(R,_);if(F&&(E[y]={...F,...L(Gn.validate,F.message)},!r))return C(F.message),E}else if(Gt(m)){let R={};for(const F in m){if(!Nr(R)&&!r)break;const b=fw(await m[F](v,t),_,F);b&&(R={...b,...L(F,b.message)},C(b.message),r&&(E[y]=R))}if(!Nr(R)&&(E[y]={ref:_,...R},!r))return E}}return C(!0),E};function D5(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},hd=e=>fr(e)||!CC(e);function Ro(e,t){if(hd(e)||hd(t))return e===t;if(Ei(e)&&Ei(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const o=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Ei(o)&&Ei(i)||Gt(o)&&Gt(i)||Array.isArray(o)&&Array.isArray(i)?!Ro(o,i):o!==i)return!1}}return!0}var LC=e=>e.type==="select-multiple",A5=e=>Tv(e)||mc(e),Ch=e=>dd(e)&&e.isConnected,FC=e=>{for(const t in e)if(Bs(e[t]))return!0;return!1};function pd(e,t={}){const r=Array.isArray(e);if(Gt(e)||r)for(const n in e)Array.isArray(e[n])||Gt(e[n])&&!FC(e[n])?(t[n]=Array.isArray(e[n])?[]:{},pd(e[n],t[n])):fr(e[n])||(t[n]=!0);return t}function zC(e,t,r){const n=Array.isArray(e);if(Gt(e)||n)for(const s in e)Array.isArray(e[s])||Gt(e[s])&&!FC(e[s])?It(t)||hd(r[s])?r[s]=Array.isArray(e[s])?pd(e[s],[]):{...pd(e[s])}:zC(e[s],fr(t)?{}:t[s],r[s]):r[s]=!Ro(e[s],t[s]);return r}var ru=(e,t)=>zC(e,t,pd(t)),UC=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>It(e)?e:t?e===""?NaN:e&&+e:r&&Pn(e)?new Date(e):n?n(e):e;function Eh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Ev(t)?t.files:Tv(t)?IC(e.refs).value:LC(t)?[...t.selectedOptions].map(({value:r})=>r):mc(t)?MC(e.refs).value:UC(It(t.value)?e.ref.value:t.value,e)}var M5=(e,t,r,n)=>{const s={};for(const o of e){const i=ce(t,o);i&&ct(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Aa=e=>It(e)?e:fd(e)?e.source:Gt(e)?fd(e.value)?e.value.source:e.value:e,I5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pw(e,t,r){const n=ce(e,r);if(n||kv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=ce(t,o),a=ce(e,o);if(i&&!Array.isArray(i)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:r}}var L5=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,F5=(e,t)=>!bf(ce(e,t)).length&&Bt(e,t);const z5={mode:an.onSubmit,reValidateMode:an.onChange,shouldFocusError:!0};function U5(e={}){let t={...z5,...e},r={submitCount:0,isDirty:!1,isLoading:Bs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Gt(t.defaultValues)||Gt(t.values)?xr(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:xr(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:kh(),array:kh(),state:kh()},h=aw(t.mode),m=aw(t.reValidateMode),y=t.criteriaMode===an.all,p=S=>N=>{clearTimeout(c),c=setTimeout(S,N)},x=async S=>{if(f.isValid||S){const N=t.resolver?Nr((await O()).errors):await L(n,!0);N!==r.isValid&&d.state.next({isValid:N})}},g=(S,N)=>{(f.isValidating||f.validatingFields)&&((S||Array.from(a.mount)).forEach(A=>{A&&(N?ct(r.validatingFields,A,N):Bt(r.validatingFields,A))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Nr(r.validatingFields)}))},v=(S,N=[],A,Y,M=!0,H=!0)=>{if(Y&&A){if(i.action=!0,H&&Array.isArray(ce(n,S))){const X=A(ce(n,S),Y.argA,Y.argB);M&&ct(n,S,X)}if(H&&Array.isArray(ce(r.errors,S))){const X=A(ce(r.errors,S),Y.argA,Y.argB);M&&ct(r.errors,S,X),F5(r.errors,S)}if(f.touchedFields&&H&&Array.isArray(ce(r.touchedFields,S))){const X=A(ce(r.touchedFields,S),Y.argA,Y.argB);M&&ct(r.touchedFields,S,X)}f.dirtyFields&&(r.dirtyFields=ru(s,o)),d.state.next({name:S,isDirty:R(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ct(o,S,N)},_=(S,N)=>{ct(r.errors,S,N),d.state.next({errors:r.errors})},C=S=>{r.errors=S,d.state.next({errors:r.errors,isValid:!1})},E=(S,N,A,Y)=>{const M=ce(n,S);if(M){const H=ce(o,S,It(A)?ce(s,S):A);It(H)||Y&&Y.defaultChecked||N?ct(o,S,N?H:Eh(M._f)):V(S,H),i.mount&&x()}},T=(S,N,A,Y,M)=>{let H=!1,X=!1;const ee={name:S},he=!!(ce(n,S)&&ce(n,S)._f&&ce(n,S)._f.disabled);if(!A||Y){f.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=R(),H=X!==ee.isDirty);const Le=he||Ro(ce(s,S),N);X=!!(!he&&ce(r.dirtyFields,S)),Le||he?Bt(r.dirtyFields,S):ct(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||f.dirtyFields&&X!==!Le}if(A){const Le=ce(r.touchedFields,S);Le||(ct(r.touchedFields,S,A),ee.touchedFields=r.touchedFields,H=H||f.touchedFields&&Le!==A)}return H&&M&&d.state.next(ee),H?ee:{}},P=(S,N,A,Y)=>{const M=ce(r.errors,S),H=f.isValid&&Rn(N)&&r.isValid!==N;if(e.delayError&&A?(l=p(()=>_(S,A)),l(e.delayError)):(clearTimeout(c),l=null,A?ct(r.errors,S,A):Bt(r.errors,S)),(A?!Ro(M,A):M)||!Nr(Y)||H){const X={...Y,...H&&Rn(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},d.state.next(X)}},O=async S=>{g(S,!0);const N=await t.resolver(o,t.context,M5(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return g(S),N},j=async S=>{const{errors:N}=await O(S);if(S)for(const A of S){const Y=ce(N,A);Y?ct(r.errors,A,Y):Bt(r.errors,A)}else r.errors=N;return N},L=async(S,N,A={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);g([Y],!0);const he=await hw(M,o,y,t.shouldUseNativeValidation&&!N,ee);if(g([Y]),he[H.name]&&(A.valid=!1,N))break;!N&&(ce(he,H.name)?ee?j5(r.errors,he,H.name):ct(r.errors,H.name,he[H.name]):Bt(r.errors,H.name))}X&&await L(X,N,A)}}return A.valid},q=()=>{for(const S of a.unMount){const N=ce(n,S);N&&(N._f.refs?N._f.refs.every(A=>!Ch(A)):!Ch(N._f.ref))&&Ee(S)}a.unMount=new Set},R=(S,N)=>(S&&N&&ct(o,S,N),!Ro(z(),s)),F=(S,N,A)=>OC(S,a,{...i.mount?o:It(N)?s:Pn(S)?{[S]:N}:N},A,N),b=S=>bf(ce(i.mount?o:s,S,e.shouldUnregister?ce(s,S,[]):[])),V=(S,N,A={})=>{const Y=ce(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&ct(o,S,UC(N,H)),M=dd(H.ref)&&fr(N)?"":N,LC(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?mc(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):Ev(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||d.values.next({name:S,values:{...o}})))}(A.shouldDirty||A.shouldTouch)&&T(S,M,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&Q(S)},te=(S,N,A)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=ce(n,H);(a.array.has(S)||!hd(M)||X&&!X._f)&&!Ei(M)?te(H,M,A):V(H,M,A)}},W=(S,N,A={})=>{const Y=ce(n,S),M=a.array.has(S),H=xr(N);ct(o,S,H),M?(d.array.next({name:S,values:{...o}}),(f.isDirty||f.dirtyFields)&&A.shouldDirty&&d.state.next({name:S,dirtyFields:ru(s,o),isDirty:R(S,H)})):Y&&!Y._f&&!fr(H)?te(S,H,A):V(S,H,A),lw(S,a)&&d.state.next({...r}),d.values.next({name:i.mount?S:void 0,values:{...o}})},Z=async S=>{i.mount=!0;const N=S.target;let A=N.name,Y=!0;const M=ce(n,A),H=()=>N.type?Eh(M._f):EC(S),X=ee=>{Y=Number.isNaN(ee)||ee===ce(o,A,ee)};if(M){let ee,he;const Le=H(),Oe=S.type===ud.BLUR||S.type===ud.FOCUS_OUT,St=!I5(M._f)&&!t.resolver&&!ce(r.errors,A)&&!M._f.deps||L5(Oe,ce(r.touchedFields,A),r.isSubmitted,m,h),Vr=lw(A,a,Oe);ct(o,A,Le),Oe?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Wt=T(A,Le,Oe,!1),Vn=!Nr(Wt)||Vr;if(!Oe&&d.values.next({name:A,type:S.type,values:{...o}}),St)return f.isValid&&x(),Vn&&d.state.next({name:A,...Vr?{}:Wt});if(!Oe&&Vr&&d.state.next({...r}),t.resolver){const{errors:et}=await O([A]);if(X(Le),Y){const Wn=pw(r.errors,n,A),Bn=pw(et,n,Wn.name||A);ee=Bn.error,A=Bn.name,he=Nr(et)}}else g([A],!0),ee=(await hw(M,o,y,t.shouldUseNativeValidation))[A],g([A]),X(Le),Y&&(ee?he=!1:f.isValid&&(he=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),P(A,he,ee,Wt))}},I=(S,N)=>{if(ce(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let A,Y;const M=tl(S);if(t.resolver){const H=await j(It(S)?S:M);A=Nr(H),Y=S?!M.some(X=>ce(H,X)):A}else S?(Y=(await Promise.all(M.map(async H=>{const X=ce(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&x()):Y=A=await L(n);return d.state.next({...!Pn(S)||f.isValid&&A!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:A}:{},errors:r.errors}),N.shouldFocus&&!Y&&rl(n,I,S?M:a.mount),Y},z=S=>{const N={...i.mount?o:s};return It(S)?N:Pn(S)?ce(N,S):S.map(A=>ce(N,A))},$=(S,N)=>({invalid:!!ce((N||r).errors,S),isDirty:!!ce((N||r).dirtyFields,S),error:ce((N||r).errors,S),isValidating:!!ce(r.validatingFields,S),isTouched:!!ce((N||r).touchedFields,S)}),de=S=>{S&&tl(S).forEach(N=>Bt(r.errors,N)),d.state.next({errors:S?r.errors:{}})},ne=(S,N,A)=>{const Y=(ce(n,S,{_f:{}})._f||{}).ref,M=ce(r.errors,S)||{},{ref:H,message:X,type:ee,...he}=M;ct(r.errors,S,{...he,...N,ref:Y}),d.state.next({name:S,errors:r.errors,isValid:!1}),A&&A.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Bs(S)?d.values.subscribe({next:A=>S(F(void 0,N),A)}):F(S,N,!0),Ee=(S,N={})=>{for(const A of S?tl(S):a.mount)a.mount.delete(A),a.array.delete(A),N.keepValue||(Bt(n,A),Bt(o,A)),!N.keepError&&Bt(r.errors,A),!N.keepDirty&&Bt(r.dirtyFields,A),!N.keepTouched&&Bt(r.touchedFields,A),!N.keepIsValidating&&Bt(r.validatingFields,A),!t.shouldUnregister&&!N.keepDefaultValue&&Bt(s,A);d.values.next({values:{...o}}),d.state.next({...r,...N.keepDirty?{isDirty:R()}:{}}),!N.keepIsValid&&x()},fe=({disabled:S,name:N,field:A,fields:Y,value:M})=>{if(Rn(S)&&i.mount||S){const H=S?void 0:It(M)?Eh(A?A._f:ce(Y,N)._f):M;ct(o,N,H),T(N,H,!1,!1,!0)}},ge=(S,N={})=>{let A=ce(n,S);const Y=Rn(N.disabled);return ct(n,S,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),A?fe({field:A,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Aa(N.min),max:Aa(N.max),minLength:Aa(N.minLength),maxLength:Aa(N.maxLength),pattern:Aa(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ge(S,N),A=ce(n,S);const H=It(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=A5(H),ee=A._f.refs||[];if(X?ee.find(he=>he===H):H===A._f.ref)return;ct(n,S,{_f:{...A._f,...X?{refs:[...ee.filter(Ch),H,...Array.isArray(ce(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else A=ce(n,S,{}),A._f&&(A._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(TC(a.array,S)&&i.action)&&a.unMount.add(S)}}},be=()=>t.shouldFocusError&&rl(n,I,a.mount),Pe=S=>{Rn(S)&&(d.state.next({disabled:S}),rl(n,(N,A)=>{const Y=ce(n,A);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},Te=(S,N)=>async A=>{let Y;A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let M=xr(o);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await O();r.errors=H,M=X}else await L(n);if(Bt(r.errors,"root"),Nr(r.errors)){d.state.next({errors:{}});try{await S(M,A)}catch(H){Y=H}}else N&&await N({...r.errors},A),be(),setTimeout(be);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Se=(S,N={})=>{ce(n,S)&&(It(N.defaultValue)?W(S,xr(ce(s,S))):(W(S,N.defaultValue),ct(s,S,xr(N.defaultValue))),N.keepTouched||Bt(r.touchedFields,S),N.keepDirty||(Bt(r.dirtyFields,S),r.isDirty=N.defaultValue?R(S,xr(ce(s,S))):R()),N.keepError||(Bt(r.errors,S),f.isValid&&x()),d.state.next({...r}))},qe=(S,N={})=>{const A=S?xr(S):s,Y=xr(A),M=Nr(S),H=M?s:Y;if(N.keepDefaultValues||(s=A),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)ce(r.dirtyFields,X)?ct(H,X,ce(o,X)):W(X,ce(H,X));else{if(Sv&&It(S))for(const X of a.mount){const ee=ce(n,X);if(ee&&ee._f){const he=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(dd(he)){const Le=he.closest("form");if(Le){Le.reset();break}}}}n={}}o=e.shouldUnregister?N.keepDefaultValues?xr(s):{}:xr(H),d.array.next({values:{...H}}),d.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!N.keepIsValid||!!N.keepDirtyValues,i.watch=!!e.shouldUnregister,d.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ro(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&o?ru(s,o):r.dirtyFields:N.keepDefaultValues&&S?ru(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>qe(Bs(S)?S(o):S,N);return{control:{register:ge,unregister:Ee,getFieldState:$,handleSubmit:Te,setError:ne,_executeSchema:O,_getWatch:F,_getDirty:R,_updateValid:x,_removeUnmounted:q,_updateFieldArray:v,_updateDisabledField:fe,_getFieldArray:b,_reset:qe,_resetDefaultValues:()=>Bs(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Pe,_subjects:d,_proxyFormState:f,_setErrors:C,get _fields(){return n},get _formValues(){return o},get _state(){return i},set _state(S){i=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ge,handleSubmit:Te,watch:se,setValue:W,getValues:z,reset:k,resetField:Se,clearErrors:de,unregister:Ee,setError:ne,setFocus:(S,N={})=>{const A=ce(n,S),Y=A&&A._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:$}}function pa(e={}){const t=Ge.useRef(),r=Ge.useRef(),[n,s]=Ge.useState({isDirty:!1,isValidating:!1,isLoading:Bs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Bs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...U5(e),formState:n});const o=t.current.control;return o._options=e,Cv({subject:o._subjects.state,next:i=>{jC(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),Ge.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ge.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),Ge.useEffect(()=>{e.values&&!Ro(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),Ge.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),Ge.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),Ge.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=PC(n,o),t.current}const mw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ce(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},$C=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?mw(n.ref,r,e):n.refs&&n.refs.forEach(s=>mw(s,r,e))}},$5=(e,t)=>{t.shouldUseNativeValidation&&$C(e,t);const r={};for(const n in e){const s=ce(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(V5(t.names||Object.keys(e),n)){const i=Object.assign({},ce(r,n));ct(i,"root",o),ct(r,n,i)}else ct(r,n,o)}return r},V5=(e,t)=>e.some(r=>r.startsWith(t+"."));var W5=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var l=r[i].types,c=l&&l[n.code];r[i]=AC(i,t,r,s,c?[].concat(c,n.message):n.message)}e.shift()}return r},ma=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(c){return o.shouldUseNativeValidation&&$C({},o),{errors:{},values:r.raw?n:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:$5(W5(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Qe;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Qe||(Qe={}));var Zp;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Zp||(Zp={}));const ye=Qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zs=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},ie=Qe.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"]),B5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const 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){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,l=0;for(;lr.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const Xi=(e,t)=>{let r;switch(e.code){case ie.invalid_type:e.received===ye.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Qe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${Qe.joinValues(e.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Qe.joinValues(e.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${Qe.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.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}"`:Qe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ie.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 ie.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 ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=t.defaultError,Qe.assertNever(e)}return{message:r}};let VC=Xi;function H5(e){VC=e}function md(){return VC}const gd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Y5=[];function pe(e,t){const r=md(),n=gd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Xi?void 0:Xi].filter(s=>!!s)});e.common.issues.push(n)}class lr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return Ie;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,i=await s.value;n.push({key:o,value:i})}return lr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}}const Ie=Object.freeze({status:"aborted"}),Ti=e=>({status:"dirty",value:e}),pr=e=>({status:"valid",value:e}),Gp=e=>e.status==="aborted",Kp=e=>e.status==="dirty",Ol=e=>e.status==="valid",Al=e=>typeof Promise<"u"&&e instanceof Promise;function vd(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function WC(e,t,r,n,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));var $a,Va;class Ln{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}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}}const gw=(e,t)=>{if(Ol(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;const r=new Lr(e.common.issues);return this._error=r,this._error}}};function Fe(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var l,c;const{message:f}=e;return i.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(l=f??n)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=f??r)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Be{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 zs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new lr,ctx:{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Al(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return gw(s,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(Al(s)?s:Promise.resolve(s));return gw(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ie.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new yn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return An.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fn.create(this,this._def)}promise(){return Ji.create(this,this._def)}or(t){return Fl.create([this,t],this._def)}and(t){return zl.create(this,t,this._def)}transform(t){return new yn({...Fe(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Bl({...Fe(this._def),innerType:this,defaultValue:r,typeName:Ae.ZodDefault})}brand(){return new Rv({typeName:Ae.ZodBranded,type:this,...Fe(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Hl({...Fe(this._def),innerType:this,catchValue:r,typeName:Ae.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return gc.create(this,t)}readonly(){return Yl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Z5=/^c[^\s-]{8,}$/i,G5=/^[0-9a-z]+$/,K5=/^[0-9A-HJKMNP-TV-Z]{26}$/,q5=/^[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,X5=/^[a-z0-9_-]{21}$/i,Q5=/^[-+]?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)?)??$/,J5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ez="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Th;const 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])$/,rz=/^(([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})))$/,nz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,BC="((\\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])))",sz=new RegExp(`^${BC}$`);function HC(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(`^${HC(e)}$`)}function YC(e){let t=`${BC}T${HC(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function iz(e,t){return!!((t==="v4"||!t)&&tz.test(e)||(t==="v6"||!t)&&rz.test(e))}class cn extends Be{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.string,received:o.parsedType}),Ie}const n=new lr;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.lengtht.test(s),{validation:r,code:ie.invalid_string,...Ce.errToObj(n)})}_addCheck(t){return new cn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...Ce.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ce.errToObj(r)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new cn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new cn({...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(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new cn({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Fe(e)})};function az(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class oo extends Be{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)!==ye.number){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.number,received:o.parsedType}),Ie}let n;const s=new lr;for(const o of this._def.checks)o.kind==="int"?Qe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?az(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_finite,message:o.message}),s.dirty()):Qe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new oo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new oo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Qe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew oo({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Fe(e)});class io extends Be{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)!==ye.bigint){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.bigint,received:o.parsedType}),Ie}let n;const s=new lr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Qe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new io({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Fe(e)})};class Ml extends Be{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.boolean,received:n.parsedType}),Ie}return pr(t.data)}}Ml.create=e=>new Ml({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Fe(e)});class Wo extends Be{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.date,received:o.parsedType}),Ie}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_date}),Ie}const n=new lr;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Qe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(r)})}get minDate(){let t=null;for(const 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(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew Wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Fe(e)});class yd extends Be{_parse(t){if(this._getType(t)!==ye.symbol){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.symbol,received:n.parsedType}),Ie}return pr(t.data)}}yd.create=e=>new yd({typeName:Ae.ZodSymbol,...Fe(e)});class Il extends Be{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.undefined,received:n.parsedType}),Ie}return pr(t.data)}}Il.create=e=>new Il({typeName:Ae.ZodUndefined,...Fe(e)});class Ll extends Be{_parse(t){if(this._getType(t)!==ye.null){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.null,received:n.parsedType}),Ie}return pr(t.data)}}Ll.create=e=>new Ll({typeName:Ae.ZodNull,...Fe(e)});class Qi extends Be{constructor(){super(...arguments),this._any=!0}_parse(t){return pr(t.data)}}Qi.create=e=>new Qi({typeName:Ae.ZodAny,...Fe(e)});class Do extends Be{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pr(t.data)}}Do.create=e=>new Do({typeName:Ae.ZodUnknown,...Fe(e)});class ys extends Be{_parse(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ie.invalid_type,expected:ye.never,received:r.parsedType}),Ie}}ys.create=e=>new ys({typeName:Ae.ZodNever,...Fe(e)});class wd extends Be{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.void,received:n.parsedType}),Ie}return pr(t.data)}}wd.create=e=>new wd({typeName:Ae.ZodVoid,...Fe(e)});class fn extends Be{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ye.array)return pe(r,{code:ie.invalid_type,expected:ye.array,received:r.parsedType}),Ie;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,a=r.data.lengths.maxLength.value&&(pe(r,{code:ie.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Ln(r,i,r.path,a)))).then(i=>lr.mergeArray(n,i));const o=[...r.data].map((i,a)=>s.type._parseSync(new Ln(r,i,r.path,a)));return lr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new fn({...this._def,minLength:{value:t,message:Ce.toString(r)}})}max(t,r){return new fn({...this._def,maxLength:{value:t,message:Ce.toString(r)}})}length(t,r){return new fn({...this._def,exactLength:{value:t,message:Ce.toString(r)}})}nonempty(t){return this.min(1,t)}}fn.create=(e,t)=>new fn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Fe(t)});function di(e){if(e instanceof Tt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=An.create(di(n))}return new Tt({...e._def,shape:()=>t})}else return e instanceof fn?new fn({...e._def,type:di(e.element)}):e instanceof An?An.create(di(e.unwrap())):e instanceof lo?lo.create(di(e.unwrap())):e instanceof Fn?Fn.create(e.items.map(t=>di(t))):e}class Tt extends Be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Qe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return pe(c,{code:ie.invalid_type,expected:ye.object,received:c.parsedType}),Ie}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ys&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const f=o[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:f._parse(new Ln(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof ys){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of a)l.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(c==="strict")a.length>0&&(pe(s,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of a){const d=s.data[f];l.push({key:{status:"valid",value:f},value:c._parse(new Ln(s,d,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of l){const d=await f.key,h=await f.value;c.push({key:d,value:h,alwaysSet:f.alwaysSet})}return c}).then(c=>lr.mergeObjectSync(n,c)):lr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Ce.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Tt({...this._def,unknownKeys:"strip"})}passthrough(){return new Tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ae.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Tt({...this._def,catchall:t})}pick(t){const r={};return Qe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Tt({...this._def,shape:()=>r})}omit(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Tt({...this._def,shape:()=>r})}deepPartial(){return di(this)}partial(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Tt({...this._def,shape:()=>r})}required(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof An;)o=o._def.innerType;r[n]=o}}),new Tt({...this._def,shape:()=>r})}keyof(){return ZC(Qe.objectKeys(this.shape))}}Tt.create=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strip",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});Tt.strictCreate=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strict",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});Tt.lazycreate=(e,t)=>new Tt({shape:e,unknownKeys:"strip",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});class Fl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Lr(a.ctx.common.issues));return pe(r,{code:ie.invalid_union,unionErrors:i}),Ie}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},f=l._parseSync({data:r.data,path:r.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Lr(l));return pe(r,{code:ie.invalid_union,unionErrors:a}),Ie}}get options(){return this._def.options}}Fl.create=(e,t)=>new Fl({options:e,typeName:Ae.ZodUnion,...Fe(t)});const qn=e=>e instanceof $l?qn(e.schema):e instanceof yn?qn(e.innerType()):e instanceof Vl?[e.value]:e instanceof ao?e.options:e instanceof Wl?Qe.objectValues(e.enum):e instanceof Bl?qn(e._def.innerType):e instanceof Il?[void 0]:e instanceof Ll?[null]:e instanceof An?[void 0,...qn(e.unwrap())]:e instanceof lo?[null,...qn(e.unwrap())]:e instanceof Rv||e instanceof Yl?qn(e.unwrap()):e instanceof Hl?qn(e._def.innerType):[];class kf extends Be{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return pe(r,{code:ie.invalid_type,expected:ye.object,received:r.parsedType}),Ie;const n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(pe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const o of r){const i=qn(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new kf({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Fe(n)})}}function qp(e,t){const r=zs(e),n=zs(t);if(e===t)return{valid:!0,data:e};if(r===ye.object&&n===ye.object){const s=Qe.objectKeys(t),o=Qe.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=qp(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(r===ye.array&&n===ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{if(Gp(o)||Gp(i))return Ie;const a=qp(o.value,i.value);return a.valid?((Kp(o)||Kp(i))&&r.dirty(),{status:r.value,value:a.data}):(pe(n,{code:ie.invalid_intersection_types}),Ie)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}zl.create=(e,t,r)=>new zl({left:e,right:t,typeName:Ae.ZodIntersection,...Fe(r)});class Fn extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.array)return pe(n,{code:ie.invalid_type,expected:ye.array,received:n.parsedType}),Ie;if(n.data.lengththis._def.items.length&&(pe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ln(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>lr.mergeArray(r,i)):lr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Fn({...this._def,rest:t})}}Fn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:e,typeName:Ae.ZodTuple,rest:null,...Fe(t)})};class Ul extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return pe(n,{code:ie.invalid_type,expected:ye.object,received:n.parsedType}),Ie;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in n.data)s.push({key:o._parse(new Ln(n,a,n.path,a)),value:i._parse(new Ln(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?lr.mergeObjectAsync(r,s):lr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Be?new Ul({keyType:t,valueType:r,typeName:Ae.ZodRecord,...Fe(n)}):new Ul({keyType:cn.create(),valueType:t,typeName:Ae.ZodRecord,...Fe(r)})}}class xd extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.map)return pe(n,{code:ie.invalid_type,expected:ye.map,received:n.parsedType}),Ie;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new Ln(n,a,n.path,[c,"key"])),value:o._parse(new Ln(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,f=await l.value;if(c.status==="aborted"||f.status==="aborted")return Ie;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,f=l.value;if(c.status==="aborted"||f.status==="aborted")return Ie;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}}}}xd.create=(e,t,r)=>new xd({valueType:t,keyType:e,typeName:Ae.ZodMap,...Fe(r)});class Bo extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.set)return pe(n,{code:ie.invalid_type,expected:ye.set,received:n.parsedType}),Ie;const s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(pe(n,{code:ie.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const f of l){if(f.status==="aborted")return Ie;f.status==="dirty"&&r.dirty(),c.add(f.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>o._parse(new Ln(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,r){return new Bo({...this._def,minSize:{value:t,message:Ce.toString(r)}})}max(t,r){return new Bo({...this._def,maxSize:{value:t,message:Ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Bo.create=(e,t)=>new Bo({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Fe(t)});class $i extends Be{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.function)return pe(r,{code:ie.invalid_type,expected:ye.function,received:r.parsedType}),Ie;function n(a,l){return gd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Xi].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function s(a,l){return gd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Xi].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Ji){const a=this;return pr(async function(...l){const c=new Lr([]),f=await a._def.args.parseAsync(l,o).catch(m=>{throw c.addIssue(n(l,m)),c}),d=await Reflect.apply(i,this,f);return await a._def.returns._def.type.parseAsync(d,o).catch(m=>{throw c.addIssue(s(d,m)),c})})}else{const a=this;return pr(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Lr([n(l,c.error)]);const f=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(f,o);if(!d.success)throw new Lr([s(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $i({...this._def,args:Fn.create(t).rest(Do.create())})}returns(t){return new $i({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new $i({args:t||Fn.create([]).rest(Do.create()),returns:r||Do.create(),typeName:Ae.ZodFunction,...Fe(n)})}}class $l extends Be{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$l.create=(e,t)=>new $l({getter:e,typeName:Ae.ZodLazy,...Fe(t)});class Vl extends Be{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}Vl.create=(e,t)=>new Vl({value:e,typeName:Ae.ZodLiteral,...Fe(t)});function ZC(e,t){return new ao({values:e,typeName:Ae.ZodEnum,...Fe(t)})}class ao extends Be{constructor(){super(...arguments),$a.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{expected:Qe.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Ie}if(vd(this,$a)||WC(this,$a,new Set(this._def.values)),!vd(this,$a).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Ie}return pr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ao.create(t,{...this._def,...r})}exclude(t,r=this._def){return ao.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}$a=new WeakMap;ao.create=ZC;class Wl extends Be{constructor(){super(...arguments),Va.set(this,void 0)}_parse(t){const r=Qe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ye.string&&n.parsedType!==ye.number){const s=Qe.objectValues(r);return pe(n,{expected:Qe.joinValues(s),received:n.parsedType,code:ie.invalid_type}),Ie}if(vd(this,Va)||WC(this,Va,new Set(Qe.getValidEnumValues(this._def.values))),!vd(this,Va).has(t.data)){const s=Qe.objectValues(r);return pe(n,{received:n.data,code:ie.invalid_enum_value,options:s}),Ie}return pr(t.data)}get enum(){return this._def.values}}Va=new WeakMap;Wl.create=(e,t)=>new Wl({values:e,typeName:Ae.ZodNativeEnum,...Fe(t)});class Ji extends Be{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.promise&&r.common.async===!1)return pe(r,{code:ie.invalid_type,expected:ye.promise,received:r.parsedType}),Ie;const n=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return pr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ji.create=(e,t)=>new Ji({type:e,typeName:Ae.ZodPromise,...Fe(t)});class yn extends Be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{pe(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return Ie;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Ie:l.status==="dirty"||r.value==="dirty"?Ti(l.value):l});{if(r.value==="aborted")return Ie;const a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?Ie:a.status==="dirty"||r.value==="dirty"?Ti(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ie:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ie:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ol(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ol(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);Qe.assertNever(s)}}yn.create=(e,t,r)=>new yn({schema:e,typeName:Ae.ZodEffects,effect:t,...Fe(r)});yn.createWithPreprocess=(e,t,r)=>new yn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Fe(r)});class An extends Be{_parse(t){return this._getType(t)===ye.undefined?pr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}An.create=(e,t)=>new An({innerType:e,typeName:Ae.ZodOptional,...Fe(t)});class lo extends Be{_parse(t){return this._getType(t)===ye.null?pr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ae.ZodNullable,...Fe(t)});class Bl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ye.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Bl.create=(e,t)=>new Bl({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Fe(t)});class Hl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Al(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Hl.create=(e,t)=>new Hl({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Fe(t)});class _d extends Be{_parse(t){if(this._getType(t)!==ye.nan){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.nan,received:n.parsedType}),Ie}return{status:"valid",value:t.data}}}_d.create=e=>new _d({typeName:Ae.ZodNaN,...Fe(e)});const lz=Symbol("zod_brand");class Rv extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class gc extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Ie:o.status==="dirty"?(r.dirty(),Ti(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ie:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new gc({in:t,out:r,typeName:Ae.ZodPipeline})}}class Yl extends Be{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Ol(s)&&(s.value=Object.freeze(s.value)),s);return Al(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Yl.create=(e,t)=>new Yl({innerType:e,typeName:Ae.ZodReadonly,...Fe(t)});function GC(e,t={},r){return e?Qi.create().superRefine((n,s)=>{var o,i;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Qi.create()}const cz={object:Tt.lazycreate};var Ae;(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"})(Ae||(Ae={}));const uz=(e,t={message:`Input not instance of ${e.name}`})=>GC(r=>r instanceof e,t),KC=cn.create,qC=oo.create,dz=_d.create,fz=io.create,XC=Ml.create,hz=Wo.create,pz=yd.create,mz=Il.create,gz=Ll.create,vz=Qi.create,yz=Do.create,wz=ys.create,xz=wd.create,_z=fn.create,bz=Tt.create,Sz=Tt.strictCreate,kz=Fl.create,Cz=kf.create,Ez=zl.create,Tz=Fn.create,Rz=Ul.create,Nz=xd.create,Pz=Bo.create,jz=$i.create,Dz=$l.create,Oz=Vl.create,Az=ao.create,Mz=Wl.create,Iz=Ji.create,vw=yn.create,Lz=An.create,Fz=lo.create,zz=yn.createWithPreprocess,Uz=gc.create,$z=()=>KC().optional(),Vz=()=>qC().optional(),Wz=()=>XC().optional(),Bz={string:e=>cn.create({...e,coerce:!0}),number:e=>oo.create({...e,coerce:!0}),boolean:e=>Ml.create({...e,coerce:!0}),bigint:e=>io.create({...e,coerce:!0}),date:e=>Wo.create({...e,coerce:!0})},Hz=Ie;var He=Object.freeze({__proto__:null,defaultErrorMap:Xi,setErrorMap:H5,getErrorMap:md,makeIssue:gd,EMPTY_PATH:Y5,addIssueToContext:pe,ParseStatus:lr,INVALID:Ie,DIRTY:Ti,OK:pr,isAborted:Gp,isDirty:Kp,isValid:Ol,isAsync:Al,get util(){return Qe},get objectUtil(){return Zp},ZodParsedType:ye,getParsedType:zs,ZodType:Be,datetimeRegex:YC,ZodString:cn,ZodNumber:oo,ZodBigInt:io,ZodBoolean:Ml,ZodDate:Wo,ZodSymbol:yd,ZodUndefined:Il,ZodNull:Ll,ZodAny:Qi,ZodUnknown:Do,ZodNever:ys,ZodVoid:wd,ZodArray:fn,ZodObject:Tt,ZodUnion:Fl,ZodDiscriminatedUnion:kf,ZodIntersection:zl,ZodTuple:Fn,ZodRecord:Ul,ZodMap:xd,ZodSet:Bo,ZodFunction:$i,ZodLazy:$l,ZodLiteral:Vl,ZodEnum:ao,ZodNativeEnum:Wl,ZodPromise:Ji,ZodEffects:yn,ZodTransformer:yn,ZodOptional:An,ZodNullable:lo,ZodDefault:Bl,ZodCatch:Hl,ZodNaN:_d,BRAND:lz,ZodBranded:Rv,ZodPipeline:gc,ZodReadonly:Yl,custom:GC,Schema:Be,ZodSchema:Be,late:cz,get ZodFirstPartyTypeKind(){return Ae},coerce:Bz,any:vz,array:_z,bigint:fz,boolean:XC,date:hz,discriminatedUnion:Cz,effect:vw,enum:Az,function:jz,instanceof:uz,intersection:Ez,lazy:Dz,literal:Oz,map:Nz,nan:dz,nativeEnum:Mz,never:wz,null:gz,nullable:Fz,number:qC,object:bz,oboolean:Wz,onumber:Vz,optional:Lz,ostring:$z,pipeline:Uz,preprocess:zz,promise:Iz,record:Rz,set:Pz,strictObject:Sz,string:KC,symbol:pz,transformer:vw,tuple:Tz,undefined:mz,union:kz,unknown:yz,void:xz,NEVER:Hz,ZodIssueCode:ie,quotelessJson:B5,ZodError:Lr}),Yz="Label",QC=w.forwardRef((e,t)=>u.jsx(De.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));QC.displayName=Yz;var JC=QC;const Zz=Jl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Zl=w.forwardRef(({className:e,...t},r)=>u.jsx(JC,{ref:r,className:we(Zz(),e),...t}));Zl.displayName=JC.displayName;const ga=E5,eE=w.createContext({}),at=({...e})=>u.jsx(eE.Provider,{value:{name:e.name},children:u.jsx(P5,{...e})}),Cf=()=>{const e=w.useContext(eE),t=w.useContext(tE),{getFieldState:r,formState:n}=Sf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within ");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},tE=w.createContext({}),rt=w.forwardRef(({className:e,...t},r)=>{const n=w.useId();return u.jsx(tE.Provider,{value:{id:n},children:u.jsx("div",{ref:r,className:we("space-y-2",e),...t})})});rt.displayName="FormItem";const nt=w.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Cf();return u.jsx(Zl,{ref:r,className:we(n&&"text-destructive",e),htmlFor:s,...t})});nt.displayName="FormLabel";const st=w.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=Cf();return u.jsx(hs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});st.displayName="FormControl";const Gz=w.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Cf();return u.jsx("p",{ref:r,id:n,className:we("text-sm text-muted-foreground",e),...t})});Gz.displayName="FormDescription";const Xe=w.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=Cf(),i=s?String(s==null?void 0:s.message):t;return i?u.jsx("p",{ref:n,id:o,className:we("text-sm font-medium text-destructive",e),...r,children:i}):null});Xe.displayName="FormMessage";function Xp(e,[t,r]){return Math.min(r,Math.max(t,e))}var Kz=[" ","Enter","ArrowUp","ArrowDown"],qz=[" ","Enter"],vc="Select",[Ef,Tf,Xz]=Yd(vc),[va,xU]=Er(vc,[Xz,ua]),Rf=ua(),[Qz,mo]=va(vc),[Jz,e6]=va(vc),rE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:d,disabled:h,required:m}=e,y=Rf(t),[p,x]=w.useState(null),[g,v]=w.useState(null),[_,C]=w.useState(!1),E=ec(c),[T=!1,P]=ps({prop:n,defaultProp:s,onChange:o}),[O,j]=ps({prop:i,defaultProp:a,onChange:l}),L=w.useRef(null),q=p?!!p.closest("form"):!0,[R,F]=w.useState(new Set),b=Array.from(R).map(V=>V.props.value).join(";");return u.jsx(kg,{...y,children:u.jsxs(Qz,{required:m,scope:t,trigger:p,onTriggerChange:x,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:On(),value:O,onValueChange:j,open:T,onOpenChange:P,dir:E,triggerPointerDownPosRef:L,disabled:h,children:[u.jsx(Ef.Provider,{scope:t,children:u.jsx(Jz,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(V=>{F(te=>new Set(te).add(V))},[]),onNativeOptionRemove:w.useCallback(V=>{F(te=>{const W=new Set(te);return W.delete(V),W})},[]),children:r})}),q?u.jsxs(RE,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:O,onChange:V=>j(V.target.value),disabled:h,children:[O===void 0?u.jsx("option",{value:""}):null,Array.from(R)]},b):null]})})};rE.displayName=vc;var nE="SelectTrigger",sE=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Rf(r),i=mo(nE,r),a=i.disabled||n,l=ze(t,i.onTriggerChange),c=Tf(r),[f,d,h]=NE(y=>{const p=c().filter(v=>!v.disabled),x=p.find(v=>v.value===i.value),g=PE(p,y,x);g!==void 0&&i.onValueChange(g.value)}),m=()=>{a||(i.onOpenChange(!0),h())};return u.jsx(Cg,{asChild:!0,...o,children:u.jsx(De.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":TE(i.value)?"":void 0,...s,ref:l,onClick:le(s.onClick,y=>{y.currentTarget.focus()}),onPointerDown:le(s.onPointerDown,y=>{const p=y.target;p.hasPointerCapture(y.pointerId)&&p.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)},y.preventDefault())}),onKeyDown:le(s.onKeyDown,y=>{const p=f.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&d(y.key),!(p&&y.key===" ")&&Kz.includes(y.key)&&(m(),y.preventDefault())})})})});sE.displayName=nE;var oE="SelectValue",iE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...a}=e,l=mo(oE,r),{onValueNodeHasChildrenChange:c}=l,f=o!==void 0,d=ze(t,l.onValueNodeChange);return rr(()=>{c(f)},[c,f]),u.jsx(De.span,{...a,ref:d,style:{pointerEvents:"none"},children:TE(l.value)?u.jsx(u.Fragment,{children:i}):o})});iE.displayName=oE;var t6="SelectIcon",aE=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return u.jsx(De.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});aE.displayName=t6;var r6="SelectPortal",lE=e=>u.jsx(rc,{asChild:!0,...e});lE.displayName=r6;var Ho="SelectContent",cE=w.forwardRef((e,t)=>{const r=mo(Ho,e.__scopeSelect),[n,s]=w.useState();if(rr(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?xs.createPortal(u.jsx(uE,{scope:e.__scopeSelect,children:u.jsx(Ef.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(dE,{...e,ref:t})});cE.displayName=Ho;var Jn=10,[uE,go]=va(Ho),n6="SelectContentImpl",dE=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x,...g}=e,v=mo(Ho,r),[_,C]=w.useState(null),[E,T]=w.useState(null),P=ze(t,fe=>C(fe)),[O,j]=w.useState(null),[L,q]=w.useState(null),R=Tf(r),[F,b]=w.useState(!1),V=w.useRef(!1);w.useEffect(()=>{if(_)return Rg(_)},[_]),pg();const te=w.useCallback(fe=>{const[ge,...be]=R().map(Se=>Se.ref.current),[Pe]=be.slice(-1),Te=document.activeElement;for(const Se of fe)if(Se===Te||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===ge&&E&&(E.scrollTop=0),Se===Pe&&E&&(E.scrollTop=E.scrollHeight),Se==null||Se.focus(),document.activeElement!==Te))return},[R,E]),W=w.useCallback(()=>te([O,_]),[te,O,_]);w.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=v;w.useEffect(()=>{if(_){let fe={x:0,y:0};const ge=Pe=>{var Te,Se;fe={x:Math.abs(Math.round(Pe.pageX)-(((Te=I.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((Se=I.current)==null?void 0:Se.y)??0))}},be=Pe=>{fe.x<=10&&fe.y<=10?Pe.preventDefault():_.contains(Pe.target)||Z(!1),document.removeEventListener("pointermove",ge),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,Z,I]),w.useEffect(()=>{const fe=()=>Z(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[Z]);const[Q,z]=NE(fe=>{const ge=R().filter(Te=>!Te.disabled),be=ge.find(Te=>Te.ref.current===document.activeElement),Pe=PE(ge,fe,be);Pe&&setTimeout(()=>Pe.ref.current.focus())}),$=w.useCallback((fe,ge,be)=>{const Pe=!V.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&(j(fe),Pe&&(V.current=!0))},[v.value]),de=w.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=w.useCallback((fe,ge,be)=>{const Pe=!V.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&q(fe)},[v.value]),se=n==="popper"?Qp:fE,Ee=se===Qp?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x}:{};return u.jsx(uE,{scope:r,content:_,viewport:E,onViewportChange:T,itemRefCallback:$,selectedItem:O,onItemLeave:de,itemTextRefCallback:ne,focusSelectedItem:W,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:u.jsx(Jd,{as:hs,allowPinchZoom:!0,children:u.jsx(Zd,{asChild:!0,trapped:v.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:le(s,fe=>{var ge;(ge=v.trigger)==null||ge.focus({preventScroll:!0}),fe.preventDefault()}),children:u.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:u.jsx(se,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:fe=>fe.preventDefault(),...g,...Ee,onPlaced:()=>b(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:le(g.onKeyDown,fe=>{const ge=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!ge&&fe.key.length===1&&z(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let Pe=R().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(Pe=Pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const Te=fe.target,Se=Pe.indexOf(Te);Pe=Pe.slice(Se+1)}setTimeout(()=>te(Pe)),fe.preventDefault()}})})})})})})});dE.displayName=n6;var s6="SelectItemAlignedPosition",fE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=mo(Ho,r),i=go(Ho,r),[a,l]=w.useState(null),[c,f]=w.useState(null),d=ze(t,P=>f(P)),h=Tf(r),m=w.useRef(!1),y=w.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:g,focusSelectedItem:v}=i,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&p&&x&&g){const P=o.trigger.getBoundingClientRect(),O=c.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),L=g.getBoundingClientRect();if(o.dir!=="rtl"){const Te=L.left-O.left,Se=j.left-Te,qe=P.left-Se,k=P.width+qe,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=Xp(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const Te=O.right-L.right,Se=window.innerWidth-j.right-Te,qe=window.innerWidth-P.right-Se,k=P.width+qe,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=Xp(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=h(),R=window.innerHeight-Jn*2,F=p.scrollHeight,b=window.getComputedStyle(c),V=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),W=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=V+te+F+Z+W,Q=Math.min(x.offsetHeight*5,I),z=window.getComputedStyle(p),$=parseInt(z.paddingTop,10),de=parseInt(z.paddingBottom,10),ne=P.top+P.height/2-Jn,se=R-ne,Ee=x.offsetHeight/2,fe=x.offsetTop+Ee,ge=V+te+fe,be=I-ge;if(ge<=ne){const Te=x===q[q.length-1].ref.current;a.style.bottom="0px";const Se=c.clientHeight-p.offsetTop-p.offsetHeight,qe=Math.max(se,Ee+(Te?de:0)+Se+W),k=ge+qe;a.style.height=k+"px"}else{const Te=x===q[0].ref.current;a.style.top="0px";const qe=Math.max(ne,V+p.offsetTop+(Te?$:0)+Ee)+be;a.style.height=qe+"px",p.scrollTop=ge-ne+p.offsetTop}a.style.margin=`${Jn}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=R+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,a,c,p,x,g,o.dir,n]);rr(()=>_(),[_]);const[C,E]=w.useState();rr(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const T=w.useCallback(P=>{P&&y.current===!0&&(_(),v==null||v(),y.current=!1)},[_,v]);return u.jsx(i6,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:u.jsx(De.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});fE.displayName=s6;var o6="SelectPopperPosition",Qp=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Jn,...o}=e,i=Rf(r);return u.jsx(Eg,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});Qp.displayName=o6;var[i6,Nv]=va(Ho,{}),Jp="SelectViewport",hE=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=go(Jp,r),i=Nv(Jp,r),a=ze(t,o.onViewportChange),l=w.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),u.jsx(Ef.Slot,{scope:r,children:u.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:le(s.onScroll,c=>{const f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const m=Math.abs(l.current-f.scrollTop);if(m>0){const y=window.innerHeight-Jn*2,p=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),g=Math.max(p,x);if(g0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});hE.displayName=Jp;var pE="SelectGroup",[a6,l6]=va(pE),mE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=On();return u.jsx(a6,{scope:r,id:s,children:u.jsx(De.div,{role:"group","aria-labelledby":s,...n,ref:t})})});mE.displayName=pE;var gE="SelectLabel",vE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=l6(gE,r);return u.jsx(De.div,{id:s.id,...n,ref:t})});vE.displayName=gE;var bd="SelectItem",[c6,yE]=va(bd),wE=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,a=mo(bd,r),l=go(bd,r),c=a.value===n,[f,d]=w.useState(o??""),[h,m]=w.useState(!1),y=ze(t,g=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,g,n,s)}),p=On(),x=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")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 u.jsx(c6,{scope:r,value:n,disabled:s,textId:p,isSelected:c,onItemTextChange:w.useCallback(g=>{d(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(Ef.ItemSlot,{scope:r,value:n,disabled:s,textValue:f,children:u.jsx(De.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:y,onFocus:le(i.onFocus,()=>m(!0)),onBlur:le(i.onBlur,()=>m(!1)),onPointerUp:le(i.onPointerUp,x),onPointerMove:le(i.onPointerMove,g=>{var v;s?(v=l.onItemLeave)==null||v.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(i.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:le(i.onKeyDown,g=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&g.key===" "||(qz.includes(g.key)&&x(),g.key===" "&&g.preventDefault())})})})})});wE.displayName=bd;var Wa="SelectItemText",xE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=mo(Wa,r),a=go(Wa,r),l=yE(Wa,r),c=e6(Wa,r),[f,d]=w.useState(null),h=ze(t,g=>d(g),l.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,l.value,l.disabled)}),m=f==null?void 0:f.textContent,y=w.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=c;return rr(()=>(p(y),()=>x(y)),[p,x,y]),u.jsxs(u.Fragment,{children:[u.jsx(De.span,{id:l.textId,...o,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?xs.createPortal(o.children,i.valueNode):null]})});xE.displayName=Wa;var _E="SelectItemIndicator",bE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return yE(_E,r).isSelected?u.jsx(De.span,{"aria-hidden":!0,...n,ref:t}):null});bE.displayName=_E;var em="SelectScrollUpButton",SE=w.forwardRef((e,t)=>{const r=go(em,e.__scopeSelect),n=Nv(em,e.__scopeSelect),[s,o]=w.useState(!1),i=ze(t,n.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(CE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});SE.displayName=em;var tm="SelectScrollDownButton",kE=w.forwardRef((e,t)=>{const r=go(tm,e.__scopeSelect),n=Nv(tm,e.__scopeSelect),[s,o]=w.useState(!1),i=ze(t,n.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(CE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});kE.displayName=tm;var CE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=go("SelectScrollButton",r),i=w.useRef(null),a=Tf(r),l=w.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),rr(()=>{var f;const c=a().find(d=>d.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),u.jsx(De.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:le(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:le(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:le(s.onPointerLeave,()=>{l()})})}),u6="SelectSeparator",EE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return u.jsx(De.div,{"aria-hidden":!0,...n,ref:t})});EE.displayName=u6;var rm="SelectArrow",d6=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Rf(r),o=mo(rm,r),i=go(rm,r);return o.open&&i.position==="popper"?u.jsx(Tg,{...s,...n,ref:t}):null});d6.displayName=rm;function TE(e){return e===""||e===void 0}var RE=w.forwardRef((e,t)=>{const{value:r,...n}=e,s=w.useRef(null),o=ze(t,s),i=mv(r);return w.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==r&&f){const d=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(d)}},[i,r]),u.jsx(pc,{asChild:!0,children:u.jsx("select",{...n,ref:o,defaultValue:r})})});RE.displayName="BubbleSelect";function NE(e){const t=Pt(e),r=w.useRef(""),n=w.useRef(0),s=w.useCallback(i=>{const a=r.current+i;t(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function PE(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=f6(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function f6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var h6=rE,jE=sE,p6=iE,m6=aE,g6=lE,DE=cE,v6=hE,y6=mE,OE=vE,AE=wE,w6=xE,x6=bE,ME=SE,IE=kE,LE=EE;const yw=h6,ww=y6,xw=p6,nm=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(jE,{ref:n,className:we("flex 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,children:[t,u.jsx(m6,{asChild:!0,children:u.jsx(r1,{className:"h-4 w-4 opacity-50"})})]}));nm.displayName=jE.displayName;const FE=w.forwardRef(({className:e,...t},r)=>u.jsx(ME,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(UP,{className:"h-4 w-4"})}));FE.displayName=ME.displayName;const zE=w.forwardRef(({className:e,...t},r)=>u.jsx(IE,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(r1,{className:"h-4 w-4"})}));zE.displayName=IE.displayName;const sm=w.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>u.jsx(g6,{children:u.jsxs(DE,{ref:s,className:we("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,...n,children:[u.jsx(FE,{}),u.jsx(v6,{className:we("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(zE,{})]})}));sm.displayName=DE.displayName;const om=w.forwardRef(({className:e,...t},r)=>u.jsx(OE,{ref:r,className:we("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));om.displayName=OE.displayName;const im=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(AE,{ref:n,className:we("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,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(x6,{children:u.jsx(t1,{className:"h-4 w-4"})})}),u.jsx(w6,{children:t})]}));im.displayName=AE.displayName;const _6=w.forwardRef(({className:e,...t},r)=>u.jsx(LE,{ref:r,className:we("-mx-1 my-1 h-px bg-muted",e),...t}));_6.displayName=LE.displayName;const am=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),b6=Array.from(am.keys()),S6=$g,k6=Vg,C6=Wg,UE=w.forwardRef(({className:e,...t},r)=>u.jsx(oc,{ref:r,className:we("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}));UE.displayName=oc.displayName;const $E=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(C6,{children:[u.jsx(UE,{}),u.jsxs(ic,{ref:n,className:we("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,u.jsxs(rf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(cg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$E.displayName=ic.displayName;const VE=({className:e,...t})=>u.jsx("div",{className:we("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});VE.displayName="DialogHeader";const WE=w.forwardRef(({className:e,...t},r)=>u.jsx(ac,{ref:r,className:we("text-lg font-semibold leading-none tracking-tight",e),...t}));WE.displayName=ac.displayName;const E6=w.forwardRef(({className:e,...t},r)=>u.jsx(lc,{ref:r,className:we("text-sm text-muted-foreground",e),...t}));E6.displayName=lc.displayName;const Oo=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),Pv=He.union([He.literal("aliyun"),He.literal("tencent"),He.literal("ssh")],{message:"请选择云服务商"}),T6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,secretId:He.string().min(1).max(64),secretKey:He.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const f=await pv(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,m])=>{i.setError(h,{type:"manual",message:m.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(at,{control:i.control,name:"name",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"secretId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SecretId"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入SecretId",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"secretKey",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SecretKey"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入SecretKey",...l})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})},R6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,accessKeyId:He.string().min(1).max(64),accessSecretId:He.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const f=await pv(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,m])=>{i.setError(h,{type:"manual",message:m.message})});return}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(at,{control:i.control,name:"name",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"accessKeyId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"AccessKeyId"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入AccessKeyId",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"accessSecretId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"AccessKeySecret"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入AccessKeySecret",...l})}),u.jsx(Xe,{})]})}),u.jsx(Xe,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})};var jv="Radio",[N6,BE]=Er(jv),[P6,j6]=N6(jv),HE=w.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:l,...c}=e,[f,d]=w.useState(null),h=ze(t,p=>d(p)),m=w.useRef(!1),y=f?!!f.closest("form"):!0;return u.jsxs(P6,{scope:r,checked:s,disabled:i,children:[u.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":GE(s),"data-disabled":i?"":void 0,disabled:i,value:a,...c,ref:h,onClick:le(e.onClick,p=>{s||l==null||l(),y&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),y&&u.jsx(D6,{control:f,bubbles:!m.current,name:n,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});HE.displayName=jv;var YE="RadioIndicator",ZE=w.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=j6(YE,r);return u.jsx(vr,{present:n||o.checked,children:u.jsx(De.span,{"data-state":GE(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});ZE.displayName=YE;var D6=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=w.useRef(null),i=mv(r),a=_g(t);return w.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&d){const h=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(h)}},[i,r,n]),u.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function GE(e){return e?"checked":"unchecked"}var O6=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dv="RadioGroup",[A6,_U]=Er(Dv,[Xd,BE]),KE=Xd(),qE=BE(),[M6,I6]=A6(Dv),XE=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:d,...h}=e,m=KE(r),y=ec(c),[p,x]=ps({prop:o,defaultProp:s,onChange:d});return u.jsx(M6,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:x,children:u.jsx($1,{asChild:!0,...m,orientation:l,dir:y,loop:f,children:u.jsx(De.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:y,...h,ref:t})})})});XE.displayName=Dv;var QE="RadioGroupItem",JE=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=I6(QE,r),i=o.disabled||n,a=KE(r),l=qE(r),c=w.useRef(null),f=ze(t,c),d=o.value===s.value,h=w.useRef(!1);return w.useEffect(()=>{const m=p=>{O6.includes(p.key)&&(h.current=!0)},y=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),u.jsx(V1,{asChild:!0,...a,focusable:!i,active:d,children:u.jsx(HE,{disabled:i,required:o.required,checked:d,...l,...s,name:o.name,ref:f,onCheck:()=>o.onValueChange(s.value),onKeyDown:le(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:le(s.onFocus,()=>{var m;h.current&&((m=c.current)==null||m.click())})})})});JE.displayName=QE;var L6="RadioGroupIndicator",eT=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=qE(r);return u.jsx(ZE,{...s,...n,ref:t})});eT.displayName=L6;var tT=XE,rT=JE,F6=eT;const Ov=w.forwardRef(({className:e,...t},r)=>u.jsx(tT,{className:we("grid gap-2",e),...t,ref:r}));Ov.displayName=tT.displayName;const Av=w.forwardRef(({className:e,...t},r)=>u.jsx(rT,{ref:r,className:we("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(F6,{className:"flex items-center justify-center",children:u.jsx(o1,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Av.displayName=rT.displayName;const nT=w.forwardRef(({className:e,...t},r)=>u.jsx("textarea",{className:we("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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:r,...t}));nT.displayName="Textarea";const z6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,host:He.string().ip({message:"请输入合法的IP地址"}),port:He.string().min(1).max(5),username:He.string().min(1).max(64),password:He.string().min(0).max(64),key:He.string().min(0).max(20480),keyFile:He.string().optional(),command:He.string().min(1).max(2048),certPath:He.string().min(0).max(2048),keyPath:He.string().min(0).max(2048)});let o={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",host:o.host,port:o.port,username:o.username,password:o.password,key:o.key,keyFile:o.keyFile,certPath:o.certPath,keyPath:o.keyPath,command:o.command}}),a=async c=>{console.log(c);const f={id:c.id,name:c.name,configType:c.configType,config:{host:c.host,port:c.port,username:c.username,password:c.password,key:c.key,command:c.command,certPath:c.certPath,keyPath:c.keyPath}};try{const d=await pv(f);if(t(),f.id=d.id,f.created=d.created,f.updated=d.updated,c.id){n(f);return}r(f)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})});return}},l=async c=>{var h;const f=(h=c.target.files)==null?void 0:h[0];if(!f)return;const d=await m5(f);i.setValue("key",d),i.setValue("keyFile","")};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-3",children:[u.jsx(at,{control:i.control,name:"name",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:c})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:c})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...c})}),u.jsx(Xe,{})]})}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx(at,{control:i.control,name:"host",render:({field:c})=>u.jsxs(rt,{className:"grow",children:[u.jsx(nt,{children:"服务器IP"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Host",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"port",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SSH端口"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Port",...c,type:"number"})}),u.jsx(Xe,{})]})})]}),u.jsx(at,{control:i.control,name:"username",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"用户名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入用户名",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"password",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入密码",...c,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"key",render:({field:c})=>u.jsxs(rt,{hidden:!0,children:[u.jsx(nt,{children:"Key(使用证书登录)"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Key",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"keyFile",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"Key(使用证书登录)"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Key",...c,type:"file",onChange:l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"certPath",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"证书上传路径"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入证书上传路径",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"keyPath",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"私钥上传路径"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入私钥上传路径",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"command",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"Command"}),u.jsx(st,{children:u.jsx(nT,{placeholder:"请输入要执行的命令",...c})}),u.jsx(Xe,{})]})}),u.jsx(Xe,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})};function nl({trigger:e,op:t,data:r,className:n}){const[s,o]=w.useState(!1),i=Array.from(Oo.keys()),[a,l]=w.useState((r==null?void 0:r.configType)||"");let c=u.jsx(u.Fragment,{children:" "});switch(a){case"tencent":c=u.jsx(T6,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":c=u.jsx(R6,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":c=u.jsx(z6,{data:r,onAfterReq:()=>{o(!1)}});break}const f=d=>d==a?"border-primary":"";return u.jsxs(S6,{onOpenChange:o,open:s,children:[u.jsx(k6,{asChild:!0,className:we(n),children:e}),u.jsxs($E,{className:"sm:max-w-[600px] w-full",children:[u.jsx(VE,{children:u.jsxs(WE,{children:[t=="add"?"添加":"编辑","授权"]})}),u.jsxs("div",{className:"container",children:[u.jsx(Zl,{children:"服务商"}),u.jsx(Ov,{value:a,className:"flex mt-3 space-x-2",onValueChange:d=>{console.log(d),l(d)},children:i.map(d=>{var h,m;return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs(Zl,{children:[u.jsx(Av,{value:d,hidden:!0}),u.jsxs("div",{className:we("flex items-center space-x-2 border p-2 rounded cursor-pointer",f(d)),children:[u.jsx("img",{src:(h=Oo.get(d))==null?void 0:h[1],className:"h-6"}),u.jsx("div",{children:(m=Oo.get(d))==null?void 0:m[0]})]})]})},d)})}),c]})]})]})}const U6=()=>{const{config:{accesses:e}}=hc(),[t,r]=w.useState(),n=po();w.useEffect(()=>{const y=new URLSearchParams(n.search).get("id");y&&(async()=>{const x=await w5(y);r(x)})()},[n.search]);const s=He.object({id:He.string().optional(),domain:He.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),access:He.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:He.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:He.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),o=pa({resolver:ma(s),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});w.useEffect(()=>{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=w.useState(t?t.targetType:""),l=e.filter(m=>{if(i=="")return!0;const y=o.getValues().targetType.split("-");return m.configType===y[0]}),{toast:c}=vf(),f=Ss(),d=async m=>{const y={id:m.id,crontab:"0 0 * * *",domain:m.domain,access:m.access,targetAccess:m.targetAccess,targetType:m.targetType};try{await Yp(y);let p="域名编辑成功";y.id==""&&(p="域名添加成功"),c({title:"成功",description:p}),f("/")}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{o.setError(g,{type:"manual",message:v.message})});return}},h=m=>o.getValues().targetType==m?"border-primary":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(xv,{}),u.jsxs("div",{className:"border-b h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(d),className:"space-y-8",children:[u.jsx(at,{control:o.control,name:"domain",render:({field:m})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"域名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入域名",...m})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"access",render:({field:m})=>u.jsxs(rt,{children:[u.jsxs(nt,{className:"flex w-full justify-between",children:[u.jsx("div",{children:"DNS 服务商授权配置"}),u.jsx(nl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(x0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(st,{children:u.jsxs(yw,{...m,value:m.value,onValueChange:y=>{o.setValue("access",y)},children:[u.jsx(nm,{children:u.jsx(xw,{placeholder:"请选择授权配置"})}),u.jsx(sm,{children:u.jsxs(ww,{children:[u.jsx(om,{children:"服务商授权配置"}),e.map(y=>{var p;return u.jsx(im,{value:y.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(p=Oo.get(y.configType))==null?void 0:p[1]}),u.jsx("div",{children:y.name})]})},y.id)})]})})]})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"targetType",render:({field:m})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"部署服务类型"}),u.jsx(st,{children:u.jsx(Ov,{className:"flex mt-3 space-x-2",onValueChange:y=>{a(y),o.setValue("targetType",y)},...m,children:b6.map(y=>{var p,x;return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs(Zl,{children:[u.jsx(Av,{value:y,id:y,hidden:!0}),u.jsxs("div",{className:we("flex items-center space-x-2 border p-2 rounded cursor-pointer",h(y)),children:[u.jsx("img",{src:(p=am.get(y))==null?void 0:p[1],className:"h-6"}),u.jsx("div",{children:(x=am.get(y))==null?void 0:x[0]})]})]})},y)})})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"targetAccess",render:({field:m})=>u.jsxs(rt,{children:[u.jsxs(nt,{className:"w-full flex justify-between",children:[u.jsx("div",{children:"部署服务商授权配置"}),u.jsx(nl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(x0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(st,{children:u.jsxs(yw,{...m,onValueChange:y=>{o.setValue("targetAccess",y)},children:[u.jsx(nm,{children:u.jsx(xw,{placeholder:"请选择授权配置"})}),u.jsx(sm,{children:u.jsxs(ww,{children:[u.jsx(om,{children:"服务商授权配置"}),l.map(y=>{var p;return u.jsx(im,{value:y.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(p=Oo.get(y.configType))==null?void 0:p[1]}),u.jsx("div",{children:y.name})]})},y.id)})]})})]})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})]})})},$6=()=>{const{config:e,deleteAccess:t}=hc(),{accesses:r}=e,n=async s=>{const o=await Z4(s);t(o.id)};return u.jsxs("div",{className:"",children:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),u.jsx(nl,{trigger:u.jsx(Lt,{children:"添加授权"}),op:"add"})]}),r.length===0?u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(VP,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),u.jsx(nl,{trigger:u.jsx(Lt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"名称"}),u.jsx("div",{className:"w-48",children:"服务商"}),u.jsx("div",{className:"w-52",children:"创建时间"}),u.jsx("div",{className:"w-52",children:"更新时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.map(s=>{var o,i;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:s.name}),u.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[u.jsx("img",{src:(o=Oo.get(s.configType))==null?void 0:o[1],className:"w-6"}),u.jsx("div",{children:(i=Oo.get(s.configType))==null?void 0:i[0]})]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&Dl(s.created)]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&Dl(s.updated)]}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(nl,{trigger:u.jsx(Lt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>{n(s)},children:"删除"})]})]},s.id)})]})]})},V6=Jl("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"}},defaultVariants:{variant:"default"}}),sT=w.forwardRef(({className:e,variant:t,...r},n)=>u.jsx("div",{ref:n,role:"alert",className:we(V6({variant:t}),e),...r}));sT.displayName="Alert";const oT=w.forwardRef(({className:e,...t},r)=>u.jsx("h5",{ref:r,className:we("mb-1 font-medium leading-none tracking-tight",e),...t}));oT.displayName="AlertTitle";const iT=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:we("text-sm [&_p]:leading-relaxed",e),...t}));iT.displayName="AlertDescription";function W6(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var Mv="ScrollArea",[aT,bU]=Er(Mv),[B6,en]=aT(Mv),lT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,l]=w.useState(null),[c,f]=w.useState(null),[d,h]=w.useState(null),[m,y]=w.useState(null),[p,x]=w.useState(null),[g,v]=w.useState(0),[_,C]=w.useState(0),[E,T]=w.useState(!1),[P,O]=w.useState(!1),j=ze(t,q=>l(q)),L=ec(s);return u.jsx(B6,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:f,content:d,onContentChange:h,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:p,onScrollbarYChange:x,scrollbarYEnabled:P,onScrollbarYEnabledChange:O,onCornerWidthChange:v,onCornerHeightChange:C,children:u.jsx(De.div,{dir:L,...i,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});lT.displayName=Mv;var cT="ScrollAreaViewport",uT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=en(cT,r),a=w.useRef(null),l=ze(t,a,i.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(De.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});uT.displayName=cT;var $n="ScrollAreaScrollbar",Iv=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return w.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?u.jsx(H6,{...n,ref:t,forceMount:r}):s.type==="scroll"?u.jsx(Y6,{...n,ref:t,forceMount:r}):s.type==="auto"?u.jsx(dT,{...n,ref:t,forceMount:r}):s.type==="always"?u.jsx(Lv,{...n,ref:t}):null});Iv.displayName=$n;var H6=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),[o,i]=w.useState(!1);return w.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},f=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),u.jsx(vr,{present:r||o,children:u.jsx(dT,{"data-state":o?"visible":"hidden",...n,ref:t})})}),Y6=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Pf(()=>l("SCROLL_END"),100),[a,l]=W6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,s.scrollHideDelay,l]),w.useEffect(()=>{const c=s.viewport,f=o?"scrollLeft":"scrollTop";if(c){let d=c[f];const h=()=>{const m=c[f];d!==m&&(l("SCROLL"),i()),d=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[s.viewport,o,l,i]),u.jsx(vr,{present:r||a!=="hidden",children:u.jsx(Lv,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:le(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:le(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),dT=w.forwardRef((e,t)=>{const r=en($n,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=w.useState(!1),a=e.orientation==="horizontal",l=Pf(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,s=en($n,e.__scopeScrollArea),o=w.useRef(null),i=w.useRef(0),[a,l]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=gT(a.viewport,a.content),f={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function d(h,m){return Q6(h,i.current,a,m)}return r==="horizontal"?u.jsx(Z6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=_w(h,a,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=d(h,s.dir))}}):r==="vertical"?u.jsx(G6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=_w(h,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=d(h))}}):null}),Z6=w.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en($n,e.__scopeScrollArea),[i,a]=w.useState(),l=w.useRef(null),c=ze(t,l,o.onScrollbarXChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(hT,{"data-orientation":"horizontal",...s,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Nf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),yT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:kd(i.paddingLeft),paddingEnd:kd(i.paddingRight)}})}})}),G6=w.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en($n,e.__scopeScrollArea),[i,a]=w.useState(),l=w.useRef(null),c=ze(t,l,o.onScrollbarYChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(hT,{"data-orientation":"vertical",...s,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Nf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),yT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:kd(i.paddingTop),paddingEnd:kd(i.paddingBottom)}})}})}),[K6,fT]=aT($n),hT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:f,onResize:d,...h}=e,m=en($n,r),[y,p]=w.useState(null),x=ze(t,j=>p(j)),g=w.useRef(null),v=w.useRef(""),_=m.viewport,C=n.content-n.viewport,E=Pt(f),T=Pt(l),P=Pf(d,10);function O(j){if(g.current){const L=j.clientX-g.current.left,q=j.clientY-g.current.top;c({x:L,y:q})}}return w.useEffect(()=>{const j=L=>{const q=L.target;(y==null?void 0:y.contains(q))&&E(L,C)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[_,y,C,E]),w.useEffect(T,[n,T]),ea(y,P),ea(m.content,P),u.jsx(K6,{scope:r,scrollbar:y,hasThumb:s,onThumbChange:Pt(o),onThumbPointerUp:Pt(i),onThumbPositionChange:T,onThumbPointerDown:Pt(a),children:u.jsx(De.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:le(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),g.current=y.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),O(j))}),onPointerMove:le(e.onPointerMove,O),onPointerUp:le(e.onPointerUp,j=>{const L=j.target;L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),Sd="ScrollAreaThumb",pT=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=fT(Sd,e.__scopeScrollArea);return u.jsx(vr,{present:r||s.hasThumb,children:u.jsx(q6,{ref:t,...n})})}),q6=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=en(Sd,r),i=fT(Sd,r),{onThumbPositionChange:a}=i,l=ze(t,d=>i.onThumbChange(d)),c=w.useRef(),f=Pf(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(f(),!c.current){const m=J6(d,a);c.current=m,a()}};return a(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,f,a]),u.jsx(De.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:le(e.onPointerDownCapture,d=>{const m=d.target.getBoundingClientRect(),y=d.clientX-m.left,p=d.clientY-m.top;i.onThumbPointerDown({x:y,y:p})}),onPointerUp:le(e.onPointerUp,i.onThumbPointerUp)})});pT.displayName=Sd;var Fv="ScrollAreaCorner",mT=w.forwardRef((e,t)=>{const r=en(Fv,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?u.jsx(X6,{...e,ref:t}):null});mT.displayName=Fv;var X6=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=en(Fv,r),[o,i]=w.useState(0),[a,l]=w.useState(0),c=!!(o&&a);return ea(s.scrollbarX,()=>{var d;const f=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(f),l(f)}),ea(s.scrollbarY,()=>{var d;const f=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(f),i(f)}),c?u.jsx(De.div,{...n,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function kd(e){return e?parseInt(e,10):0}function gT(e,t){const r=e/t;return isNaN(r)?0:r}function Nf(e){const t=gT(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Q6(e,t,r,n="ltr"){const s=Nf(r),o=s/2,i=t||o,a=s-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return vT([l,c],d)(e)}function _w(e,t,r="ltr"){const n=Nf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,l=r==="ltr"?[0,i]:[i*-1,0],c=Xp(e,l);return vT([0,i],[0,a])(c)}function vT(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function yT(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,a=r.top!==o.top;(i||a)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Pf(e,t){const r=Pt(e),n=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),w.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ea(e,t){const r=Pt(t);rr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var wT=lT,eU=uT,tU=mT;const xT=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(wT,{ref:n,className:we("relative overflow-hidden",e),...r,children:[u.jsx(eU,{className:"h-full w-full rounded-[inherit]",children:t}),u.jsx(_T,{}),u.jsx(tU,{})]}));xT.displayName=wT.displayName;const _T=w.forwardRef(({className:e,orientation:t="vertical",...r},n)=>u.jsx(Iv,{ref:n,orientation:t,className:we("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:u.jsx(pT,{className:"relative flex-1 rounded-full bg-border"})}));_T.displayName=Iv.displayName;const rU=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await jt().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},nU=()=>{const e=Ss(),[t,r]=w.useState(),[n]=MP(),s=n.get("domain");return w.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await rU(i);r(a.items)})()},[s]),u.jsxs(xT,{className:"h-[80vh] overflow-hidden",children:[u.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"域名"}),u.jsx("div",{className:"w-24",children:"状态"}),u.jsx("div",{className:"w-56",children:"阶段"}),u.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),u.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?u.jsx(n1,{size:16,className:"text-green-700"}):u.jsx(s1,{size:16,className:"text-red-700"})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx(hk,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Dl(o.deployedAt)}),u.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:u.jsxs(uS,{children:[u.jsx(dS,{asChild:!0,children:u.jsx(Lt,{variant:"link",className:"p-0",children:"日志"})}),u.jsxs(Bg,{className:"sm:max-w-5xl",children:[u.jsx(hS,{children:u.jsxs(pS,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),u.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&u.jsx(u.Fragment,{children:o.log.check.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&u.jsx(u.Fragment,{children:o.log.apply.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&u.jsx(u.Fragment,{children:o.log.deploy.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):u.jsx(u.Fragment,{children:u.jsxs(sT,{className:"max-w-[40em] mx-auto mt-20",children:[u.jsx(oT,{children:"暂无数据"}),u.jsxs(iT,{children:[u.jsxs("div",{className:"flex items-center mt-5",children:[u.jsx("div",{children:u.jsx(BP,{className:"text-yellow-400",size:36})}),u.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),u.jsx("div",{className:"mt-2 flex justify-end",children:u.jsx(Lt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},lm=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",sU=He.object({username:He.string().email({message:"请输入正确的邮箱地址"}),password:He.string().min(10,{message:"密码至少10个字符"})}),oU=()=>{const e=pa({resolver:ma(sU),defaultValues:{username:"",password:""}}),t=async n=>{try{await jt().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=lm(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=Ss();return u.jsxs("div",{className:"max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md",children:[u.jsx("div",{className:"flex justify-center mb-10",children:u.jsx("img",{src:"/vite.svg",className:"w-16"})}),u.jsx(ga,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[u.jsx(at,{control:e.control,name:"username",render:({field:n})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"用户名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"email",...n})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:e.control,name:"password",render:({field:n})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"shadcn",...n,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"登录"})})]})})]})},iU=()=>jt().authStore.isValid&&jt().authStore.isAdmin?u.jsx(J_,{to:"/"}):u.jsx("div",{className:"container",children:u.jsx(lg,{})}),aU=He.object({oldPassword:He.string().min(10,{message:"密码至少10个字符"}),newPassword:He.string().min(10,{message:"密码至少10个字符"}),confirmPassword:He.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),lU=()=>{const{toast:e}=vf(),t=Ss(),r=pa({resolver:ma(aU),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await jt().admins.authWithPassword((o=jt().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(a){const l=lm(a);r.setError("oldPassword",{message:l})}try{await jt().admins.update((i=jt().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),jt().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=lm(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return u.jsx(u.Fragment,{children:u.jsx(ga,{...r,children:u.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8",children:[u.jsx(at,{control:r.control,name:"oldPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"当前密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"当前密码",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:r.control,name:"newPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"新密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"newPassword",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:r.control,name:"confirmPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"确认密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"confirmPassword",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"确认修改"})})]})})})},cU=()=>u.jsxs("div",{children:[u.jsx(xv,{}),u.jsx("div",{className:"text-muted-foreground border-b py-5",children:"设置密码"}),u.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3 mx-auto",children:u.jsx(lg,{})})]}),uU=xP([{path:"/",element:u.jsx(q4,{}),children:[{path:"/",element:u.jsx(S5,{})},{path:"/edit",element:u.jsx(U6,{})},{path:"/access",element:u.jsx($6,{})},{path:"/history",element:u.jsx(nU,{})},{path:"/setting",element:u.jsx(cU,{}),children:[{path:"/setting/password",element:u.jsx(lU,{})}]}]},{path:"/login",element:u.jsx(iU,{}),children:[{path:"/login",element:u.jsx(oU,{})}]},{path:"/about",element:u.jsx("div",{children:"About"})}]);Rh.createRoot(document.getElementById("root")).render(u.jsx(Ge.StrictMode,{children:u.jsx(NP,{router:uU})}))});export default dU(); diff --git a/ui/dist/index.html b/ui/dist/index.html index 90f8c921..f7e997d9 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -5,8 +5,8 @@ Certimate - Your Trusted SSL Automation Partner - - + +