@arudovwen/form-builder-react 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- (function(Nt,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(Nt=typeof globalThis<"u"?globalThis:Nt||self,m(Nt.FormBuilder={},Nt.React,Nt.ReactDOM))})(this,function(Nt,m,Tt){"use strict";var Ys=document.createElement("style");Ys.textContent=`@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap";@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Onest:wght@100..900&display=swap";.form-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));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-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(71 85 105 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.form-label{margin-bottom:.5rem;display:block;width:100%;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.input-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));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-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.input-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control:focus{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1));outline:2px solid transparent;outline-offset:2px;--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);--tw-ring-opacity: .9}.input-label{margin-bottom:6px;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.formGroup.has-error .input-control{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.formGroup.has-error .input-control: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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.formGroup.is-valid .input-control{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.formGroup.is-valid .input-control: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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.input-control[readonly]{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input-control[disabled]{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.input-control[disabled]::-moz-placeholder{--tw-text-opacity: .6}.input-control[disabled]::placeholder{--tw-text-opacity: .6}label{color:#475467!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\\[10px\\]{top:-10px}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[40\\]{z-index:40}.z-\\[77\\]{z-index:77}.z-\\[999\\]{z-index:999}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\\[5px\\]{margin-bottom:5px}.mb-\\[6px\\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[6px\\]{margin-top:6px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-14{height:3.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\\[60px\\]{height:60px}.h-\\[60vh\\]{height:60vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[86vh\\]{max-height:86vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-\\[250px\\]{min-height:250px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[600px\\]{min-height:600px}.min-h-\\[80px\\]{min-height:80px}.w-14{width:3.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-\\[150px\\]{width:150px}.w-\\[270px\\]{width:270px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[24px\\]{min-width:24px}.min-w-\\[600px\\]{min-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[80vw\\]{max-width:80vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-12{row-gap:3rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-\\[1px\\]{row-gap:1px}.gap-y-\\[8px\\]{row-gap:8px}.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-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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\\[\\#98A2B3\\]{--tw-border-opacity: 1;border-color:rgb(152 162 179 / var(--tw-border-opacity, 1))}.border-\\[\\#D0D5DD\\]{--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1))}.border-\\[\\#E4E7EC\\]{--tw-border-opacity: 1;border-color:rgb(228 231 236 / var(--tw-border-opacity, 1))}.border-\\[\\#EAECF0\\]{--tw-border-opacity: 1;border-color:rgb(234 236 240 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E4E7EC\\]{--tw-bg-opacity: 1;background-color:rgb(228 231 236 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F2F4F7\\]{--tw-bg-opacity: 1;background-color:rgb(242 244 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f8fa\\]{--tw-bg-opacity: 1;background-color:rgb(247 248 250 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.object-contain{-o-object-fit:contain;object-fit:contain}.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}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.\\!py-\\[10px\\]{padding-top:10px!important;padding-bottom:10px!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.\\!pl-1{padding-left:.25rem!important}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-\\[14px\\]{padding-bottom:14px}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.\\!text-left{text-align:left!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-onest{font-family:Onest,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[20px\\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.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!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.\\!uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize}.leading-\\[0\\]{line-height:0}.leading-normal{line-height:1.5}.\\!text-blue-700{--tw-text-opacity: 1 !important;color:rgb(29 78 216 / var(--tw-text-opacity, 1))!important}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.\\!text-white\\/60{color:#fff9!important}.text-\\[\\#344054\\]{--tw-text-opacity: 1;color:rgb(52 64 84 / var(--tw-text-opacity, 1))}.text-\\[\\#454745\\]{--tw-text-opacity: 1;color:rgb(69 71 69 / var(--tw-text-opacity, 1))}.text-\\[\\#475467\\]{--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.text-\\[\\#667085\\]{--tw-text-opacity: 1;color:rgb(102 112 133 / var(--tw-text-opacity, 1))}.text-\\[\\#686878\\]{--tw-text-opacity: 1;color:rgb(104 104 120 / var(--tw-text-opacity, 1))}.text-\\[\\#98A2B3\\]{--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-\\[rgba\\(149\\,157\\,165\\,0\\.2\\)_0px_2px_4px\\]{--tw-shadow: rgba(149,157,165,.2) 0px 2px 4px;--tw-shadow-colored: 0px 2px 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-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-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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-0{outline-width:0px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.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}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{margin:0;padding:0}:root{font-family:Onest,serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-drag{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.loader{width:48px;height:48px;display:inline-block;position:relative}.loader:after,.loader:before{content:"";box-sizing:border-box;width:48px;height:48px;border-radius:50%;border:2px solid var(--loader-color, #333);position:absolute;left:0;top:0;animation:animloader 2s linear infinite}.loader:after{animation-delay:1s}@keyframes animloader{0%{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}.file\\:mr-4::file-selector-button{margin-right:1rem}.file\\:rounded-\\[6px\\]::file-selector-button{border-radius:6px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-blue-50::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.file\\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\\:py-\\[6px\\]::file-selector-button{padding-top:6px;padding-bottom:6px}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-semibold::file-selector-button{font-weight:600}.file\\:text-blue-700::file-selector-button{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:opacity-80:hover{opacity:.8}.hover\\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-lg:hover{--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)}.hover\\:file\\:bg-blue-100::file-selector-button:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-0:focus{outline-width:0px}.active\\:opacity-50:active{opacity:.5}.disabled\\:opacity-50:disabled{opacity:.5}.group:last-child .group-last\\:hidden{display:none}@media (min-width: 640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:min-w-\\[800px\\]{min-width:800px}}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
2
- /*$vite$:1*/`,document.head.appendChild(Ys);function Js(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const F=Js(m),jn=Js(Tt);function Sf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},Br={};/**
1
+ (function(Pt,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(Pt=typeof globalThis<"u"?globalThis:Pt||self,p(Pt.FormBuilder={},Pt.React,Pt.ReactDOM))})(this,function(Pt,p,_t){"use strict";var Qs=document.createElement("style");Qs.textContent=`@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap";@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Onest:wght@100..900&display=swap";.form-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));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-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(71 85 105 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.form-label{margin-bottom:.5rem;display:block;width:100%;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.input-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));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-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.input-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control:focus{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1));outline:2px solid transparent;outline-offset:2px;--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);--tw-ring-opacity: .9}.input-label{margin-bottom:6px;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.formGroup.has-error .input-control{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.formGroup.has-error .input-control: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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.formGroup.is-valid .input-control{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.formGroup.is-valid .input-control: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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.input-control[readonly]{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input-control[disabled]{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.input-control[disabled]::-moz-placeholder{--tw-text-opacity: .6}.input-control[disabled]::placeholder{--tw-text-opacity: .6}label{color:#475467!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\\[10px\\]{top:-10px}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[40\\]{z-index:40}.z-\\[77\\]{z-index:77}.z-\\[999\\]{z-index:999}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\\[5px\\]{margin-bottom:5px}.mb-\\[6px\\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[6px\\]{margin-top:6px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-14{height:3.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\\[60px\\]{height:60px}.h-\\[60vh\\]{height:60vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[86vh\\]{max-height:86vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-\\[110px\\]{min-height:110px}.min-h-\\[250px\\]{min-height:250px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[600px\\]{min-height:600px}.min-h-\\[60px\\]{min-height:60px}.w-14{width:3.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-\\[150px\\]{width:150px}.w-\\[270px\\]{width:270px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[24px\\]{min-width:24px}.min-w-\\[600px\\]{min-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[80vw\\]{max-width:80vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.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-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-\\[10px\\]{-moz-column-gap:10px;column-gap:10px}.gap-y-1{row-gap:.25rem}.gap-y-12{row-gap:3rem}.gap-y-2{row-gap:.5rem}.gap-y-6{row-gap:1.5rem}.gap-y-\\[1px\\]{row-gap:1px}.gap-y-\\[6px\\]{row-gap:6px}.gap-y-\\[8px\\]{row-gap:8px}.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-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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#98A2B3\\]{--tw-border-opacity: 1;border-color:rgb(152 162 179 / var(--tw-border-opacity, 1))}.border-\\[\\#D0D5DD\\]{--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1))}.border-\\[\\#E4E7EC\\]{--tw-border-opacity: 1;border-color:rgb(228 231 236 / var(--tw-border-opacity, 1))}.border-\\[\\#EAECF0\\]{--tw-border-opacity: 1;border-color:rgb(234 236 240 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E4E7EC\\]{--tw-bg-opacity: 1;background-color:rgb(228 231 236 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F2F4F7\\]{--tw-bg-opacity: 1;background-color:rgb(242 244 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f8fa\\]{--tw-bg-opacity: 1;background-color:rgb(247 248 250 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.\\!py-\\[10px\\]{padding-top:10px!important;padding-bottom:10px!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.\\!pl-1{padding-left:.25rem!important}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-\\[14px\\]{padding-bottom:14px}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.\\!text-left{text-align:left!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-onest{font-family:Onest,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[20px\\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.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!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.\\!uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize}.leading-\\[0\\]{line-height:0}.leading-normal{line-height:1.5}.\\!text-blue-700{--tw-text-opacity: 1 !important;color:rgb(29 78 216 / var(--tw-text-opacity, 1))!important}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.\\!text-white\\/60{color:#fff9!important}.text-\\[\\#344054\\]{--tw-text-opacity: 1;color:rgb(52 64 84 / var(--tw-text-opacity, 1))}.text-\\[\\#454745\\]{--tw-text-opacity: 1;color:rgb(69 71 69 / var(--tw-text-opacity, 1))}.text-\\[\\#475467\\]{--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.text-\\[\\#667085\\]{--tw-text-opacity: 1;color:rgb(102 112 133 / var(--tw-text-opacity, 1))}.text-\\[\\#686878\\]{--tw-text-opacity: 1;color:rgb(104 104 120 / var(--tw-text-opacity, 1))}.text-\\[\\#98A2B3\\]{--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-\\[rgba\\(149\\,157\\,165\\,0\\.2\\)_0px_2px_4px\\]{--tw-shadow: rgba(149,157,165,.2) 0px 2px 4px;--tw-shadow-colored: 0px 2px 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-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-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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-0{outline-width:0px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.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}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{margin:0;padding:0}:root{font-family:Onest,serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-drag{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.loader{width:48px;height:48px;display:inline-block;position:relative}.loader:after,.loader:before{content:"";box-sizing:border-box;width:48px;height:48px;border-radius:50%;border:2px solid var(--loader-color, #333);position:absolute;left:0;top:0;animation:animloader 2s linear infinite}.loader:after{animation-delay:1s}@keyframes animloader{0%{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}.text-green{color:green}.file\\:mr-4::file-selector-button{margin-right:1rem}.file\\:rounded-\\[6px\\]::file-selector-button{border-radius:6px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-blue-50::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.file\\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\\:py-\\[6px\\]::file-selector-button{padding-top:6px;padding-bottom:6px}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-semibold::file-selector-button{font-weight:600}.file\\:text-blue-700::file-selector-button{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:opacity-80:hover{opacity:.8}.hover\\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-lg:hover{--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)}.hover\\:file\\:bg-blue-100::file-selector-button:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-0:focus{outline-width:0px}.active\\:opacity-50:active{opacity:.5}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.group:last-child .group-last\\:hidden{display:none}@media (min-width: 640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:min-w-\\[800px\\]{min-width:800px}}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
2
+ /*$vite$:1*/`,document.head.appendChild(Qs);function ea(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const A=ea(p),jn=ea(_t);function xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},qr={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var Xs;function kf(){if(Xs)return Br;Xs=1;var e=m,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,u){var c,f={},h=null,p=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:a,key:h,ref:p,props:f,_owner:o.current}}return Br.Fragment=r,Br.jsx=s,Br.jsxs=s,Br}var Ur={};/**
10
+ */var ta;function vf(){if(ta)return qr;ta=1;var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,u){var c,f={},h=null,m=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(m=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:a,key:h,ref:m,props:f,_owner:o.current}}return qr.Fragment=r,qr.jsx=s,qr.jsxs=s,qr}var Hr={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.development.js
13
13
  *
@@ -15,21 +15,21 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Gs;function Cf(){return Gs||(Gs=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),d=Symbol.iterator,g="@@iterator";function x(E){if(E===null||typeof E!="object")return null;var D=d&&E[d]||E[g];return typeof D=="function"?D:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(E){{for(var D=arguments.length,H=new Array(D>1?D-1:0),Q=1;Q<D;Q++)H[Q-1]=arguments[Q];w("error",E,H)}}function w(E,D,H){{var Q=b.ReactDebugCurrentFrame,le=Q.getStackAddendum();le!==""&&(D+="%s",H=H.concat([le]));var fe=H.map(function(ie){return String(ie)});fe.unshift("Warning: "+D),Function.prototype.apply.call(console[E],console,fe)}}var _=!1,k=!1,S=!1,C=!1,A=!1,N;N=Symbol.for("react.module.reference");function L(E){return!!(typeof E=="string"||typeof E=="function"||E===n||E===i||A||E===o||E===u||E===c||C||E===p||_||k||S||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===f||E.$$typeof===s||E.$$typeof===a||E.$$typeof===l||E.$$typeof===N||E.getModuleId!==void 0))}function P(E,D,H){var Q=E.displayName;if(Q)return Q;var le=D.displayName||D.name||"";return le!==""?H+"("+le+")":H}function I(E){return E.displayName||"Context"}function R(E){if(E==null)return null;if(typeof E.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case a:var D=E;return I(D)+".Consumer";case s:var H=E;return I(H._context)+".Provider";case l:return P(E,E.render,"ForwardRef");case f:var Q=E.displayName||null;return Q!==null?Q:R(E.type)||"Memo";case h:{var le=E,fe=le._payload,ie=le._init;try{return R(ie(fe))}catch{return null}}}return null}var q=Object.assign,J=0,z,G,K,Z,re,Ae,Pe;function W(){}W.__reactDisabledLog=!0;function xe(){{if(J===0){z=console.log,G=console.info,K=console.warn,Z=console.error,re=console.group,Ae=console.groupCollapsed,Pe=console.groupEnd;var E={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}J++}}function Te(){{if(J--,J===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},E,{value:z}),info:q({},E,{value:G}),warn:q({},E,{value:K}),error:q({},E,{value:Z}),group:q({},E,{value:re}),groupCollapsed:q({},E,{value:Ae}),groupEnd:q({},E,{value:Pe})})}J<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=b.ReactCurrentDispatcher,je;function _e(E,D,H){{if(je===void 0)try{throw Error()}catch(le){var Q=le.stack.trim().match(/\n( *(at )?)/);je=Q&&Q[1]||""}return`
19
- `+je+E}}var Le=!1,vt;{var Se=typeof WeakMap=="function"?WeakMap:Map;vt=new Se}function oe(E,D){if(!E||Le)return"";{var H=vt.get(E);if(H!==void 0)return H}var Q;Le=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=ae.current,ae.current=null,xe();try{if(D){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(nt){Q=nt}Reflect.construct(E,[],ie)}else{try{ie.call()}catch(nt){Q=nt}E.call(ie.prototype)}}else{try{throw Error()}catch(nt){Q=nt}E()}}catch(nt){if(nt&&Q&&typeof nt.stack=="string"){for(var ne=nt.stack.split(`
20
- `),Ge=Q.stack.split(`
21
- `),ke=ne.length-1,Oe=Ge.length-1;ke>=1&&Oe>=0&&ne[ke]!==Ge[Oe];)Oe--;for(;ke>=1&&Oe>=0;ke--,Oe--)if(ne[ke]!==Ge[Oe]){if(ke!==1||Oe!==1)do if(ke--,Oe--,Oe<0||ne[ke]!==Ge[Oe]){var pt=`
22
- `+ne[ke].replace(" at new "," at ");return E.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",E.displayName)),typeof E=="function"&&vt.set(E,pt),pt}while(ke>=1&&Oe>=0);break}}}finally{Le=!1,ae.current=fe,Te(),Error.prepareStackTrace=le}var Vr=E?E.displayName||E.name:"",Sr=Vr?_e(Vr):"";return typeof E=="function"&&vt.set(E,Sr),Sr}function me(E,D,H){return oe(E,!1)}function $e(E){var D=E.prototype;return!!(D&&D.isReactComponent)}function zt(E,D,H){if(E==null)return"";if(typeof E=="function")return oe(E,$e(E));if(typeof E=="string")return _e(E);switch(E){case u:return _e("Suspense");case c:return _e("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return me(E.render);case f:return zt(E.type,D,H);case h:{var Q=E,le=Q._payload,fe=Q._init;try{return zt(fe(le),D,H)}catch{}}}return""}var Ht=Object.prototype.hasOwnProperty,wr={},T=b.ReactDebugCurrentFrame;function O(E){if(E){var D=E._owner,H=zt(E.type,E._source,D?D.type:null);T.setExtraStackFrame(H)}else T.setExtraStackFrame(null)}function $(E,D,H,Q,le){{var fe=Function.call.bind(Ht);for(var ie in E)if(fe(E,ie)){var ne=void 0;try{if(typeof E[ie]!="function"){var Ge=Error((Q||"React class")+": "+H+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ge.name="Invariant Violation",Ge}ne=E[ie](D,ie,Q,H,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ke){ne=ke}ne&&!(ne instanceof Error)&&(O(le),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Q||"React class",H,ie,typeof ne),O(null)),ne instanceof Error&&!(ne.message in wr)&&(wr[ne.message]=!0,O(le),v("Failed %s type: %s",H,ne.message),O(null))}}}var B=Array.isArray;function V(E){return B(E)}function M(E){{var D=typeof Symbol=="function"&&Symbol.toStringTag,H=D&&E[Symbol.toStringTag]||E.constructor.name||"Object";return H}}function Y(E){try{return X(E),!1}catch{return!0}}function X(E){return""+E}function ge(E){if(Y(E))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",M(E)),X(E)}var pe=b.ReactCurrentOwner,wt={key:!0,ref:!0,__self:!0,__source:!0},Rr,er,qt;qt={};function On(E){if(Ht.call(E,"ref")){var D=Object.getOwnPropertyDescriptor(E,"ref").get;if(D&&D.isReactWarning)return!1}return E.ref!==void 0}function Er(E){if(Ht.call(E,"key")){var D=Object.getOwnPropertyDescriptor(E,"key").get;if(D&&D.isReactWarning)return!1}return E.key!==void 0}function Fn(E,D){if(typeof E.ref=="string"&&pe.current&&D&&pe.current.stateNode!==D){var H=R(pe.current.type);qt[H]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(pe.current.type),E.ref),qt[H]=!0)}}function ye(E,D){{var H=function(){Rr||(Rr=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",D))};H.isReactWarning=!0,Object.defineProperty(E,"key",{get:H,configurable:!0})}}function qe(E,D){{var H=function(){er||(er=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",D))};H.isReactWarning=!0,Object.defineProperty(E,"ref",{get:H,configurable:!0})}}var Re=function(E,D,H,Q,le,fe,ie){var ne={$$typeof:t,type:E,key:D,ref:H,props:ie,_owner:fe};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function We(E,D,H,Q,le){{var fe,ie={},ne=null,Ge=null;H!==void 0&&(ge(H),ne=""+H),Er(D)&&(ge(D.key),ne=""+D.key),On(D)&&(Ge=D.ref,Fn(D,le));for(fe in D)Ht.call(D,fe)&&!wt.hasOwnProperty(fe)&&(ie[fe]=D[fe]);if(E&&E.defaultProps){var ke=E.defaultProps;for(fe in ke)ie[fe]===void 0&&(ie[fe]=ke[fe])}if(ne||Ge){var Oe=typeof E=="function"?E.displayName||E.name||"Unknown":E;ne&&ye(ie,Oe),Ge&&qe(ie,Oe)}return Re(E,ne,Ge,le,Q,pe.current,ie)}}var Ve=b.ReactCurrentOwner,Xe=b.ReactDebugCurrentFrame;function Et(E){if(E){var D=E._owner,H=zt(E.type,E._source,D?D.type:null);Xe.setExtraStackFrame(H)}else Xe.setExtraStackFrame(null)}var An;An=!1;function Tr(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function _r(){{if(Ve.current){var E=R(Ve.current.type);if(E)return`
18
+ */var ra;function wf(){return ra||(ra=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),d=Symbol.iterator,y="@@iterator";function x(_){if(_===null||typeof _!="object")return null;var I=d&&_[d]||_[y];return typeof I=="function"?I:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(_){{for(var I=arguments.length,q=new Array(I>1?I-1:0),Z=1;Z<I;Z++)q[Z-1]=arguments[Z];v("error",_,q)}}function v(_,I,q){{var Z=b.ReactDebugCurrentFrame,le=Z.getStackAddendum();le!==""&&(I+="%s",q=q.concat([le]));var pe=q.map(function(ie){return String(ie)});pe.unshift("Warning: "+I),Function.prototype.apply.call(console[_],console,pe)}}var E=!1,k=!1,T=!1,C=!1,O=!1,j;j=Symbol.for("react.module.reference");function D(_){return!!(typeof _=="string"||typeof _=="function"||_===n||_===i||O||_===o||_===u||_===c||C||_===m||E||k||T||typeof _=="object"&&_!==null&&(_.$$typeof===h||_.$$typeof===f||_.$$typeof===s||_.$$typeof===a||_.$$typeof===l||_.$$typeof===j||_.getModuleId!==void 0))}function N(_,I,q){var Z=_.displayName;if(Z)return Z;var le=I.displayName||I.name||"";return le!==""?q+"("+le+")":q}function L(_){return _.displayName||"Context"}function R(_){if(_==null)return null;if(typeof _.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case a:var I=_;return L(I)+".Consumer";case s:var q=_;return L(q._context)+".Provider";case l:return N(_,_.render,"ForwardRef");case f:var Z=_.displayName||null;return Z!==null?Z:R(_.type)||"Memo";case h:{var le=_,pe=le._payload,ie=le._init;try{return R(ie(pe))}catch{return null}}}return null}var H=Object.assign,J=0,z,X,K,Q,re,je,De;function W(){}W.__reactDisabledLog=!0;function we(){{if(J===0){z=console.log,X=console.info,K=console.warn,Q=console.error,re=console.group,je=console.groupCollapsed,De=console.groupEnd;var _={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}J++}}function _e(){{if(J--,J===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},_,{value:z}),info:H({},_,{value:X}),warn:H({},_,{value:K}),error:H({},_,{value:Q}),group:H({},_,{value:re}),groupCollapsed:H({},_,{value:je}),groupEnd:H({},_,{value:De})})}J<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=b.ReactCurrentDispatcher,$e;function Se(_,I,q){{if($e===void 0)try{throw Error()}catch(le){var Z=le.stack.trim().match(/\n( *(at )?)/);$e=Z&&Z[1]||""}return`
19
+ `+$e+_}}var Le=!1,wt;{var Ce=typeof WeakMap=="function"?WeakMap:Map;wt=new Ce}function oe(_,I){if(!_||Le)return"";{var q=wt.get(_);if(q!==void 0)return q}var Z;Le=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pe;pe=ae.current,ae.current=null,we();try{if(I){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(it){Z=it}Reflect.construct(_,[],ie)}else{try{ie.call()}catch(it){Z=it}_.call(ie.prototype)}}else{try{throw Error()}catch(it){Z=it}_()}}catch(it){if(it&&Z&&typeof it.stack=="string"){for(var ne=it.stack.split(`
20
+ `),Ze=Z.stack.split(`
21
+ `),ke=ne.length-1,Fe=Ze.length-1;ke>=1&&Fe>=0&&ne[ke]!==Ze[Fe];)Fe--;for(;ke>=1&&Fe>=0;ke--,Fe--)if(ne[ke]!==Ze[Fe]){if(ke!==1||Fe!==1)do if(ke--,Fe--,Fe<0||ne[ke]!==Ze[Fe]){var ht=`
22
+ `+ne[ke].replace(" at new "," at ");return _.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",_.displayName)),typeof _=="function"&&wt.set(_,ht),ht}while(ke>=1&&Fe>=0);break}}}finally{Le=!1,ae.current=pe,_e(),Error.prepareStackTrace=le}var zr=_?_.displayName||_.name:"",Cr=zr?Se(zr):"";return typeof _=="function"&&wt.set(_,Cr),Cr}function ye(_,I,q){return oe(_,!1)}function Ne(_){var I=_.prototype;return!!(I&&I.isReactComponent)}function qt(_,I,q){if(_==null)return"";if(typeof _=="function")return oe(_,Ne(_));if(typeof _=="string")return Se(_);switch(_){case u:return Se("Suspense");case c:return Se("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return ye(_.render);case f:return qt(_.type,I,q);case h:{var Z=_,le=Z._payload,pe=Z._init;try{return qt(pe(le),I,q)}catch{}}}return""}var Ht=Object.prototype.hasOwnProperty,Er={},S=b.ReactDebugCurrentFrame;function F(_){if(_){var I=_._owner,q=qt(_.type,_._source,I?I.type:null);S.setExtraStackFrame(q)}else S.setExtraStackFrame(null)}function P(_,I,q,Z,le){{var pe=Function.call.bind(Ht);for(var ie in _)if(pe(_,ie)){var ne=void 0;try{if(typeof _[ie]!="function"){var Ze=Error((Z||"React class")+": "+q+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ze.name="Invariant Violation",Ze}ne=_[ie](I,ie,Z,q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ke){ne=ke}ne&&!(ne instanceof Error)&&(F(le),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",q,ie,typeof ne),F(null)),ne instanceof Error&&!(ne.message in Er)&&(Er[ne.message]=!0,F(le),w("Failed %s type: %s",q,ne.message),F(null))}}}var B=Array.isArray;function V(_){return B(_)}function M(_){{var I=typeof Symbol=="function"&&Symbol.toStringTag,q=I&&_[Symbol.toStringTag]||_.constructor.name||"Object";return q}}function Y(_){try{return G(_),!1}catch{return!0}}function G(_){return""+_}function xe(_){if(Y(_))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",M(_)),G(_)}var he=b.ReactCurrentOwner,Et={key:!0,ref:!0,__self:!0,__source:!0},Ur,tr,Wt;Wt={};function On(_){if(Ht.call(_,"ref")){var I=Object.getOwnPropertyDescriptor(_,"ref").get;if(I&&I.isReactWarning)return!1}return _.ref!==void 0}function Tr(_){if(Ht.call(_,"key")){var I=Object.getOwnPropertyDescriptor(_,"key").get;if(I&&I.isReactWarning)return!1}return _.key!==void 0}function Fn(_,I){if(typeof _.ref=="string"&&he.current&&I&&he.current.stateNode!==I){var q=R(he.current.type);Wt[q]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(he.current.type),_.ref),Wt[q]=!0)}}function ve(_,I){{var q=function(){Ur||(Ur=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};q.isReactWarning=!0,Object.defineProperty(_,"key",{get:q,configurable:!0})}}function We(_,I){{var q=function(){tr||(tr=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};q.isReactWarning=!0,Object.defineProperty(_,"ref",{get:q,configurable:!0})}}var Be=function(_,I,q,Z,le,pe,ie){var ne={$$typeof:t,type:_,key:I,ref:q,props:ie,_owner:pe};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function Ke(_,I,q,Z,le){{var pe,ie={},ne=null,Ze=null;q!==void 0&&(xe(q),ne=""+q),Tr(I)&&(xe(I.key),ne=""+I.key),On(I)&&(Ze=I.ref,Fn(I,le));for(pe in I)Ht.call(I,pe)&&!Et.hasOwnProperty(pe)&&(ie[pe]=I[pe]);if(_&&_.defaultProps){var ke=_.defaultProps;for(pe in ke)ie[pe]===void 0&&(ie[pe]=ke[pe])}if(ne||Ze){var Fe=typeof _=="function"?_.displayName||_.name||"Unknown":_;ne&&ve(ie,Fe),Ze&&We(ie,Fe)}return Be(_,ne,Ze,le,Z,he.current,ie)}}var Ue=b.ReactCurrentOwner,Xe=b.ReactDebugCurrentFrame;function Tt(_){if(_){var I=_._owner,q=qt(_.type,_._source,I?I.type:null);Xe.setExtraStackFrame(q)}else Xe.setExtraStackFrame(null)}var An;An=!1;function _r(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Sr(){{if(Ue.current){var _=R(Ue.current.type);if(_)return`
23
23
 
24
- Check the render method of \``+E+"`."}return""}}function Ws(E){return""}var vf={};function Yv(E){{var D=_r();if(!D){var H=typeof E=="string"?E:E.displayName||E.name;H&&(D=`
24
+ Check the render method of \``+_+"`."}return""}}function Xs(_){return""}var mf={};function nw(_){{var I=Sr();if(!I){var q=typeof _=="string"?_:_.displayName||_.name;q&&(I=`
25
25
 
26
- Check the top-level render call using <`+H+">.")}return D}}function wf(E,D){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var H=Yv(D);if(vf[H])return;vf[H]=!0;var Q="";E&&E._owner&&E._owner!==Ve.current&&(Q=" It was passed a child from "+R(E._owner.type)+"."),Et(E),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',H,Q),Et(null)}}function Ef(E,D){{if(typeof E!="object")return;if(V(E))for(var H=0;H<E.length;H++){var Q=E[H];Tr(Q)&&wf(Q,D)}else if(Tr(E))E._store&&(E._store.validated=!0);else if(E){var le=x(E);if(typeof le=="function"&&le!==E.entries)for(var fe=le.call(E),ie;!(ie=fe.next()).done;)Tr(ie.value)&&wf(ie.value,D)}}}function Jv(E){{var D=E.type;if(D==null||typeof D=="string")return;var H;if(typeof D=="function")H=D.propTypes;else if(typeof D=="object"&&(D.$$typeof===l||D.$$typeof===f))H=D.propTypes;else return;if(H){var Q=R(D);$(H,E.props,"prop",Q,E)}else if(D.PropTypes!==void 0&&!An){An=!0;var le=R(D);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof D.getDefaultProps=="function"&&!D.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xv(E){{for(var D=Object.keys(E.props),H=0;H<D.length;H++){var Q=D[H];if(Q!=="children"&&Q!=="key"){Et(E),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),Et(null);break}}E.ref!==null&&(Et(E),v("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}var Tf={};function _f(E,D,H,Q,le,fe){{var ie=L(E);if(!ie){var ne="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ge=Ws();Ge?ne+=Ge:ne+=_r();var ke;E===null?ke="null":V(E)?ke="array":E!==void 0&&E.$$typeof===t?(ke="<"+(R(E.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof E,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,ne)}var Oe=We(E,D,H,le,fe);if(Oe==null)return Oe;if(ie){var pt=D.children;if(pt!==void 0)if(Q)if(V(pt)){for(var Vr=0;Vr<pt.length;Vr++)Ef(pt[Vr],E);Object.freeze&&Object.freeze(pt)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ef(pt,E)}if(Ht.call(D,"key")){var Sr=R(E),nt=Object.keys(D).filter(function(rw){return rw!=="key"}),Ks=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!Tf[Sr+Ks]){var tw=nt.length>0?"{"+nt.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+q+">.")}return I}}function hf(_,I){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var q=nw(I);if(mf[q])return;mf[q]=!0;var Z="";_&&_._owner&&_._owner!==Ue.current&&(Z=" It was passed a child from "+R(_._owner.type)+"."),Tt(_),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,Z),Tt(null)}}function gf(_,I){{if(typeof _!="object")return;if(V(_))for(var q=0;q<_.length;q++){var Z=_[q];_r(Z)&&hf(Z,I)}else if(_r(_))_._store&&(_._store.validated=!0);else if(_){var le=x(_);if(typeof le=="function"&&le!==_.entries)for(var pe=le.call(_),ie;!(ie=pe.next()).done;)_r(ie.value)&&hf(ie.value,I)}}}function ow(_){{var I=_.type;if(I==null||typeof I=="string")return;var q;if(typeof I=="function")q=I.propTypes;else if(typeof I=="object"&&(I.$$typeof===l||I.$$typeof===f))q=I.propTypes;else return;if(q){var Z=R(I);P(q,_.props,"prop",Z,_)}else if(I.PropTypes!==void 0&&!An){An=!0;var le=R(I);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof I.getDefaultProps=="function"&&!I.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function iw(_){{for(var I=Object.keys(_.props),q=0;q<I.length;q++){var Z=I[q];if(Z!=="children"&&Z!=="key"){Tt(_),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Z),Tt(null);break}}_.ref!==null&&(Tt(_),w("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}var yf={};function bf(_,I,q,Z,le,pe){{var ie=D(_);if(!ie){var ne="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ze=Xs();Ze?ne+=Ze:ne+=Sr();var ke;_===null?ke="null":V(_)?ke="array":_!==void 0&&_.$$typeof===t?(ke="<"+(R(_.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof _,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,ne)}var Fe=Ke(_,I,q,le,pe);if(Fe==null)return Fe;if(ie){var ht=I.children;if(ht!==void 0)if(Z)if(V(ht)){for(var zr=0;zr<ht.length;zr++)gf(ht[zr],_);Object.freeze&&Object.freeze(ht)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else gf(ht,_)}if(Ht.call(I,"key")){var Cr=R(_),it=Object.keys(I).filter(function(fw){return fw!=="key"}),Zs=it.length>0?"{key: someKey, "+it.join(": ..., ")+": ...}":"{key: someKey}";if(!yf[Cr+Zs]){var cw=it.length>0?"{"+it.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,Ks,Sr,tw,Sr),Tf[Sr+Ks]=!0}}return E===n?Xv(Oe):Jv(Oe),Oe}}function Gv(E,D,H){return _f(E,D,H,!0)}function Qv(E,D,H){return _f(E,D,H,!1)}var Zv=Qv,ew=Gv;Ur.Fragment=n,Ur.jsx=Zv,Ur.jsxs=ew}()),Ur}var Qs;function Of(){return Qs||(Qs=1,process.env.NODE_ENV==="production"?$n.exports=kf():$n.exports=Cf()),$n.exports}var y=Of();function Zs(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Zs(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ut(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Zs(e))&&(n&&(n+=" "),n+=t);return n}function Ff(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Ff(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
32
- `);var zr=e=>typeof e=="number"&&!isNaN(e),tr=e=>typeof e=="string",Pt=e=>typeof e=="function",Af=e=>tr(e)||zr(e),Uo=e=>tr(e)||Pt(e)?e:null,jf=(e,t)=>e===!1||zr(e)&&e>0?e:t,zo=e=>m.isValidElement(e)||tr(e)||Pt(e)||zr(e);function $f(e,t,r=300){let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Nf({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:a,done:l,nodeRef:u,isIn:c,playToast:f}){let h=r?`${e}--${s}`:e,p=r?`${t}--${s}`:t,d=m.useRef(0);return m.useLayoutEffect(()=>{let g=u.current,x=h.split(" "),b=v=>{v.target===u.current&&(f(),g.removeEventListener("animationend",b),g.removeEventListener("animationcancel",b),d.current===0&&v.type!=="animationcancel"&&g.classList.remove(...x))};g.classList.add(...x),g.addEventListener("animationend",b),g.addEventListener("animationcancel",b)},[]),m.useEffect(()=>{let g=u.current,x=()=>{g.removeEventListener("animationend",x),n?$f(g,l,o):l()};c||(a?x():(d.current=1,g.className+=` ${p}`,g.addEventListener("animationend",x)))},[c]),m.createElement(m.Fragment,null,i)}}function ea(e,t){return{content:ta(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function ta(e,t,r=!1){return m.isValidElement(e)&&!tr(e.type)?m.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):Pt(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function Pf({closeToast:e,theme:t,ariaLabel:r="close"}){return m.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:n=>{n.stopPropagation(),e(!0)},"aria-label":r},m.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},m.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Lf({delay:e,isRunning:t,closeToast:r,type:n="default",hide:o,className:i,controlledProgress:s,progress:a,rtl:l,isIn:u,theme:c}){let f=o||s&&a===0,h={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(h.transform=`scaleX(${a})`);let p=ut("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),d=Pt(i)?i({rtl:l,type:n,defaultClassName:p}):ut(p,i),g={[s&&a>=1?"onTransitionEnd":"onAnimationEnd"]:s&&a<1?null:()=>{u&&r()}};return m.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},m.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),m.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:d,style:h,...g}))}var Df=1,ra=()=>`${Df++}`;function If(e,t,r){let n=1,o=0,i=[],s=[],a=t,l=new Map,u=new Set,c=v=>(u.add(v),()=>u.delete(v)),f=()=>{s=Array.from(l.values()),u.forEach(v=>v())},h=({containerId:v,toastId:w,updateId:_})=>{let k=v?v!==e:e!==1,S=l.has(w)&&_==null;return k||S},p=(v,w)=>{l.forEach(_=>{var k;(w==null||w===_.props.toastId)&&((k=_.toggle)==null||k.call(_,v))})},d=v=>{var w,_;(_=(w=v.props)==null?void 0:w.onClose)==null||_.call(w,v.removalReason),v.isActive=!1},g=v=>{if(v==null)l.forEach(d);else{let w=l.get(v);w&&d(w)}f()},x=()=>{o-=i.length,i=[]},b=v=>{var w,_;let{toastId:k,updateId:S}=v.props,C=S==null;v.staleId&&l.delete(v.staleId),v.isActive=!0,l.set(k,v),f(),r(ea(v,C?"added":"updated")),C&&((_=(w=v.props).onOpen)==null||_.call(w))};return{id:e,props:a,observe:c,toggle:p,removeToast:g,toasts:l,clearQueue:x,buildToast:(v,w)=>{if(h(w))return;let{toastId:_,updateId:k,data:S,staleId:C,delay:A}=w,N=k==null;N&&o++;let L={...a,style:a.toastStyle,key:n++,...Object.fromEntries(Object.entries(w).filter(([I,R])=>R!=null)),toastId:_,updateId:k,data:S,isIn:!1,className:Uo(w.className||a.toastClassName),progressClassName:Uo(w.progressClassName||a.progressClassName),autoClose:w.isLoading?!1:jf(w.autoClose,a.autoClose),closeToast(I){l.get(_).removalReason=I,g(_)},deleteToast(){let I=l.get(_);if(I!=null){if(r(ea(I,"removed")),l.delete(_),o--,o<0&&(o=0),i.length>0){b(i.shift());return}f()}}};L.closeButton=a.closeButton,w.closeButton===!1||zo(w.closeButton)?L.closeButton=w.closeButton:w.closeButton===!0&&(L.closeButton=zo(a.closeButton)?a.closeButton:!0);let P={content:v,props:L,staleId:C};a.limit&&a.limit>0&&o>a.limit&&N?i.push(P):zr(A)?setTimeout(()=>{b(P)},A):b(P)},setProps(v){a=v},setToggle:(v,w)=>{let _=l.get(v);_&&(_.toggle=w)},isToastActive:v=>{var w;return(w=l.get(v))==null?void 0:w.isActive},getSnapshot:()=>s}}var Ke=new Map,Hr=[],Ho=new Set,Mf=e=>Ho.forEach(t=>t(e)),na=()=>Ke.size>0;function Rf(){Hr.forEach(e=>ia(e.content,e.options)),Hr=[]}var Vf=(e,{containerId:t})=>{var r;return(r=Ke.get(t||1))==null?void 0:r.toasts.get(e)};function oa(e,t){var r;if(t)return!!((r=Ke.get(t))!=null&&r.isToastActive(e));let n=!1;return Ke.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function Bf(e){if(!na()){Hr=Hr.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Af(e))Ke.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ke.get(e.containerId);t?t.removeToast(e.id):Ke.forEach(r=>{r.removeToast(e.id)})}}var Uf=(e={})=>{Ke.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ia(e,t){zo(e)&&(na()||Hr.push({content:e,options:t}),Ke.forEach(r=>{r.buildToast(e,t)}))}function zf(e){var t;(t=Ke.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function sa(e,t){Ke.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function Hf(e){let t=e.containerId||1;return{subscribe(r){let n=If(t,e,Mf);Ke.set(t,n);let o=n.observe(r);return Rf(),()=>{o(),Ke.delete(t)}},setProps(r){var n;(n=Ke.get(t))==null||n.setProps(r)},getSnapshot(){var r;return(r=Ke.get(t))==null?void 0:r.getSnapshot()}}}function qf(e){return Ho.add(e),()=>{Ho.delete(e)}}function Wf(e){return e&&(tr(e.toastId)||zr(e.toastId))?e.toastId:ra()}function qr(e,t){return ia(e,t),t.toastId}function Nn(e,t){return{...t,type:t&&t.type||e,toastId:Wf(t)}}function Pn(e){return(t,r)=>qr(t,Nn(e,r))}function ue(e,t){return qr(e,Nn("default",t))}ue.loading=(e,t)=>qr(e,Nn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Kf(e,{pending:t,error:r,success:n},o){let i;t&&(i=tr(t)?ue.loading(t,o):ue.loading(t.render,{...o,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(u,c,f)=>{if(c==null){ue.dismiss(i);return}let h={type:u,...s,...o,data:f},p=tr(c)?{render:c}:c;return i?ue.update(i,{...h,...p}):ue(p.render,{...h,...p}),f},l=Pt(e)?e():e;return l.then(u=>a("success",n,u)).catch(u=>a("error",r,u)),l}ue.promise=Kf,ue.success=Pn("success"),ue.info=Pn("info"),ue.error=Pn("error"),ue.warning=Pn("warning"),ue.warn=ue.warning,ue.dark=(e,t)=>qr(e,Nn("default",{theme:"dark",...t}));function Yf(e){Bf(e)}ue.dismiss=Yf,ue.clearWaitingQueue=Uf,ue.isActive=oa,ue.update=(e,t={})=>{let r=Vf(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:ra()};i.toastId!==e&&(i.staleId=e);let s=i.render||o;delete i.render,qr(s,i)}},ue.done=e=>{ue.update(e,{progress:1})},ue.onChange=qf,ue.play=e=>sa(!0,e),ue.pause=e=>sa(!1,e);function Jf(e){var t;let{subscribe:r,getSnapshot:n,setProps:o}=m.useRef(Hf(e)).current;o(e);let i=(t=m.useSyncExternalStore(r,n,n))==null?void 0:t.slice();function s(a){if(!i)return[];let l=new Map;return e.newestOnTop&&i.reverse(),i.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>a(u[0],u[1]))}return{getToastToRender:s,isToastActive:oa,count:i==null?void 0:i.length}}function Xf(e){let[t,r]=m.useState(!1),[n,o]=m.useState(!1),i=m.useRef(null),s=m.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;zf({id:e.toastId,containerId:e.containerId,fn:r}),m.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{p()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||b(),window.addEventListener("focus",x),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",x),window.removeEventListener("blur",b)}function d(C){if(e.draggable===!0||e.draggable===C.pointerType){v();let A=i.current;s.canCloseOnClick=!0,s.canDrag=!0,A.style.transition="none",e.draggableDirection==="x"?(s.start=C.clientX,s.removalDistance=A.offsetWidth*(e.draggablePercent/100)):(s.start=C.clientY,s.removalDistance=A.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function g(C){let{top:A,bottom:N,left:L,right:P}=i.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=L&&C.clientX<=P&&C.clientY>=A&&C.clientY<=N?b():x()}function x(){r(!0)}function b(){r(!1)}function v(){s.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",k)}function w(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",k)}function _(C){let A=i.current;if(s.canDrag&&A){s.didMove=!0,t&&b(),e.draggableDirection==="x"?s.delta=C.clientX-s.start:s.delta=C.clientY-s.start,s.start!==C.clientX&&(s.canCloseOnClick=!1);let N=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;A.style.transform=`translate3d(${N},0)`,A.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function k(){w();let C=i.current;if(s.canDrag&&s.didMove&&C){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}let S={onPointerDown:d,onPointerUp:g};return a&&l&&(S.onMouseEnter=b,e.stacked||(S.onMouseLeave=x)),f&&(S.onClick=C=>{c&&c(C),s.canCloseOnClick&&u(!0)}),{playToast:x,pauseToast:b,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:S}}var Gf=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ln=({theme:e,type:t,isLoading:r,...n})=>m.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n});function Qf(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Zf(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function ed(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function td(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function rd(){return m.createElement("div",{className:"Toastify__spinner"})}var qo={info:Zf,warning:Qf,success:ed,error:td,spinner:rd},nd=e=>e in qo;function od({theme:e,type:t,isLoading:r,icon:n}){let o=null,i={theme:e,type:t};return n===!1||(Pt(n)?o=n({...i,isLoading:r}):m.isValidElement(n)?o=m.cloneElement(n,i):r?o=qo.spinner():nd(t)&&(o=qo[t](i))),o}var id=e=>{let{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o,playToast:i}=Xf(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:h,transition:p,position:d,className:g,style:x,progressClassName:b,updateId:v,role:w,progress:_,rtl:k,toastId:S,deleteToast:C,isIn:A,isLoading:N,closeOnClick:L,theme:P,ariaLabel:I}=e,R=ut("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":L}),q=Pt(g)?g({rtl:k,position:d,type:c,defaultClassName:R}):ut(R,g),J=od(e),z=!!_||!l,G={closeToast:h,type:c,theme:P},K=null;return s===!1||(Pt(s)?K=s(G):m.isValidElement(s)?K=m.cloneElement(s,G):K=Pf(G)),m.createElement(p,{isIn:A,done:C,position:d,preventExitTransition:r,nodeRef:n,playToast:i},m.createElement("div",{id:S,tabIndex:0,onClick:u,"data-in":A,className:q,...o,style:x,ref:n,...A&&{role:w,"aria-label":I}},J!=null&&m.createElement("div",{className:ut("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},J),ta(a,e,!t),K,!e.customProgressBar&&m.createElement(Lf,{...v&&!z?{key:`p-${v}`}:{},rtl:k,theme:P,delay:l,isRunning:t,isIn:A,closeToast:h,hide:f,type:c,className:b,controlledProgress:z,progress:_||0})))},sd=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),ad=Nf(sd("bounce",!0)),ld={position:"top-right",transition:ad,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function ud(e){let t={...ld,...e},r=e.stacked,[n,o]=m.useState(!0),i=m.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=Jf(t),{className:u,style:c,rtl:f,containerId:h,hotKeys:p}=t;function d(x){let b=ut("Toastify__toast-container",`Toastify__toast-container--${x}`,{"Toastify__toast-container--rtl":f});return Pt(u)?u({position:x,rtl:f,defaultClassName:b}):ut(b,Uo(u))}function g(){r&&(o(!0),ue.play())}return Gf(()=>{var x;if(r){let b=i.current.querySelectorAll('[data-in="true"]'),v=12,w=(x=t.position)==null?void 0:x.includes("top"),_=0,k=0;Array.from(b).reverse().forEach((S,C)=>{let A=S;A.classList.add("Toastify__toast--stacked"),C>0&&(A.dataset.collapsed=`${n}`),A.dataset.pos||(A.dataset.pos=w?"top":"bot");let N=_*(n?.2:1)+(n?0:v*C);A.style.setProperty("--y",`${w?N:N*-1}px`),A.style.setProperty("--g",`${v}`),A.style.setProperty("--s",`${1-(n?k:0)}`),_+=A.offsetHeight,k+=.025})}},[n,l,r]),m.useEffect(()=>{function x(b){var v;let w=i.current;p(b)&&((v=w.querySelector('[tabIndex="0"]'))==null||v.focus(),o(!1),ue.pause()),b.key==="Escape"&&(document.activeElement===w||w!=null&&w.contains(document.activeElement))&&(o(!0),ue.play())}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[p]),m.createElement("section",{ref:i,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ue.pause())},onMouseLeave:g,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((x,b)=>{let v=b.length?{...c}:{...c,pointerEvents:"none"};return m.createElement("div",{tabIndex:-1,className:d(x),"data-stacked":r,style:v,key:`c-${x}`},b.map(({content:w,props:_})=>m.createElement(id,{..._,stacked:r,collapseAll:g,isIn:a(_.toastId,_.containerId),key:`t-${_.key}`},w)))}))}var Wr={},aa;function cd(){if(aa)return Wr;aa=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.parse=s,Wr.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,p){const d=new i,g=h.length;if(g<2)return d;const x=(p==null?void 0:p.decode)||c;let b=0;do{const v=h.indexOf("=",b);if(v===-1)break;const w=h.indexOf(";",b),_=w===-1?g:w;if(v>_){b=h.lastIndexOf(";",v-1)+1;continue}const k=a(h,b,v),S=l(h,v,k),C=h.slice(k,S);if(d[C]===void 0){let A=a(h,v+1,_),N=l(h,_,A);const L=x(h.slice(A,N));d[C]=L}b=_+1}while(b<g);return d}function a(h,p,d){do{const g=h.charCodeAt(p);if(g!==32&&g!==9)return p}while(++p<d);return d}function l(h,p,d){for(;p>d;){const g=h.charCodeAt(--p);if(g!==32&&g!==9)return p+1}return d}function u(h,p,d){const g=(d==null?void 0:d.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const x=g(p);if(!t.test(x))throw new TypeError(`argument val is invalid: ${p}`);let b=h+"="+x;if(!d)return b;if(d.maxAge!==void 0){if(!Number.isInteger(d.maxAge))throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);b+="; Max-Age="+d.maxAge}if(d.domain){if(!r.test(d.domain))throw new TypeError(`option domain is invalid: ${d.domain}`);b+="; Domain="+d.domain}if(d.path){if(!n.test(d.path))throw new TypeError(`option path is invalid: ${d.path}`);b+="; Path="+d.path}if(d.expires){if(!f(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError(`option expires is invalid: ${d.expires}`);b+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(b+="; HttpOnly"),d.secure&&(b+="; Secure"),d.partitioned&&(b+="; Partitioned"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${d.priority}`)}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${d.sameSite}`)}return b}function c(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return Wr}cd();/**
31
+ <%s key={someKey} {...props} />`,Zs,Cr,cw,Cr),yf[Cr+Zs]=!0}}return _===n?iw(Fe):ow(Fe),Fe}}function sw(_,I,q){return bf(_,I,q,!0)}function aw(_,I,q){return bf(_,I,q,!1)}var lw=aw,uw=sw;Hr.Fragment=n,Hr.jsx=lw,Hr.jsxs=uw}()),Hr}var na;function Ef(){return na||(na=1,process.env.NODE_ENV==="production"?$n.exports=vf():$n.exports=wf()),$n.exports}var g=Ef();function oa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=oa(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ue(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=oa(e))&&(n&&(n+=" "),n+=t);return n}function Tf(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Tf(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
32
+ `);var Wr=e=>typeof e=="number"&&!isNaN(e),rr=e=>typeof e=="string",Dt=e=>typeof e=="function",_f=e=>rr(e)||Wr(e),zo=e=>rr(e)||Dt(e)?e:null,Sf=(e,t)=>e===!1||Wr(e)&&e>0?e:t,qo=e=>p.isValidElement(e)||rr(e)||Dt(e)||Wr(e);function Cf(e,t,r=300){let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function kf({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:a,done:l,nodeRef:u,isIn:c,playToast:f}){let h=r?`${e}--${s}`:e,m=r?`${t}--${s}`:t,d=p.useRef(0);return p.useLayoutEffect(()=>{let y=u.current,x=h.split(" "),b=w=>{w.target===u.current&&(f(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),d.current===0&&w.type!=="animationcancel"&&y.classList.remove(...x))};y.classList.add(...x),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),p.useEffect(()=>{let y=u.current,x=()=>{y.removeEventListener("animationend",x),n?Cf(y,l,o):l()};c||(a?x():(d.current=1,y.className+=` ${m}`,y.addEventListener("animationend",x)))},[c]),p.createElement(p.Fragment,null,i)}}function ia(e,t){return{content:sa(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function sa(e,t,r=!1){return p.isValidElement(e)&&!rr(e.type)?p.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):Dt(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function Of({closeToast:e,theme:t,ariaLabel:r="close"}){return p.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:n=>{n.stopPropagation(),e(!0)},"aria-label":r},p.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},p.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Ff({delay:e,isRunning:t,closeToast:r,type:n="default",hide:o,className:i,controlledProgress:s,progress:a,rtl:l,isIn:u,theme:c}){let f=o||s&&a===0,h={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(h.transform=`scaleX(${a})`);let m=ue("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),d=Dt(i)?i({rtl:l,type:n,defaultClassName:m}):ue(m,i),y={[s&&a>=1?"onTransitionEnd":"onAnimationEnd"]:s&&a<1?null:()=>{u&&r()}};return p.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},p.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),p.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:d,style:h,...y}))}var Af=1,aa=()=>`${Af++}`;function jf(e,t,r){let n=1,o=0,i=[],s=[],a=t,l=new Map,u=new Set,c=w=>(u.add(w),()=>u.delete(w)),f=()=>{s=Array.from(l.values()),u.forEach(w=>w())},h=({containerId:w,toastId:v,updateId:E})=>{let k=w?w!==e:e!==1,T=l.has(v)&&E==null;return k||T},m=(w,v)=>{l.forEach(E=>{var k;(v==null||v===E.props.toastId)&&((k=E.toggle)==null||k.call(E,w))})},d=w=>{var v,E;(E=(v=w.props)==null?void 0:v.onClose)==null||E.call(v,w.removalReason),w.isActive=!1},y=w=>{if(w==null)l.forEach(d);else{let v=l.get(w);v&&d(v)}f()},x=()=>{o-=i.length,i=[]},b=w=>{var v,E;let{toastId:k,updateId:T}=w.props,C=T==null;w.staleId&&l.delete(w.staleId),w.isActive=!0,l.set(k,w),f(),r(ia(w,C?"added":"updated")),C&&((E=(v=w.props).onOpen)==null||E.call(v))};return{id:e,props:a,observe:c,toggle:m,removeToast:y,toasts:l,clearQueue:x,buildToast:(w,v)=>{if(h(v))return;let{toastId:E,updateId:k,data:T,staleId:C,delay:O}=v,j=k==null;j&&o++;let D={...a,style:a.toastStyle,key:n++,...Object.fromEntries(Object.entries(v).filter(([L,R])=>R!=null)),toastId:E,updateId:k,data:T,isIn:!1,className:zo(v.className||a.toastClassName),progressClassName:zo(v.progressClassName||a.progressClassName),autoClose:v.isLoading?!1:Sf(v.autoClose,a.autoClose),closeToast(L){l.get(E).removalReason=L,y(E)},deleteToast(){let L=l.get(E);if(L!=null){if(r(ia(L,"removed")),l.delete(E),o--,o<0&&(o=0),i.length>0){b(i.shift());return}f()}}};D.closeButton=a.closeButton,v.closeButton===!1||qo(v.closeButton)?D.closeButton=v.closeButton:v.closeButton===!0&&(D.closeButton=qo(a.closeButton)?a.closeButton:!0);let N={content:w,props:D,staleId:C};a.limit&&a.limit>0&&o>a.limit&&j?i.push(N):Wr(O)?setTimeout(()=>{b(N)},O):b(N)},setProps(w){a=w},setToggle:(w,v)=>{let E=l.get(w);E&&(E.toggle=v)},isToastActive:w=>{var v;return(v=l.get(w))==null?void 0:v.isActive},getSnapshot:()=>s}}var Ye=new Map,Kr=[],Ho=new Set,$f=e=>Ho.forEach(t=>t(e)),la=()=>Ye.size>0;function Nf(){Kr.forEach(e=>ca(e.content,e.options)),Kr=[]}var Pf=(e,{containerId:t})=>{var r;return(r=Ye.get(t||1))==null?void 0:r.toasts.get(e)};function ua(e,t){var r;if(t)return!!((r=Ye.get(t))!=null&&r.isToastActive(e));let n=!1;return Ye.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function Df(e){if(!la()){Kr=Kr.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||_f(e))Ye.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ye.get(e.containerId);t?t.removeToast(e.id):Ye.forEach(r=>{r.removeToast(e.id)})}}var Lf=(e={})=>{Ye.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ca(e,t){qo(e)&&(la()||Kr.push({content:e,options:t}),Ye.forEach(r=>{r.buildToast(e,t)}))}function If(e){var t;(t=Ye.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function fa(e,t){Ye.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function Mf(e){let t=e.containerId||1;return{subscribe(r){let n=jf(t,e,$f);Ye.set(t,n);let o=n.observe(r);return Nf(),()=>{o(),Ye.delete(t)}},setProps(r){var n;(n=Ye.get(t))==null||n.setProps(r)},getSnapshot(){var r;return(r=Ye.get(t))==null?void 0:r.getSnapshot()}}}function Rf(e){return Ho.add(e),()=>{Ho.delete(e)}}function Vf(e){return e&&(rr(e.toastId)||Wr(e.toastId))?e.toastId:aa()}function Yr(e,t){return ca(e,t),t.toastId}function Nn(e,t){return{...t,type:t&&t.type||e,toastId:Vf(t)}}function Pn(e){return(t,r)=>Yr(t,Nn(e,r))}function ce(e,t){return Yr(e,Nn("default",t))}ce.loading=(e,t)=>Yr(e,Nn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Bf(e,{pending:t,error:r,success:n},o){let i;t&&(i=rr(t)?ce.loading(t,o):ce.loading(t.render,{...o,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(u,c,f)=>{if(c==null){ce.dismiss(i);return}let h={type:u,...s,...o,data:f},m=rr(c)?{render:c}:c;return i?ce.update(i,{...h,...m}):ce(m.render,{...h,...m}),f},l=Dt(e)?e():e;return l.then(u=>a("success",n,u)).catch(u=>a("error",r,u)),l}ce.promise=Bf,ce.success=Pn("success"),ce.info=Pn("info"),ce.error=Pn("error"),ce.warning=Pn("warning"),ce.warn=ce.warning,ce.dark=(e,t)=>Yr(e,Nn("default",{theme:"dark",...t}));function Uf(e){Df(e)}ce.dismiss=Uf,ce.clearWaitingQueue=Lf,ce.isActive=ua,ce.update=(e,t={})=>{let r=Pf(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:aa()};i.toastId!==e&&(i.staleId=e);let s=i.render||o;delete i.render,Yr(s,i)}},ce.done=e=>{ce.update(e,{progress:1})},ce.onChange=Rf,ce.play=e=>fa(!0,e),ce.pause=e=>fa(!1,e);function zf(e){var t;let{subscribe:r,getSnapshot:n,setProps:o}=p.useRef(Mf(e)).current;o(e);let i=(t=p.useSyncExternalStore(r,n,n))==null?void 0:t.slice();function s(a){if(!i)return[];let l=new Map;return e.newestOnTop&&i.reverse(),i.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>a(u[0],u[1]))}return{getToastToRender:s,isToastActive:ua,count:i==null?void 0:i.length}}function qf(e){let[t,r]=p.useState(!1),[n,o]=p.useState(!1),i=p.useRef(null),s=p.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;If({id:e.toastId,containerId:e.containerId,fn:r}),p.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{m()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||b(),window.addEventListener("focus",x),window.addEventListener("blur",b)}function m(){window.removeEventListener("focus",x),window.removeEventListener("blur",b)}function d(C){if(e.draggable===!0||e.draggable===C.pointerType){w();let O=i.current;s.canCloseOnClick=!0,s.canDrag=!0,O.style.transition="none",e.draggableDirection==="x"?(s.start=C.clientX,s.removalDistance=O.offsetWidth*(e.draggablePercent/100)):(s.start=C.clientY,s.removalDistance=O.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function y(C){let{top:O,bottom:j,left:D,right:N}=i.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=D&&C.clientX<=N&&C.clientY>=O&&C.clientY<=j?b():x()}function x(){r(!0)}function b(){r(!1)}function w(){s.didMove=!1,document.addEventListener("pointermove",E),document.addEventListener("pointerup",k)}function v(){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",k)}function E(C){let O=i.current;if(s.canDrag&&O){s.didMove=!0,t&&b(),e.draggableDirection==="x"?s.delta=C.clientX-s.start:s.delta=C.clientY-s.start,s.start!==C.clientX&&(s.canCloseOnClick=!1);let j=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;O.style.transform=`translate3d(${j},0)`,O.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function k(){v();let C=i.current;if(s.canDrag&&s.didMove&&C){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}let T={onPointerDown:d,onPointerUp:y};return a&&l&&(T.onMouseEnter=b,e.stacked||(T.onMouseLeave=x)),f&&(T.onClick=C=>{c&&c(C),s.canCloseOnClick&&u(!0)}),{playToast:x,pauseToast:b,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:T}}var Hf=typeof window<"u"?p.useLayoutEffect:p.useEffect,Dn=({theme:e,type:t,isLoading:r,...n})=>p.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n});function Wf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Kf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Yf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Jf(e){return p.createElement(Dn,{...e},p.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Gf(){return p.createElement("div",{className:"Toastify__spinner"})}var Wo={info:Kf,warning:Wf,success:Yf,error:Jf,spinner:Gf},Xf=e=>e in Wo;function Zf({theme:e,type:t,isLoading:r,icon:n}){let o=null,i={theme:e,type:t};return n===!1||(Dt(n)?o=n({...i,isLoading:r}):p.isValidElement(n)?o=p.cloneElement(n,i):r?o=Wo.spinner():Xf(t)&&(o=Wo[t](i))),o}var Qf=e=>{let{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o,playToast:i}=qf(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:h,transition:m,position:d,className:y,style:x,progressClassName:b,updateId:w,role:v,progress:E,rtl:k,toastId:T,deleteToast:C,isIn:O,isLoading:j,closeOnClick:D,theme:N,ariaLabel:L}=e,R=ue("Toastify__toast",`Toastify__toast-theme--${N}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":D}),H=Dt(y)?y({rtl:k,position:d,type:c,defaultClassName:R}):ue(R,y),J=Zf(e),z=!!E||!l,X={closeToast:h,type:c,theme:N},K=null;return s===!1||(Dt(s)?K=s(X):p.isValidElement(s)?K=p.cloneElement(s,X):K=Of(X)),p.createElement(m,{isIn:O,done:C,position:d,preventExitTransition:r,nodeRef:n,playToast:i},p.createElement("div",{id:T,tabIndex:0,onClick:u,"data-in":O,className:H,...o,style:x,ref:n,...O&&{role:v,"aria-label":L}},J!=null&&p.createElement("div",{className:ue("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},J),sa(a,e,!t),K,!e.customProgressBar&&p.createElement(Ff,{...w&&!z?{key:`p-${w}`}:{},rtl:k,theme:N,delay:l,isRunning:t,isIn:O,closeToast:h,hide:f,type:c,className:b,controlledProgress:z,progress:E||0})))},ed=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),td=kf(ed("bounce",!0)),rd={position:"top-right",transition:td,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function nd(e){let t={...rd,...e},r=e.stacked,[n,o]=p.useState(!0),i=p.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=zf(t),{className:u,style:c,rtl:f,containerId:h,hotKeys:m}=t;function d(x){let b=ue("Toastify__toast-container",`Toastify__toast-container--${x}`,{"Toastify__toast-container--rtl":f});return Dt(u)?u({position:x,rtl:f,defaultClassName:b}):ue(b,zo(u))}function y(){r&&(o(!0),ce.play())}return Hf(()=>{var x;if(r){let b=i.current.querySelectorAll('[data-in="true"]'),w=12,v=(x=t.position)==null?void 0:x.includes("top"),E=0,k=0;Array.from(b).reverse().forEach((T,C)=>{let O=T;O.classList.add("Toastify__toast--stacked"),C>0&&(O.dataset.collapsed=`${n}`),O.dataset.pos||(O.dataset.pos=v?"top":"bot");let j=E*(n?.2:1)+(n?0:w*C);O.style.setProperty("--y",`${v?j:j*-1}px`),O.style.setProperty("--g",`${w}`),O.style.setProperty("--s",`${1-(n?k:0)}`),E+=O.offsetHeight,k+=.025})}},[n,l,r]),p.useEffect(()=>{function x(b){var w;let v=i.current;m(b)&&((w=v.querySelector('[tabIndex="0"]'))==null||w.focus(),o(!1),ce.pause()),b.key==="Escape"&&(document.activeElement===v||v!=null&&v.contains(document.activeElement))&&(o(!0),ce.play())}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[m]),p.createElement("section",{ref:i,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ce.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((x,b)=>{let w=b.length?{...c}:{...c,pointerEvents:"none"};return p.createElement("div",{tabIndex:-1,className:d(x),"data-stacked":r,style:w,key:`c-${x}`},b.map(({content:v,props:E})=>p.createElement(Qf,{...E,stacked:r,collapseAll:y,isIn:a(E.toastId,E.containerId),key:`t-${E.key}`},v)))}))}var Jr={},da;function od(){if(da)return Jr;da=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.parse=s,Jr.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,m){const d=new i,y=h.length;if(y<2)return d;const x=(m==null?void 0:m.decode)||c;let b=0;do{const w=h.indexOf("=",b);if(w===-1)break;const v=h.indexOf(";",b),E=v===-1?y:v;if(w>E){b=h.lastIndexOf(";",w-1)+1;continue}const k=a(h,b,w),T=l(h,w,k),C=h.slice(k,T);if(d[C]===void 0){let O=a(h,w+1,E),j=l(h,E,O);const D=x(h.slice(O,j));d[C]=D}b=E+1}while(b<y);return d}function a(h,m,d){do{const y=h.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<d);return d}function l(h,m,d){for(;m>d;){const y=h.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return d}function u(h,m,d){const y=(d==null?void 0:d.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const x=y(m);if(!t.test(x))throw new TypeError(`argument val is invalid: ${m}`);let b=h+"="+x;if(!d)return b;if(d.maxAge!==void 0){if(!Number.isInteger(d.maxAge))throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);b+="; Max-Age="+d.maxAge}if(d.domain){if(!r.test(d.domain))throw new TypeError(`option domain is invalid: ${d.domain}`);b+="; Domain="+d.domain}if(d.path){if(!n.test(d.path))throw new TypeError(`option path is invalid: ${d.path}`);b+="; Path="+d.path}if(d.expires){if(!f(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError(`option expires is invalid: ${d.expires}`);b+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(b+="; HttpOnly"),d.secure&&(b+="; Secure"),d.partitioned&&(b+="; Partitioned"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${d.priority}`)}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${d.sameSite}`)}return b}function c(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return Jr}od();/**
33
33
  * react-router v7.1.1
34
34
  *
35
35
  * Copyright (c) Remix Software Inc.
@@ -38,31 +38,31 @@ React keys must be passed directly to JSX without using spread:
38
38
  * LICENSE.md file in the root directory of this source tree.
39
39
  *
40
40
  * @license MIT
41
- */function De(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wo({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ko(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function la(e,t,r="/"){return fd(e,t,r,!1)}function fd(e,t,r,n){let o=typeof t=="string"?Ko(t):t,i=rr(o.pathname||"/",r);if(i==null)return null;let s=ua(e);dd(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let u=Td(i);a=wd(s[l],u,n)}return a}function ua(e,t=[],r=[],n=""){let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(De(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let u=Dt([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(De(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ua(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:xd(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of ca(i.path))o(i,s,l)}),t}function ca(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let s=ca(n.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function dd(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:vd(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var pd=/^:[\w-]+$/,md=3,hd=2,gd=1,yd=10,bd=-2,fa=e=>e==="*";function xd(e,t){let r=e.split("/"),n=r.length;return r.some(fa)&&(n+=bd),t&&(n+=hd),r.filter(o=>!fa(o)).reduce((o,i)=>o+(pd.test(i)?md:i===""?gd:yd),n)}function vd(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function wd(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",s=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:Dt([i,f.pathname]),pathnameBase:Cd(Dt([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Dt([i,f.pathnameBase]))}return s}function Dn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ed(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:f},h)=>{if(c==="*"){let d=a[h]||"";s=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const p=a[h];return f&&!p?u[c]=void 0:u[c]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Ed(e,t=!1,r=!0){Lt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Td(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function rr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function _d(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ko(e):e;return{pathname:r?r.startsWith("/")?r:Sd(r,t):t,search:Od(n),hash:Fd(o)}}function Sd(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Yo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kd(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function da(e){let t=kd(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function pa(e,t,r,n=!1){let o;typeof e=="string"?o=Ko(e):(o={...e},De(!o.pathname||!o.pathname.includes("?"),Yo("?","pathname","search",o)),De(!o.pathname||!o.pathname.includes("#"),Yo("#","pathname","hash",o)),De(!o.search||!o.search.includes("#"),Yo("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=_d(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Dt=e=>e.join("/").replace(/\/\/+/g,"/"),Cd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Od=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fd=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ad(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var ma=["POST","PUT","PATCH","DELETE"];new Set(ma);var jd=["GET",...ma];new Set(jd);var kr=F.createContext(null);kr.displayName="DataRouter";var In=F.createContext(null);In.displayName="DataRouterState";var ha=F.createContext({isTransitioning:!1});ha.displayName="ViewTransition";var $d=F.createContext(new Map);$d.displayName="Fetchers";var Nd=F.createContext(null);Nd.displayName="Await";var It=F.createContext(null);It.displayName="Navigation";var Jo=F.createContext(null);Jo.displayName="Location";var Mt=F.createContext({outlet:null,matches:[],isDataRoute:!1});Mt.displayName="Route";var Xo=F.createContext(null);Xo.displayName="RouteError";function Pd(e,{relative:t}={}){De(Mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=F.useContext(It),{hash:o,pathname:i,search:s}=Kr(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:Dt([r,i])),n.createHref({pathname:a,search:s,hash:o})}function Mn(){return F.useContext(Jo)!=null}function nr(){return De(Mn(),"useLocation() may be used only in the context of a <Router> component."),F.useContext(Jo).location}var ga="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ya(e){F.useContext(It).static||F.useLayoutEffect(e)}function Ld(){let{isDataRoute:e}=F.useContext(Mt);return e?Yd():Dd()}function Dd(){De(Mn(),"useNavigate() may be used only in the context of a <Router> component.");let e=F.useContext(kr),{basename:t,navigator:r}=F.useContext(It),{matches:n}=F.useContext(Mt),{pathname:o}=nr(),i=JSON.stringify(da(n)),s=F.useRef(!1);return ya(()=>{s.current=!0}),F.useCallback((l,u={})=>{if(Lt(s.current,ga),!s.current)return;if(typeof l=="number"){r.go(l);return}let c=pa(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Dt([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}F.createContext(null);function Kr(e,{relative:t}={}){let{matches:r}=F.useContext(Mt),{pathname:n}=nr(),o=JSON.stringify(da(r));return F.useMemo(()=>pa(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Id(e,t,r,n){De(Mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=F.useContext(It),{matches:i}=F.useContext(Mt),s=i[i.length-1],a=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",c=s&&s.route;{let b=c&&c.path||"";xa(l,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
41
+ */function Ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ko({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Yo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function pa(e,t,r="/"){return id(e,t,r,!1)}function id(e,t,r,n){let o=typeof t=="string"?Yo(t):t,i=nr(o.pathname||"/",r);if(i==null)return null;let s=ma(e);sd(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let u=yd(i);a=hd(s[l],u,n)}return a}function ma(e,t=[],r=[],n=""){let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let u=It([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Ie(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ma(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:pd(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of ha(i.path))o(i,s,l)}),t}function ha(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let s=ha(n.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function sd(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:md(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var ad=/^:[\w-]+$/,ld=3,ud=2,cd=1,fd=10,dd=-2,ga=e=>e==="*";function pd(e,t){let r=e.split("/"),n=r.length;return r.some(ga)&&(n+=dd),t&&(n+=ud),r.filter(o=>!ga(o)).reduce((o,i)=>o+(ad.test(i)?ld:i===""?cd:fd),n)}function md(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function hd(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",s=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Ln({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Ln({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:It([i,f.pathname]),pathnameBase:wd(It([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=It([i,f.pathnameBase]))}return s}function Ln(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=gd(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:f},h)=>{if(c==="*"){let d=a[h]||"";s=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?u[c]=void 0:u[c]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function gd(e,t=!1,r=!0){Lt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function yd(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function nr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function bd(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Yo(e):e;return{pathname:r?r.startsWith("/")?r:xd(r,t):t,search:Ed(n),hash:Td(o)}}function xd(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Jo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vd(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ya(e){let t=vd(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function ba(e,t,r,n=!1){let o;typeof e=="string"?o=Yo(e):(o={...e},Ie(!o.pathname||!o.pathname.includes("?"),Jo("?","pathname","search",o)),Ie(!o.pathname||!o.pathname.includes("#"),Jo("#","pathname","hash",o)),Ie(!o.search||!o.search.includes("#"),Jo("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=bd(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var It=e=>e.join("/").replace(/\/\/+/g,"/"),wd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ed=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Td=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _d(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var xa=["POST","PUT","PATCH","DELETE"];new Set(xa);var Sd=["GET",...xa];new Set(Sd);var kr=A.createContext(null);kr.displayName="DataRouter";var In=A.createContext(null);In.displayName="DataRouterState";var va=A.createContext({isTransitioning:!1});va.displayName="ViewTransition";var Cd=A.createContext(new Map);Cd.displayName="Fetchers";var kd=A.createContext(null);kd.displayName="Await";var Mt=A.createContext(null);Mt.displayName="Navigation";var Go=A.createContext(null);Go.displayName="Location";var Rt=A.createContext({outlet:null,matches:[],isDataRoute:!1});Rt.displayName="Route";var Xo=A.createContext(null);Xo.displayName="RouteError";function Od(e,{relative:t}={}){Ie(Mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=A.useContext(Mt),{hash:o,pathname:i,search:s}=Gr(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:It([r,i])),n.createHref({pathname:a,search:s,hash:o})}function Mn(){return A.useContext(Go)!=null}function or(){return Ie(Mn(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Go).location}var wa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ea(e){A.useContext(Mt).static||A.useLayoutEffect(e)}function Fd(){let{isDataRoute:e}=A.useContext(Rt);return e?Ud():Ad()}function Ad(){Ie(Mn(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(kr),{basename:t,navigator:r}=A.useContext(Mt),{matches:n}=A.useContext(Rt),{pathname:o}=or(),i=JSON.stringify(ya(n)),s=A.useRef(!1);return Ea(()=>{s.current=!0}),A.useCallback((l,u={})=>{if(Lt(s.current,wa),!s.current)return;if(typeof l=="number"){r.go(l);return}let c=ba(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:It([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}A.createContext(null);function Gr(e,{relative:t}={}){let{matches:r}=A.useContext(Rt),{pathname:n}=or(),o=JSON.stringify(ya(r));return A.useMemo(()=>ba(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function jd(e,t,r,n){Ie(Mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=A.useContext(Mt),{matches:i}=A.useContext(Rt),s=i[i.length-1],a=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",c=s&&s.route;{let b=c&&c.path||"";_a(l,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
42
42
 
43
- Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=nr(),h;h=f;let p=h.pathname||"/",d=p;if(u!=="/"){let b=u.replace(/^\//,"").split("/");d="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=la(e,{pathname:d});return Lt(c||g!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Lt(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ud(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Dt([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Dt([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n)}function Md(){let e=Kd(),t=Ad(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=F.createElement(F.Fragment,null,F.createElement("p",null,"💿 Hey developer 👋"),F.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",F.createElement("code",{style:i},"ErrorBoundary")," or"," ",F.createElement("code",{style:i},"errorElement")," prop on your route.")),F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},t),r?F.createElement("pre",{style:o},r):null,s)}var Rd=F.createElement(Md,null),Vd=class extends F.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?F.createElement(Mt.Provider,{value:this.props.routeContext},F.createElement(Xo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Bd({routeContext:e,match:t,children:r}){let n=F.useContext(kr);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),F.createElement(Mt.Provider,{value:e},r)}function Ud(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);De(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let u=o[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=r,h=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,u,c)=>{let f,h=!1,p=null,d=null;r&&(f=i&&u.route.id?i[u.route.id]:void 0,p=u.route.errorElement||Rd,s&&(a<0&&c===0?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):a===c&&(h=!0,d=u.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,c+1)),x=()=>{let b;return f?b=p:h?b=d:u.route.Component?b=F.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=l,F.createElement(Bd,{match:u,routeContext:{outlet:l,matches:g,isDataRoute:r!=null},children:b})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?F.createElement(Vd,{location:r.location,revalidation:r.revalidation,component:p,error:f,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}function Go(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zd(e){let t=F.useContext(kr);return De(t,Go(e)),t}function Hd(e){let t=F.useContext(In);return De(t,Go(e)),t}function qd(e){let t=F.useContext(Mt);return De(t,Go(e)),t}function Qo(e){let t=qd(e),r=t.matches[t.matches.length-1];return De(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Wd(){return Qo("useRouteId")}function Kd(){var n;let e=F.useContext(Xo),t=Hd("useRouteError"),r=Qo("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Yd(){let{router:e}=zd("useNavigate"),t=Qo("useNavigate"),r=F.useRef(!1);return ya(()=>{r.current=!0}),F.useCallback(async(o,i={})=>{Lt(r.current,ga),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var ba={};function xa(e,t,r){!t&&!ba[e]&&(ba[e]=!0,Lt(!1,r))}F.memo(Jd);function Jd({routes:e,future:t,state:r}){return Id(e,void 0,r,t)}var Rn="get",Vn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function Xd(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function Gd(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function Qd(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function Zd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ep(e,t){return e.button===0&&(!t||t==="_self")&&!Zd(e)}var Un=null;function tp(){if(Un===null)try{new FormData(document.createElement("form"),0),Un=!1}catch{Un=!0}return Un}var rp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zo(e){return e!=null&&!rp.has(e)?(Lt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vn}"`),null):e}function np(e,t){let r,n,o,i,s;if(Gd(e)){let a=e.getAttribute("action");n=a?rr(a,t):null,r=e.getAttribute("method")||Rn,o=Zo(e.getAttribute("enctype"))||Vn,i=new FormData(e)}else if(Xd(e)||Qd(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?rr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Rn,o=Zo(e.getAttribute("formenctype"))||Zo(a.getAttribute("enctype"))||Vn,i=new FormData(a,e),!tp()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Rn,n=null,o=Vn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function ei(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function op(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ip(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function sp(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await op(i,r);return s.links?s.links():[]}return[]}));return cp(n.flat(1).filter(ip).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function va(e,t,r,n,o,i){let s=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>s(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var f;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ap(e,t){return lp(e.map(r=>{let n=t.routes[r.route.id];if(!n)return[];let o=[n.module];return n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function lp(e){return[...new Set(e)]}function up(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function cp(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(up(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function fp(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function dp(){let e=F.useContext(kr);return ei(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pp(){let e=F.useContext(In);return ei(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ti=F.createContext(void 0);ti.displayName="FrameworkContext";function wa(){let e=F.useContext(ti);return ei(e,"You must render this element inside a <HydratedRouter> element"),e}function mp(e,t){let r=F.useContext(ti),[n,o]=F.useState(!1),[i,s]=F.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=F.useRef(null);F.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=b=>{b.forEach(v=>{s(v.isIntersecting)})},x=new IntersectionObserver(g,{threshold:.5});return h.current&&x.observe(h.current),()=>{x.disconnect()}}},[e]),F.useEffect(()=>{if(n){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[n]);let p=()=>{o(!0)},d=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Yr(a,p),onBlur:Yr(l,d),onMouseEnter:Yr(u,p),onMouseLeave:Yr(c,d),onTouchStart:Yr(f,p)}]:[!1,h,{}]}function Yr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function hp({page:e,...t}){let{router:r}=dp(),n=F.useMemo(()=>la(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?F.createElement(yp,{page:e,matches:n,...t}):null}function gp(e){let{manifest:t,routeModules:r}=wa(),[n,o]=F.useState([]);return F.useEffect(()=>{let i=!1;return sp(e,t,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,r]),n}function yp({page:e,matches:t,...r}){let n=nr(),{manifest:o,routeModules:i}=wa(),{loaderData:s,matches:a}=pp(),l=F.useMemo(()=>va(e,t,a,o,n,"data"),[e,t,a,o,n]),u=F.useMemo(()=>va(e,t,a,o,n,"assets"),[e,t,a,o,n]),c=F.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let p=new Set,d=!1;if(t.forEach(x=>{var v;let b=o.routes[x.route.id];!b||!b.hasLoader||(!l.some(w=>w.route.id===x.route.id)&&x.route.id in s&&((v=i[x.route.id])!=null&&v.shouldRevalidate)||b.hasClientLoader?d=!0:p.add(x.route.id))}),p.size===0)return[];let g=fp(e);return d&&p.size>0&&g.searchParams.set("_routes",t.filter(x=>p.has(x.route.id)).map(x=>x.route.id).join(",")),[g.pathname+g.search]},[s,n,o,l,t,e,i]),f=F.useMemo(()=>ap(u,o),[u,o]),h=gp(u);return F.createElement(F.Fragment,null,c.map(p=>F.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),f.map(p=>F.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),h.map(({key:p,link:d})=>F.createElement("link",{key:p,...d})))}function bp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ea=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ea&&(window.__reactRouterVersion="7.1.1")}catch{}var Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ri=F.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...h},p){let{basename:d}=F.useContext(It),g=typeof u=="string"&&Ta.test(u),x,b=!1;if(typeof u=="string"&&g&&(x=u,Ea))try{let N=new URL(window.location.href),L=u.startsWith("//")?new URL(N.protocol+u):new URL(u),P=rr(L.pathname,d);L.origin===N.origin&&P!=null?u=P+L.search+L.hash:b=!0}catch{Lt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=Pd(u,{relative:o}),[w,_,k]=mp(n,h),S=Ep(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o,viewTransition:f});function C(N){t&&t(N),N.defaultPrevented||S(N)}let A=F.createElement("a",{...h,...k,href:x||v,onClick:b||i?t:C,ref:bp(p,_),target:l,"data-discover":!g&&r==="render"?"true":void 0});return w&&!g?F.createElement(F.Fragment,null,A,F.createElement(hp,{page:v})):A});ri.displayName="Link";var xp=F.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...u},c){let f=Kr(s,{relative:u.relative}),h=nr(),p=F.useContext(In),{navigator:d,basename:g}=F.useContext(It),x=p!=null&&Cp(f)&&a===!0,b=d.encodeLocation?d.encodeLocation(f).pathname:f.pathname,v=h.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),w=w?w.toLowerCase():null,b=b.toLowerCase()),w&&g&&(w=rr(w,g)||w);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=v===b||!o&&v.startsWith(b)&&v.charAt(_)==="/",S=w!=null&&(w===b||!o&&w.startsWith(b)&&w.charAt(b.length)==="/"),C={isActive:k,isPending:S,isTransitioning:x},A=k?t:void 0,N;typeof n=="function"?N=n(C):N=[n,k?"active":null,S?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let L=typeof i=="function"?i(C):i;return F.createElement(ri,{...u,"aria-current":A,className:N,ref:c,style:L,to:s,viewTransition:a},typeof l=="function"?l(C):l)});xp.displayName="NavLink";var vp=F.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Rn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...h},p)=>{let d=Sp(),g=kp(a,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&Ta.test(a),v=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let _=w.nativeEvent.submitter,k=(_==null?void 0:_.getAttribute("formmethod"))||s;d(_||w.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f})};return F.createElement("form",{ref:p,method:x,action:g,onSubmit:n?l:v,...h,"data-discover":!b&&e==="render"?"true":void 0})});vp.displayName="Form";function wp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _a(e){let t=F.useContext(kr);return De(t,wp(e)),t}function Ep(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=Ld(),l=nr(),u=Kr(e,{relative:i});return F.useCallback(c=>{if(ep(c,t)){c.preventDefault();let f=r!==void 0?r:Wo(l)===Wo(u);a(e,{replace:f,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,u,r,n,t,e,o,i,s])}var Tp=0,_p=()=>`__${String(++Tp)}__`;function Sp(){let{router:e}=_a("useSubmit"),{basename:t}=F.useContext(It),r=Wd();return F.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:u}=np(n,t);if(o.navigate===!1){let c=o.fetcherKey||_p();await e.fetch(c,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function kp(e,{relative:t}={}){let{basename:r}=F.useContext(It),n=F.useContext(Mt);De(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kr(e||".",{relative:t})},s=nr();if(e==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Dt([r,i.pathname])),Wo(i)}function Cp(e,t={}){let r=F.useContext(ha);De(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=_a("useViewTransitionState"),o=Kr(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=rr(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=rr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Dn(o.pathname,s)!=null||Dn(o.pathname,i)!=null}new TextEncoder;const Sa=Object.freeze({left:0,top:0,width:16,height:16}),zn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ni=Object.freeze({...Sa,...zn}),oi=Object.freeze({...ni,body:"",hidden:!1});function Op(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function ka(e,t){const r=Op(e,t);for(const n in oi)n in zn?n in e&&!(n in r)&&(r[n]=zn[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Fp(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(r[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=n[s]&&n[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(r).concat(Object.keys(n)).forEach(i),o}function Ap(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=ka(n[a]||o[a],i)}return s(t),r.forEach(s),ka(e,i)}function Ca(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Fp(e);for(const o in n){const i=n[o];i&&(t(o,Ap(e,o,i)),r.push(o))}return r}const jp={provider:"",aliases:{},not_found:{},...Sa};function ii(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Oa(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ii(e,jp))return null;const r=t.icons;for(const o in r){const i=r[o];if(!o||typeof i.body!="string"||!ii(i,oi))return null}const n=t.aliases||Object.create(null);for(const o in n){const i=n[o],s=i.parent;if(!o||typeof s!="string"||!r[s]&&!n[s]||!ii(i,oi))return null}return t}const Fa=/^[a-z0-9]+(-[a-z0-9]+)*$/,Hn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:n,prefix:l,name:a};return t&&!qn(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!qn(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:i};return t&&!qn(a,r)?null:a}return null},qn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Aa=Object.create(null);function $p(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function or(e,t){const r=Aa[e]||(Aa[e]=Object.create(null));return r[t]||(r[t]=$p(e,t))}function si(e,t){return Oa(t)?Ca(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Np(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Jr=!1;function ja(e){return typeof e=="boolean"&&(Jr=e),Jr}function $a(e){const t=typeof e=="string"?Hn(e,!0,Jr):e;if(t){const r=or(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Pp(e,t){const r=Hn(e,!0,Jr);if(!r)return!1;const n=or(r.provider,r.prefix);return t?Np(n,r.name,t):(n.missing.add(r.name),!0)}function Lp(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Jr&&!t&&!e.prefix){let o=!1;return Oa(e)&&(e.prefix="",Ca(e,(i,s)=>{Pp(i,s)&&(o=!0)})),o}const r=e.prefix;if(!qn({provider:t,prefix:r,name:"a"}))return!1;const n=or(t,r);return!!si(n,e)}const Na=Object.freeze({width:null,height:null}),Pa=Object.freeze({...Na,...zn}),Dp=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ip=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function La(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(Dp);if(n===null||!n.length)return e;const o=[];let i=n.shift(),s=Ip.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*r)/r)}else o.push(i);if(i=n.shift(),i===void 0)return o.join("");s=!s}}function Mp(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;r+=e.slice(o+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function Rp(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Vp(e,t,r){const n=Mp(e);return Rp(n.defs,t+n.content+r)}const Bp=e=>e==="unset"||e==="undefined"||e==="none";function Up(e,t){const r={...ni,...e},n={...Pa,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(g=>{const x=[],b=g.hFlip,v=g.vFlip;let w=g.rotate;b?v?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):v&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let _;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:_=o.height/2+o.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:_=o.width/2+o.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}w%2===1&&(o.left!==o.top&&(_=o.left,o.left=o.top,o.top=_),o.width!==o.height&&(_=o.width,o.width=o.height,o.height=_)),x.length&&(i=Vp(i,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=n.width,a=n.height,l=o.width,u=o.height;let c,f;s===null?(f=a===null?"1em":a==="auto"?u:a,c=La(f,l/u)):(c=s==="auto"?l:s,f=a===null?La(c,u/l):a==="auto"?u:a);const h={},p=(g,x)=>{Bp(x)||(h[g]=x.toString())};p("width",c),p("height",f);const d=[o.left,o.top,l,u];return h.viewBox=d.join(" "),{attributes:h,viewBox:d,body:i}}const zp=/\sid="(\S+)"/g,Hp="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let qp=0;function Wp(e,t=Hp){const r=[];let n;for(;n=zp.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{const s=typeof t=="function"?t(i):t+(qp++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ai=Object.create(null);function Kp(e,t){ai[e]=t}function li(e){return ai[e]||ai[""]}function ui(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ci=Object.create(null),Xr=["https://api.simplesvg.com","https://api.unisvg.com"],Wn=[];for(;Xr.length>0;)Xr.length===1||Math.random()>.5?Wn.push(Xr.shift()):Wn.push(Xr.pop());ci[""]=ui({resources:["https://api.iconify.design"].concat(Wn)});function Yp(e,t){const r=ui(t);return r===null?!1:(ci[e]=r,!0)}function fi(e){return ci[e]}let Da=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Jp(e,t){const r=fi(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";n=r.maxURL-o-r.path.length-i.length}return n}function Xp(e){return e===404}const Gp=(e,t,r)=>{const n=[],o=Jp(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return r.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),n.push(s),n};function Qp(e){if(typeof e=="string"){const t=fi(e);if(t)return t.path}return"/"}const Zp={prepare:Gp,send:(e,t,r)=>{if(!Da){r("abort",424);return}let n=Qp(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});n+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let o=503;Da(e+n).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{r(Xp(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?r("abort",i):r("next",o)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",o)})}};function em(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const i=o.provider,s=o.prefix,a=o.name,l=r[i]||(r[i]=Object.create(null)),u=l[s]||(l[s]=or(i,s));let c;a in u.icons?c=t.loaded:s===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:i,prefix:s,name:a};c.push(f)}),t}function Ia(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function tm(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:n,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),s.pending.length!==a&&(r||Ia([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let rm=0;function nm(e,t,r){const n=rm++,o=Ia.bind(null,r,n);if(!t.pending.length)return o;const i={id:n,icons:t,callback:e,abort:o};return r.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function om(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const i=typeof o=="string"?Hn(o,t,r):o;i&&n.push(i)}),n}var im={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sm(e,t,r,n){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const C=Math.floor(Math.random()*S.length);s.push(S[C]),S=S.slice(0,C).concat(S.slice(C+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,c,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function d(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),d(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function x(S,C){C&&(p=[]),typeof S=="function"&&p.push(S)}function b(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:x,abort:g}}function v(){l="failed",p.forEach(S=>{S(void 0,c)})}function w(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function _(S,C,A){const N=C!=="success";switch(h=h.filter(L=>L!==S),l){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=A,v();return}if(N){c=A,h.length||(s.length?k():v());return}if(d(),w(),!e.random){const L=e.resources.indexOf(S.resource);L!==-1&&L!==e.index&&(e.index=L)}l="completed",p.forEach(L=>{L(A)})}function k(){if(l!=="pending")return;d();const S=s.shift();if(S===void 0){if(h.length){f=setTimeout(()=>{d(),l==="pending"&&(w(),v())},e.timeout);return}v();return}const C={status:"pending",resource:S,callback:(A,N)=>{_(C,A,N)}};h.push(C),u++,f=setTimeout(k,e.rotate),r(S,t,C.callback)}return setTimeout(k),b}function Ma(e){const t={...im,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,l,u){const c=sm(t,a,l,(f,h)=>{n(),u&&u(f,h)});return r.push(c),c}function i(a){return r.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function Ra(){}const di=Object.create(null);function am(e){if(!di[e]){const t=fi(e);if(!t)return;const r=Ma(t),n={config:t,redundancy:r};di[e]=n}return di[e]}function lm(e,t,r){let n,o;if(typeof e=="string"){const i=li(e);if(!i)return r(void 0,424),Ra;o=i.send;const s=am(e);s&&(n=s.redundancy)}else{const i=ui(e);if(i){n=Ma(i);const s=e.resources?e.resources[0]:"",a=li(s);a&&(o=a.send)}}return!n||!o?(r(void 0,424),Ra):n.query(t,o,r)().abort}const Va="iconify2",Gr="iconify",Ba=Gr+"-count",Ua=Gr+"-version",za=36e5,um=168,cm=50;function pi(e,t){try{return e.getItem(t)}catch{}}function mi(e,t,r){try{return e.setItem(t,r),!0}catch{}}function Ha(e,t){try{e.removeItem(t)}catch{}}function hi(e,t){return mi(e,Ba,t.toString())}function gi(e){return parseInt(pi(e,Ba))||0}const Kn={local:!0,session:!0},qa={local:new Set,session:new Set};let yi=!1;function fm(e){yi=e}let Yn=typeof window>"u"?{}:window;function Wa(e){const t=e+"Storage";try{if(Yn&&Yn[t]&&typeof Yn[t].length=="number")return Yn[t]}catch{}Kn[e]=!1}function Ka(e,t){const r=Wa(e);if(!r)return;const n=pi(r,Ua);if(n!==Va){if(n){const a=gi(r);for(let l=0;l<a;l++)Ha(r,Gr+l.toString())}mi(r,Ua,Va),hi(r,0);return}const o=Math.floor(Date.now()/za)-um,i=a=>{const l=Gr+a.toString(),u=pi(r,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}Ha(r,l)}};let s=gi(r);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,hi(r,s)):qa[e].add(a))}function Ya(){if(!yi){fm(!0);for(const e in Kn)Ka(e,t=>{const r=t.data,n=t.provider,o=r.prefix,i=or(n,o);if(!si(i,r).length)return!1;const s=r.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function dm(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in Kn)Ka(n,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function pm(e,t){yi||Ya();function r(n){let o;if(!Kn[n]||!(o=Wa(n)))return;const i=qa[n];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=gi(o),s>=cm||!hi(o,s+1))return;const a={cached:Math.floor(Date.now()/za),provider:e.provider,data:t};return mi(o,Gr+s.toString(),JSON.stringify(a))}t.lastModified&&!dm(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Ja(){}function mm(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,tm(e)}))}function hm(e){const t=[],r=[];return e.forEach(n=>{(n.match(Fa)?t:r).push(n)}),{valid:t,invalid:r}}function Qr(e,t,r,n){function o(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!si(e,r).length){o();return}n&&pm(e,r)}catch(i){console.error(i)}o(),mm(e)}function Xa(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function gm(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){Xa(e.loadIcons(o,n,r),c=>{Qr(e,o,c,!1)});return}if(i){o.forEach(c=>{const f=i(c,n,r);Xa(f,h=>{const p=h?{prefix:n,icons:{[c]:h}}:null;Qr(e,[c],p,!1)})});return}const{valid:s,invalid:a}=hm(o);if(a.length&&Qr(e,a,null,!1),!s.length)return;const l=n.match(Fa)?li(r):null;if(!l){Qr(e,s,null,!1);return}l.prepare(r,n,s).forEach(c=>{lm(r,c,f=>{Qr(e,c.icons,f,!0)})})}))}const ym=(e,t)=>{const r=om(e,!0,ja()),n=em(r);if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,Ja)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return n.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,i.push(or(u,c));const f=o[u]||(o[u]=Object.create(null));f[c]||(f[c]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=or(u,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),o[u][c].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&gm(l,u)}),t?nm(t,n,i):Ja};function bm(e,t){const r={...e};for(const n in t){const o=t[n],i=typeof o;n in Na?(o===null||o&&(i==="string"||i==="number"))&&(r[n]=o):i===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const xm=/[\s,]+/;function vm(e,t){t.split(xm).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function wm(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-r.length));return isNaN(i)?0:(i=i/o,i%1===0?n(i):0)}}return t}function Em(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Tm(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function _m(e){return"data:image/svg+xml,"+Tm(e)}function Sm(e){return'url("'+_m(e)+'")'}let Zr;function km(){try{Zr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Zr=null}}function Cm(e){return Zr===void 0&&km(),Zr?Zr.createHTML(e):e}const Ga={...Pa,inline:!1},Om={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Fm={display:"inline-block"},bi={backgroundColor:"currentColor"},Qa={backgroundColor:"transparent"},Za={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},el={WebkitMask:bi,mask:bi,background:Qa};for(const e in el){const t=el[e];for(const r in Za)t[e+r]=Za[r]}const Am={...Ga,inline:!0};function tl(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const jm=(e,t,r)=>{const n=t.inline?Am:Ga,o=bm(n,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?Om:{}};if(r){const x=Hn(r,!1,!0);if(x){const b=["iconify"],v=["provider","prefix"];for(const w of v)x[w]&&b.push("iconify--"+x[w]);l.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=b;break;case"className":l[x]=(l[x]?l[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&vm(o,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?o[x]=wm(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete l["aria-hidden"];break;default:n[x]===void 0&&(l[x]=b)}}const u=Up(e,o),c=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,c);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Cm(Wp(u.body,b?()=>b+"ID"+x++:"iconifyReact"))},m.createElement("svg",l)}const{body:f,width:h,height:p}=e,d=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=Em(f,{...c,width:h+"",height:p+""});return l.style={...s,"--svg":Sm(g),width:tl(c.width),height:tl(c.height),...Fm,...d?bi:Qa,...a},m.createElement("span",l)};if(ja(!0),Kp("",Zp),typeof document<"u"&&typeof window<"u"){Ya();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Lp(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;Yp(r,o)||console.error(n)}catch{console.error(n)}}}}function rl(e){const[t,r]=m.useState(!!e.ssr),[n,o]=m.useState({});function i(p){if(p){const d=e.icon;if(typeof d=="object")return{name:"",data:d};const g=$a(d);if(g)return{name:d,data:g}}return{name:""}}const[s,a]=m.useState(i(!!e.ssr));function l(){const p=n.callback;p&&(p(),o({}))}function u(p){if(JSON.stringify(s)!==JSON.stringify(p))return l(),a(p),!0}function c(){var p;const d=e.icon;if(typeof d=="object"){u({name:"",data:d});return}const g=$a(d);if(u({name:d,data:g}))if(g===void 0){const x=ym([d],c);o({callback:x})}else g&&((p=e.onLoad)===null||p===void 0||p.call(e,d))}m.useEffect(()=>(r(!0),l),[]),m.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=s;return h?jm({...ni,...h},e,f):e.children?e.children:m.createElement("span",{})}const $m=m.forwardRef((e,t)=>rl({...e,_ref:t}));m.forwardRef((e,t)=>rl({inline:!0,...e,_ref:t}));function Be({icon:e,iconClass:t}){return y.jsx(y.Fragment,{children:y.jsx($m,{icon:e,className:t})})}const Cr=({text:e="",isDisabled:t=!1,isLoading:r=!1,btnClass:n="bg-primary-500 text-white",icon:o="",iconPosition:i="left",iconClass:s="text-[20px]",loadingClass:a="",link:l="",div:u=!1,type:c="button",style:f,onClick:h})=>{const p=`
43
+ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=or(),h;h=f;let m=h.pathname||"/",d=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");d="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=pa(e,{pathname:d});return Lt(c||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Lt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ld(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:It([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:It([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n)}function $d(){let e=Bd(),t=_d(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:o},r):null,s)}var Nd=A.createElement($d,null),Pd=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?A.createElement(Rt.Provider,{value:this.props.routeContext},A.createElement(Xo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Dd({routeContext:e,match:t,children:r}){let n=A.useContext(kr);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Rt.Provider,{value:e},r)}function Ld(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);Ie(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let u=o[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=r,h=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,u,c)=>{let f,h=!1,m=null,d=null;r&&(f=i&&u.route.id?i[u.route.id]:void 0,m=u.route.errorElement||Nd,s&&(a<0&&c===0?(_a("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):a===c&&(h=!0,d=u.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,c+1)),x=()=>{let b;return f?b=m:h?b=d:u.route.Component?b=A.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=l,A.createElement(Dd,{match:u,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:b})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?A.createElement(Pd,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}function Zo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Id(e){let t=A.useContext(kr);return Ie(t,Zo(e)),t}function Md(e){let t=A.useContext(In);return Ie(t,Zo(e)),t}function Rd(e){let t=A.useContext(Rt);return Ie(t,Zo(e)),t}function Qo(e){let t=Rd(e),r=t.matches[t.matches.length-1];return Ie(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Vd(){return Qo("useRouteId")}function Bd(){var n;let e=A.useContext(Xo),t=Md("useRouteError"),r=Qo("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Ud(){let{router:e}=Id("useNavigate"),t=Qo("useNavigate"),r=A.useRef(!1);return Ea(()=>{r.current=!0}),A.useCallback(async(o,i={})=>{Lt(r.current,wa),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Ta={};function _a(e,t,r){!t&&!Ta[e]&&(Ta[e]=!0,Lt(!1,r))}A.memo(zd);function zd({routes:e,future:t,state:r}){return jd(e,void 0,r,t)}var Rn="get",Vn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function qd(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function Hd(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function Wd(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function Kd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yd(e,t){return e.button===0&&(!t||t==="_self")&&!Kd(e)}var Un=null;function Jd(){if(Un===null)try{new FormData(document.createElement("form"),0),Un=!1}catch{Un=!0}return Un}var Gd=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ei(e){return e!=null&&!Gd.has(e)?(Lt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vn}"`),null):e}function Xd(e,t){let r,n,o,i,s;if(Hd(e)){let a=e.getAttribute("action");n=a?nr(a,t):null,r=e.getAttribute("method")||Rn,o=ei(e.getAttribute("enctype"))||Vn,i=new FormData(e)}else if(qd(e)||Wd(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?nr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Rn,o=ei(e.getAttribute("formenctype"))||ei(a.getAttribute("enctype"))||Vn,i=new FormData(a,e),!Jd()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Rn,n=null,o=Vn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function ti(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Zd(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qd(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ep(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await Zd(i,r);return s.links?s.links():[]}return[]}));return op(n.flat(1).filter(Qd).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Sa(e,t,r,n,o,i){let s=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>s(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var f;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function tp(e,t){return rp(e.map(r=>{let n=t.routes[r.route.id];if(!n)return[];let o=[n.module];return n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function rp(e){return[...new Set(e)]}function np(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function op(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(np(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function ip(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function sp(){let e=A.useContext(kr);return ti(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ap(){let e=A.useContext(In);return ti(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ri=A.createContext(void 0);ri.displayName="FrameworkContext";function Ca(){let e=A.useContext(ri);return ti(e,"You must render this element inside a <HydratedRouter> element"),e}function lp(e,t){let r=A.useContext(ri),[n,o]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let y=b=>{b.forEach(w=>{s(w.isIntersecting)})},x=new IntersectionObserver(y,{threshold:.5});return h.current&&x.observe(h.current),()=>{x.disconnect()}}},[e]),A.useEffect(()=>{if(n){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[n]);let m=()=>{o(!0)},d=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Xr(a,m),onBlur:Xr(l,d),onMouseEnter:Xr(u,m),onMouseLeave:Xr(c,d),onTouchStart:Xr(f,m)}]:[!1,h,{}]}function Xr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function up({page:e,...t}){let{router:r}=sp(),n=A.useMemo(()=>pa(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?A.createElement(fp,{page:e,matches:n,...t}):null}function cp(e){let{manifest:t,routeModules:r}=Ca(),[n,o]=A.useState([]);return A.useEffect(()=>{let i=!1;return ep(e,t,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,r]),n}function fp({page:e,matches:t,...r}){let n=or(),{manifest:o,routeModules:i}=Ca(),{loaderData:s,matches:a}=ap(),l=A.useMemo(()=>Sa(e,t,a,o,n,"data"),[e,t,a,o,n]),u=A.useMemo(()=>Sa(e,t,a,o,n,"assets"),[e,t,a,o,n]),c=A.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let m=new Set,d=!1;if(t.forEach(x=>{var w;let b=o.routes[x.route.id];!b||!b.hasLoader||(!l.some(v=>v.route.id===x.route.id)&&x.route.id in s&&((w=i[x.route.id])!=null&&w.shouldRevalidate)||b.hasClientLoader?d=!0:m.add(x.route.id))}),m.size===0)return[];let y=ip(e);return d&&m.size>0&&y.searchParams.set("_routes",t.filter(x=>m.has(x.route.id)).map(x=>x.route.id).join(",")),[y.pathname+y.search]},[s,n,o,l,t,e,i]),f=A.useMemo(()=>tp(u,o),[u,o]),h=cp(u);return A.createElement(A.Fragment,null,c.map(m=>A.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),f.map(m=>A.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),h.map(({key:m,link:d})=>A.createElement("link",{key:m,...d})))}function dp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var ka=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ka&&(window.__reactRouterVersion="7.1.1")}catch{}var Oa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ni=A.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...h},m){let{basename:d}=A.useContext(Mt),y=typeof u=="string"&&Oa.test(u),x,b=!1;if(typeof u=="string"&&y&&(x=u,ka))try{let j=new URL(window.location.href),D=u.startsWith("//")?new URL(j.protocol+u):new URL(u),N=nr(D.pathname,d);D.origin===j.origin&&N!=null?u=N+D.search+D.hash:b=!0}catch{Lt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=Od(u,{relative:o}),[v,E,k]=lp(n,h),T=gp(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o,viewTransition:f});function C(j){t&&t(j),j.defaultPrevented||T(j)}let O=A.createElement("a",{...h,...k,href:x||w,onClick:b||i?t:C,ref:dp(m,E),target:l,"data-discover":!y&&r==="render"?"true":void 0});return v&&!y?A.createElement(A.Fragment,null,O,A.createElement(up,{page:w})):O});ni.displayName="Link";var pp=A.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...u},c){let f=Gr(s,{relative:u.relative}),h=or(),m=A.useContext(In),{navigator:d,basename:y}=A.useContext(Mt),x=m!=null&&wp(f)&&a===!0,b=d.encodeLocation?d.encodeLocation(f).pathname:f.pathname,w=h.pathname,v=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(w=w.toLowerCase(),v=v?v.toLowerCase():null,b=b.toLowerCase()),v&&y&&(v=nr(v,y)||v);const E=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=w===b||!o&&w.startsWith(b)&&w.charAt(E)==="/",T=v!=null&&(v===b||!o&&v.startsWith(b)&&v.charAt(b.length)==="/"),C={isActive:k,isPending:T,isTransitioning:x},O=k?t:void 0,j;typeof n=="function"?j=n(C):j=[n,k?"active":null,T?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let D=typeof i=="function"?i(C):i;return A.createElement(ni,{...u,"aria-current":O,className:j,ref:c,style:D,to:s,viewTransition:a},typeof l=="function"?l(C):l)});pp.displayName="NavLink";var mp=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Rn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...h},m)=>{let d=xp(),y=vp(a,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&Oa.test(a),w=v=>{if(l&&l(v),v.defaultPrevented)return;v.preventDefault();let E=v.nativeEvent.submitter,k=(E==null?void 0:E.getAttribute("formmethod"))||s;d(E||v.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f})};return A.createElement("form",{ref:m,method:x,action:y,onSubmit:n?l:w,...h,"data-discover":!b&&e==="render"?"true":void 0})});mp.displayName="Form";function hp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fa(e){let t=A.useContext(kr);return Ie(t,hp(e)),t}function gp(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=Fd(),l=or(),u=Gr(e,{relative:i});return A.useCallback(c=>{if(Yd(c,t)){c.preventDefault();let f=r!==void 0?r:Ko(l)===Ko(u);a(e,{replace:f,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,u,r,n,t,e,o,i,s])}var yp=0,bp=()=>`__${String(++yp)}__`;function xp(){let{router:e}=Fa("useSubmit"),{basename:t}=A.useContext(Mt),r=Vd();return A.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:u}=Xd(n,t);if(o.navigate===!1){let c=o.fetcherKey||bp();await e.fetch(c,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function vp(e,{relative:t}={}){let{basename:r}=A.useContext(Mt),n=A.useContext(Rt);Ie(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Gr(e||".",{relative:t})},s=or();if(e==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:It([r,i.pathname])),Ko(i)}function wp(e,t={}){let r=A.useContext(va);Ie(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Fa("useViewTransitionState"),o=Gr(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=nr(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=nr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Ln(o.pathname,s)!=null||Ln(o.pathname,i)!=null}new TextEncoder;const Aa=Object.freeze({left:0,top:0,width:16,height:16}),zn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),oi=Object.freeze({...Aa,...zn}),ii=Object.freeze({...oi,body:"",hidden:!1});function Ep(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function ja(e,t){const r=Ep(e,t);for(const n in ii)n in zn?n in e&&!(n in r)&&(r[n]=zn[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Tp(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(r[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=n[s]&&n[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(r).concat(Object.keys(n)).forEach(i),o}function _p(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=ja(n[a]||o[a],i)}return s(t),r.forEach(s),ja(e,i)}function $a(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Tp(e);for(const o in n){const i=n[o];i&&(t(o,_p(e,o,i)),r.push(o))}return r}const Sp={provider:"",aliases:{},not_found:{},...Aa};function si(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Na(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!si(e,Sp))return null;const r=t.icons;for(const o in r){const i=r[o];if(!o||typeof i.body!="string"||!si(i,ii))return null}const n=t.aliases||Object.create(null);for(const o in n){const i=n[o],s=i.parent;if(!o||typeof s!="string"||!r[s]&&!n[s]||!si(i,ii))return null}return t}const Pa=/^[a-z0-9]+(-[a-z0-9]+)*$/,qn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:n,prefix:l,name:a};return t&&!Hn(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!Hn(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:i};return t&&!Hn(a,r)?null:a}return null},Hn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Da=Object.create(null);function Cp(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ir(e,t){const r=Da[e]||(Da[e]=Object.create(null));return r[t]||(r[t]=Cp(e,t))}function ai(e,t){return Na(t)?$a(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function kp(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Zr=!1;function La(e){return typeof e=="boolean"&&(Zr=e),Zr}function Ia(e){const t=typeof e=="string"?qn(e,!0,Zr):e;if(t){const r=ir(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Op(e,t){const r=qn(e,!0,Zr);if(!r)return!1;const n=ir(r.provider,r.prefix);return t?kp(n,r.name,t):(n.missing.add(r.name),!0)}function Fp(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Zr&&!t&&!e.prefix){let o=!1;return Na(e)&&(e.prefix="",$a(e,(i,s)=>{Op(i,s)&&(o=!0)})),o}const r=e.prefix;if(!Hn({provider:t,prefix:r,name:"a"}))return!1;const n=ir(t,r);return!!ai(n,e)}const Ma=Object.freeze({width:null,height:null}),Ra=Object.freeze({...Ma,...zn}),Ap=/(-?[0-9.]*[0-9]+[0-9.]*)/g,jp=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Va(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(Ap);if(n===null||!n.length)return e;const o=[];let i=n.shift(),s=jp.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*r)/r)}else o.push(i);if(i=n.shift(),i===void 0)return o.join("");s=!s}}function $p(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;r+=e.slice(o+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function Np(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Pp(e,t,r){const n=$p(e);return Np(n.defs,t+n.content+r)}const Dp=e=>e==="unset"||e==="undefined"||e==="none";function Lp(e,t){const r={...oi,...e},n={...Ra,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(y=>{const x=[],b=y.hFlip,w=y.vFlip;let v=y.rotate;b?w?v+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):w&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let E;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:E=o.height/2+o.top,x.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:E=o.width/2+o.left,x.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}v%2===1&&(o.left!==o.top&&(E=o.left,o.left=o.top,o.top=E),o.width!==o.height&&(E=o.width,o.width=o.height,o.height=E)),x.length&&(i=Pp(i,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=n.width,a=n.height,l=o.width,u=o.height;let c,f;s===null?(f=a===null?"1em":a==="auto"?u:a,c=Va(f,l/u)):(c=s==="auto"?l:s,f=a===null?Va(c,u/l):a==="auto"?u:a);const h={},m=(y,x)=>{Dp(x)||(h[y]=x.toString())};m("width",c),m("height",f);const d=[o.left,o.top,l,u];return h.viewBox=d.join(" "),{attributes:h,viewBox:d,body:i}}const Ip=/\sid="(\S+)"/g,Mp="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Rp=0;function Vp(e,t=Mp){const r=[];let n;for(;n=Ip.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{const s=typeof t=="function"?t(i):t+(Rp++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const li=Object.create(null);function Bp(e,t){li[e]=t}function ui(e){return li[e]||li[""]}function ci(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const fi=Object.create(null),Qr=["https://api.simplesvg.com","https://api.unisvg.com"],Wn=[];for(;Qr.length>0;)Qr.length===1||Math.random()>.5?Wn.push(Qr.shift()):Wn.push(Qr.pop());fi[""]=ci({resources:["https://api.iconify.design"].concat(Wn)});function Up(e,t){const r=ci(t);return r===null?!1:(fi[e]=r,!0)}function di(e){return fi[e]}let Ba=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function zp(e,t){const r=di(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";n=r.maxURL-o-r.path.length-i.length}return n}function qp(e){return e===404}const Hp=(e,t,r)=>{const n=[],o=zp(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return r.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),n.push(s),n};function Wp(e){if(typeof e=="string"){const t=di(e);if(t)return t.path}return"/"}const Kp={prepare:Hp,send:(e,t,r)=>{if(!Ba){r("abort",424);return}let n=Wp(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});n+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let o=503;Ba(e+n).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{r(qp(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?r("abort",i):r("next",o)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",o)})}};function Yp(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const i=o.provider,s=o.prefix,a=o.name,l=r[i]||(r[i]=Object.create(null)),u=l[s]||(l[s]=ir(i,s));let c;a in u.icons?c=t.loaded:s===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:i,prefix:s,name:a};c.push(f)}),t}function Ua(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function Jp(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:n,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),s.pending.length!==a&&(r||Ua([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let Gp=0;function Xp(e,t,r){const n=Gp++,o=Ua.bind(null,r,n);if(!t.pending.length)return o;const i={id:n,icons:t,callback:e,abort:o};return r.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function Zp(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const i=typeof o=="string"?qn(o,t,r):o;i&&n.push(i)}),n}var Qp={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function em(e,t,r,n){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let T=e.resources.slice(0);for(s=[];T.length>1;){const C=Math.floor(Math.random()*T.length);s.push(T[C]),T=T.slice(0,C).concat(T.slice(C+1))}s=s.concat(T)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,c,f=null,h=[],m=[];typeof n=="function"&&m.push(n);function d(){f&&(clearTimeout(f),f=null)}function y(){l==="pending"&&(l="aborted"),d(),h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function x(T,C){C&&(m=[]),typeof T=="function"&&m.push(T)}function b(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:x,abort:y}}function w(){l="failed",m.forEach(T=>{T(void 0,c)})}function v(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function E(T,C,O){const j=C!=="success";switch(h=h.filter(D=>D!==T),l){case"pending":break;case"failed":if(j||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=O,w();return}if(j){c=O,h.length||(s.length?k():w());return}if(d(),v(),!e.random){const D=e.resources.indexOf(T.resource);D!==-1&&D!==e.index&&(e.index=D)}l="completed",m.forEach(D=>{D(O)})}function k(){if(l!=="pending")return;d();const T=s.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{d(),l==="pending"&&(v(),w())},e.timeout);return}w();return}const C={status:"pending",resource:T,callback:(O,j)=>{E(C,O,j)}};h.push(C),u++,f=setTimeout(k,e.rotate),r(T,t,C.callback)}return setTimeout(k),b}function za(e){const t={...Qp,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,l,u){const c=em(t,a,l,(f,h)=>{n(),u&&u(f,h)});return r.push(c),c}function i(a){return r.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function qa(){}const pi=Object.create(null);function tm(e){if(!pi[e]){const t=di(e);if(!t)return;const r=za(t),n={config:t,redundancy:r};pi[e]=n}return pi[e]}function rm(e,t,r){let n,o;if(typeof e=="string"){const i=ui(e);if(!i)return r(void 0,424),qa;o=i.send;const s=tm(e);s&&(n=s.redundancy)}else{const i=ci(e);if(i){n=za(i);const s=e.resources?e.resources[0]:"",a=ui(s);a&&(o=a.send)}}return!n||!o?(r(void 0,424),qa):n.query(t,o,r)().abort}const Ha="iconify2",en="iconify",Wa=en+"-count",Ka=en+"-version",Ya=36e5,nm=168,om=50;function mi(e,t){try{return e.getItem(t)}catch{}}function hi(e,t,r){try{return e.setItem(t,r),!0}catch{}}function Ja(e,t){try{e.removeItem(t)}catch{}}function gi(e,t){return hi(e,Wa,t.toString())}function yi(e){return parseInt(mi(e,Wa))||0}const Kn={local:!0,session:!0},Ga={local:new Set,session:new Set};let bi=!1;function im(e){bi=e}let Yn=typeof window>"u"?{}:window;function Xa(e){const t=e+"Storage";try{if(Yn&&Yn[t]&&typeof Yn[t].length=="number")return Yn[t]}catch{}Kn[e]=!1}function Za(e,t){const r=Xa(e);if(!r)return;const n=mi(r,Ka);if(n!==Ha){if(n){const a=yi(r);for(let l=0;l<a;l++)Ja(r,en+l.toString())}hi(r,Ka,Ha),gi(r,0);return}const o=Math.floor(Date.now()/Ya)-nm,i=a=>{const l=en+a.toString(),u=mi(r,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}Ja(r,l)}};let s=yi(r);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,gi(r,s)):Ga[e].add(a))}function Qa(){if(!bi){im(!0);for(const e in Kn)Za(e,t=>{const r=t.data,n=t.provider,o=r.prefix,i=ir(n,o);if(!ai(i,r).length)return!1;const s=r.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function sm(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in Kn)Za(n,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function am(e,t){bi||Qa();function r(n){let o;if(!Kn[n]||!(o=Xa(n)))return;const i=Ga[n];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=yi(o),s>=om||!gi(o,s+1))return;const a={cached:Math.floor(Date.now()/Ya),provider:e.provider,data:t};return hi(o,en+s.toString(),JSON.stringify(a))}t.lastModified&&!sm(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function el(){}function lm(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Jp(e)}))}function um(e){const t=[],r=[];return e.forEach(n=>{(n.match(Pa)?t:r).push(n)}),{valid:t,invalid:r}}function tn(e,t,r,n){function o(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!ai(e,r).length){o();return}n&&am(e,r)}catch(i){console.error(i)}o(),lm(e)}function tl(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function cm(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){tl(e.loadIcons(o,n,r),c=>{tn(e,o,c,!1)});return}if(i){o.forEach(c=>{const f=i(c,n,r);tl(f,h=>{const m=h?{prefix:n,icons:{[c]:h}}:null;tn(e,[c],m,!1)})});return}const{valid:s,invalid:a}=um(o);if(a.length&&tn(e,a,null,!1),!s.length)return;const l=n.match(Pa)?ui(r):null;if(!l){tn(e,s,null,!1);return}l.prepare(r,n,s).forEach(c=>{rm(r,c,f=>{tn(e,c.icons,f,!0)})})}))}const fm=(e,t)=>{const r=Zp(e,!0,La()),n=Yp(r);if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,el)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return n.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,i.push(ir(u,c));const f=o[u]||(o[u]=Object.create(null));f[c]||(f[c]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=ir(u,c),m=h.pendingIcons||(h.pendingIcons=new Set);m.has(f)||(m.add(f),o[u][c].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&cm(l,u)}),t?Xp(t,n,i):el};function dm(e,t){const r={...e};for(const n in t){const o=t[n],i=typeof o;n in Ma?(o===null||o&&(i==="string"||i==="number"))&&(r[n]=o):i===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const pm=/[\s,]+/;function mm(e,t){t.split(pm).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function hm(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-r.length));return isNaN(i)?0:(i=i/o,i%1===0?n(i):0)}}return t}function gm(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function ym(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function bm(e){return"data:image/svg+xml,"+ym(e)}function xm(e){return'url("'+bm(e)+'")'}let rn;function vm(){try{rn=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{rn=null}}function wm(e){return rn===void 0&&vm(),rn?rn.createHTML(e):e}const rl={...Ra,inline:!1},Em={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Tm={display:"inline-block"},xi={backgroundColor:"currentColor"},nl={backgroundColor:"transparent"},ol={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},il={WebkitMask:xi,mask:xi,background:nl};for(const e in il){const t=il[e];for(const r in ol)t[e+r]=ol[r]}const _m={...rl,inline:!0};function sl(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Sm=(e,t,r)=>{const n=t.inline?_m:rl,o=dm(n,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?Em:{}};if(r){const x=qn(r,!1,!0);if(x){const b=["iconify"],w=["provider","prefix"];for(const v of w)x[v]&&b.push("iconify--"+x[v]);l.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=b;break;case"className":l[x]=(l[x]?l[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&mm(o,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?o[x]=hm(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete l["aria-hidden"];break;default:n[x]===void 0&&(l[x]=b)}}const u=Lp(e,o),c=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,c);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:wm(Vp(u.body,b?()=>b+"ID"+x++:"iconifyReact"))},p.createElement("svg",l)}const{body:f,width:h,height:m}=e,d=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),y=gm(f,{...c,width:h+"",height:m+""});return l.style={...s,"--svg":xm(y),width:sl(c.width),height:sl(c.height),...Tm,...d?xi:nl,...a},p.createElement("span",l)};if(La(!0),Bp("",Kp),typeof document<"u"&&typeof window<"u"){Qa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Fp(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;Up(r,o)||console.error(n)}catch{console.error(n)}}}}function al(e){const[t,r]=p.useState(!!e.ssr),[n,o]=p.useState({});function i(m){if(m){const d=e.icon;if(typeof d=="object")return{name:"",data:d};const y=Ia(d);if(y)return{name:d,data:y}}return{name:""}}const[s,a]=p.useState(i(!!e.ssr));function l(){const m=n.callback;m&&(m(),o({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return l(),a(m),!0}function c(){var m;const d=e.icon;if(typeof d=="object"){u({name:"",data:d});return}const y=Ia(d);if(u({name:d,data:y}))if(y===void 0){const x=fm([d],c);o({callback:x})}else y&&((m=e.onLoad)===null||m===void 0||m.call(e,d))}p.useEffect(()=>(r(!0),l),[]),p.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=s;return h?Sm({...oi,...h},e,f):e.children?e.children:p.createElement("span",{})}const Cm=p.forwardRef((e,t)=>al({...e,_ref:t}));p.forwardRef((e,t)=>al({inline:!0,...e,_ref:t}));function Me({icon:e,iconClass:t}){return g.jsx(g.Fragment,{children:g.jsx(Cm,{icon:e,className:t})})}const Or=({text:e="",isDisabled:t=!1,isLoading:r=!1,btnClass:n="bg-primary-500 text-white",icon:o="",iconPosition:i="left",iconClass:s="text-[20px]",loadingClass:a="",link:l="",div:u=!1,type:c="button",style:f,onClick:h})=>{const m=`
44
44
  btn inline-flex justify-center
45
45
  ${r?" pointer-events-none":""}
46
46
  ${t?" opacity-40 cursor-not-allowed":""}
47
47
  ${n}
48
- `,d=()=>r?y.jsxs(y.Fragment,{children:[y.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${a}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):y.jsxs("span",{className:"flex items-center",children:[o&&i==="left"&&y.jsx("span",{className:`mr-2 ${s}`,children:y.jsx(Be,{icon:o})}),e&&y.jsx("span",{children:e}),o&&i==="right"&&y.jsx("span",{className:`ml-2 ${s}`,children:y.jsx(Be,{icon:o})})]});return u?y.jsx("div",{className:p,children:d()}):l?y.jsx(ri,{to:l,className:p,children:d()}):y.jsx("button",{disabled:t,type:c,className:p,"data-testid":"btn",onClick:h,style:f,children:d()})},Ie=[];for(let e=0;e<256;++e)Ie.push((e+256).toString(16).slice(1));function Nm(e,t=0){return(Ie[e[t+0]]+Ie[e[t+1]]+Ie[e[t+2]]+Ie[e[t+3]]+"-"+Ie[e[t+4]]+Ie[e[t+5]]+"-"+Ie[e[t+6]]+Ie[e[t+7]]+"-"+Ie[e[t+8]]+Ie[e[t+9]]+"-"+Ie[e[t+10]]+Ie[e[t+11]]+Ie[e[t+12]]+Ie[e[t+13]]+Ie[e[t+14]]+Ie[e[t+15]]).toLowerCase()}let xi;const Pm=new Uint8Array(16);function Lm(){if(!xi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");xi=crypto.getRandomValues.bind(crypto)}return xi(Pm)}const nl={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function en(e,t,r){if(nl.randomUUID&&!t&&!e)return nl.randomUUID();e=e||{};const n=e.random||(e.rng||Lm)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Nm(n)}const mt=m.createContext(void 0),ol={title:"",description:"",id:en(),questionData:[]},Dm=({children:e})=>{const[t,r]=m.useState({}),[n,o]=m.useState([ol]),[i,s]=m.useState(!1),[a,l]=m.useState(null),u=m.useCallback(()=>{},[]),c=m.useCallback(()=>{const v=en();o(w=>[...w,{...ol,id:v}]),l(v)},[]),f=m.useCallback(v=>{o(w=>w.filter(_=>_.id!==v))},[]),h=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:k.questionData.filter(S=>S.id!==v)}:k))},[]),p=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:v}:k))},[]),d=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:[...k.questionData,v]}:k))},[]),g=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:k.questionData.map(S=>S.id===v.id?{...S,...v}:S)}:k))},[]),x=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,...v}:k))},[]),b=m.useMemo(()=>({formData:n,setFormData:o,handleDragStop:u,removeElement:h,elementData:t,setElementData:r,updateElementPosition:p,addElement:d,updateElement:g,addSection:c,removeSection:f,updateSection:x,isDragging:i,setIsDragging:s,selectedSection:a,setSelectedSection:l}),[n,u,h,t,p,d,g,c,f,x,i,a]);return y.jsx(mt.Provider,{value:b,children:e})},Jn=e=>{const t=typeof window<"u"?localStorage.getItem(e):"";try{return JSON.parse(t)}catch{return t}},il=(e,t)=>{const r=typeof t!="string"?JSON.stringify(t):t;return localStorage.setItem(e,r)};function Im({onSubmit:e}){const{formData:t}=m.useContext(mt),r=Jn("config");function n(){localStorage.setItem("formData",JSON.stringify(t)),e(t),ue.success("Saved successfully")}return y.jsx("div",{className:"px-[30px] py-8 flex justify-end items-center",children:y.jsx(Cr,{onClick:()=>n(),text:"Save Form",style:{background:(r==null?void 0:r.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function sl({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}function Xn({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{children:y.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...r(e==null?void 0:e.id)})})}const al=typeof document<"u"?m.useLayoutEffect:()=>{};function Mm(e){const t=m.useRef(null);return al(()=>{t.current=e},[e]),m.useCallback((...r)=>{const n=t.current;return n==null?void 0:n(...r)},[])}const tn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},ir=e=>e&&"window"in e&&e.window===e?e:tn(e).defaultView||window;function Rm(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Vm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ll(e){let t=null;return()=>(t==null&&(t=e()),t)}const Bm=ll(function(){return Vm(/^Mac/i)}),Um=ll(function(){return Rm(/Android/i)});function zm(e){return e.mozInputSource===0&&e.isTrusted?!0:Um()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Hm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function ul(e){let t=m.useRef({isFocused:!1,observer:null});al(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=Mm(n=>{e==null||e(n)});return m.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{t.current.isFocused=!1,o.disabled&&r(new Hm("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function qm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=m.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=ul(i),a=m.useCallback(l=>{const u=tn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}let rn=null,vi=new Set,nn=new Map,sr=!1,wi=!1;const Wm={Tab:!0,Escape:!0};function Ei(e,t){for(let r of vi)r(e,t)}function Km(e){return!(e.metaKey||!Bm()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Gn(e){sr=!0,Km(e)&&(rn="keyboard",Ei("keyboard",e))}function ct(e){rn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sr=!0,Ei("pointer",e))}function cl(e){zm(e)&&(sr=!0,rn="virtual")}function fl(e){e.target===window||e.target===document||(!sr&&!wi&&(rn="virtual",Ei("virtual",e)),sr=!1,wi=!1)}function dl(){sr=!1,wi=!0}function Ti(e){if(typeof window>"u"||nn.get(ir(e)))return;const t=ir(e),r=tn(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sr=!0,n.apply(this,arguments)},r.addEventListener("keydown",Gn,!0),r.addEventListener("keyup",Gn,!0),r.addEventListener("click",cl,!0),t.addEventListener("focus",fl,!0),t.addEventListener("blur",dl,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",ct,!0),r.addEventListener("pointermove",ct,!0),r.addEventListener("pointerup",ct,!0)):(r.addEventListener("mousedown",ct,!0),r.addEventListener("mousemove",ct,!0),r.addEventListener("mouseup",ct,!0)),t.addEventListener("beforeunload",()=>{pl(e)},{once:!0}),nn.set(t,{focus:n})}const pl=(e,t)=>{const r=ir(e),n=tn(e);t&&n.removeEventListener("DOMContentLoaded",t),nn.has(r)&&(r.HTMLElement.prototype.focus=nn.get(r).focus,n.removeEventListener("keydown",Gn,!0),n.removeEventListener("keyup",Gn,!0),n.removeEventListener("click",cl,!0),r.removeEventListener("focus",fl,!0),r.removeEventListener("blur",dl,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",ct,!0),n.removeEventListener("pointermove",ct,!0),n.removeEventListener("pointerup",ct,!0)):(n.removeEventListener("mousedown",ct,!0),n.removeEventListener("mousemove",ct,!0),n.removeEventListener("mouseup",ct,!0)),nn.delete(r))};function Ym(e){const t=tn(e);let r;return t.readyState!=="loading"?Ti(e):(r=()=>{Ti(e)},t.addEventListener("DOMContentLoaded",r)),()=>pl(e,r)}typeof document<"u"&&Ym();function ml(){return rn!=="pointer"}const Jm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xm(e,t,r){var n;const o=typeof window<"u"?ir(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?ir(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?ir(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?ir(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||(r==null?void 0:r.target)instanceof o&&!Jm.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof s&&(r==null?void 0:r.target.isContentEditable),!(e&&t==="keyboard"&&r instanceof a&&!Wm[r.key])}function Gm(e,t,r){Ti(),m.useEffect(()=>{let n=(o,i)=>{Xm(!!(r!=null&&r.isTextInput),o,i)&&e(ml())};return vi.add(n),()=>{vi.delete(n)}},t)}function Qm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=m.useRef({isFocusWithin:!1}),s=m.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),o&&o(!1))},[r,o,i]),a=ul(s),l=m.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[n,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Qn=!1,_i=0;function Si(){Qn=!0,setTimeout(()=>{Qn=!1},50)}function hl(e){e.pointerType==="touch"&&Si()}function Zm(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",hl):document.addEventListener("touchend",Si),_i++,()=>{_i--,!(_i>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",hl):document.removeEventListener("touchend",Si))}}function eh(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=m.useState(!1),a=m.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;m.useEffect(Zm,[]);let{hoverProps:l,triggerHoverEnd:u}=m.useMemo(()=>{let c=(p,d)=>{if(a.pointerType=d,o||d==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let g=p.currentTarget;a.target=g,t&&t({type:"hoverstart",target:g,pointerType:d}),r&&r(!0),s(!0)},f=(p,d)=>{if(a.pointerType="",a.target=null,d==="touch"||!a.isHovered)return;a.isHovered=!1;let g=p.currentTarget;n&&n({type:"hoverend",target:g,pointerType:d}),r&&r(!1),s(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{Qn&&p.pointerType==="mouse"||c(p,p.pointerType)},h.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!Qn&&c(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,r,n,o,a]);return m.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function th(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=m.useRef({isFocused:!1,isFocusVisible:t||ml()}),[i,s]=m.useState(!1),[a,l]=m.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=m.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=m.useCallback(p=>{o.current.isFocused=p,s(p),u()},[u]);Gm(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:r});let{focusProps:f}=qm({isDisabled:n,onFocusChange:c}),{focusWithinProps:h}=Qm({isDisabled:!n,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:n?h:f}}var rh=Object.defineProperty,nh=(e,t,r)=>t in e?rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>(nh(e,typeof t!="symbol"?t+"":t,r),r);let oh=class{constructor(){ki(this,"current",this.detect()),ki(this,"handoffState","pending"),ki(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ar=new oh;function on(e){return ar.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function gl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Rt(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return gl(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Rt();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function lr(){let[e]=m.useState(Rt);return m.useEffect(()=>()=>e.dispose(),[e]),e}let he=(e,t)=>{ar.isServer?m.useEffect(e,t):m.useLayoutEffect(e,t)};function ur(e){let t=m.useRef(e);return he(()=>{t.current=e},[e]),t}let te=function(e){let t=ur(e);return m.useCallback((...r)=>t.current(...r),[t])};function ih(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function sh(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function ah({disabled:e=!1}={}){let t=m.useRef(null),[r,n]=m.useState(!1),o=lr(),i=te(()=>{t.current=null,n(!1),o.dispose()}),s=te(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=on(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let c=ih(u);n(sh(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let lh=m.createContext(void 0);function Ci(){return m.useContext(lh)}function Oi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ht(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ht),n}var Zn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Zn||{}),Wt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wt||{});function ot(){let e=ch();return m.useCallback(t=>uh({mergeRefs:e,...t}),[e])}function uh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??fh;let l=yl(t,e);if(i)return eo(l,r,n,s,a);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return eo(f,r,n,s,a)}if(u&1){let{unmount:c=!0,...f}=l;return ht(c?0:1,{0(){return null},1(){return eo({...f,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return eo(l,r,n,s,a)}function eo(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Fi(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let h=!1,p=[];for(let[d,g]of Object.entries(t))typeof g=="boolean"&&(h=!0),g===!0&&p.push(d.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let d of p)f[`data-${d}`]=""}}if(i===m.Fragment&&(Object.keys(Kt(l)).length>0||Object.keys(Kt(f)).length>0))if(!m.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Kt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Kt(l)).concat(Object.keys(Kt(f))).map(h=>` - ${h}`).join(`
48
+ `,d=()=>r?g.jsxs(g.Fragment,{children:[g.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${a}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):g.jsxs("span",{className:"flex items-center",children:[o&&i==="left"&&g.jsx("span",{className:`mr-2 ${s}`,children:g.jsx(Me,{icon:o})}),e&&g.jsx("span",{children:e}),o&&i==="right"&&g.jsx("span",{className:`ml-2 ${s}`,children:g.jsx(Me,{icon:o})})]});return u?g.jsx("div",{className:m,children:d()}):l?g.jsx(ni,{to:l,className:m,children:d()}):g.jsx("button",{disabled:t,type:c,className:m,"data-testid":"btn",onClick:h,style:f,children:d()})},Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function km(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}let vi;const Om=new Uint8Array(16);function Fm(){if(!vi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vi=crypto.getRandomValues.bind(crypto)}return vi(Om)}const ll={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Qe(e,t,r){if(ll.randomUUID&&!t&&!e)return ll.randomUUID();e=e||{};const n=e.random||(e.rng||Fm)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,km(n)}const ft=p.createContext(void 0),ul={title:"",description:"",id:Qe(),questionData:[]},cl=({children:e})=>{const[t,r]=p.useState({}),[n,o]=p.useState([ul]),[i,s]=p.useState(!1),[a,l]=p.useState(null),[u,c]=p.useState([0]),f=p.useCallback(()=>{},[]),h=p.useCallback(()=>{const T=Qe();o(C=>[...C,{...ul,id:T}]),l(T),c([n.length])},[n]),m=p.useCallback(T=>{o(C=>C.filter(O=>O.id!==T)),l(null)},[]),d=p.useCallback((T,C)=>{const O=n.find(D=>D.id===C),j=O==null?void 0:O.questionData.find(D=>D.id===T);j&&o(D=>D.map(N=>N.id===C?{...N,questionData:N.questionData.filter(L=>j.type==="grid"?L.gridId!==j.id&&L.id!==j.id:L.id!==T)}:N))},[n,o]),y=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,questionData:T}:j))},[]),x=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,questionData:[...j.questionData,T]}:j))},[]),b=p.useCallback((T,C,O)=>{o(j=>j.map(D=>D.id===C?{...D,questionData:[...D.questionData.slice(0,O),T,...D.questionData.slice(O)]}:D))},[]),w=p.useCallback((T,C,O)=>{o(j=>j.map(D=>D.id===O?{...D,questionData:D.questionData.map(N=>N.type==="grid"&&N.gridData?{...N,gridData:N.gridData.map((L,R)=>R===T?{...L,...C}:L).concat(T>=N.gridData.length?{...C}:[])}:N)}:D))},[]),v=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,questionData:j.questionData.map(D=>D.id===T.id?{...D,...T}:D)}:j))},[]),E=p.useCallback((T,C)=>{o(O=>O.map(j=>j.id===C?{...j,...T}:j))},[]);p.useEffect(()=>{console.log("Form Data Updated:",n)},[n]);const k=p.useMemo(()=>({formData:n,setFormData:o,handleDragStop:f,removeElement:d,elementData:t,setElementData:r,updateElementPosition:y,addElement:x,addElementInPosition:b,updateElement:v,addSection:h,removeSection:m,updateSection:E,isDragging:i,setIsDragging:s,selectedSection:a,setSelectedSection:l,activeSections:u,setActiveSections:c,updateGridElement:w}),[n,f,d,t,y,x,b,v,h,m,E,i,a,u,w]);return g.jsx(ft.Provider,{value:k,children:e})},Jn=e=>{const t=typeof window<"u"?localStorage.getItem(e):"";try{return JSON.parse(t)}catch{return t}},fl=(e,t)=>{const r=typeof t!="string"?JSON.stringify(t):t;return localStorage.setItem(e,r)};function Am({onSubmit:e}){const{formData:t}=p.useContext(ft),r=Jn("config");function n(){localStorage.setItem("formData",JSON.stringify(t)),e(t),ce.success("Saved successfully")}return g.jsx("div",{className:"px-[30px] py-4 flex justify-end items-center",children:g.jsx(Or,{onClick:()=>n(),text:"Save Form",style:{background:(r==null?void 0:r.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function jm({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:ue("input-control",e==null?void 0:e.customClass),...r(e.id)})}function dl({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{children:g.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:ue("input-control",e==null?void 0:e.customClass),...r(e==null?void 0:e.id)})})}const pl=typeof document<"u"?p.useLayoutEffect:()=>{};function $m(e){const t=p.useRef(null);return pl(()=>{t.current=e},[e]),p.useCallback((...r)=>{const n=t.current;return n==null?void 0:n(...r)},[])}const nn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},sr=e=>e&&"window"in e&&e.window===e?e:nn(e).defaultView||window;function Nm(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Pm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ml(e){let t=null;return()=>(t==null&&(t=e()),t)}const Dm=ml(function(){return Pm(/^Mac/i)}),Lm=ml(function(){return Nm(/Android/i)});function Im(e){return e.mozInputSource===0&&e.isTrusted?!0:Lm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Mm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function hl(e){let t=p.useRef({isFocused:!1,observer:null});pl(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=$m(n=>{e==null||e(n)});return p.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{t.current.isFocused=!1,o.disabled&&r(new Mm("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function Rm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=p.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=hl(i),a=p.useCallback(l=>{const u=nn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}let on=null,wi=new Set,sn=new Map,ar=!1,Ei=!1;const Vm={Tab:!0,Escape:!0};function Ti(e,t){for(let r of wi)r(e,t)}function Bm(e){return!(e.metaKey||!Dm()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Gn(e){ar=!0,Bm(e)&&(on="keyboard",Ti("keyboard",e))}function dt(e){on="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ar=!0,Ti("pointer",e))}function gl(e){Im(e)&&(ar=!0,on="virtual")}function yl(e){e.target===window||e.target===document||(!ar&&!Ei&&(on="virtual",Ti("virtual",e)),ar=!1,Ei=!1)}function bl(){ar=!1,Ei=!0}function _i(e){if(typeof window>"u"||sn.get(sr(e)))return;const t=sr(e),r=nn(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ar=!0,n.apply(this,arguments)},r.addEventListener("keydown",Gn,!0),r.addEventListener("keyup",Gn,!0),r.addEventListener("click",gl,!0),t.addEventListener("focus",yl,!0),t.addEventListener("blur",bl,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",dt,!0),r.addEventListener("pointermove",dt,!0),r.addEventListener("pointerup",dt,!0)):(r.addEventListener("mousedown",dt,!0),r.addEventListener("mousemove",dt,!0),r.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{xl(e)},{once:!0}),sn.set(t,{focus:n})}const xl=(e,t)=>{const r=sr(e),n=nn(e);t&&n.removeEventListener("DOMContentLoaded",t),sn.has(r)&&(r.HTMLElement.prototype.focus=sn.get(r).focus,n.removeEventListener("keydown",Gn,!0),n.removeEventListener("keyup",Gn,!0),n.removeEventListener("click",gl,!0),r.removeEventListener("focus",yl,!0),r.removeEventListener("blur",bl,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",dt,!0),n.removeEventListener("pointermove",dt,!0),n.removeEventListener("pointerup",dt,!0)):(n.removeEventListener("mousedown",dt,!0),n.removeEventListener("mousemove",dt,!0),n.removeEventListener("mouseup",dt,!0)),sn.delete(r))};function Um(e){const t=nn(e);let r;return t.readyState!=="loading"?_i(e):(r=()=>{_i(e)},t.addEventListener("DOMContentLoaded",r)),()=>xl(e,r)}typeof document<"u"&&Um();function vl(){return on!=="pointer"}const zm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function qm(e,t,r){var n;const o=typeof window<"u"?sr(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?sr(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?sr(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?sr(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||(r==null?void 0:r.target)instanceof o&&!zm.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof s&&(r==null?void 0:r.target.isContentEditable),!(e&&t==="keyboard"&&r instanceof a&&!Vm[r.key])}function Hm(e,t,r){_i(),p.useEffect(()=>{let n=(o,i)=>{qm(!!(r!=null&&r.isTextInput),o,i)&&e(vl())};return wi.add(n),()=>{wi.delete(n)}},t)}function Wm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),s=p.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),o&&o(!1))},[r,o,i]),a=hl(s),l=p.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[n,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Xn=!1,Si=0;function Ci(){Xn=!0,setTimeout(()=>{Xn=!1},50)}function wl(e){e.pointerType==="touch"&&Ci()}function Km(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",wl):document.addEventListener("touchend",Ci),Si++,()=>{Si--,!(Si>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",wl):document.removeEventListener("touchend",Ci))}}function Ym(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=p.useState(!1),a=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(Km,[]);let{hoverProps:l,triggerHoverEnd:u}=p.useMemo(()=>{let c=(m,d)=>{if(a.pointerType=d,o||d==="touch"||a.isHovered||!m.currentTarget.contains(m.target))return;a.isHovered=!0;let y=m.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:d}),r&&r(!0),s(!0)},f=(m,d)=>{if(a.pointerType="",a.target=null,d==="touch"||!a.isHovered)return;a.isHovered=!1;let y=m.currentTarget;n&&n({type:"hoverend",target:y,pointerType:d}),r&&r(!1),s(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=m=>{Xn&&m.pointerType==="mouse"||c(m,m.pointerType)},h.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,m.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=m=>{!a.ignoreEmulatedMouseEvents&&!Xn&&c(m,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,r,n,o,a]);return p.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function Jm(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||vl()}),[i,s]=p.useState(!1),[a,l]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=p.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=p.useCallback(m=>{o.current.isFocused=m,s(m),u()},[u]);Hm(m=>{o.current.isFocusVisible=m,u()},[],{isTextInput:r});let{focusProps:f}=Rm({isDisabled:n,onFocusChange:c}),{focusWithinProps:h}=Wm({isDisabled:!n,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:n?h:f}}var Gm=Object.defineProperty,Xm=(e,t,r)=>t in e?Gm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>(Xm(e,typeof t!="symbol"?t+"":t,r),r);let Zm=class{constructor(){ki(this,"current",this.detect()),ki(this,"handoffState","pending"),ki(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},lr=new Zm;function an(e){return lr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function El(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Vt(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return El(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Vt();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function ur(){let[e]=p.useState(Vt);return p.useEffect(()=>()=>e.dispose(),[e]),e}let be=(e,t)=>{lr.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function cr(e){let t=p.useRef(e);return be(()=>{t.current=e},[e]),t}let te=function(e){let t=cr(e);return p.useCallback((...r)=>t.current(...r),[t])};function Qm(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function eh(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function th({disabled:e=!1}={}){let t=p.useRef(null),[r,n]=p.useState(!1),o=ur(),i=te(()=>{t.current=null,n(!1),o.dispose()}),s=te(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=an(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let c=Qm(u);n(eh(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let rh=p.createContext(void 0);function Oi(){return p.useContext(rh)}function Fi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gt(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gt),n}var Zn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Zn||{}),Kt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Kt||{});function st(){let e=oh();return p.useCallback(t=>nh({mergeRefs:e,...t}),[e])}function nh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??ih;let l=Tl(t,e);if(i)return Qn(l,r,n,s,a);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return Qn(f,r,n,s,a)}if(u&1){let{unmount:c=!0,...f}=l;return gt(c?0:1,{0(){return null},1(){return Qn({...f,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return Qn(l,r,n,s,a)}function Qn(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Ai(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let h=!1,m=[];for(let[d,y]of Object.entries(t))typeof y=="boolean"&&(h=!0),y===!0&&m.push(d.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(h){f["data-headlessui-state"]=m.join(" ");for(let d of m)f[`data-${d}`]=""}}if(i===p.Fragment&&(Object.keys(Yt(l)).length>0||Object.keys(Yt(f)).length>0))if(!p.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Yt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Yt(l)).concat(Object.keys(Yt(f))).map(h=>` - ${h}`).join(`
49
49
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
50
50
  `)].join(`
51
- `))}else{let h=c.props,p=h==null?void 0:h.className,d=typeof p=="function"?(...b)=>Oi(p(...b),l.className):Oi(p,l.className),g=d?{className:d}:{},x=yl(c.props,Kt(Fi(l,["ref"])));for(let b in f)b in x&&delete f[b];return m.cloneElement(c,Object.assign({},x,f,u,{ref:o(dh(c),u.ref)},g))}return m.createElement(i,Object.assign({},Fi(l,["ref"]),i!==m.Fragment&&u,i!==m.Fragment&&f),c)}function ch(){let e=m.useRef([]),t=m.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function fh(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function yl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let s=r[n];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function bl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let s of i)s==null||s(...o)}});return t}function Qe(e){var t;return Object.assign(m.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Kt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Fi(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function dh(e){return m.version.split(".")[0]>="19"?e.props.ref:e.ref}function ph(e,t,r){let[n,o]=m.useState(r),i=e!==void 0,s=m.useRef(i),a=m.useRef(!1),l=m.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,te(u=>(i||o(u),t==null?void 0:t(u)))]}function mh(e){let[t]=m.useState(e);return t}function xl(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))wl(r,vl(t,n),o);return r}function vl(e,t){return e?e+"["+t+"]":t}function wl(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())wl(e,vl(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):xl(r,t,e)}function hh(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}let gh="span";var Ai=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ai||{});function yh(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ot()({ourProps:i,theirProps:o,slot:{},defaultTag:gh,name:"Hidden"})}let El=Qe(yh),bh=m.createContext(null);function xh({children:e}){let t=m.useContext(bh);if(!t)return m.createElement(m.Fragment,null,e);let{target:r}=t;return r?Tt.createPortal(m.createElement(m.Fragment,null,e),r):null}function vh({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,s]=m.useState(null),a=lr();return m.useEffect(()=>{if(n&&i)return a.addEventListener(i,"reset",n)},[i,t,n]),m.createElement(xh,null,m.createElement(wh,{setForm:s,formId:t}),xl(e).map(([l,u])=>m.createElement(El,{features:Ai.Hidden,...Kt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:l,value:u,...o})})))}function wh({setForm:e,formId:t}){return m.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:m.createElement(El,{features:Ai.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let Eh=m.createContext(void 0);function Tl(){return m.useContext(Eh)}function Th(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&_h(r)?!1:n}function _h(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let _l=Symbol();function Sh(e,t=!0){return Object.assign(e,{[_l]:t})}function ft(...e){let t=m.useRef(e);m.useEffect(()=>{t.current=e},[e]);let r=te(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[_l]))?void 0:r}let ji=m.createContext(null);ji.displayName="DescriptionContext";function Sl(){let e=m.useContext(ji);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Sl),t}return e}function kh(){var e,t;return(t=(e=m.useContext(ji))==null?void 0:e.value)!=null?t:void 0}let Ch="p";function Oh(e,t){let r=m.useId(),n=Ci(),{id:o=`headlessui-description-${r}`,...i}=e,s=Sl(),a=ft(t);he(()=>s.register(o),[o,s.register]);let l=n||!1,u=m.useMemo(()=>({...s.slot,disabled:l}),[s.slot,l]),c={ref:a,...s.props,id:o};return ot()({ourProps:c,theirProps:i,slot:u,defaultTag:Ch,name:s.name||"Description"})}let Fh=Qe(Oh);Object.assign(Fh,{});var Ne=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ne||{});let to=m.createContext(null);to.displayName="LabelContext";function kl(){let e=m.useContext(to);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,kl),t}return e}function Cl(e){var t,r,n;let o=(r=(t=m.useContext(to))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ah({inherit:e=!1}={}){let t=Cl(),[r,n]=m.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,m.useMemo(()=>function(i){let s=te(l=>(n(u=>[...u,l]),()=>n(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),a=m.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return m.createElement(to.Provider,{value:a},i.children)},[n])]}let jh="label";function $h(e,t){var r;let n=m.useId(),o=kl(),i=Tl(),s=Ci(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...c}=e,f=ft(t);he(()=>o.register(a),[a,o.register]);let h=te(x=>{let b=x.currentTarget;if(b instanceof HTMLLabelElement&&x.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(x),b instanceof HTMLLabelElement){let v=document.getElementById(b.htmlFor);if(v){let w=v.getAttribute("disabled");if(w==="true"||w==="")return;let _=v.getAttribute("aria-disabled");if(_==="true"||_==="")return;(v instanceof HTMLInputElement&&(v.type==="radio"||v.type==="checkbox")||v.role==="radio"||v.role==="checkbox"||v.role==="switch")&&v.click(),v.focus({preventScroll:!0})}}}),p=s||!1,d=m.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),g={ref:f,...o.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in c&&delete c.onClick),ot()({ourProps:g,theirProps:c,slot:d,defaultTag:l?jh:"div",name:o.name||"Label"})}let Nh=Qe($h),Ph=Object.assign(Nh,{});function Lh(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Dh(e=Lh){return m.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function Ih(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function Mh(e,t=!1){let[r,n]=m.useReducer(()=>({}),{}),o=m.useMemo(()=>Ih(e),[e,r]);return he(()=>{if(!e)return;let i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Rh=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Ol(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}function Fl(e){return m.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Vh=new Rh(()=>Ol(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function $i(e,t){let r=Vh.get(t),n=m.useId(),o=Fl(r);if(he(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Ni=new Map,sn=new Map;function Al(e){var t;let r=(t=sn.get(e))!=null?t:0;return sn.set(e,r+1),r!==0?()=>jl(e):(Ni.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>jl(e))}function jl(e){var t;let r=(t=sn.get(e))!=null?t:1;if(r===1?sn.delete(e):sn.set(e,r-1),r!==1)return;let n=Ni.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Ni.delete(e))}function Bh(e,{allowed:t,disallowed:r}={}){let n=$i(e,"inert-others");he(()=>{var o,i;if(!n)return;let s=Rt();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&s.add(Al(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=on(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)a.some(h=>f.contains(h))||s.add(Al(f));c=c.parentElement}}return s.dispose},[n,t,r])}function Uh(e,t,r){let n=ur(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});m.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Rt();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}let Pi=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),zh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Li=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Li||{}),Hh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Hh||{}),qh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(qh||{});function $l(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Pi)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Wh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(zh)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Di=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Di||{});function Nl(e,t=0){var r;return e===((r=on(e))==null?void 0:r.body)?!1:ht(t,{0(){return e.matches(Pi)},1(){let n=e;for(;n!==null;){if(n.matches(Pi))return!0;n=n.parentElement}return!1}})}var Kh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Kh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Yh=["textarea","input"].join(",");function Jh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Yh))!=null?r:!1}function Pl(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xh(e,t){return Gh($l(),t,{relativeTo:e})}function Gh(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Pl(e):e:t&64?Wh(e):$l(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===p:d===p))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,h;do{if(c>=f||c+f<=0)return 0;let p=l+c;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=s[p],h==null||h.focus(u),c+=a}while(h!==i.activeElement);return t&6&&Jh(h)&&h.select(),2}function Ll(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Qh(){return/Android/gi.test(window.navigator.userAgent)}function Zh(){return Ll()||Qh()}function an(e,t,r,n){let o=ur(r);m.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function eg(e,t,r,n){let o=ur(r);m.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const Dl=30;function tg(e,t,r){let n=$i(e,"outside-click"),o=ur(r),i=m.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let h of f)if(h!==null&&(h.contains(c)||l.composed&&l.composedPath().includes(h)))return;return!Nl(c,Di.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,t]),s=m.useRef(null);an(n,"pointerdown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),an(n,"mousedown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),an(n,"click",l=>{Zh()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=m.useRef({x:0,y:0});an(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),an(n,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=Dl||Math.abs(u.y-a.current.y)>=Dl))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),eg(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ii(...e){return m.useMemo(()=>on(...e),[...e])}function rg(e,t){return m.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function ng(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function og(){return Ll()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Rt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!n(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function ig(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function sg(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let cr=Ol(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Rt(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:sg(r)},o=[og(),ng(),ig()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});cr.subscribe(()=>{let e=cr.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&cr.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&cr.dispatch("TEARDOWN",r)}});function ag(e,t,r=()=>({containers:[]})){let n=Fl(cr),o=t?n.get(t):void 0,i=o?o.count>0:!1;return he(()=>{if(!(!t||!e))return cr.dispatch("PUSH",t,r),()=>cr.dispatch("POP",t,r)},[e,t]),i}function lg(e,t,r=()=>[document.body]){let n=$i(e,"scroll-lock");ag(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function Il(e){return[e.screenX,e.screenY]}function ug(){let e=m.useRef([-1,-1]);return{wasMoved(t){let r=Il(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=Il(t)}}}function cg(e=0){let[t,r]=m.useState(e),n=m.useCallback(l=>r(l),[t]),o=m.useCallback(l=>r(u=>u|l),[t]),i=m.useCallback(l=>(t&l)===l,[t]),s=m.useCallback(l=>r(u=>u&~l),[r]),a=m.useCallback(l=>r(u=>u^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ml,Rl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ml=process==null?void 0:process.env)==null?void 0:Ml.NODE_ENV)==="test"&&typeof((Rl=Element==null?void 0:Element.prototype)==null?void 0:Rl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
52
- `)),[]});var fg=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(fg||{});function Vl(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Bl(e,t,r,n){let[o,i]=m.useState(r),{hasFlag:s,addFlag:a,removeFlag:l}=cg(e&&o?3:0),u=m.useRef(!1),c=m.useRef(!1),f=lr();return he(()=>{var h;if(e){if(r&&i(!0),!t){r&&a(3);return}return(h=n==null?void 0:n.start)==null||h.call(n,r),dg(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){c.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var p;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),r||i(!1),(p=n==null?void 0:n.end)==null||p.call(n,r))}})}},[e,r,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function dg(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Rt();return mg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(pg(e,n))})}),i.dispose}function pg(e,t){var r,n;let o=Rt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(a=>a instanceof CSSTransition))!=null?n:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function mg(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function ro(){return typeof window<"u"}function Or(e){return Ul(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _t(e){var t;return(t=(Ul(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ul(e){return ro()?e instanceof Node||e instanceof it(e).Node:!1}function Ue(e){return ro()?e instanceof Element||e instanceof it(e).Element:!1}function St(e){return ro()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function zl(e){return!ro()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function ln(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function hg(e){return["table","td","th"].includes(Or(e))}function no(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Mi(e){const t=Ri(),r=Ue(e)?gt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function gg(e){let t=Yt(e);for(;St(t)&&!Fr(t);){if(Mi(t))return t;if(no(t))return null;t=Yt(t)}return null}function Ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(e){return["html","body","#document"].includes(Or(e))}function gt(e){return it(e).getComputedStyle(e)}function oo(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(Or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zl(e)&&e.host||_t(e);return zl(t)?t.host:t}function Hl(e){const t=Yt(e);return Fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:St(t)&&ln(t)?t:Hl(t)}function un(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Hl(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=it(o);if(i){const a=Vi(s);return t.concat(s,s.visualViewport||[],ln(o)?o:[],a&&r?un(a):[])}return t.concat(o,un(o,[],r))}function Vi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const fr=Math.min,ze=Math.max,cn=Math.round,io=Math.floor,kt=e=>({x:e,y:e}),bg={left:"right",right:"left",bottom:"top",top:"bottom"},xg={start:"end",end:"start"};function ql(e,t,r){return ze(e,fr(t,r))}function Ar(e,t){return typeof e=="function"?e(t):e}function Jt(e){return e.split("-")[0]}function fn(e){return e.split("-")[1]}function Wl(e){return e==="x"?"y":"x"}function Kl(e){return e==="y"?"height":"width"}function dr(e){return["top","bottom"].includes(Jt(e))?"y":"x"}function Yl(e){return Wl(dr(e))}function vg(e,t,r){r===void 0&&(r=!1);const n=fn(e),o=Yl(e),i=Kl(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=so(s)),[s,so(s)]}function wg(e){const t=so(e);return[Bi(e),t,Bi(t)]}function Bi(e){return e.replace(/start|end/g,t=>xg[t])}function Eg(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function Tg(e,t,r,n){const o=fn(e);let i=Eg(Jt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Bi)))),i}function so(e){return e.replace(/left|right|bottom|top/g,t=>bg[t])}function _g(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sg(e){return typeof e!="number"?_g(e):{top:e,right:e,bottom:e,left:e}}function ao(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Jl(e,t,r){let{reference:n,floating:o}=e;const i=dr(t),s=Yl(t),a=Kl(s),l=Jt(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:n.y-o.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(fn(t)){case"start":p[s]-=h*(r&&u?-1:1);break;case"end":p[s]+=h*(r&&u?-1:1);break}return p}const kg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Jl(u,n,l),h=n,p={},d=0;for(let g=0;g<a.length;g++){const{name:x,fn:b}=a[g],{x:v,y:w,data:_,reset:k}=await b({x:c,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=v??c,f=w??f,p={...p,[x]:{...p[x],..._}},k&&d<=50&&(d++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:f}=Jl(u,h,l)),g=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function lo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ar(t,e),d=Sg(p),x=a[h?f==="floating"?"reference":"floating":f],b=ao(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=ao(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(b.top-k.top+d.top)/_.y,bottom:(k.bottom-b.bottom+d.bottom)/_.y,left:(b.left-k.left+d.left)/_.x,right:(k.right-b.right+d.right)/_.x}}const Cg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...x}=Ar(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Jt(o),v=dr(a),w=Jt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(w||!g?[so(a)]:wg(a)),S=d!=="none";!h&&S&&k.push(...Tg(a,g,d,_));const C=[a,...k],A=await lo(t,x),N=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&N.push(A[b]),f){const q=vg(o,s,_);N.push(A[q[0]],A[q[1]])}if(L=[...L,{placement:o,overflows:N}],!N.every(q=>q<=0)){var P,I;const q=(((P=i.flip)==null?void 0:P.index)||0)+1,J=C[q];if(J)return{data:{index:q,overflows:L},reset:{placement:J}};let z=(I=L.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:I.placement;if(!z)switch(p){case"bestFit":{var R;const G=(R=L.filter(K=>{if(S){const Z=dr(K.placement);return Z===v||Z==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Z=>Z>0).reduce((Z,re)=>Z+re,0)]).sort((K,Z)=>K[1]-Z[1])[0])==null?void 0:R[0];G&&(z=G);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};async function Og(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Jt(r),a=fn(r),l=dr(r)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=Ar(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(p=a==="end"?d*-1:d),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const Fg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Og(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ag=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...l}=Ar(e,t),u={x:r,y:n},c=await lo(t,l),f=dr(Jt(o)),h=Wl(f);let p=u[h],d=u[f];if(i){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",v=p+c[x],w=p-c[b];p=ql(v,p,w)}if(s){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",v=d+c[x],w=d-c[b];d=ql(v,d,w)}const g=a.fn({...t,[h]:p,[f]:d});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[f]:s}}}}}},jg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Ar(e,t),c=await lo(t,u),f=Jt(o),h=fn(o),p=dr(o)==="y",{width:d,height:g}=i.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const v=g-c.top-c.bottom,w=d-c.left-c.right,_=fr(g-c[x],v),k=fr(d-c[b],w),S=!t.middlewareData.shift;let C=_,A=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=v),S&&!h){const L=ze(c.left,0),P=ze(c.right,0),I=ze(c.top,0),R=ze(c.bottom,0);p?A=d-2*(L!==0||P!==0?L+P:ze(c.left,c.right)):C=g-2*(I!==0||R!==0?I+R:ze(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:C});const N=await s.getDimensions(a.floating);return d!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function Xl(e){const t=gt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=St(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=cn(r)!==i||cn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ui(e){return Ue(e)?e:e.contextElement}function jr(e){const t=Ui(e);if(!St(t))return kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Xl(t);let s=(i?cn(r.width):r.width)/n,a=(i?cn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $g=kt(0);function Gl(e){const t=it(e);return!Ri()||!t.visualViewport?$g:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ng(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==it(e)?!1:t}function pr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ui(e);let s=kt(1);t&&(n?Ue(n)&&(s=jr(n)):s=jr(e));const a=Ng(i,r,n)?Gl(i):kt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const h=it(i),p=n&&Ue(n)?it(n):n;let d=h,g=Vi(d);for(;g&&n&&p!==d;){const x=jr(g),b=g.getBoundingClientRect(),v=gt(g),w=b.left+(g.clientLeft+parseFloat(v.paddingLeft))*x.x,_=b.top+(g.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=w,u+=_,d=it(g),g=Vi(d)}}return ao({width:c,height:f,x:l,y:u})}function zi(e,t){const r=oo(e).scrollLeft;return t?t.left+r:pr(_t(e)).left+r}function Ql(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:zi(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function Pg(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=_t(n),a=t?no(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=kt(1);const c=kt(0),f=St(n);if((f||!f&&!i)&&((Or(n)!=="body"||ln(s))&&(l=oo(n)),St(n))){const p=pr(n);u=jr(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const h=s&&!f&&!i?Ql(s,l,!0):kt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Lg(e){return Array.from(e.getClientRects())}function Dg(e){const t=_t(e),r=oo(e),n=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ze(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zi(e);const a=-r.scrollTop;return gt(n).direction==="rtl"&&(s+=ze(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ig(e,t){const r=it(e),n=_t(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Ri();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Mg(e,t){const r=pr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=St(e)?jr(e):kt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:s,height:a,x:l,y:u}}function Zl(e,t,r){let n;if(t==="viewport")n=Ig(e,r);else if(t==="document")n=Dg(_t(e));else if(Ue(t))n=Mg(t,r);else{const o=Gl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ao(n)}function eu(e,t){const r=Yt(e);return r===t||!Ue(r)||Fr(r)?!1:gt(r).position==="fixed"||eu(r,t)}function Rg(e,t){const r=t.get(e);if(r)return r;let n=un(e,[],!1).filter(a=>Ue(a)&&Or(a)!=="body"),o=null;const i=gt(e).position==="fixed";let s=i?Yt(e):e;for(;Ue(s)&&!Fr(s);){const a=gt(s),l=Mi(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ln(s)&&!l&&eu(e,s))?n=n.filter(c=>c!==s):o=a,s=Yt(s)}return t.set(e,n),n}function Vg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?no(t)?[]:Rg(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,c)=>{const f=Zl(t,c,o);return u.top=ze(f.top,u.top),u.right=fr(f.right,u.right),u.bottom=fr(f.bottom,u.bottom),u.left=ze(f.left,u.left),u},Zl(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Bg(e){const{width:t,height:r}=Xl(e);return{width:t,height:r}}function Ug(e,t,r){const n=St(t),o=_t(t),i=r==="fixed",s=pr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kt(0);if(n||!n&&!i)if((Or(t)!=="body"||ln(o))&&(a=oo(t)),n){const h=pr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=zi(o));const u=o&&!n&&!i?Ql(o,a):kt(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Hi(e){return gt(e).position==="static"}function tu(e,t){if(!St(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return _t(e)===r&&(r=r.ownerDocument.body),r}function ru(e,t){const r=it(e);if(no(e))return r;if(!St(e)){let o=Yt(e);for(;o&&!Fr(o);){if(Ue(o)&&!Hi(o))return o;o=Yt(o)}return r}let n=tu(e,t);for(;n&&hg(n)&&Hi(n);)n=tu(n,t);return n&&Fr(n)&&Hi(n)&&!Mi(n)?r:n||gg(e)||r}const zg=async function(e){const t=this.getOffsetParent||ru,r=this.getDimensions,n=await r(e.floating);return{reference:Ug(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Hg(e){return gt(e).direction==="rtl"}const qg={convertOffsetParentRelativeRectToViewportRelativeRect:Pg,getDocumentElement:_t,getClippingRect:Vg,getOffsetParent:ru,getElementRects:zg,getClientRects:Lg,getDimensions:Bg,getScale:jr,isElement:Ue,isRTL:Hg};function Wg(e,t){let r=null,n;const o=_t(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const p=io(c),d=io(o.clientWidth-(u+f)),g=io(o.clientHeight-(c+h)),x=io(u),v={rootMargin:-p+"px "+-d+"px "+-g+"px "+-x+"px",threshold:ze(0,fr(1,l))||1};let w=!0;function _(k){const S=k[0].intersectionRatio;if(S!==l){if(!w)return s();S?s(!1,S):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(_,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,v)}r.observe(e)}return s(!0),i}function Kg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ui(e),c=o||i?[...u?un(u):[],...un(t)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=u&&a?Wg(u,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[v]=b;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let d,g=l?pr(e):null;l&&x();function x(){const b=pr(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&r(),g=b,d=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(v=>{o&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(d)}}const qi=lo,Yg=Fg,Jg=Ag,Xg=Cg,Gg=jg,Qg=(e,t,r)=>{const n=new Map,o={platform:qg,...r},i={...o.platform,_c:n};return kg(e,t,{...o,platform:i})};var uo=typeof document<"u"?m.useLayoutEffect:m.useEffect;function co(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!co(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!co(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function nu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ou(e,t){const r=nu(e);return Math.round(t*r)/r}function Wi(e){const t=F.useRef(e);return uo(()=>{t.current=e}),t}function Zg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=F.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=F.useState(n);co(h,n)||p(n);const[d,g]=F.useState(null),[x,b]=F.useState(null),v=F.useCallback(K=>{K!==S.current&&(S.current=K,g(K))},[]),w=F.useCallback(K=>{K!==C.current&&(C.current=K,b(K))},[]),_=i||d,k=s||x,S=F.useRef(null),C=F.useRef(null),A=F.useRef(c),N=l!=null,L=Wi(l),P=Wi(o),I=Wi(u),R=F.useCallback(()=>{if(!S.current||!C.current)return;const K={placement:t,strategy:r,middleware:h};P.current&&(K.platform=P.current),Qg(S.current,C.current,K).then(Z=>{const re={...Z,isPositioned:I.current!==!1};q.current&&!co(A.current,re)&&(A.current=re,jn.flushSync(()=>{f(re)}))})},[h,t,r,P,I]);uo(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[u]);const q=F.useRef(!1);uo(()=>(q.current=!0,()=>{q.current=!1}),[]),uo(()=>{if(_&&(S.current=_),k&&(C.current=k),_&&k){if(L.current)return L.current(_,k,R);R()}},[_,k,R,L,N]);const J=F.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:w}),[v,w]),z=F.useMemo(()=>({reference:_,floating:k}),[_,k]),G=F.useMemo(()=>{const K={position:r,left:0,top:0};if(!z.floating)return K;const Z=ou(z.floating,c.x),re=ou(z.floating,c.y);return a?{...K,transform:"translate("+Z+"px, "+re+"px)",...nu(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:re}},[r,a,z.floating,c.x,c.y]);return F.useMemo(()=>({...c,update:R,refs:J,elements:z,floatingStyles:G}),[c,R,J,z,G])}const iu=(e,t)=>({...Yg(e),options:[e,t]}),ey=(e,t)=>({...Jg(e),options:[e,t]}),ty=(e,t)=>({...Xg(e),options:[e,t]}),ry=(e,t)=>({...Gg(e),options:[e,t]}),su={...F},ny=su.useInsertionEffect||(e=>e());function au(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ny(()=>{t.current=e}),F.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Ki=typeof document<"u"?m.useLayoutEffect:m.useEffect;let lu=!1,oy=0;const uu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+oy++;function iy(){const[e,t]=F.useState(()=>lu?uu():void 0);return Ki(()=>{e==null&&t(uu())},[]),F.useEffect(()=>{lu=!0},[]),e}const sy=su.useId||iy;let dn;process.env.NODE_ENV!=="production"&&(dn=new Set);function ay(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=dn)!=null&&e.has(o))){var i;(i=dn)==null||i.add(o),console.warn(o)}}function ly(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=dn)!=null&&e.has(o))){var i;(i=dn)==null||i.add(o),console.error(o)}}function uy(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const cy=F.createContext(null),fy=F.createContext(null),dy=()=>{var e;return((e=F.useContext(cy))==null?void 0:e.id)||null},py=()=>F.useContext(fy),my="data-floating-ui-focusable";function hy(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=sy(),i=F.useRef({}),[s]=F.useState(()=>uy()),a=dy()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!Ue(p)&&ly("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=F.useState(n.reference),c=au((p,d,g)=>{i.current.openEvent=p?d:void 0,s.emit("openchange",{open:p,event:d,reason:g,nested:a}),r==null||r(p,d,g)}),f=F.useMemo(()=>({setPositionReference:u}),[]),h=F.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return F.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:h,events:s,floatingId:o,refs:f}),[t,c,h,s,o,f])}function gy(e){e===void 0&&(e={});const{nodeId:t}=e,r=hy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=F.useState(null),[a,l]=F.useState(null),c=(o==null?void 0:o.domReference)||i,f=F.useRef(null),h=py();Ki(()=>{c&&(f.current=c)},[c]);const p=Zg({...e,elements:{...o,...a&&{reference:a}}}),d=F.useCallback(w=>{const _=Ue(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(_),p.refs.setReference(_)},[p.refs]),g=F.useCallback(w=>{(Ue(w)||w===null)&&(f.current=w,s(w)),(Ue(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Ue(w))&&p.refs.setReference(w)},[p.refs]),x=F.useMemo(()=>({...p.refs,setReference:g,setPositionReference:d,domReference:f}),[p.refs,g,d]),b=F.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),v=F.useMemo(()=>({...p,...n,refs:x,elements:b,nodeId:t}),[p,x,b,t,n]);return Ki(()=>{n.dataRef.current.floatingContext=v;const w=h==null?void 0:h.nodesRef.current.find(_=>_.id===t);w&&(w.context=v)}),F.useMemo(()=>({...p,context:v,refs:x,elements:b}),[p,x,b,v])}const cu="active",fu="selected";function Yi(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[cu]:s,[fu]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[my]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[cu,fu].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),s[u]=function(){for(var h,p=arguments.length,d=new Array(p),g=0;g<p;g++)d[g]=arguments[g];return(h=n.get(u))==null?void 0:h.map(x=>x(...d)).find(x=>x!==void 0)}}}else s[u]=c}),s),{})}}function yy(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=F.useCallback(a=>Yi(a,e,"reference"),t),i=F.useCallback(a=>Yi(a,e,"floating"),r),s=F.useCallback(a=>Yi(a,e,"item"),n);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function du(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const by=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Ar(e,t),{rects:f,elements:{floating:h}}=t,p=r.current[s],d=(u==null?void 0:u.current)||h,g=h.clientTop||d.clientTop,x=h.clientTop!==0,b=d.clientTop!==0,v=h===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||ay('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...t,...await iu(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-i).fn(t)},_=await qi(du(w,d.scrollHeight+g+h.clientTop),c),k=await qi(w,{...c,elementContext:"reference"}),S=ze(0,_.top),C=w.y+S,L=(d.scrollHeight>d.clientHeight?P=>P:cn)(ze(0,d.scrollHeight+(x&&v||b?g*2:0)-S-ze(0,_.bottom)));if(d.style.maxHeight=L+"px",d.scrollTop=S,o){const P=d.offsetHeight<p.offsetHeight*fr(a,r.current.length)-1||k.top>=-l||k.bottom>=-l;jn.flushSync(()=>o(P))}return n&&(n.current=await qi(du({...w,y:C},d.offsetHeight+g+h.clientTop),c)),{y:C}}});function xy(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=au(a),u=F.useRef(!1),c=F.useRef(null),f=F.useRef(null);F.useEffect(()=>{if(!o)return;function p(g){if(g.ctrlKey||!d||i.current==null)return;const x=g.deltaY,b=i.current.top>=-.5,v=i.current.bottom>=-.5,w=d.scrollHeight-d.clientHeight,_=x<0?-1:1,k=x<0?"max":"min";d.scrollHeight<=d.clientHeight||(!b&&x>0||!v&&x<0?(g.preventDefault(),jn.flushSync(()=>{l(S=>S+Math[k](x,w*_))})):/firefox/i.test(yg())&&(d.scrollTop+=x))}const d=(s==null?void 0:s.current)||n.floating;if(r&&d)return d.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=d.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,d.removeEventListener("wheel",p)}},[o,r,n.floating,i,s,l]);const h=F.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(s==null?void 0:s.current)||n.floating;if(!(!i.current||!p||!u.current)){if(c.current!==null){const d=p.scrollTop-c.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&jn.flushSync(()=>l(g=>g+d))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,l,i,s]);return F.useMemo(()=>o?{floating:h}:{},[o,h])}let $r=m.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$r.displayName="FloatingContext";let Ji=m.createContext(null);Ji.displayName="PlacementContext";function vy(e){return m.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function wy(){return m.useContext($r).setReference}function Ey(){return m.useContext($r).getReferenceProps}function Ty(){let{getFloatingProps:e,slot:t}=m.useContext($r);return m.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function _y(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=m.useContext(Ji),r=m.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);he(()=>{t==null||t(r??null)},[t,r]);let n=m.useContext($r);return m.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let pu=4;function Sy({children:e,enabled:t=!0}){let[r,n]=m.useState(null),[o,i]=m.useState(0),s=m.useRef(null),[a,l]=m.useState(null);ky(a);let u=t&&r!==null&&a!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:d}=Cy(r,a),[g,x="center"]=c.split(" ");he(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:v,context:w}=gy({open:u,placement:g==="selection"?x==="center"?"bottom":`bottom-${x}`:x==="center"?`${g}`:`${g}-${x}`,strategy:"absolute",transform:!1,middleware:[iu({mainAxis:g==="selection"?0:f,crossAxis:h}),ey({padding:p}),g!=="selection"&&ty({padding:p}),g==="selection"&&d?by({...d,padding:p,overflowRef:s,offset:o,minItemsVisible:pu,referenceOverflowThreshold:p,onFallbackChange(P){var I,R;if(!P)return;let q=w.elements.floating;if(!q)return;let J=parseFloat(getComputedStyle(q).scrollPaddingBottom)||0,z=Math.min(pu,q.childElementCount),G=0,K=0;for(let Z of(R=(I=w.elements.floating)==null?void 0:I.childNodes)!=null?R:[])if(Z instanceof HTMLElement){let re=Z.offsetTop,Ae=re+Z.clientHeight+J,Pe=q.scrollTop,W=Pe+q.clientHeight;if(re>=Pe&&Ae<=W)z--;else{K=Math.max(0,Math.min(Ae,W)-Math.max(re,Pe)),G=Z.clientHeight;break}}z>=1&&i(Z=>{let re=G*z-K+J;return Z>=re?Z:re})}}):null,ry({padding:p,apply({availableWidth:P,availableHeight:I,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${P}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${I}px)`})}})].filter(Boolean),whileElementsMounted:Kg}),[_=g,k=x]=w.placement.split("-");g==="selection"&&(_="selection");let S=m.useMemo(()=>({anchor:[_,k].filter(Boolean).join(" ")}),[_,k]),C=xy(w,{overflowRef:s,onChange:i}),{getReferenceProps:A,getFloatingProps:N}=yy([C]),L=te(P=>{l(P),b.setFloating(P)});return F.createElement(Ji.Provider,{value:n},F.createElement($r.Provider,{value:{setFloating:L,setReference:b.setReference,styles:v,getReferenceProps:A,getFloatingProps:N,slot:S}},e))}function ky(e){he(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Cy(e,t){var r,n,o;let i=Xi((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),s=Xi((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),a=Xi((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function Xi(e,t,r=void 0){let n=lr(),o=te((l,u)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[r,null];let c=hu(l,u);return[c,f=>{let h=mu(l);{let p=h.map(d=>window.getComputedStyle(u).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let g=!1;for(let[b,v]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(v);if(p[b]!==w){p[b]=w,g=!0;break}}if(!g)return;let x=hu(l,u);c!==x&&(f(x),c=x)})}return n.dispose}]}return[r,null]}),i=m.useMemo(()=>o(e,t)[0],[e,t]),[s=i,a]=m.useState();return he(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function mu(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...mu(o)]:[n]}return[]}function hu(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Oy(e,t){let[r,n]=m.useState(t);return!e&&r!==t&&n(t),e?r:t}let Gi=m.createContext(null);Gi.displayName="OpenClosedContext";var yt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(yt||{});function Qi(){return m.useContext(Gi)}function gu({value:e,children:t}){return m.createElement(Gi.Provider,{value:e},t)}function Fy(e){throw new Error("Unexpected object: "+e)}var Fe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Fe||{});function Zi(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:Fy(e)}}function Ay(e){let t=te(e),r=m.useRef(!1);m.useEffect(()=>(r.current=!1,()=>{r.current=!0,gl(()=>{r.current&&t()})}),[t])}function jy(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function es(){let e=jy(),[t,r]=F.useState(ar.isHandoffComplete);return t&&ar.isHandoffComplete===!1&&r(!1),F.useEffect(()=>{t!==!0&&r(!0)},[t]),F.useEffect(()=>ar.handoff(),[]),e?!1:t}let $y=m.createContext(!1);function Ny(){return m.useContext($y)}function Py(e){let t=Ny(),r=m.useContext(bu),n=Ii(e),[o,i]=m.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(ar.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return m.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),m.useEffect(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}let yu=m.Fragment,Ly=Qe(function(e,t){let r=e,n=m.useRef(null),o=ft(Sh(f=>{n.current=f}),t),i=Ii(n),s=Py(n),[a]=m.useState(()=>{var f;return ar.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),l=m.useContext(Ry),u=es();he(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),he(()=>{if(a&&l)return l.register(a)},[l,a]),Ay(()=>{var f;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=ot();return u?!s||!a?null:Tt.createPortal(c({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:yu,name:"Portal"}),a):null});function Dy(e,t){let r=ft(t),{enabled:n=!0,...o}=e,i=ot();return n?m.createElement(Ly,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:yu,name:"Portal"})}let Iy=m.Fragment,bu=m.createContext(null);function My(e,t){let{target:r,...n}=e,o={ref:ft(t)},i=ot();return m.createElement(bu.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:Iy,name:"Popover.Group"}))}let Ry=m.createContext(null),Vy=Qe(Dy),By=Qe(My),Uy=Object.assign(Vy,{Group:By});function zy(){let e=m.useRef(!1);return he(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xu(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:wu)!==m.Fragment||m.Children.count(e.children)===1}let fo=m.createContext(null);fo.displayName="TransitionContext";var Hy=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Hy||{});function qy(){let e=m.useContext(fo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Wy(){let e=m.useContext(po);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let po=m.createContext(null);po.displayName="NestingContext";function mo(e){return"children"in e?mo(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function vu(e,t){let r=ur(e),n=m.useRef([]),o=zy(),i=lr(),s=te((p,d=Wt.Hidden)=>{let g=n.current.findIndex(({el:x})=>x===p);g!==-1&&(ht(d,{[Wt.Unmount](){n.current.splice(g,1)},[Wt.Hidden](){n.current[g].state="hidden"}}),i.microTask(()=>{var x;!mo(n)&&o.current&&((x=r.current)==null||x.call(r))}))}),a=te(p=>{let d=n.current.find(({el:g})=>g===p);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:p,state:"visible"}),()=>s(p,Wt.Unmount)}),l=m.useRef([]),u=m.useRef(Promise.resolve()),c=m.useRef({enter:[],leave:[]}),f=te((p,d,g)=>{l.current.splice(0),t&&(t.chains.current[d]=t.chains.current[d].filter(([x])=>x!==p)),t==null||t.chains.current[d].push([p,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[d].push([p,new Promise(x=>{Promise.all(c.current[d].map(([b,v])=>v)).then(()=>x())})]),d==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(d)):g(d)}),h=te((p,d,g)=>{Promise.all(c.current[d].splice(0).map(([x,b])=>b)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>g(d))});return m.useMemo(()=>({children:n,register:a,unregister:s,onStart:f,onStop:h,wait:u,chains:c}),[a,s,n,f,h,c,u])}let wu=m.Fragment,Eu=Zn.RenderStrategy;function Ky(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:p,leaveFrom:d,leaveTo:g,...x}=e,[b,v]=m.useState(null),w=m.useRef(null),_=xu(e),k=ft(..._?[w,t,v]:t===null?[]:[t]),S=(r=x.unmount)==null||r?Wt.Unmount:Wt.Hidden,{show:C,appear:A,initial:N}=qy(),[L,P]=m.useState(C?"visible":"hidden"),I=Wy(),{register:R,unregister:q}=I;he(()=>R(w),[R,w]),he(()=>{if(S===Wt.Hidden&&w.current){if(C&&L!=="visible"){P("visible");return}return ht(L,{hidden:()=>q(w),visible:()=>R(w)})}},[L,w,R,q,C,S]);let J=es();he(()=>{if(_&&J&&L==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,L,J,_]);let z=N&&!A,G=A&&C&&N,K=m.useRef(!1),Z=vu(()=>{K.current||(P("hidden"),q(w))},I),re=te(je=>{K.current=!0;let _e=je?"enter":"leave";Z.onStart(w,_e,Le=>{Le==="enter"?i==null||i():Le==="leave"&&(a==null||a())})}),Ae=te(je=>{let _e=je?"enter":"leave";K.current=!1,Z.onStop(w,_e,Le=>{Le==="enter"?s==null||s():Le==="leave"&&(l==null||l())}),_e==="leave"&&!mo(Z)&&(P("hidden"),q(w))});m.useEffect(()=>{_&&o||(re(C),Ae(C))},[C,_,o]);let Pe=!(!o||!_||!J||z),[,W]=Bl(Pe,b,C,{start:re,end:Ae}),xe=Kt({ref:k,className:((n=Oi(x.className,G&&u,G&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&p,W.leave&&!W.closed&&d,W.leave&&W.closed&&g,!W.transition&&C&&h))==null?void 0:n.trim())||void 0,...Vl(W)}),Te=0;L==="visible"&&(Te|=yt.Open),L==="hidden"&&(Te|=yt.Closed),W.enter&&(Te|=yt.Opening),W.leave&&(Te|=yt.Closing);let ae=ot();return m.createElement(po.Provider,{value:Z},m.createElement(gu,{value:Te},ae({ourProps:xe,theirProps:x,defaultTag:wu,features:Eu,visible:L==="visible",name:"Transition.Child"})))}function Yy(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,s=m.useRef(null),a=xu(e),l=ft(...a?[s,t]:t===null?[]:[t]);es();let u=Qi();if(r===void 0&&u!==null&&(r=(u&yt.Open)===yt.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=m.useState(r?"visible":"hidden"),h=vu(()=>{r||f("hidden")}),[p,d]=m.useState(!0),g=m.useRef([r]);he(()=>{p!==!1&&g.current[g.current.length-1]!==r&&(g.current.push(r),d(!1))},[g,r]);let x=m.useMemo(()=>({show:r,appear:n,initial:p}),[r,n,p]);he(()=>{r?f("visible"):!mo(h)&&s.current!==null&&f("hidden")},[r,h]);let b={unmount:o},v=te(()=>{var k;p&&d(!1),(k=e.beforeEnter)==null||k.call(e)}),w=te(()=>{var k;p&&d(!1),(k=e.beforeLeave)==null||k.call(e)}),_=ot();return m.createElement(po.Provider,{value:h},m.createElement(fo.Provider,{value:x},_({ourProps:{...b,as:m.Fragment,children:m.createElement(Tu,{ref:l,...b,...i,beforeEnter:v,beforeLeave:w})},theirProps:{},defaultTag:m.Fragment,features:Eu,visible:c==="visible",name:"Transition"})))}function Jy(e,t){let r=m.useContext(fo)!==null,n=Qi()!==null;return m.createElement(m.Fragment,null,!r&&n?m.createElement(ts,{ref:t,...e}):m.createElement(Tu,{ref:t,...e}))}let ts=Qe(Yy),Tu=Qe(Ky),Xy=Qe(Jy),_u=Object.assign(ts,{Child:Xy,Root:ts});function Gy(e,t){let r=m.useRef({left:0,top:0});if(he(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(r.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}let Su=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ku(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return Su.test(s)&&(s=s.replace(Su,"")),s}function Qy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():ku(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return ku(e).trim()}function Zy(e){let t=m.useRef(""),r=m.useRef("");return te(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Qy(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var e0=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(e0||{}),t0=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(t0||{}),r0=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(r0||{}),n0=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(n0||{});function rs(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Pl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let o0={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(o=>r(o.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,n,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===Fe.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Fe.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Fe.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Zi(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:h}}}}else if(t.focus===Fe.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Zi(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===p.current||((s=p.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:h}}}}let l=rs(e),u=Zi(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=rs(e,o=>[...o,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=rs(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},ns=m.createContext(null);ns.displayName="ListboxActionsContext";function ho(e){let t=m.useContext(ns);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ho),r}return t}let go=m.createContext(null);go.displayName="ListboxDataContext";function pn(e){let t=m.useContext(go);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,pn),r}return t}function i0(e,t){return ht(t.type,o0,e,t)}let s0=m.Fragment;function a0(e,t){var r;let n=Ci(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:f=n||!1,horizontal:h=!1,multiple:p=!1,__demoMode:d=!1,...g}=e;const x=h?"horizontal":"vertical";let b=ft(t),v=mh(i),[w=p?[]:void 0,_]=ph(o,l,v),[k,S]=m.useReducer(i0,{dataRef:m.createRef(),listboxState:d?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:d}),C=m.useRef({static:!1,hold:!1}),A=m.useRef(new Map),N=Dh(u),L=m.useCallback(oe=>ht(P.mode,{1:()=>w.some(me=>N(me,oe)),0:()=>N(w,oe)}),[w]),P=m.useMemo(()=>({...k,value:w,disabled:f,invalid:c,mode:p?1:0,orientation:x,compare:N,isSelected:L,optionsPropsRef:C,listRef:A}),[w,f,c,p,k,A]);he(()=>{k.dataRef.current=P},[P]);let I=P.listboxState===0;tg(I,[P.buttonElement,P.optionsElement],(oe,me)=>{var $e;S({type:1}),Nl(me,Di.Loose)||(oe.preventDefault(),($e=P.buttonElement)==null||$e.focus())});let R=m.useMemo(()=>({open:P.listboxState===0,disabled:f,invalid:c,value:w}),[P,f,w,c]),q=te(oe=>{let me=P.options.find($e=>$e.id===oe);me&&Ae(me.dataRef.current.value)}),J=te(()=>{if(P.activeOptionIndex!==null){let{dataRef:oe,id:me}=P.options[P.activeOptionIndex];Ae(oe.current.value),S({type:2,focus:Fe.Specific,id:me})}}),z=te(()=>S({type:0})),G=te(()=>S({type:1})),K=lr(),Z=te((oe,me,$e)=>{K.dispose(),K.microTask(()=>oe===Fe.Specific?S({type:2,focus:Fe.Specific,id:me,trigger:$e}):S({type:2,focus:oe,trigger:$e}))}),re=te((oe,me)=>(S({type:5,id:oe,dataRef:me}),()=>S({type:6,id:oe}))),Ae=te(oe=>ht(P.mode,{0(){return _==null?void 0:_(oe)},1(){let me=P.value.slice(),$e=me.findIndex(zt=>N(zt,oe));return $e===-1?me.push(oe):me.splice($e,1),_==null?void 0:_(me)}})),Pe=te(oe=>S({type:3,value:oe})),W=te(()=>S({type:4})),xe=te(oe=>{S({type:7,element:oe})}),Te=te(oe=>{S({type:8,element:oe})}),ae=m.useMemo(()=>({onChange:Ae,registerOption:re,goToOption:Z,closeListbox:G,openListbox:z,selectActiveOption:J,selectOption:q,search:Pe,clearSearch:W,setButtonElement:xe,setOptionsElement:Te}),[]),[je,_e]=Ah({inherit:!0}),Le={ref:b},vt=m.useCallback(()=>{if(v!==void 0)return _==null?void 0:_(v)},[_,v]),Se=ot();return m.createElement(_e,{value:je,props:{htmlFor:(r=P.buttonElement)==null?void 0:r.id},slot:{open:P.listboxState===0,disabled:f}},m.createElement(Sy,null,m.createElement(ns.Provider,{value:ae},m.createElement(go.Provider,{value:P},m.createElement(gu,{value:ht(P.listboxState,{0:yt.Open,1:yt.Closed})},a!=null&&w!=null&&m.createElement(vh,{disabled:f,data:{[a]:w},form:s,onReset:vt}),Se({ourProps:Le,theirProps:g,slot:R,defaultTag:s0,name:"Listbox"}))))))}let l0="button";function u0(e,t){var r;let n=pn("Listbox.Button"),o=ho("Listbox.Button"),i=m.useId(),s=Tl(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=n.disabled||!1,autoFocus:u=!1,...c}=e,f=ft(t,wy(),o.setButtonElement),h=Ey(),p=te(P=>{switch(P.key){case Ne.Enter:hh(P.currentTarget);break;case Ne.Space:case Ne.ArrowDown:P.preventDefault(),Tt.flushSync(()=>o.openListbox()),n.value||o.goToOption(Fe.First);break;case Ne.ArrowUp:P.preventDefault(),Tt.flushSync(()=>o.openListbox()),n.value||o.goToOption(Fe.Last);break}}),d=te(P=>{switch(P.key){case Ne.Space:P.preventDefault();break}}),g=te(P=>{var I;if(Th(P.currentTarget))return P.preventDefault();n.listboxState===0?(Tt.flushSync(()=>o.closeListbox()),(I=n.buttonElement)==null||I.focus({preventScroll:!0})):(P.preventDefault(),o.openListbox())}),x=te(P=>P.preventDefault()),b=Cl([a]),v=kh(),{isFocusVisible:w,focusProps:_}=th({autoFocus:u}),{isHovered:k,hoverProps:S}=eh({isDisabled:l}),{pressed:C,pressProps:A}=ah({disabled:l}),N=m.useMemo(()=>({open:n.listboxState===0,active:C||n.listboxState===0,disabled:l,invalid:n.invalid,value:n.value,hover:k,focus:w,autofocus:u}),[n.listboxState,n.value,l,k,w,C,n.invalid,u]),L=bl(h(),{ref:f,id:a,type:rg(e,n.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.listboxState===0,"aria-labelledby":b,"aria-describedby":v,disabled:l||void 0,autoFocus:u,onKeyDown:p,onKeyUp:d,onKeyPress:x,onClick:g},_,S,A);return ot()({ourProps:L,theirProps:c,slot:N,defaultTag:l0,name:"Listbox.Button"})}let Cu=m.createContext(!1),c0="div",f0=Zn.RenderStrategy|Zn.Static;function d0(e,t){var r,n;let o=m.useId(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,f=vy(s),[h,p]=m.useState(null);f&&(a=!0);let d=pn("Listbox.Options"),g=ho("Listbox.Options"),x=Ii(d.optionsElement),b=Qi(),[v,w]=Bl(u,h,b!==null?(b&yt.Open)===yt.Open:d.listboxState===0);Uh(v,d.buttonElement,g.closeListbox);let _=d.__demoMode?!1:l&&d.listboxState===0;lg(_,x);let k=d.__demoMode?!1:l&&d.listboxState===0;Bh(k,{allowed:m.useCallback(()=>[d.buttonElement,d.optionsElement],[d.buttonElement,d.optionsElement])});let S=d.listboxState!==0,C=Gy(S,d.buttonElement)?!1:v,A=v&&d.listboxState===1,N=Oy(A,d.value),L=te(W=>d.compare(N,W)),P=m.useMemo(()=>{var W;if(f==null||!((W=f==null?void 0:f.to)!=null&&W.includes("selection")))return null;let xe=d.options.findIndex(Te=>L(Te.dataRef.current.value));return xe===-1&&(xe=0),xe},[f,d.options]),I=(()=>{if(f==null)return;if(P===null)return{...f,inner:void 0};let W=Array.from(d.listRef.current.values());return{...f,inner:{listRef:{current:W},index:P}}})(),[R,q]=_y(I),J=Ty(),z=ft(t,f?R:null,g.setOptionsElement,p),G=lr();m.useEffect(()=>{var W;let xe=d.optionsElement;xe&&d.listboxState===0&&xe!==((W=on(xe))==null?void 0:W.activeElement)&&(xe==null||xe.focus({preventScroll:!0}))},[d.listboxState,d.optionsElement]);let K=te(W=>{var xe,Te;switch(G.dispose(),W.key){case Ne.Space:if(d.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),g.search(W.key);case Ne.Enter:if(W.preventDefault(),W.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:ae}=d.options[d.activeOptionIndex];g.onChange(ae.current.value)}d.mode===0&&(Tt.flushSync(()=>g.closeListbox()),(xe=d.buttonElement)==null||xe.focus({preventScroll:!0}));break;case ht(d.orientation,{vertical:Ne.ArrowDown,horizontal:Ne.ArrowRight}):return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Next);case ht(d.orientation,{vertical:Ne.ArrowUp,horizontal:Ne.ArrowLeft}):return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Previous);case Ne.Home:case Ne.PageUp:return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.First);case Ne.End:case Ne.PageDown:return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Last);case Ne.Escape:W.preventDefault(),W.stopPropagation(),Tt.flushSync(()=>g.closeListbox()),(Te=d.buttonElement)==null||Te.focus({preventScroll:!0});return;case Ne.Tab:W.preventDefault(),W.stopPropagation(),Tt.flushSync(()=>g.closeListbox()),Xh(d.buttonElement,W.shiftKey?Li.Previous:Li.Next);break;default:W.key.length===1&&(g.search(W.key),G.setTimeout(()=>g.clearSearch(),350));break}}),Z=(r=d.buttonElement)==null?void 0:r.id,re=m.useMemo(()=>({open:d.listboxState===0}),[d.listboxState]),Ae=bl(f?J():{},{id:i,ref:z,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":Z,"aria-orientation":d.orientation,onKeyDown:K,role:"listbox",tabIndex:d.listboxState===0?0:void 0,style:{...c.style,...q,"--button-width":Mh(d.buttonElement,!0).width},...Vl(w)}),Pe=ot();return m.createElement(Uy,{enabled:a?e.static||v:!1},m.createElement(go.Provider,{value:d.mode===1?d:{...d,isSelected:L}},Pe({ourProps:Ae,theirProps:c,slot:re,defaultTag:c0,features:f0,visible:C,name:"Listbox.Options"})))}let p0="div";function m0(e,t){let r=m.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...s}=e,a=m.useContext(Cu)===!0,l=pn("Listbox.Option"),u=ho("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===n:!1,f=l.isSelected(i),h=m.useRef(null),p=Zy(h),d=ur({disabled:o,value:i,domRef:h,get textValue(){return p()}}),g=ft(t,h,N=>{N?l.listRef.current.set(n,N):l.listRef.current.delete(n)});he(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Rt().requestAnimationFrame(()=>{var N,L;(L=(N=h.current)==null?void 0:N.scrollIntoView)==null||L.call(N,{block:"nearest"})})},[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),he(()=>{if(!a)return u.registerOption(n,d)},[d,n,a]);let x=te(N=>{var L;if(o)return N.preventDefault();u.onChange(i),l.mode===0&&(Tt.flushSync(()=>u.closeListbox()),(L=l.buttonElement)==null||L.focus({preventScroll:!0}))}),b=te(()=>{if(o)return u.goToOption(Fe.Nothing);u.goToOption(Fe.Specific,n)}),v=ug(),w=te(N=>{v.update(N),!o&&(c||u.goToOption(Fe.Specific,n,0))}),_=te(N=>{v.wasMoved(N)&&(o||c||u.goToOption(Fe.Specific,n,0))}),k=te(N=>{v.wasMoved(N)&&(o||c&&u.goToOption(Fe.Nothing))}),S=m.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&a}),[c,f,o,a]),C=a?{}:{id:n,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:b,onPointerEnter:w,onMouseEnter:w,onPointerMove:_,onMouseMove:_,onPointerLeave:k,onMouseLeave:k},A=ot();return!f&&a?null:A({ourProps:C,theirProps:s,slot:S,defaultTag:p0,name:"Listbox.Option"})}let h0=m.Fragment;function g0(e,t){let{options:r,placeholder:n,...o}=e,i={ref:ft(t)},s=pn("ListboxSelectedOption"),a=m.useMemo(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=ot();return m.createElement(Cu.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:m.createElement(m.Fragment,null,n&&l?n:r)},slot:a,defaultTag:h0,name:"ListboxSelectedOption"}))}let y0=Qe(a0),b0=Qe(u0),x0=Ph,v0=Qe(d0),w0=Qe(m0),E0=Qe(g0),Xt=Object.assign(y0,{Button:b0,Label:x0,Options:v0,Option:w0,SelectedOption:E0});function Ou({element:e,validationData:t}){var l;const[r,n]=m.useState(e.value||[]),{register:o=()=>({}),setValue:i,getValues:s}=t||{},a=s&&s(e==null?void 0:e.id);return m.useEffect(()=>{o(e.id)},[e.id,o]),m.useEffect(()=>{i&&i(e.id,r)},[e.id,r,i]),m.useEffect(()=>{a!=null&&a.length&&!(r!=null&&r.length)&&n(a)},[a,r==null?void 0:r.length]),y.jsx("div",{className:"w-full z-10",children:y.jsx(Xt,{value:r,onChange:n,multiple:!0,children:y.jsxs("div",{className:"relative",children:[y.jsx(Xt.Button,{className:"w-full py-2 pl-3 pr-10 text-left bg-white input-control cursor-default ",children:(r==null?void 0:r.length)>0?r==null?void 0:r.map(u=>u.label).join(", "):"Select options"}),y.jsx(_u,{as:m.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsx(Xt.Options,{className:"absolute w-full py-1 mt-1 grid gap-y-[1px] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:(l=e==null?void 0:e.options)==null?void 0:l.map((u,c)=>y.jsx(Xt.Option,{className:({active:f})=>`cursor-default select-none relative w-full flex justify-between ${f?"text-gray-700 bg-gray-100":"text-gray-700"}`,value:u,children:({selected:f})=>y.jsxs("div",{className:`flex items-center justify-between py-2 pl-4 pr-4 w-full ${f?"bg-gray-100":""}`,children:[y.jsx("span",{className:`block truncate ${f?"font-medium":"font-normal"}`,children:u==null?void 0:u.label}),f?y.jsx("span",{className:"absolute inset-y-0 right-3 flex items-center pl-3 text-gray-600",children:"✓"}):null]})},c))})})]})})})}function Fu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}function T0({onFileLoaded:e,disabled:t}){const[r,n]=m.useState(null),o=i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];if(!s)return;const a=new FileReader;a.onloadend=()=>{const u=a.result;e({base64:u,type:s.type,name:s.name}),n(null)},a.onerror=()=>{n("Failed to read file.")},a.readAsDataURL(s)};return y.jsxs("div",{className:"flex flex-col items-start gap-2",children:[y.jsx("input",{type:"file",onChange:o,disabled:t,className:`block w-full text-sm text-gray-500 file:mr-4 file:px-4 input-control !py-1 !pl-1\r
51
+ `))}else{let h=c.props,m=h==null?void 0:h.className,d=typeof m=="function"?(...b)=>Fi(m(...b),l.className):Fi(m,l.className),y=d?{className:d}:{},x=Tl(c.props,Yt(Ai(l,["ref"])));for(let b in f)b in x&&delete f[b];return p.cloneElement(c,Object.assign({},x,f,u,{ref:o(sh(c),u.ref)},y))}return p.createElement(i,Object.assign({},Ai(l,["ref"]),i!==p.Fragment&&u,i!==p.Fragment&&f),c)}function oh(){let e=p.useRef([]),t=p.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function ih(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function Tl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let s=r[n];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function _l(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let s of i)s==null||s(...o)}});return t}function et(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Yt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Ai(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function sh(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function ah(e,t,r){let[n,o]=p.useState(r),i=e!==void 0,s=p.useRef(i),a=p.useRef(!1),l=p.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,te(u=>(i||o(u),t==null?void 0:t(u)))]}function lh(e){let[t]=p.useState(e);return t}function Sl(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))kl(r,Cl(t,n),o);return r}function Cl(e,t){return e?e+"["+t+"]":t}function kl(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())kl(e,Cl(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Sl(r,t,e)}function uh(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}let ch="span";var ji=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ji||{});function fh(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return st()({ourProps:i,theirProps:o,slot:{},defaultTag:ch,name:"Hidden"})}let Ol=et(fh),dh=p.createContext(null);function ph({children:e}){let t=p.useContext(dh);if(!t)return p.createElement(p.Fragment,null,e);let{target:r}=t;return r?_t.createPortal(p.createElement(p.Fragment,null,e),r):null}function mh({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,s]=p.useState(null),a=ur();return p.useEffect(()=>{if(n&&i)return a.addEventListener(i,"reset",n)},[i,t,n]),p.createElement(ph,null,p.createElement(hh,{setForm:s,formId:t}),Sl(e).map(([l,u])=>p.createElement(Ol,{features:ji.Hidden,...Yt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:l,value:u,...o})})))}function hh({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:p.createElement(Ol,{features:ji.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let gh=p.createContext(void 0);function Fl(){return p.useContext(gh)}function yh(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&bh(r)?!1:n}function bh(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Al=Symbol();function xh(e,t=!0){return Object.assign(e,{[Al]:t})}function pt(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let r=te(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Al]))?void 0:r}let $i=p.createContext(null);$i.displayName="DescriptionContext";function jl(){let e=p.useContext($i);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,jl),t}return e}function vh(){var e,t;return(t=(e=p.useContext($i))==null?void 0:e.value)!=null?t:void 0}let wh="p";function Eh(e,t){let r=p.useId(),n=Oi(),{id:o=`headlessui-description-${r}`,...i}=e,s=jl(),a=pt(t);be(()=>s.register(o),[o,s.register]);let l=n||!1,u=p.useMemo(()=>({...s.slot,disabled:l}),[s.slot,l]),c={ref:a,...s.props,id:o};return st()({ourProps:c,theirProps:i,slot:u,defaultTag:wh,name:s.name||"Description"})}let Th=et(Eh);Object.assign(Th,{});var Pe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Pe||{});let eo=p.createContext(null);eo.displayName="LabelContext";function $l(){let e=p.useContext(eo);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,$l),t}return e}function Nl(e){var t,r,n;let o=(r=(t=p.useContext(eo))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function _h({inherit:e=!1}={}){let t=Nl(),[r,n]=p.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let s=te(l=>(n(u=>[...u,l]),()=>n(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),a=p.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return p.createElement(eo.Provider,{value:a},i.children)},[n])]}let Sh="label";function Ch(e,t){var r;let n=p.useId(),o=$l(),i=Fl(),s=Oi(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...c}=e,f=pt(t);be(()=>o.register(a),[a,o.register]);let h=te(x=>{let b=x.currentTarget;if(b instanceof HTMLLabelElement&&x.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(x),b instanceof HTMLLabelElement){let w=document.getElementById(b.htmlFor);if(w){let v=w.getAttribute("disabled");if(v==="true"||v==="")return;let E=w.getAttribute("aria-disabled");if(E==="true"||E==="")return;(w instanceof HTMLInputElement&&(w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),m=s||!1,d=p.useMemo(()=>({...o.slot,disabled:m}),[o.slot,m]),y={ref:f,...o.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in y&&(delete y.htmlFor,delete y.onClick),"onClick"in c&&delete c.onClick),st()({ourProps:y,theirProps:c,slot:d,defaultTag:l?Sh:"div",name:o.name||"Label"})}let kh=et(Ch),Oh=Object.assign(kh,{});function Fh(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Ah(e=Fh){return p.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function jh(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function $h(e,t=!1){let[r,n]=p.useReducer(()=>({}),{}),o=p.useMemo(()=>jh(e),[e,r]);return be(()=>{if(!e)return;let i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Nh=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Pl(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}function Dl(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Ph=new Nh(()=>Pl(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function Ni(e,t){let r=Ph.get(t),n=p.useId(),o=Dl(r);if(be(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Pi=new Map,ln=new Map;function Ll(e){var t;let r=(t=ln.get(e))!=null?t:0;return ln.set(e,r+1),r!==0?()=>Il(e):(Pi.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Il(e))}function Il(e){var t;let r=(t=ln.get(e))!=null?t:1;if(r===1?ln.delete(e):ln.set(e,r-1),r!==1)return;let n=Pi.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Pi.delete(e))}function Dh(e,{allowed:t,disallowed:r}={}){let n=Ni(e,"inert-others");be(()=>{var o,i;if(!n)return;let s=Vt();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&s.add(Ll(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=an(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)a.some(h=>f.contains(h))||s.add(Ll(f));c=c.parentElement}}return s.dispose},[n,t,r])}function Lh(e,t,r){let n=cr(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});p.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Vt();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}let Di=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Ih=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Li=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Li||{}),Mh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Mh||{}),Rh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Rh||{});function Ml(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Di)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Vh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ih)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ii=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ii||{});function Rl(e,t=0){var r;return e===((r=an(e))==null?void 0:r.body)?!1:gt(t,{0(){return e.matches(Di)},1(){let n=e;for(;n!==null;){if(n.matches(Di))return!0;n=n.parentElement}return!1}})}var Bh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Bh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Uh=["textarea","input"].join(",");function zh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Uh))!=null?r:!1}function Vl(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function qh(e,t){return Hh(Ml(),t,{relativeTo:e})}function Hh(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Vl(e):e:t&64?Vh(e):Ml(e);o.length>0&&s.length>1&&(s=s.filter(m=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===m:d===m))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,h;do{if(c>=f||c+f<=0)return 0;let m=l+c;if(t&16)m=(m+f)%f;else{if(m<0)return 3;if(m>=f)return 1}h=s[m],h==null||h.focus(u),c+=a}while(h!==i.activeElement);return t&6&&zh(h)&&h.select(),2}function Bl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Wh(){return/Android/gi.test(window.navigator.userAgent)}function Kh(){return Bl()||Wh()}function un(e,t,r,n){let o=cr(r);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function Yh(e,t,r,n){let o=cr(r);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const Ul=30;function Jh(e,t,r){let n=Ni(e,"outside-click"),o=cr(r),i=p.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]}(t);for(let h of f)if(h!==null&&(h.contains(c)||l.composed&&l.composedPath().includes(h)))return;return!Rl(c,Ii.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,t]),s=p.useRef(null);un(n,"pointerdown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),un(n,"mousedown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),un(n,"click",l=>{Kh()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=p.useRef({x:0,y:0});un(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),un(n,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=Ul||Math.abs(u.y-a.current.y)>=Ul))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),Yh(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Mi(...e){return p.useMemo(()=>an(...e),[...e])}function Gh(e,t){return p.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Xh(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function Zh(){return Bl()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Vt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!n(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Qh(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function eg(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let fr=Pl(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Vt(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:eg(r)},o=[Zh(),Xh(),Qh()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});fr.subscribe(()=>{let e=fr.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&fr.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&fr.dispatch("TEARDOWN",r)}});function tg(e,t,r=()=>({containers:[]})){let n=Dl(fr),o=t?n.get(t):void 0,i=o?o.count>0:!1;return be(()=>{if(!(!t||!e))return fr.dispatch("PUSH",t,r),()=>fr.dispatch("POP",t,r)},[e,t]),i}function rg(e,t,r=()=>[document.body]){let n=Ni(e,"scroll-lock");tg(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function zl(e){return[e.screenX,e.screenY]}function ng(){let e=p.useRef([-1,-1]);return{wasMoved(t){let r=zl(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=zl(t)}}}function og(e=0){let[t,r]=p.useState(e),n=p.useCallback(l=>r(l),[t]),o=p.useCallback(l=>r(u=>u|l),[t]),i=p.useCallback(l=>(t&l)===l,[t]),s=p.useCallback(l=>r(u=>u&~l),[r]),a=p.useCallback(l=>r(u=>u^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var ql,Hl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ql=process==null?void 0:process.env)==null?void 0:ql.NODE_ENV)==="test"&&typeof((Hl=Element==null?void 0:Element.prototype)==null?void 0:Hl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
52
+ `)),[]});var ig=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(ig||{});function Wl(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Kl(e,t,r,n){let[o,i]=p.useState(r),{hasFlag:s,addFlag:a,removeFlag:l}=og(e&&o?3:0),u=p.useRef(!1),c=p.useRef(!1),f=ur();return be(()=>{var h;if(e){if(r&&i(!0),!t){r&&a(3);return}return(h=n==null?void 0:n.start)==null||h.call(n,r),sg(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){c.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var m;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),r||i(!1),(m=n==null?void 0:n.end)==null||m.call(n,r))}})}},[e,r,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function sg(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Vt();return lg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(ag(e,n))})}),i.dispose}function ag(e,t){var r,n;let o=Vt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(a=>a instanceof CSSTransition))!=null?n:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function lg(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function to(){return typeof window<"u"}function Fr(e){return Yl(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(Yl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yl(e){return to()?e instanceof Node||e instanceof at(e).Node:!1}function ze(e){return to()?e instanceof Element||e instanceof at(e).Element:!1}function Ct(e){return to()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Jl(e){return!to()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function cn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function ug(e){return["table","td","th"].includes(Fr(e))}function ro(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ri(e){const t=Vi(),r=ze(e)?yt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function cg(e){let t=Jt(e);for(;Ct(t)&&!Ar(t);){if(Ri(t))return t;if(ro(t))return null;t=Jt(t)}return null}function Vi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ar(e){return["html","body","#document"].includes(Fr(e))}function yt(e){return at(e).getComputedStyle(e)}function no(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(Fr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jl(e)&&e.host||St(e);return Jl(t)?t.host:t}function Gl(e){const t=Jt(e);return Ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ct(t)&&cn(t)?t:Gl(t)}function fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gl(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=at(o);if(i){const a=Bi(s);return t.concat(s,s.visualViewport||[],cn(o)?o:[],a&&r?fn(a):[])}return t.concat(o,fn(o,[],r))}function Bi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const dr=Math.min,qe=Math.max,dn=Math.round,oo=Math.floor,kt=e=>({x:e,y:e}),dg={left:"right",right:"left",bottom:"top",top:"bottom"},pg={start:"end",end:"start"};function Xl(e,t,r){return qe(e,dr(t,r))}function jr(e,t){return typeof e=="function"?e(t):e}function Gt(e){return e.split("-")[0]}function pn(e){return e.split("-")[1]}function Zl(e){return e==="x"?"y":"x"}function Ql(e){return e==="y"?"height":"width"}function pr(e){return["top","bottom"].includes(Gt(e))?"y":"x"}function eu(e){return Zl(pr(e))}function mg(e,t,r){r===void 0&&(r=!1);const n=pn(e),o=eu(e),i=Ql(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=io(s)),[s,io(s)]}function hg(e){const t=io(e);return[Ui(e),t,Ui(t)]}function Ui(e){return e.replace(/start|end/g,t=>pg[t])}function gg(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function yg(e,t,r,n){const o=pn(e);let i=gg(Gt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ui)))),i}function io(e){return e.replace(/left|right|bottom|top/g,t=>dg[t])}function bg(e){return{top:0,right:0,bottom:0,left:0,...e}}function xg(e){return typeof e!="number"?bg(e):{top:e,right:e,bottom:e,left:e}}function so(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function tu(e,t,r){let{reference:n,floating:o}=e;const i=pr(t),s=eu(t),a=Ql(s),l=Gt(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let m;switch(l){case"top":m={x:c,y:n.y-o.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(pn(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}const vg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=tu(u,n,l),h=n,m={},d=0;for(let y=0;y<a.length;y++){const{name:x,fn:b}=a[y],{x:w,y:v,data:E,reset:k}=await b({x:c,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=w??c,f=v??f,m={...m,[x]:{...m[x],...E}},k&&d<=50&&(d++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:f}=tu(u,h,l)),y=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:m}};async function ao(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=jr(t,e),d=xg(m),x=a[h?f==="floating"?"reference":"floating":f],b=so(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},k=so(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-k.top+d.top)/E.y,bottom:(k.bottom-b.bottom+d.bottom)/E.y,left:(b.left-k.left+d.left)/E.x,right:(k.right-b.right+d.right)/E.x}}const wg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:y=!0,...x}=jr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Gt(o),w=pr(a),v=Gt(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(v||!y?[io(a)]:hg(a)),T=d!=="none";!h&&T&&k.push(...yg(a,y,d,E));const C=[a,...k],O=await ao(t,x),j=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&j.push(O[b]),f){const H=mg(o,s,E);j.push(O[H[0]],O[H[1]])}if(D=[...D,{placement:o,overflows:j}],!j.every(H=>H<=0)){var N,L;const H=(((N=i.flip)==null?void 0:N.index)||0)+1,J=C[H];if(J)return{data:{index:H,overflows:D},reset:{placement:J}};let z=(L=D.filter(X=>X.overflows[0]<=0).sort((X,K)=>X.overflows[1]-K.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(m){case"bestFit":{var R;const X=(R=D.filter(K=>{if(T){const Q=pr(K.placement);return Q===w||Q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Q=>Q>0).reduce((Q,re)=>Q+re,0)]).sort((K,Q)=>K[1]-Q[1])[0])==null?void 0:R[0];X&&(z=X);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};async function Eg(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Gt(r),a=pn(r),l=pr(r)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=jr(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(m=a==="end"?d*-1:d),l?{x:m*c,y:h*u}:{x:h*u,y:m*c}}const Tg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Eg(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},_g=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...l}=jr(e,t),u={x:r,y:n},c=await ao(t,l),f=pr(Gt(o)),h=Zl(f);let m=u[h],d=u[f];if(i){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+c[x],v=m-c[b];m=Xl(w,m,v)}if(s){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=d+c[x],v=d-c[b];d=Xl(w,d,v)}const y=a.fn({...t,[h]:m,[f]:d});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[h]:i,[f]:s}}}}}},Sg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=jr(e,t),c=await ao(t,u),f=Gt(o),h=pn(o),m=pr(o)==="y",{width:d,height:y}=i.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const w=y-c.top-c.bottom,v=d-c.left-c.right,E=dr(y-c[x],w),k=dr(d-c[b],v),T=!t.middlewareData.shift;let C=E,O=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(O=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=w),T&&!h){const D=qe(c.left,0),N=qe(c.right,0),L=qe(c.top,0),R=qe(c.bottom,0);m?O=d-2*(D!==0||N!==0?D+N:qe(c.left,c.right)):C=y-2*(L!==0||R!==0?L+R:qe(c.top,c.bottom))}await l({...t,availableWidth:O,availableHeight:C});const j=await s.getDimensions(a.floating);return d!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function ru(e){const t=yt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ct(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=dn(r)!==i||dn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function zi(e){return ze(e)?e:e.contextElement}function $r(e){const t=zi(e);if(!Ct(t))return kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=ru(t);let s=(i?dn(r.width):r.width)/n,a=(i?dn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Cg=kt(0);function nu(e){const t=at(e);return!Vi()||!t.visualViewport?Cg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kg(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function mr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=zi(e);let s=kt(1);t&&(n?ze(n)&&(s=$r(n)):s=$r(e));const a=kg(i,r,n)?nu(i):kt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const h=at(i),m=n&&ze(n)?at(n):n;let d=h,y=Bi(d);for(;y&&n&&m!==d;){const x=$r(y),b=y.getBoundingClientRect(),w=yt(y),v=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,E=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=v,u+=E,d=at(y),y=Bi(d)}}return so({width:c,height:f,x:l,y:u})}function qi(e,t){const r=no(e).scrollLeft;return t?t.left+r:mr(St(e)).left+r}function ou(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:qi(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function Og(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=St(n),a=t?ro(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=kt(1);const c=kt(0),f=Ct(n);if((f||!f&&!i)&&((Fr(n)!=="body"||cn(s))&&(l=no(n)),Ct(n))){const m=mr(n);u=$r(n),c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}const h=s&&!f&&!i?ou(s,l,!0):kt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Fg(e){return Array.from(e.getClientRects())}function Ag(e){const t=St(e),r=no(e),n=e.ownerDocument.body,o=qe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=qe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+qi(e);const a=-r.scrollTop;return yt(n).direction==="rtl"&&(s+=qe(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function jg(e,t){const r=at(e),n=St(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Vi();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function $g(e,t){const r=mr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Ct(e)?$r(e):kt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:s,height:a,x:l,y:u}}function iu(e,t,r){let n;if(t==="viewport")n=jg(e,r);else if(t==="document")n=Ag(St(e));else if(ze(t))n=$g(t,r);else{const o=nu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return so(n)}function su(e,t){const r=Jt(e);return r===t||!ze(r)||Ar(r)?!1:yt(r).position==="fixed"||su(r,t)}function Ng(e,t){const r=t.get(e);if(r)return r;let n=fn(e,[],!1).filter(a=>ze(a)&&Fr(a)!=="body"),o=null;const i=yt(e).position==="fixed";let s=i?Jt(e):e;for(;ze(s)&&!Ar(s);){const a=yt(s),l=Ri(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||cn(s)&&!l&&su(e,s))?n=n.filter(c=>c!==s):o=a,s=Jt(s)}return t.set(e,n),n}function Pg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?ro(t)?[]:Ng(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,c)=>{const f=iu(t,c,o);return u.top=qe(f.top,u.top),u.right=dr(f.right,u.right),u.bottom=dr(f.bottom,u.bottom),u.left=qe(f.left,u.left),u},iu(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dg(e){const{width:t,height:r}=ru(e);return{width:t,height:r}}function Lg(e,t,r){const n=Ct(t),o=St(t),i=r==="fixed",s=mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kt(0);if(n||!n&&!i)if((Fr(t)!=="body"||cn(o))&&(a=no(t)),n){const h=mr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=qi(o));const u=o&&!n&&!i?ou(o,a):kt(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Hi(e){return yt(e).position==="static"}function au(e,t){if(!Ct(e)||yt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return St(e)===r&&(r=r.ownerDocument.body),r}function lu(e,t){const r=at(e);if(ro(e))return r;if(!Ct(e)){let o=Jt(e);for(;o&&!Ar(o);){if(ze(o)&&!Hi(o))return o;o=Jt(o)}return r}let n=au(e,t);for(;n&&ug(n)&&Hi(n);)n=au(n,t);return n&&Ar(n)&&Hi(n)&&!Ri(n)?r:n||cg(e)||r}const Ig=async function(e){const t=this.getOffsetParent||lu,r=this.getDimensions,n=await r(e.floating);return{reference:Lg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Mg(e){return yt(e).direction==="rtl"}const Rg={convertOffsetParentRelativeRectToViewportRelativeRect:Og,getDocumentElement:St,getClippingRect:Pg,getOffsetParent:lu,getElementRects:Ig,getClientRects:Fg,getDimensions:Dg,getScale:$r,isElement:ze,isRTL:Mg};function Vg(e,t){let r=null,n;const o=St(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=oo(c),d=oo(o.clientWidth-(u+f)),y=oo(o.clientHeight-(c+h)),x=oo(u),w={rootMargin:-m+"px "+-d+"px "+-y+"px "+-x+"px",threshold:qe(0,dr(1,l))||1};let v=!0;function E(k){const T=k[0].intersectionRatio;if(T!==l){if(!v)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,w)}r.observe(e)}return s(!0),i}function Bg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=zi(e),c=o||i?[...u?fn(u):[],...fn(t)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=u&&a?Vg(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),r()}),u&&!l&&m.observe(u),m.observe(t));let d,y=l?mr(e):null;l&&x();function x(){const b=mr(e);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,d=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(d)}}const Wi=ao,Ug=Tg,zg=_g,qg=wg,Hg=Sg,Wg=(e,t,r)=>{const n=new Map,o={platform:Rg,...r},i={...o.platform,_c:n};return vg(e,t,{...o,platform:i})};var lo=typeof document<"u"?p.useLayoutEffect:p.useEffect;function uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!uo(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!uo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cu(e,t){const r=uu(e);return Math.round(t*r)/r}function Ki(e){const t=A.useRef(e);return lo(()=>{t.current=e}),t}function Kg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=A.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=A.useState(n);uo(h,n)||m(n);const[d,y]=A.useState(null),[x,b]=A.useState(null),w=A.useCallback(K=>{K!==T.current&&(T.current=K,y(K))},[]),v=A.useCallback(K=>{K!==C.current&&(C.current=K,b(K))},[]),E=i||d,k=s||x,T=A.useRef(null),C=A.useRef(null),O=A.useRef(c),j=l!=null,D=Ki(l),N=Ki(o),L=Ki(u),R=A.useCallback(()=>{if(!T.current||!C.current)return;const K={placement:t,strategy:r,middleware:h};N.current&&(K.platform=N.current),Wg(T.current,C.current,K).then(Q=>{const re={...Q,isPositioned:L.current!==!1};H.current&&!uo(O.current,re)&&(O.current=re,jn.flushSync(()=>{f(re)}))})},[h,t,r,N,L]);lo(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[u]);const H=A.useRef(!1);lo(()=>(H.current=!0,()=>{H.current=!1}),[]),lo(()=>{if(E&&(T.current=E),k&&(C.current=k),E&&k){if(D.current)return D.current(E,k,R);R()}},[E,k,R,D,j]);const J=A.useMemo(()=>({reference:T,floating:C,setReference:w,setFloating:v}),[w,v]),z=A.useMemo(()=>({reference:E,floating:k}),[E,k]),X=A.useMemo(()=>{const K={position:r,left:0,top:0};if(!z.floating)return K;const Q=cu(z.floating,c.x),re=cu(z.floating,c.y);return a?{...K,transform:"translate("+Q+"px, "+re+"px)",...uu(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:re}},[r,a,z.floating,c.x,c.y]);return A.useMemo(()=>({...c,update:R,refs:J,elements:z,floatingStyles:X}),[c,R,J,z,X])}const fu=(e,t)=>({...Ug(e),options:[e,t]}),Yg=(e,t)=>({...zg(e),options:[e,t]}),Jg=(e,t)=>({...qg(e),options:[e,t]}),Gg=(e,t)=>({...Hg(e),options:[e,t]}),du={...A},Xg=du.useInsertionEffect||(e=>e());function pu(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xg(()=>{t.current=e}),A.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Yi=typeof document<"u"?p.useLayoutEffect:p.useEffect;let mu=!1,Zg=0;const hu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zg++;function Qg(){const[e,t]=A.useState(()=>mu?hu():void 0);return Yi(()=>{e==null&&t(hu())},[]),A.useEffect(()=>{mu=!0},[]),e}const ey=du.useId||Qg;let mn;process.env.NODE_ENV!=="production"&&(mn=new Set);function ty(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=mn)!=null&&e.has(o))){var i;(i=mn)==null||i.add(o),console.warn(o)}}function ry(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=mn)!=null&&e.has(o))){var i;(i=mn)==null||i.add(o),console.error(o)}}function ny(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const oy=A.createContext(null),iy=A.createContext(null),sy=()=>{var e;return((e=A.useContext(oy))==null?void 0:e.id)||null},ay=()=>A.useContext(iy),ly="data-floating-ui-focusable";function uy(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=ey(),i=A.useRef({}),[s]=A.useState(()=>ny()),a=sy()!=null;if(process.env.NODE_ENV!=="production"){const m=n.reference;m&&!ze(m)&&ry("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=A.useState(n.reference),c=pu((m,d,y)=>{i.current.openEvent=m?d:void 0,s.emit("openchange",{open:m,event:d,reason:y,nested:a}),r==null||r(m,d,y)}),f=A.useMemo(()=>({setPositionReference:u}),[]),h=A.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:h,events:s,floatingId:o,refs:f}),[t,c,h,s,o,f])}function cy(e){e===void 0&&(e={});const{nodeId:t}=e,r=uy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),c=(o==null?void 0:o.domReference)||i,f=A.useRef(null),h=ay();Yi(()=>{c&&(f.current=c)},[c]);const m=Kg({...e,elements:{...o,...a&&{reference:a}}}),d=A.useCallback(v=>{const E=ze(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(E),m.refs.setReference(E)},[m.refs]),y=A.useCallback(v=>{(ze(v)||v===null)&&(f.current=v,s(v)),(ze(m.refs.reference.current)||m.refs.reference.current===null||v!==null&&!ze(v))&&m.refs.setReference(v)},[m.refs]),x=A.useMemo(()=>({...m.refs,setReference:y,setPositionReference:d,domReference:f}),[m.refs,y,d]),b=A.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),w=A.useMemo(()=>({...m,...n,refs:x,elements:b,nodeId:t}),[m,x,b,t,n]);return Yi(()=>{n.dataRef.current.floatingContext=w;const v=h==null?void 0:h.nodesRef.current.find(E=>E.id===t);v&&(v.context=w)}),A.useMemo(()=>({...m,context:w,refs:x,elements:b}),[m,x,b,w])}const gu="active",yu="selected";function Ji(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[gu]:s,[yu]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[ly]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[gu,yu].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),s[u]=function(){for(var h,m=arguments.length,d=new Array(m),y=0;y<m;y++)d[y]=arguments[y];return(h=n.get(u))==null?void 0:h.map(x=>x(...d)).find(x=>x!==void 0)}}}else s[u]=c}),s),{})}}function fy(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=A.useCallback(a=>Ji(a,e,"reference"),t),i=A.useCallback(a=>Ji(a,e,"floating"),r),s=A.useCallback(a=>Ji(a,e,"item"),n);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function bu(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const dy=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=jr(e,t),{rects:f,elements:{floating:h}}=t,m=r.current[s],d=(u==null?void 0:u.current)||h,y=h.clientTop||d.clientTop,x=h.clientTop!==0,b=d.clientTop!==0,w=h===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||ty('`placement` side must be "bottom" when using the `inner`',"middleware.")),!m)return{};const v={...t,...await fu(-m.offsetTop-h.clientTop-f.reference.height/2-m.offsetHeight/2-i).fn(t)},E=await Wi(bu(v,d.scrollHeight+y+h.clientTop),c),k=await Wi(v,{...c,elementContext:"reference"}),T=qe(0,E.top),C=v.y+T,D=(d.scrollHeight>d.clientHeight?N=>N:dn)(qe(0,d.scrollHeight+(x&&w||b?y*2:0)-T-qe(0,E.bottom)));if(d.style.maxHeight=D+"px",d.scrollTop=T,o){const N=d.offsetHeight<m.offsetHeight*dr(a,r.current.length)-1||k.top>=-l||k.bottom>=-l;jn.flushSync(()=>o(N))}return n&&(n.current=await Wi(bu({...v,y:C},d.offsetHeight+y+h.clientTop),c)),{y:C}}});function py(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=pu(a),u=A.useRef(!1),c=A.useRef(null),f=A.useRef(null);A.useEffect(()=>{if(!o)return;function m(y){if(y.ctrlKey||!d||i.current==null)return;const x=y.deltaY,b=i.current.top>=-.5,w=i.current.bottom>=-.5,v=d.scrollHeight-d.clientHeight,E=x<0?-1:1,k=x<0?"max":"min";d.scrollHeight<=d.clientHeight||(!b&&x>0||!w&&x<0?(y.preventDefault(),jn.flushSync(()=>{l(T=>T+Math[k](x,v*E))})):/firefox/i.test(fg())&&(d.scrollTop+=x))}const d=(s==null?void 0:s.current)||n.floating;if(r&&d)return d.addEventListener("wheel",m),requestAnimationFrame(()=>{c.current=d.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,d.removeEventListener("wheel",m)}},[o,r,n.floating,i,s,l]);const h=A.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const m=(s==null?void 0:s.current)||n.floating;if(!(!i.current||!m||!u.current)){if(c.current!==null){const d=m.scrollTop-c.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&jn.flushSync(()=>l(y=>y+d))}requestAnimationFrame(()=>{c.current=m.scrollTop})}}}),[n.floating,l,i,s]);return A.useMemo(()=>o?{floating:h}:{},[o,h])}let Nr=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Nr.displayName="FloatingContext";let Gi=p.createContext(null);Gi.displayName="PlacementContext";function my(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function hy(){return p.useContext(Nr).setReference}function gy(){return p.useContext(Nr).getReferenceProps}function yy(){let{getFloatingProps:e,slot:t}=p.useContext(Nr);return p.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function by(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Gi),r=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);be(()=>{t==null||t(r??null)},[t,r]);let n=p.useContext(Nr);return p.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let xu=4;function xy({children:e,enabled:t=!0}){let[r,n]=p.useState(null),[o,i]=p.useState(0),s=p.useRef(null),[a,l]=p.useState(null);vy(a);let u=t&&r!==null&&a!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:m=0,inner:d}=wy(r,a),[y,x="center"]=c.split(" ");be(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:w,context:v}=cy({open:u,placement:y==="selection"?x==="center"?"bottom":`bottom-${x}`:x==="center"?`${y}`:`${y}-${x}`,strategy:"absolute",transform:!1,middleware:[fu({mainAxis:y==="selection"?0:f,crossAxis:h}),Yg({padding:m}),y!=="selection"&&Jg({padding:m}),y==="selection"&&d?dy({...d,padding:m,overflowRef:s,offset:o,minItemsVisible:xu,referenceOverflowThreshold:m,onFallbackChange(N){var L,R;if(!N)return;let H=v.elements.floating;if(!H)return;let J=parseFloat(getComputedStyle(H).scrollPaddingBottom)||0,z=Math.min(xu,H.childElementCount),X=0,K=0;for(let Q of(R=(L=v.elements.floating)==null?void 0:L.childNodes)!=null?R:[])if(Q instanceof HTMLElement){let re=Q.offsetTop,je=re+Q.clientHeight+J,De=H.scrollTop,W=De+H.clientHeight;if(re>=De&&je<=W)z--;else{K=Math.max(0,Math.min(je,W)-Math.max(re,De)),X=Q.clientHeight;break}}z>=1&&i(Q=>{let re=X*z-K+J;return Q>=re?Q:re})}}):null,Gg({padding:m,apply({availableWidth:N,availableHeight:L,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${N}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${L}px)`})}})].filter(Boolean),whileElementsMounted:Bg}),[E=y,k=x]=v.placement.split("-");y==="selection"&&(E="selection");let T=p.useMemo(()=>({anchor:[E,k].filter(Boolean).join(" ")}),[E,k]),C=py(v,{overflowRef:s,onChange:i}),{getReferenceProps:O,getFloatingProps:j}=fy([C]),D=te(N=>{l(N),b.setFloating(N)});return A.createElement(Gi.Provider,{value:n},A.createElement(Nr.Provider,{value:{setFloating:D,setReference:b.setReference,styles:w,getReferenceProps:O,getFloatingProps:j,slot:T}},e))}function vy(e){be(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function wy(e,t){var r,n,o;let i=Xi((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),s=Xi((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),a=Xi((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function Xi(e,t,r=void 0){let n=ur(),o=te((l,u)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[r,null];let c=wu(l,u);return[c,f=>{let h=vu(l);{let m=h.map(d=>window.getComputedStyle(u).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let y=!1;for(let[b,w]of h.entries()){let v=window.getComputedStyle(u).getPropertyValue(w);if(m[b]!==v){m[b]=v,y=!0;break}}if(!y)return;let x=wu(l,u);c!==x&&(f(x),c=x)})}return n.dispose}]}return[r,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[s=i,a]=p.useState();return be(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function vu(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...vu(o)]:[n]}return[]}function wu(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Ey(e,t){let[r,n]=p.useState(t);return!e&&r!==t&&n(t),e?r:t}let Zi=p.createContext(null);Zi.displayName="OpenClosedContext";var bt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(bt||{});function Qi(){return p.useContext(Zi)}function Eu({value:e,children:t}){return p.createElement(Zi.Provider,{value:e},t)}function Ty(e){throw new Error("Unexpected object: "+e)}var Ae=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ae||{});function es(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:Ty(e)}}function _y(e){let t=te(e),r=p.useRef(!1);p.useEffect(()=>(r.current=!1,()=>{r.current=!0,El(()=>{r.current&&t()})}),[t])}function Sy(){let e=typeof document>"u";return"useSyncExternalStore"in A?(t=>t.useSyncExternalStore)(A)(()=>()=>{},()=>!1,()=>!e):!1}function ts(){let e=Sy(),[t,r]=A.useState(lr.isHandoffComplete);return t&&lr.isHandoffComplete===!1&&r(!1),A.useEffect(()=>{t!==!0&&r(!0)},[t]),A.useEffect(()=>lr.handoff(),[]),e?!1:t}let Cy=p.createContext(!1);function ky(){return p.useContext(Cy)}function Oy(e){let t=ky(),r=p.useContext(_u),n=Mi(e),[o,i]=p.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(lr.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return p.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),p.useEffect(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}let Tu=p.Fragment,Fy=et(function(e,t){let r=e,n=p.useRef(null),o=pt(xh(f=>{n.current=f}),t),i=Mi(n),s=Oy(n),[a]=p.useState(()=>{var f;return lr.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),l=p.useContext(Ny),u=ts();be(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),be(()=>{if(a&&l)return l.register(a)},[l,a]),_y(()=>{var f;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=st();return u?!s||!a?null:_t.createPortal(c({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:Tu,name:"Portal"}),a):null});function Ay(e,t){let r=pt(t),{enabled:n=!0,...o}=e,i=st();return n?p.createElement(Fy,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:Tu,name:"Portal"})}let jy=p.Fragment,_u=p.createContext(null);function $y(e,t){let{target:r,...n}=e,o={ref:pt(t)},i=st();return p.createElement(_u.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:jy,name:"Popover.Group"}))}let Ny=p.createContext(null),Py=et(Ay),Dy=et($y),Ly=Object.assign(Py,{Group:Dy});function Iy(){let e=p.useRef(!1);return be(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Su(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:ku)!==p.Fragment||p.Children.count(e.children)===1}let co=p.createContext(null);co.displayName="TransitionContext";var My=(e=>(e.Visible="visible",e.Hidden="hidden",e))(My||{});function Ry(){let e=p.useContext(co);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Vy(){let e=p.useContext(fo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let fo=p.createContext(null);fo.displayName="NestingContext";function po(e){return"children"in e?po(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Cu(e,t){let r=cr(e),n=p.useRef([]),o=Iy(),i=ur(),s=te((m,d=Kt.Hidden)=>{let y=n.current.findIndex(({el:x})=>x===m);y!==-1&&(gt(d,{[Kt.Unmount](){n.current.splice(y,1)},[Kt.Hidden](){n.current[y].state="hidden"}}),i.microTask(()=>{var x;!po(n)&&o.current&&((x=r.current)==null||x.call(r))}))}),a=te(m=>{let d=n.current.find(({el:y})=>y===m);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:m,state:"visible"}),()=>s(m,Kt.Unmount)}),l=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[]}),f=te((m,d,y)=>{l.current.splice(0),t&&(t.chains.current[d]=t.chains.current[d].filter(([x])=>x!==m)),t==null||t.chains.current[d].push([m,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[d].push([m,new Promise(x=>{Promise.all(c.current[d].map(([b,w])=>w)).then(()=>x())})]),d==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(d)):y(d)}),h=te((m,d,y)=>{Promise.all(c.current[d].splice(0).map(([x,b])=>b)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>y(d))});return p.useMemo(()=>({children:n,register:a,unregister:s,onStart:f,onStop:h,wait:u,chains:c}),[a,s,n,f,h,c,u])}let ku=p.Fragment,Ou=Zn.RenderStrategy;function By(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:m,leaveFrom:d,leaveTo:y,...x}=e,[b,w]=p.useState(null),v=p.useRef(null),E=Su(e),k=pt(...E?[v,t,w]:t===null?[]:[t]),T=(r=x.unmount)==null||r?Kt.Unmount:Kt.Hidden,{show:C,appear:O,initial:j}=Ry(),[D,N]=p.useState(C?"visible":"hidden"),L=Vy(),{register:R,unregister:H}=L;be(()=>R(v),[R,v]),be(()=>{if(T===Kt.Hidden&&v.current){if(C&&D!=="visible"){N("visible");return}return gt(D,{hidden:()=>H(v),visible:()=>R(v)})}},[D,v,R,H,C,T]);let J=ts();be(()=>{if(E&&J&&D==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,D,J,E]);let z=j&&!O,X=O&&C&&j,K=p.useRef(!1),Q=Cu(()=>{K.current||(N("hidden"),H(v))},L),re=te($e=>{K.current=!0;let Se=$e?"enter":"leave";Q.onStart(v,Se,Le=>{Le==="enter"?i==null||i():Le==="leave"&&(a==null||a())})}),je=te($e=>{let Se=$e?"enter":"leave";K.current=!1,Q.onStop(v,Se,Le=>{Le==="enter"?s==null||s():Le==="leave"&&(l==null||l())}),Se==="leave"&&!po(Q)&&(N("hidden"),H(v))});p.useEffect(()=>{E&&o||(re(C),je(C))},[C,E,o]);let De=!(!o||!E||!J||z),[,W]=Kl(De,b,C,{start:re,end:je}),we=Yt({ref:k,className:((n=Fi(x.className,X&&u,X&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&m,W.leave&&!W.closed&&d,W.leave&&W.closed&&y,!W.transition&&C&&h))==null?void 0:n.trim())||void 0,...Wl(W)}),_e=0;D==="visible"&&(_e|=bt.Open),D==="hidden"&&(_e|=bt.Closed),W.enter&&(_e|=bt.Opening),W.leave&&(_e|=bt.Closing);let ae=st();return p.createElement(fo.Provider,{value:Q},p.createElement(Eu,{value:_e},ae({ourProps:we,theirProps:x,defaultTag:ku,features:Ou,visible:D==="visible",name:"Transition.Child"})))}function Uy(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,s=p.useRef(null),a=Su(e),l=pt(...a?[s,t]:t===null?[]:[t]);ts();let u=Qi();if(r===void 0&&u!==null&&(r=(u&bt.Open)===bt.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=p.useState(r?"visible":"hidden"),h=Cu(()=>{r||f("hidden")}),[m,d]=p.useState(!0),y=p.useRef([r]);be(()=>{m!==!1&&y.current[y.current.length-1]!==r&&(y.current.push(r),d(!1))},[y,r]);let x=p.useMemo(()=>({show:r,appear:n,initial:m}),[r,n,m]);be(()=>{r?f("visible"):!po(h)&&s.current!==null&&f("hidden")},[r,h]);let b={unmount:o},w=te(()=>{var k;m&&d(!1),(k=e.beforeEnter)==null||k.call(e)}),v=te(()=>{var k;m&&d(!1),(k=e.beforeLeave)==null||k.call(e)}),E=st();return p.createElement(fo.Provider,{value:h},p.createElement(co.Provider,{value:x},E({ourProps:{...b,as:p.Fragment,children:p.createElement(Fu,{ref:l,...b,...i,beforeEnter:w,beforeLeave:v})},theirProps:{},defaultTag:p.Fragment,features:Ou,visible:c==="visible",name:"Transition"})))}function zy(e,t){let r=p.useContext(co)!==null,n=Qi()!==null;return p.createElement(p.Fragment,null,!r&&n?p.createElement(rs,{ref:t,...e}):p.createElement(Fu,{ref:t,...e}))}let rs=et(Uy),Fu=et(By),qy=et(zy),Au=Object.assign(rs,{Child:qy,Root:rs});function Hy(e,t){let r=p.useRef({left:0,top:0});if(be(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(r.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}let ju=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function $u(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return ju.test(s)&&(s=s.replace(ju,"")),s}function Wy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():$u(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return $u(e).trim()}function Ky(e){let t=p.useRef(""),r=p.useRef("");return te(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Wy(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var Yy=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Yy||{}),Jy=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Jy||{}),Gy=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Gy||{}),Xy=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Xy||{});function ns(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Vl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let Zy={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(o=>r(o.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,n,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===Ae.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Ae.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Ae.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=es(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});if(h!==null){let m=e.options[h].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===m.current||((o=m.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:h}}}}else if(t.focus===Ae.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=es(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});if(h!==null){let m=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===m.current||((s=m.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:h}}}}let l=ns(e),u=es(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=ns(e,o=>[...o,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=ns(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},os=p.createContext(null);os.displayName="ListboxActionsContext";function mo(e){let t=p.useContext(os);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,mo),r}return t}let ho=p.createContext(null);ho.displayName="ListboxDataContext";function hn(e){let t=p.useContext(ho);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hn),r}return t}function Qy(e,t){return gt(t.type,Zy,e,t)}let e0=p.Fragment;function t0(e,t){var r;let n=Oi(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:f=n||!1,horizontal:h=!1,multiple:m=!1,__demoMode:d=!1,...y}=e;const x=h?"horizontal":"vertical";let b=pt(t),w=lh(i),[v=m?[]:void 0,E]=ah(o,l,w),[k,T]=p.useReducer(Qy,{dataRef:p.createRef(),listboxState:d?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:d}),C=p.useRef({static:!1,hold:!1}),O=p.useRef(new Map),j=Ah(u),D=p.useCallback(oe=>gt(N.mode,{1:()=>v.some(ye=>j(ye,oe)),0:()=>j(v,oe)}),[v]),N=p.useMemo(()=>({...k,value:v,disabled:f,invalid:c,mode:m?1:0,orientation:x,compare:j,isSelected:D,optionsPropsRef:C,listRef:O}),[v,f,c,m,k,O]);be(()=>{k.dataRef.current=N},[N]);let L=N.listboxState===0;Jh(L,[N.buttonElement,N.optionsElement],(oe,ye)=>{var Ne;T({type:1}),Rl(ye,Ii.Loose)||(oe.preventDefault(),(Ne=N.buttonElement)==null||Ne.focus())});let R=p.useMemo(()=>({open:N.listboxState===0,disabled:f,invalid:c,value:v}),[N,f,v,c]),H=te(oe=>{let ye=N.options.find(Ne=>Ne.id===oe);ye&&je(ye.dataRef.current.value)}),J=te(()=>{if(N.activeOptionIndex!==null){let{dataRef:oe,id:ye}=N.options[N.activeOptionIndex];je(oe.current.value),T({type:2,focus:Ae.Specific,id:ye})}}),z=te(()=>T({type:0})),X=te(()=>T({type:1})),K=ur(),Q=te((oe,ye,Ne)=>{K.dispose(),K.microTask(()=>oe===Ae.Specific?T({type:2,focus:Ae.Specific,id:ye,trigger:Ne}):T({type:2,focus:oe,trigger:Ne}))}),re=te((oe,ye)=>(T({type:5,id:oe,dataRef:ye}),()=>T({type:6,id:oe}))),je=te(oe=>gt(N.mode,{0(){return E==null?void 0:E(oe)},1(){let ye=N.value.slice(),Ne=ye.findIndex(qt=>j(qt,oe));return Ne===-1?ye.push(oe):ye.splice(Ne,1),E==null?void 0:E(ye)}})),De=te(oe=>T({type:3,value:oe})),W=te(()=>T({type:4})),we=te(oe=>{T({type:7,element:oe})}),_e=te(oe=>{T({type:8,element:oe})}),ae=p.useMemo(()=>({onChange:je,registerOption:re,goToOption:Q,closeListbox:X,openListbox:z,selectActiveOption:J,selectOption:H,search:De,clearSearch:W,setButtonElement:we,setOptionsElement:_e}),[]),[$e,Se]=_h({inherit:!0}),Le={ref:b},wt=p.useCallback(()=>{if(w!==void 0)return E==null?void 0:E(w)},[E,w]),Ce=st();return p.createElement(Se,{value:$e,props:{htmlFor:(r=N.buttonElement)==null?void 0:r.id},slot:{open:N.listboxState===0,disabled:f}},p.createElement(xy,null,p.createElement(os.Provider,{value:ae},p.createElement(ho.Provider,{value:N},p.createElement(Eu,{value:gt(N.listboxState,{0:bt.Open,1:bt.Closed})},a!=null&&v!=null&&p.createElement(mh,{disabled:f,data:{[a]:v},form:s,onReset:wt}),Ce({ourProps:Le,theirProps:y,slot:R,defaultTag:e0,name:"Listbox"}))))))}let r0="button";function n0(e,t){var r;let n=hn("Listbox.Button"),o=mo("Listbox.Button"),i=p.useId(),s=Fl(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=n.disabled||!1,autoFocus:u=!1,...c}=e,f=pt(t,hy(),o.setButtonElement),h=gy(),m=te(N=>{switch(N.key){case Pe.Enter:uh(N.currentTarget);break;case Pe.Space:case Pe.ArrowDown:N.preventDefault(),_t.flushSync(()=>o.openListbox()),n.value||o.goToOption(Ae.First);break;case Pe.ArrowUp:N.preventDefault(),_t.flushSync(()=>o.openListbox()),n.value||o.goToOption(Ae.Last);break}}),d=te(N=>{switch(N.key){case Pe.Space:N.preventDefault();break}}),y=te(N=>{var L;if(yh(N.currentTarget))return N.preventDefault();n.listboxState===0?(_t.flushSync(()=>o.closeListbox()),(L=n.buttonElement)==null||L.focus({preventScroll:!0})):(N.preventDefault(),o.openListbox())}),x=te(N=>N.preventDefault()),b=Nl([a]),w=vh(),{isFocusVisible:v,focusProps:E}=Jm({autoFocus:u}),{isHovered:k,hoverProps:T}=Ym({isDisabled:l}),{pressed:C,pressProps:O}=th({disabled:l}),j=p.useMemo(()=>({open:n.listboxState===0,active:C||n.listboxState===0,disabled:l,invalid:n.invalid,value:n.value,hover:k,focus:v,autofocus:u}),[n.listboxState,n.value,l,k,v,C,n.invalid,u]),D=_l(h(),{ref:f,id:a,type:Gh(e,n.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.listboxState===0,"aria-labelledby":b,"aria-describedby":w,disabled:l||void 0,autoFocus:u,onKeyDown:m,onKeyUp:d,onKeyPress:x,onClick:y},E,T,O);return st()({ourProps:D,theirProps:c,slot:j,defaultTag:r0,name:"Listbox.Button"})}let Nu=p.createContext(!1),o0="div",i0=Zn.RenderStrategy|Zn.Static;function s0(e,t){var r,n;let o=p.useId(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,f=my(s),[h,m]=p.useState(null);f&&(a=!0);let d=hn("Listbox.Options"),y=mo("Listbox.Options"),x=Mi(d.optionsElement),b=Qi(),[w,v]=Kl(u,h,b!==null?(b&bt.Open)===bt.Open:d.listboxState===0);Lh(w,d.buttonElement,y.closeListbox);let E=d.__demoMode?!1:l&&d.listboxState===0;rg(E,x);let k=d.__demoMode?!1:l&&d.listboxState===0;Dh(k,{allowed:p.useCallback(()=>[d.buttonElement,d.optionsElement],[d.buttonElement,d.optionsElement])});let T=d.listboxState!==0,C=Hy(T,d.buttonElement)?!1:w,O=w&&d.listboxState===1,j=Ey(O,d.value),D=te(W=>d.compare(j,W)),N=p.useMemo(()=>{var W;if(f==null||!((W=f==null?void 0:f.to)!=null&&W.includes("selection")))return null;let we=d.options.findIndex(_e=>D(_e.dataRef.current.value));return we===-1&&(we=0),we},[f,d.options]),L=(()=>{if(f==null)return;if(N===null)return{...f,inner:void 0};let W=Array.from(d.listRef.current.values());return{...f,inner:{listRef:{current:W},index:N}}})(),[R,H]=by(L),J=yy(),z=pt(t,f?R:null,y.setOptionsElement,m),X=ur();p.useEffect(()=>{var W;let we=d.optionsElement;we&&d.listboxState===0&&we!==((W=an(we))==null?void 0:W.activeElement)&&(we==null||we.focus({preventScroll:!0}))},[d.listboxState,d.optionsElement]);let K=te(W=>{var we,_e;switch(X.dispose(),W.key){case Pe.Space:if(d.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),y.search(W.key);case Pe.Enter:if(W.preventDefault(),W.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:ae}=d.options[d.activeOptionIndex];y.onChange(ae.current.value)}d.mode===0&&(_t.flushSync(()=>y.closeListbox()),(we=d.buttonElement)==null||we.focus({preventScroll:!0}));break;case gt(d.orientation,{vertical:Pe.ArrowDown,horizontal:Pe.ArrowRight}):return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Next);case gt(d.orientation,{vertical:Pe.ArrowUp,horizontal:Pe.ArrowLeft}):return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Previous);case Pe.Home:case Pe.PageUp:return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.First);case Pe.End:case Pe.PageDown:return W.preventDefault(),W.stopPropagation(),y.goToOption(Ae.Last);case Pe.Escape:W.preventDefault(),W.stopPropagation(),_t.flushSync(()=>y.closeListbox()),(_e=d.buttonElement)==null||_e.focus({preventScroll:!0});return;case Pe.Tab:W.preventDefault(),W.stopPropagation(),_t.flushSync(()=>y.closeListbox()),qh(d.buttonElement,W.shiftKey?Li.Previous:Li.Next);break;default:W.key.length===1&&(y.search(W.key),X.setTimeout(()=>y.clearSearch(),350));break}}),Q=(r=d.buttonElement)==null?void 0:r.id,re=p.useMemo(()=>({open:d.listboxState===0}),[d.listboxState]),je=_l(f?J():{},{id:i,ref:z,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":Q,"aria-orientation":d.orientation,onKeyDown:K,role:"listbox",tabIndex:d.listboxState===0?0:void 0,style:{...c.style,...H,"--button-width":$h(d.buttonElement,!0).width},...Wl(v)}),De=st();return p.createElement(Ly,{enabled:a?e.static||w:!1},p.createElement(ho.Provider,{value:d.mode===1?d:{...d,isSelected:D}},De({ourProps:je,theirProps:c,slot:re,defaultTag:o0,features:i0,visible:C,name:"Listbox.Options"})))}let a0="div";function l0(e,t){let r=p.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...s}=e,a=p.useContext(Nu)===!0,l=hn("Listbox.Option"),u=mo("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===n:!1,f=l.isSelected(i),h=p.useRef(null),m=Ky(h),d=cr({disabled:o,value:i,domRef:h,get textValue(){return m()}}),y=pt(t,h,j=>{j?l.listRef.current.set(n,j):l.listRef.current.delete(n)});be(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Vt().requestAnimationFrame(()=>{var j,D;(D=(j=h.current)==null?void 0:j.scrollIntoView)==null||D.call(j,{block:"nearest"})})},[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),be(()=>{if(!a)return u.registerOption(n,d)},[d,n,a]);let x=te(j=>{var D;if(o)return j.preventDefault();u.onChange(i),l.mode===0&&(_t.flushSync(()=>u.closeListbox()),(D=l.buttonElement)==null||D.focus({preventScroll:!0}))}),b=te(()=>{if(o)return u.goToOption(Ae.Nothing);u.goToOption(Ae.Specific,n)}),w=ng(),v=te(j=>{w.update(j),!o&&(c||u.goToOption(Ae.Specific,n,0))}),E=te(j=>{w.wasMoved(j)&&(o||c||u.goToOption(Ae.Specific,n,0))}),k=te(j=>{w.wasMoved(j)&&(o||c&&u.goToOption(Ae.Nothing))}),T=p.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&a}),[c,f,o,a]),C=a?{}:{id:n,ref:y,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:b,onPointerEnter:v,onMouseEnter:v,onPointerMove:E,onMouseMove:E,onPointerLeave:k,onMouseLeave:k},O=st();return!f&&a?null:O({ourProps:C,theirProps:s,slot:T,defaultTag:a0,name:"Listbox.Option"})}let u0=p.Fragment;function c0(e,t){let{options:r,placeholder:n,...o}=e,i={ref:pt(t)},s=hn("ListboxSelectedOption"),a=p.useMemo(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=st();return p.createElement(Nu.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,n&&l?n:r)},slot:a,defaultTag:u0,name:"ListboxSelectedOption"}))}let f0=et(t0),d0=et(n0),p0=Oh,m0=et(s0),h0=et(l0),g0=et(c0),Xt=Object.assign(f0,{Button:d0,Label:p0,Options:m0,Option:h0,SelectedOption:g0});function y0({element:e,validationData:t}){var l;const[r,n]=p.useState(e.value||[]),{register:o=()=>({}),setValue:i,getValues:s}=t||{},a=s&&s(e==null?void 0:e.id);return p.useEffect(()=>{o(e.id)},[e.id,o]),p.useEffect(()=>{i&&i(e.id,r)},[e.id,r,i]),p.useEffect(()=>{a!=null&&a.length&&!(r!=null&&r.length)&&n(a)},[a,r==null?void 0:r.length]),g.jsx("div",{className:"w-full z-10",children:g.jsx(Xt,{value:r,onChange:n,multiple:!0,children:g.jsxs("div",{className:"relative",children:[g.jsx(Xt.Button,{className:"w-full py-2 pl-3 pr-10 text-left bg-white input-control cursor-default ",children:(r==null?void 0:r.length)>0?r==null?void 0:r.map(u=>u.label).join(", "):"Select options"}),g.jsx(Au,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx(Xt.Options,{className:"absolute w-full py-1 mt-1 grid gap-y-[1px] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:(l=e==null?void 0:e.options)==null?void 0:l.map((u,c)=>g.jsx(Xt.Option,{className:({active:f})=>`cursor-default select-none relative w-full flex justify-between ${f?"text-gray-700 bg-gray-100":"text-gray-700"}`,value:u,children:({selected:f})=>g.jsxs("div",{className:`flex items-center justify-between py-2 pl-4 pr-4 w-full ${f?"bg-gray-100":""}`,children:[g.jsx("span",{className:`block truncate ${f?"font-medium":"font-normal"}`,children:u==null?void 0:u.label}),f?g.jsx("span",{className:"absolute inset-y-0 right-3 flex items-center pl-3 text-gray-600",children:"✓"}):null]})},c))})})]})})})}function b0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:ue("input-control",e==null?void 0:e.customClass),...r(e.id)})}function x0({onFileLoaded:e,disabled:t}){const[r,n]=p.useState(null),o=i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];if(!s)return;const a=new FileReader;a.onloadend=()=>{const u=a.result;e({base64:u,type:s.type,name:s.name}),n(null)},a.onerror=()=>{n("Failed to read file.")},a.readAsDataURL(s)};return g.jsxs("div",{className:"flex flex-col items-start gap-2",children:[g.jsx("input",{type:"file",onChange:o,disabled:t,className:`block w-full text-sm text-gray-500 file:mr-4 file:px-4 input-control !py-1 !pl-1\r
53
53
  file:rounded-[6px] file:py-[6px] file:border-0\r
54
54
  file:text-sm file:font-semibold\r
55
55
  file:bg-blue-50 file:text-blue-700\r
56
- hover:file:bg-blue-100`}),r&&y.jsx("p",{className:"text-red-500 text-sm",children:r})]})}const _0=["jpg","jpeg","png","gif","bmp","webp","svg","image"],Au={pdf:"/pdf-icon.png",word:"/word-icon.png",excel:"/excel-icon.png",powerpoint:"/ppt-icon.png",other:"/file-icon.png"},S0=(e="")=>{var r;const t=((r=e.split(".").pop())==null?void 0:r.toLowerCase())||"";return _0.includes(t)||e.startsWith("data:image/")?"image":["pdf"].includes(t)||e.startsWith("data:application/pdf")?"pdf":["doc","docx"].includes(t)||e.startsWith("data:application/msword")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document")?"word":["xls","xlsx","csv"].includes(t)||e.startsWith("data:application/vnd.ms-excel")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")?"excel":["ppt","pptx"].includes(t)||e.startsWith("data:application/vnd.ms-powerpoint")||e.startsWith("data:application/vnd.openxmlformats-officedocument.presentationml.presentation")?"powerpoint":["txt"].includes(t)||e.startsWith("data:text/")?"text":["zip","rar","7z","tar","gz"].includes(t)?"archive":["mp4","mkv","webm","avi","mov"].includes(t)||e.startsWith("data:video/")?"video":["mp3","wav","flac","aac","ogg"].includes(t)||e.startsWith("data:audio/")?"audio":"other"},k0=({fileUrl:e,fileName:t})=>{const[r,n]=m.useState(!1),[o,i]=m.useState("unknown");m.useEffect(()=>{e&&i(S0(e))},[e]);const s=()=>{o==="image"?n(!0):window.open(e,"_blank")},a=()=>n(!1),l=()=>{if(o==="image")return y.jsx("button",{className:"btn btn-view text-sm font-semibold",type:"button","aria-label":"Preview file",children:y.jsx("span",{children:"Preview File"})});const u=Au[o]||Au.other;return y.jsxs("div",{onClick:s,className:"cursor-pointer border border-gray-200 bg-gray-200 rounded p-2 flex flex-col items-center justify-center hover:shadow",title:`Click to ${o==="pdf"?"open":"download"} ${t||"file"}`,children:[o==="image"&&y.jsx("div",{className:"w-14 h-14 flex items-center justify-center mb-2",children:y.jsx("img",{src:u,alt:`${o} icon`,className:"max-w-full max-h-full"})}),y.jsx("div",{className:"text-xs text-gray-700 truncate w-full text-center",children:t||(e==null?void 0:e.split("/").pop())||"Unknown file"})]})};return y.jsxs("div",{className:"mt-2",children:[y.jsx("div",{onClick:s,children:l()}),r&&o==="image"&&y.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",onClick:a,children:y.jsxs("div",{className:"relative bg-white p-5 rounded-lg max-w-[90vw] max-h-[90vh] overflow-auto",onClick:u=>u.stopPropagation(),children:[y.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-2xl font-bold text-gray-700","aria-label":"Close preview",children:"×"}),y.jsx("img",{src:e||"/place.png",alt:t||"Full Image",className:"max-w-full max-h-[80vh] mx-auto object-contain"})]})})]})};function ju({element:e,validationData:t}){const[r,n]=m.useState((e==null?void 0:e.value)??null),{register:o=()=>({}),setValue:i,isReadOnly:s}=t||{};return m.useEffect(()=>{o(e.id)},[e.id,o]),y.jsxs("div",{children:[y.jsx(T0,{onFileLoaded:a=>{i(e.id,a),n(a)},disabled:s}),r&&y.jsx(k0,{fileUrl:r.base64,fileName:r.name})]})}const C0=({element:e})=>{const t=m.useMemo(()=>Array.from({length:e.grid},(r,n)=>n),[e.grid]);return y.jsx("div",{className:"grid p-3",style:{gridTemplateColumns:`repeat(${e.grid}, 1fr)`,gap:"8px"},children:t.map(r=>y.jsx("div",{className:"border rounded p-4 min-h-[80px] transition-colors hover:border-gray-400",children:r},r))})},$u=m.memo(C0);function Nu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}var ce=function(){return ce=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ce.apply(this,arguments)};function O0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function st(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ct=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},F0={k:1e3,m:1e6,b:1e9},A0=function(e,t){t===void 0&&(t=".");var r=new RegExp("(\\d+(".concat(Ct(t),"\\d*)?)([kmb])$"),"i"),n=e.match(r);if(n){var o=n[1],i=n[3],s=F0[i.toLowerCase()];return Number(o.replace(t,"."))*s}},j0=function(e,t){t===void 0&&(t=",");var r=new RegExp(Ct(t),"g");return e.replace(r,"")},$0=function(e,t){var r=Ct(t.join("")),n=new RegExp("[^\\d".concat(r,"]"),"gi");return e.replace(n,"")},os=function(e){var t=e.value,r=e.groupSeparator,n=r===void 0?",":r,o=e.decimalSeparator,i=o===void 0?".":o,s=e.allowDecimals,a=s===void 0?!0:s,l=e.decimalsLimit,u=l===void 0?2:l,c=e.allowNegativeValue,f=c===void 0?!0:c,h=e.disableAbbreviations,p=h===void 0?!1:h,d=e.prefix,g=d===void 0?"":d,x=e.transformRawValue,b=x===void 0?function(re){return re}:x,v=b(t);if(v==="-")return v;var w=p?[]:["k","m","b"],_=new RegExp("((^|\\D)-\\d)|(-".concat(Ct(g),")")),k=_.test(v),S=RegExp("(\\d+)-?".concat(Ct(g))).exec(t)||[],C=S[0],A=S[1],N=g?C?v.replace(C,"").concat(A):v.replace(g,""):v,L=j0(N,n),P=$0(L,st([n,i],w,!0)),I=P;if(!p){if(w.some(function(re){return re===P.toLowerCase().replace(i,"")}))return"";var R=A0(P,i);R&&(I=String(R))}var q=k&&f?"-":"";if(i&&I.includes(i)){var J=P.split(i),z=J[0],G=J[1],K=u&&G?G.slice(0,u):G,Z=a?"".concat(i).concat(K):"";return"".concat(q).concat(z).concat(Z)}return"".concat(q).concat(I)},N0=function(e,t,r){if(r!==void 0&&e.length>1){if(r===0)return e.replace(t,"");if(e.includes(t)){var n=e.split(t),o=n[0],i=n[1];if(i.length===r)return e;if(i.length>r)return"".concat(o).concat(t).concat(i.slice(0,r))}var s=e.length>r?new RegExp("(\\d+)(\\d{".concat(r,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(s);if(a){var o=a[1],i=a[2];return"".concat(o).concat(t).concat(i)}}return e},Pu=function(e,t){var r=t.groupSeparator,n=r===void 0?",":r,o=t.decimalSeparator,i=o===void 0?".":o,s=new RegExp("\\d([^".concat(Ct(n)).concat(Ct(i),"0-9]+)")),a=e.match(s);return a?a[1]:void 0},mn=function(e){var t=e.value,r=e.decimalSeparator,n=e.intlConfig,o=e.decimalScale,i=e.prefix,s=i===void 0?"":i,a=e.suffix,l=a===void 0?"":a;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(Ct(s),"?"):"","\\d")).test(t),c=r!=="."?P0(t,r,u):t;r&&r!=="-"&&c.startsWith(r)&&(c="0"+c);var f={minimumFractionDigits:o||0,maximumFractionDigits:20},h=n?new Intl.NumberFormat(n.locale,n.currency?ce(ce({},f),{style:"currency",currency:n.currency}):f):new Intl.NumberFormat(void 0,f),p=h.formatToParts(Number(c)),d=L0(p,e),g=Pu(d,ce({},e)),x=t.slice(-1)===r?r:"",b=c.match(RegExp("\\d+\\.(\\d+)"))||[],v=b[1];return o===void 0&&v&&r&&(d.includes(r)?d=d.replace(RegExp("(\\d+)(".concat(Ct(r),")(\\d+)"),"g"),"$1$2".concat(v)):g&&!l?d=d.replace(g,"".concat(r).concat(v).concat(g)):d="".concat(d).concat(r).concat(v)),l&&x?"".concat(d).concat(x).concat(l):g&&x?d.replace(g,"".concat(x).concat(g)):g&&l?d.replace(g,"".concat(x).concat(l)):[d,x,l].join("")},P0=function(e,t,r){var n=e;return t&&t!=="."&&(n=n.replace(RegExp(Ct(t),"g"),"."),r&&t==="-"&&(n="-".concat(n.slice(1)))),n},L0=function(e,t){var r=t.prefix,n=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,s=t.disableGroupSeparators,a=s===void 0?!1:s;return e.reduce(function(l,u,c){var f=u.type,h=u.value;return c===0&&r?f==="minusSign"?[h,r]:f==="currency"?st(st([],l,!0),[r],!1):[r,h]:f==="currency"?r?l:st(st([],l,!0),[h],!1):f==="group"?a?l:st(st([],l,!0),[n!==void 0?n:h],!1):f==="decimal"?i!==void 0&&i===0?l:st(st([],l,!0),[o!==void 0?o:h],!1):f==="fraction"?st(st([],l,!0),[i!==void 0?h.slice(0,i):h],!1):st(st([],l,!0),[h],!1)},[""]).join("")},D0={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},I0=function(e){var t=e||{},r=t.locale,n=t.currency,o=r?new Intl.NumberFormat(r,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat;return o.formatToParts(1000.1).reduce(function(i,s,a){return s.type==="currency"?a===0?ce(ce({},i),{currencySymbol:s.value,prefix:s.value}):ce(ce({},i),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?ce(ce({},i),{groupSeparator:s.value}):s.type==="decimal"?ce(ce({},i),{decimalSeparator:s.value}):i},D0)},Lu=function(e){return RegExp(/\d/,"gi").test(e)},M0=function(e,t,r){if(t===void 0&&(t="."),r===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var n=e.split(t),o=n[0],i=n[1];if(r===0)return o;var s=i||"";if(s.length<r)for(;s.length<r;)s+="0";else s=s.slice(0,r);return"".concat(o).concat(t).concat(s)},R0=function(e){var t=e.selectionStart,r=e.value,n=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,s=t,a=r;if(o&&s){var l=r.split("");return n==="Backspace"&&o[s]===i&&(l.splice(s-1,1),s-=1),n==="Delete"&&o[s]===i&&(l.splice(s,1),s+=1),a=l.join(""),{modifiedValue:a,cursorPosition:s}}return{modifiedValue:a,cursorPosition:t}},yo=m.forwardRef(function(e,t){var r=e.allowDecimals,n=r===void 0?!0:r,o=e.allowNegativeValue,i=o===void 0?!0:o,s=e.id,a=e.name,l=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,h=e.disabled,p=h===void 0?!1:h,d=e.maxLength,g=e.value,x=e.onValueChange,b=e.fixedDecimalLength,v=e.placeholder,w=e.decimalScale,_=e.prefix,k=e.suffix,S=e.intlConfig,C=e.step,A=e.min,N=e.max,L=e.disableGroupSeparators,P=L===void 0?!1:L,I=e.disableAbbreviations,R=I===void 0?!1:I,q=e.decimalSeparator,J=e.groupSeparator,z=e.onChange,G=e.onFocus,K=e.onBlur,Z=e.onKeyDown,re=e.onKeyUp,Ae=e.transformRawValue,Pe=e.formatValueOnBlur,W=Pe===void 0?!0:Pe,xe=O0(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(q&&Lu(q))throw new Error("decimalSeparator cannot be a number");if(J&&Lu(J))throw new Error("groupSeparator cannot be a number");var Te=m.useMemo(function(){return I0(S)},[S]),ae=q||Te.decimalSeparator||"",je=J||Te.groupSeparator||"";if(ae&&je&&ae===je&&P===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var _e={decimalSeparator:ae,groupSeparator:je,disableGroupSeparators:P,intlConfig:S,prefix:_||Te.prefix,suffix:k},Le={decimalSeparator:ae,groupSeparator:je,allowDecimals:n,decimalsLimit:c||b||2,allowNegativeValue:i,disableAbbreviations:R,prefix:_||Te.prefix,transformRawValue:Ae},vt=m.useState(function(){return f!=null?mn(ce(ce({},_e),{decimalScale:w,value:String(f)})):g!=null?mn(ce(ce({},_e),{decimalScale:w,value:String(g)})):""}),Se=vt[0],oe=vt[1],me=m.useState(!1),$e=me[0],zt=me[1],Ht=m.useState(0),wr=Ht[0],T=Ht[1],O=m.useState(0),$=O[0],B=O[1],V=m.useState(null),M=V[0],Y=V[1],X=m.useRef(null);m.useImperativeHandle(t,function(){return X.current});var ge=function(ye,qe){zt(!0);var Re=R0({selectionStart:qe,value:ye,lastKeyStroke:M,stateValue:Se,groupSeparator:je}),We=Re.modifiedValue,Ve=Re.cursorPosition,Xe=os(ce({value:We},Le));if(!(d&&Xe.replace(/-/g,"").length>d)){if(Xe===""||Xe==="-"||Xe===ae){x&&x(void 0,a,{float:null,formatted:"",value:""}),oe(Xe),T(1);return}var Et=ae?Xe.replace(ae,"."):Xe,An=parseFloat(Et),Tr=mn(ce({value:Xe},_e));if(Ve!=null){var _r=Ve+(Tr.length-ye.length);_r=_r<=0?_?_.length:0:_r,T(_r),B($+1)}if(oe(Tr),x){var Ws={float:An,formatted:Tr,value:Xe};x(Xe,a,Ws)}}},pe=function(ye){var qe=ye.target,Re=qe.value,We=qe.selectionStart;ge(Re,We),z&&z(ye)},wt=function(ye){return G&&G(ye),Se?Se.length:0},Rr=function(ye){var qe=ye.target.value,Re=os(ce({value:qe},Le));if(Re==="-"||Re===ae||!Re){oe(""),K&&K(ye);return}var We=N0(Re,ae,b),Ve=M0(We,ae,w!==void 0?w:b),Xe=parseFloat(Ve.replace(ae,".")),Et=mn(ce(ce({},_e),{value:Ve}));x&&W&&x(Ve,a,{float:Xe,formatted:Et,value:Ve}),oe(Et),K&&K(ye)},er=function(ye){var qe=ye.key;if(Y(qe),C&&(qe==="ArrowUp"||qe==="ArrowDown")){ye.preventDefault(),T(Se.length);var Re=parseFloat(g!=null?String(g).replace(ae,"."):os(ce({value:Se},Le)))||0,We=qe==="ArrowUp"?Re+C:Re-C;if(A!==void 0&&We<Number(A)||N!==void 0&&We>Number(N))return;var Ve=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;ge(String(Ve?We.toFixed(Ve):We).replace(".",ae))}Z&&Z(ye)},qt=function(ye){var qe=ye.key,Re=ye.currentTarget.selectionStart;if(qe!=="ArrowUp"&&qe!=="ArrowDown"&&Se!=="-"){var We=Pu(Se,{groupSeparator:je,decimalSeparator:ae});if(We&&Re&&Re>Se.length-We.length&&X.current){var Ve=Se.length-We.length;X.current.setSelectionRange(Ve,Ve)}}re&&re(ye)};m.useEffect(function(){g==null&&f==null&&oe("")},[f,g]),m.useEffect(function(){$e&&Se!=="-"&&X.current&&document.activeElement===X.current&&X.current.setSelectionRange(wr,wr)},[Se,wr,X,$e,$]);var On=function(){return g!=null&&Se!=="-"&&(!ae||Se!==ae)?mn(ce(ce({},_e),{decimalScale:$e?void 0:w,value:String(g)})):Se},Er=ce({type:"text",inputMode:"decimal",id:s,name:a,className:l,onChange:pe,onBlur:Rr,onFocus:wt,onKeyDown:er,onKeyUp:qt,placeholder:v,disabled:p,value:On(),ref:X},xe);if(u){var Fn=u;return m.createElement(Fn,ce({},Er))}return m.createElement("input",ce({},Er))});yo.displayName="CurrencyInput";const ve=({label:e,name:t,register:r,errors:n,className:o,type:i="text",placeholder:s="",isFloating:a,setValue:l,value:u,trigger:c,prefix:f,disabled:h})=>{var d,g,x,b;const p=r?{...r(t)}:{};return i==="amount"?y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),y.jsx(yo,{onValueChange:v=>{l(t,v),r&&r(t),c&&c(t)},placeholder:s,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2,value:u,prefix:f,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n[t])==null?void 0:d.message})]}):["checkbox","radio"].includes(i)?y.jsxs("div",{children:[y.jsxs("label",{className:"flex items-center space-x-2",children:[y.jsx("input",{...p,type:i,className:"h-4 w-4 rounded border-gray-300",value:u,disabled:h}),y.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(n==null?void 0:n[t])&&y.jsx("p",{className:"ml-2 text-sm text-red-600",children:(g=n[t])==null?void 0:g.message})]}):i==="textarea"?y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),y.jsx("textarea",{...p,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:s,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(x=n[t])==null?void 0:x.message})]}):y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),y.jsx("input",{...p,type:i,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:a?"":s,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(b=n[t])==null?void 0:b.message})]})};function Du({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>y.jsx("div",{children:y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}function Iu({element:e,state:t}){return y.jsx("div",{children:"SectionInput"})}function Mu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>y.jsx("div",{children:y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}const is=({className:e="",options:t,placeholder:r="Select",errors:n,register:o,setValue:i,name:s,label:a,value:l,trigger:u,isMultiple:c,isFloatingLabel:f,subText:h,labelClass:p="text-[10px]",loading:d})=>{const[g,x]=m.useState(c?[]:null),b=ut("input-control",e);return m.useEffect(()=>{g&&i&&o&&(i(s,g==null?void 0:g.value),o&&o(s),u&&u(s))},[s,o,g,i,u]),m.useEffect(()=>{const v=t==null?void 0:t.find(w=>typeof w.value=="string"&&typeof l=="string"?w.value.toLowerCase()===l.toLowerCase():typeof w.value=="object"&&typeof l=="object"?w.value.id===(l==null?void 0:l.id):w.value===l);x(v||null)},[l,t]),y.jsxs("div",{className:"relative",children:[!f&&a&&y.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:a}),f&&y.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${p}`,children:a}),y.jsx(Xt,{value:g,onChange:x,multiple:c,children:y.jsxs("div",{className:"relative",children:[y.jsxs(Xt.Button,{className:b,children:[d?y.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):y.jsx("span",{className:"block truncate text-sm text-left",children:(g==null?void 0:g.label)||y.jsx("span",{className:"opacity-60",children:r})}),y.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:y.jsx(Be,{icon:"lucide:chevron-down"})})]}),y.jsx(_u,{as:m.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsx(Xt.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((v,w)=>y.jsx(Xt.Option,{className:({active:_})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${_?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:v,children:({selected:_})=>y.jsx("div",{className:`block truncate text-sm ${_?"font-medium":"font-normal"}`,children:v.label})},w))})})]})}),!n&&h&&y.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:h}),n&&y.jsx("span",{className:"text-sm text-red-500",children:n.message})]})};function Ru({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i}=t||{};let s;return i&&(s=i()[e.id]),m.useEffect(()=>{r(e.id)},[e.id,r]),y.jsx("div",{children:y.jsx(is,{options:(e==null?void 0:e.options)??[],register:r,name:e.id,setValue:o,trigger:n,value:s})})}function Vu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("textarea",{placeholder:e.placeholder,rows:4,className:"input-control resize-none",...r(e.id)})}var hn=e=>e.type==="checkbox",mr=e=>e instanceof Date,Ye=e=>e==null;const Bu=e=>typeof e=="object";var we=e=>!Ye(e)&&!Array.isArray(e)&&Bu(e)&&!mr(e),V0=e=>we(e)&&e.target?hn(e.target)?e.target.checked:e.target.value:e,B0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,U0=(e,t)=>e.has(B0(t)),z0=e=>{const t=e.constructor&&e.constructor.prototype;return we(t)&&t.hasOwnProperty("isPrototypeOf")},ss=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Me(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ss&&(e instanceof Blob||n))&&(r||we(e)))if(t=r?[]:{},!r&&!z0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Me(e[o]));else return e;return t}var gn=e=>Array.isArray(e)?e.filter(Boolean):[],de=e=>e===void 0,U=(e,t,r)=>{if(!t||!we(e))return r;const n=gn(t.split(/[,[\].]+?/)).reduce((o,i)=>Ye(o)?o:o[i],e);return de(n)||n===e?de(e[t])?r:e[t]:n},Ot=e=>typeof e=="boolean",as=e=>/^\w*$/.test(e),Uu=e=>gn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,r)=>{let n=-1;const o=as(t)?[t]:Uu(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=we(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const zu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},dt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Vt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hu=m.createContext(null),H0=()=>m.useContext(Hu),q0=e=>{const{children:t,...r}=e;return m.createElement(Hu.Provider,{value:r},t)};var W0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==dt.all&&(t._proxyFormState[s]=!n||dt.all),e[s]}});return o},Je=e=>we(e)&&!Object.keys(e).length,K0=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Je(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===dt.all)},at=e=>Array.isArray(e)?e:[e];function qu(e){const t=m.useRef(e);t.current=e,m.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ft=e=>typeof e=="string",Y0=(e,t,r,n,o)=>Ft(e)?(n&&t.watch.add(e),U(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),U(r,i))):(n&&(t.watchAll=!0),r),Wu=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Gt=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},ls=(e,t,r={})=>r.shouldFocus||de(r.shouldFocus)?r.focusName||`${e}.${de(r.focusIndex)?t:r.focusIndex}.`:"",yn=e=>({isOnSubmit:!e||e===dt.onSubmit,isOnBlur:e===dt.onBlur,isOnChange:e===dt.onChange,isOnAll:e===dt.all,isOnTouch:e===dt.onTouched}),us=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Nr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=U(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Nr(a,t))break}else if(we(a)&&Nr(a,t))break}}};var Ku=(e,t,r)=>{const n=at(U(e,r));return se(n,"root",t[r]),se(e,r,n),e},cs=e=>e.type==="file",At=e=>typeof e=="function",bo=e=>{if(!ss)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xo=e=>Ft(e),fs=e=>e.type==="radio",vo=e=>e instanceof RegExp;const Yu={value:!1,isValid:!1},Ju={value:!0,isValid:!0};var Xu=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&&!de(e[0].attributes.value)?de(e[0].value)||e[0].value===""?Ju:{value:e[0].value,isValid:!0}:Ju:Yu}return Yu};const Gu={isValid:!1,value:null};var Qu=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Gu):Gu;function Zu(e,t,r="validate"){if(xo(e)||Array.isArray(e)&&e.every(xo)||Ot(e)&&!e)return{type:r,message:xo(e)?e:"",ref:t}}var Pr=e=>we(e)&&!vo(e)?e:{value:e,message:""},ds=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:p,name:d,valueAsNumber:g,mount:x,disabled:b}=e._f,v=U(t,d);if(!x||b)return{};const w=s?s[0]:i,_=I=>{n&&w.reportValidity&&(w.setCustomValidity(Ot(I)?"":I||""),w.reportValidity())},k={},S=fs(i),C=hn(i),A=S||C,N=(g||cs(i))&&de(i.value)&&de(v)||bo(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,L=Wu.bind(null,d,r,k),P=(I,R,q,J=Vt.maxLength,z=Vt.minLength)=>{const G=I?R:q;k[d]={type:I?J:z,message:G,ref:i,...L(I?J:z,G)}};if(o?!Array.isArray(v)||!v.length:a&&(!A&&(N||Ye(v))||Ot(v)&&!v||C&&!Xu(s).isValid||S&&!Qu(s).isValid)){const{value:I,message:R}=xo(a)?{value:!!a,message:a}:Pr(a);if(I&&(k[d]={type:Vt.required,message:R,ref:w,...L(Vt.required,R)},!r))return _(R),k}if(!N&&(!Ye(c)||!Ye(f))){let I,R;const q=Pr(f),J=Pr(c);if(!Ye(v)&&!isNaN(v)){const z=i.valueAsNumber||v&&+v;Ye(q.value)||(I=z>q.value),Ye(J.value)||(R=z<J.value)}else{const z=i.valueAsDate||new Date(v),G=re=>new Date(new Date().toDateString()+" "+re),K=i.type=="time",Z=i.type=="week";Ft(q.value)&&v&&(I=K?G(v)>G(q.value):Z?v>q.value:z>new Date(q.value)),Ft(J.value)&&v&&(R=K?G(v)<G(J.value):Z?v<J.value:z<new Date(J.value))}if((I||R)&&(P(!!I,q.message,J.message,Vt.max,Vt.min),!r))return _(k[d].message),k}if((l||u)&&!N&&(Ft(v)||o&&Array.isArray(v))){const I=Pr(l),R=Pr(u),q=!Ye(I.value)&&v.length>+I.value,J=!Ye(R.value)&&v.length<+R.value;if((q||J)&&(P(q,I.message,R.message),!r))return _(k[d].message),k}if(h&&!N&&Ft(v)){const{value:I,message:R}=Pr(h);if(vo(I)&&!v.match(I)&&(k[d]={type:Vt.pattern,message:R,ref:i,...L(Vt.pattern,R)},!r))return _(R),k}if(p){if(At(p)){const I=await p(v,t),R=Zu(I,w);if(R&&(k[d]={...R,...L(Vt.validate,R.message)},!r))return _(R.message),k}else if(we(p)){let I={};for(const R in p){if(!Je(I)&&!r)break;const q=Zu(await p[R](v,t),w,R);q&&(I={...q,...L(R,q.message)},_(q.message),r&&(k[d]=I))}if(!Je(I)&&(k[d]={ref:w,...I},!r))return k}}return _(!0),k},ps=(e,t)=>[...e,...at(t)],ms=e=>Array.isArray(e)?e.map(()=>{}):void 0;function hs(e,t,r){return[...e.slice(0,t),...at(r),...e.slice(t)]}var gs=(e,t,r)=>Array.isArray(e)?(de(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ys=(e,t)=>[...at(t),...at(e)];function J0(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return gn(n).length?n:[]}var bs=(e,t)=>de(t)?[]:J0(e,at(t).sort((r,n)=>r-n)),xs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function X0(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=de(e)?n++:e[t[n++]];return e}function G0(e){for(const t in e)if(e.hasOwnProperty(t)&&!de(e[t]))return!1;return!0}function Ce(e,t){const r=Array.isArray(t)?t:as(t)?[t]:Uu(t),n=r.length===1?e:X0(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(we(n)&&Je(n)||Array.isArray(n)&&G0(n))&&Ce(e,r.slice(0,-1)),e}var ec=(e,t,r)=>(e[t]=r,e);function Q0(e){const t=H0(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=m.useState(r._getFieldArray(n)),u=m.useRef(r._getFieldArray(n).map(Gt)),c=m.useRef(a),f=m.useRef(n),h=m.useRef(!1);f.current=n,c.current=a,r._names.array.add(n),s&&r.register(n,s),qu({next:({values:S,name:C})=>{if(C===f.current||!C){const A=U(S,f.current);Array.isArray(A)&&(l(A),u.current=A.map(Gt))}},subject:r._subjects.array});const p=m.useCallback(S=>{h.current=!0,r._updateFieldArray(n,S)},[r,n]),d=(S,C)=>{const A=at(Me(S)),N=ps(r._getFieldArray(n),A);r._names.focus=ls(n,N.length-1,C),u.current=ps(u.current,A.map(Gt)),p(N),l(N),r._updateFieldArray(n,N,ps,{argA:ms(S)})},g=(S,C)=>{const A=at(Me(S)),N=ys(r._getFieldArray(n),A);r._names.focus=ls(n,0,C),u.current=ys(u.current,A.map(Gt)),p(N),l(N),r._updateFieldArray(n,N,ys,{argA:ms(S)})},x=S=>{const C=bs(r._getFieldArray(n),S);u.current=bs(u.current,S),p(C),l(C),!Array.isArray(U(r._fields,n))&&se(r._fields,n,void 0),r._updateFieldArray(n,C,bs,{argA:S})},b=(S,C,A)=>{const N=at(Me(C)),L=hs(r._getFieldArray(n),S,N);r._names.focus=ls(n,S,A),u.current=hs(u.current,S,N.map(Gt)),p(L),l(L),r._updateFieldArray(n,L,hs,{argA:S,argB:ms(C)})},v=(S,C)=>{const A=r._getFieldArray(n);xs(A,S,C),xs(u.current,S,C),p(A),l(A),r._updateFieldArray(n,A,xs,{argA:S,argB:C},!1)},w=(S,C)=>{const A=r._getFieldArray(n);gs(A,S,C),gs(u.current,S,C),p(A),l(A),r._updateFieldArray(n,A,gs,{argA:S,argB:C},!1)},_=(S,C)=>{const A=Me(C),N=ec(r._getFieldArray(n),S,A);u.current=[...N].map((L,P)=>!L||P===S?Gt():u.current[P]),p(N),l([...N]),r._updateFieldArray(n,N,ec,{argA:S,argB:A},!0,!1)},k=S=>{const C=at(Me(S));u.current=C.map(Gt),p([...C]),l([...C]),r._updateFieldArray(n,[...C],A=>A,{},!0,!1)};return m.useEffect(()=>{if(r._state.action=!1,us(n,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!yn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(S=>{const C=U(S.errors,n),A=U(r._formState.errors,n);(A?!C&&A.type||C&&(A.type!==C.type||A.message!==C.message):C&&C.type)&&(C?se(r._formState.errors,n,C):Ce(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const S=U(r._fields,n);S&&S._f&&!(yn(r._options.reValidateMode).isOnSubmit&&yn(r._options.mode).isOnSubmit)&&ds(S,r._formValues,r._options.criteriaMode===dt.all,r._options.shouldUseNativeValidation,!0).then(C=>!Je(C)&&r._subjects.state.next({errors:Ku(r._formState.errors,C,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Nr(r._fields,(S,C)=>{if(r._names.focus&&C.startsWith(r._names.focus)&&S.focus)return S.focus(),1}),r._names.focus="",r._updateValid(),h.current=!1},[a,n,r]),m.useEffect(()=>(!U(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||i)&&r.unregister(n)}),[n,r,o,i]),{swap:m.useCallback(v,[p,n,r]),move:m.useCallback(w,[p,n,r]),prepend:m.useCallback(g,[p,n,r]),append:m.useCallback(d,[p,n,r]),remove:m.useCallback(x,[p,n,r]),insert:m.useCallback(b,[p,n,r]),update:m.useCallback(_,[p,n,r]),replace:m.useCallback(k,[p,n,r]),fields:m.useMemo(()=>a.map((S,C)=>({...S,[o]:u.current[C]||Gt()})),[a,o])}}var vs=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},ws=e=>Ye(e)||!Bu(e);function Qt(e,t){if(ws(e)||ws(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(mr(i)&&mr(s)||we(i)&&we(s)||Array.isArray(i)&&Array.isArray(s)?!Qt(i,s):i!==s)return!1}}return!0}var tc=e=>e.type==="select-multiple",Z0=e=>fs(e)||hn(e),Es=e=>bo(e)&&e.isConnected,rc=e=>{for(const t in e)if(At(e[t]))return!0;return!1};function wo(e,t={}){const r=Array.isArray(e);if(we(e)||r)for(const n in e)Array.isArray(e[n])||we(e[n])&&!rc(e[n])?(t[n]=Array.isArray(e[n])?[]:{},wo(e[n],t[n])):Ye(e[n])||(t[n]=!0);return t}function nc(e,t,r){const n=Array.isArray(e);if(we(e)||n)for(const o in e)Array.isArray(e[o])||we(e[o])&&!rc(e[o])?de(t)||ws(r[o])?r[o]=Array.isArray(e[o])?wo(e[o],[]):{...wo(e[o])}:nc(e[o],Ye(t)?{}:t[o],r[o]):r[o]=!Qt(e[o],t[o]);return r}var bn=(e,t)=>nc(e,t,wo(t)),oc=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>de(e)?e:t?e===""?NaN:e&&+e:r&&Ft(e)?new Date(e):n?n(e):e;function Ts(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return cs(t)?t.files:fs(t)?Qu(e.refs).value:tc(t)?[...t.selectedOptions].map(({value:r})=>r):hn(t)?Xu(e.refs).value:oc(de(t.value)?e.ref.value:t.value,e)}var eb=(e,t,r,n)=>{const o={};for(const i of e){const s=U(t,i);s&&se(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},xn=e=>de(e)?e:vo(e)?e.source:we(e)?vo(e.value)?e.value.source:e.value:e;const ic="AsyncFunction";var tb=e=>!!e&&!!e.validate&&!!(At(e.validate)&&e.validate.constructor.name===ic||we(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ic)),rb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function sc(e,t,r){const n=U(e,r);if(n||as(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=U(t,i),a=U(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var nb=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,ob=(e,t)=>!gn(U(e,t)).length&&Ce(e,t);const ib={mode:dt.onSubmit,reValidateMode:dt.onChange,shouldFocusError:!0};function sb(e={}){let t={...ib,...e},r={submitCount:0,isDirty:!1,isLoading:At(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=we(t.defaultValues)||we(t.values)?Me(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Me(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:vs(),array:vs(),state:vs()},h=yn(t.mode),p=yn(t.reValidateMode),d=t.criteriaMode===dt.all,g=T=>O=>{clearTimeout(u),u=setTimeout(T,O)},x=async T=>{if(!t.disabled&&(c.isValid||T)){const O=t.resolver?Je((await A()).errors):await L(n,!0);O!==r.isValid&&f.state.next({isValid:O})}},b=(T,O)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((T||Array.from(a.mount)).forEach($=>{$&&(O?se(r.validatingFields,$,O):Ce(r.validatingFields,$))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Je(r.validatingFields)}))},v=(T,O=[],$,B,V=!0,M=!0)=>{if(B&&$&&!t.disabled){if(s.action=!0,M&&Array.isArray(U(n,T))){const Y=$(U(n,T),B.argA,B.argB);V&&se(n,T,Y)}if(M&&Array.isArray(U(r.errors,T))){const Y=$(U(r.errors,T),B.argA,B.argB);V&&se(r.errors,T,Y),ob(r.errors,T)}if(c.touchedFields&&M&&Array.isArray(U(r.touchedFields,T))){const Y=$(U(r.touchedFields,T),B.argA,B.argB);V&&se(r.touchedFields,T,Y)}c.dirtyFields&&(r.dirtyFields=bn(o,i)),f.state.next({name:T,isDirty:I(T,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else se(i,T,O)},w=(T,O)=>{se(r.errors,T,O),f.state.next({errors:r.errors})},_=T=>{r.errors=T,f.state.next({errors:r.errors,isValid:!1})},k=(T,O,$,B)=>{const V=U(n,T);if(V){const M=U(i,T,de($)?U(o,T):$);de(M)||B&&B.defaultChecked||O?se(i,T,O?M:Ts(V._f)):J(T,M),s.mount&&x()}},S=(T,O,$,B,V)=>{let M=!1,Y=!1;const X={name:T};if(!t.disabled){const ge=!!(U(n,T)&&U(n,T)._f&&U(n,T)._f.disabled);if(!$||B){c.isDirty&&(Y=r.isDirty,r.isDirty=X.isDirty=I(),M=Y!==X.isDirty);const pe=ge||Qt(U(o,T),O);Y=!!(!ge&&U(r.dirtyFields,T)),pe||ge?Ce(r.dirtyFields,T):se(r.dirtyFields,T,!0),X.dirtyFields=r.dirtyFields,M=M||c.dirtyFields&&Y!==!pe}if($){const pe=U(r.touchedFields,T);pe||(se(r.touchedFields,T,$),X.touchedFields=r.touchedFields,M=M||c.touchedFields&&pe!==$)}M&&V&&f.state.next(X)}return M?X:{}},C=(T,O,$,B)=>{const V=U(r.errors,T),M=c.isValid&&Ot(O)&&r.isValid!==O;if(t.delayError&&$?(l=g(()=>w(T,$)),l(t.delayError)):(clearTimeout(u),l=null,$?se(r.errors,T,$):Ce(r.errors,T)),($?!Qt(V,$):V)||!Je(B)||M){const Y={...B,...M&&Ot(O)?{isValid:O}:{},errors:r.errors,name:T};r={...r,...Y},f.state.next(Y)}},A=async T=>{b(T,!0);const O=await t.resolver(i,t.context,eb(T||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(T),O},N=async T=>{const{errors:O}=await A(T);if(T)for(const $ of T){const B=U(O,$);B?se(r.errors,$,B):Ce(r.errors,$)}else r.errors=O;return O},L=async(T,O,$={valid:!0})=>{for(const B in T){const V=T[B];if(V){const{_f:M,...Y}=V;if(M){const X=a.array.has(M.name),ge=V._f&&tb(V._f);ge&&c.validatingFields&&b([B],!0);const pe=await ds(V,i,d,t.shouldUseNativeValidation&&!O,X);if(ge&&c.validatingFields&&b([B]),pe[M.name]&&($.valid=!1,O))break;!O&&(U(pe,M.name)?X?Ku(r.errors,pe,M.name):se(r.errors,M.name,pe[M.name]):Ce(r.errors,M.name))}!Je(Y)&&await L(Y,O,$)}}return $.valid},P=()=>{for(const T of a.unMount){const O=U(n,T);O&&(O._f.refs?O._f.refs.every($=>!Es($)):!Es(O._f.ref))&&ae(T)}a.unMount=new Set},I=(T,O)=>!t.disabled&&(T&&O&&se(i,T,O),!Qt(Ae(),o)),R=(T,O,$)=>Y0(T,a,{...s.mount?i:de(O)?o:Ft(T)?{[T]:O}:O},$,O),q=T=>gn(U(s.mount?i:o,T,t.shouldUnregister?U(o,T,[]):[])),J=(T,O,$={})=>{const B=U(n,T);let V=O;if(B){const M=B._f;M&&(!M.disabled&&se(i,T,oc(O,M)),V=bo(M.ref)&&Ye(O)?"":O,tc(M.ref)?[...M.ref.options].forEach(Y=>Y.selected=V.includes(Y.value)):M.refs?hn(M.ref)?M.refs.length>1?M.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(V)?!!V.find(X=>X===Y.value):V===Y.value)):M.refs[0]&&(M.refs[0].checked=!!V):M.refs.forEach(Y=>Y.checked=Y.value===V):cs(M.ref)?M.ref.value="":(M.ref.value=V,M.ref.type||f.values.next({name:T,values:{...i}})))}($.shouldDirty||$.shouldTouch)&&S(T,V,$.shouldTouch,$.shouldDirty,!0),$.shouldValidate&&re(T)},z=(T,O,$)=>{for(const B in O){const V=O[B],M=`${T}.${B}`,Y=U(n,M);(a.array.has(T)||we(V)||Y&&!Y._f)&&!mr(V)?z(M,V,$):J(M,V,$)}},G=(T,O,$={})=>{const B=U(n,T),V=a.array.has(T),M=Me(O);se(i,T,M),V?(f.array.next({name:T,values:{...i}}),(c.isDirty||c.dirtyFields)&&$.shouldDirty&&f.state.next({name:T,dirtyFields:bn(o,i),isDirty:I(T,M)})):B&&!B._f&&!Ye(M)?z(T,M,$):J(T,M,$),us(T,a)&&f.state.next({...r}),f.values.next({name:s.mount?T:void 0,values:{...i}})},K=async T=>{s.mount=!0;const O=T.target;let $=O.name,B=!0;const V=U(n,$),M=()=>O.type?Ts(V._f):V0(T),Y=X=>{B=Number.isNaN(X)||mr(X)&&isNaN(X.getTime())||Qt(X,U(i,$,X))};if(V){let X,ge;const pe=M(),wt=T.type===zu.BLUR||T.type===zu.FOCUS_OUT,Rr=!rb(V._f)&&!t.resolver&&!U(r.errors,$)&&!V._f.deps||nb(wt,U(r.touchedFields,$),r.isSubmitted,p,h),er=us($,a,wt);se(i,$,pe),wt?(V._f.onBlur&&V._f.onBlur(T),l&&l(0)):V._f.onChange&&V._f.onChange(T);const qt=S($,pe,wt,!1),On=!Je(qt)||er;if(!wt&&f.values.next({name:$,type:T.type,values:{...i}}),Rr)return c.isValid&&(t.mode==="onBlur"?wt&&x():x()),On&&f.state.next({name:$,...er?{}:qt});if(!wt&&er&&f.state.next({...r}),t.resolver){const{errors:Er}=await A([$]);if(Y(pe),B){const Fn=sc(r.errors,n,$),ye=sc(Er,n,Fn.name||$);X=ye.error,$=ye.name,ge=Je(Er)}}else b([$],!0),X=(await ds(V,i,d,t.shouldUseNativeValidation))[$],b([$]),Y(pe),B&&(X?ge=!1:c.isValid&&(ge=await L(n,!0)));B&&(V._f.deps&&re(V._f.deps),C($,ge,X,qt))}},Z=(T,O)=>{if(U(r.errors,O)&&T.focus)return T.focus(),1},re=async(T,O={})=>{let $,B;const V=at(T);if(t.resolver){const M=await N(de(T)?T:V);$=Je(M),B=T?!V.some(Y=>U(M,Y)):$}else T?(B=(await Promise.all(V.map(async M=>{const Y=U(n,M);return await L(Y&&Y._f?{[M]:Y}:Y)}))).every(Boolean),!(!B&&!r.isValid)&&x()):B=$=await L(n);return f.state.next({...!Ft(T)||c.isValid&&$!==r.isValid?{}:{name:T},...t.resolver||!T?{isValid:$}:{},errors:r.errors}),O.shouldFocus&&!B&&Nr(n,Z,T?V:a.mount),B},Ae=T=>{const O={...s.mount?i:o};return de(T)?O:Ft(T)?U(O,T):T.map($=>U(O,$))},Pe=(T,O)=>({invalid:!!U((O||r).errors,T),isDirty:!!U((O||r).dirtyFields,T),error:U((O||r).errors,T),isValidating:!!U(r.validatingFields,T),isTouched:!!U((O||r).touchedFields,T)}),W=T=>{T&&at(T).forEach(O=>Ce(r.errors,O)),f.state.next({errors:T?r.errors:{}})},xe=(T,O,$)=>{const B=(U(n,T,{_f:{}})._f||{}).ref,V=U(r.errors,T)||{},{ref:M,message:Y,type:X,...ge}=V;se(r.errors,T,{...ge,...O,ref:B}),f.state.next({name:T,errors:r.errors,isValid:!1}),$&&$.shouldFocus&&B&&B.focus&&B.focus()},Te=(T,O)=>At(T)?f.values.subscribe({next:$=>T(R(void 0,O),$)}):R(T,O,!0),ae=(T,O={})=>{for(const $ of T?at(T):a.mount)a.mount.delete($),a.array.delete($),O.keepValue||(Ce(n,$),Ce(i,$)),!O.keepError&&Ce(r.errors,$),!O.keepDirty&&Ce(r.dirtyFields,$),!O.keepTouched&&Ce(r.touchedFields,$),!O.keepIsValidating&&Ce(r.validatingFields,$),!t.shouldUnregister&&!O.keepDefaultValue&&Ce(o,$);f.values.next({values:{...i}}),f.state.next({...r,...O.keepDirty?{isDirty:I()}:{}}),!O.keepIsValid&&x()},je=({disabled:T,name:O,field:$,fields:B,value:V})=>{if(Ot(T)&&s.mount||T){const M=T?void 0:de(V)?Ts($?$._f:U(B,O)._f):V;(T||!T&&!de(M))&&se(i,O,M),S(O,M,!1,!1,!0)}},_e=(T,O={})=>{let $=U(n,T);const B=Ot(O.disabled)||Ot(t.disabled);return se(n,T,{...$||{},_f:{...$&&$._f?$._f:{ref:{name:T}},name:T,mount:!0,...O}}),a.mount.add(T),$?je({field:$,disabled:Ot(O.disabled)?O.disabled:t.disabled,name:T,value:O.value}):k(T,!0,O.value),{...B?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:xn(O.min),max:xn(O.max),minLength:xn(O.minLength),maxLength:xn(O.maxLength),pattern:xn(O.pattern)}:{},name:T,onChange:K,onBlur:K,ref:V=>{if(V){_e(T,O),$=U(n,T);const M=de(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Y=Z0(M),X=$._f.refs||[];if(Y?X.find(ge=>ge===M):M===$._f.ref)return;se(n,T,{_f:{...$._f,...Y?{refs:[...X.filter(Es),M,...Array.isArray(U(o,T))?[{}]:[]],ref:{type:M.type,name:T}}:{ref:M}}}),k(T,!1,void 0,M)}else $=U(n,T,{}),$._f&&($._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(U0(a.array,T)&&s.action)&&a.unMount.add(T)}}},Le=()=>t.shouldFocusError&&Nr(n,Z,a.mount),vt=T=>{Ot(T)&&(f.state.next({disabled:T}),Nr(n,(O,$)=>{const B=U(n,$);B&&(O.disabled=B._f.disabled||T,Array.isArray(B._f.refs)&&B._f.refs.forEach(V=>{V.disabled=B._f.disabled||T}))},0,!1))},Se=(T,O)=>async $=>{let B;if($&&($.preventDefault&&$.preventDefault(),$.persist&&$.persist()),t.disabled){O&&await O({...r.errors},$);return}let V=Me(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Y}=await A();r.errors=M,V=Y}else await L(n);if(Ce(r.errors,"root"),Je(r.errors)){f.state.next({errors:{}});try{await T(V,$)}catch(M){B=M}}else O&&await O({...r.errors},$),Le(),setTimeout(Le);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Je(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},oe=(T,O={})=>{U(n,T)&&(de(O.defaultValue)?G(T,Me(U(o,T))):(G(T,O.defaultValue),se(o,T,Me(O.defaultValue))),O.keepTouched||Ce(r.touchedFields,T),O.keepDirty||(Ce(r.dirtyFields,T),r.isDirty=O.defaultValue?I(T,Me(U(o,T))):I()),O.keepError||(Ce(r.errors,T),c.isValid&&x()),f.state.next({...r}))},me=(T,O={})=>{const $=T?Me(T):o,B=Me($),V=Je(T),M=V?o:B;if(O.keepDefaultValues||(o=$),!O.keepValues){if(O.keepDirtyValues){const Y=new Set([...a.mount,...Object.keys(bn(o,i))]);for(const X of Array.from(Y))U(r.dirtyFields,X)?se(M,X,U(i,X)):G(X,U(M,X))}else{if(ss&&de(T))for(const Y of a.mount){const X=U(n,Y);if(X&&X._f){const ge=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(bo(ge)){const pe=ge.closest("form");if(pe){pe.reset();break}}}}n={}}i=t.shouldUnregister?O.keepDefaultValues?Me(o):{}:Me(M),f.array.next({values:{...M}}),f.values.next({values:{...M}})}a={mount:O.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!O.keepIsValid||!!O.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:V?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!Qt(T,o)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:V?{}:O.keepDirtyValues?O.keepDefaultValues&&i?bn(o,i):r.dirtyFields:O.keepDefaultValues&&T?bn(o,T):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},$e=(T,O)=>me(At(T)?T(i):T,O);return{control:{register:_e,unregister:ae,getFieldState:Pe,handleSubmit:Se,setError:xe,_executeSchema:A,_getWatch:R,_getDirty:I,_updateValid:x,_removeUnmounted:P,_updateFieldArray:v,_updateDisabledField:je,_getFieldArray:q,_reset:me,_resetDefaultValues:()=>At(t.defaultValues)&&t.defaultValues().then(T=>{$e(T,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:T=>{r={...r,...T}},_disableForm:vt,_subjects:f,_proxyFormState:c,_setErrors:_,get _fields(){return n},get _formValues(){return i},get _state(){return s},set _state(T){s=T},get _defaultValues(){return o},get _names(){return a},set _names(T){a=T},get _formState(){return r},set _formState(T){r=T},get _options(){return t},set _options(T){t={...t,...T}}},trigger:re,register:_e,handleSubmit:Se,watch:Te,setValue:G,getValues:Ae,reset:$e,resetField:oe,clearErrors:W,unregister:ae,setError:xe,setFocus:(T,O={})=>{const $=U(n,T),B=$&&$._f;if(B){const V=B.refs?B.refs[0]:B.ref;V.focus&&(V.focus(),O.shouldSelect&&At(V.select)&&V.select())}},getFieldState:Pe}}function _s(e={}){const t=m.useRef(),r=m.useRef(),[n,o]=m.useState({isDirty:!1,isValidating:!1,isLoading:At(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:At(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...sb(e),formState:n});const i=t.current.control;return i._options=e,qu({subject:i._subjects.state,next:s=>{K0(s,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),m.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),m.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),m.useEffect(()=>{e.values&&!Qt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),m.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),m.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),m.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),m.useMemo(()=>({...t.current,formState:W0(n,i)}),[n,i])}const ac=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},lc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ac(n.ref,r,e):n.refs&&n.refs.forEach(o=>ac(o,r,e))}},ab=(e,t)=>{t.shouldUseNativeValidation&&lc(e,t);const r={};for(const n in e){const o=U(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(lb(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));se(s,"root",i),se(r,n,s)}else se(r,n,i)}return r},lb=(e,t)=>e.some(r=>r.startsWith(t+"."));function Ss(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&lc({},i),{values:r.raw?n:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:ab((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var f=u[c.path].types,h=f&&f[c.type];u[c.path]=Wu(c.path,l,u,c.type,h?[].concat(h,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}var ks,uc;function ub(){if(uc)return ks;uc=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,v){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=v};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new e(s),l=new e(s),u=new e(s);ks={Cache:e,split:f,normalizePath:c,setter:function(b){var v=c(b);return l.get(b)||l.set(b,function(_,k){for(var S=0,C=v.length,A=_;S<C-1;){var N=v[S];if(N==="__proto__"||N==="constructor"||N==="prototype")return _;A=A[v[S++]]}A[v[S]]=k})},getter:function(b,v){var w=c(b);return u.get(b)||u.set(b,function(k){for(var S=0,C=w.length;S<C;)if(k!=null||!v)k=k[w[S++]];else return;return k})},join:function(b){return b.reduce(function(v,w){return v+(p(w)||r.test(w)?"["+w+"]":(v?".":"")+w)},"")},forEach:function(b,v,w){h(Array.isArray(b)?b:f(b),v,w)}};function c(b){return a.get(b)||a.set(b,f(b).map(function(v){return v.replace(i,"$2")}))}function f(b){return b.match(t)||[""]}function h(b,v,w){var _=b.length,k,S,C,A;for(S=0;S<_;S++)k=b[S],k&&(x(k)&&(k='"'+k+'"'),A=p(k),C=!A&&/^\d+$/.test(k),v.call(w,k,A,C,S,b))}function p(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function d(b){return b.match(n)&&!b.match(r)}function g(b){return o.test(b)}function x(b){return!p(b)&&(d(b)||g(b))}return ks}var hr=ub(),Cs,cc;function cb(){if(cc)return Cs;cc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),o=c=>t(c).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Cs={words:t,upperFirst:r,camelCase:o,pascalCase:c=>r(o(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},Cs}var Os=cb(),Eo={exports:{}},fc;function fb(){if(fc)return Eo.exports;fc=1,Eo.exports=function(o){return e(t(o),o)},Eo.exports.array=e;function e(o,i){var s=o.length,a=new Array(s),l={},u=s,c=r(i),f=n(o);for(i.forEach(function(p){if(!f.has(p[0])||!f.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||h(o[u],u,new Set);return a;function h(p,d,g){if(g.has(p)){var x;try{x=", node was:"+JSON.stringify(p)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!f.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!l[d]){l[d]=!0;var b=c.get(p)||new Set;if(b=Array.from(b),d=b.length){g.add(p);do{var v=b[--d];h(v,f.get(v),g)}while(d);g.delete(p)}a[--s]=p}}}function t(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return Eo.exports}var db=fb();const pb=Sf(db),mb=Object.prototype.toString,hb=Error.prototype.toString,gb=RegExp.prototype.toString,yb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",bb=/^Symbol\((.*)\)(.*)$/;function xb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function dc(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return xb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return yb.call(e).replace(bb,"Symbol($1)");const n=mb.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+hb.call(e)+"]":n==="RegExp"?gb.call(e):null}function Bt(e,t){let r=dc(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let i=dc(this[n],t);return i!==null?i:o},2)}function pc(e){return e==null?[]:[].concat(e)}let mc,hc,gc,vb=/\$\{\s*(\w+)\s*\}/g;mc=Symbol.toStringTag;class yc{constructor(t,r,n,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[mc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],pc(t).forEach(i=>{if(Ze.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}hc=Symbol.hasInstance,gc=Symbol.toStringTag;class Ze extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(vb,(o,i)=>Bt(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,i){const s=new yc(t,r,n,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ze)}static[hc](t){return yc[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let jt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const o=n!=null&&n!==r?` (cast from the value \`${Bt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Bt(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Bt(r,!0)}\``+o}},et={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Zt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Fs={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},As={isValue:"${path} field must be ${value}"},To={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},_o={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:jt,string:et,number:Zt,date:Fs,object:To,array:_o,boolean:As,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Bt(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Bt(r,!0)}\``}return Ze.formatError(jt.notType,e)}}});const So=e=>e&&e.__isYupSchema__;class ko{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...a)=>a.every(l=>l===n);return new ko(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!So(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Co={context:"$",value:"."};class gr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Co.context,this.isValue=this.key[0]===Co.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Co.context:this.isValue?Co.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&hr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}gr.prototype.__isYupRef=!0;const bt=e=>e==null;function Lr(e){function t({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:f,message:h,skipAbsent:p}=e;let{parent:d,context:g,abortEarly:x=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=o;function v(P){return gr.isRef(P)?P.getValue(r,d,g):P}function w(P={}){const I=Object.assign({value:r,originalValue:i,label:s.spec.label,path:P.path||n,spec:s.spec,disableStackTrace:P.disableStackTrace||b},f,P.params);for(const q of Object.keys(I))I[q]=v(I[q]);const R=new Ze(Ze.formatError(P.message||h,I),r,I.path,P.type||u,I.disableStackTrace);return R.params=I,R}const _=x?a:l;let k={path:n,parent:d,type:u,from:o.from,createError:w,resolve:v,options:o,originalValue:i,schema:s};const S=P=>{Ze.isError(P)?_(P):P?l(null):_(w())},C=P=>{Ze.isError(P)?_(P):a(P)};if(p&&bt(r))return S(!0);let N;try{var L;if(N=c.call(k,r,k),typeof((L=N)==null?void 0:L.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,C)}}catch(P){C(P);return}S(N)}return t.OPTIONS=e,t}function wb(e,t,r,n=r){let o,i,s;return t?(hr.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",h=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=r,r=r&&r[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Oo extends Set{describe(){const t=[];for(const r of this.values())t.push(gr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Oo(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function Dr(e,t=new Map){if(So(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Dr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,Dr(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Dr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=Dr(o,t)}else throw Error(`Unable to clone ${e}`);return r}class tt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Oo,this._blacklist=new Oo,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(jt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Dr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(o&&bt(i))return i;let s=Bt(t),a=Bt(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
56
+ hover:file:bg-blue-100`}),r&&g.jsx("p",{className:"text-red-500 text-sm",children:r})]})}const v0=["jpg","jpeg","png","gif","bmp","webp","svg","image"],Pu={pdf:"/pdf-icon.png",word:"/word-icon.png",excel:"/excel-icon.png",powerpoint:"/ppt-icon.png",other:"/file-icon.png"},w0=(e="")=>{var r;const t=((r=e.split(".").pop())==null?void 0:r.toLowerCase())||"";return v0.includes(t)||e.startsWith("data:image/")?"image":["pdf"].includes(t)||e.startsWith("data:application/pdf")?"pdf":["doc","docx"].includes(t)||e.startsWith("data:application/msword")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document")?"word":["xls","xlsx","csv"].includes(t)||e.startsWith("data:application/vnd.ms-excel")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")?"excel":["ppt","pptx"].includes(t)||e.startsWith("data:application/vnd.ms-powerpoint")||e.startsWith("data:application/vnd.openxmlformats-officedocument.presentationml.presentation")?"powerpoint":["txt"].includes(t)||e.startsWith("data:text/")?"text":["zip","rar","7z","tar","gz"].includes(t)?"archive":["mp4","mkv","webm","avi","mov"].includes(t)||e.startsWith("data:video/")?"video":["mp3","wav","flac","aac","ogg"].includes(t)||e.startsWith("data:audio/")?"audio":"other"},E0=({fileUrl:e,fileName:t})=>{const[r,n]=p.useState(!1),[o,i]=p.useState("unknown");p.useEffect(()=>{e&&i(w0(e))},[e]);const s=()=>{o==="image"?n(!0):window.open(e,"_blank")},a=()=>n(!1),l=()=>{if(o==="image")return g.jsx("button",{className:"btn btn-view text-sm font-semibold",type:"button","aria-label":"Preview file",children:g.jsx("span",{children:"Preview File"})});const u=Pu[o]||Pu.other;return g.jsxs("div",{onClick:s,className:"cursor-pointer border border-gray-200 bg-gray-200 rounded p-2 flex flex-col items-center justify-center hover:shadow",title:`Click to ${o==="pdf"?"open":"download"} ${t||"file"}`,children:[o==="image"&&g.jsx("div",{className:"w-14 h-14 flex items-center justify-center mb-2",children:g.jsx("img",{src:u,alt:`${o} icon`,className:"max-w-full max-h-full"})}),g.jsx("div",{className:"text-xs text-gray-700 truncate w-full text-center",children:t||(e==null?void 0:e.split("/").pop())||"Unknown file"})]})};return g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{onClick:s,children:l()}),r&&o==="image"&&g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",onClick:a,children:g.jsxs("div",{className:"relative bg-white p-5 rounded-lg max-w-[90vw] max-h-[90vh] overflow-auto",onClick:u=>u.stopPropagation(),children:[g.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-2xl font-bold text-gray-700","aria-label":"Close preview",children:"×"}),g.jsx("img",{src:e||"/place.png",alt:t||"Full Image",className:"max-w-full max-h-[80vh] mx-auto object-contain"})]})})]})};function T0({element:e,validationData:t}){const[r,n]=p.useState((e==null?void 0:e.value)??null),{register:o=()=>({}),setValue:i,isReadOnly:s}=t||{};return p.useEffect(()=>{o(e.id)},[e.id,o]),g.jsxs("div",{children:[g.jsx(x0,{onFileLoaded:a=>{i(e.id,a),n(a)},disabled:s}),r&&g.jsx(E0,{fileUrl:r.base64,fileName:r.name})]})}function _0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:ue("input-control",e==null?void 0:e.customClass),...r(e.id)})}var fe=function(){return fe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},fe.apply(this,arguments)};function S0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function lt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ot=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},C0={k:1e3,m:1e6,b:1e9},k0=function(e,t){t===void 0&&(t=".");var r=new RegExp("(\\d+(".concat(Ot(t),"\\d*)?)([kmb])$"),"i"),n=e.match(r);if(n){var o=n[1],i=n[3],s=C0[i.toLowerCase()];return Number(o.replace(t,"."))*s}},O0=function(e,t){t===void 0&&(t=",");var r=new RegExp(Ot(t),"g");return e.replace(r,"")},F0=function(e,t){var r=Ot(t.join("")),n=new RegExp("[^\\d".concat(r,"]"),"gi");return e.replace(n,"")},is=function(e){var t=e.value,r=e.groupSeparator,n=r===void 0?",":r,o=e.decimalSeparator,i=o===void 0?".":o,s=e.allowDecimals,a=s===void 0?!0:s,l=e.decimalsLimit,u=l===void 0?2:l,c=e.allowNegativeValue,f=c===void 0?!0:c,h=e.disableAbbreviations,m=h===void 0?!1:h,d=e.prefix,y=d===void 0?"":d,x=e.transformRawValue,b=x===void 0?function(re){return re}:x,w=b(t);if(w==="-")return w;var v=m?[]:["k","m","b"],E=new RegExp("((^|\\D)-\\d)|(-".concat(Ot(y),")")),k=E.test(w),T=RegExp("(\\d+)-?".concat(Ot(y))).exec(t)||[],C=T[0],O=T[1],j=y?C?w.replace(C,"").concat(O):w.replace(y,""):w,D=O0(j,n),N=F0(D,lt([n,i],v,!0)),L=N;if(!m){if(v.some(function(re){return re===N.toLowerCase().replace(i,"")}))return"";var R=k0(N,i);R&&(L=String(R))}var H=k&&f?"-":"";if(i&&L.includes(i)){var J=N.split(i),z=J[0],X=J[1],K=u&&X?X.slice(0,u):X,Q=a?"".concat(i).concat(K):"";return"".concat(H).concat(z).concat(Q)}return"".concat(H).concat(L)},A0=function(e,t,r){if(r!==void 0&&e.length>1){if(r===0)return e.replace(t,"");if(e.includes(t)){var n=e.split(t),o=n[0],i=n[1];if(i.length===r)return e;if(i.length>r)return"".concat(o).concat(t).concat(i.slice(0,r))}var s=e.length>r?new RegExp("(\\d+)(\\d{".concat(r,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(s);if(a){var o=a[1],i=a[2];return"".concat(o).concat(t).concat(i)}}return e},Du=function(e,t){var r=t.groupSeparator,n=r===void 0?",":r,o=t.decimalSeparator,i=o===void 0?".":o,s=new RegExp("\\d([^".concat(Ot(n)).concat(Ot(i),"0-9]+)")),a=e.match(s);return a?a[1]:void 0},gn=function(e){var t=e.value,r=e.decimalSeparator,n=e.intlConfig,o=e.decimalScale,i=e.prefix,s=i===void 0?"":i,a=e.suffix,l=a===void 0?"":a;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(Ot(s),"?"):"","\\d")).test(t),c=r!=="."?j0(t,r,u):t;r&&r!=="-"&&c.startsWith(r)&&(c="0"+c);var f={minimumFractionDigits:o||0,maximumFractionDigits:20},h=n?new Intl.NumberFormat(n.locale,n.currency?fe(fe({},f),{style:"currency",currency:n.currency}):f):new Intl.NumberFormat(void 0,f),m=h.formatToParts(Number(c)),d=$0(m,e),y=Du(d,fe({},e)),x=t.slice(-1)===r?r:"",b=c.match(RegExp("\\d+\\.(\\d+)"))||[],w=b[1];return o===void 0&&w&&r&&(d.includes(r)?d=d.replace(RegExp("(\\d+)(".concat(Ot(r),")(\\d+)"),"g"),"$1$2".concat(w)):y&&!l?d=d.replace(y,"".concat(r).concat(w).concat(y)):d="".concat(d).concat(r).concat(w)),l&&x?"".concat(d).concat(x).concat(l):y&&x?d.replace(y,"".concat(x).concat(y)):y&&l?d.replace(y,"".concat(x).concat(l)):[d,x,l].join("")},j0=function(e,t,r){var n=e;return t&&t!=="."&&(n=n.replace(RegExp(Ot(t),"g"),"."),r&&t==="-"&&(n="-".concat(n.slice(1)))),n},$0=function(e,t){var r=t.prefix,n=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,s=t.disableGroupSeparators,a=s===void 0?!1:s;return e.reduce(function(l,u,c){var f=u.type,h=u.value;return c===0&&r?f==="minusSign"?[h,r]:f==="currency"?lt(lt([],l,!0),[r],!1):[r,h]:f==="currency"?r?l:lt(lt([],l,!0),[h],!1):f==="group"?a?l:lt(lt([],l,!0),[n!==void 0?n:h],!1):f==="decimal"?i!==void 0&&i===0?l:lt(lt([],l,!0),[o!==void 0?o:h],!1):f==="fraction"?lt(lt([],l,!0),[i!==void 0?h.slice(0,i):h],!1):lt(lt([],l,!0),[h],!1)},[""]).join("")},N0={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},P0=function(e){var t=e||{},r=t.locale,n=t.currency,o=r?new Intl.NumberFormat(r,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat;return o.formatToParts(1000.1).reduce(function(i,s,a){return s.type==="currency"?a===0?fe(fe({},i),{currencySymbol:s.value,prefix:s.value}):fe(fe({},i),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?fe(fe({},i),{groupSeparator:s.value}):s.type==="decimal"?fe(fe({},i),{decimalSeparator:s.value}):i},N0)},Lu=function(e){return RegExp(/\d/,"gi").test(e)},D0=function(e,t,r){if(t===void 0&&(t="."),r===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var n=e.split(t),o=n[0],i=n[1];if(r===0)return o;var s=i||"";if(s.length<r)for(;s.length<r;)s+="0";else s=s.slice(0,r);return"".concat(o).concat(t).concat(s)},L0=function(e){var t=e.selectionStart,r=e.value,n=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,s=t,a=r;if(o&&s){var l=r.split("");return n==="Backspace"&&o[s]===i&&(l.splice(s-1,1),s-=1),n==="Delete"&&o[s]===i&&(l.splice(s,1),s+=1),a=l.join(""),{modifiedValue:a,cursorPosition:s}}return{modifiedValue:a,cursorPosition:t}},go=p.forwardRef(function(e,t){var r=e.allowDecimals,n=r===void 0?!0:r,o=e.allowNegativeValue,i=o===void 0?!0:o,s=e.id,a=e.name,l=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,h=e.disabled,m=h===void 0?!1:h,d=e.maxLength,y=e.value,x=e.onValueChange,b=e.fixedDecimalLength,w=e.placeholder,v=e.decimalScale,E=e.prefix,k=e.suffix,T=e.intlConfig,C=e.step,O=e.min,j=e.max,D=e.disableGroupSeparators,N=D===void 0?!1:D,L=e.disableAbbreviations,R=L===void 0?!1:L,H=e.decimalSeparator,J=e.groupSeparator,z=e.onChange,X=e.onFocus,K=e.onBlur,Q=e.onKeyDown,re=e.onKeyUp,je=e.transformRawValue,De=e.formatValueOnBlur,W=De===void 0?!0:De,we=S0(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(H&&Lu(H))throw new Error("decimalSeparator cannot be a number");if(J&&Lu(J))throw new Error("groupSeparator cannot be a number");var _e=p.useMemo(function(){return P0(T)},[T]),ae=H||_e.decimalSeparator||"",$e=J||_e.groupSeparator||"";if(ae&&$e&&ae===$e&&N===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var Se={decimalSeparator:ae,groupSeparator:$e,disableGroupSeparators:N,intlConfig:T,prefix:E||_e.prefix,suffix:k},Le={decimalSeparator:ae,groupSeparator:$e,allowDecimals:n,decimalsLimit:c||b||2,allowNegativeValue:i,disableAbbreviations:R,prefix:E||_e.prefix,transformRawValue:je},wt=p.useState(function(){return f!=null?gn(fe(fe({},Se),{decimalScale:v,value:String(f)})):y!=null?gn(fe(fe({},Se),{decimalScale:v,value:String(y)})):""}),Ce=wt[0],oe=wt[1],ye=p.useState(!1),Ne=ye[0],qt=ye[1],Ht=p.useState(0),Er=Ht[0],S=Ht[1],F=p.useState(0),P=F[0],B=F[1],V=p.useState(null),M=V[0],Y=V[1],G=p.useRef(null);p.useImperativeHandle(t,function(){return G.current});var xe=function(ve,We){qt(!0);var Be=L0({selectionStart:We,value:ve,lastKeyStroke:M,stateValue:Ce,groupSeparator:$e}),Ke=Be.modifiedValue,Ue=Be.cursorPosition,Xe=is(fe({value:Ke},Le));if(!(d&&Xe.replace(/-/g,"").length>d)){if(Xe===""||Xe==="-"||Xe===ae){x&&x(void 0,a,{float:null,formatted:"",value:""}),oe(Xe),S(1);return}var Tt=ae?Xe.replace(ae,"."):Xe,An=parseFloat(Tt),_r=gn(fe({value:Xe},Se));if(Ue!=null){var Sr=Ue+(_r.length-ve.length);Sr=Sr<=0?E?E.length:0:Sr,S(Sr),B(P+1)}if(oe(_r),x){var Xs={float:An,formatted:_r,value:Xe};x(Xe,a,Xs)}}},he=function(ve){var We=ve.target,Be=We.value,Ke=We.selectionStart;xe(Be,Ke),z&&z(ve)},Et=function(ve){return X&&X(ve),Ce?Ce.length:0},Ur=function(ve){var We=ve.target.value,Be=is(fe({value:We},Le));if(Be==="-"||Be===ae||!Be){oe(""),K&&K(ve);return}var Ke=A0(Be,ae,b),Ue=D0(Ke,ae,v!==void 0?v:b),Xe=parseFloat(Ue.replace(ae,".")),Tt=gn(fe(fe({},Se),{value:Ue}));x&&W&&x(Ue,a,{float:Xe,formatted:Tt,value:Ue}),oe(Tt),K&&K(ve)},tr=function(ve){var We=ve.key;if(Y(We),C&&(We==="ArrowUp"||We==="ArrowDown")){ve.preventDefault(),S(Ce.length);var Be=parseFloat(y!=null?String(y).replace(ae,"."):is(fe({value:Ce},Le)))||0,Ke=We==="ArrowUp"?Be+C:Be-C;if(O!==void 0&&Ke<Number(O)||j!==void 0&&Ke>Number(j))return;var Ue=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;xe(String(Ue?Ke.toFixed(Ue):Ke).replace(".",ae))}Q&&Q(ve)},Wt=function(ve){var We=ve.key,Be=ve.currentTarget.selectionStart;if(We!=="ArrowUp"&&We!=="ArrowDown"&&Ce!=="-"){var Ke=Du(Ce,{groupSeparator:$e,decimalSeparator:ae});if(Ke&&Be&&Be>Ce.length-Ke.length&&G.current){var Ue=Ce.length-Ke.length;G.current.setSelectionRange(Ue,Ue)}}re&&re(ve)};p.useEffect(function(){y==null&&f==null&&oe("")},[f,y]),p.useEffect(function(){Ne&&Ce!=="-"&&G.current&&document.activeElement===G.current&&G.current.setSelectionRange(Er,Er)},[Ce,Er,G,Ne,P]);var On=function(){return y!=null&&Ce!=="-"&&(!ae||Ce!==ae)?gn(fe(fe({},Se),{decimalScale:Ne?void 0:v,value:String(y)})):Ce},Tr=fe({type:"text",inputMode:"decimal",id:s,name:a,className:l,onChange:he,onBlur:Ur,onFocus:Et,onKeyDown:tr,onKeyUp:Wt,placeholder:w,disabled:m,value:On(),ref:G},we);if(u){var Fn=u;return p.createElement(Fn,fe({},Tr))}return p.createElement("input",fe({},Tr))});go.displayName="CurrencyInput";const ge=({label:e,name:t,register:r,errors:n,className:o,type:i="text",placeholder:s="",isFloating:a,setValue:l,value:u,trigger:c,prefix:f,disabled:h})=>{var d,y,x,b;const m=r?{...r(t)}:{};return i==="amount"?g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),g.jsx(go,{onValueChange:w=>{l(t,w),r&&r(t),c&&c(t)},placeholder:s,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2,value:u,prefix:f,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n[t])==null?void 0:d.message})]}):["checkbox","radio"].includes(i)?g.jsxs("div",{children:[g.jsxs("label",{className:"flex items-center space-x-2",children:[g.jsx("input",{...m,type:i,className:"h-4 w-4 rounded border-gray-300",value:u,disabled:h}),g.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(n==null?void 0:n[t])&&g.jsx("p",{className:"ml-2 text-sm text-red-600",children:(y=n[t])==null?void 0:y.message})]}):i==="textarea"?g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),g.jsx("textarea",{...m,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:s,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(x=n[t])==null?void 0:x.message})]}):g.jsxs("div",{className:"space-y-1.5 relative",children:[g.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),g.jsx("input",{...m,type:i,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:a?"":s,disabled:h}),(n==null?void 0:n[t])&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:(b=n[t])==null?void 0:b.message})]})};function I0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{className:ue("grid gap-y-[6px]",e.customClass),children:e==null?void 0:e.options.map(n=>g.jsx("div",{children:g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}function M0({element:e,state:t}){return g.jsx("div",{children:"SectionInput"})}function R0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{className:ue("grid gap-y-[6px]",e.customClass),children:e==null?void 0:e.options.map(n=>g.jsx("div",{children:g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}const ss=({className:e="",options:t,placeholder:r="Select",errors:n,register:o,setValue:i,name:s,label:a,value:l,trigger:u,isMultiple:c,isFloatingLabel:f,subText:h,labelClass:m="text-[10px]",loading:d})=>{const[y,x]=p.useState(c?[]:null),b=ue("input-control",e);return p.useEffect(()=>{y&&i&&o&&(i(s,y==null?void 0:y.value),o&&o(s),u&&u(s))},[s,o,y,i,u]),p.useEffect(()=>{const w=t==null?void 0:t.find(v=>typeof v.value=="string"&&typeof l=="string"?v.value.toLowerCase()===l.toLowerCase():typeof v.value=="object"&&typeof l=="object"?v.value.id===(l==null?void 0:l.id):v.value===l);x(w||null)},[l,t]),g.jsxs("div",{className:"relative",children:[!f&&a&&g.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:a}),f&&g.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${m}`,children:a}),g.jsx(Xt,{value:y,onChange:x,multiple:c,children:g.jsxs("div",{className:"relative",children:[g.jsxs(Xt.Button,{className:b,children:[d?g.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):g.jsx("span",{className:"block truncate text-sm text-left",children:(y==null?void 0:y.label)||g.jsx("span",{className:"opacity-60",children:r})}),g.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:g.jsx(Me,{icon:"lucide:chevron-down"})})]}),g.jsx(Au,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx(Xt.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((w,v)=>g.jsx(Xt.Option,{className:({active:E})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${E?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:w,children:({selected:E})=>g.jsx("div",{className:`block truncate text-sm ${E?"font-medium":"font-normal"}`,children:w.label})},v))})})]})}),!n&&h&&g.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:h}),n&&g.jsx("span",{className:"text-sm text-red-500",children:n.message})]})};function V0({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i}=t||{};let s;return i&&(s=i()[e.id]),p.useEffect(()=>{r(e.id)},[e.id,r]),g.jsx("div",{children:g.jsx(ss,{options:(e==null?void 0:e.options)??[],register:r,name:e.id,setValue:o,trigger:n,value:s,className:ue("input-control",e==null?void 0:e.customClass)})})}function B0({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("textarea",{placeholder:e.placeholder,rows:4,className:ue("input-control resize-none",e==null?void 0:e.customClass),...r(e.id)})}var yn=e=>e.type==="checkbox",hr=e=>e instanceof Date,Je=e=>e==null;const Iu=e=>typeof e=="object";var Ee=e=>!Je(e)&&!Array.isArray(e)&&Iu(e)&&!hr(e),U0=e=>Ee(e)&&e.target?yn(e.target)?e.target.checked:e.target.value:e,z0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,q0=(e,t)=>e.has(z0(t)),H0=e=>{const t=e.constructor&&e.constructor.prototype;return Ee(t)&&t.hasOwnProperty("isPrototypeOf")},as=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ve(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(as&&(e instanceof Blob||n))&&(r||Ee(e)))if(t=r?[]:{},!r&&!H0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ve(e[o]));else return e;return t}var bn=e=>Array.isArray(e)?e.filter(Boolean):[],me=e=>e===void 0,U=(e,t,r)=>{if(!t||!Ee(e))return r;const n=bn(t.split(/[,[\].]+?/)).reduce((o,i)=>Je(o)?o:o[i],e);return me(n)||n===e?me(e[t])?r:e[t]:n},Ft=e=>typeof e=="boolean",ls=e=>/^\w*$/.test(e),Mu=e=>bn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,r)=>{let n=-1;const o=ls(t)?[t]:Mu(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=Ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Ru={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},mt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Vu=p.createContext(null),W0=()=>p.useContext(Vu),K0=e=>{const{children:t,...r}=e;return p.createElement(Vu.Provider,{value:r},t)};var Y0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==mt.all&&(t._proxyFormState[s]=!n||mt.all),e[s]}});return o},Ge=e=>Ee(e)&&!Object.keys(e).length,J0=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Ge(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===mt.all)},ut=e=>Array.isArray(e)?e:[e];function Bu(e){const t=p.useRef(e);t.current=e,p.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var At=e=>typeof e=="string",G0=(e,t,r,n,o)=>At(e)?(n&&t.watch.add(e),U(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),U(r,i))):(n&&(t.watchAll=!0),r),Uu=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Zt=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},us=(e,t,r={})=>r.shouldFocus||me(r.shouldFocus)?r.focusName||`${e}.${me(r.focusIndex)?t:r.focusIndex}.`:"",xn=e=>({isOnSubmit:!e||e===mt.onSubmit,isOnBlur:e===mt.onBlur,isOnChange:e===mt.onChange,isOnAll:e===mt.all,isOnTouch:e===mt.onTouched}),cs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Pr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=U(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Pr(a,t))break}else if(Ee(a)&&Pr(a,t))break}}};var zu=(e,t,r)=>{const n=ut(U(e,r));return se(n,"root",t[r]),se(e,r,n),e},fs=e=>e.type==="file",jt=e=>typeof e=="function",yo=e=>{if(!as)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bo=e=>At(e),ds=e=>e.type==="radio",xo=e=>e instanceof RegExp;const qu={value:!1,isValid:!1},Hu={value:!0,isValid:!0};var Wu=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&&!me(e[0].attributes.value)?me(e[0].value)||e[0].value===""?Hu:{value:e[0].value,isValid:!0}:Hu:qu}return qu};const Ku={isValid:!1,value:null};var Yu=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ku):Ku;function Ju(e,t,r="validate"){if(bo(e)||Array.isArray(e)&&e.every(bo)||Ft(e)&&!e)return{type:r,message:bo(e)?e:"",ref:t}}var Dr=e=>Ee(e)&&!xo(e)?e:{value:e,message:""},ps=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:m,name:d,valueAsNumber:y,mount:x,disabled:b}=e._f,w=U(t,d);if(!x||b)return{};const v=s?s[0]:i,E=L=>{n&&v.reportValidity&&(v.setCustomValidity(Ft(L)?"":L||""),v.reportValidity())},k={},T=ds(i),C=yn(i),O=T||C,j=(y||fs(i))&&me(i.value)&&me(w)||yo(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,D=Uu.bind(null,d,r,k),N=(L,R,H,J=Bt.maxLength,z=Bt.minLength)=>{const X=L?R:H;k[d]={type:L?J:z,message:X,ref:i,...D(L?J:z,X)}};if(o?!Array.isArray(w)||!w.length:a&&(!O&&(j||Je(w))||Ft(w)&&!w||C&&!Wu(s).isValid||T&&!Yu(s).isValid)){const{value:L,message:R}=bo(a)?{value:!!a,message:a}:Dr(a);if(L&&(k[d]={type:Bt.required,message:R,ref:v,...D(Bt.required,R)},!r))return E(R),k}if(!j&&(!Je(c)||!Je(f))){let L,R;const H=Dr(f),J=Dr(c);if(!Je(w)&&!isNaN(w)){const z=i.valueAsNumber||w&&+w;Je(H.value)||(L=z>H.value),Je(J.value)||(R=z<J.value)}else{const z=i.valueAsDate||new Date(w),X=re=>new Date(new Date().toDateString()+" "+re),K=i.type=="time",Q=i.type=="week";At(H.value)&&w&&(L=K?X(w)>X(H.value):Q?w>H.value:z>new Date(H.value)),At(J.value)&&w&&(R=K?X(w)<X(J.value):Q?w<J.value:z<new Date(J.value))}if((L||R)&&(N(!!L,H.message,J.message,Bt.max,Bt.min),!r))return E(k[d].message),k}if((l||u)&&!j&&(At(w)||o&&Array.isArray(w))){const L=Dr(l),R=Dr(u),H=!Je(L.value)&&w.length>+L.value,J=!Je(R.value)&&w.length<+R.value;if((H||J)&&(N(H,L.message,R.message),!r))return E(k[d].message),k}if(h&&!j&&At(w)){const{value:L,message:R}=Dr(h);if(xo(L)&&!w.match(L)&&(k[d]={type:Bt.pattern,message:R,ref:i,...D(Bt.pattern,R)},!r))return E(R),k}if(m){if(jt(m)){const L=await m(w,t),R=Ju(L,v);if(R&&(k[d]={...R,...D(Bt.validate,R.message)},!r))return E(R.message),k}else if(Ee(m)){let L={};for(const R in m){if(!Ge(L)&&!r)break;const H=Ju(await m[R](w,t),v,R);H&&(L={...H,...D(R,H.message)},E(H.message),r&&(k[d]=L))}if(!Ge(L)&&(k[d]={ref:v,...L},!r))return k}}return E(!0),k},ms=(e,t)=>[...e,...ut(t)],hs=e=>Array.isArray(e)?e.map(()=>{}):void 0;function gs(e,t,r){return[...e.slice(0,t),...ut(r),...e.slice(t)]}var ys=(e,t,r)=>Array.isArray(e)?(me(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],bs=(e,t)=>[...ut(t),...ut(e)];function X0(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return bn(n).length?n:[]}var xs=(e,t)=>me(t)?[]:X0(e,ut(t).sort((r,n)=>r-n)),vs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function Z0(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=me(e)?n++:e[t[n++]];return e}function Q0(e){for(const t in e)if(e.hasOwnProperty(t)&&!me(e[t]))return!1;return!0}function Oe(e,t){const r=Array.isArray(t)?t:ls(t)?[t]:Mu(t),n=r.length===1?e:Z0(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(Ee(n)&&Ge(n)||Array.isArray(n)&&Q0(n))&&Oe(e,r.slice(0,-1)),e}var Gu=(e,t,r)=>(e[t]=r,e);function eb(e){const t=W0(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=p.useState(r._getFieldArray(n)),u=p.useRef(r._getFieldArray(n).map(Zt)),c=p.useRef(a),f=p.useRef(n),h=p.useRef(!1);f.current=n,c.current=a,r._names.array.add(n),s&&r.register(n,s),Bu({next:({values:T,name:C})=>{if(C===f.current||!C){const O=U(T,f.current);Array.isArray(O)&&(l(O),u.current=O.map(Zt))}},subject:r._subjects.array});const m=p.useCallback(T=>{h.current=!0,r._updateFieldArray(n,T)},[r,n]),d=(T,C)=>{const O=ut(Ve(T)),j=ms(r._getFieldArray(n),O);r._names.focus=us(n,j.length-1,C),u.current=ms(u.current,O.map(Zt)),m(j),l(j),r._updateFieldArray(n,j,ms,{argA:hs(T)})},y=(T,C)=>{const O=ut(Ve(T)),j=bs(r._getFieldArray(n),O);r._names.focus=us(n,0,C),u.current=bs(u.current,O.map(Zt)),m(j),l(j),r._updateFieldArray(n,j,bs,{argA:hs(T)})},x=T=>{const C=xs(r._getFieldArray(n),T);u.current=xs(u.current,T),m(C),l(C),!Array.isArray(U(r._fields,n))&&se(r._fields,n,void 0),r._updateFieldArray(n,C,xs,{argA:T})},b=(T,C,O)=>{const j=ut(Ve(C)),D=gs(r._getFieldArray(n),T,j);r._names.focus=us(n,T,O),u.current=gs(u.current,T,j.map(Zt)),m(D),l(D),r._updateFieldArray(n,D,gs,{argA:T,argB:hs(C)})},w=(T,C)=>{const O=r._getFieldArray(n);vs(O,T,C),vs(u.current,T,C),m(O),l(O),r._updateFieldArray(n,O,vs,{argA:T,argB:C},!1)},v=(T,C)=>{const O=r._getFieldArray(n);ys(O,T,C),ys(u.current,T,C),m(O),l(O),r._updateFieldArray(n,O,ys,{argA:T,argB:C},!1)},E=(T,C)=>{const O=Ve(C),j=Gu(r._getFieldArray(n),T,O);u.current=[...j].map((D,N)=>!D||N===T?Zt():u.current[N]),m(j),l([...j]),r._updateFieldArray(n,j,Gu,{argA:T,argB:O},!0,!1)},k=T=>{const C=ut(Ve(T));u.current=C.map(Zt),m([...C]),l([...C]),r._updateFieldArray(n,[...C],O=>O,{},!0,!1)};return p.useEffect(()=>{if(r._state.action=!1,cs(n,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!xn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(T=>{const C=U(T.errors,n),O=U(r._formState.errors,n);(O?!C&&O.type||C&&(O.type!==C.type||O.message!==C.message):C&&C.type)&&(C?se(r._formState.errors,n,C):Oe(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const T=U(r._fields,n);T&&T._f&&!(xn(r._options.reValidateMode).isOnSubmit&&xn(r._options.mode).isOnSubmit)&&ps(T,r._formValues,r._options.criteriaMode===mt.all,r._options.shouldUseNativeValidation,!0).then(C=>!Ge(C)&&r._subjects.state.next({errors:zu(r._formState.errors,C,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Pr(r._fields,(T,C)=>{if(r._names.focus&&C.startsWith(r._names.focus)&&T.focus)return T.focus(),1}),r._names.focus="",r._updateValid(),h.current=!1},[a,n,r]),p.useEffect(()=>(!U(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||i)&&r.unregister(n)}),[n,r,o,i]),{swap:p.useCallback(w,[m,n,r]),move:p.useCallback(v,[m,n,r]),prepend:p.useCallback(y,[m,n,r]),append:p.useCallback(d,[m,n,r]),remove:p.useCallback(x,[m,n,r]),insert:p.useCallback(b,[m,n,r]),update:p.useCallback(E,[m,n,r]),replace:p.useCallback(k,[m,n,r]),fields:p.useMemo(()=>a.map((T,C)=>({...T,[o]:u.current[C]||Zt()})),[a,o])}}var ws=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},Es=e=>Je(e)||!Iu(e);function Qt(e,t){if(Es(e)||Es(t))return e===t;if(hr(e)&&hr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(hr(i)&&hr(s)||Ee(i)&&Ee(s)||Array.isArray(i)&&Array.isArray(s)?!Qt(i,s):i!==s)return!1}}return!0}var Xu=e=>e.type==="select-multiple",tb=e=>ds(e)||yn(e),Ts=e=>yo(e)&&e.isConnected,Zu=e=>{for(const t in e)if(jt(e[t]))return!0;return!1};function vo(e,t={}){const r=Array.isArray(e);if(Ee(e)||r)for(const n in e)Array.isArray(e[n])||Ee(e[n])&&!Zu(e[n])?(t[n]=Array.isArray(e[n])?[]:{},vo(e[n],t[n])):Je(e[n])||(t[n]=!0);return t}function Qu(e,t,r){const n=Array.isArray(e);if(Ee(e)||n)for(const o in e)Array.isArray(e[o])||Ee(e[o])&&!Zu(e[o])?me(t)||Es(r[o])?r[o]=Array.isArray(e[o])?vo(e[o],[]):{...vo(e[o])}:Qu(e[o],Je(t)?{}:t[o],r[o]):r[o]=!Qt(e[o],t[o]);return r}var vn=(e,t)=>Qu(e,t,vo(t)),ec=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>me(e)?e:t?e===""?NaN:e&&+e:r&&At(e)?new Date(e):n?n(e):e;function _s(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return fs(t)?t.files:ds(t)?Yu(e.refs).value:Xu(t)?[...t.selectedOptions].map(({value:r})=>r):yn(t)?Wu(e.refs).value:ec(me(t.value)?e.ref.value:t.value,e)}var rb=(e,t,r,n)=>{const o={};for(const i of e){const s=U(t,i);s&&se(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},wn=e=>me(e)?e:xo(e)?e.source:Ee(e)?xo(e.value)?e.value.source:e.value:e;const tc="AsyncFunction";var nb=e=>!!e&&!!e.validate&&!!(jt(e.validate)&&e.validate.constructor.name===tc||Ee(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===tc)),ob=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function rc(e,t,r){const n=U(e,r);if(n||ls(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=U(t,i),a=U(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var ib=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,sb=(e,t)=>!bn(U(e,t)).length&&Oe(e,t);const ab={mode:mt.onSubmit,reValidateMode:mt.onChange,shouldFocusError:!0};function lb(e={}){let t={...ab,...e},r={submitCount:0,isDirty:!1,isLoading:jt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Ee(t.defaultValues)||Ee(t.values)?Ve(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ve(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:ws(),array:ws(),state:ws()},h=xn(t.mode),m=xn(t.reValidateMode),d=t.criteriaMode===mt.all,y=S=>F=>{clearTimeout(u),u=setTimeout(S,F)},x=async S=>{if(!t.disabled&&(c.isValid||S)){const F=t.resolver?Ge((await O()).errors):await D(n,!0);F!==r.isValid&&f.state.next({isValid:F})}},b=(S,F)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((S||Array.from(a.mount)).forEach(P=>{P&&(F?se(r.validatingFields,P,F):Oe(r.validatingFields,P))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Ge(r.validatingFields)}))},w=(S,F=[],P,B,V=!0,M=!0)=>{if(B&&P&&!t.disabled){if(s.action=!0,M&&Array.isArray(U(n,S))){const Y=P(U(n,S),B.argA,B.argB);V&&se(n,S,Y)}if(M&&Array.isArray(U(r.errors,S))){const Y=P(U(r.errors,S),B.argA,B.argB);V&&se(r.errors,S,Y),sb(r.errors,S)}if(c.touchedFields&&M&&Array.isArray(U(r.touchedFields,S))){const Y=P(U(r.touchedFields,S),B.argA,B.argB);V&&se(r.touchedFields,S,Y)}c.dirtyFields&&(r.dirtyFields=vn(o,i)),f.state.next({name:S,isDirty:L(S,F),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else se(i,S,F)},v=(S,F)=>{se(r.errors,S,F),f.state.next({errors:r.errors})},E=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},k=(S,F,P,B)=>{const V=U(n,S);if(V){const M=U(i,S,me(P)?U(o,S):P);me(M)||B&&B.defaultChecked||F?se(i,S,F?M:_s(V._f)):J(S,M),s.mount&&x()}},T=(S,F,P,B,V)=>{let M=!1,Y=!1;const G={name:S};if(!t.disabled){const xe=!!(U(n,S)&&U(n,S)._f&&U(n,S)._f.disabled);if(!P||B){c.isDirty&&(Y=r.isDirty,r.isDirty=G.isDirty=L(),M=Y!==G.isDirty);const he=xe||Qt(U(o,S),F);Y=!!(!xe&&U(r.dirtyFields,S)),he||xe?Oe(r.dirtyFields,S):se(r.dirtyFields,S,!0),G.dirtyFields=r.dirtyFields,M=M||c.dirtyFields&&Y!==!he}if(P){const he=U(r.touchedFields,S);he||(se(r.touchedFields,S,P),G.touchedFields=r.touchedFields,M=M||c.touchedFields&&he!==P)}M&&V&&f.state.next(G)}return M?G:{}},C=(S,F,P,B)=>{const V=U(r.errors,S),M=c.isValid&&Ft(F)&&r.isValid!==F;if(t.delayError&&P?(l=y(()=>v(S,P)),l(t.delayError)):(clearTimeout(u),l=null,P?se(r.errors,S,P):Oe(r.errors,S)),(P?!Qt(V,P):V)||!Ge(B)||M){const Y={...B,...M&&Ft(F)?{isValid:F}:{},errors:r.errors,name:S};r={...r,...Y},f.state.next(Y)}},O=async S=>{b(S,!0);const F=await t.resolver(i,t.context,rb(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(S),F},j=async S=>{const{errors:F}=await O(S);if(S)for(const P of S){const B=U(F,P);B?se(r.errors,P,B):Oe(r.errors,P)}else r.errors=F;return F},D=async(S,F,P={valid:!0})=>{for(const B in S){const V=S[B];if(V){const{_f:M,...Y}=V;if(M){const G=a.array.has(M.name),xe=V._f&&nb(V._f);xe&&c.validatingFields&&b([B],!0);const he=await ps(V,i,d,t.shouldUseNativeValidation&&!F,G);if(xe&&c.validatingFields&&b([B]),he[M.name]&&(P.valid=!1,F))break;!F&&(U(he,M.name)?G?zu(r.errors,he,M.name):se(r.errors,M.name,he[M.name]):Oe(r.errors,M.name))}!Ge(Y)&&await D(Y,F,P)}}return P.valid},N=()=>{for(const S of a.unMount){const F=U(n,S);F&&(F._f.refs?F._f.refs.every(P=>!Ts(P)):!Ts(F._f.ref))&&ae(S)}a.unMount=new Set},L=(S,F)=>!t.disabled&&(S&&F&&se(i,S,F),!Qt(je(),o)),R=(S,F,P)=>G0(S,a,{...s.mount?i:me(F)?o:At(S)?{[S]:F}:F},P,F),H=S=>bn(U(s.mount?i:o,S,t.shouldUnregister?U(o,S,[]):[])),J=(S,F,P={})=>{const B=U(n,S);let V=F;if(B){const M=B._f;M&&(!M.disabled&&se(i,S,ec(F,M)),V=yo(M.ref)&&Je(F)?"":F,Xu(M.ref)?[...M.ref.options].forEach(Y=>Y.selected=V.includes(Y.value)):M.refs?yn(M.ref)?M.refs.length>1?M.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(V)?!!V.find(G=>G===Y.value):V===Y.value)):M.refs[0]&&(M.refs[0].checked=!!V):M.refs.forEach(Y=>Y.checked=Y.value===V):fs(M.ref)?M.ref.value="":(M.ref.value=V,M.ref.type||f.values.next({name:S,values:{...i}})))}(P.shouldDirty||P.shouldTouch)&&T(S,V,P.shouldTouch,P.shouldDirty,!0),P.shouldValidate&&re(S)},z=(S,F,P)=>{for(const B in F){const V=F[B],M=`${S}.${B}`,Y=U(n,M);(a.array.has(S)||Ee(V)||Y&&!Y._f)&&!hr(V)?z(M,V,P):J(M,V,P)}},X=(S,F,P={})=>{const B=U(n,S),V=a.array.has(S),M=Ve(F);se(i,S,M),V?(f.array.next({name:S,values:{...i}}),(c.isDirty||c.dirtyFields)&&P.shouldDirty&&f.state.next({name:S,dirtyFields:vn(o,i),isDirty:L(S,M)})):B&&!B._f&&!Je(M)?z(S,M,P):J(S,M,P),cs(S,a)&&f.state.next({...r}),f.values.next({name:s.mount?S:void 0,values:{...i}})},K=async S=>{s.mount=!0;const F=S.target;let P=F.name,B=!0;const V=U(n,P),M=()=>F.type?_s(V._f):U0(S),Y=G=>{B=Number.isNaN(G)||hr(G)&&isNaN(G.getTime())||Qt(G,U(i,P,G))};if(V){let G,xe;const he=M(),Et=S.type===Ru.BLUR||S.type===Ru.FOCUS_OUT,Ur=!ob(V._f)&&!t.resolver&&!U(r.errors,P)&&!V._f.deps||ib(Et,U(r.touchedFields,P),r.isSubmitted,m,h),tr=cs(P,a,Et);se(i,P,he),Et?(V._f.onBlur&&V._f.onBlur(S),l&&l(0)):V._f.onChange&&V._f.onChange(S);const Wt=T(P,he,Et,!1),On=!Ge(Wt)||tr;if(!Et&&f.values.next({name:P,type:S.type,values:{...i}}),Ur)return c.isValid&&(t.mode==="onBlur"?Et&&x():x()),On&&f.state.next({name:P,...tr?{}:Wt});if(!Et&&tr&&f.state.next({...r}),t.resolver){const{errors:Tr}=await O([P]);if(Y(he),B){const Fn=rc(r.errors,n,P),ve=rc(Tr,n,Fn.name||P);G=ve.error,P=ve.name,xe=Ge(Tr)}}else b([P],!0),G=(await ps(V,i,d,t.shouldUseNativeValidation))[P],b([P]),Y(he),B&&(G?xe=!1:c.isValid&&(xe=await D(n,!0)));B&&(V._f.deps&&re(V._f.deps),C(P,xe,G,Wt))}},Q=(S,F)=>{if(U(r.errors,F)&&S.focus)return S.focus(),1},re=async(S,F={})=>{let P,B;const V=ut(S);if(t.resolver){const M=await j(me(S)?S:V);P=Ge(M),B=S?!V.some(Y=>U(M,Y)):P}else S?(B=(await Promise.all(V.map(async M=>{const Y=U(n,M);return await D(Y&&Y._f?{[M]:Y}:Y)}))).every(Boolean),!(!B&&!r.isValid)&&x()):B=P=await D(n);return f.state.next({...!At(S)||c.isValid&&P!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:P}:{},errors:r.errors}),F.shouldFocus&&!B&&Pr(n,Q,S?V:a.mount),B},je=S=>{const F={...s.mount?i:o};return me(S)?F:At(S)?U(F,S):S.map(P=>U(F,P))},De=(S,F)=>({invalid:!!U((F||r).errors,S),isDirty:!!U((F||r).dirtyFields,S),error:U((F||r).errors,S),isValidating:!!U(r.validatingFields,S),isTouched:!!U((F||r).touchedFields,S)}),W=S=>{S&&ut(S).forEach(F=>Oe(r.errors,F)),f.state.next({errors:S?r.errors:{}})},we=(S,F,P)=>{const B=(U(n,S,{_f:{}})._f||{}).ref,V=U(r.errors,S)||{},{ref:M,message:Y,type:G,...xe}=V;se(r.errors,S,{...xe,...F,ref:B}),f.state.next({name:S,errors:r.errors,isValid:!1}),P&&P.shouldFocus&&B&&B.focus&&B.focus()},_e=(S,F)=>jt(S)?f.values.subscribe({next:P=>S(R(void 0,F),P)}):R(S,F,!0),ae=(S,F={})=>{for(const P of S?ut(S):a.mount)a.mount.delete(P),a.array.delete(P),F.keepValue||(Oe(n,P),Oe(i,P)),!F.keepError&&Oe(r.errors,P),!F.keepDirty&&Oe(r.dirtyFields,P),!F.keepTouched&&Oe(r.touchedFields,P),!F.keepIsValidating&&Oe(r.validatingFields,P),!t.shouldUnregister&&!F.keepDefaultValue&&Oe(o,P);f.values.next({values:{...i}}),f.state.next({...r,...F.keepDirty?{isDirty:L()}:{}}),!F.keepIsValid&&x()},$e=({disabled:S,name:F,field:P,fields:B,value:V})=>{if(Ft(S)&&s.mount||S){const M=S?void 0:me(V)?_s(P?P._f:U(B,F)._f):V;(S||!S&&!me(M))&&se(i,F,M),T(F,M,!1,!1,!0)}},Se=(S,F={})=>{let P=U(n,S);const B=Ft(F.disabled)||Ft(t.disabled);return se(n,S,{...P||{},_f:{...P&&P._f?P._f:{ref:{name:S}},name:S,mount:!0,...F}}),a.mount.add(S),P?$e({field:P,disabled:Ft(F.disabled)?F.disabled:t.disabled,name:S,value:F.value}):k(S,!0,F.value),{...B?{disabled:F.disabled||t.disabled}:{},...t.progressive?{required:!!F.required,min:wn(F.min),max:wn(F.max),minLength:wn(F.minLength),maxLength:wn(F.maxLength),pattern:wn(F.pattern)}:{},name:S,onChange:K,onBlur:K,ref:V=>{if(V){Se(S,F),P=U(n,S);const M=me(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Y=tb(M),G=P._f.refs||[];if(Y?G.find(xe=>xe===M):M===P._f.ref)return;se(n,S,{_f:{...P._f,...Y?{refs:[...G.filter(Ts),M,...Array.isArray(U(o,S))?[{}]:[]],ref:{type:M.type,name:S}}:{ref:M}}}),k(S,!1,void 0,M)}else P=U(n,S,{}),P._f&&(P._f.mount=!1),(t.shouldUnregister||F.shouldUnregister)&&!(q0(a.array,S)&&s.action)&&a.unMount.add(S)}}},Le=()=>t.shouldFocusError&&Pr(n,Q,a.mount),wt=S=>{Ft(S)&&(f.state.next({disabled:S}),Pr(n,(F,P)=>{const B=U(n,P);B&&(F.disabled=B._f.disabled||S,Array.isArray(B._f.refs)&&B._f.refs.forEach(V=>{V.disabled=B._f.disabled||S}))},0,!1))},Ce=(S,F)=>async P=>{let B;if(P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist()),t.disabled){F&&await F({...r.errors},P);return}let V=Ve(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Y}=await O();r.errors=M,V=Y}else await D(n);if(Oe(r.errors,"root"),Ge(r.errors)){f.state.next({errors:{}});try{await S(V,P)}catch(M){B=M}}else F&&await F({...r.errors},P),Le(),setTimeout(Le);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ge(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},oe=(S,F={})=>{U(n,S)&&(me(F.defaultValue)?X(S,Ve(U(o,S))):(X(S,F.defaultValue),se(o,S,Ve(F.defaultValue))),F.keepTouched||Oe(r.touchedFields,S),F.keepDirty||(Oe(r.dirtyFields,S),r.isDirty=F.defaultValue?L(S,Ve(U(o,S))):L()),F.keepError||(Oe(r.errors,S),c.isValid&&x()),f.state.next({...r}))},ye=(S,F={})=>{const P=S?Ve(S):o,B=Ve(P),V=Ge(S),M=V?o:B;if(F.keepDefaultValues||(o=P),!F.keepValues){if(F.keepDirtyValues){const Y=new Set([...a.mount,...Object.keys(vn(o,i))]);for(const G of Array.from(Y))U(r.dirtyFields,G)?se(M,G,U(i,G)):X(G,U(M,G))}else{if(as&&me(S))for(const Y of a.mount){const G=U(n,Y);if(G&&G._f){const xe=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if(yo(xe)){const he=xe.closest("form");if(he){he.reset();break}}}}n={}}i=t.shouldUnregister?F.keepDefaultValues?Ve(o):{}:Ve(M),f.array.next({values:{...M}}),f.values.next({values:{...M}})}a={mount:F.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!F.keepIsValid||!!F.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:F.keepSubmitCount?r.submitCount:0,isDirty:V?!1:F.keepDirty?r.isDirty:!!(F.keepDefaultValues&&!Qt(S,o)),isSubmitted:F.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:V?{}:F.keepDirtyValues?F.keepDefaultValues&&i?vn(o,i):r.dirtyFields:F.keepDefaultValues&&S?vn(o,S):F.keepDirty?r.dirtyFields:{},touchedFields:F.keepTouched?r.touchedFields:{},errors:F.keepErrors?r.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ne=(S,F)=>ye(jt(S)?S(i):S,F);return{control:{register:Se,unregister:ae,getFieldState:De,handleSubmit:Ce,setError:we,_executeSchema:O,_getWatch:R,_getDirty:L,_updateValid:x,_removeUnmounted:N,_updateFieldArray:w,_updateDisabledField:$e,_getFieldArray:H,_reset:ye,_resetDefaultValues:()=>jt(t.defaultValues)&&t.defaultValues().then(S=>{Ne(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:wt,_subjects:f,_proxyFormState:c,_setErrors:E,get _fields(){return n},get _formValues(){return i},get _state(){return s},set _state(S){s=S},get _defaultValues(){return o},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:re,register:Se,handleSubmit:Ce,watch:_e,setValue:X,getValues:je,reset:Ne,resetField:oe,clearErrors:W,unregister:ae,setError:we,setFocus:(S,F={})=>{const P=U(n,S),B=P&&P._f;if(B){const V=B.refs?B.refs[0]:B.ref;V.focus&&(V.focus(),F.shouldSelect&&jt(V.select)&&V.select())}},getFieldState:De}}function Ss(e={}){const t=p.useRef(),r=p.useRef(),[n,o]=p.useState({isDirty:!1,isValidating:!1,isLoading:jt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:jt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...lb(e),formState:n});const i=t.current.control;return i._options=e,Bu({subject:i._subjects.state,next:s=>{J0(s,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),p.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),p.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),p.useEffect(()=>{e.values&&!Qt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),p.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),p.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),p.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),p.useMemo(()=>({...t.current,formState:Y0(n,i)}),[n,i])}const nc=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},oc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?nc(n.ref,r,e):n.refs&&n.refs.forEach(o=>nc(o,r,e))}},ub=(e,t)=>{t.shouldUseNativeValidation&&oc(e,t);const r={};for(const n in e){const o=U(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(cb(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));se(s,"root",i),se(r,n,s)}else se(r,n,i)}return r},cb=(e,t)=>e.some(r=>r.startsWith(t+"."));function Cs(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&oc({},i),{values:r.raw?n:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:ub((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var f=u[c.path].types,h=f&&f[c.type];u[c.path]=Uu(c.path,l,u,c.type,h?[].concat(h,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}var ks,ic;function fb(){if(ic)return ks;ic=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,w){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=w};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new e(s),l=new e(s),u=new e(s);ks={Cache:e,split:f,normalizePath:c,setter:function(b){var w=c(b);return l.get(b)||l.set(b,function(E,k){for(var T=0,C=w.length,O=E;T<C-1;){var j=w[T];if(j==="__proto__"||j==="constructor"||j==="prototype")return E;O=O[w[T++]]}O[w[T]]=k})},getter:function(b,w){var v=c(b);return u.get(b)||u.set(b,function(k){for(var T=0,C=v.length;T<C;)if(k!=null||!w)k=k[v[T++]];else return;return k})},join:function(b){return b.reduce(function(w,v){return w+(m(v)||r.test(v)?"["+v+"]":(w?".":"")+v)},"")},forEach:function(b,w,v){h(Array.isArray(b)?b:f(b),w,v)}};function c(b){return a.get(b)||a.set(b,f(b).map(function(w){return w.replace(i,"$2")}))}function f(b){return b.match(t)||[""]}function h(b,w,v){var E=b.length,k,T,C,O;for(T=0;T<E;T++)k=b[T],k&&(x(k)&&(k='"'+k+'"'),O=m(k),C=!O&&/^\d+$/.test(k),w.call(v,k,O,C,T,b))}function m(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function d(b){return b.match(n)&&!b.match(r)}function y(b){return o.test(b)}function x(b){return!m(b)&&(d(b)||y(b))}return ks}var gr=fb(),Os,sc;function db(){if(sc)return Os;sc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),o=c=>t(c).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Os={words:t,upperFirst:r,camelCase:o,pascalCase:c=>r(o(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},Os}var Fs=db(),wo={exports:{}},ac;function pb(){if(ac)return wo.exports;ac=1,wo.exports=function(o){return e(t(o),o)},wo.exports.array=e;function e(o,i){var s=o.length,a=new Array(s),l={},u=s,c=r(i),f=n(o);for(i.forEach(function(m){if(!f.has(m[0])||!f.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||h(o[u],u,new Set);return a;function h(m,d,y){if(y.has(m)){var x;try{x=", node was:"+JSON.stringify(m)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!f.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[d]){l[d]=!0;var b=c.get(m)||new Set;if(b=Array.from(b),d=b.length){y.add(m);do{var w=b[--d];h(w,f.get(w),y)}while(d);y.delete(m)}a[--s]=m}}}function t(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return wo.exports}var mb=pb();const hb=xf(mb),gb=Object.prototype.toString,yb=Error.prototype.toString,bb=RegExp.prototype.toString,xb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vb=/^Symbol\((.*)\)(.*)$/;function wb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function lc(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return wb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return xb.call(e).replace(vb,"Symbol($1)");const n=gb.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+yb.call(e)+"]":n==="RegExp"?bb.call(e):null}function Ut(e,t){let r=lc(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let i=lc(this[n],t);return i!==null?i:o},2)}function uc(e){return e==null?[]:[].concat(e)}let cc,fc,dc,Eb=/\$\{\s*(\w+)\s*\}/g;cc=Symbol.toStringTag;class pc{constructor(t,r,n,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[cc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],uc(t).forEach(i=>{if(tt.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}fc=Symbol.hasInstance,dc=Symbol.toStringTag;class tt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Eb,(o,i)=>Ut(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,i){const s=new pc(t,r,n,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[dc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,tt)}static[fc](t){return pc[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const o=n!=null&&n!==r?` (cast from the value \`${Ut(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ut(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ut(r,!0)}\``+o}},rt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},er={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},As={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},js={isValue:"${path} field must be ${value}"},Eo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},To={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:$t,string:rt,number:er,date:As,object:Eo,array:To,boolean:js,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Ut(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Ut(r,!0)}\``}return tt.formatError($t.notType,e)}}});const _o=e=>e&&e.__isYupSchema__;class So{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...a)=>a.every(l=>l===n);return new So(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!_o(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Co={context:"$",value:"."};class yr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Co.context,this.isValue=this.key[0]===Co.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Co.context:this.isValue?Co.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&gr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}yr.prototype.__isYupRef=!0;const xt=e=>e==null;function Lr(e){function t({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:f,message:h,skipAbsent:m}=e;let{parent:d,context:y,abortEarly:x=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=o;function w(N){return yr.isRef(N)?N.getValue(r,d,y):N}function v(N={}){const L=Object.assign({value:r,originalValue:i,label:s.spec.label,path:N.path||n,spec:s.spec,disableStackTrace:N.disableStackTrace||b},f,N.params);for(const H of Object.keys(L))L[H]=w(L[H]);const R=new tt(tt.formatError(N.message||h,L),r,L.path,N.type||u,L.disableStackTrace);return R.params=L,R}const E=x?a:l;let k={path:n,parent:d,type:u,from:o.from,createError:v,resolve:w,options:o,originalValue:i,schema:s};const T=N=>{tt.isError(N)?E(N):N?l(null):E(v())},C=N=>{tt.isError(N)?E(N):a(N)};if(m&&xt(r))return T(!0);let j;try{var D;if(j=c.call(k,r,k),typeof((D=j)==null?void 0:D.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(T,C)}}catch(N){C(N);return}T(j)}return t.OPTIONS=e,t}function Tb(e,t,r,n=r){let o,i,s;return t?(gr.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",h=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=r,r=r&&r[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class ko extends Set{describe(){const t=[];for(const r of this.values())t.push(yr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new ko(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function Ir(e,t=new Map){if(_o(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Ir(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,Ir(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Ir(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=Ir(o,t)}else throw Error(`Unable to clone ${e}`);return r}class nt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ko,this._blacklist=new ko,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Ir(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(o&&xt(i))return i;let s=Ut(t),a=Ut(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
57
57
 
58
58
  attempted value: ${s}
59
- `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=r,l=t;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=g=>{o||(o=!0,r(g,s))},f=g=>{o||(o=!0,n(g,s))},h=i.length,p=[];if(!h)return f([]);let d={value:s,originalValue:a,path:l,options:u,schema:this};for(let g=0;g<i.length;g++){const x=i[g];x(d,c,function(v){v&&(Array.isArray(v)?p.push(...v):p.push(v)),--h<=0&&f(p)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:i,options:s}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=n[a];const c=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,h,p)=>this.resolve(c)._validate(u,c,h,p)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,r,(l,u)=>{Ze.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Ze(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,l)=>{throw Ze.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Ze(a,t,void 0,void 0,s);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Ze.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Ze.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Dr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Lr({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Lr({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=jt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=jt.notNull){return this.nullability(!1,t)}required(t=jt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=jt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Lr(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=pc(t).map(i=>new gr(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new ko(o,r):ko.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Lr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=jt.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Lr({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=jt.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Lr({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}tt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])tt.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:i,schema:s}=wb(this,t,r,n.context);return s[e](o&&o[i],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])tt.prototype[e]=tt.prototype.oneOf;for(const e of["not","nope"])tt.prototype[e]=tt.prototype.notOneOf;const Eb=()=>!0;function vn(e){return new bc(e)}class bc extends tt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Eb},t))}}vn.prototype=bc.prototype;function Fo(){return new xc}class xc extends tt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=As.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return bt(r)||r===!0}})}isFalse(t=As.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return bt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Fo.prototype=xc.prototype;const Tb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _b(e){const t=js(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function js(e){var t,r;const n=Tb.exec(e);return n?{year:Ut(n[1]),month:Ut(n[2],1)-1,day:Ut(n[3],1),hour:Ut(n[4]),minute:Ut(n[5]),second:Ut(n[6]),millisecond:n[7]?Ut(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Ut(n[10]),minuteOffset:Ut(n[11])}:null}function Ut(e,t=0){return Number(e)||t}let Sb=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kb=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Cb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ob="^\\d{4}-\\d{2}-\\d{2}",Fb="\\d{2}:\\d{2}:\\d{2}",Ab="(([+-]\\d{2}(:?\\d{2})?)|Z)",jb=new RegExp(`${Ob}T${Fb}(\\.\\d+)?${Ab}$`),$b=e=>bt(e)||e===e.trim(),Nb={}.toString();function be(){return new vc}class vc extends tt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Nb?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||jt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=et.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=et.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=et.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||et.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=et.email){return this.matches(Sb,{name:"email",message:t,excludeEmptyString:!0})}url(t=et.url){return this.matches(kb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=et.uuid){return this.matches(Cb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches(jb,{name:"datetime",message:r||et.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||et.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=js(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||et.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=js(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=et.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:$b})}lowercase(t=et.lowercase){return this.transform(r=>bt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>bt(r)||r===r.toLowerCase()})}uppercase(t=et.uppercase){return this.transform(r=>bt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>bt(r)||r===r.toUpperCase()})}}be.prototype=vc.prototype;let Pb=e=>e!=+e;function wn(){return new wc}class wc extends tt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Pb(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=Zt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Zt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Zt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Zt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Zt.positive){return this.moreThan(0,t)}negative(t=Zt.negative){return this.lessThan(0,t)}integer(t=Zt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>bt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>bt(o)?o:Math[t](o))}}wn.prototype=wc.prototype;let Ec=new Date(""),Lb=e=>Object.prototype.toString.call(e)==="[object Date]";function $s(){return new En}class En extends tt{constructor(){super({type:"date",check(t){return Lb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=_b(t),isNaN(t)?En.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(gr.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=Fs.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=Fs.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}En.INVALID_DATE=Ec,$s.prototype=En.prototype,$s.INVALID_DATE=Ec;function Db(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=hr.split(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(const s of Object.keys(e)){let a=e[s];n.add(s),gr.isRef(a)&&a.isSibling?i(a.path,s):So(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return pb.array(Array.from(n),r).reverse()}function Tc(e,t){let r=1/0;return e.some((n,o)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=o,!0}),r}function _c(e){return(t,r)=>Tc(e,t)-Tc(e,r)}const Sc=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ao(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ao(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ao(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ao)}):"optional"in e?e.optional():e}const Ib=(e,t)=>{const r=[...hr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=hr.getter(hr.join(r),!0)(e);return!!(o&&n in o)};let kc=e=>Object.prototype.toString.call(e)==="[object Object]";function Cc(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Mb=_c([]);function Tn(e){return new Oc(e)}class Oc extends tt{constructor(t){super({type:"object",check(r){return kc(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Mb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of a){let h=i[f],p=f in o;if(h){let d,g=o[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:g,context:r.context,parent:l});let x=h instanceof tt?h.spec:void 0,b=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in o;continue}d=!r.__validating||!b?h.cast(o[f],u):o[f],d!==void 0&&(l[f]=d)}else p&&!s&&(l[f]=o[f]);(p!==f in l||l[f]!==o[f])&&(c=!0)}return c?l:o}_validate(t,r={},n,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,u)=>{if(!a||!kc(u)){o(l,u);return}s=s||u;let c=[];for(let f of this._nodes){let h=this.fields[f];!h||gr.isRef(h)||c.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:r},n,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[o,i]of Object.entries(this.fields)){const s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;const i=this.fields[n];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Db(t,r),n._sortErrors=_c(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ao(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>t.includes(n)&&t.includes(o)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let o=hr.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Ib(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=o(i)),s})}json(){return this.transform(Sc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||To.exact,test(r){if(r==null)return!0;const n=Cc(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=To.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const i=Cc(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=To.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Os.camelCase)}snakeCase(){return this.transformKeys(Os.snakeCase)}constantCase(){return this.transformKeys(t=>Os.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}}Tn.prototype=Oc.prototype;function Fc(e){return new Ac(e)}class Ac extends tt{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1;const i=n.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(t,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let p=0;p<u.length;p++){var h;f[p]=s.asNestedTest({options:r,index:p,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,p=>o(p.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Sc)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!So(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Bt(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=_o.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||_o.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||_o.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,o,i)=>!t(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}Fc.prototype=Ac.prototype;const Rb=({tabs:e,className:t="",count:r={},setActiveTab:n,activeTab:o,btnClass:i=""})=>{const s=ut("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return y.jsx("div",{className:s,children:e.map(a=>{const l=o===a.key,u=r[a.key]||0,c=ut("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",i),f=ut({"border-gray-400 darks:border-white !text-primary darks:!text-white":l,"border-transparent text-[#667085] darks:!text-white/60":!l}),h=u>0&&y.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return y.jsxs("button",{onClick:()=>n(a.key),className:ut(c,f),"aria-selected":l,role:"tab",type:"button",children:[a.title,h]},a.key)})})},Vb=[{type:"textField",label:"Short Text",icon:"fluent:text-16-filled",inputLabel:"Short Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"longText",label:"Long Text",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"validateInput",label:"Validate Input",icon:"iconoir:www",inputLabel:"Validate Input Label",required:!1,inputType:"validateInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:null,url:"https://api.example.com/validate?value={value}",method:"GET",responseType:"string"},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null,prefix:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"tableInput",label:"Table Input",icon:"iconoir:table",inputLabel:"Table Input Label",required:!1,inputType:"tableInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:[],denominators:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"Grid Text Label",inputType:"grid",placeholder:"Type here",description:"",grid:2,gridData:[]}],Bb=["amount"],Ub=["text","number"],zb=["text","number","amount","date","password"],Hb=["amount"],qb=["grid","section"],Wb=["radio","select","checkbox","multiselect"],Kb=["validateInput"],Yb=["tableInput"];function Jb({value:e=[],onChange:t,onGetValue:r}){const[n,o]=m.useState((e==null?void 0:e.length)>0?e:[{value:""}]);m.useEffect(()=>{(e==null?void 0:e.length)>0&&JSON.stringify(e)!==JSON.stringify(n)&&o(e)},[e]);function i(l,u){const c=[...n];c[u]={...c[u],value:l},o(c),t&&t(c)}function s(){const l=[...n,{value:""}];o(l),t&&t(l)}function a(l){const u=n.filter((c,f)=>f!==l);o(u),t&&t(u)}return m.useEffect(()=>{r&&r(JSON.stringify({values:n}))},[r,n]),y.jsxs("div",{className:"]",children:[y.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[y.jsx("div",{className:"grid text-sm font-bold border-b border-gray-100 bg-gray-50",children:y.jsx("div",{className:"px-2 py-2",children:y.jsx("span",{className:"",children:"Add Denominations"})})}),n.map((l,u)=>y.jsx("div",{className:"grid text-sm border-b border-gray-100",children:y.jsxs("div",{className:"flex items-center gap-x-4 px-2 py-1",children:[y.jsx("span",{className:"flex-1",children:y.jsx(yo,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:l.value,onValueChange:c=>i(c,u),allowNegativeValue:!1})}),y.jsx("button",{onClick:()=>a(u),className:"text-red-500 hover:text-red-700 px-2",type:"button","aria-label":"Remove row",children:"×"})]})},l.key+u+Math.random()))]}),y.jsx("div",{className:"mt-1 flex justify-end",children:y.jsx("button",{type:"button",onClick:s,className:"font-semibold !text-blue-700 text-sm rounded outline-0 focus:outline-0",children:"+ Add"})})]})}const Xb=()=>y.jsx("blockquote",{className:"bg-gray-100 p-4 rounded-md text-gray-700",children:y.jsxs("ul",{children:[y.jsxs("li",{className:"text-xs",children:["API URL example format: ",y.jsx("code",{children:"https://example.com/validation?value={value}"})]}),y.jsxs("li",{className:"text-xs",children:[y.jsx("span",{className:"block mb-1",children:" Response example format:"}),y.jsx("pre",{className:"bg-white p-2 rounded-md",children:y.jsxs("code",{children:["{ ",y.jsx("br",{}),'  "data": { ',y.jsx("br",{}),'    "status": true, ',y.jsx("br",{}),'    "description": "John Doe" ',y.jsx("br",{}),"  } ",y.jsx("br",{}),"}"]})})]})]})}),Gb=Tn().shape({inputLabel:be().required("Label is required"),placeholder:be().nullable(),description:be().nullable(),isReadOnly:Fo(),isDisabled:Fo(),isRequired:Fo(),requiredMessage:be().nullable(),minLengthMessage:be().nullable(),maxLengthMessage:be().nullable(),maxLength:wn().nullable(),minLength:wn().nullable(),inputType:be().nullable(),maxAmountMessage:be().nullable(),maxAmount:be().nullable(),options:Fc().of(Tn().shape({label:be().nullable(),value:be().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).nullable(),prefix:be().nullable(),url:be().nullable(),method:be().nullable(),denominators:vn().nullable(),responseType:be().nullable(),minAmount:be().nullable()}),Qb=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],Zb=({isOpen:e,onClose:t,element:r})=>{const{updateElement:n}=m.useContext(mt),[o,i]=m.useState("basic"),s=Jn("config"),{register:a,handleSubmit:l,control:u,setValue:c,watch:f,trigger:h,formState:{errors:p,isSubmitting:d,isValid:g},reset:x}=_s({resolver:Ss(Gb),defaultValues:{...r,options:r.options||[]}}),{fields:b,append:v,remove:w}=Q0({control:u,name:"options"});m.useEffect(()=>{e||x()},[e,x]);const _=S=>{n(S,r.sectionId),t()},k=()=>y.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[b.map((S,C)=>y.jsxs("div",{className:"flex gap-x-4 items-center ",children:[y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Label",name:`options.${C}.label`,register:a,errors:p,element:r,placeholder:"Label",isFloating:!0})}),y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Value",name:`options.${C}.value`,register:a,errors:p,element:r,placeholder:"Value",isFloating:!0})})," ",y.jsx("button",{type:"button",className:"outline-none hover:opacity-80",onClick:()=>w(C),children:y.jsx(Be,{icon:"iconamoon:sign-times-fill"})})]},S.id)),y.jsxs("div",{children:[" ",y.jsxs("button",{type:"button",className:"mt-2 text-gray-700 font-medium text-sm flex gap-x-1 items-center",onClick:()=>v({label:"",value:"",id:en()}),children:[y.jsx(Be,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[y.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:r.label}),y.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:y.jsx(Be,{icon:"tabler:x"})})]}),y.jsx("div",{className:"w-full",children:y.jsx(Rb,{tabs:Qb,setActiveTab:i,activeTab:o,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),y.jsxs("form",{onSubmit:l(_),className:"w-full",children:[o==="basic"&&y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsx(ve,{label:"Label",name:"inputLabel",register:a,errors:p,element:r}),zb.includes(r.inputType)&&y.jsx(ve,{label:"Placeholder",name:"placeholder",register:a,errors:p,element:r}),Bb.includes(r.inputType)&&y.jsx(ve,{label:"Prefix",name:"prefix",register:a,errors:p,element:r}),Kb.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsx(Xb,{}),y.jsx(ve,{label:"Api Url",name:"url",register:a,errors:p,element:r}),y.jsx(is,{label:"Api Method",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],register:a,name:"method",setValue:c,trigger:h,value:f("method")}),y.jsx(is,{label:"Api Response type",options:[{label:"String",value:"string"},{label:"Object",value:"object"}],register:a,name:"responseType",setValue:c,trigger:h,value:f("responseType")})]}),Yb.includes(r.inputType)&&y.jsx(Jb,{onChange:S=>{c("denominators",S)},value:f("denominators")}),y.jsx(ve,{label:"Short Description",name:"description",register:a,errors:p,element:r}),Wb.includes(r.inputType)&&k()]}),!qb.includes(r.type.toLowerCase())&&o==="validation"&&y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Required",name:"isRequired",register:a,errors:p,element:r,type:"checkbox"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"requiredMessage",register:a,errors:p,element:r})})]}),Ub.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Min Length",name:"minLength",register:a,errors:p,element:r,type:"number"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"minLengthMessage",register:a,errors:p,element:r})})]}),y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Max Length",name:"maxLength",register:a,errors:p,element:r,type:"number"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"maxLengthMessage",register:a,errors:p,element:r})})]})]}),Hb.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Min Amount",name:"minAmount",register:a,errors:p,element:r,type:"amount"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"minAmountMessage",register:a,errors:p,element:r})})]}),y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Max Amount",name:"maxAmount",register:a,errors:p,element:r,type:"amount"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"maxAmountMessage",register:a,errors:p,element:r})})]})]})]}),y.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[y.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!g||d,style:{background:(s==null?void 0:s.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!g||d?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!g||d?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:d?"Saving...":"Save"})]})]})]})})},jc=m.memo(({state:e,element:t,children:r})=>{const[n,o]=m.useState(!1),{removeElement:i}=m.useContext(mt),s=m.useCallback(()=>{i(t.id,t.sectionId)},[t.id,i]);return y.jsxs("div",{children:[n&&y.jsx(Zb,{isOpen:n,onClose:()=>o(!1),element:t}),y.jsxs("div",{className:"flex justify-between items-center mb-2",children:[y.jsx("label",{className:"text-sm font-medium",children:t.inputLabel}),e==="edit"&&y.jsxs("span",{className:"flex gap-x-3 items-center",children:[y.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:()=>o(!0),children:y.jsx(Be,{icon:"circum:edit"})}),y.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:s,children:y.jsx(Be,{icon:"iconamoon:sign-times-fill"})})]})]}),r]})});jc.displayName="ElementContainer";function $c({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i,isReadOnly:s}=t||{};let a;return i&&(a=i()[e.id]),y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:r,trigger:n,setValue:o,value:a,prefix:e.prefix,disabled:s})}function Nc(e,t){return function(){return e.apply(t,arguments)}}const{toString:ex}=Object.prototype,{getPrototypeOf:Ns}=Object,jo=(e=>t=>{const r=ex.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Ir}=Array,_n=$o("undefined");function tx(e){return e!==null&&!_n(e)&&e.constructor!==null&&!_n(e.constructor)&&lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pc=xt("ArrayBuffer");function rx(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pc(e.buffer),t}const nx=$o("string"),lt=$o("function"),Lc=$o("number"),No=e=>e!==null&&typeof e=="object",ox=e=>e===!0||e===!1,Po=e=>{if(jo(e)!=="object")return!1;const t=Ns(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ix=xt("Date"),sx=xt("File"),ax=xt("Blob"),lx=xt("FileList"),ux=e=>No(e)&&lt(e.pipe),cx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lt(e.append)&&((t=jo(e))==="formdata"||t==="object"&&lt(e.toString)&&e.toString()==="[object FormData]"))},fx=xt("URLSearchParams"),[dx,px,mx,hx]=["ReadableStream","Request","Response","Headers"].map(xt),gx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Ir(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Dc(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ic=e=>!_n(e)&&e!==yr;function Ps(){const{caseless:e}=Ic(this)&&this||{},t={},r=(n,o)=>{const i=e&&Dc(t,o)||o;Po(t[i])&&Po(n)?t[i]=Ps(t[i],n):Po(n)?t[i]=Ps({},n):Ir(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Sn(arguments[n],r);return t}const yx=(e,t,r,{allOwnKeys:n}={})=>(Sn(t,(o,i)=>{r&&lt(o)?e[i]=Nc(o,r):e[i]=o},{allOwnKeys:n}),e),bx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xx=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},vx=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ns(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},wx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Ex=e=>{if(!e)return null;if(Ir(e))return e;let t=e.length;if(!Lc(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Tx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ns(Uint8Array)),_x=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Sx=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},kx=xt("HTMLFormElement"),Cx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Mc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ox=xt("RegExp"),Rc=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Sn(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},Fx=e=>{Rc(e,(t,r)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ax=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Ir(e)?n(e):n(String(e).split(t)),r},jx=()=>{},$x=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Nx(e){return!!(e&&lt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Px=e=>{const t=new Array(10),r=(n,o)=>{if(No(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Ir(n)?[]:{};return Sn(n,(s,a)=>{const l=r(s,o+1);!_n(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Lx=xt("AsyncFunction"),Dx=e=>e&&(No(e)||lt(e))&&lt(e.then)&&lt(e.catch),Vc=((e,t)=>e?setImmediate:t?((r,n)=>(yr.addEventListener("message",({source:o,data:i})=>{o===yr&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lt(yr.postMessage)),Ix=typeof queueMicrotask<"u"?queueMicrotask.bind(yr):typeof process<"u"&&process.nextTick||Vc,j={isArray:Ir,isArrayBuffer:Pc,isBuffer:tx,isFormData:cx,isArrayBufferView:rx,isString:nx,isNumber:Lc,isBoolean:ox,isObject:No,isPlainObject:Po,isReadableStream:dx,isRequest:px,isResponse:mx,isHeaders:hx,isUndefined:_n,isDate:ix,isFile:sx,isBlob:ax,isRegExp:Ox,isFunction:lt,isStream:ux,isURLSearchParams:fx,isTypedArray:Tx,isFileList:lx,forEach:Sn,merge:Ps,extend:yx,trim:gx,stripBOM:bx,inherits:xx,toFlatObject:vx,kindOf:jo,kindOfTest:xt,endsWith:wx,toArray:Ex,forEachEntry:_x,matchAll:Sx,isHTMLForm:kx,hasOwnProperty:Mc,hasOwnProp:Mc,reduceDescriptors:Rc,freezeMethods:Fx,toObjectSet:Ax,toCamelCase:Cx,noop:jx,toFiniteNumber:$x,findKey:Dc,global:yr,isContextDefined:Ic,isSpecCompliantForm:Nx,toJSONObject:Px,isAsyncFn:Lx,isThenable:Dx,setImmediate:Vc,asap:Ix};function ee(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}j.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}});const Bc=ee.prototype,Uc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Uc[e]={value:e}}),Object.defineProperties(ee,Uc),Object.defineProperty(Bc,"isAxiosError",{value:!0}),ee.from=(e,t,r,n,o,i)=>{const s=Object.create(Bc);return j.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Mx=null;function Ls(e){return j.isPlainObject(e)||j.isArray(e)}function zc(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function Hc(e,t,r){return e?e.concat(t).map(function(o,i){return o=zc(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Rx(e){return j.isArray(e)&&!e.some(Ls)}const Vx=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function Lo(e,t,r){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=j.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,x){return!j.isUndefined(x[g])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(j.isDate(d))return d.toISOString();if(!l&&j.isBlob(d))throw new ee("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(d)||j.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,g,x){let b=d;if(d&&!x&&typeof d=="object"){if(j.endsWith(g,"{}"))g=n?g:g.slice(0,-2),d=JSON.stringify(d);else if(j.isArray(d)&&Rx(d)||(j.isFileList(d)||j.endsWith(g,"[]"))&&(b=j.toArray(d)))return g=zc(g),b.forEach(function(w,_){!(j.isUndefined(w)||w===null)&&t.append(s===!0?Hc([g],_,i):s===null?g:g+"[]",u(w))}),!1}return Ls(d)?!0:(t.append(Hc(x,g,i),u(d)),!1)}const f=[],h=Object.assign(Vx,{defaultVisitor:c,convertValue:u,isVisitable:Ls});function p(d,g){if(!j.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(d),j.forEach(d,function(b,v){(!(j.isUndefined(b)||b===null)&&o.call(t,b,j.isString(v)?v.trim():v,g,h))===!0&&p(b,g?g.concat(v):[v])}),f.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return p(e),t}function qc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ds(e,t){this._pairs=[],e&&Lo(e,this,t)}const Wc=Ds.prototype;Wc.append=function(t,r){this._pairs.push([t,r])},Wc.toString=function(t){const r=t?function(n){return t.call(this,n,qc)}:qc;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Bx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kc(e,t,r){if(!t)return e;const n=r&&r.encode||Bx;j.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=j.isURLSearchParams(t)?t.toString():new Ds(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Yc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){j.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Jc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ux={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ds,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Is=typeof window<"u"&&typeof document<"u",Ms=typeof navigator=="object"&&navigator||void 0,zx=Is&&(!Ms||["ReactNative","NativeScript","NS"].indexOf(Ms.product)<0),Hx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qx=Is&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Is,hasStandardBrowserEnv:zx,hasStandardBrowserWebWorkerEnv:Hx,navigator:Ms,origin:qx},Symbol.toStringTag,{value:"Module"})),...Ux};function Wx(e,t){return Lo(e,new He.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return He.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Kx(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yx(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function Xc(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&j.isArray(o)?o.length:s,l?(j.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!j.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&j.isArray(o[s])&&(o[s]=Yx(o[s])),!a)}if(j.isFormData(e)&&j.isFunction(e.entries)){const r={};return j.forEachEntry(e,(n,o)=>{t(Kx(n),o,r,0)}),r}return null}function Jx(e,t,r){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const kn={transitional:Jc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=j.isObject(t);if(i&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Xc(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Wx(t,this.formSerializer).toString();if((a=j.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Lo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Jx(t)):t}],transformResponse:[function(t){const r=this.transitional||kn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{kn.headers[e]={}});const Xx=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gx=e=>{const t={};let r,n,o;return e&&e.split(`
60
- `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&Xx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Gc=Symbol("internals");function Cn(e){return e&&String(e).trim().toLowerCase()}function Do(e){return e===!1||e==null?e:j.isArray(e)?e.map(Do):String(e)}function Qx(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Zx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rs(e,t,r,n,o){if(j.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!j.isString(t)){if(j.isString(n))return t.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(t)}}function ev(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function tv(e,t){const r=j.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}class rt{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,l,u){const c=Cn(l);if(!c)throw new Error("header name must be a non-empty string");const f=j.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||l]=Do(a))}const s=(a,l)=>j.forEach(a,(u,c)=>i(u,c,l));if(j.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(j.isString(t)&&(t=t.trim())&&!Zx(t))s(Gx(t),r);else if(j.isHeaders(t))for(const[a,l]of t.entries())i(l,a,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=Cn(t),t){const n=j.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return Qx(o);if(j.isFunction(r))return r.call(this,o,n);if(j.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cn(t),t){const n=j.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Rs(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=Cn(s),s){const a=j.findKey(n,s);a&&(!r||Rs(n,n[a],a,r))&&(delete n[a],o=!0)}}return j.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||Rs(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return j.forEach(this,(o,i)=>{const s=j.findKey(n,i);if(s){r[s]=Do(o),delete r[i];return}const a=t?ev(i):String(i).trim();a!==i&&delete r[i],r[a]=Do(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return j.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&j.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
61
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Gc]=this[Gc]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Cn(s);n[a]||(tv(o,s),n[a]=!0)}return j.isArray(t)?t.forEach(i):i(t),this}}rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(rt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),j.freezeMethods(rt);function Vs(e,t){const r=this||kn,n=t||r,o=rt.from(n.headers);let i=n.data;return j.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Qc(e){return!!(e&&e.__CANCEL__)}function Mr(e,t,r){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,r),this.name="CanceledError"}j.inherits(Mr,ee,{__CANCEL__:!0});function Zc(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nv(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const p=c&&u-c;return p?Math.round(h*1e3/p):void 0}}function ov(e,t){let r=0,n=1e3/t,o,i;const s=(u,c=Date.now())=>{r=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Io=(e,t,r=3)=>{let n=0;const o=nv(50,250);return ov(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,u=o(l),c=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},ef=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},tf=e=>(...t)=>j.asap(()=>e(...t)),iv=He.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,sv=He.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];j.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),j.isString(n)&&s.push("path="+n),j.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function av(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rf(e,t,r){let n=!av(t);return e&&(n||r==!1)?lv(e,t):t}const nf=e=>e instanceof rt?{...e}:e;function br(e,t){t=t||{};const r={};function n(u,c,f,h){return j.isPlainObject(u)&&j.isPlainObject(c)?j.merge.call({caseless:h},u,c):j.isPlainObject(c)?j.merge({},c):j.isArray(c)?c.slice():c}function o(u,c,f,h){if(j.isUndefined(c)){if(!j.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function i(u,c){if(!j.isUndefined(c))return n(void 0,c)}function s(u,c){if(j.isUndefined(c)){if(!j.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>o(nf(u),nf(c),f,!0)};return j.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||o,h=f(e[c],t[c],c);j.isUndefined(h)&&f!==a||(r[c]=h)}),r}const of=e=>{const t=br({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=rt.from(s),t.url=Kc(rf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(j.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(He.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(t)),n||n!==!1&&iv(t.url))){const u=o&&i&&sv.read(i);u&&s.set(o,u)}return t},uv=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=of(e);let i=o.data;const s=rt.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,f,h,p,d;function g(){p&&p(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const w=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:e,request:x};Zc(function(C){r(C),g()},function(C){n(C),g()},k),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new ee("Request aborted",ee.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ee("Network Error",ee.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||Jc;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),n(new ee(_,k.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&j.forEach(s.toJSON(),function(_,k){x.setRequestHeader(k,_)}),j.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),u&&([h,d]=Io(u,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,p]=Io(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=w=>{x&&(n(!w||w.type?new Mr(null,e,x):w),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const v=rv(o.url);if(v&&He.protocols.indexOf(v)===-1){n(new ee("Unsupported protocol "+v+":",ee.ERR_BAD_REQUEST,e));return}x.send(i||null)})},cv=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ee?c:new Mr(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>j.asap(a),l}},fv=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},dv=async function*(e,t){for await(const r of pv(e))yield*fv(r,t)},pv=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},sf=(e,t,r,n)=>{const o=dv(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let f=c.byteLength;if(r){let h=i+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Mo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",af=Mo&&typeof ReadableStream=="function",mv=Mo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},hv=af&&lf(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),uf=64*1024,Bs=af&&lf(()=>j.isReadableStream(new Response("").body)),Ro={stream:Bs&&(e=>e.body)};Mo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ro[t]&&(Ro[t]=j.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ee(`Response type '${t}' is not supported`,ee.ERR_NOT_SUPPORT,n)})})})(new Response);const gv=async e=>{if(e==null)return 0;if(j.isBlob(e))return e.size;if(j.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(j.isArrayBufferView(e)||j.isArrayBuffer(e))return e.byteLength;if(j.isURLSearchParams(e)&&(e=e+""),j.isString(e))return(await mv(e)).byteLength},yv=async(e,t)=>{const r=j.toFiniteNumber(e.getContentLength());return r??gv(t)},Us={http:Mx,xhr:uv,fetch:Mo&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=of(e);u=u?(u+"").toLowerCase():"text";let p=cv([o,i&&i.toAbortSignal()],s),d;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(l&&hv&&r!=="get"&&r!=="head"&&(x=await yv(c,n))!==0){let k=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(j.isFormData(n)&&(S=k.headers.get("content-type"))&&c.setContentType(S),k.body){const[C,A]=ef(x,Io(tf(l)));n=sf(k.body,uf,C,A)}}j.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?f:void 0});let v=await fetch(d);const w=Bs&&(u==="stream"||u==="response");if(Bs&&(a||w&&g)){const k={};["status","statusText","headers"].forEach(N=>{k[N]=v[N]});const S=j.toFiniteNumber(v.headers.get("content-length")),[C,A]=a&&ef(S,Io(tf(a),!0))||[];v=new Response(sf(v.body,uf,C,()=>{A&&A(),g&&g()}),k)}u=u||"text";let _=await Ro[j.findKey(Ro,u)||"text"](v,e);return!w&&g&&g(),await new Promise((k,S)=>{Zc(k,S,{data:_,headers:rt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:d})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,d),{cause:b.cause||b}):ee.from(b,b&&b.code,e,d)}})};j.forEach(Us,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cf=e=>`- ${e}`,bv=e=>j.isFunction(e)||e===null||e===!1,ff={getAdapter:e=>{e=j.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!bv(r)&&(n=Us[(s=String(r)).toLowerCase()],n===void 0))throw new ee(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
62
- `+i.map(cf).join(`
63
- `):" "+cf(i[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Us};function zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mr(null,e)}function df(e){return zs(e),e.headers=rt.from(e.headers),e.data=Vs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ff.getAdapter(e.adapter||kn.adapter)(e).then(function(n){return zs(e),n.data=Vs.call(e,e.transformResponse,n),n.headers=rt.from(n.headers),n},function(n){return Qc(n)||(zs(e),n&&n.response&&(n.response.data=Vs.call(e,e.transformResponse,n.response),n.response.headers=rt.from(n.response.headers))),Promise.reject(n)})}const pf="1.8.4",Vo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mf={};Vo.transitional=function(t,r,n){function o(i,s){return"[Axios v"+pf+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new ee(o(s," has been removed"+(r?" in "+r:"")),ee.ERR_DEPRECATED);return r&&!mf[s]&&(mf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}},Vo.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function xv(e,t,r){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ee("option "+i+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}const Bo={assertOptions:xv,validators:Vo},$t=Bo.validators;class xr{constructor(t){this.defaults=t,this.interceptors={request:new Yc,response:new Yc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
64
- `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=br(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Bo.assertOptions(n,{silentJSONParsing:$t.transitional($t.boolean),forcedJSONParsing:$t.transitional($t.boolean),clarifyTimeoutError:$t.transitional($t.boolean)},!1),o!=null&&(j.isFunction(o)?r.paramsSerializer={serialize:o}:Bo.assertOptions(o,{encode:$t.function,serialize:$t.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Bo.assertOptions(r,{baseUrl:$t.spelling("baseURL"),withXsrfToken:$t.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&j.merge(i.common,i[r.method]);i&&j.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=rt.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,f=0,h;if(!l){const d=[df.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),h=d.length,c=Promise.resolve(r);f<h;)c=c.then(d[f++],d[f++]);return c}h=a.length;let p=r;for(f=0;f<h;){const d=a[f++],g=a[f++];try{p=d(p)}catch(x){g.call(this,x);break}}try{c=df.call(this,p)}catch(d){return Promise.reject(d)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=br(this.defaults,t);const r=rf(t.baseURL,t.url,t.allowAbsoluteUrls);return Kc(r,t.params,t.paramsSerializer)}}j.forEach(["delete","get","head","options"],function(t){xr.prototype[t]=function(r,n){return this.request(br(n||{},{method:t,url:r,data:(n||{}).data}))}}),j.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(br(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}xr.prototype[t]=r(),xr.prototype[t+"Form"]=r(!0)});class Hs{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Mr(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Hs(function(o){t=o}),cancel:t}}}function vv(e){return function(r){return e.apply(null,r)}}function wv(e){return j.isObject(e)&&e.isAxiosError===!0}const qs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qs).forEach(([e,t])=>{qs[t]=e});function hf(e){const t=new xr(e),r=Nc(xr.prototype.request,t);return j.extend(r,xr.prototype,t,{allOwnKeys:!0}),j.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return hf(br(e,o))},r}const Ee=hf(kn);Ee.Axios=xr,Ee.CanceledError=Mr,Ee.CancelToken=Hs,Ee.isCancel=Qc,Ee.VERSION=pf,Ee.toFormData=Lo,Ee.AxiosError=ee,Ee.Cancel=Ee.CanceledError,Ee.all=function(t){return Promise.all(t)},Ee.spread=vv,Ee.isAxiosError=wv,Ee.mergeConfig=br,Ee.AxiosHeaders=rt,Ee.formToJSON=e=>Xc(j.isHTMLForm(e)?new FormData(e):e),Ee.getAdapter=ff.getAdapter,Ee.HttpStatusCode=qs,Ee.default=Ee;function Ev(e){if(!e)return!1;const t=/^data:image\/(jpeg|png|gif|bmp|webp);base64,/i,r=/\.(jpeg|jpg|png|gif|bmp|webp)$/i;return t.test(e)||r.test(e)}const Tv=({imageUrl:e})=>{const[t,r]=m.useState(!1),n=()=>{r(!0)},o=()=>{r(!1)};return y.jsxs("div",{children:[y.jsx("img",{alt:"Thumbnail",style:{cursor:"pointer",width:"120px",height:"130px",objectFit:"cover"},onClick:n,src:e||"/place.png","data-toggle":"tooltip","data-placement":"top",title:"Click to view"}),t&&y.jsx("div",{className:"modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"},onClick:o,children:y.jsxs("div",{className:"modal-content",style:{position:"relative",backgroundColor:"white",padding:"20px",borderRadius:"8px",width:"90vw"},onClick:i=>i.stopPropagation(),children:[y.jsx("span",{className:"close",onClick:o,style:{position:"absolute",top:"10px",right:"10px",fontSize:"24px",cursor:"pointer"},children:"×"}),y.jsx("img",{src:e||"/place.png",alt:"Full Image",style:{maxWidth:"90%",maxHeight:"90vh",objectFit:"contain"}})]})})]})};function gf({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},[i,s]=m.useState(),[a,l]=m.useState(!1),[u,c]=m.useState(!1),[f,h]=m.useState(""),p=o&&o(e==null?void 0:e.id);m.useEffect(()=>{s(p)},[p]);const[d,g]=m.useState("");m.useEffect(()=>{r(e.id)},[e.id,r]);const{url:x,method:b,responseType:v}=e||{},w=m.useCallback(async _=>{var k,S,C,A,N,L,P,I,R,q,J;if(!(!x||!b)){l(!0);try{let z;if(b.toLowerCase()==="get"){const G=`${x}?value=${_}`;z=await Ee.get(G)}else if(b.toLowerCase()==="post")z=await Ee.post(x,{value:_});else throw new Error("Unsupported HTTP method");z.status===200&&((((S=(k=z==null?void 0:z.data)==null?void 0:k.data)==null?void 0:S.status)||((C=z==null?void 0:z.data)==null?void 0:C.status))===!0?(c(!0),v==="string"?h(((N=(A=z==null?void 0:z.data)==null?void 0:A.data)==null?void 0:N.description)||((L=z==null?void 0:z.data)==null?void 0:L.description)||"Validation successful"):g(((I=(P=z==null?void 0:z.data)==null?void 0:P.data)==null?void 0:I.description)||((R=z==null?void 0:z.data)==null?void 0:R.description)||{})):(console.error("Invalid input:",_),h("Unable to validate input"),c(!1)))}catch(z){console.error("Error validating input:",z),h(((J=(q=z==null?void 0:z.response)==null?void 0:q.data)==null?void 0:J.message)||"Unable to validate input"),c(!1)}finally{l(!1)}}},[b,v,x]);return m.useEffect(()=>{if(i){const _=setTimeout(()=>{w(i)},700);return()=>clearTimeout(_)}},[w,i]),y.jsxs("div",{children:[y.jsxs("div",{className:"relative flex items-center",children:[y.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...r(e==null?void 0:e.id),onChange:_=>{s(_.target.value),n(e==null?void 0:e.id,_.target.value)}}),y.jsxs("span",{className:"absolute right-0",children:[a&&y.jsxs("span",{children:[" ",y.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),u&&!a&&y.jsx("span",{className:"text-green-600 text-lg pr-3 block",children:y.jsx(Be,{icon:"gg:check-o"})})]})]}),f&&v==="string"&&y.jsx("span",{className:`${u?"text-green-600":"text-red-600"} text-sm`,children:f}),v==="object"&&y.jsx("div",{className:"grid grid-cols-2 gap-6 text-sm text-gray-600 mt-2",children:Object.entries(d).map(([_,k])=>y.jsxs("div",{className:"flex items-center gap-x-2",children:[y.jsxs("span",{className:"font-semibold",children:[_,":"]}),Ev(k)?y.jsx(Tv,{imageUrl:k}):y.jsx("span",{children:String(k)})]},_))})]})}function _v({onGetTotal:e,readOnly:t,defaultValue:r,denominators:n}){const[o,i]=m.useState([...r]);function s(u,c){i(f=>{const h=[...f];return h[c]={...h[c],value:u},h})}function a(u,c){return parseFloat(u)*parseFloat(c)||0}const l=m.useMemo(()=>o.reduce((u,c)=>{const f=a(c.key,c.value);return u+f},0),[o]);return m.useEffect(()=>{e&&e(o)},[e,o]),m.useEffect(()=>{if(n!=null&&n.length){const u=n.map((c,f)=>({key:c.value,value:Array.isArray(r)&&r[f]?r[f].value:""}));i(u)}},[r,n]),y.jsx("div",{className:"mt-2",children:y.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden text-gray-700",children:[y.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50",children:[y.jsx("div",{className:"border-r px-4 py-2",children:y.jsx("span",{className:"",children:"Denomination"})}),y.jsx("div",{className:"border-r px-4 py-2",children:y.jsx("span",{children:"Quantity"})}),y.jsx("div",{className:"px-4 py-2",children:y.jsx("span",{children:"Sub total"})})]}),o.map((u,c)=>{var f,h;return y.jsxs("div",{className:"grid grid-cols-3 text-sm border-b border-gray-100",children:[y.jsx("div",{className:"border-r px-4 py-2 flex items-center",children:y.jsx("span",{className:"",children:(f=parseFloat(u.key))==null?void 0:f.toLocaleString()})}),y.jsx("div",{className:"border-r px-4 py-1",children:y.jsx("span",{children:y.jsx(yo,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:u.value,onValueChange:p=>s(p,c),disabled:t,allowNegativeValue:!1})})}),y.jsx("div",{className:"px-4 py-2 flex justify-between items-center",children:y.jsx("span",{children:(h=a(u.key,u.value))==null?void 0:h.toLocaleString()})})]},u.key+c+Math.random())}),y.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold bg-gray-50",children:[y.jsx("div",{className:"border-r px-4 py-3 col-span-2 text-right",children:"Total"}),y.jsx("div",{className:"px-4 py-3",children:l==null?void 0:l.toLocaleString()})]})]})})}function yf({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},i=o&&o(e==null?void 0:e.id)||[];return m.useEffect(()=>{r(e.id)},[e.id,r]),y.jsx("div",{children:y.jsx(_v,{onGetTotal:s=>{n&&n(e.id,s)},denominators:(e==null?void 0:e.denominators)||[],defaultValue:i,readOnly:e==null?void 0:e.isReadOnly})})}const Sv={textField:Xn,longText:Vu,selectField:Ru,multiSelect:Ou,numberField:Xn,amountField:$c,date:sl,password:Nu,checkbox:Mu,radio:Du,email:Fu,file:ju,grid:$u,section:Iu,validateInput:gf,tableInput:yf},bf="edit",kv=e=>{const t=Sv[e.type];return t?y.jsx(jc,{element:e,state:bf,children:y.jsxs("div",{className:"relative",children:[y.jsx("div",{className:"absolute top-0 left-0 h-full w-full z-20"}),y.jsx(t,{element:e,state:bf})]})}):null};function Cv({elementData:e,sectionId:t}){const{formData:r,updateElementPosition:n,isDragging:o}=m.useContext(mt),[i,s]=m.useState(null),a=m.useCallback((f,h)=>{f.dataTransfer.setData("properties",h),s(h)},[]),l=m.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.dataTransfer.dropEffect="move"},[]),u=m.useCallback(f=>{var p;f.preventDefault(),f.stopPropagation();const h=(p=r.find(d=>d.id===t))==null?void 0:p.questionData;try{const d=f.dataTransfer.getData("properties"),g=f.currentTarget;if(!g.id||d===g.id)return;const x=h.findIndex(v=>v.id===d),b=h.findIndex(v=>v.id===g.id);if(x===-1||b===-1)return;if(h.length){const v=[...h];[v[x],v[b]]=[v[b],v[x]],n(v,t),s(null)}}catch(d){console.error("Error during drag and drop:",d),s(null)}},[r,n]),c=m.useCallback(f=>y.jsx("div",{id:f.id,className:`cursor-move border p-4 w-full transition-colors rounded-lg bg-white ${i===f.id?"bg-gray-100":""} ${i&&i!==f.id?"border-dashed border-blue-300":""}`,draggable:!0,onDrop:u,onDragOver:l,onDragStart:h=>a(h,f.id),children:kv(f)},f.id),[i,u,l,a]);return e!=null&&e.length?y.jsxs("div",{className:"w-full h-full flex flex-col gap-y-4 relative",children:[e==null?void 0:e.map(c),o&&y.jsx("div",{className:"bg-gray-50 rounded p-6 h-[60px] border-2 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:y.jsx(Be,{icon:"octicon:plus-16"})})]}):y.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-500 min-h-[250px] p-10",children:"No input to display"})}const Ov=Tn({title:be(),description:be()}).required(),Fv=({isOpen:e,onClose:t,section:r})=>{const{updateSection:n}=m.useContext(mt),{register:o,handleSubmit:i,formState:{errors:s,isSubmitting:a,isValid:l},reset:u}=_s({resolver:Ss(Ov),defaultValues:r});if(m.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{n(f,r.id),t()};return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[y.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),y.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:y.jsx(Be,{icon:"tabler:x"})})]}),y.jsxs("form",{onSubmit:i(c),className:"w-full",children:[y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsx(ve,{label:"Title",name:"title",register:o,errors:s}),y.jsx(ve,{label:"Description",name:"description",register:o,errors:s})]}),y.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[y.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!l||a,className:`flex-1 px-4 py-2.5 ${!l||a?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!l||a?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:a?"Saving...":"Save"})]})]})]})})},Av=()=>{const[e,t]=m.useState(!1),r=m.useRef(null),[n,o]=m.useState([0]),{removeSection:i,addElement:s,formData:a,setIsDragging:l,setSelectedSection:u,selectedSection:c}=m.useContext(mt),f=m.useCallback(g=>{g.preventDefault(),g.dataTransfer.dropEffect="move"},[]),h=m.useCallback(g=>{try{g.preventDefault(),l(!1);const x=g==null?void 0:g.currentTarget,b=g.dataTransfer.getData("properties");if(b){const v=JSON.parse(b),w={id:en(),sectionId:x.id,...v};s(w,x.id)}}catch(x){console.log(x),l(!1)}},[s,l]);function p(g){n.includes(g)?o(x=>x.filter(b=>b!==g)):o(x=>[...x,g])}function d(g){r.current=g,t(!0)}return y.jsxs("div",{className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&y.jsx(Fv,{isOpen:e,onClose:()=>t(!1),section:r.current}),y.jsx("div",{className:" relative w-full flex flex-col gap-y-6 flex-1 py-4",children:a.map((g,x)=>y.jsxs("div",{className:"group cursor-pointer rounded",onClick:()=>u(g.id),children:[y.jsxs("div",{className:`border border-gray-100 rounded py-4 px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
65
- ${c===g.id?"border-dashed border-blue-400 bg-[#f7f8fa]":"border-transparent"} ${n.includes(x)?"min-h-[300px]":""}`,children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsx("h2",{className:"font-medium",children:g.title||"Section title"}),y.jsxs("div",{className:"flex gap-x-4 items-center",children:[y.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>d(g),children:y.jsx(Be,{icon:"fluent:edit-28-regular"})}),a.length>1&&y.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>i(g.id),children:y.jsx(Be,{icon:"lets-icons:trash-duotone-line"})}),y.jsx("button",{type:"button",className:"p-1 rounded-lg text-xs",onClick:()=>p(x),children:y.jsx(Be,{icon:n.includes(x)?"gravity-ui:minus":"octicon:plus-16"})})]})]}),(g==null?void 0:g.description)&&n.includes(x)&&y.jsx("p",{className:"text-sm text-gray-60 mt-2 text-gray-600",children:g==null?void 0:g.description}),n.includes(x)&&y.jsxs("div",{className:"mt-4 transition-all duration-200 h-full",id:g.id,onDrop:h,onDragOver:f,children:[y.jsx("hr",{}),y.jsx("div",{className:" gap-y-6 mt-4 h-full ",children:y.jsx(Cv,{elementData:g.questionData,sectionId:g.id})})]})]}),y.jsx("hr",{className:"mt-6 group-last:hidden"})]},g.id))})]})};function jv({questionData:e}){const{setFormData:t}=m.useContext(mt);return m.useEffect(()=>{e&&e.length>0&&t(e)},[e,t]),y.jsx("div",{className:"bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto",children:y.jsx(Av,{})})}const $v=()=>{const{setIsDragging:e,addElement:t,selectedSection:r}=m.useContext(mt),n=m.useCallback((i,s)=>{i.dataTransfer.setData("properties",JSON.stringify(s)),i.dataTransfer.effectAllowed="move",e(!0)},[e]);function o(i){if(!r){ue.error("Please select a section to add an element to.");return}const s={id:en(),sectionId:r,...i};t(s,r)}return y.jsx("div",{className:"w-full",children:y.jsx("div",{className:"pt-4 px-5 max-h-[70vh] overflow-y-auto",children:y.jsx("div",{children:y.jsx("ul",{className:"grid gap-y-[8px] mt-3",children:Vb.map(i=>y.jsxs("li",{onDragStart:s=>n(s,i),onClick:()=>o(i),style:{borderColor:i.color,color:i.color},className:`cursor-move text-[#475467] flex justify-between items-center \r
59
+ `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=r,l=t;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=y=>{o||(o=!0,r(y,s))},f=y=>{o||(o=!0,n(y,s))},h=i.length,m=[];if(!h)return f([]);let d={value:s,originalValue:a,path:l,options:u,schema:this};for(let y=0;y<i.length;y++){const x=i[y];x(d,c,function(w){w&&(Array.isArray(w)?m.push(...w):m.push(w)),--h<=0&&f(m)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:i,options:s}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=n[a];const c=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,h,m)=>this.resolve(c)._validate(u,c,h,m)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,r,(l,u)=>{tt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new tt(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,l)=>{throw tt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new tt(a,t,void 0,void 0,s);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(tt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(tt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Ir(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Lr({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Lr({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Lr(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=uc(t).map(i=>new yr(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new So(o,r):So.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Lr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=$t.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Lr({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=$t.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Lr({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}nt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])nt.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:i,schema:s}=Tb(this,t,r,n.context);return s[e](o&&o[i],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])nt.prototype[e]=nt.prototype.oneOf;for(const e of["not","nope"])nt.prototype[e]=nt.prototype.notOneOf;const _b=()=>!0;function Mr(e){return new mc(e)}class mc extends nt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:_b},t))}}Mr.prototype=mc.prototype;function Oo(){return new hc}class hc extends nt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=js.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return xt(r)||r===!0}})}isFalse(t=js.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return xt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Oo.prototype=hc.prototype;const Sb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Cb(e){const t=$s(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function $s(e){var t,r;const n=Sb.exec(e);return n?{year:zt(n[1]),month:zt(n[2],1)-1,day:zt(n[3],1),hour:zt(n[4]),minute:zt(n[5]),second:zt(n[6]),millisecond:n[7]?zt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:zt(n[10]),minuteOffset:zt(n[11])}:null}function zt(e,t=0){return Number(e)||t}let kb=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ob=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Fb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ab="^\\d{4}-\\d{2}-\\d{2}",jb="\\d{2}:\\d{2}:\\d{2}",$b="(([+-]\\d{2}(:?\\d{2})?)|Z)",Nb=new RegExp(`${Ab}T${jb}(\\.\\d+)?${$b}$`),Pb=e=>xt(e)||e===e.trim(),Db={}.toString();function de(){return new gc}class gc extends nt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Db?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=rt.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=rt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=rt.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||rt.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=rt.email){return this.matches(kb,{name:"email",message:t,excludeEmptyString:!0})}url(t=rt.url){return this.matches(Ob,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=rt.uuid){return this.matches(Fb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches(Nb,{name:"datetime",message:r||rt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||rt.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=$s(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||rt.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=$s(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=rt.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Pb})}lowercase(t=rt.lowercase){return this.transform(r=>xt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>xt(r)||r===r.toLowerCase()})}uppercase(t=rt.uppercase){return this.transform(r=>xt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>xt(r)||r===r.toUpperCase()})}}de.prototype=gc.prototype;let Lb=e=>e!=+e;function Rr(){return new yc}class yc extends nt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Lb(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=er.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=er.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=er.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=er.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=er.positive){return this.moreThan(0,t)}negative(t=er.negative){return this.lessThan(0,t)}integer(t=er.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>xt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>xt(o)?o:Math[t](o))}}Rr.prototype=yc.prototype;let bc=new Date(""),Ib=e=>Object.prototype.toString.call(e)==="[object Date]";function Ns(){return new En}class En extends nt{constructor(){super({type:"date",check(t){return Ib(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Cb(t),isNaN(t)?En.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(yr.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=As.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=As.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}En.INVALID_DATE=bc,Ns.prototype=En.prototype,Ns.INVALID_DATE=bc;function Mb(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=gr.split(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(const s of Object.keys(e)){let a=e[s];n.add(s),yr.isRef(a)&&a.isSibling?i(a.path,s):_o(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return hb.array(Array.from(n),r).reverse()}function xc(e,t){let r=1/0;return e.some((n,o)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=o,!0}),r}function vc(e){return(t,r)=>xc(e,t)-xc(e,r)}const wc=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Fo(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Fo(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Fo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Fo)}):"optional"in e?e.optional():e}const Rb=(e,t)=>{const r=[...gr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=gr.getter(gr.join(r),!0)(e);return!!(o&&n in o)};let Ec=e=>Object.prototype.toString.call(e)==="[object Object]";function Tc(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Vb=vc([]);function Tn(e){return new _c(e)}class _c extends nt{constructor(t){super({type:"object",check(r){return Ec(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Vb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of a){let h=i[f],m=f in o;if(h){let d,y=o[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:y,context:r.context,parent:l});let x=h instanceof nt?h.spec:void 0,b=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in o;continue}d=!r.__validating||!b?h.cast(o[f],u):o[f],d!==void 0&&(l[f]=d)}else m&&!s&&(l[f]=o[f]);(m!==f in l||l[f]!==o[f])&&(c=!0)}return c?l:o}_validate(t,r={},n,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,u)=>{if(!a||!Ec(u)){o(l,u);return}s=s||u;let c=[];for(let f of this._nodes){let h=this.fields[f];!h||yr.isRef(h)||c.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:r},n,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[o,i]of Object.entries(this.fields)){const s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;const i=this.fields[n];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Mb(t,r),n._sortErrors=vc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Fo(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>t.includes(n)&&t.includes(o)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let o=gr.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Rb(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=o(i)),s})}json(){return this.transform(wc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Eo.exact,test(r){if(r==null)return!0;const n=Tc(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Eo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const i=Tc(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Eo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Fs.camelCase)}snakeCase(){return this.transformKeys(Fs.snakeCase)}constantCase(){return this.transformKeys(t=>Fs.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}}Tn.prototype=_c.prototype;function Sc(e){return new Cc(e)}class Cc extends nt{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1;const i=n.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(t,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let m=0;m<u.length;m++){var h;f[m]=s.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,m=>o(m.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(wc)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!_o(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ut(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=To.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||To.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||To.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,o,i)=>!t(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}Sc.prototype=Cc.prototype;const Bb=({tabs:e,className:t="",count:r={},setActiveTab:n,activeTab:o,btnClass:i=""})=>{const s=ue("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return g.jsx("div",{className:s,children:e.map(a=>{const l=o===a.key,u=r[a.key]||0,c=ue("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",i),f=ue({"border-gray-400 darks:border-white !text-primary darks:!text-white":l,"border-transparent text-[#667085] darks:!text-white/60":!l}),h=u>0&&g.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return g.jsxs("button",{onClick:()=>n(a.key),className:ue(c,f),"aria-selected":l,role:"tab",type:"button",children:[a.title,h]},a.key)})})},Ub=[{type:"basicText",label:"Basic Text",icon:"fluent:text-16-filled",inputLabel:"",required:!1,inputType:"basicText",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"textField",label:"Text Field",icon:"fluent:text-16-filled",inputLabel:"Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"longText",label:"Long Text Field",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"validateInput",label:"Validate Input",icon:"iconoir:www",inputLabel:"Validate Input Label",required:!1,inputType:"validateInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:null,url:"https://api.example.com/validate?value={value}",method:"GET",responseType:"string",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null,prefix:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[{label:"Placeholder 1",value:"",id:Qe()},{label:"Placeholder 2",value:"",id:Qe()}],customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"tableInput",label:"Table Input",icon:"iconoir:table",inputLabel:"Table Input Label",required:!1,inputType:"tableInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:[],denominators:null,customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"divider",label:"Divider",icon:"pixel:divider",inputLabel:"",inputType:"divider",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"spacer",label:"Spacer",icon:"fluent-mdl2:spacer",inputLabel:"",inputType:"spacer",customClass:"",elementClass:"",gridPosition:null,gridId:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"",inputType:"grid",placeholder:"Type here",description:"",columns:2}],zb=["amount"],qb=["text","number"],Hb=["text","number","amount","date","password"],Wb=["amount"],Ao=["grid","section","divider","spacer","basicText"],Kb=["radio","select","checkbox","multiselect"],Yb=["validateInput"],Jb=["tableInput"],Ps=["basicText"];function Gb({value:e=[],onChange:t,onGetValue:r}){const[n,o]=p.useState((e==null?void 0:e.length)>0?e:[{value:""}]);p.useEffect(()=>{(e==null?void 0:e.length)>0&&JSON.stringify(e)!==JSON.stringify(n)&&o(e)},[e]);function i(l,u){const c=[...n];c[u]={...c[u],value:l},o(c),t&&t(c)}function s(){const l=[...n,{value:""}];o(l),t&&t(l)}function a(l){const u=n.filter((c,f)=>f!==l);o(u),t&&t(u)}return p.useEffect(()=>{r&&r(JSON.stringify({values:n}))},[r,n]),g.jsxs("div",{className:"]",children:[g.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[g.jsx("div",{className:"grid text-sm font-bold border-b border-gray-100 bg-gray-50",children:g.jsx("div",{className:"px-2 py-2",children:g.jsx("span",{className:"",children:"Add Denominations"})})}),n.map((l,u)=>g.jsx("div",{className:"grid text-sm border-b border-gray-100",children:g.jsxs("div",{className:"flex items-center gap-x-4 px-2 py-1",children:[g.jsx("span",{className:"flex-1",children:g.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:l.value,onValueChange:c=>i(c,u),allowNegativeValue:!1})}),g.jsx("button",{onClick:()=>a(u),className:"text-red-500 hover:text-red-700 px-2",type:"button","aria-label":"Remove row",children:"×"})]})},l.key+u+Math.random()))]}),g.jsx("div",{className:"mt-1 flex justify-end",children:g.jsx("button",{type:"button",onClick:s,className:"font-semibold !text-blue-700 text-sm rounded outline-0 focus:outline-0",children:"+ Add"})})]})}const Xb=()=>g.jsx("blockquote",{className:"bg-gray-100 p-4 rounded-md text-gray-700",children:g.jsxs("ul",{children:[g.jsxs("li",{className:"text-xs",children:["API URL example format: ",g.jsx("code",{children:"https://example.com/validation?value={value}"})]}),g.jsxs("li",{className:"text-xs",children:[g.jsx("span",{className:"block mb-1",children:" Response example format:"}),g.jsx("pre",{className:"bg-white p-2 rounded-md",children:g.jsxs("code",{children:["{ ",g.jsx("br",{}),'  "data": { ',g.jsx("br",{}),'    "status": true, ',g.jsx("br",{}),'    "description": "John Doe" ',g.jsx("br",{}),"  } ",g.jsx("br",{}),"}"]})})]})]})}),Zb=Tn().shape({inputLabel:de().nullable(),placeholder:de().nullable(),description:de().nullable(),isReadOnly:Oo(),isDisabled:Oo(),isRequired:Oo(),requiredMessage:de().nullable(),minLengthMessage:de().nullable(),maxLengthMessage:de().nullable(),maxLength:Rr().typeError("Expecting a number").nullable(),minLength:Rr().typeError("Expecting a number").nullable(),inputType:de().nullable(),maxAmountMessage:de().nullable(),maxAmount:de().nullable(),options:Sc().of(Tn().shape({label:de().nullable(),value:de().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).when("inputType",{is:e=>["radio","checkbox"].includes(e),then:e=>e.required("Options are required for radio or checkbox inputs"),otherwise:e=>e.nullable()}),prefix:de().nullable(),url:de().nullable(),method:de().nullable(),denominators:Mr().nullable(),responseType:de().nullable(),minAmount:de().nullable(),heading:de().nullable(),minAmountMessage:de().nullable(),columns:Rr().nullable(),value:Mr().nullable(),customClass:de().nullable(),elementClass:de().nullable()}),Qb=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],ex=({isOpen:e,onClose:t,element:r})=>{const n=Qb.filter(C=>!Ao.includes(r.inputType)||C.key!=="validation"),{updateElement:o}=p.useContext(ft),[i,s]=p.useState("basic"),a=Jn("config"),{register:l,handleSubmit:u,control:c,setValue:f,watch:h,trigger:m,formState:{errors:d,isSubmitting:y,isValid:x},reset:b}=Ss({resolver:Cs(Zb),defaultValues:{...r,options:r.options||[]}}),{fields:w,append:v,remove:E}=eb({control:c,name:"options"});p.useEffect(()=>{e||b()},[e,b]);const k=C=>{o(C,r.sectionId),t()},T=()=>g.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[w.map((C,O)=>g.jsxs("div",{className:"flex gap-x-4 items-center ",children:[g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Label",name:`options.${O}.label`,register:l,errors:d,element:r,placeholder:"Label",isFloating:!0})}),g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Value",name:`options.${O}.value`,register:l,errors:d,element:r,placeholder:"Value",isFloating:!0})})," ",g.jsx("button",{disabled:w.length===1,type:"button",className:"outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",onClick:()=>E(O),children:g.jsx(Me,{icon:"iconamoon:sign-times-fill"})})]},C.id)),g.jsxs("div",{children:[" ",g.jsxs("button",{type:"button",className:"mt-2 text-gray-700 font-medium text-sm flex gap-x-1 items-center",onClick:()=>v({label:"",value:"",id:Qe()}),children:[g.jsx(Me,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[g.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[g.jsxs("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:[r.label," Options"]}),g.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:g.jsx(Me,{icon:"tabler:x"})})]}),g.jsx("div",{className:"w-full",children:g.jsx(Bb,{tabs:n,setActiveTab:s,activeTab:i,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),g.jsxs("form",{onSubmit:u(k),className:"w-full",children:[i==="basic"&&g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[Ps.includes(r.inputType)&&g.jsx(g.Fragment,{children:g.jsx(ge,{label:"Value",name:"value",register:l,errors:d,element:r})}),g.jsx(ge,{label:"Custom Class",name:"customClass",register:l,errors:d,element:r}),!Ps.includes(r.inputType)&&!Ao.includes(r.inputType)&&g.jsx(ge,{label:"Label",name:"inputLabel",register:l,errors:d,element:r}),Hb.includes(r.inputType)&&g.jsx(ge,{label:"Placeholder",name:"placeholder",register:l,errors:d,element:r}),zb.includes(r.inputType)&&g.jsx(ge,{label:"Prefix",name:"prefix",register:l,errors:d,element:r}),Yb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsx(Xb,{}),g.jsx(ge,{label:"Api Url",name:"url",register:l,errors:d,element:r}),g.jsx(ss,{label:"Api Method",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],register:l,name:"method",setValue:f,trigger:m,value:h("method")}),g.jsx(ss,{label:"Api Response type",options:[{label:"String",value:"string"},{label:"Object",value:"object"}],register:l,name:"responseType",setValue:f,trigger:m,value:h("responseType")})]}),Jb.includes(r.inputType)&&g.jsx(Gb,{onChange:C=>{f("denominators",C)},value:h("denominators")}),!Ps.includes(r.inputType)&&!Ao.includes(r.inputType)&&g.jsx(ge,{label:"Short Description",name:"description",register:l,errors:d,element:r}),r.type.toLowerCase()==="grid"&&g.jsx(ge,{label:"Number of columns",name:"columns",register:l,errors:d,element:r}),Kb.includes(r.inputType)&&T()]}),!Ao.includes(r.type.toLowerCase())&&i==="validation"&&g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Required",name:"isRequired",register:l,errors:d,element:r,type:"checkbox"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"requiredMessage",register:l,errors:d,element:r})})]}),qb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Min Length",name:"minLength",register:l,errors:d,element:r,type:"number"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"minLengthMessage",register:l,errors:d,element:r})})]}),g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Max Length",name:"maxLength",register:l,errors:d,element:r,type:"number"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"maxLengthMessage",register:l,errors:d,element:r})})]})]}),Wb.includes(r.inputType)&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Min Amount",name:"minAmount",register:l,errors:d,element:r,type:"amount"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"minAmountMessage",register:l,errors:d,element:r})})]}),g.jsxs("div",{className:"flex gap-x-6 items-center",children:[g.jsx("div",{className:"w-[150px]",children:g.jsx(ge,{label:"Max Amount",name:"maxAmount",register:l,errors:d,element:r,type:"amount"})})," ",g.jsx("div",{className:"flex-1",children:g.jsx(ge,{label:"Error message text",name:"maxAmountMessage",register:l,errors:d,element:r})})]})]})]}),g.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[g.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:!x||y,style:{background:(a==null?void 0:a.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!x||y?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!x||y?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:y?"Saving...":"Save"})]})]})]})})},Ds=p.memo(({state:e,element:t,children:r})=>{const[n,o]=p.useState(!1),{removeElement:i}=p.useContext(ft),s=p.useCallback(()=>{i(t.id,t.sectionId)},[t.id,t.sectionId,i]);return g.jsxs("div",{className:"w-full",children:[n&&g.jsx(ex,{isOpen:n,onClose:()=>o(!1),element:t}),g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsxs("span",{children:[" ",t.inputLabel&&g.jsx("label",{className:"text-sm font-medium",children:t.inputLabel})]}),e==="edit"&&g.jsxs("span",{className:"flex gap-x-3 items-center",children:[g.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:()=>o(!0),children:g.jsx(Me,{icon:"circum:edit"})}),g.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:s,children:g.jsx(Me,{icon:"iconamoon:sign-times-fill"})})]})]}),r]})});Ds.displayName="ElementContainer";function tx({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i,isReadOnly:s}=t||{};let a;return i&&(a=i()[e.id]),g.jsx(ge,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:r,trigger:n,setValue:o,value:a,prefix:e.prefix,disabled:s})}function kc(e,t){return function(){return e.apply(t,arguments)}}const{toString:rx}=Object.prototype,{getPrototypeOf:Ls}=Object,jo=(e=>t=>{const r=rx.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),vt=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Vr}=Array,_n=$o("undefined");function nx(e){return e!==null&&!_n(e)&&e.constructor!==null&&!_n(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Oc=vt("ArrayBuffer");function ox(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Oc(e.buffer),t}const ix=$o("string"),ct=$o("function"),Fc=$o("number"),No=e=>e!==null&&typeof e=="object",sx=e=>e===!0||e===!1,Po=e=>{if(jo(e)!=="object")return!1;const t=Ls(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ax=vt("Date"),lx=vt("File"),ux=vt("Blob"),cx=vt("FileList"),fx=e=>No(e)&&ct(e.pipe),dx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=jo(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},px=vt("URLSearchParams"),[mx,hx,gx,yx]=["ReadableStream","Request","Response","Headers"].map(vt),bx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Vr(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Ac(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const br=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jc=e=>!_n(e)&&e!==br;function Is(){const{caseless:e}=jc(this)&&this||{},t={},r=(n,o)=>{const i=e&&Ac(t,o)||o;Po(t[i])&&Po(n)?t[i]=Is(t[i],n):Po(n)?t[i]=Is({},n):Vr(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Sn(arguments[n],r);return t}const xx=(e,t,r,{allOwnKeys:n}={})=>(Sn(t,(o,i)=>{r&&ct(o)?e[i]=kc(o,r):e[i]=o},{allOwnKeys:n}),e),vx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wx=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ex=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ls(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Tx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},_x=e=>{if(!e)return null;if(Vr(e))return e;let t=e.length;if(!Fc(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Sx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ls(Uint8Array)),Cx=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},kx=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Ox=vt("HTMLFormElement"),Fx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),$c=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ax=vt("RegExp"),Nc=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Sn(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},jx=e=>{Nc(e,(t,r)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ct(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},$x=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Vr(e)?n(e):n(String(e).split(t)),r},Nx=()=>{},Px=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Dx(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Lx=e=>{const t=new Array(10),r=(n,o)=>{if(No(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Vr(n)?[]:{};return Sn(n,(s,a)=>{const l=r(s,o+1);!_n(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Ix=vt("AsyncFunction"),Mx=e=>e&&(No(e)||ct(e))&&ct(e.then)&&ct(e.catch),Pc=((e,t)=>e?setImmediate:t?((r,n)=>(br.addEventListener("message",({source:o,data:i})=>{o===br&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),br.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ct(br.postMessage)),Rx=typeof queueMicrotask<"u"?queueMicrotask.bind(br):typeof process<"u"&&process.nextTick||Pc,$={isArray:Vr,isArrayBuffer:Oc,isBuffer:nx,isFormData:dx,isArrayBufferView:ox,isString:ix,isNumber:Fc,isBoolean:sx,isObject:No,isPlainObject:Po,isReadableStream:mx,isRequest:hx,isResponse:gx,isHeaders:yx,isUndefined:_n,isDate:ax,isFile:lx,isBlob:ux,isRegExp:Ax,isFunction:ct,isStream:fx,isURLSearchParams:px,isTypedArray:Sx,isFileList:cx,forEach:Sn,merge:Is,extend:xx,trim:bx,stripBOM:vx,inherits:wx,toFlatObject:Ex,kindOf:jo,kindOfTest:vt,endsWith:Tx,toArray:_x,forEachEntry:Cx,matchAll:kx,isHTMLForm:Ox,hasOwnProperty:$c,hasOwnProp:$c,reduceDescriptors:Nc,freezeMethods:jx,toObjectSet:$x,toCamelCase:Fx,noop:Nx,toFiniteNumber:Px,findKey:Ac,global:br,isContextDefined:jc,isSpecCompliantForm:Dx,toJSONObject:Lx,isAsyncFn:Ix,isThenable:Mx,setImmediate:Pc,asap:Rx};function ee(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}$.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}});const Dc=ee.prototype,Lc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Lc[e]={value:e}}),Object.defineProperties(ee,Lc),Object.defineProperty(Dc,"isAxiosError",{value:!0}),ee.from=(e,t,r,n,o,i)=>{const s=Object.create(Dc);return $.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Vx=null;function Ms(e){return $.isPlainObject(e)||$.isArray(e)}function Ic(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function Mc(e,t,r){return e?e.concat(t).map(function(o,i){return o=Ic(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Bx(e){return $.isArray(e)&&!e.some(Ms)}const Ux=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Do(e,t,r){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=$.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!$.isUndefined(x[y])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if($.isDate(d))return d.toISOString();if(!l&&$.isBlob(d))throw new ee("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(d)||$.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,y,x){let b=d;if(d&&!x&&typeof d=="object"){if($.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if($.isArray(d)&&Bx(d)||($.isFileList(d)||$.endsWith(y,"[]"))&&(b=$.toArray(d)))return y=Ic(y),b.forEach(function(v,E){!($.isUndefined(v)||v===null)&&t.append(s===!0?Mc([y],E,i):s===null?y:y+"[]",u(v))}),!1}return Ms(d)?!0:(t.append(Mc(x,y,i),u(d)),!1)}const f=[],h=Object.assign(Ux,{defaultVisitor:c,convertValue:u,isVisitable:Ms});function m(d,y){if(!$.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(d),$.forEach(d,function(b,w){(!($.isUndefined(b)||b===null)&&o.call(t,b,$.isString(w)?w.trim():w,y,h))===!0&&m(b,y?y.concat(w):[w])}),f.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Rc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Rs(e,t){this._pairs=[],e&&Do(e,this,t)}const Vc=Rs.prototype;Vc.append=function(t,r){this._pairs.push([t,r])},Vc.toString=function(t){const r=t?function(n){return t.call(this,n,Rc)}:Rc;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function zx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Bc(e,t,r){if(!t)return e;const n=r&&r.encode||zx;$.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=$.isURLSearchParams(t)?t.toString():new Rs(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Uc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(n){n!==null&&t(n)})}}const zc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rs,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vs=typeof window<"u"&&typeof document<"u",Bs=typeof navigator=="object"&&navigator||void 0,Hx=Vs&&(!Bs||["ReactNative","NativeScript","NS"].indexOf(Bs.product)<0),Wx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kx=Vs&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vs,hasStandardBrowserEnv:Hx,hasStandardBrowserWebWorkerEnv:Wx,navigator:Bs,origin:Kx},Symbol.toStringTag,{value:"Module"})),...qx};function Yx(e,t){return Do(e,new He.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return He.isNode&&$.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Jx(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gx(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function qc(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&$.isArray(o)?o.length:s,l?($.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!$.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&$.isArray(o[s])&&(o[s]=Gx(o[s])),!a)}if($.isFormData(e)&&$.isFunction(e.entries)){const r={};return $.forEachEntry(e,(n,o)=>{t(Jx(n),o,r,0)}),r}return null}function Xx(e,t,r){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const Cn={transitional:zc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=$.isObject(t);if(i&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return o?JSON.stringify(qc(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Yx(t,this.formSerializer).toString();if((a=$.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Xx(t)):t}],transformResponse:[function(t){const r=this.transitional||Cn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{Cn.headers[e]={}});const Zx=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qx=e=>{const t={};let r,n,o;return e&&e.split(`
60
+ `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&Zx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Hc=Symbol("internals");function kn(e){return e&&String(e).trim().toLowerCase()}function Lo(e){return e===!1||e==null?e:$.isArray(e)?e.map(Lo):String(e)}function ev(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const tv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Us(e,t,r,n,o){if($.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!$.isString(t)){if($.isString(n))return t.indexOf(n)!==-1;if($.isRegExp(n))return n.test(t)}}function rv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function nv(e,t){const r=$.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}class ot{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,l,u){const c=kn(l);if(!c)throw new Error("header name must be a non-empty string");const f=$.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||l]=Lo(a))}const s=(a,l)=>$.forEach(a,(u,c)=>i(u,c,l));if($.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if($.isString(t)&&(t=t.trim())&&!tv(t))s(Qx(t),r);else if($.isHeaders(t))for(const[a,l]of t.entries())i(l,a,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=kn(t),t){const n=$.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return ev(o);if($.isFunction(r))return r.call(this,o,n);if($.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=kn(t),t){const n=$.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Us(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=kn(s),s){const a=$.findKey(n,s);a&&(!r||Us(n,n[a],a,r))&&(delete n[a],o=!0)}}return $.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||Us(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return $.forEach(this,(o,i)=>{const s=$.findKey(n,i);if(s){r[s]=Lo(o),delete r[i];return}const a=t?rv(i):String(i).trim();a!==i&&delete r[i],r[a]=Lo(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return $.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&$.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
61
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Hc]=this[Hc]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=kn(s);n[a]||(nv(o,s),n[a]=!0)}return $.isArray(t)?t.forEach(i):i(t),this}}ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(ot.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),$.freezeMethods(ot);function zs(e,t){const r=this||Cn,n=t||r,o=ot.from(n.headers);let i=n.data;return $.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Wc(e){return!!(e&&e.__CANCEL__)}function Br(e,t,r){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,r),this.name="CanceledError"}$.inherits(Br,ee,{__CANCEL__:!0});function Kc(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ov(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function iv(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const m=c&&u-c;return m?Math.round(h*1e3/m):void 0}}function sv(e,t){let r=0,n=1e3/t,o,i;const s=(u,c=Date.now())=>{r=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Io=(e,t,r=3)=>{let n=0;const o=iv(50,250);return sv(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,u=o(l),c=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Yc=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Jc=e=>(...t)=>$.asap(()=>e(...t)),av=He.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,lv=He.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];$.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),$.isString(n)&&s.push("path="+n),$.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Gc(e,t,r){let n=!uv(t);return e&&(n||r==!1)?cv(e,t):t}const Xc=e=>e instanceof ot?{...e}:e;function xr(e,t){t=t||{};const r={};function n(u,c,f,h){return $.isPlainObject(u)&&$.isPlainObject(c)?$.merge.call({caseless:h},u,c):$.isPlainObject(c)?$.merge({},c):$.isArray(c)?c.slice():c}function o(u,c,f,h){if($.isUndefined(c)){if(!$.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function i(u,c){if(!$.isUndefined(c))return n(void 0,c)}function s(u,c){if($.isUndefined(c)){if(!$.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>o(Xc(u),Xc(c),f,!0)};return $.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||o,h=f(e[c],t[c],c);$.isUndefined(h)&&f!==a||(r[c]=h)}),r}const Zc=e=>{const t=xr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=ot.from(s),t.url=Bc(Gc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if($.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(He.hasStandardBrowserEnv&&(n&&$.isFunction(n)&&(n=n(t)),n||n!==!1&&av(t.url))){const u=o&&i&&lv.read(i);u&&s.set(o,u)}return t},fv=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Zc(e);let i=o.data;const s=ot.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,f,h,m,d;function y(){m&&m(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const v=ot.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:e,request:x};Kc(function(C){r(C),y()},function(C){n(C),y()},k),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new ee("Request aborted",ee.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ee("Network Error",ee.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||zc;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),n(new ee(E,k.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&$.forEach(s.toJSON(),function(E,k){x.setRequestHeader(k,E)}),$.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),u&&([h,d]=Io(u,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,m]=Io(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(c=v=>{x&&(n(!v||v.type?new Br(null,e,x):v),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const w=ov(o.url);if(w&&He.protocols.indexOf(w)===-1){n(new ee("Unsupported protocol "+w+":",ee.ERR_BAD_REQUEST,e));return}x.send(i||null)})},dv=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ee?c:new Br(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>$.asap(a),l}},pv=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},mv=async function*(e,t){for await(const r of hv(e))yield*pv(r,t)},hv=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Qc=(e,t,r,n)=>{const o=mv(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let f=c.byteLength;if(r){let h=i+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Mo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ef=Mo&&typeof ReadableStream=="function",gv=Mo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),tf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yv=ef&&tf(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),rf=64*1024,qs=ef&&tf(()=>$.isReadableStream(new Response("").body)),Ro={stream:qs&&(e=>e.body)};Mo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ro[t]&&(Ro[t]=$.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ee(`Response type '${t}' is not supported`,ee.ERR_NOT_SUPPORT,n)})})})(new Response);const bv=async e=>{if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e=e+""),$.isString(e))return(await gv(e)).byteLength},xv=async(e,t)=>{const r=$.toFiniteNumber(e.getContentLength());return r??bv(t)},Hs={http:Vx,xhr:fv,fetch:Mo&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Zc(e);u=u?(u+"").toLowerCase():"text";let m=dv([o,i&&i.toAbortSignal()],s),d;const y=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(l&&yv&&r!=="get"&&r!=="head"&&(x=await xv(c,n))!==0){let k=new Request(t,{method:"POST",body:n,duplex:"half"}),T;if($.isFormData(n)&&(T=k.headers.get("content-type"))&&c.setContentType(T),k.body){const[C,O]=Yc(x,Io(Jc(l)));n=Qc(k.body,rf,C,O)}}$.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;d=new Request(t,{...h,signal:m,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?f:void 0});let w=await fetch(d);const v=qs&&(u==="stream"||u==="response");if(qs&&(a||v&&y)){const k={};["status","statusText","headers"].forEach(j=>{k[j]=w[j]});const T=$.toFiniteNumber(w.headers.get("content-length")),[C,O]=a&&Yc(T,Io(Jc(a),!0))||[];w=new Response(Qc(w.body,rf,C,()=>{O&&O(),y&&y()}),k)}u=u||"text";let E=await Ro[$.findKey(Ro,u)||"text"](w,e);return!v&&y&&y(),await new Promise((k,T)=>{Kc(k,T,{data:E,headers:ot.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:d})})}catch(b){throw y&&y(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,d),{cause:b.cause||b}):ee.from(b,b&&b.code,e,d)}})};$.forEach(Hs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nf=e=>`- ${e}`,vv=e=>$.isFunction(e)||e===null||e===!1,of={getAdapter:e=>{e=$.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!vv(r)&&(n=Hs[(s=String(r)).toLowerCase()],n===void 0))throw new ee(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
62
+ `+i.map(nf).join(`
63
+ `):" "+nf(i[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Hs};function Ws(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Br(null,e)}function sf(e){return Ws(e),e.headers=ot.from(e.headers),e.data=zs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),of.getAdapter(e.adapter||Cn.adapter)(e).then(function(n){return Ws(e),n.data=zs.call(e,e.transformResponse,n),n.headers=ot.from(n.headers),n},function(n){return Wc(n)||(Ws(e),n&&n.response&&(n.response.data=zs.call(e,e.transformResponse,n.response),n.response.headers=ot.from(n.response.headers))),Promise.reject(n)})}const af="1.8.4",Vo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const lf={};Vo.transitional=function(t,r,n){function o(i,s){return"[Axios v"+af+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new ee(o(s," has been removed"+(r?" in "+r:"")),ee.ERR_DEPRECATED);return r&&!lf[s]&&(lf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}},Vo.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function wv(e,t,r){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ee("option "+i+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}const Bo={assertOptions:wv,validators:Vo},Nt=Bo.validators;class vr{constructor(t){this.defaults=t,this.interceptors={request:new Uc,response:new Uc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
64
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=xr(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Bo.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),o!=null&&($.isFunction(o)?r.paramsSerializer={serialize:o}:Bo.assertOptions(o,{encode:Nt.function,serialize:Nt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Bo.assertOptions(r,{baseUrl:Nt.spelling("baseURL"),withXsrfToken:Nt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&$.merge(i.common,i[r.method]);i&&$.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=ot.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,f=0,h;if(!l){const d=[sf.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),h=d.length,c=Promise.resolve(r);f<h;)c=c.then(d[f++],d[f++]);return c}h=a.length;let m=r;for(f=0;f<h;){const d=a[f++],y=a[f++];try{m=d(m)}catch(x){y.call(this,x);break}}try{c=sf.call(this,m)}catch(d){return Promise.reject(d)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=xr(this.defaults,t);const r=Gc(t.baseURL,t.url,t.allowAbsoluteUrls);return Bc(r,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){vr.prototype[t]=function(r,n){return this.request(xr(n||{},{method:t,url:r,data:(n||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(xr(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}vr.prototype[t]=r(),vr.prototype[t+"Form"]=r(!0)});class Ks{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Br(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ks(function(o){t=o}),cancel:t}}}function Ev(e){return function(r){return e.apply(null,r)}}function Tv(e){return $.isObject(e)&&e.isAxiosError===!0}const Ys={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ys).forEach(([e,t])=>{Ys[t]=e});function uf(e){const t=new vr(e),r=kc(vr.prototype.request,t);return $.extend(r,vr.prototype,t,{allOwnKeys:!0}),$.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return uf(xr(e,o))},r}const Te=uf(Cn);Te.Axios=vr,Te.CanceledError=Br,Te.CancelToken=Ks,Te.isCancel=Wc,Te.VERSION=af,Te.toFormData=Do,Te.AxiosError=ee,Te.Cancel=Te.CanceledError,Te.all=function(t){return Promise.all(t)},Te.spread=Ev,Te.isAxiosError=Tv,Te.mergeConfig=xr,Te.AxiosHeaders=ot,Te.formToJSON=e=>qc($.isHTMLForm(e)?new FormData(e):e),Te.getAdapter=of.getAdapter,Te.HttpStatusCode=Ys,Te.default=Te;function _v(e){if(!e)return!1;const t=/^data:image\/(jpeg|png|gif|bmp|webp);base64,/i,r=/\.(jpeg|jpg|png|gif|bmp|webp)$/i;return t.test(e)||r.test(e)}const Sv=({imageUrl:e})=>{const[t,r]=p.useState(!1),n=()=>{r(!0)},o=()=>{r(!1)};return g.jsxs("div",{children:[g.jsx("img",{alt:"Thumbnail",style:{cursor:"pointer",width:"120px",height:"130px",objectFit:"cover"},onClick:n,src:e||"/place.png","data-toggle":"tooltip","data-placement":"top",title:"Click to view"}),t&&g.jsx("div",{className:"modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"},onClick:o,children:g.jsxs("div",{className:"modal-content",style:{position:"relative",backgroundColor:"white",padding:"20px",borderRadius:"8px",width:"90vw"},onClick:i=>i.stopPropagation(),children:[g.jsx("span",{className:"close",onClick:o,style:{position:"absolute",top:"10px",right:"10px",fontSize:"24px",cursor:"pointer"},children:"×"}),g.jsx("img",{src:e||"/place.png",alt:"Full Image",style:{maxWidth:"90%",maxHeight:"90vh",objectFit:"contain"}})]})})]})};function Cv({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},[i,s]=p.useState(),[a,l]=p.useState(!1),[u,c]=p.useState(!1),[f,h]=p.useState(""),m=o&&o(e==null?void 0:e.id);p.useEffect(()=>{s(m)},[m]);const[d,y]=p.useState("");p.useEffect(()=>{r(e.id)},[e.id,r]);const{url:x,method:b,responseType:w}=e||{},v=p.useCallback(async E=>{var k,T,C,O,j,D,N,L,R,H,J;if(!(!x||!b)){l(!0);try{let z;if(b.toLowerCase()==="get"){const X=`${x}?value=${E}`;z=await Te.get(X)}else if(b.toLowerCase()==="post")z=await Te.post(x,{value:E});else throw new Error("Unsupported HTTP method");z.status===200&&((((T=(k=z==null?void 0:z.data)==null?void 0:k.data)==null?void 0:T.status)||((C=z==null?void 0:z.data)==null?void 0:C.status))===!0?(c(!0),w==="string"?h(((j=(O=z==null?void 0:z.data)==null?void 0:O.data)==null?void 0:j.description)||((D=z==null?void 0:z.data)==null?void 0:D.description)||"Validation successful"):y(((L=(N=z==null?void 0:z.data)==null?void 0:N.data)==null?void 0:L.description)||((R=z==null?void 0:z.data)==null?void 0:R.description)||{})):(console.error("Invalid input:",E),h("Unable to validate input"),c(!1)))}catch(z){console.error("Error validating input:",z),h(((J=(H=z==null?void 0:z.response)==null?void 0:H.data)==null?void 0:J.message)||"Unable to validate input"),c(!1)}finally{l(!1)}}},[b,w,x]);return p.useEffect(()=>{if(i){const E=setTimeout(()=>{v(i)},700);return()=>clearTimeout(E)}},[v,i]),g.jsxs("div",{children:[g.jsxs("div",{className:"relative flex items-center",children:[g.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:ue("input-control",e==null?void 0:e.customClass),...r(e==null?void 0:e.id),onChange:E=>{s(E.target.value),n(e==null?void 0:e.id,E.target.value)}}),g.jsxs("span",{className:"absolute right-0",children:[a&&g.jsxs("span",{children:[" ",g.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),u&&!a&&g.jsx("span",{className:"text-green-600 text-lg pr-3 block",children:g.jsx(Me,{icon:"gg:check-o"})})]})]}),f&&w==="string"&&g.jsx("span",{className:`${u?"text-green-600":"text-red-600"} text-sm`,children:f}),w==="object"&&g.jsx("div",{className:"grid grid-cols-2 gap-6 text-sm text-gray-600 mt-2",children:Object.entries(d).map(([E,k])=>g.jsxs("div",{className:"flex items-center gap-x-2",children:[g.jsxs("span",{className:"font-semibold",children:[E,":"]}),_v(k)?g.jsx(Sv,{imageUrl:k}):g.jsx("span",{children:String(k)})]},E))})]})}function kv({onGetTotal:e,readOnly:t,defaultValue:r,denominators:n}){const[o,i]=p.useState([...r]);function s(u,c){i(f=>{const h=[...f];return h[c]={...h[c],value:u},h})}function a(u,c){return parseFloat(u)*parseFloat(c)||0}const l=p.useMemo(()=>o.reduce((u,c)=>{const f=a(c.key,c.value);return u+f},0),[o]);return p.useEffect(()=>{e&&e(o)},[o]),p.useEffect(()=>{if(n!=null&&n.length){const u=n.map((c,f)=>({key:c.value,value:Array.isArray(r)&&r[f]?r[f].value:""}));i(u)}},[r,n]),g.jsx("div",{className:"mt-2",children:g.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden text-gray-700",children:[g.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50",children:[g.jsx("div",{className:"border-r px-4 py-2",children:g.jsx("span",{className:"",children:"Denomination"})}),g.jsx("div",{className:"border-r px-4 py-2",children:g.jsx("span",{children:"Quantity"})}),g.jsx("div",{className:"px-4 py-2",children:g.jsx("span",{children:"Sub total"})})]}),o.map((u,c)=>{var f,h;return g.jsxs("div",{className:"grid grid-cols-3 text-sm border-b border-gray-100",children:[g.jsx("div",{className:"border-r px-4 py-2 flex items-center",children:g.jsx("span",{className:"",children:(f=parseFloat(u.key))==null?void 0:f.toLocaleString()})}),g.jsx("div",{className:"border-r px-4 py-1",children:g.jsx("span",{children:g.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:u.value,onValueChange:m=>s(m,c),disabled:t,allowNegativeValue:!1})})}),g.jsx("div",{className:"px-4 py-2 flex justify-between items-center",children:g.jsx("span",{children:(h=a(u.key,u.value))==null?void 0:h.toLocaleString()})})]},u.key+c+Math.random())}),g.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold bg-gray-50",children:[g.jsx("div",{className:"border-r px-4 py-3 col-span-2 text-right",children:"Total"}),g.jsx("div",{className:"px-4 py-3",children:l==null?void 0:l.toLocaleString()})]})]})})}function Ov({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},i=o&&o(e==null?void 0:e.id)||[];return p.useEffect(()=>{r(e.id)},[e.id,r]),g.jsx("div",{children:g.jsx(kv,{onGetTotal:s=>{n&&n(e.id,s)},denominators:(e==null?void 0:e.denominators)||[],defaultValue:i,readOnly:e==null?void 0:e.isReadOnly})})}function Fv({element:e}){return g.jsx("div",{className:ue("py-6",e==null?void 0:e.customClass)})}function Av({element:e}){return g.jsx("div",{children:g.jsx("hr",{className:ue("border-gray-200 my-4",e==null?void 0:e.customClass)})})}function jv({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return g.jsx("div",{children:g.jsx("input",{placeholder:"Enter text",type:"text",className:"input-control",...r(e==null?void 0:e.id)})})}function $v({element:e,state:t}){return g.jsx(g.Fragment,{children:g.jsx("div",{className:e==null?void 0:e.customClass,children:(e==null?void 0:e.value)||t==="edit"&&g.jsx("span",{className:"text-gray-400",children:"Provide text"})})})}const cf={textField:dl,longText:B0,selectField:V0,multiSelect:y0,numberField:dl,amountField:tx,date:jm,password:_0,checkbox:R0,radio:I0,email:b0,file:T0,section:M0,validateInput:Cv,tableInput:Ov,spacer:Fv,divider:Av,header:jv,basicText:$v},ff="edit",df=(e,t)=>{const r=cf[e.type];return r?g.jsx(Ds,{element:e,state:ff,children:g.jsxs("div",{className:"relative w-full",children:[e.type.toLowerCase()!=="grid"&&g.jsx("div",{className:"absolute top-0 left-0 h-full w-full z-20"}),g.jsx(r,{element:e,state:ff,sectionId:t})]})}):null},Js=({col:e,children:t,customClass:r})=>g.jsx("div",{className:ue("w-full p-2 bg-white",r),style:{gridColumn:e},children:t}),Nv=({element:e,sectionId:t,children:r,customClass:n,state:o})=>{const{formData:i,addElement:s,setIsDragging:a}=p.useContext(ft),l=p.useMemo(()=>Array.from({length:e.columns}),[e.columns]),u=p.useCallback(h=>{h.preventDefault(),h.stopPropagation(),h.dataTransfer.dropEffect="move"},[]),c=p.useCallback((h,m)=>{var d,y;h.preventDefault(),a(!1);try{const x=h.dataTransfer.getData("properties");if(!x)return;const b=JSON.parse(x);if((b==null?void 0:b.type)==="grid")return;const w=m+1;if((y=(d=i.find(k=>k.id===t))==null?void 0:d.questionData)==null?void 0:y.some(k=>{var T;return k.gridId===e.id&&((T=k.gridPosition)==null?void 0:T.col)===w}))return;const E={...b,id:Qe(),sectionId:t,gridId:e.id,gridPosition:{col:w}};s(E,t)}catch(x){console.error("Drop failed in grid:",x),a(!1)}},[s,e.id,i,t,a]),f=(h,m,d)=>{const y=Array.isArray(r)&&r.find(x=>{var b;return((b=x==null?void 0:x.props)==null?void 0:b.col)===h+1});return g.jsx("div",{children:g.jsx("div",{id:h.toString(),onDrop:x=>c(x,h),onDragOver:u,className:ue("border rounded-lg min-h-[110px] bg-white p-2","flex items-center justify-center text-gray-400 transition-colors",m),children:y||g.jsx("span",{children:d==="edit"&&g.jsx(Me,{icon:"ph:plus-bold"})})})},h)};return g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"grid gap-6 w-full",style:{gridTemplateColumns:`repeat(${e.columns}, 1fr)`},children:l.map((h,m)=>f(m,n,o))})})},Gs=p.memo(Nv),Pv="edit";function Dv({elementData:e,sectionId:t}){const{formData:r,updateElementPosition:n,isDragging:o,setIsDragging:i,addElementInPosition:s}=p.useContext(ft),[a,l]=p.useState(null),[u,c]=p.useState(null),f=p.useMemo(()=>{var v;return((v=r.find(E=>E.id===t))==null?void 0:v.questionData)||[]},[r,t]),h=p.useCallback((v,E)=>{v.dataTransfer.setData("properties",E),l(E)},[]),m=p.useCallback((v,E)=>{v.preventDefault(),v.stopPropagation(),c(E)},[]),d=p.useCallback(v=>{v.preventDefault(),v.stopPropagation();const E=v.dataTransfer.getData("properties"),k=v.currentTarget.id;if(!k||E===k)return;const T=f.findIndex(D=>D.id===E),C=f.findIndex(D=>D.id===k);if(T===-1||C===-1)return;const O=[...f],[j]=O.splice(T,1);O.splice(C,0,j),n(O,t),l(null)},[f,t,n]),y=p.useCallback((v,E)=>{v.preventDefault(),i(!1);try{const T={...JSON.parse(v.dataTransfer.getData("properties")),id:Qe(),sectionId:t};s(T,t,E)}catch(k){console.error("Drop error:",k)}},[s,t,i]),x=p.useCallback(v=>g.jsx("div",{className:"hover:bg-blue-300 transition rounded",onDragOver:E=>E.preventDefault(),onDrop:E=>y(E,v),onDragEnd:()=>i(!1),children:g.jsx("div",{className:"bg-blue-50 rounded p-6 h-[60px] border-2 border-blue-300 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:g.jsx(Me,{icon:"octicon:plus-16"})})},`drop-${v}`),[y,i]),b=p.useCallback(v=>g.jsx("div",{id:v.id,className:ue("cursor-move border p-4 w-full rounded-lg transition-colors bg-white",{"bg-gray-100":a===v.id,"border-dashed border-blue-300":a&&a!==v.id}),draggable:!0,onDragStart:E=>h(E,v.id),onDragOver:E=>m(E,v.id),onDrop:d,onDragEnd:()=>l(null),children:df(v,t)},v.id),[a,d,m,t,h]),w=p.useMemo(()=>(e==null?void 0:e.reduce((v,E)=>(E.gridId&&(v[E.gridId]=v[E.gridId]||[],v[E.gridId].push(E)),v),{}))||{},[e]);return e!=null&&e.length?g.jsx("div",{className:"w-full h-full grid grid-cols-1 gap-4 relative",children:e.map((v,E)=>{if(v.type==="grid"){const k=w[v.id]||[];return g.jsx("div",{draggable:!0,onDragStart:T=>h(T,v.id),onDragOver:T=>m(T,v.id),onDrop:d,onDragEnd:()=>l(null),className:"cursor-move border p-4 w-full rounded-lg transition-colors bg-white",children:g.jsx(Ds,{element:v,state:"edit",children:g.jsx(Gs,{element:v,sectionId:t,state:Pv,children:k.map(T=>{var C;return g.jsx(Js,{col:(C=T.gridPosition)==null?void 0:C.col,children:df(T,t)},T.id)})})})},v.id)}return v.gridId?null:g.jsxs("div",{className:ue("group relative grid gap-y-[6px]",v.elementClass),children:[o&&u===v.id&&x(E),g.jsx("div",{className:"group",children:b(v)}),o&&u===v.id&&x(E+1)]},v.id)})}):g.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-400 min-h-[250px] p-10 col-span-2",children:"Drag or click an element to display"})}const Lv=p.memo(Dv),Iv=Tn({title:de(),description:de()}).required(),Mv=({isOpen:e,onClose:t,section:r})=>{const{updateSection:n}=p.useContext(ft),{register:o,handleSubmit:i,formState:{errors:s,isSubmitting:a,isValid:l},reset:u}=Ss({resolver:Cs(Iv),defaultValues:r});if(p.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{n(f,r.id),t()};return g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[g.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[g.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),g.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:g.jsx(Me,{icon:"tabler:x"})})]}),g.jsxs("form",{onSubmit:i(c),className:"w-full",children:[g.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[g.jsx(ge,{label:"Title",name:"title",register:o,errors:s}),g.jsx(ge,{label:"Description",name:"description",register:o,errors:s})]}),g.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[g.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:!l||a,className:`flex-1 px-4 py-2.5 ${!l||a?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!l||a?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:a?"Saving...":"Save"})]})]})]})})},Rv=()=>{const[e,t]=p.useState(!1),r=p.useRef(null),n=p.useRef(null),{removeSection:o,formData:i,setIsDragging:s,setSelectedSection:a,selectedSection:l,activeSections:u,setActiveSections:c}=p.useContext(ft);p.useEffect(()=>{var d;a(((d=i[0])==null?void 0:d.id)||null)},[]);const f=p.useCallback(d=>{d.preventDefault(),d.dataTransfer.dropEffect="move",n.current&&(n.current.scrollTop=n.current.scrollHeight)},[]);function h(d){u.includes(d)?c(y=>y.filter(x=>x!==d)):c(y=>[...y,d])}function m(d){r.current=d,t(!0)}return g.jsxs("div",{ref:n,className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&g.jsx(Mv,{isOpen:e,onClose:()=>t(!1),section:r.current}),g.jsx("div",{className:"relative w-full flex flex-col gap-y-6 flex-1 py-4",children:i.map((d,y)=>g.jsxs("div",{className:"group cursor-pointer rounded",children:[g.jsxs("div",{className:`border border-gray-100 rounded pb-6 px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
65
+ ${l===d.id?"border-dashed border-blue-400 bg-[#f7f8fa]":"border-transparent"} ${u.includes(y)?"min-h-[300px]":""}`,children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("div",{onClick:()=>a(d.id),className:"h-full flex-1 cursor-pointer py-4",children:g.jsx("h2",{className:"font-medium",children:d.title||"Section title"})}),g.jsxs("div",{className:"flex gap-x-2 items-center",children:[g.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>m(d),children:g.jsx(Me,{icon:"fluent:edit-28-regular"})}),i.length>1&&g.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>o(d.id),children:g.jsx(Me,{icon:"lets-icons:trash-duotone-line"})}),g.jsx("button",{type:"button",className:"p-1 rounded-lg text-xs",onClick:()=>h(y),children:g.jsx(Me,{icon:u.includes(y)?"gravity-ui:minus":"octicon:plus-16"})})]})]}),(d==null?void 0:d.description)&&u.includes(y)&&g.jsx("p",{className:"text-sm text-gray-60 mt-2 text-gray-600",children:d==null?void 0:d.description}),u.includes(y)&&g.jsxs("div",{className:"mt-4 transition-all duration-200 h-full",id:d.id,onDragOver:f,onDragEnd:()=>s(!1),onClick:()=>a(d.id),children:[g.jsx("hr",{}),g.jsx("div",{className:"gap-y-6 mt-4 h-full",children:g.jsx(Lv,{elementData:d.questionData,sectionId:d.id})})]})]}),g.jsx("hr",{className:"mt-6 group-last:hidden"})]},d.id))})]})};function Vv({questionData:e}){const{setFormData:t}=p.useContext(ft);return p.useEffect(()=>{e&&e.length>0&&t(e)},[e,t]),g.jsx("div",{className:"bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto",children:g.jsx(Rv,{})})}const Bv=()=>{const{setIsDragging:e,addElement:t,selectedSection:r}=p.useContext(ft),n=p.useCallback((i,s)=>{i.dataTransfer.setData("properties",JSON.stringify(s)),i.dataTransfer.effectAllowed="move",e(!0)},[e]);function o(i){if(console.log(r),!r){ce.error("Please select a section to add an element to.");return}const s={...i,id:Qe(),sectionId:r};t(s,r)}return g.jsx("div",{className:"w-full",children:g.jsx("div",{className:"py-4 px-5 max-h-[80vh] overflow-y-auto",children:g.jsx("div",{children:g.jsx("ul",{className:"grid gap-y-[8px] mt-3",children:Ub.map(i=>g.jsxs("li",{onDragStart:s=>n(s,i),onDragEnd:()=>e(!1),onClick:()=>o(i),style:{borderColor:i.color,color:i.color},className:`cursor-move text-[#475467] flex justify-between items-center \r
66
66
  border border-[#98A2B3] rounded-lg py-3 px-[14px] shadow-custom\r
67
67
  hover:shadow-lg transition-all duration-200\r
68
- active:opacity-50`,draggable:!0,children:[y.jsxs("span",{className:"flex gap-x-2 items-center",children:[y.jsx("span",{style:{color:i.color},children:y.jsx(Be,{icon:i.icon,iconClass:"w-5 h-5"})}),y.jsx("span",{className:"text-sm font-medium leading-[0]",children:i.label})]}),y.jsx("span",{className:"text-gray-400",children:y.jsx(Be,{icon:"akar-icons:drag-horizontal"})})]},i.type))})})})})},Nv=m.memo($v),Pv=({isOpen:e,onClose:t})=>{const{formData:r}=m.useContext(mt);return e?y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"max-w-[80vw] bg-white rounded-xl shadow-xl relative flex flex-col items-center w-full py-6 ",children:[y.jsx("button",{type:"button",onClick:t,className:"absolute top-3 right-4 text-sm",children:"Close"}),y.jsx("div",{className:"max-h-[90vh] overflow-y-auto h-full min-h-[600px] w-full",children:y.jsx(xf,{form_data:r,ignoreValidation:!0})})]})}):null};function Lv(){const{addSection:e}=m.useContext(mt),[t,r]=m.useState(!1);return y.jsxs("div",{className:"px-[30px] py-[10px] flex justify-between items-center",children:[y.jsx("div",{className:"flex gap-x-4 items-center"}),t&&y.jsx(Pv,{isOpen:t,onClose:()=>r(!1),element:void 0}),y.jsxs("div",{className:"py-4 flex justify-end gap-x-6 text-sm",children:[y.jsx(Cr,{onClick:()=>e(),text:"Add section",btnClass:"text-gray-700 border-[#98A2B3] !font-medium bg-transparent"}),y.jsx(Cr,{onClick:()=>r(!0),text:"Preview",btnClass:"text-gray-700 border-[#98A2B3] !font-medium"})]})]})}function Dv({onSubmit:e,questionData:t}){return y.jsx(Dm,{children:y.jsxs("div",{className:"w-full h-screen bg-[#E4E7EC] flex flex-col",children:[y.jsx(ud,{}),y.jsx("div",{className:"border-b bg-white border-[#E4E7EC]",children:y.jsx(Lv,{})}),y.jsxs("div",{className:"flex flex-1 ",children:[y.jsx("div",{className:"w-[270px] h-full border-l border-[#E4E7EC] bg-white",children:y.jsx(Nv,{})}),y.jsx("div",{className:"flex-1 h-full max-h-full p-4 z-[1]",children:y.jsx(jv,{questionData:t})})]}),y.jsx("div",{className:"border-b bg-white border-t border-[#E4E7EC]",children:y.jsx(Im,{onSubmit:e})})]})})}const Iv=({onSubmit:e,questionData:t,isReadOnly:r,config:n={buttonColor:"#333"}})=>(m.useEffect(()=>{n&&il("config",n)},[n]),y.jsx(Dv,{onSubmit:e,questionData:t,isReadOnly:r})),Mv=()=>(m.useEffect(()=>{const e=Jn("config"),t=(e==null?void 0:e.loaderColor)||"#333";document.documentElement.style.setProperty("--loader-color",t)},[]),y.jsx("div",{className:"h-screen w-screen flex justify-center items-center",children:y.jsx("span",{className:"loader"})})),Rv={textField:Xn,longText:Vu,selectField:Ru,multiSelect:Ou,numberField:Xn,amountField:$c,date:sl,password:Nu,checkbox:Mu,radio:Du,email:Fu,file:ju,grid:$u,section:Iu,validateInput:gf,tableInput:yf},Vv=(e,t)=>{const r=Rv[e.type];return r?y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium mb-[5px]",children:e.inputLabel}),y.jsx(r,{element:e,state:"edit",validationData:t})]}):null},vr={required:"This field is required",email:"Invalid email format",minLength:e=>`Minimum length is ${e}`,maxLength:e=>`Maximum length is ${e}`,minAmount:e=>`Minimum amount is ${e}`,maxAmount:e=>`Maximum amount is ${e}`},Bv=e=>({textField:be().nullable(),longText:be().nullable(),numberField:wn().nullable().transform(r=>isNaN(r)?null:r),amountField:wn().nullable().transform(r=>isNaN(r)?null:r),selectField:be().nullable(),checkbox:vn().nullable(),radio:vn().nullable(),email:be().nullable().email(vr.email),date:$s().typeError("Invalid date").nullable()})[e]||vn().nullable(),Uv=(e,t,r)=>t?e.type==="boolean"?e.oneOf([!0],r||vr.required):e.required(r||vr.required):e,zv=(e,{minLength:t,maxLength:r,minLengthMessage:n,maxLengthMessage:o})=>{let i=e;return t&&(i=i.min(t,n||vr.minLength(t))),r&&(i=i.max(r,o||vr.maxLength(r))),i},Hv=(e,{minAmount:t,maxAmount:r,minAmountMessage:n,maxAmountMessage:o})=>{let i=e;return t&&(i=i.min(parseFloat(String(t)),n||vr.minAmount(t))),r&&(i=i.max(parseFloat(String(r)),o||vr.maxAmount(r))),i};function qv(e){const t={};return e.forEach(({questionData:r})=>{r.forEach(n=>{const{id:o,type:i,isRequired:s,requiredMessage:a}=n;let l=Bv(i);l=Uv(l,s,a),i==="textField"||i==="longText"||i==="email"?l=zv(l,n):(i==="numberField"||i==="amountField")&&(l=Hv(l,n)),t[o]=l})}),Tn().shape(t)}function Wv(e){return e.reduce((t,r)=>(r.questionData.forEach(n=>{t[n.id]=Object.prototype.hasOwnProperty.call(n,"value")?n.value:null}),t),{})}const Kv=({form_data:e,answerData:t,ignoreValidation:r,onSubmitData:n,isReadOnly:o})=>{var C;const[i,s]=m.useState(0),a=m.useMemo(()=>e.length,[e]),l=qv(e),u=_s({resolver:Ss(l),mode:"onSubmit",defaultValues:{}}),{register:c,setValue:f,watch:h,handleSubmit:p,reset:d,getValues:g,formState:{errors:x,isSubmitting:b},trigger:v}=u,w=Jn("config"),_=A=>{const N=e==null?void 0:e.map(L=>{var P;return{...L,questionData:(P=L==null?void 0:L.questionData)==null?void 0:P.map(I=>{const R=A[I.id];return{...I,value:R}})}});n&&n(N),console.log("🚀 ~ FormRenderer ~ tempData:",N)};m.useEffect(()=>{if(t&&t.length>0){const A=Wv(t);d(A)}},[t,d]);async function k(){var A;!r&&!await v((A=e==null?void 0:e[i].questionData)==null?void 0:A.map(L=>L.id))||s(i+1)}function S(){s(i-1)}return y.jsx(q0,{...u,children:y.jsxs("form",{onSubmit:p(_),className:"container mx-auto p-6",children:[y.jsx("div",{className:"relative w-full flex flex-col gap-y-12 py-4",children:y.jsxs("div",{children:[y.jsxs("div",{className:"mb-4",children:[(e==null?void 0:e[i].title)&&y.jsx("h2",{className:"text-lg font-semibold mb-[6px]",children:e==null?void 0:e[i].title}),(e==null?void 0:e[i].description)&&y.jsx("p",{className:"text-sm",children:e==null?void 0:e[i].description})]}),y.jsx("div",{className:"grid gap-y-6",children:(C=e==null?void 0:e[i].questionData)==null?void 0:C.map(A=>{var N;return y.jsx("div",{children:y.jsxs("div",{children:[Vv(A,{register:c,setValue:f,watch:h,errors:x,trigger:v,isSubmitting:b,isReadOnly:o,getValues:g}),y.jsx("div",{className:"text-xs text-red-600 mt-1",children:(N=x==null?void 0:x[A.id])==null?void 0:N.message})]})},A.id)})})]},e==null?void 0:e[i].id)}),y.jsxs("div",{className:"pt-8 flex justify-end items-center gap-4",children:[i!==0&&y.jsx(Cr,{type:"button",text:"Back",btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg",onClick:S}),i!==a-1?y.jsx(Cr,{type:"button",text:"Continue",style:{background:(w==null?void 0:w.buttonColor)||"#333"},onClick:k,btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"}):y.jsx(y.Fragment,{children:!r&&y.jsx(Cr,{isDisabled:b,isLoading:b,type:"submit",text:"Submit",style:{background:(w==null?void 0:w.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})]})]})})};function xf({answerData:e,form_data:t,ignoreValidation:r,onSubmit:n,isReadOnly:o=!1,loading:i=!1,config:s={buttonColor:"#333"}}){return m.useEffect(()=>{s&&il("config",s)},[s]),i?y.jsx(Mv,{}):t?y.jsx("div",{className:"w-full",children:y.jsx(Kv,{form_data:t,answerData:e,ignoreValidation:r,onSubmitData:n,isReadOnly:o})}):y.jsx("div",{children:y.jsx("p",{children:"Error: No form data available. Please ensure the form data is saved correctly."})})}Nt.FormBuilder=Iv,Nt.FormViewer=xf,Object.defineProperty(Nt,Symbol.toStringTag,{value:"Module"})});
68
+ active:opacity-50`,draggable:!0,children:[g.jsxs("span",{className:"flex gap-x-2 items-center",children:[g.jsx("span",{className:"text-gray-400",children:g.jsx(Me,{icon:"akar-icons:drag-vertical"})}),g.jsx("span",{className:"text-sm font-medium leading-[0]",children:i.label})]}),g.jsx("span",{style:{color:i.color},children:g.jsx(Me,{icon:i.icon,iconClass:"w-4 h-4"})})]},i.type))})})})})},Uv=p.memo(Bv),zv=({isOpen:e,onClose:t})=>{const{formData:r}=p.useContext(ft);return e?g.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:g.jsxs("div",{className:"max-w-[80vw] bg-white rounded-xl shadow-xl relative flex flex-col items-center w-full py-6 ",children:[g.jsx("button",{type:"button",onClick:t,className:"absolute top-3 right-4 text-sm",children:"Close"}),g.jsx("div",{className:"max-h-[90vh] overflow-y-auto h-full min-h-[600px] w-full",children:g.jsx(pf,{form_data:r,ignoreValidation:!0})})]})}):null};function qv(){const{addSection:e}=p.useContext(ft),[t,r]=p.useState(!1);return g.jsxs("div",{className:"px-[30px] py-[10px] flex justify-between items-center",children:[g.jsx("div",{className:"flex gap-x-4 items-center"}),t&&g.jsx(zv,{isOpen:t,onClose:()=>r(!1),element:void 0}),g.jsxs("div",{className:"py-4 flex justify-end gap-x-6 text-sm",children:[g.jsx(Or,{onClick:()=>e(),text:"Add section",btnClass:"text-gray-700 border-[#98A2B3] !font-medium bg-transparent"}),g.jsx(Or,{onClick:()=>r(!0),text:"Preview",btnClass:"text-gray-700 border-[#98A2B3] !font-medium"})]})]})}function Hv({onSubmit:e,questionData:t}){return g.jsx(cl,{children:g.jsxs("div",{className:"w-full h-screen bg-[#E4E7EC] flex flex-col",children:[g.jsx(nd,{}),g.jsx("div",{className:"border-b bg-white border-[#E4E7EC]",children:g.jsx(qv,{})}),g.jsxs("div",{className:"flex flex-1 ",children:[g.jsx("div",{className:"w-[270px] h-full border-l border-[#E4E7EC] bg-white",children:g.jsx(Uv,{})}),g.jsx("div",{className:"flex-1 h-full max-h-full p-4 z-[1]",children:g.jsx(Vv,{questionData:t})})]}),g.jsx("div",{className:"border-b bg-white border-t border-[#E4E7EC]",children:g.jsx(Am,{onSubmit:e})})]})})}const Wv=({onSubmit:e,questionData:t,isReadOnly:r,config:n={buttonColor:"#333"}})=>(p.useEffect(()=>{n&&fl("config",n)},[n]),g.jsx(Hv,{onSubmit:e,questionData:t,isReadOnly:r})),Kv=()=>(p.useEffect(()=>{const e=Jn("config"),t=(e==null?void 0:e.loaderColor)||"#333";document.documentElement.style.setProperty("--loader-color",t)},[]),g.jsx("div",{className:"h-screen w-screen flex justify-center items-center",children:g.jsx("span",{className:"loader"})})),wr={required:"This field is required",email:"Invalid email format",minLength:e=>`Minimum length is ${e}`,maxLength:e=>`Maximum length is ${e}`,minAmount:e=>`Minimum amount is ${e}`,maxAmount:e=>`Maximum amount is ${e}`},Yv=e=>({textField:de().nullable(),longText:de().nullable(),numberField:Rr().nullable().transform(r=>isNaN(r)?null:r),amountField:Rr().nullable().transform(r=>isNaN(r)?null:r),selectField:de().nullable(),checkbox:Mr().nullable(),radio:Mr().nullable(),email:de().nullable().email(wr.email),date:Ns().typeError("Invalid date").nullable()})[e]||Mr().nullable(),Jv=(e,t,r)=>t?e.type==="boolean"?e.oneOf([!0],r||wr.required):e.required(r||wr.required):e,Gv=(e,{minLength:t,maxLength:r,minLengthMessage:n,maxLengthMessage:o})=>{let i=e;return t&&(i=i.min(t,n||wr.minLength(t))),r&&(i=i.max(r,o||wr.maxLength(r))),i},Xv=(e,{minAmount:t,maxAmount:r,minAmountMessage:n,maxAmountMessage:o})=>{let i=e;return t&&(i=i.min(parseFloat(String(t)),n||wr.minAmount(t))),r&&(i=i.max(parseFloat(String(r)),o||wr.maxAmount(r))),i};function Zv(e){const t={};return e.forEach(({questionData:r})=>{r.forEach(n=>{const{id:o,type:i,isRequired:s,requiredMessage:a}=n;let l=Yv(i);l=Jv(l,s,a),i==="textField"||i==="longText"||i==="email"?l=Gv(l,n):(i==="numberField"||i==="amountField")&&(l=Xv(l,n)),t[o]=l})}),Tn().shape(t)}function Qv(e){return e.reduce((t,r)=>(t[r.id]=r.value,t),{})}const Uo=(e,t)=>{const r=cf[e.type];return r?g.jsxs("div",{children:[e.inputLabel&&g.jsx("label",{className:"block text-sm font-medium mb-[5px]",children:e.inputLabel}),g.jsx(r,{element:e,state:"edit",validationData:t})]}):null};function ew({form_data:e,options:t}){return g.jsx("div",{className:"grid gap-y-6",children:e.flatMap(r=>{var n;return(n=r.questionData)==null?void 0:n.map(o=>{var i,s;if(o.type==="grid"){const a=r.questionData.filter(l=>l.gridId===o.id);return g.jsx(Gs,{element:o,customClass:"p-0 min-h-[60px] border-none",children:a.map(l=>{var u;return g.jsx(Js,{col:(u=l.gridPosition)==null?void 0:u.col,customClass:"p-0",children:Uo(l,t)},l.id)})},o.id)}return o.gridId?null:g.jsxs("div",{className:ue("group relative grid gap-y-[6px]",o.elementClass),children:[Uo(o,t),g.jsx("div",{className:"text-xs text-red-600 mt-1",children:(s=(i=t==null?void 0:t.errors)==null?void 0:i[o.id])==null?void 0:s.message})]},o.id)})})})}function tw({form_data:e,options:t,current:r}){var n;return g.jsx("div",{className:"grid gap-y-6",children:(n=e[r].questionData)==null?void 0:n.map(o=>{var i,s;if(o.type==="grid"){const a=e[r].questionData.filter(l=>l.gridId===o.id);return g.jsx(Gs,{element:o,customClass:"p-0 min-h-[60px] border-none",children:a.map(l=>{var u;return g.jsx(Js,{col:(u=l.gridPosition)==null?void 0:u.col,customClass:"p-0",children:Uo(l,t)},l.id)})},o.id)}return o.gridId?null:g.jsxs("div",{className:ue("group relative grid gap-y-[6px]",o.elementClass),children:[Uo(o,t),g.jsx("div",{className:"text-xs text-red-600 mt-1",children:(s=(i=t==null?void 0:t.errors)==null?void 0:i[o.id])==null?void 0:s.message})]},o.id)})})}const rw=({form_data:e,answerData:t,ignoreValidation:r,onSubmitData:n,isReadOnly:o,renderType:i="multi"})=>{const[s,a]=p.useState(0),l=p.useMemo(()=>e.length,[e]),u=Zv(e),c=Ss({resolver:Cs(u),mode:"onSubmit",defaultValues:{}}),{register:f,setValue:h,watch:m,handleSubmit:d,reset:y,getValues:x,formState:{errors:b,isSubmitting:w},trigger:v}=c,E=Jn("config"),k=O=>{const j=e.flatMap(D=>D.questionData.map(N=>({id:N.id,value:O[N.id],sectionId:D.id,type:N.type})));n==null||n(j)};p.useEffect(()=>{if(t!=null&&t.length){const O=Qv(t);y(O)}},[t,y]);async function T(){var O;!r&&!await v((O=e==null?void 0:e[s].questionData)==null?void 0:O.map(D=>D.id))||a(j=>j+1)}function C(){a(O=>O-1)}return g.jsx(cl,{children:g.jsx(K0,{...c,children:g.jsxs("form",{onSubmit:d(k),className:"container mx-auto p-6",children:[g.jsx("div",{className:"relative w-full flex flex-col gap-y-12 py-4",children:g.jsxs("div",{children:[g.jsxs("div",{className:"mb-4",children:[(e==null?void 0:e[s].title)&&g.jsx("h2",{className:"text-lg font-semibold mb-[6px]",children:e[s].title}),(e==null?void 0:e[s].description)&&g.jsx("p",{className:"text-sm",children:e[s].description})]}),i==="multi"?g.jsx(tw,{form_data:e,options:{register:f,setValue:h,watch:m,errors:b,trigger:v,isSubmitting:w,isReadOnly:o,getValues:x},current:s}):g.jsx(ew,{form_data:e,options:{register:f,setValue:h,watch:m,errors:b,trigger:v,isSubmitting:w,isReadOnly:o,getValues:x}})]},e==null?void 0:e[s].id)}),g.jsxs("div",{className:"pt-8 flex justify-end items-center gap-4",children:[s!==0&&g.jsx(Or,{type:"button",text:"Back",onClick:C,btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"}),s!==l-1?g.jsx(Or,{type:"button",text:"Continue",onClick:T,style:{background:(E==null?void 0:E.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"}):!r&&g.jsx(Or,{isDisabled:w,isLoading:w,type:"submit",text:"Submit",style:{background:(E==null?void 0:E.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})]})]})})})};function pf({answerData:e,form_data:t,ignoreValidation:r,onSubmit:n,isReadOnly:o=!1,loading:i=!1,config:s={buttonColor:"#333"},renderType:a}){return p.useEffect(()=>{s&&fl("config",s)},[s]),i?g.jsx(Kv,{}):t?g.jsx("div",{className:"w-full",children:g.jsx(rw,{form_data:t,answerData:e,ignoreValidation:r,onSubmitData:n,isReadOnly:o,renderType:a})}):g.jsx("div",{children:g.jsx("p",{children:"Error: No form data available. Please ensure the form data is saved correctly."})})}Pt.FormBuilder=Wv,Pt.FormViewer=pf,Object.defineProperty(Pt,Symbol.toStringTag,{value:"Module"})});