@flarehr/tfn-declaration-app 2.40.48 → 2.42.50
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,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tfn-declaration-app.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e={725:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(601),o=n.n(r),i=n(314),s=n.n(i),a=n(417),l=n.n(a),u=new URL(n(354),n.b),c=new URL(n(764),n.b),d=new URL(n(945),n.b),f=new URL(n(608),n.b),p=s()(o()),h=l()(u),m=l()(c),$=l()(d),g=l()(f);p.push([e.id,`*,:after,:before{--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:rgba(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:rgba(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: }/*! tailwindcss v3.4.14 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;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;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height: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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url(${h});background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url(${m})}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(${$})}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(${g});background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.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}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{bottom:0;top:0}.right-0{right:0}.z-10{z-index:10}.z-50{z-index:50}.-mx-1\\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1\\.5{margin-bottom:-.375rem;margin-top:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-8{margin-bottom:2rem;margin-top:2rem}.-ml-px{margin-left:-1px}.mb-0\\.5{margin-bottom:.125rem}.mb-10{margin-bottom:2.5rem}.mb-8{margin-bottom:2rem}.ml-3{margin-left:.75rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.max-h-60{max-height:15rem}.w-1\\/2{width:50%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-auto{width:auto}.w-full{width:100%}.max-w-320{max-width:320px}.max-w-560{max-width:560px}.flex-none{flex:none}.flex-grow{flex-grow:1}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.125rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.125rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-primary-base{background-color:var(--fl-color-primary)}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-0\\.5{padding:.125rem}.p-1\\.5{padding:.375rem}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-top:.75rem}.pb-3,.py-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-inter{font-family:Inter,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.leading-3{line-height:.75rem}.leading-5{line-height:1.25rem}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-primary-base{color:var(--fl-color-primary)}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.placeholder-red-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-red-300::placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{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 rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-none,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.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))}.ring-opacity-5{--tw-ring-opacity:0.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)}.hover\\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)}.hover\\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.focus\\:z-10:focus{z-index:10}.focus\\:z-20:focus{z-index:20}.focus\\:border-primary-focus:focus{border-color:var(--fl-color-primary-focus)}.focus\\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0: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(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-1: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)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset:inset}.focus\\:ring-blue-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity))}.focus\\:ring-green-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.focus\\:ring-primary-focus:focus{--tw-ring-color:var(--fl-color-primary-focus)}.focus\\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\\:ring-red-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\\:ring-offset-blue-50:focus{--tw-ring-offset-color:#eff6ff}.focus\\:ring-offset-green-50:focus{--tw-ring-offset-color:#f0fdf4}.focus\\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\\:outline-primary-hover:focus-visible{outline-color:var(--fl-color-primary-hover)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.disabled\\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.group:hover .group-hover\\:text-primary-hover{color:var(--fl-color-primary-hover)}@media (min-width:640px){.sm\\:mb-12{margin-bottom:3rem}.sm\\:py-2{padding-bottom:.5rem;padding-top:.5rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}`,""]);const w=p},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&s[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},601:e=>{e.exports=function(e){return e[1]}},299:(e,t,n)=>{n.r(t),n.d(t,{Children:()=>z,Component:()=>a.uA,Fragment:()=>a.FK,PureComponent:()=>L,StrictMode:()=>Me,Suspense:()=>q,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>ye,cloneElement:()=>Ce,createContext:()=>a.q6,createElement:()=>a.n,createFactory:()=>xe,createPortal:()=>ne,createRef:()=>a._3,default:()=>Be,findDOMNode:()=>ke,flushSync:()=>Ae,forwardRef:()=>G,hydrate:()=>ce,isElement:()=>De,isFragment:()=>_e,isMemo:()=>Ee,isValidElement:()=>Se,lazy:()=>J,memo:()=>B,render:()=>ue,startTransition:()=>Re,unmountComponentAtNode:()=>Te,unstable_batchedUpdates:()=>Ie,useCallback:()=>E,useContext:()=>C,useDebugValue:()=>T,useDeferredValue:()=>Oe,useEffect:()=>y,useErrorBoundary:()=>k,useId:()=>I,useImperativeHandle:()=>S,useInsertionEffect:()=>Ne,useLayoutEffect:()=>b,useMemo:()=>_,useReducer:()=>v,useRef:()=>x,useState:()=>w,useSyncExternalStore:()=>Fe,useTransition:()=>Pe,version:()=>be});var r,o,i,s,a=n(172),l=0,u=[],c=a.fF,d=c.__b,f=c.__r,p=c.diffed,h=c.__c,m=c.unmount,$=c.__;function g(e,t){c.__h&&c.__h(o,e,l||t),l=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function w(e){return l=1,v(D,e)}function v(e,t,n){var i=g(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):D(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var s=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&i.__c.props===e)&&(!a||a.call(this,e,t,n))};o.u=!0;var a=o.shouldComponentUpdate,l=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}l&&l.call(this,e,t,n)},o.shouldComponentUpdate=s}return i.__N||i.__}function y(e,t){var n=g(r++,3);!c.__s&&N(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function b(e,t){var n=g(r++,4);!c.__s&&N(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function x(e){return l=5,_((function(){return{current:e}}),[])}function S(e,t,n){l=6,b((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function _(e,t){var n=g(r++,7);return N(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E(e,t){return l=8,_((function(){return e}),t)}function C(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function T(e,t){c.useDebugValue&&c.useDebugValue(t?t(e):e)}function k(e){var t=g(r++,10),n=w();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function I(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function A(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(P),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){o=null,d&&d(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$&&$(e,t)},c.__r=function(e){f&&f(e),r=0;var t=(o=e.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(P),t.__h=[],r=0)),i=o},c.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&s===c.requestAnimationFrame||((s=c.requestAnimationFrame)||R)(A)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),i=o=null},c.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||P(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],c.__e(n,e.__v)}})),h&&h(e,t)},c.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&c.__e(t,n.__v))};var M="function"==typeof requestAnimationFrame;function R(e){var t,n=function(){clearTimeout(r),M&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);M&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function P(e){var t=o;e.__c=e.__(),o=t}function N(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function D(e,t){return"function"==typeof t?t(e):t}function F(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function L(e,t){this.props=e,this.context=t}function B(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,a.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(L.prototype=new a.uA).isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,t){return F(this.props,e)||F(this.state,t)};var H=a.fF.__b;a.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),H&&H(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function G(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,a.v2)((0,a.v2)(e).map(t))},z={map:U,forEach:U,count:function(e){return e?(0,a.v2)(e).length:0},only:function(e){var t=(0,a.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:a.v2},j=a.fF.__e;a.fF.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);j(e,t,n,r)};var W=a.fF.unmount;function Y(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Y(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function q(){this.__u=0,this.t=null,this.__b=null}function Z(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,a.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function X(){this.u=null,this.o=null}a.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(q.prototype=new a.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Z(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Y(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,a.n)(a.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,a.n)(a.FK,null,t.__a?null:e.children),o]};var Q=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ee(e){return this.getChildContext=function(){return e.context},e.children}function te(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,a.XX)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,a.XX)((0,a.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,a.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new a.uA).__a=function(e){var t=this,n=Z(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Q(t,e,r)):o()};n?n(i):i()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,a.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Q(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,se=/[A-Z0-9]/g,ae="undefined"!=typeof document,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,a.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ce(e,t,n){return(0,a.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}a.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(a.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=a.fF.event;function fe(){}function pe(){return this.cancelBubble}function he(){return this.defaultPrevented}a.fF.event=function(e){return de&&(e=de(e)),e.persist=fe,e.isPropagationStopped=pe,e.isDefaultPrevented=he,e.nativeEvent=e};var me,$e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=a.fF.vnode;a.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var s=t[i];if(!("value"===i&&"defaultValue"in t&&null==s||ae&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":"translate"===l&&"no"===s?s=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||le(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":ie.test(i)&&(i=l):l=i="oninput":o&&oe.test(i)?i=i.replace(se,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",$e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var we=a.fF.__r;a.fF.__r=function(e){we&&we(e),me=e.__c};var ve=a.fF.diffed;a.fF.diffed=function(e){ve&&ve(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var ye={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:E,useContext:C,useDebugValue:T,useDeferredValue:Oe,useEffect:y,useId:I,useImperativeHandle:S,useInsertionEffect:Ne,useLayoutEffect:b,useMemo:_,useReducer:v,useRef:x,useState:w,useSyncExternalStore:Fe,useTransition:Pe}}},be="18.3.1";function xe(e){return a.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===re}function _e(e){return Se(e)&&e.type===a.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ce(e){return Se(e)?a.Ob.apply(null,arguments):e}function Te(e){return!!e.__k&&((0,a.XX)(null,e),!0)}function ke(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ie=function(e,t){return e(t)},Ae=function(e,t){return e(t)},Me=a.FK;function Re(e){e()}function Oe(e){return e}function Pe(){return[!1,Re]}var Ne=b,De=Se;function Fe(e,t){var n=t(),r=w({h:{__:n,v:t}}),o=r[0].h,i=r[1];return b((function(){o.__=n,o.v=t,Le(o)&&i({h:o})}),[e,n,t]),y((function(){return Le(o)&&i({h:o}),e((function(){Le(o)&&i({h:o})}))}),[e]),n}function Le(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Be={useState:w,useId:I,useReducer:v,useEffect:y,useLayoutEffect:b,useInsertionEffect:Ne,useTransition:Pe,useDeferredValue:Oe,useSyncExternalStore:Fe,startTransition:Re,useRef:x,useImperativeHandle:S,useMemo:_,useCallback:E,useContext:C,useDebugValue:T,version:"18.3.1",Children:z,render:ue,hydrate:ce,unmountComponentAtNode:Te,createPortal:ne,createElement:a.n,createContext:a.q6,createFactory:xe,cloneElement:Ce,createRef:a._3,Fragment:a.FK,isValidElement:Se,isElement:De,isFragment:_e,isMemo:Ee,findDOMNode:ke,Component:a.uA,PureComponent:L,memo:B,forwardRef:G,flushSync:Ae,unstable_batchedUpdates:Ie,StrictMode:Me,Suspense:q,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ye}},172:(e,t,n)=>{n.d(t,{FK:()=>S,Ob:()=>j,Qv:()=>z,XX:()=>U,_3:()=>x,fF:()=>o,n:()=>y,q6:()=>W,uA:()=>_,v2:()=>R});var r,o,i,s,a,l,u,c,d,f,p,h={},m=[],$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,n){var o,i,s,a={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return b(e,a,o,i,null)}function b(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++i:s,__i:-1,__u:0};return null==s&&null!=o.vnode&&o.vnode(a),a}function x(){return{current:null}}function S(e){return e.children}function _(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?E(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function T(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!k.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||l)(k)}function k(){var e,t,n,r,i,a,l,c;for(s.sort(u);e=s.shift();)e.__d&&(t=s.length,r=void 0,a=(i=(n=e).__v).__e,l=[],c=[],n.__P&&((r=w({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),F(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[a]:null,l,null==a?E(i):a,!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,L(l,r,c),r.__e!=a&&C(r)),s.length>t&&s.sort(u));k.__r=0}function I(e,t,n,r,o,i,s,a,l,u,c){var d,f,p,$,g,w=r&&r.__k||m,v=t.length;for(n.__d=l,A(n,t,w),l=n.__d,d=0;d<v;d++)null!=(p=n.__k[d])&&(f=-1===p.__i?h:w[p.__i]||h,p.__i=d,F(e,p,f,o,i,s,a,l,u,c),$=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&H(f.ref,null,p),c.push(p.ref,p.__c||$,p)),null==g&&null!=$&&(g=$),65536&p.__u||f.__k===p.__k?l=M(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:$&&(l=$.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=g}function A(e,t,n){var r,o,i,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?(s=r+d,(o=e.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,null):g(o)?b(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,i=null,-1!==(a=o.__i=O(o,n,s,c))&&(c--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:(a>s?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(c)for(r=0;r<u;r++)null!=(i=n[r])&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=E(i)),V(i,i))}function M(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=M(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=E(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function O(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&i===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||$.test(t)?n:n+"px"}function N(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||P(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=c,e.addEventListener(t,i?f:d,i)):e.removeEventListener(t,i?f:d,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function D(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=c++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function F(e,t,n,r,i,s,a,l,u,c){var d,f,p,h,m,$,v,y,b,x,E,C,T,k,A,M,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),s=[l=t.__e=n.__e]),(d=o.__b)&&d(t);e:if("function"==typeof R)try{if(y=t.props,b="prototype"in R&&R.prototype.render,x=(d=R.contextType)&&r[d.__c],E=d?x?x.props.value:d.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:(b?t.__c=f=new R(y,E):(t.__c=f=new _(y,E),f.constructor=R,f.render=G),x&&x.sub(f),f.props=y,f.state||(f.state={}),f.context=E,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),b&&null==f.__s&&(f.__s=f.state),b&&null!=R.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=w({},f.__s)),w(f.__s,R.getDerivedStateFromProps(y,f.__s))),h=f.props,m=f.state,f.__v=t,p)b&&null==R.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),b&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(b&&null==R.getDerivedStateFromProps&&y!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(y,E),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(y,f.__s,E)||t.__v===n.__v)){for(t.__v!==n.__v&&(f.props=y,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(y,f.__s,E),b&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,m,$)}))}if(f.context=E,f.props=y,f.__P=e,f.__e=!1,T=o.__r,k=0,b){for(f.state=f.__s,f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do{f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++k<25);f.state=f.__s,null!=f.getChildContext&&(r=w(w({},r),f.getChildContext())),b&&!p&&null!=f.getSnapshotBeforeUpdate&&($=f.getSnapshotBeforeUpdate(h,m)),I(e,g(M=null!=d&&d.type===S&&null==d.key?d.props.children:d)?M:[M],t,n,r,i,s,a,l,u,c),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),v&&(f.__E=f.__=null)}catch(e){if(t.__v=null,u||null!=s){for(t.__u|=u?160:128;l&&8===l.nodeType&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,t.__e=l}else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=B(n.__e,t,n,r,i,s,a,u,c);(d=o.diffed)&&d(t)}function L(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)H(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function B(e,t,n,i,s,a,l,u,c){var d,f,p,m,$,w,y,b=n.props,x=t.props,S=t.type;if("svg"===S?s="http://www.w3.org/2000/svg":"math"===S?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if(($=a[d])&&"setAttribute"in $==!!S&&(S?$.localName===S:3===$.nodeType)){e=$,a[d]=null;break}if(null==e){if(null===S)return document.createTextNode(x);e=document.createElementNS(s,S,x.is&&x),u&&(o.__m&&o.__m(t,a),u=!1),a=null}if(null===S)b===x||u&&e.data===x||(e.data=x);else{if(a=a&&r.call(e.childNodes),b=n.props||h,!u&&null!=a)for(b={},d=0;d<e.attributes.length;d++)b[($=e.attributes[d]).name]=$.value;for(d in b)if($=b[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=$;else if(!(d in x)){if("value"==d&&"defaultValue"in x||"checked"==d&&"defaultChecked"in x)continue;N(e,d,null,$,s)}for(d in x)$=x[d],"children"==d?m=$:"dangerouslySetInnerHTML"==d?f=$:"value"==d?w=$:"checked"==d?y=$:u&&"function"!=typeof $||b[d]===$||N(e,d,$,b[d],s);if(f)u||p&&(f.__html===p.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),I(e,g(m)?m:[m],t,n,i,"foreignObject"===S?"http://www.w3.org/1999/xhtml":s,a,l,a?a[0]:n.__k&&E(n,0),u,c),null!=a)for(d=a.length;d--;)v(a[d]);u||(d="value","progress"===S&&null==w?e.removeAttribute("value"):void 0!==w&&(w!==e[d]||"progress"===S&&!w||"option"===S&&w!==b[d])&&N(e,d,w,b[d],s),d="checked",void 0!==y&&y!==e[d]&&N(e,d,y,b[d],s))}return e}function H(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function V(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&V(r[i],t,n||"function"!=typeof e.type);n||v(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function G(e,t,n){return this.constructor(e,n)}function U(e,t,n){var i,s,a,l;o.__&&o.__(e,t),s=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],F(t,e=(!i&&n||t).__k=y(S,null,[e]),s||h,h,t.namespaceURI,!i&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:s?s.__e:t.firstChild,i,l),L(a,e,l)}function z(e,t){U(e,t,z)}function j(e,t,n){var o,i,s,a,l=w({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?o=t[s]:"ref"==s?i=t[s]:l[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),b(e.type,l,o||e.key,i||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,T(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},i=0,_.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},_.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},_.prototype.render=S,s=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,c=0,d=D(!1),f=D(!0),p=0},63:(e,t,n)=>{var r=n(299),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return a((function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})}),[e,n,t]),s((function(){return u(o)&&c({inst:o}),e((function(){u(o)&&c({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},888:(e,t,n)=>{e.exports=n(63)},945:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Ccircle cx=%278%27 cy=%278%27 r=%273%27/%3E%3C/svg%3E"},764:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0%27/%3E%3C/svg%3E"},608:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 16 16%27%3E%3Cpath stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M4 8h8%27/%3E%3C/svg%3E"},354:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3E%3Cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27m6 8 4 4 4-4%27/%3E%3C/svg%3E"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href;var r=n(299);function o(){return r.createElement("div",{},"Please wait...")}function i(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function s(e){return null!=e&&"function"==typeof e.Dispose}function a(e){s(e)&&e.Dispose()}function l(e,t){return Object.getPrototypeOf(e)?.constructor===Object.getPrototypeOf(t)?.constructor}Symbol.iterator;class u{constructor(e){this.iter=e,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function c(e){return function(e){return null!=e&&"function"==typeof e.GetEnumerator}(e)?e.GetEnumerator():new u(e[Symbol.iterator]())}function d(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"]();return{done:!t,value:t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0}}}}class f{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function p(e,t){return e.toString(10).padStart(t,"0")}function h(e){const t=e;return"number"==typeof t.offset?t.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function m(e,t){return(e=e<0&&null!=t&&10!==t?65535+e+1:e).toString(t)}function $(e,t){return(e=e<0&&null!=t&&10!==t?4294967295+e+1:e).toString(t)}class g{static id(e){return g.idMap.has(e)||g.idMap.set(e,++g.count),g.idMap.get(e)}}function w(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=33*n^e.charCodeAt(t++);return n}function v(e){return 2654435761*e|0}function y(e){let t=0;const n=e.length;for(let r=0;r<n;r++)t=(t<<5)+t^e[r];return t}function b(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return v(e);case"bigint":return function(e){return w(e.toString(32))}(e);case"string":return w(e);default:if(function(e){return null!=e&&"function"==typeof e.GetHashCode}(e))return e.GetHashCode();if(i(e))return function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=b(e[r]);return y(n)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e)?.constructor===Object){const t=Object.values(e).map((e=>b(e)));return y(t)}return v(g.id(e))}}function x(e,t,n){if(null==e)return null==t;if(null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function S(e,t){return x(e,t,_)}function _(e,t){return e===t||(null==e?null==t:null!=t&&(function(e){return null!=e&&"function"==typeof e.Equals}(e)?e.Equals(t):i(e)?i(t)&&S(e,t):"object"==typeof e&&(e instanceof Date?t instanceof Date&&0===E(e,t):Object.getPrototypeOf(e)?.constructor===Object&&function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!_(e[n[o]],t[r[o]]))return!1;return!0}(e,t))))}function E(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+h(e),r=t.getTime()+h(t)),n===r?0:n<r?-1:1}function C(e,t){return e===t?0:e<t?-1:1}function T(e,t){return function(e,t,n){if(null==e)return null==t?0:1;if(null==t)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),0!==o)return o;return 0}(e,t,k)}function k(e,t){return e===t?0:null==e?null==t?0:-1:null==t?1:function(e){return null!=e&&"function"==typeof e.CompareTo}(e)?e.CompareTo(t):i(e)?i(t)?T(e,t):-1:"object"!=typeof e?e<t?-1:1:e instanceof Date?t instanceof Date?E(e,t):-1:Object.getPrototypeOf(e)?.constructor===Object?function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,i=0;o<n.length;o++){const s=n[o];if(s!==r[o])return s<r[o]?-1:1;if(i=k(e[s],t[s]),0!==i)return i}return 0}(e,t):-1}function I(e){const t={};for(const n of e)t[n[0]]=n[1];return t}g.idMap=new WeakMap,g.count=0;const A=new WeakMap;function M(e){if(null==e)return null;const t=(t,n)=>e(t)(n);return A.set(t,e),t}function R(e){return A.get(e)??(t=>n=>e(t,n))}function O(e){if(null==e)return null;const t=(t,n,r)=>e(t)(n)(r);return A.set(t,e),t}function P(e){return A.get(e)??(t=>n=>r=>e(t,n,r))}const N=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],D=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],L=["January","February","March","April","May","June","July","August","September","October","November","December"];function B(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function H(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function V(e,t){let n=t;const r=e[t];let o="",i=!1;for(;t<e.length;){const n=e[++t];if(n===r){i=!0;break}if("\\"===n){if(!(t<e.length))throw new Error("Invalid string format");o+=e[++t]}else o+=n}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function G(e,t,n){let r=0,o=0,i="";const s=n?Y(e.getTime(),1):e;for(;r<t.length;){const e=t[r];switch(e){case"d":switch(o=B(t,r,"d"),r+=o,o){case 1:i+=J(s);break;case 2:i+=p(J(s),2);break;case 3:i+=N[re(s)];break;case 4:i+=D[re(s)]}break;case"f":if(o=B(t,r,"f"),r+=o,o<=3){const e=10**(3-o);i+=p(Math.floor(Q(s)/e),o)}else o<=7&&(i+=(""+Q(s)).padEnd(o,"0"));break;case"F":if(o=B(t,r,"F"),r+=o,o<=3){const e=10**(3-o),t=Math.floor(Q(s)/e);0!=t&&(i+=p(t,o))}else if(o<=7){const e=Q(s);0!=e&&(i+=p(e,3))}break;case"g":o=B(t,r,"g"),r+=o,o<=2&&(i+="A.D.");break;case"h":switch(o=B(t,r,"h"),r+=o,o){case 1:i+=X(s)%12;break;case 2:i+=p(X(s)%12,2)}break;case"H":switch(o=B(t,r,"H"),r+=o,o){case 1:i+=X(s);break;case 2:i+=p(X(s),2)}break;case"K":if(o=B(t,r,"K"),r+=o,1===o)switch(U(s)){case 1:i+="Z";break;case 2:i+=z(-6e4*s.getTimezoneOffset())}break;case"m":switch(o=B(t,r,"m"),r+=o,o){case 1:i+=ee(s);break;case 2:i+=p(ee(s),2)}break;case"M":switch(o=B(t,r,"M"),r+=o,o){case 1:i+=te(s);break;case 2:i+=p(te(s),2);break;case 3:i+=F[te(s)-1];break;case 4:i+=L[te(s)-1]}break;case"s":switch(o=B(t,r,"s"),r+=o,o){case 1:i+=ne(s);break;case 2:i+=p(ne(s),2)}break;case"t":switch(o=B(t,r,"t"),r+=o,o){case 1:i+=s.getHours()<12?"A":"P";break;case 2:i+=s.getHours()<12?"AM":"PM"}break;case"y":switch(o=B(t,r,"y"),r+=o,o){case 1:i+=s.getFullYear()%100;break;case 2:i+=p(s.getFullYear()%100,2);break;case 3:i+=p(s.getFullYear(),3);break;case 4:i+=p(s.getFullYear(),4);break;case 5:i+=p(s.getFullYear(),5)}break;case"z":o=B(t,r,"z"),r+=o;let a="";switch(U(s)){case 1:a="+00:00";break;case 2:a=z(-6e4*s.getTimezoneOffset());break;case 0:a=z(-6e4*Z(s).getTimezoneOffset())}const l="-"===a[0]?"-":"+",u=parseInt(a.substring(1,3),10),c=parseInt(a.substring(4,6),10);switch(o){case 1:i+=`${l}${u}`;break;case 2:i+=`${l}${p(u,2)}`;break;default:i+=`${l}${p(u,2)}:${p(c,2)}`}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[d,f]=V(t,r);i+=d,r+=f;break;case"%":const h=H(t,r);if(!(h>=0&&h!=="%".charCodeAt(0)))throw new Error("Invalid format string");r+=2,i+=G(s,String.fromCharCode(h),n);break;case"\\":const m=H(t,r);if(!(m>=0))throw new Error("Invalid format string");r+=2,i+=String.fromCharCode(m);break;default:r++,i+=e}}return i}function U(e){return e.kind||0}function z(e){const t=e<0,n=(e=Math.abs(e))%36e5/6e4;return(t?"-":"+")+p(~~(e/36e5),2)+":"+p(n,2)}function j(e,t){const n=e.toISOString();return"first"===t?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function W(e,t,n){return null!=e.offset?function(e,t){const n=new Date(e.getTime()+(e.offset??0));if("string"!=typeof t)return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+z(e.offset??0);if(1!==t.length)return G(n,t,!0);switch(t){case"D":case"d":return j(n,"first");case"T":case"t":return j(n,"second");case"O":case"o":return function(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+z(t)}(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}}(e,t):function(e,t){const n=1===e.kind;if("string"!=typeof t)return n?e.toUTCString():e.toLocaleString();if(1!==t.length)return G(e,t,n);switch(t){case"D":case"d":return n?j(e,"first"):e.toLocaleDateString();case"T":case"t":return n?j(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,t){if(t)return e.toISOString();{const t=null==e.kind||2===e.kind;return p(e.getFullYear(),4)+"-"+p(e.getMonth()+1,2)+"-"+p(e.getDate(),2)+"T"+p(e.getHours(),2)+":"+p(e.getMinutes(),2)+":"+p(e.getSeconds(),2)+"."+p(e.getMilliseconds(),3)+(t?z(-6e4*e.getTimezoneOffset()):"")}}(e,n);default:throw new Error("Unrecognized Date print format")}}(e,t)}function Y(e,t){const n=new Date(e);return n.kind=0|(null==t?0:t),n}function K(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||t(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,t=0;if(null!=o[2]){const e=o[2].split(":"),n=parseInt(e[0],10);t=3600*n+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&n<12&&(t+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const t=new Date;e=new Date(t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,t-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const t=new Date;e=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate())}n=new Date(e.getTime()+1e3*t),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}else t();isNaN(n.getTime())&&t()}return[n,r]}function q(e,t){try{return t.contents=function(e,t=!1){const[n,r]=K(e),o=null!=r?t&&"Z"===r?1:2:0;return Y(n.getTime(),o)}(e),!0}catch(e){return!1}}function Z(e){return 2===e.kind?e:Y(e.getTime(),2)}function J(e){return 1===e.kind?e.getUTCDate():e.getDate()}function X(e){return 1===e.kind?e.getUTCHours():e.getHours()}function Q(e){return 1===e.kind?e.getUTCMilliseconds():e.getMilliseconds()}function ee(e){return 1===e.kind?e.getUTCMinutes():e.getMinutes()}function te(e){return(1===e.kind?e.getUTCMonth():e.getMonth())+1}function ne(e){return 1===e.kind?e.getUTCSeconds():e.getSeconds()}function re(e){return 1===e.kind?e.getUTCDay():e.getDay()}const oe=Symbol("numeric");function ie(e){return"number"==typeof e||"bigint"==typeof e||e?.[oe]}function se(e,t){return"number"==typeof e?e*t:"bigint"==typeof e?e*BigInt(t):e[oe]().multiply(t)}function ae(e,t){return"number"==typeof e?e.toFixed(t):"bigint"==typeof e?e:e[oe]().toFixed(t)}function le(e,t){return"number"==typeof e?e.toPrecision(t):"bigint"==typeof e?e:e[oe]().toPrecision(t)}function ue(e,t){return"number"==typeof e?e.toExponential(t):"bigint"==typeof e?e:e[oe]().toExponential(t)}function ce(e){return"number"==typeof e?(Number(e)>>>0).toString(16):"bigint"==typeof e?BigInt.asUintN(64,e).toString(16):e[oe]().toHex()}function de(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fe(e,t,n=0){if(null==t)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,i=-1;for(;null!=(o=e.exec(t));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}function pe(e,t=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let t=0,n="[";for(const r of e){if(0===t)n+=pe(r);else{if(100===t){n+="; ...";break}n+="; "+pe(r)}t++}return n+"]"}(e);{const n=Object.getPrototypeOf(e)?.constructor;return n===Object&&t<10?"{ "+Object.entries(e).map((([e,n])=>e+" = "+pe(n,t+1))).join("\n ")+" }":n?.name??""}}return String(e)}class he{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,t){if(0===t.length)return e;{let n,r=!0;return 1===t.length?(n=pe(t[0]),r=n.indexOf(" ")>=0):n=t.map((e=>pe(e))).join(", "),e+(r?" (":" ")+n+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>b(e)));return e.splice(0,0,v(this.tag)),y(e)}Equals(e){return this===e||!!l(this,e)&&this.tag===e.tag&&S(this.fields,e.fields)}CompareTo(e){return this===e?0:l(this,e)?this.tag===e.tag?T(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class me{toJSON(){return function(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}(this)}toString(){return function(e){return"{ "+Object.entries(e).map((([e,t])=>e+" = "+pe(t))).join("\n ")+" }"}(this)}GetHashCode(){return function(e){const t=Object.values(e).map((e=>b(e)));return y(t)}(this)}Equals(e){return function(e,t){if(e===t)return!0;if(l(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!_(e[n[r]],t[n[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,t){if(e===t)return 0;if(l(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=k(e[n[r]],t[n[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class $e{get contents(){return this.getter()}set contents(e){this.setter(e)}constructor(e,t){"function"==typeof t?(this.getter=e,this.setter=t):(this.getter=()=>e,this.setter=t=>{e=t})}}class ge{constructor(e){this.message=e}}function we(e){return function(e){return e instanceof ge||e instanceof Error}(e)||function(e){return e instanceof Promise}(e)?e:new Error(String(e))}const ve=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,ye=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function be(e,t){return function(e,t){return"number"==typeof e||"bigint"==typeof e?e<t?-1:e>t?1:0:e.CompareTo(t)}(e,t)<0}function xe(e){return{input:e,cont:(t=e,e=>{ve.lastIndex=0;const n=[],r=[];let o=0,i=ve.exec(t);for(;i;){const e=i.index+(i[1]||"").length;n.push(t.substring(o,e).replace(/%%/g,"%")),r.push(i),o=ve.lastIndex,ve.lastIndex-=1,i=ve.exec(t)}return 0===n.length?e(t.replace(/%%/g,"%")):(n.push(t.substring(o).replace(/%%/g,"%")),Te(e,n,r))})};var t}function Se(e,t){return"string"==typeof t?e(t):t.cont(e)}function _e(e){return Se((e=>e),e)}function Ee(e){return Se((e=>{throw new Error(e)}),e)}function Ce(e,t,n,r,o){let i="";if(t=t||"",o=o||"",ie(e))switch("x"!==o.toLowerCase()&&(be(e,0)?(e=se(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=ae(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?le(e,r):le(e);break;case"e":case"E":e=null!=r?ue(e,r):ue(e);break;case"x":e=ce(e);break;case"X":e=ce(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?W(e):pe(e);if(n="number"==typeof n?n:parseInt(n,10),isNaN(n))e=i+e;else{const r=t.indexOf("0")>=0,o=t.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=Ae(e,n-i.length,s,o)):Ae(i+e,n,s,o)}return e}function Te(e,t,n,r="",o=-1){return(...i)=>{let s=r;const a=t.slice(),l=n.slice();for(const e of i){const[,,t,n,r,i]=l[0];let u=n;if(o>=0)u=o,o=-1;else if("*"===u){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=a[0],s+=Ce(e,t,u,r,i),a.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=a[0],e(s)):Te(e,a,l,s,o)}}function ke(e){return"string"!=typeof e||/^\s*$/.test(e)}function Ie(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function Ae(e,t,n,r){n=n||" ",t-=e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function Me(e,t,n){return Ae(e,t,n)}function Re(e,t,n,r){if(r="number"==typeof r?r:0,(n="number"==typeof n?n:void 0)&&n<0)throw new Error("Count cannot be less than zero");if(0===n)return[];const o=!(1&~r),i=!(2&~r);t=(t=t||[]).filter((e=>e)).map(de),t=t.length>0?t:["\\s"];const s=[],a=new RegExp(t.join("|"),"g");let l=!0,u=0;do{const t=a.exec(e);if(null===t){const t=i?e.substring(u).trim():e.substring(u);(!o||t.length>0)&&s.push(t),l=!1}else{const r=i?e.substring(u,t.index).trim():e.substring(u,t.index);(!o||r.length>0)&&(null!=n&&s.length+1===n?(s.push(i?e.substring(u).trim():e.substring(u)),l=!1):s.push(r)),u=a.lastIndex}}while(l);return s}function Oe(e,t){return t.split("").filter((t=>e(t))).join("")}function Pe(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=n?e.substr(t,n):e.substr(t)}var Ne=n(725);class De{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return b(this.value)}Equals(e){return null!=e&&_(this.value,e instanceof De?e.value:e)}CompareTo(e){return null==e?1:k(this.value,e instanceof De?e.value:e)}}function Fe(e){if(null==e)throw new Error("Option has no value");return e instanceof De?e.value:e}function Le(e){return e instanceof De?e.value:e}function Be(e){return null==e||e instanceof De?new De(e):e}function He(e){return null==e?void 0:e}function Ve(e){return null==e?null:Fe(e)}function Ge(e){return null==e?[]:[Fe(e)]}function Ue(e,t){return null!=e?Fe(e):t}function ze(e,t){return null!=t?Be(e(Fe(t))):void 0}const je="Collection was empty.";function We(e,t){return"function"==typeof e?new e(t):new Array(t)}function Ye(e,t,n,r){const o=0|t;return e.fill(r,o,o+n)}function Ke(e,t,n){const r=0|t.length,o=We(n,r);for(let n=0;n<=r-1;n++)Qe(o,n,e(Xe(n,t)));return o}function qe(e,t,n){return function(e,t,n,r,o){const i=0|Ue(n,0),s=0|Ue(ze((e=>i+e),r),e.length);return 0|(n=>{for(;;){const r=n;if(r>=s)return-1;if(o.Equals(t,Xe(r,e)))return 0|r;n=r+1}})(i)}(t,e,void 0,void 0,n)>=0}function Ze(e,t,n){const r=e;return n.reduce(r,t)}function Je(e,t,n){if(null==t)return null==n;if(null==n)return!1;{let r=0,o=!0;const i=0|t.length,s=0|n.length;if(i>s)return!1;if(i<s)return!1;for(;r<i&&o;)o=e(Xe(r,t),Xe(r,n)),r=r+1|0;return o}}function Xe(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Qe(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function et(e,t,n){return t.reduceRight(((t,n)=>e(n,t)),n)}class tt extends me{constructor(e,t){super(),this.head=e,this.tail=t}toString(){return"["+Ie("; ",this)+"]"}Equals(e){return this===e||((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Fe(o),a=Fe(i);if(_(n.head,r.head)){e=s,t=a;continue e}return!1}return!1}return null==i}})(this,e)}GetHashCode(){return 0|((e,t,n)=>{for(;;){const r=e,o=t,i=n,s=i.tail;if(null==s)return 0|o;{const a=Fe(s);if(r>18)return 0|o;e=r+1,t=(o<<1)+b(i.head)+631*r,n=a}}})(0,0,this)}toJSON(){return Array.from(this)}CompareTo(e){return 0|((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Fe(o),a=Fe(i),l=0|k(n.head,r.head);if(0===l){e=s,t=a;continue e}return 0|l}return 1}return null!=i?-1:0}})(this,e)}GetEnumerator(){return new nt(this)}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return c(this)}}class nt{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,t=e.it.tail;if(null!=t){const n=Fe(t);return e.current=e.it.head,e.it=n,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function rt(){return new tt(null,void 0)}function ot(e,t){return new tt(e,t)}function it(e){return null==e.tail}function st(e){return 0|((e,t)=>{for(;;){const n=e,r=t.tail;if(null==r)return 0|n;e=n+1,t=Fe(r)}})(0,e)}function at(e){if(null!=e.tail)return e.head;throw new Error(je+"\\nParameter name: list")}function lt(e){const t=e.tail;if(null!=t)return Fe(t);throw new Error(je+"\\nParameter name: list")}function ut(){return rt()}function ct(e,t){return ot(e,t)}function dt(e){return ot(e,rt())}function ft(e){return it(e)}function pt(e){return at(e)}function ht(e){return lt(e)}function mt(e){const t=0|st(e),n=Ye(new Array(t),0,t,null);return((e,t)=>{for(;;){const r=e,o=t;if(it(o))break;Qe(n,r,at(o)),e=r+1,t=lt(o)}})(0,e),n}function $t(e,t,n){let r=t,o=n;for(;!it(o);)r=e(r,pt(o)),o=lt(o);return r}function gt(e){return $t(((e,t)=>ot(t,e)),rt(),e)}function wt(e,t){$t(((t,n)=>{e(n)}),void 0,t)}function vt(e,t){let n=t;for(let t=e.length-1;t>=0;t--)n=ot(Xe(t,e),n);return n}function yt(e){return vt(e,rt())}function bt(e,t){return $t(((e,t)=>ot(t,e)),t,gt(e))}function xt(e,t){const n=rt(),r=$t(((t,n)=>{const r=new tt(e(n),void 0);return t.tail=r,r}),n,t),o=rt();return r.tail=o,lt(n)}function St(e,t){const n=rt(),r=$t(((t,n)=>{if(e(n)){const e=new tt(n,void 0);return t.tail=e,e}return t}),n,t),o=rt();return r.tail=o,lt(n)}function _t(e,t){const n=rt(),r=$t(((t,n)=>{const r=e(n);if(null==r)return t;{const e=new tt(Fe(r),void 0);return t.tail=e,e}}),n,t),o=rt();return r.tail=o,lt(n)}const Et=r.default,Ct=pe(Ne.A),Tt=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=dt((0,r.createElement)("path",I(dt((e="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z",["d","M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"])))));return["children",Et.Children.toArray(Array.from(t))]})()]))),kt=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=dt((0,r.createElement)("path",I(yt([(e="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",["d","M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"]),["fill-rule","evenodd"],["clipRule","evenodd"]]))));return["children",Et.Children.toArray(Array.from(t))]})()]))),It=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=dt((0,r.createElement)("path",{d:"M18 12H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",Et.Children.toArray(Array.from(e))]})()]))),At=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=dt((0,r.createElement)("path",{d:"M12 6v6m0 0v6m0-6h6m-6 0H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",Et.Children.toArray(Array.from(e))]})()]))),Mt=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=dt((0,r.createElement)("path",I(yt([["fill-rule","evenodd"],(e="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",["d","M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",Et.Children.toArray(Array.from(t))]})()]))),Rt=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-5","w-5","text-gray-400"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=dt((0,r.createElement)("path",I(yt([["fill-rule","evenodd"],(e="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",["d","M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",Et.Children.toArray(Array.from(t))]})()]))),Ot=(0,r.createElement)("svg",I(yt([["className",Ie(" ",["h-5","w-5","text-amber-400","flex-none"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=dt((0,r.createElement)("path",I(yt([["fill-rule","evenodd"],(e="M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z",["d","M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z"]),["clipRule","evenodd"]]))));return["children",Et.Children.toArray(Array.from(t))]})()]))),Pt=yt(["flex","flex-col","align-center"]),Nt="The input sequence has an insufficient number of elements.";function Dt(){throw new Error("Enumeration has not started. Call MoveNext.")}function Ft(){throw new Error("Enumeration already finished.")}class Lt{constructor(e){this.f=e}toString(){let e=0,t="seq [";const n=c(this);try{for(;e<4&&n["System.Collections.IEnumerator.MoveNext"]();)e>0&&(t+="; "),t+=pe(n["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(t+="; ..."),t+"]"}finally{a(n)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Bt{constructor(e,t,n){this.current=e,this.next=t,this.dispose=n}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function Ht(e,t,n){return new Bt(e,t,n)}function Vt(e,t,n){let r,o=!1,i=Be(e());const s=()=>{if(null!=i){const e=Fe(i);try{n(e)}finally{i=void 0}}},a=()=>{try{s()}finally{r=void 0}};return Ht((()=>(o||Dt(),null!=r?Fe(r):Ft())),(()=>{if(o||(o=!0),null!=i){const e=Fe(i);let n;try{n=t(e)}catch(e){throw a(),e}return null!=n?(r=n,!0):(a(),!1)}return!1}),s)}function Gt(e){return function(e){return new Lt(e)}(e)}function Ut(e){return t="source",null==e&&function(e){throw new Error(e)}(t),c(e);var t}function zt(e){return Gt((()=>c(e())))}function jt(e){return Gt((()=>function(e){let t,n,r,o=!1,i=!1;const s=()=>{if(i=!0,null!=n){const e=Fe(n);try{a(e)}finally{n=void 0}}if(null!=t){const e=Fe(t);try{a(e)}finally{t=void 0}}};return Ht((()=>(o?i&&Ft():Dt(),null!=r?Fe(r):Ft())),(()=>{let l;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=t;if(null!=i)if(null!=n){const e=Fe(n);if(e["System.Collections.IEnumerator.MoveNext"]())r=Be(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{a(e)}finally{n=void 0}}else{const e=Fe(i);e["System.Collections.IEnumerator.MoveNext"]()?(l=e["System.Collections.Generic.IEnumerator`1.get_Current"](),n=c(l)):(s(),o=!1)}else t=c(e)}return Fe(o)}}),(()=>{i||s()}))}(e)))}function Wt(){return zt((()=>new Array(0)))}function Yt(e){return zt((()=>function(e){const t=We(void 0,1);return Qe(t,0,e),t}(e)))}function Kt(e){return e instanceof tt?mt(e):Array.from(e)}function qt(e){return i(e)?yt(e):e instanceof tt?e:function(e){let t,n;if(i(e))return yt(e);if(e instanceof tt)return e;{const r=rt();let o=r;const i=c(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();t=o,n=new tt(e,void 0),t.tail=n,o=n}}finally{a(i)}const s=o,l=rt();return s.tail=l,lt(r)}}(e)}function Zt(e,t,n){return Gt((()=>Vt(e,t,n)))}function Jt(e,t,n){return Gt((()=>{let r=-1;return Vt(e,(e=>(r=r+1|0,t(r,e))),n)}))}function Xt(e,t){return jt([e,t])}function Qt(e,t,n){const r=Ut(t);try{let t=!1;for(;!t&&r["System.Collections.IEnumerator.MoveNext"]();)t=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{a(r)}}function en(e,t){return function(e,t){return Zt((()=>Ut(t)),(t=>{let n;for(;null==n&&t["System.Collections.IEnumerator.MoveNext"]();)n=e(t["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}),(e=>{a(e)}))}((t=>e(t)?Be(t):void 0),t)}function tn(e,t,n){const r=Ut(n);try{let n=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)n=e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{a(r)}}function nn(e,t){tn(((t,n)=>{e(n)}),void 0,t)}function rn(e,t){return Zt((()=>Ut(t)),(t=>t["System.Collections.IEnumerator.MoveNext"]()?Be(e(t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{a(e)}))}function on(e){return zt((()=>function(e){return e.slice().reverse()}(Kt(e))))}function sn(e,t){return Gt((()=>{const n=Ut(t);try{for(let t=1;t<=e;t++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Nt+"\\nParameter name: source");return function(e,t){return Ht((()=>t["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>t["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{a(t)}finally{e()}}))}((()=>{}),n)}catch(e){throw a(n),e}}))}function an(e,t){return zt((()=>jt(rn(e,t))))}function ln(e){return{Dispose(){e()}}}function un(e){const t=Et.useRef(!1);Et.useEffect((()=>{t.current||(t.current=!0,e())}),[])}function cn(e){const t=Et.useRef(void 0),n=Et.useRef(!1),o=Et.useRef(!1);var i,s;n.current&&(o.current=!0),i=()=>{return r=n.current?void 0:(n.current=!0,t.current=Be(e()),o.current?t.current:void 0),{Dispose(){nn((e=>{a(e)}),Ge(r))}};var r},s=[],(0,r.useEffect)((()=>{const e=i();return()=>{e.Dispose()}}),s)}function dn(e){const t=Et.useRef(e),n=Et.useCallback((e=>t.current(e)),[]);var o;return o=n=>(t.current=e,ln((()=>{}))),(0,r.useLayoutEffect)((()=>{const e=o();return()=>{e.Dispose()}})),n}Symbol.iterator;class fn{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const t=this._id;return this._listeners.set(this._id++,e),t}removeListener(e){return this._listeners.delete(e)}register(e,t){const n=this,r=this.addListener(null==t?e:()=>e(t));return{Dispose(){n.removeListener(r)}}}Dispose(){}}class pn extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,pn.prototype)}}class hn{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>hn.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function mn(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new pn);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack((()=>{try{e(t)}catch(e){t.onError(we(e))}}));else try{e(t)}catch(e){t.onError(we(e))}}}const $n=new class{Bind(e,t){return function(e,t){return mn((n=>{e({onSuccess:e=>{try{t(e)(n)}catch(e){n.onError(we(e))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})}))}(e,t)}Combine(e,t){return this.Bind(e,(()=>t))}Delay(e){return mn((t=>e()(t)))}For(e,t){const n=e[Symbol.iterator]();let r=n.next();return this.While((()=>!r.done),this.Delay((()=>{const e=t(r.value);return r=n.next(),e})))}Return(e){return function(e){return mn((t=>t.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,t){return mn((n=>{e({onSuccess:e=>{t(),n.onSuccess(e)},onError:e=>{t(),n.onError(e)},onCancel:e=>{t(),n.onCancel(e)},cancelToken:n.cancelToken,trampoline:n.trampoline})}))}TryWith(e,t){return mn((n=>{e({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline,onError:e=>{try{t(e)(n)}catch(e){n.onError(we(e))}}})}))}Using(e,t){return this.TryFinally(t(e),(()=>e.Dispose()))}While(e,t){return e()?this.Bind(t,(()=>this.While(e,t))):this.Return(void 0)}Zero(){return mn((e=>e.onSuccess(void 0)))}};function gn(e){}function wn(e){const t=new fn("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout((()=>{t.cancel()}),e),t}function vn(e){e.cancel()}const yn=new fn;function bn(e){return mn((t=>{let n;const r=setTimeout((()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)}),e);n=t.cancelToken.addListener((()=>{clearTimeout(r),t.onCancel(new pn)}))}))}function xn(e,t){return function(e,t){return function(e,t,n,r,o){"function"!=typeof t&&(o=t,t=void 0);const i=new hn;e({onSuccess:t||gn,onError:n||gn,onCancel:r||gn,cancelToken:o||yn,trampoline:i})}(e,t)}(e,t)}class Sn extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function _n(e,t){let n;const r=wn();return n=Et.useRef(r),cn((()=>ln((()=>{vn(n.current)})))),dn((r=>{var o;null!=(o=n.current)&&o.isCancelled||xn($n.Delay((()=>$n.TryWith($n.Delay((()=>(t(new Sn(1,[])),$n.Bind(e(r),(e=>(t(new Sn(2,[e])),$n.Zero())))))),(e=>(t(new Sn(3,[e])),$n.Zero()))))),n.current)}))}class En extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class Cn extends he{constructor(e,t){super(),this.tag=0,this.fields=[e,t]}cases(){return["Header"]}}class Tn extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Empty","Text","Binary","Form"]}}class kn extends me{constructor(e,t,n,r,o,i,s,a){super(),this.url=e,this.method=t,this.headers=n,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=a}}class In extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class An extends me{constructor(e,t,n,r,o,i){super(),this.statusCode=0|e,this.responseText=t,this.responseType=n,this.responseUrl=r,this.responseHeaders=o,this.content=i}}class Mn{constructor(e,t){this.k=e,this.v=t}}function Rn(e,t){return new Mn(e,t)}function On(e){return e.k}function Pn(e){return e.v}class Nn extends Mn{constructor(e,t,n,r,o){super(e,t),this.left=n,this.right=r,this.h=0|o}}function Dn(e,t,n,r,o){return new Nn(e,t,n,r,o)}function Fn(e){return e.left}function Ln(e){return e.right}function Bn(e){return e.h}function Hn(e,t){e:for(;;){const n=e;if(null!=t){const r=Fe(t);if(r instanceof Nn){const o=r;e=Hn(n+1,Fn(o)),t=Ln(o);continue e}return n+1|0}return 0|n}}function Vn(e){return Hn(0,e)}function Gn(e,t,n,r){let o,i,s,a;if(null!=e){const t=Fe(e);s=t instanceof Nn?(o=t,Bn(o)):1}else s=0;if(null!=r){const e=Fe(r);a=e instanceof Nn?(i=e,Bn(i)):1}else a=0;const l=0|(s<a?a:s);return 0===l?Rn(t,n):Dn(t,n,e,r,l+1)}function Un(e,t,n,r){let o,i,s,a,l,u,c,d,f,p;if(null!=e){const t=Fe(e);f=t instanceof Nn?(o=t,Bn(o)):1}else f=0;if(null!=r){const e=Fe(r);p=e instanceof Nn?(i=e,Bn(i)):1}else p=0;if(p>f+2){const o=Fe(r);if(o instanceof Nn){const r=o;if(s=Fn(r),(null!=s?(a=Fe(s),a instanceof Nn?(l=a,Bn(l)):1):0)>f+1){const o=Fe(Fn(r));if(o instanceof Nn){const i=o;return Gn(Gn(e,t,n,Fn(i)),On(i),Pn(i),Gn(Ln(i),On(r),Pn(r),Ln(r)))}throw new Error("internal error: Map.rebalance")}return Gn(Gn(e,t,n,Fn(r)),On(r),Pn(r),Ln(r))}throw new Error("internal error: Map.rebalance")}if(f>p+2){const o=Fe(e);if(o instanceof Nn){const e=o;if(u=Ln(e),(null!=u?(c=Fe(u),c instanceof Nn?(d=c,Bn(d)):1):0)>p+1){const o=Fe(Ln(e));if(o instanceof Nn){const i=o;return Gn(Gn(Fn(e),On(e),Pn(e),Fn(i)),On(i),Pn(i),Gn(Ln(i),t,n,r))}throw new Error("internal error: Map.rebalance")}return Gn(Fn(e),On(e),Pn(e),Gn(Ln(e),t,n,r))}throw new Error("internal error: Map.rebalance")}return Gn(e,t,n,r)}function zn(e,t,n,r){if(null!=r){const o=Fe(r),i=0|e.Compare(t,On(o));if(o instanceof Nn){const r=o;return i<0?Un(zn(e,t,n,Fn(r)),On(r),Pn(r),Ln(r)):0===i?Dn(t,n,Fn(r),Ln(r),Bn(r)):Un(Fn(r),On(r),Pn(r),zn(e,t,n,Ln(r)))}return i<0?Dn(t,n,void 0,r,2):0===i?Rn(t,n):Dn(t,n,r,void 0,2)}return Rn(t,n)}function jn(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Fe(n),s=0|r.Compare(o,On(i));if(0===s)return Be(Pn(i));if(i instanceof Nn){const a=i;e=r,t=o,n=s<0?Fn(a):Ln(a);continue e}return}return}}function Wn(e,t,n,r,o){return t(n,r)?zn(e,n,r,o):o}function Yn(e,t,n,r){e:for(;;){const o=e,i=t,s=r;if(null!=n){const a=Fe(n);if(a instanceof Nn){const l=a,u=Yn(o,i,Fn(l),s),c=Wn(o,i,On(l),Pn(l),u);e=o,t=i,n=Ln(l),r=c;continue e}return Wn(o,i,On(a),Pn(a),s)}return s}}function Kn(e,t,n){return Yn(e,t,n,void 0)}function qn(e,t){e:for(;;){const n=e;if(null!=t){const r=Fe(t);if(r instanceof Nn){const o=r;qn(n,Fn(o)),n(On(o),Pn(o)),e=n,t=Ln(o);continue e}n(On(r),Pn(r))}break}}function Zn(e,t){qn(e,t)}function Jn(e,t){if(null!=t){const n=Fe(t);if(n instanceof Nn){const t=n,r=Jn(e,Fn(t)),o=e(On(t),Pn(t)),i=Jn(e,Ln(t));return Dn(On(t),o,r,i,Bn(t))}return Rn(On(n),e(On(n),Pn(n)))}}function Xn(e,t){return Jn(e,t)}function Qn(e,t){if(i(t))return function(e,t){let n;for(let r=0;r<=t.length-1;r++){const o=Xe(r,t);n=zn(e,o[0],o[1],n)}return n}(e,t);if(t instanceof tt)return function(e,t){return $t(((t,n)=>zn(e,n[0],n[1],t)),void 0,t)}(e,t);{const n=c(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=zn(r,s[0],s[1],o),n=i}}}(e,void 0,n)}finally{a(n)}}}class er extends me{constructor(e,t){super(),this.stack=e,this.started=t}}function tr(e){e:for(;;){const t=e;if(ft(t))return ut();{const n=ht(t),r=pt(t);if(null!=r){const o=Fe(r);if(o instanceof Nn){const t=o;e=vt([Fn(t),Rn(On(t),Pn(t)),Ln(t)],n);continue e}return t}e=n;continue e}}}function nr(e){return new er(tr(dt(e)),!1)}function rr(e){if(e.started){const t=e.stack;if(ft(t))return function(){throw new Error("enumeration already finished")}();if(null!=pt(t)){const e=Fe(pt(t));if(e instanceof Nn)throw new Error("Please report error: Map iterator, unexpected stack for current");return[On(e),Pn(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function or(e){let t=nr(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>rr(t),"System.Collections.IEnumerator.get_Current":()=>rr(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(ft(t))return!1;if(null!=pt(t)){if(Fe(pt(t))instanceof Nn)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=tr(ht(t)),!ft(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!ft(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=nr(e)},Dispose(){}}}class ir{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){const t=(e,t)=>(e<<1)+t+631;let n=0;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=0|t(n,b(e[0])),n=0|t(n,b(e[1]))}}finally{a(r)}return 0|n}(this)}Equals(e){if(!(e instanceof ir))return!1;{const t=e,n=c(this);try{const e=c(t);try{const t=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!_(r[0],o[0])||!_(r[1],o[1]))&&t()}return!0}return!1};return t()}finally{a(e)}}finally{a(n)}}}toString(){return"map ["+Ie("; ",rn((e=>function(e,...t){let n;return"object"==typeof e?(n=String(t[0]),t.shift()):n=e,n.replace(ye,((e,n,r,o,i,s)=>{if(n<0||n>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let a=t[n];if(ie(a))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":a=ae(a,i=null!=i?i:2);break;case"g":case"G":a=null!=i?le(a,i):le(a);break;case"e":case"E":a=null!=i?ue(a,i):ue(a);break;case"p":case"P":i=null!=i?i:2,a=ae(se(a,100),i)+" %";break;case"d":case"D":a=null!=i?Me(String(a),i,"0"):String(a);break;case"x":case"X":a=null!=i?Me(ce(a),i,"0"):ce(a),"X"===o&&(a=a.toUpperCase());break;default:if(s){let e="";a=s.replace(/([0#,]+)(\.[0#]+)?/,((t,n,r)=>{be(a,0)&&(a=se(a,-1),e="-"),r=null==r?"":r.substring(1),a=ae(a,Math.max(r.length,0));let[o,i]=a.split(".");i||(i=""),o=Me(o,n.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,t){return Ae(e,t,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),n.indexOf(",")>0){const e=o.length%3,t=Math.floor(o.length/3);let n=e>0?o.substr(0,e)+(t>0?",":""):"";for(let r=0;r<t;r++)n+=o.substr(e+3*r,3)+(r<t-1?",":"");o=n}return i.length>0?o+"."+i:o})),a=e+a}}else a=a instanceof Date?W(a,s||o):pe(a);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(a=Ae(String(a),Math.abs(r)," ",r<0)),a}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){return Array.from(this)}GetEnumerator(){return or(this.tree)}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return or(this.tree)}CompareTo(e){const t=this;if(e instanceof ir)return 0|function(e,t,n){const r=Ut(t);try{const t=Ut(n);try{let n=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]();for(;0===n&&o&&i;)n=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),t["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===n&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==n?n:o?1:i?-1:0)}finally{a(t)}}finally{a(r)}}(((e,n)=>{const r=0|t.comparer.Compare(e[0],n[0]);return 0|(0!==r?r:k(e[1],n[1]))}),t,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return ur(this,e[0])&&_(ar(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){!function(e,t,n){let r=n;Zn(((e,n)=>{Qe(t,r,[e,n]),r=r+1|0}),e)}(this.tree,e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|lr(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|lr(this)}get size(){return 0|lr(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return rn((e=>[e[0],e[1]]),this)}get(e){return ar(this,e)}has(e){return ur(this,e)}keys(){return rn((e=>e[0]),this)}set(e,t){throw new Error("Map cannot be mutated")}values(){return rn((e=>e[1]),this)}forEach(e,t){const n=this;nn((t=>{e(t[1],t[0],n)}),n)}}function sr(e,t){return new ir(e,t)}function ar(e,t){return function(e,t,n){const r=jn(e,t,n);if(null==r)throw new Error;return Fe(r)}(e.comparer,t,e.tree)}function lr(e){return Vn(e.tree)}function ur(e,t){return function(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Fe(n),s=0|r.Compare(o,On(i));if(i instanceof Nn){const a=i;if(s<0){e=r,t=o,n=Fn(a);continue e}if(0===s)return!0;e=r,t=o,n=Ln(a);continue e}return 0===s}return!1}}(e.comparer,t,e.tree)}function cr(e,t,n){return function(e,t,n){return sr(e.comparer,zn(e.comparer,t,n,e.tree))}(n,e,t)}function dr(e,t){return function(e,t){return jn(e.comparer,t,e.tree)}(t,e)}function fr(e,t){return r=e,sr((n=t).comparer,Xn(r,n.tree));var n,r}function pr(e,t){return sr(t,Qn(t,e))}function hr(e){return function(e){return sr(e,void 0)}(e)}const mr=new kn("",new En(0,[]),ut(),!1,void 0,void 0,void 0,new Tn(0,[]));function $r(e,t){return"string"!=typeof(n=t)||0===n.length?new Array(0):Re(t,[e],void 0,0);var n}function gr(e){return new kn(e,mr.method,mr.headers,mr.withCredentials,mr.overridenMimeType,mr.overridenResponseType,mr.timeout,mr.content)}function wr(e,t){return new kn(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function vr(e,t){return new kn(t.url,t.method,bt(t.headers,dt(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function yr(e){return t=t=>{const n=new XMLHttpRequest;n.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),n.onreadystatechange=()=>{let e,r,o,i,s,a,l;var u,c;4===n.readyState&&t[0]((r=n.responseType,e=""===r||"text"===r?n.responseText:"",o=0|n.status,i=n.responseType,a=n.responseType,s=""===a||"text"===a?new In(0,[n.responseText]):new In("arraybuffer"===a?2:"blob"===a?1:3,[n.response]),u=function(e,t,n){const r=[];for(let n=0;n<=t.length-1;n++){const o=e(Xe(n,t));if(null!=o){const e=Fe(o);r.push(e)}}return _(n,null)?r:Ke((e=>e),r,n)}((e=>{const t=yt($r(":",e));return ft(t)?void 0:[pt(t).toLocaleLowerCase(),Ie(":",ht(t)).trim()]}),$r("\r\n",n.getAllResponseHeaders())),l=sr(c={Compare:C},Qn(c,u)),new An(o,e,i,n.responseURL,l,s)))};const r=c(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(e.fields[0],e.fields[1])}}finally{a(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;n.overrideMimeType(e)}const i=e.overridenResponseType;if(null==i);else switch(i.tag){case 1:n.responseType="blob";break;case 2:n.responseType="arraybuffer";break;default:n.responseType="text"}const s=e.timeout;if(null==s);else{const e=0|s;n.timeout=0|e}const l=e.content;switch(l.tag){case 1:case 3:case 2:n.send(Be(l.fields[0]));break;default:n.send()}},mn((e=>t([e.onSuccess,e.onError,e.onCancel])));var t}function br(e){return new xr(1,[e])}new An(0,"","","",hr({Compare:C}),new In(0,[""]));class xr extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Ok","Error"]}}function Sr(e,t){return 0===t.tag?(n=e(t.fields[0]),new xr(0,[n])):br(t.fields[0]);var n}class _r extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class Er extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class Cr{constructor(){this.cache=new Map([])}}function Tr(){return new Cr}function kr(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Ir(e,t){switch(e.tag){case 2:return function(e,t,n,r,o=0){if("string"==typeof e){const n=e;e=function(e,t=0){if(-284&t)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=1&t?"i":"",n+=2&t?"m":"",n+=16&t?"s":"",new RegExp(e,n)}(t,r??0),t=n,r=void 0}if("function"==typeof n)return r=null==r?-1:r,t.substring(0,o)+t.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const t=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)t.push(arguments[e]);t.index=arguments[s++],t.input=arguments[s++],i&&(t.groups=arguments[s]),e=n(t)}return e}));if(n=n.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=t.substring(o),a=fe(e,s),l=fe.length>r?(i=a[r-1],s.substring(0,i.index+i[0].length)):s;return t.substring(0,o)+l.replace(e,n)+t.substring(o+l.length)}return t.replace(e,n)}(kr(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return kr(t)}}Tr(),Tr();const Ar=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Mr=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Rr=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Or(e,t){try{return t.contents=function(e){function t(e){return e.replace(Mr,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(Ar.test(n))return function(e,...t){if(0===t.length)return e.trim();const n="["+de(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}(n,"{","}","(",")");if(Mr.test(n))return t(n);if(Rr.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch{return!1}}var Pr;function Nr(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function Dr(e,t,n,r,o){const i=function(e,t,n){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;n=n||function(e,t){if(t&Pr.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,t);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(n);if(!i.test(o))return function(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}(r,n)}return null}(e,t,o);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[t,o]=Nr(!0,r);!n&&10!==i.radix&&e>=t&&e<=o&&(e=e<<32-r>>32-r);const[s,a]=Nr(n,r);if(e>=s&&e<=a)return e}}throw new Error(`The input string ${e} was not in a correct format.`)}function Fr(e,t,n,r,o){try{return o.contents=Dr(e,t,n,r),!0}catch{return!1}}function Lr(e,t){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(t);const n=new Date(e);return n.offset=null!=t?t:-6e4*(new Date).getTimezoneOffset(),n}function Br(e,t){try{return t.contents=function(e){const[t,n]=K(e),r=null==n?-6e4*t.getTimezoneOffset():"Z"===n?0:6e4*n;return Lr(t.getTime(),r)}(e),!0}catch(e){return!1}}function Hr(e){return e<0?Math.ceil(e):Math.floor(e)}function Vr(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return Number(BigInt(arguments[0])/10000n);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*t+6e4*n+1e3*r+o}function Gr(e,t){try{return t.contents=function(e){const t=e.search("\\."),n=e.search("\\:");if(-1===t&&-1===n){const t=parseInt(e,0);if(isNaN(t))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Vr(t,0,0,0,0)}if(n>0){const t=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=t&&null!=t[4]&&null!=t[5]){let n=0,r=0,o=0;const i=null!=t[1]&&"-"===t[1]?-1:1,s=+t[4],a=+t[5];if(null!=t[3]&&(n=+t[3]),null!=t[7]&&(o=+t[7]),null!=t[8])switch(t[8].length){case 1:r=100*+t[8];break;case 2:r=10*+t[8];break;case 3:r=+t[8];break;case 4:r=+t[8]/10;break;case 5:r=+t[8]/100;break;case 6:r=+t[8]/1e3;break;case 7:r=+t[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*Vr(n,s,a,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch{return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Pr||(Pr={}));class Ur{constructor(e,t,n,r){this.declaringType=e,this.tag=t,this.name=n,this.fields=r}}class zr{constructor(e,t,n,r,o,i,s){this.fullname=e,this.generics=t,this.construct=n,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return io(this)}GetHashCode(){return Wr(this)}Equals(e){return Yr(this,e)}}function jr(e){return null!=e.generics?e.generics:[]}function Wr(e){return y([w(e.fullname),...jr(e).map(Wr)])}function Yr(e,t){return""===e.fullname?""===t.fullname&&x($o(e),$o(t),(([e,t],[n,r])=>e===n&&Yr(t,r))):e.fullname===t.fullname&&x(jr(e),jr(t),Yr)}function Kr(e,t,n,r){return new zr(e,t,n,void 0,r)}function qr(...e){return new zr("",void 0,void 0,void 0,(()=>e))}function Zr(e,t,n,r){const o=new zr(e,t,n,void 0,void 0,(()=>{const e=n.prototype.cases();return r().map(((t,n)=>new Ur(o,n,e[n],t)))}));return o}function Jr(e){return new zr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Xr(e){return new zr("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Qr(e,t,n){return new zr(e,[t],void 0,void 0,void 0,void 0,n)}const eo=new zr("System.Object"),to=(new zr("Microsoft.FSharp.Core.Unit"),new zr("System.Char"),new zr("System.String")),no=new zr("System.Boolean"),ro=(new zr("System.SByte"),new zr("System.Byte"),new zr("System.Int16"),new zr("System.UInt16"),new zr("System.Int32"));function oo(e){if(Array.isArray(e))return e[0];if(e instanceof zr){const t=ao(e);if(null!=t)return oo(t)+"[]";{const t=e.fullname.lastIndexOf(".");return-1===t?e.fullname:e.fullname.substr(t+1)}}return e.name}function io(e){const t=ao(e);return null!=t?io(t)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>io(e))).join(",")+"]"}function so(e){return null!=ao(e)}function ao(e){return"[]"===e.fullname&&1===e.generics?.length?e.generics[0]:void 0}function lo(e){return null!=e.generics&&e.generics.length>0}function uo(e){return null!=e.enumCases&&e.enumCases.length>0}function co(e){return null==e.generics?e:new zr(e.fullname,e.generics.map((()=>eo)))}function fo(e){return e.generics?.[0]}function po(e){if(uo(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function ho(e,t){const n=parseInt(t,10);return function(e,t){if(null!=e.enumCases){if("string"==typeof t){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(n)?t:n)[1]}function mo(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function $o(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function go(e){if(yo(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function wo(e){return e instanceof zr?null!=e.cases:e instanceof he}function vo(e){return e instanceof zr?null!=e.fields:e instanceof me}function yo(e){return e.fullname.startsWith("System.Tuple")}function bo(e){return null==e.fields?[]:e.fields}new zr("System.UInt32"),new zr("System.Int64"),new zr("System.UInt64"),new zr("System.Int128"),new zr("System.UInt128"),new zr("System.IntPtr"),new zr("System.UIntPtr"),new zr("System.Half"),new zr("System.Single"),new zr("System.Double"),new zr("System.Decimal"),new zr("System.Numerics.BigInteger");class xo{constructor(e){this.k=e}}function So(e){return new xo(e)}function _o(e){return e.k}class Eo extends xo{constructor(e,t,n,r){super(e),this.left=t,this.right=n,this.h=0|r}}function Co(e,t,n,r){return new Eo(e,t,n,r)}function To(e){return e.left}function ko(e){return e.right}function Io(e){return e.h}function Ao(e,t){e:for(;;){const n=t;if(null!=e){const r=Fe(e);if(r instanceof Eo){const o=r;e=To(o),t=Ao(ko(o),n+1);continue e}return n+1|0}return 0|n}}function Mo(e){return Ao(e,0)}function Ro(e,t,n){let r,o,i,s;if(null!=e){const t=Fe(e);i=t instanceof Eo?(r=t,Io(r)):1}else i=0;if(null!=n){const e=Fe(n);s=e instanceof Eo?(o=e,Io(o)):1}else s=0;const a=0|(i<s?s:i);return 0===a?So(t):Co(t,e,n,a+1)}function Oo(e,t,n){let r,o,i,s,a,l,u,c,d,f;if(null!=e){const t=Fe(e);d=t instanceof Eo?(r=t,Io(r)):1}else d=0;if(null!=n){const e=Fe(n);f=e instanceof Eo?(o=e,Io(o)):1}else f=0;if(f>d+2){const r=Fe(n);if(r instanceof Eo){const n=r;if(i=To(n),(null!=i?(s=Fe(i),s instanceof Eo?(a=s,Io(a)):1):0)>d+1){const r=Fe(To(n));if(r instanceof Eo){const o=r;return Ro(Ro(e,t,To(o)),_o(o),Ro(ko(o),_o(n),ko(n)))}throw new Error("internal error: Set.rebalance")}return Ro(Ro(e,t,To(n)),_o(n),ko(n))}throw new Error("internal error: Set.rebalance")}if(d>f+2){const r=Fe(e);if(r instanceof Eo){const e=r;if(l=ko(e),(null!=l?(u=Fe(l),u instanceof Eo?(c=u,Io(c)):1):0)>f+1){const r=Fe(ko(e));if(r instanceof Eo){const o=r;return Ro(Ro(To(e),_o(e),To(o)),_o(o),Ro(ko(o),t,n))}throw new Error("internal error: Set.rebalance")}return Ro(To(e),_o(e),Ro(ko(e),t,n))}throw new Error("internal error: Set.rebalance")}return Ro(e,t,n)}function Po(e,t,n){if(null!=n){const r=Fe(n),o=0|e.Compare(t,_o(r));if(r instanceof Eo){const i=r;return o<0?Oo(Po(e,t,To(i)),_o(i),ko(i)):0===o?n:Oo(To(i),_o(i),Po(e,t,ko(i)))}{const o=0|e.Compare(t,_o(r));return o<0?Co(t,void 0,n,2):0===o?n:Co(t,n,void 0,2)}}return So(t)}function No(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Fe(n),s=0|r.Compare(o,_o(i));if(i instanceof Eo){const a=i;if(s<0){e=r,t=o,n=To(a);continue e}if(0===s)return!0;e=r,t=o,n=ko(a);continue e}return 0===s}return!1}}function Do(e,t){e:for(;;){const n=e;if(null!=t){const r=Fe(t);if(r instanceof Eo){const o=r;Do(n,To(o)),n(_o(o)),e=n,t=ko(o);continue e}n(_o(r))}break}}class Fo extends me{constructor(e,t){super(),this.stack=e,this.started=t}}function Lo(e){e:for(;;){const t=e;if(ft(t))return ut();{const n=pt(t),r=ht(t);if(null!=n){const o=Fe(n);if(o instanceof Eo){const t=o;e=vt([To(t),So(_o(t)),ko(t)],r);continue e}return t}e=r;continue e}}}function Bo(e){return new Fo(Lo(dt(e)),!1)}function Ho(e){if(e.started){const t=e.stack;if(ft(t))return function(){throw new Error("Enumeration already started")}();if(null!=pt(t))return _o(Fe(pt(t)));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Vo(e){let t=Bo(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Ho(t),"System.Collections.IEnumerator.get_Current":()=>Ho(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(ft(t))return!1;if(null!=pt(t)){if(Fe(pt(t))instanceof Eo)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Lo(ht(t)),!ft(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!ft(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=Bo(e)},Dispose(){}}}function Go(e,t,n){return null==t?null==n?0:-1:null==n?1:0|function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(ft(o))return ft(i)?0:-1;if(ft(i))return 1;if(null!=pt(i))if(null!=pt(o)){const s=Fe(pt(o)),a=Fe(pt(i));if(s instanceof Eo){const l=s;if(null==To(l)){if(!(a instanceof Eo)){const s=0|r.Compare(_o(l),_o(a));if(0!==s)return 0|s;e=r,t=ct(ko(l),ht(o)),n=ct(void 0,ht(i));continue e}{const s=a;if(null==To(s)){const a=0|r.Compare(_o(l),_o(s));if(0!==a)return 0|a;e=r,t=ct(ko(l),ht(o)),n=ct(ko(s),ht(i));continue e}{let s,a,l,u,c;switch(ft(o)?ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2:null!=pt(o)?(s=0,a=ht(o),l=Fe(pt(o))):ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2,s){case 0:if(l instanceof Eo){const o=l;e=r,t=vt([To(o),Co(_o(o),void 0,ko(o),0)],a),n=i;continue e}e=r,t=vt([void 0,So(_o(l))],a),n=i;continue e;case 1:if(c instanceof Eo){const i=c;e=r,t=o,n=vt([To(i),Co(_o(i),void 0,ko(i),0)],u);continue e}e=r,t=o,n=vt([void 0,So(_o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{let s,a,l,u,c;switch(ft(o)?ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2:null!=pt(o)?(s=0,a=ht(o),l=Fe(pt(o))):ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2,s){case 0:if(l instanceof Eo){const o=l;e=r,t=vt([To(o),Co(_o(o),void 0,ko(o),0)],a),n=i;continue e}e=r,t=vt([void 0,So(_o(l))],a),n=i;continue e;case 1:if(c instanceof Eo){const i=c;e=r,t=o,n=vt([To(i),Co(_o(i),void 0,ko(i),0)],u);continue e}e=r,t=o,n=vt([void 0,So(_o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(a instanceof Eo)){const l=0|r.Compare(_o(s),_o(a));if(0!==l)return 0|l;e=r,t=ht(o),n=ht(i);continue e}{const l=a;if(null==To(l)){const a=0|r.Compare(_o(s),_o(l));if(0!==a)return 0|a;e=r,t=ct(void 0,ht(o)),n=ct(ko(l),ht(i));continue e}{let s,a,l,u,c;switch(ft(o)?ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2:null!=pt(o)?(s=0,a=ht(o),l=Fe(pt(o))):ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2,s){case 0:if(l instanceof Eo){const o=l;e=r,t=vt([To(o),Co(_o(o),void 0,ko(o),0)],a),n=i;continue e}e=r,t=vt([void 0,So(_o(l))],a),n=i;continue e;case 1:if(c instanceof Eo){const i=c;e=r,t=o,n=vt([To(i),Co(_o(i),void 0,ko(i),0)],u);continue e}e=r,t=o,n=vt([void 0,So(_o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{let s,a,l,u,c;switch(Fe(pt(i)),ft(o)?ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2:null!=pt(o)?(s=0,a=ht(o),l=Fe(pt(o))):ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2,s){case 0:if(l instanceof Eo){const o=l;e=r,t=vt([To(o),Co(_o(o),void 0,ko(o),0)],a),n=i;continue e}e=r,t=vt([void 0,So(_o(l))],a),n=i;continue e;case 1:if(c instanceof Eo){const i=c;e=r,t=o,n=vt([To(i),Co(_o(i),void 0,ko(i),0)],u);continue e}e=r,t=o,n=vt([void 0,So(_o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==pt(o)){e=r,t=ht(o),n=ht(i);continue e}{let s,a,l,u,c;switch(Fe(pt(o)),ft(o)?ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2:null!=pt(o)?(s=0,a=ht(o),l=Fe(pt(o))):ft(i)?s=2:null!=pt(i)?(s=1,u=ht(i),c=Fe(pt(i))):s=2,s){case 0:if(l instanceof Eo){const o=l;e=r,t=vt([To(o),Co(_o(o),void 0,ko(o),0)],a),n=i;continue e}e=r,t=vt([void 0,So(_o(l))],a),n=i;continue e;case 1:if(c instanceof Eo){const i=c;e=r,t=o,n=vt([To(i),Co(_o(i),void 0,ko(i),0)],u);continue e}e=r,t=o,n=vt([void 0,So(_o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,dt(t),dt(n))}function Uo(e,t,n){let r=n;Do((e=>{Qe(t,r,e),r=r+1|0}),e)}function zo(e,t){if(i(t))return function(e,t){return Ze(((t,n)=>Po(e,n,t)),void 0,t)}(e,t);if(t instanceof tt)return function(e,t){return $t(((t,n)=>Po(e,n,t)),void 0,t)}(e,t);{const n=c(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,t=Po(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=i}}(e,void 0,n)}finally{a(n)}}}class jo{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){let t=0;const n=c(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=(t<<1)+b(n["System.Collections.Generic.IEnumerator`1.get_Current"]())+631|0}finally{a(n)}return 0|Math.abs(t)}(this)}Equals(e){let t;return e instanceof jo&&(t=e,0===Go(Yo(this),Ko(this),Ko(t)))}toString(){return"set ["+Ie("; ",rn((e=>pe(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){return Array.from(this)}CompareTo(e){return 0|Go(Yo(this),Ko(this),Ko(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return No(Yo(this),e,Ko(this))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){Uo(Ko(this),e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Zo(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Zo(this)}GetEnumerator(){return Vo(Ko(this))}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Vo(Ko(this))}get size(){return 0|Zo(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return Jo(this,e)}keys(){return rn((e=>e),this)}values(){return rn((e=>e),this)}entries(){return rn((e=>[e,e]),this)}forEach(e,t){const n=this;nn((t=>{e(t,t,n)}),n)}}function Wo(e,t){return new jo(e,t)}function Yo(e){return e.comparer}function Ko(e){return e.tree}function qo(e){return Wo(e,void 0)}function Zo(e){return Mo(Ko(e))}function Jo(e,t){return No(Yo(e),t,Ko(e))}function Xo(e,t){return Jo(t,e)}function Qo(e,t){return function(e,t){return Wo(Yo(e),Po(Yo(e),t,Ko(e)))}(t,e)}function ei(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?"\n":" ")+JSON.stringify(t,null,4)}catch(t){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?"\n":" ")}}function ti(e,t){const n=2===t.tag?ei(t.fields[0],t.fields[1],!0):1===t.tag?ei(t.fields[0],t.fields[1],!1)+"\nReason: "+t.fields[2]:3===t.tag?ei(t.fields[0],t.fields[1],!0):4===t.tag?ei(t.fields[0],t.fields[1],!0)+"\nNode `"+t.fields[2]+"` is unkown.":5===t.tag?"Expecting "+t.fields[0]+".\n"+JSON.stringify(t.fields[1],null,4):7===t.tag?"The following errors were found:\n\n"+Ie("\n\n",t.fields[0]):6===t.tag?"The following `failure` occurred with the decoder: "+t.fields[0]:ei(t.fields[0],t.fields[1],!1);return 7===t.tag?n:"Error at: `"+e+"`\n"+n}function ni(e,t,n){const r=t(e,n);if(1===r.tag){const e=r.fields[0];return new xr(1,[ti(e[0],e[1])])}return new xr(0,[r.fields[0]])}function ri(e,t){try{return ni("$",e,JSON.parse(t))}catch(e){if(e instanceof SyntaxError)return new xr(1,["Given an invalid JSON: "+e.message]);throw e}}function oi(e,t){return"string"==typeof t?new xr(0,[t]):new xr(1,[[e,new _r(0,["a string",t])]])}const ii=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new xr(0,[(e+128&255)-128]):new xr(1,[[n,new _r(1,["a sbyte",e,"Value was either too large or too small for a sbyte"])]]):new xr(1,[[n,new _r(1,["a sbyte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Fr(r,511,!1,8,new $e((()=>t),(e=>{t=0|e}))),t],e[0]?new xr(0,[e[1]]):new xr(1,[[n,new _r(0,["a sbyte",r])]])}return new xr(1,[[n,new _r(0,["a sbyte",r])]])},si=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new xr(0,[255&e]):new xr(1,[[n,new _r(1,["a byte",e,"Value was either too large or too small for a byte"])]]):new xr(1,[[n,new _r(1,["a byte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Fr(r,511,!0,8,new $e((()=>t),(e=>{t=e}))),t],e[0]?new xr(0,[e[1]]):new xr(1,[[n,new _r(0,["a byte",r])]])}return new xr(1,[[n,new _r(0,["a byte",r])]])},ai=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new xr(0,[(e+32768&65535)-32768]):new xr(1,[[n,new _r(1,["an int16",e,"Value was either too large or too small for an int16"])]]):new xr(1,[[n,new _r(1,["an int16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Fr(r,511,!1,16,new $e((()=>t),(e=>{t=0|e}))),t],e[0]?new xr(0,[e[1]]):new xr(1,[[n,new _r(0,["an int16",r])]])}return new xr(1,[[n,new _r(0,["an int16",r])]])},li=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new xr(0,[65535&e]):new xr(1,[[n,new _r(1,["an uint16",e,"Value was either too large or too small for an uint16"])]]):new xr(1,[[n,new _r(1,["an uint16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Fr(r,511,!0,16,new $e((()=>t),(e=>{t=e}))),t],e[0]?new xr(0,[e[1]]):new xr(1,[[n,new _r(0,["an uint16",r])]])}return new xr(1,[[n,new _r(0,["an uint16",r])]])},ui=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new xr(0,[~~e]):new xr(1,[[n,new _r(1,["an int",e,"Value was either too large or too small for an int"])]]):new xr(1,[[n,new _r(1,["an int",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Fr(r,511,!1,32,new $e((()=>t),(e=>{t=0|e}))),t],e[0]?new xr(0,[e[1]]):new xr(1,[[n,new _r(0,["an int",r])]])}return new xr(1,[[n,new _r(0,["an int",r])]])},ci=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new xr(0,[e>>>0]):new xr(1,[[n,new _r(1,["an uint32",e,"Value was either too large or too small for an uint32"])]]):new xr(1,[[n,new _r(1,["an uint32",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Fr(r,511,!0,32,new $e((()=>t),(e=>{t=e}))),t],e[0]?new xr(0,[e[1]]):new xr(1,[[n,new _r(0,["an uint32",r])]])}return new xr(1,[[n,new _r(0,["an uint32",r])]])};function di(e,t,n,r){let o;const i=n+".["+$(e)+"]";if(Array.isArray(r)){const n=r;return e<n.length?t(i,Xe(e,n)):new xr(1,[[i,new _r(5,["a longer array. Need index `"+$(e)+"` but there are only `"+(o=n.length,$(o)+"` entries"),r])]])}return new xr(1,[[i,new _r(0,["an array",r])]])}function fi(e,t,n){if(Array.isArray(n)){let r=-1;return Sr(gt,Ze(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+$(r)+"]",o);return 0===i.tag?new xr(0,[ct(i.fields[0],n.fields[0])]):new xr(1,[i.fields[0]])}return n}),new xr(0,[ut()]),n))}return new xr(1,[[t,new _r(0,["a list",n])]])}function pi(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return Ze(((n,o)=>{if(r=r+1|0,0===n.tag){const i=n.fields[0],s=e(t+".["+$(r)+"]",o);return 0===s.tag?(Qe(i,r,s.fields[0]),new xr(0,[i])):new xr(1,[s.fields[0]])}return n}),new xr(0,[Ye(new Array(o.length),0,o.length,null)]),o)}return new xr(1,[[t,new _r(0,["an array",n])]])}function hi(e,t,n,r){const o=t(n,r);return 0===o.tag?e(o.fields[0],n,r):new xr(1,[o.fields[0]])}function mi(e,t){let n;const r=e;return n=e=>t=>di(0,r,e,t),e=>r=>hi(O((e=>{let n;const r=t;return n=e=>t=>di(1,r,e,t),t=>r=>hi(((t,n,r)=>new xr(0,[[e,t]])),M(n),t,r)})),M(n),e,r)}function $i(e){return pr(e,{Compare:k})}function gi(e,t,n,r){let o;const i=t.length+e|0;if(i!==r.length)return new xr(1,[[n,new _r(6,[(o=0|r.length,_e(xe("Expected array of length %i but got %i"))(i)(o))])]]);{let o=new xr(0,[ut()]);for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],a=_e(xe("%s[%i]"))(n)(i),l=Xe(i-e,t),u=Xe(i,r);o=Sr((e=>ct(e,s)),l(a)(u))}return Sr(gt,o)}}function wi(e,t,n,r,o,i){const s=function(e,t){return t.find((e=>oo(e)===r))}(0,mo(n));if(null!=s){const n=s,r=Ke((n=>yi(e,t,!1,n[1])),bo(n));return Sr((e=>function(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return null==r?{}:e.declaringType.cases&&1==e.declaringType.cases().length?new r(...t):new r(e.tag,t)}(n,mt(e))),0===r.length&&i.length<=1?new xr(0,[ut()]):gi(1,r,o,i))}return new xr(1,[[o,new _r(6,["Cannot find case "+r+" in "+io(n)])]])}function vi(e,t,n,r){let o;const i=new $e(null);let s;const a=io(r);let l;if(s=""===a?e:cr(a,i,e),vo(r)){const e=Ke((e=>[Ir(t,oo(e)),yi(s,t,!1,e[1])]),$o(r));l=t=>n=>Sr((e=>function(e,t){const n=$o(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return null!=e.construct?new e.construct(...t):n.reduce(((e,[n,r],o)=>(e[n]=t[o],e)),{})}(r,mt(e))),function(e,t,n){return null===n||Object.getPrototypeOf(n||!1)!==Object.prototype?new xr(1,[[t,new _r(0,["an object",n])]]):et(((e,r)=>{const o=e[0];return 0===r.tag?Sr((e=>ct(e,r.fields[0])),e[1](t+"."+o)(n[o])):r}),e,new xr(0,[ut()]))}(e,t,n))}else if(wo(r))l=e=>n=>{if("string"==typeof n)return wi(s,t,r,n,e,[]);if(Array.isArray(n)){const a=n;return o=n=>wi(s,t,r,n,e,a),0===(i=oi(e+"[0]",Xe(0,a))).tag?o(i.fields[0]):br(i.fields[0])}return new xr(1,[[e,new _r(0,["a string or array",n])]]);var o,i};else{if(!n)throw new Error((o=io(r),_e(xe("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>t=>new xr(1,[[e,new _r(2,["an extra coder for "+io(r),t])]])}return i.contents=l,l}function yi(e,t,n,r){let o,i,s,a;const l=io(r),u=dr(l,e);if(null!=u){const e=u;return t=>n=>e.contents(t)(n)}if(so(r)){const n=yi(e,t,!1,ao(r));return e=>t=>pi(M(n),e,t)}if(uo(r))switch(io(fo(r))){case"System.SByte":return e=>t=>{const n=r,o=e,i=t,s=ii(o)(i);if(1===s.tag)return new xr(1,[s.fields[0]]);{const e=0|s.fields[0];return Qt(e,po(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new xr(0,[ho(n,e.toString())]):new xr(1,[[o,new _r(1,[io(n),i,"Unkown value provided for the enum"])]])}};case"System.Byte":return e=>t=>{const n=r,o=e,i=t,s=si(o)(i);if(1===s.tag)return new xr(1,[s.fields[0]]);{const e=s.fields[0];return Qt(e,po(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new xr(0,[ho(n,e.toString())]):new xr(1,[[o,new _r(1,[io(n),i,"Unkown value provided for the enum"])]])}};case"System.Int16":return e=>t=>{const n=r,o=e,i=t,s=ai(o)(i);if(1===s.tag)return new xr(1,[s.fields[0]]);{const e=0|s.fields[0];return Qt(e,po(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new xr(0,[ho(n,m(e))]):new xr(1,[[o,new _r(1,[io(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt16":return e=>t=>{const n=r,o=e,i=t,s=li(o)(i);if(1===s.tag)return new xr(1,[s.fields[0]]);{const e=s.fields[0];return Qt(e,po(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new xr(0,[ho(n,e.toString())]):new xr(1,[[o,new _r(1,[io(n),i,"Unkown value provided for the enum"])]])}};case"System.Int32":return e=>t=>{const n=r,o=e,i=t,s=ui(o)(i);if(1===s.tag)return new xr(1,[s.fields[0]]);{const e=0|s.fields[0];return Qt(e,po(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new xr(0,[ho(n,$(e))]):new xr(1,[[o,new _r(1,[io(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt32":return e=>t=>{const n=r,o=e,i=t,s=ci(o)(i);if(1===s.tag)return new xr(1,[s.fields[0]]);{const e=s.fields[0];return Qt(e,po(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new xr(0,[ho(n,e.toString())]):new xr(1,[[o,new _r(1,[io(n),i,"Unkown value provided for the enum"])]])}};default:{const e=io(r),t=Ee(xe("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>t(e)}}else if(lo(r)){if(yo(r)){const n=Ke((n=>yi(e,t,!1,n)),go(r));return e=>t=>Array.isArray(t)?Sr((e=>mt(e)),gi(0,n,e,t)):new xr(1,[[e,new _r(0,["an array",t])]])}switch(io(co(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=yi(e,t,!0,Xe(0,jr(r))),e=>t=>{return n=M(o),r=e,null==(i=t)?new xr(0,[void 0]):Sr(Be,n(r,i));var n,r,i};case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=yi(e,t,!1,Xe(0,jr(r))),e=>t=>fi(M(i),e,t);case"System.Collections.Generic.IEnumerable`1[System.Object]":return s=yi(e,t,!1,Xe(0,jr(r))),e=>t=>function(e,t,n){if(Array.isArray(n)){let r=-1;return Sr(on,Ze(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+$(r)+"]",o);return 0===i.tag?new xr(0,[Xt([i.fields[0]],n.fields[0])]):new xr(1,[i.fields[0]])}return n}),new xr(0,[[]]),n))}return new xr(1,[[t,new _r(0,["a seq",n])]])}(M(s),e,t);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const n=yi(e,t,!1,Xe(0,jr(r))),o=yi(e,t,!1,Xe(1,jr(r)));let i;const s=yt([e=>t=>function(e,t,n,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new xr(1,[[n,new _r(0,["an object",r])]]):tn(((o,i)=>{if(0===o.tag){const s=e(n,i);if(0===s.tag){const e=t(n+"."+i,r[i]);return 0===e.tag?new xr(0,[ct([s.fields[0],e.fields[0]],o.fields[0])]):new xr(1,[e.fields[0]])}return new xr(1,[s.fields[0]])}return o}),new xr(0,[ut()]),Object.keys(r))}(M(n),M(o),e,t),(a=mi(M(n),M(o)),e=>t=>fi(M(a),e,t))]);return i=e=>t=>{return n=e,r=t,((e,t)=>{e:for(;;){const o=e,i=t;if(ft(o))return new xr(1,[[n,new _r(7,[i])]]);{const s=ni(n,M(pt(o)),r);if(1===s.tag){e=ht(o),t=bt(i,dt(s.fields[0]));continue e}return new xr(0,[s.fields[0]])}}})(s,ut());var n,r},e=>t=>function(e,t,n,r){const o=t(n,r);return 1===o.tag?new xr(1,[o.fields[0]]):new xr(0,[e(o.fields[0])])}($i,M(i),e,t)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const n=yi(e,t,!1,Xe(0,jr(r)));return e=>t=>{const r=pi(M(n),e,t);return 0===r.tag?new xr(0,[(o=r.fields[0],Wo(i={Compare:k},zo(i,o)))]):new xr(1,[r.fields[0]]);var o,i}}default:return vi(e,t,n,r)}}else switch(l){case"System.Boolean":return e=>t=>{return n=e,"boolean"==typeof(r=t)?new xr(0,[r]):new xr(1,[[n,new _r(0,["a boolean",r])]]);var n,r};case"Microsoft.FSharp.Core.Unit":return e=>t=>{return n=e,null==(r=t)?new xr(0,[void 0]):new xr(1,[[n,new _r(0,["null",r])]]);var n,r};case"System.String":return e=>t=>oi(e,t);case"System.Char":return e=>t=>function(e,t){if("string"==typeof t){const n=t;return 1===n.length?new xr(0,[n[0]]):new xr(1,[[e,new _r(0,["a single character string",t])]])}return new xr(1,[[e,new _r(0,["a char",t])]])}(e,t);case"System.SByte":return ii;case"System.Byte":return si;case"System.Int16":return ai;case"System.UInt16":return li;case"System.Int32":return ui;case"System.UInt32":return ci;case"System.Double":return e=>t=>{return n=e,"number"==typeof(r=t)?new xr(0,[r]):new xr(1,[[n,new _r(0,["a float",r])]]);var n,r};case"System.Single":return e=>t=>{return n=e,"number"==typeof(r=t)?new xr(0,[r]):new xr(1,[[n,new _r(0,["a float32",r])]]);var n,r};case"System.DateTime":return e=>t=>function(e,t){if("string"==typeof t){let r,o=Y(-621355968e5,1);return r=[q(t,new $e((()=>o),(e=>{o=e}))),o],r[0]?new xr(0,[(n=r[1],1===n.kind?n:Y(n.getTime(),1))]):new xr(1,[[e,new _r(0,["a datetime",t])]])}var n;return new xr(1,[[e,new _r(0,["a datetime",t])]])}(e,t);case"System.DateTimeOffset":return e=>t=>function(e,t){if("string"==typeof t){let n,r=Lr(-621355968e5,0);return n=[Br(t,new $e((()=>r),(e=>{r=e}))),r],n[0]?new xr(0,[n[1]]):new xr(1,[[e,new _r(0,["a datetimeoffset",t])]])}return new xr(1,[[e,new _r(0,["a datetime",t])]])}(e,t);case"System.TimeSpan":return e=>t=>function(e,t){if("string"==typeof t){let n,r=0;return n=[Gr(t,new $e((()=>r),(e=>{r=e}))),r],n[0]?new xr(0,[n[1]]):new xr(1,[[e,new _r(0,["a timespan",t])]])}return new xr(1,[[e,new _r(0,["a timespan",t])]])}(e,t);case"System.Guid":return e=>t=>function(e,t){if("string"==typeof t){let n,r="00000000-0000-0000-0000-000000000000";return n=[Or(t,new $e((()=>r),(e=>{r=e}))),r],n[0]?new xr(0,[n[1]]):new xr(1,[[e,new _r(0,["a guid",t])]])}return new xr(1,[[e,new _r(0,["a guid",t])]])}(e,t);case"System.Object":return e=>e=>new xr(0,[e]);default:return vi(e,t,n,r)}}function bi(e,t,n){const r=Ue(t,new Er(0,[]));return yi(function(e){return null!=e?fr(((e,t)=>new $e(t[1])),e.Coders):hr({Compare:C})}(n),r,!1,e)}const xi=function(){const e=[..."#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$R$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1E(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν$(.çђ$,ɪ⇜ɜ*B$-'%A%($-S*(''$$--$*$8(6˓CC:'n'$$Z*'0c%$$$.%1+ӹM,⌚łT&4'+Ưध(0&,*-%$%$'ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&/|*/7/'[+-)K+A%%q$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ፮$A£ē︳𐀡%𐀡"].map((e=>(e.codePointAt(0)??0)-35)),t=[..."1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@"].map((e=>(e.codePointAt(0)??0)-35)),n=new Uint32Array(e),r=new Uint8Array(t);for(let e=1;e<n.length;++e)n[e]+=n[e-1];return e=>{let t=n.length,o=0;for(;t-o>1;){const r=Math.floor((t+o)/2),i=n[r];if(e<i)t=r;else{if(e===i){t=o=r;break}i<e&&(o=r)}}return r[o]}}();const Si=e=>function(e){const t=1<<function(e,t){const n=function(e,t){if(t>=0&&t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}(e,t);return xi(n)}(e,0);return!!(256&t)}(e);function _i(e,t){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+t+e.charAt(1).toLowerCase()))}function Ei(e,t=0){const n={},r=t;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,t,r){e=function(e,t){switch(t){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return _i(e,"_");case 3:return _i(e,"_").toUpperCase();case 4:return _i(e,"-");default:return e}}(e,t),n[e]=r}for(let t of e){let e=0;if(null==t&&o(t),t instanceof he){const n=t.cases()[t.tag];t=0===t.fields.length?n:[n].concat(t.fields),e=r}if(Array.isArray(t))switch(t.length){case 0:o(t);break;case 1:i(t[0],e,!0);break;case 2:const n=t[1];i(t[0],e,n);break;default:i(t[0],e,t.slice(1))}else"string"==typeof t?i(t,e,!0):o(t)}return n}function Ci(e,t){return!t.has(e)&&(t.add(e),!0)}function Ti(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class ki{constructor(e,t){const n=new $e(null);this.comparer=t,n.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();Ri(n.contents,e)}}finally{a(r)}}get[Symbol.toStringTag](){return"HashSet"}toJSON(){return Array.from(this)}"System.Collections.IEnumerable.GetEnumerator"(){return c(this)}GetEnumerator(){return c(jt(this.hashMap.values()))}[Symbol.iterator](){return d(c(this))}"System.Collections.Generic.ICollection`1.Add2B595"(e){Ri(this,e)}"System.Collections.Generic.ICollection`1.Clear"(){Ai(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Oi(this,e)}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){var n;n=(n,r)=>{Qe(e,t+n,r)},tn(((e,t)=>(n(e,t),e+1|0)),0,this)}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Mi(this)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(e){return Pi(this,e)}get size(){return 0|Mi(this)}add(e){return Ri(this,e),this}clear(){Ai(this)}delete(e){return Pi(this,e)}has(e){return Oi(this,e)}keys(){return rn((e=>e),this)}values(){return rn((e=>e),this)}entries(){return rn((e=>[e,e]),this)}forEach(e,t){const n=this;nn((t=>{e(t,t,n)}),n)}}function Ii(e,t){const n=0|e.comparer.GetHashCode(t);let r,o=null;return r=[(i=e.hashMap,s=n,a=new $e((()=>o),(e=>{o=e})),!!i.has(s)&&(a.contents=i.get(s),!0)),o],r[0]?[!0,n,r[1].findIndex((n=>e.comparer.Equals(t,n)))]:[!1,n,-1];var i,s,a}function Ai(e){e.hashMap.clear()}function Mi(e){let t=0,n=c(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=t+n["System.Collections.Generic.IEnumerator`1.get_Current"]().length|0}finally{a(n)}return 0|t}function Ri(e,t){const n=Ii(e,t);return n[0]?!(n[2]>-1)&&(Ti(e.hashMap,n[1]).push(t),!0):(e.hashMap.set(n[1],[t]),!0)}function Oi(e,t){const n=Ii(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r}function Pi(e,t){const n=Ii(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r&&(Ti(e.hashMap,n[1]).splice(n[2],1),!0)}class Ni extends me{constructor(e,t){super(),this.Code=e,this.Name=t}}const Di=pr([["AFG","Afghanistan"],["ALA","Aland Islands"],["ALB","Albania"],["DZA","Algeria"],["ASM","American Samoa"],["AND","Andorra"],["AGO","Angola"],["AIA","Anguilla"],["ATA","Antarctica"],["ATG","Antigua and Barbuda"],["ARG","Argentina"],["ARM","Armenia"],["ABW","Aruba"],["AUT","Austria"],["AZE","Azerbaijan"],["BHS","Bahamas"],["BHR","Bahrain"],["BGD","Bangladesh"],["BRB","Barbados"],["BLR","Belarus"],["BEL","Belgium"],["BLZ","Belize"],["BEN","Benin"],["BMU","Bermuda"],["BTN","Bhutan"],["BOL","Bolivia"],["BES","Bonaire Saint Eustatius, and Saba Islands"],["BIH","Bosnia and Herzegovina"],["BWA","Botswana"],["BVT","Bouvet Island"],["BRA","Brazil"],["IOT","British Indian Ocean Territory"],["VGB","British Virgin Islands"],["BRN","Brunei Darussalam"],["BGR","Bulgaria"],["BFA","Burkina Faso"],["BDI","Burundi"],["KHM","Cambodia"],["CMR","Cameroon"],["CAN","Canada"],["CPV","Cabo Verde"],["CYM","Cayman Islands"],["CAF","Central African Republic"],["TCD","Chad"],["CHL","Chile"],["CHN","China"],["CXR","Christmas Island"],["CCK","Cocos (Keeling) Islands"],["COL","Colombia"],["COM","Comoros"],["COD","Congo, Democratic Republic of (was Zaire)"],["COG","Congo, Republic of"],["COK","Cook Islands"],["CRI","Costa Rica"],["CIV","Cote D'Ivoire (Ivory Coast)"],["HRV","Croatia (Hrvatska)"],["CUB","Cuba"],["CUW","Curacao"],["CYP","Cyprus"],["CZE","Czech Republic"],["DNK","Denmark"],["DJI","Djibouti"],["DMA","Dominica"],["DOM","Dominican Republic"],["ECU","Ecuador"],["EGY","Egypt"],["SLV","El Salvador"],["GNQ","Equatorial Guinea"],["ERI","Eritrea"],["EST","Estonia"],["SWZ","eSwatini"],["ETH","Ethiopia"],["FLK","Falkland Islands (Malvinas)"],["FRO","Faroe Islands"],["FJI","Fiji"],["FIN","Finland"],["FRA","France"],["GUF","French Guiana"],["PYF","French Polynesia"],["ATF","French Southern Territories"],["GAB","Gabon"],["GMB","Gambia"],["GEO","Georgia"],["DEU","Germany"],["GHA","Ghana"],["GIB","Gibraltar"],["GRC","Greece"],["GRL","Greenland"],["GRD","Grenada"],["GLP","Guadeloupe"],["GUM","Guam"],["GTM","Guatemala"],["GGY","Guernsey"],["GIN","Guinea"],["GNB","Guinea-Bissau"],["GUY","Guyana"],["HTI","Haiti"],["HMD","Heard and McDonald Islands"],["VAT","Holy See (Vatican City State)"],["HND","Honduras"],["HKG","Hong Kong"],["HRV","Hrvatska (Croatia)"],["HUN","Hungary"],["ISL","Iceland"],["IND","India"],["IDN","Indonesia"],["IRN","Iran"],["IRQ","Iraq"],["IRL","Ireland"],["IMN","Isle of Man, The"],["ISR","Israel"],["ITA","Italy"],["CIV","Ivory Coast (Cote D'Ivoire)"],["JAM","Jamaica"],["JPN","Japan"],["JEY","Jersey"],["JOR","Jordan"],["KAZ","Kazakhstan"],["KEN","Kenya"],["KIR","Kiribati"],["PRK","Korea, Democratic People's Republic of (North Korea)"],["KOR","Korea, Republic of (South Korea)"],["KWT","Kuwait"],["KGZ","Kyrgyzstan"],["LAO","Laos"],["LVA","Latvia"],["LBN","Lebanon"],["LSO","Lesotho"],["LBR","Liberia"],["LBY","Libya"],["LIE","Liechtenstein"],["LTU","Lithuania"],["LUX","Luxembourg"],["MAC","Macau"],["MKD","North Macedonia, Republic of"],["MDG","Madagascar"],["MWI","Malawi"],["MYS","Malaysia"],["MDV","Maldives"],["MLI","Mali"],["MLT","Malta"],["MHL","Marshall Islands"],["MTQ","Martinique"],["MRT","Mauritania"],["MUS","Mauritius"],["MYT","Mayotte"],["MEX","Mexico"],["FSM","Micronesia, Federated States of"],["MDA","Moldova"],["MCO","Monaco"],["MNG","Mongolia"],["MNE","Montenegro"],["MSR","Montserrat"],["MAR","Morocco"],["MOZ","Mozambique"],["MMR","Myanmar (was Burma)"],["NAM","Namibia"],["NRU","Nauru"],["NPL","Nepal"],["NLD","Netherlands"],["NCL","New Caledonia"],["NZL","New Zealand"],["NIC","Nicaragua"],["NER","Niger"],["NGA","Nigeria"],["NIU","Niue"],["NFK","Norfolk Island"],["MNP","Northern Mariana Islands"],["PRK","North Korea (Korea, Democratic People's Republic of)"],["NOR","Norway"],["OMN","Oman"],["PAK","Pakistan"],["PLW","Palau"],["PSE","Palestinian Territories"],["PAN","Panama"],["PNG","Papua New Guinea"],["PRY","Paraguay"],["PER","Peru"],["PHL","Philippines"],["PCN","Pitcairn Island"],["POL","Poland"],["PRT","Portugal"],["PRI","Puerto Rico"],["QAT","Qatar"],["REU","Reunion"],["ROU","Romania"],["RUS","Russian Federation"],["RWA","Rwanda"],["BLM","Saint Barthelemy"],["SHN","Saint Helena"],["KNA","Saint Kitts and Nevis"],["LCA","Saint Lucia"],["SXM","Saint Maarten (Dutch part)"],["MAF","Saint Martin (French part)"],["SPM","Saint Pierre and Miquelon"],["VCT","Saint Vincent and the Grenadines"],["WSM","Samoa"],["SMR","San Marino"],["STP","Sao Tome and Principe"],["SAU","Saudi Arabia"],["SEN","Senegal"],["SRB","Serbia"],["SYC","Seychelles"],["SLE","Sierra Leone"],["SGP","Singapore"],["SVK","Slovakia (Slovak Republic)"],["SVN","Slovenia"],["SLB","Solomon Islands"],["SOM","Somalia"],["ZAF","South Africa"],["SGS","South Georgia and the South Sandwich Islands"],["KOR","South Korea (Korea, Republic of)"],["SSD","South Sudan"],["ESP","Spain"],["LKA","Sri Lanka"],["SDN","Sudan"],["SUR","Suriname"],["SJM","Svalbard and Jan Mayen Islands"],["SWE","Sweden"],["CHE","Switzerland"],["SYR","Syria"],["TWN","Taiwan"],["TJK","Tajikistan"],["TZA","Tanzania"],["THA","Thailand"],["TLS","Timor-Leste"],["TGO","Togo"],["TKL","Tokelau"],["TON","Tonga"],["TTO","Trinidad and Tobago"],["TUN","Tunisia"],["TUR","Turkey"],["TKM","Turkmenistan"],["TCA","Turks and Caicos Islands"],["TUV","Tuvalu"],["UGA","Uganda"],["UKR","Ukraine"],["ARE","United Arab Emirates"],["GBR","United Kingdom"],["USA","United States"],["UMI","United States Minor Outlying Islands"],["VIR","United States Virgin Islands"],["URY","Uruguay"],["UZB","Uzbekistan"],["VUT","Vanuatu"],["VAT","Vatican City State (Holy See)"],["VEN","Venezuela"],["VNM","Vietnam"],["WLF","Wallis and Futuna"],["ESH","Western Sahara"],["YEM","Yemen"],["ZMB","Zambia"],["ZWE","Zimbabwe"]],{Compare:C});class Fi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HELP","VETStudentLoan","FinancialSupplement","StudentStartUpLoan","TradeSupportLoan"]}}class Li extends me{constructor(e,t){super(),this.Code=e,this.Name=t}}function Bi(e){let t;const n=function(e){const t=function(e){const t=dr(e,Di);return null==t?void 0:new Ni(e,t)}(e),n=_e(xe("Country code:%A is not accepted"))(e),r=t;return null==r?new xr(1,[n]):new xr(0,[r])}(e);return 1===n.tag?new xr(1,[n.fields[0]]):new xr(0,[(t=n.fields[0],new Li(t.Code,t.Name))])}class Hi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}const Vi=new Hi(2,[{}]);function Gi(e){return new Hi(2,[{HomeCountry:e}])}class Ui extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["FullTime","PartTime","LabourHire","SuperIncomeStream","Casual"]}}class zi extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Tfn"]}}class ji extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Under18AndBelowTaxThreshold","Pending","Pensioner"]}}class Wi extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["PreviousSurname"]}}function Yi(e){return e.fields[0]}function Ki(e){const t=function(e){const t=Oe(Si,e),n=t===e?new xr(0,[void 0]):new xr(1,["TFN must contain digits only"]);if(1===n.tag)return new xr(1,[n.fields[0]]);{const e=9===t.length?new xr(0,[void 0]):new xr(1,["TFN must be 9 digits"]);if(1===e.tag)return new xr(1,[e.fields[0]]);{const e=function(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,Xe(r,e));return n}(function(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=We(r,t.length);for(let r=0;r<=t.length-1;r++)Qe(o,r,e(Xe(r,t),Xe(r,n)));return o}(((e,t)=>e*t),Ke((e=>Dr(e,511,!1,32)),t.split(""),Int32Array),new Int32Array([1,4,3,7,5,8,6,9,10]),Int32Array),{GetZero:()=>0,Add:(e,t)=>e+t})%11==0?new xr(0,[void 0]):new xr(1,["TFN is not valid"]);return 1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[t])}}}(e);if(1===t.tag)return new xr(1,[t.fields[0]]);{const e=t.fields[0],r=function(e){if(i(e))return 0===e.length;if(e instanceof tt)return ft(e);{const t=Ut(e);try{return!t["System.Collections.IEnumerator.MoveNext"]()}finally{a(t)}}}((n={Equals:(e,t)=>e===t,GetHashCode:w},Kt(function(e,t,n){return zt((()=>{const r=new ki(e,n);return en((e=>Ci(e,r)),t)}))}(["0"],e.split(""),n))))?new xr(1,["TFN must not contain all zeros"]):new xr(0,[void 0]);return 1===r.tag?new xr(1,[r.fields[0]]):new xr(0,[e])}var n}class qi extends me{constructor(e,t){super(),this.Code=e,this.Name=t}}new class extends me{constructor(e){super(),this.Unused=e}}(void 0);class Zi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function Ji(){return Zr("Dto.Dto.ResidencyStatusV2Dto",[],Zi,(()=>[[],[],[["Item",qr(["HomeCountry",Jr(Kr("Dto.Dto.CountryDto",[],qi,(()=>[["Code",to],["Name",to]])))])]]]))}function Xi(e){let t,n;switch(e.tag){case 1:return new xr(0,[new Hi(1,[])]);case 2:return Ue((t=e.fields[0].HomeCountry,null==t?void 0:(n=Bi(t.Code),1===n.tag?new xr(1,[n.fields[0]]):new xr(0,[Gi(n.fields[0])]))),new xr(0,[Vi]));default:return new xr(0,[new Hi(0,[])])}}function Qi(e){switch(e){case 0:return new xr(0,[new Ui(0,[])]);case 1:return new xr(0,[new Ui(1,[])]);case 2:return new xr(0,[new Ui(2,[])]);case 3:return new xr(0,[new Ui(3,[])]);case 4:return new xr(0,[new Ui(4,[])]);default:return new xr(1,["Invalid EmploymentBasis"])}}function es(e){switch(e){case 0:return new xr(0,[new Fi(0,[])]);case 1:return new xr(0,[new Fi(1,[])]);case 2:return new xr(0,[new Fi(2,[])]);case 3:return new xr(0,[new Fi(3,[])]);case 4:return new xr(0,[new Fi(4,[])]);default:return new xr(1,["Invalid DebtSupport"])}}function ts(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}const ns=e=>{return t=es,r={Equals:(e,t)=>e===t,GetHashCode:v},n=qt(function(e,t){return zt((()=>{const n=new ki([],t);return en((e=>Ci(e,n)),e)}))}(e,r)),function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(ft(i)){const e=r;return 1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[gt(e.fields[0])])}{let s;const a=o(pt(i));if(1===a.tag)s=new xr(1,[a.fields[0]]);else{const e=r;s=1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[ct(a.fields[0],e.fields[0])])}if(1===s.tag)return s;e=s,t=o,n=ht(i);continue e}}}(new xr(0,[ut()]),t,n);var t,n,r};function rs(e){switch(e.tag){case 1:return 1;case 2:return 2;default:return 0}}class os extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}function is(){return Zr("Dto.Dto.ProvidedTfnInformationDto",[],os,(()=>[[["Item",to]],[["Item",Qr("Dto.Dto.ExemptionReasonDto",ro,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))}class ss extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","Exempted"]}}class as extends me{constructor(e,t,n,r,o,i,s){super(),this.TfnInformation=e,this.PreviousSurname=t,this.ResidencyStatus=0|n,this.ResidencyStatusV2=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class ls extends me{constructor(e,t){super(),this.ResidencyStatusV2=e,this.EmploymentBasis=0|t}}class us extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnInfo","EmploymentInfo"]}}class cs extends me{constructor(e,t){super(),this.Meta=e,this.Info=t}}class ds extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function fs(){return Zr("Dto.Commands.ResidencyStatusV2Dto",[],ds,(()=>[[],[],[["Item",Kr("Dto.Commands.WorkingHolidayPayload",[],ps,(()=>[["HomeCountry",Kr("Dto.Commands.CountryCode",[],hs,(()=>[["Code",to]]))]]))]]]))}class ps extends me{constructor(e){super(),this.HomeCountry=e}}class hs extends me{constructor(e){super(),this.Code=e}}class ms extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["CreateOrUpdate","Update","ProvideFullTfnDeclaration"]}}class $s extends me{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class gs extends me{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class ws extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted","Truncated"]}}function vs(e){return e}function ys(e){return Array.from(e)}function bs(e){return W(e,"O")}function xs(e){return function(e,t="c"){if(-1===["c","g","G"].indexOf(t))throw new Error("Custom formats are not supported");const n=Math.abs(function(e){return Hr(e/864e5)}(e)),r=Math.abs(function(e){return Hr(e%864e5/36e5)}(e)),o=Math.abs(function(e){return Hr(e%36e5/6e4)}(e)),i=Math.abs(function(e){return Hr(e%6e4/1e3)}(e)),s=Math.abs(function(e){return Hr(e%1e3)}(e));return`${e<0?"-":""}${0!==n||"c"!==t&&"g"!==t?"c"===t?n+".":n+":":""}${"g"===t?r:p(r,2)}:${p(o,2)}:${p(i,2)}${0!==s||"c"!==t&&"g"!==t?"g"===t?"."+p(s,3):"."+function(e){return e.toString(10).padStart(3,"0").padEnd(7,"0")}(s):""}`}(e)}function Ss(){return null}function _s(e){return W(e,"O")}function Es(e,t){return JSON.stringify(t,void 0,Be(e))}function Cs(e,t,n,r){let o;const i=new $e(null);let s;const a=io(r);let l;if(s=""===a?e:cr(a,i,e),vo(r)){const e=Ke((e=>{const r=Ir(t,oo(e)),o=Ts(s,t,n,e[1]);return t=>i=>{const s=function(e,t){return e[t[0]]}(t,e);return(!n||n&&null!=s)&&(i[r]=o(s)),i}}),$o(r));l=t=>tn(((e,n)=>n(t)(e)),{},e)}else{if(!wo(r))throw new Error((o=io(r),_e(xe("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>{const o=function(e,t){const n=mo(t)[e.tag];if(null==n)throw new Error(`Cannot find case ${e.name} in union type`);return[n,e.fields]}(e,r),i=o[0],a=o[1],l=0|a.length;if(0===l)return oo(i);{const e=0|l,r=bo(i),o=Ye(new Array(e+1),0,e+1,null);Qe(o,0,oo(i));for(let i=1;i<=e;i++)Qe(o,i,Ts(s,t,n,Xe(i-1,r)[1])(Xe(i-1,a)));return o}}}return i.contents=l,l}function Ts(e,t,n,r){const o=io(r),i=dr(o,e);if(null!=i){const e=i;return t=>e.contents(t)}if(so(r)){const o=Ts(e,t,n,ao(r));return e=>ys(rn(o,e))}if(uo(r))switch(io(fo(r))){case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;default:{const e=io(r);return Ee(xe("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}else{if(lo(r)){if(yo(r)){const o=Ke((r=>Ts(e,t,n,r)),go(r));return e=>{return ys((t=(e,t)=>Xe(e,o)(t),n=e,Jt((()=>Ut(n)),((e,n)=>n["System.Collections.IEnumerator.MoveNext"]()?Be(t(e,n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{a(e)}))));var t,n}}{const o=io(co(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new f((()=>{return o=Ts(e,t,n,Xe(0,jr(r))),e=>{return null!=(t=ze(o,e))?Fe(t):null;var t};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=Ts(e,t,n,Xe(0,jr(r)));return e=>ys(rn(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Xe(0,jr(r)),i=Ts(e,t,n,Xe(1,jr(r)));if("System.String"===io(o)||"System.Guid"===io(o))return e=>tn(((e,t)=>{const n=t;return e[n[0]]=i(n[1]),e}),{},e);{let r;const s=Ts(e,t,n,o);return r=s,e=>ys(rn((e=>{const t=e;return[r(t[0]),i(t[1])]}),e))}}return Cs(e,t,n,r)}}switch(o){case"System.Boolean":return e=>e;case"Microsoft.FSharp.Core.Unit":return Ss;case"System.String":return e=>e;case"System.Char":return e=>e;case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;case"System.Double":return e=>e;case"System.Single":return e=>e;case"System.DateTime":return _s;case"System.DateTimeOffset":return bs;case"System.TimeSpan":return xs;case"System.Guid":return vs;case"System.Object":return e=>e;default:return Cs(e,t,n,r)}}}function ks(e,t,n,r){const o=Ue(t,new Er(0,[])),i=Ue(r,!0);return Ts(function(e){return null!=e?fr(((e,t)=>new $e(t[0])),e.Coders):hr({Compare:C})}(n),o,i,e)}function Is(e){return _e(xe("%s/tfn-declaration/backend"))(e)}function As(e,t){return $n.Delay((()=>{const n=vr(function(e){return new Cn("Authorization",e)}(_e(xe("Bearer %s"))(e)),t);let r;const o=yr(n);return r=$n.Bind(o,(e=>$n.Return(new xr(0,[e])))),$n.Bind(r,(e=>{const t=e;if(1===t.tag)return $n.Return(new xr(1,[t.fields[0]]));{const e=t.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=yr(n);return $n.Bind(e,(e=>$n.Return(new xr(0,[e]))))}return $n.Return(new xr(0,[e]))}}))}))}const Ms=e=>ri(M(bi(Kr("Dto.BackendApiModels.Read.TfnDeclarationDetailsWithMeta",[],cs,(()=>[["Meta",qr(["AccountId",to])],["Info",Jr(Zr("Dto.BackendApiModels.Read.Information",[],us,(()=>[[["Item",Kr("Dto.BackendApiModels.Read.TfnDeclarationDetails",[],as,(()=>[["TfnInformation",Zr("Dto.BackendApiModels.Read.TfnInformation",[],ss,(()=>[[["Item",to]],[["Item",Qr("Dto.Dto.ExemptionReasonDto",ro,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))],["PreviousSurname",Jr(to)],["ResidencyStatus",Qr("Dto.Dto.ResidencyStatusDto",ro,[["AustralianResidentForTaxPurposes",0],["ForeignResidentForTaxPurposes",1],["WorkingHolidayMaker",2]])],["ResidencyStatusV2",Ji()],["EmploymentBasis",Qr("Dto.Dto.EmploymentBasisDto",ro,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",no],["HasDebtSupport",Xr(Qr("Dto.Dto.DebtSupportDto",ro,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Kr("Dto.BackendApiModels.Read.EmploymentInfo",[],ls,(()=>[["ResidencyStatusV2",Jr(Ji())],["EmploymentBasis",Qr("Dto.Dto.EmploymentBasisDto",ro,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])]]))]]])))]])),new Er(1,[]),void 0)),e);class Rs extends me{constructor(e){super(),this.Message=e}}function Os(e,t){return $n.Delay((()=>{const n=As(e,wr(new En(0,[]),gr(Is(t))));return $n.Bind(n,(e=>{const t=e;if(1===t.tag)return $n.Return(new xr(1,[t.fields[0]]));{const e=t.fields[0];if(200===e.statusCode){const t=Ms(e.responseText);return $n.Return(t)}return $n.Return(new xr(1,["Unexpected response from backend"]))}}))}))}function Ps(e,t){let n,r,o;const i=e.TfnInformation.Value;if(o=null==i?new xr(1,["missing TFN info"]):new xr(0,[i]),1===o.tag)return new xr(1,[o.fields[0]]);{const i=o.fields[0];let s;const a=e.PreviousSurname.Value;let l,u;s=null==a?void 0:Yi(a);const c=e.ResidencyStatus.Value;if(null==c)u=void 0;else{const e=function(e){switch(e.tag){case 1:return new xr(0,[new ds(1,[])]);case 2:{let t;const n=e.fields[0].HomeCountry;return t=null==n?new xr(1,["Home country should be specified for WorkingHolidayMaker"]):new xr(0,[n]),1===t.tag?new xr(1,[t.fields[0]]):new xr(0,[new ds(2,[new ps(new hs(t.fields[0].Code))])])}default:return new xr(0,[new ds(0,[])])}}(c);u=1===e.tag?void 0:e.fields[0]}if(l=null==u?new xr(1,["missing residency status"]):new xr(0,[u]),1===l.tag)return new xr(1,[l.fields[0]]);{const o=l.fields[0];let a,u;const c=e.EmploymentBasisRadioButtonGroup.Value;if(u=null==c?void 0:function(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}(c),a=null==u?new xr(1,["missing employment basis"]):new xr(0,[u]),1===a.tag)return new xr(1,[a.fields[0]]);{const l=0|a.fields[0];let u,c;const d=e.ClaimTaxFreeThreshold.Selected;if(c=null==d?void 0:(n=d,!(1===n.tag)),u=null==c?new xr(1,["missing is tax-free threshold claimed"]):new xr(0,[c]),1===u.tag)return new xr(1,[u.fields[0]]);{const n=u.fields[0],a=Ue((r=e.DebtSupportCheckboxGroup.Value,null==r?void 0:(e=>xt(ts,e))(r)),ut()),c=()=>0===i.tag?new xr(1,["New TFN declaration cannot have a truncated TFN"]):1===i.fields[0].tag?new xr(0,[new os(1,[rs(i.fields[0].fields[0])])]):new xr(0,[new os(0,[i.fields[0].fields[0].fields[0]])]),d=t.Info;if(null!=d){if(0===d.tag)return new xr(0,[dt(new ms(1,[new gs(t.Meta.AccountId,0===i.tag?new ws(2,[i.fields[0]]):1===i.fields[0].tag?new ws(1,[rs(i.fields[0].fields[0])]):new ws(0,[i.fields[0].fields[0].fields[0]]),s,o,l,n,a)]))]);{const e=c();return 1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[dt(new ms(2,[{EmploymentBasis:l,HasDebtSupport:a,IsTaxFreeThresholdClaimed:n,PreviousSurname:Le(s),ResidencyStatus:o,TfnInformation:e.fields[0]}]))])}}{const e=c();return 1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[dt(new ms(0,[new $s(t.Meta.AccountId,e.fields[0],s,o,l,n,a)]))])}}}}}}class Ns extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadRequest","Other"]}}function Ds(e,t,n){return $n.Delay((()=>{let r;const o=e.PreExistingTfnDec;let i,s;if(2===o.tag&&0===o.fields[0].tag?(i=0,s=o.fields[0].fields[0]):i=1,0===i)r=$n.Delay((()=>$n.Return(new xr(0,[s]))));else{const e=Os(t,n);r=$n.Bind(e,(e=>{let t;const n=e;return t=1===n.tag?new xr(1,[new Ns(1,[n.fields[0]])]):new xr(0,[n.fields[0]]),$n.Return(t)}))}return $n.Bind(r,(r=>{const o=r;if(1===o.tag)return $n.Return(new xr(1,[o.fields[0]]));{const r=o.fields[0];let i,s;const a=Ps(e,r);return s=1===a.tag?new xr(1,[new Ns(1,[a.fields[0]])]):new xr(0,[a.fields[0]]),i=$n.Return(s),$n.Bind(i,(e=>{let o;const i=e;if(1===i.tag)return $n.Return(new xr(1,[i.fields[0]]));{const e=i.fields[0];if(ft(e))return $n.Return(new xr(0,[r]));{const r=As(t,(s=new Tn(1,[Es(0,ks(Xr(Zr("Dto.Commands.TfnDeclarationCommandDto",[],ms,(()=>[[["Item",Kr("Dto.Commands.TfnDeclarationDetailsDto",[],$s,(()=>[["AccountId",to],["TfnInformation",is()],["PreviousSurname",Jr(to)],["ResidencyStatus",fs()],["EmploymentBasis",Qr("Dto.Dto.EmploymentBasisDto",ro,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",no],["HasDebtSupport",Xr(Qr("Dto.Dto.DebtSupportDto",ro,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Kr("Dto.Commands.UpdateTfnDeclarationDetailsDto",[],gs,(()=>[["AccountId",to],["TfnInformation",Zr("Dto.Commands.UpdateProvidedTfnInformationDto",[],ws,(()=>[[["Item",to]],[["Item",Qr("Dto.Dto.ExemptionReasonDto",ro,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]],[["Item",to]]]))],["PreviousSurname",Jr(to)],["ResidencyStatus",fs()],["EmploymentBasis",Qr("Dto.Dto.EmploymentBasisDto",ro,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",no],["HasDebtSupport",Xr(Qr("Dto.Dto.DebtSupportDto",ro,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",qr(["EmploymentBasis",Qr("Dto.Dto.EmploymentBasisDto",ro,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["HasDebtSupport",Xr(Qr("Dto.Dto.DebtSupportDto",ro,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))],["IsTaxFreeThresholdClaimed",no],["PreviousSurname",Jr(to)],["ResidencyStatus",fs()],["TfnInformation",is()])]]]))),new Er(1,[]),void 0,void 0)(e))]),a=wr(new En(2,[]),gr(Is(n))),o=new kn(a.url,a.method,a.headers,a.withCredentials,a.overridenMimeType,a.overridenResponseType,a.timeout,s),vr(new Cn("Content-Type","application/json"),o)));return $n.Bind(r,(e=>{const t=e;if(1===t.tag)return $n.Return(new xr(1,[t.fields[0]]));{const e=t.fields[0];let r;switch(0|e.statusCode){case 200:{const t=Ms(e.responseText);r=1===t.tag?new xr(1,[new Ns(1,[t.fields[0]])]):new xr(0,[t.fields[0]]);break}case 400:{let t;const o=(n=e.responseText,ri(M(bi(Kr("Service.BadRequestErrorDetails",[],Rs,(()=>[["Message",to]])),new Er(1,[]),void 0)),n));t=1===o.tag?new xr(1,[new Ns(1,[o.fields[0]])]):new xr(0,[o.fields[0]]),r=1===t.tag?new xr(1,[t.fields[0]]):new xr(1,[new Ns(0,[t.fields[0].Message])]);break}default:r=new xr(1,[new Ns(1,["Unexpected response from backend"])])}return $n.Return(r)}var n}))}}var s,a}))}}))}))}class Fs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Success","Failure","Info"]}}function Ls(e){switch(e.tag){case 0:return"text-green-700";case 2:return"text-blue-700";default:return"text-red-700"}}function Bs(e){switch(e.tag){case 0:return"bg-green-50";case 2:return"bg-blue-50";default:return"bg-red-50"}}function Hs(e){return e.tag,e.fields[0]}function Vs(e){let t,n,o,i;const s=e.hideAlert,a=e.alert,l=wn();return un((()=>{!function(e,t){xn($n.Delay((()=>$n.Bind(bn(5e3),(()=>(e(),$n.Zero()))))),t)}(s,l)})),(0,r.createElement)("div",I(yt([["className",Ie(" ",["rounded-md","p-4","my-4",Bs(a)])],["data-testid","alert"],(t=[(0,r.createElement)("div",I(yt([["className",Ie(" ",["flex"])],(n=[(0,r.createElement)("p",{className:Ie(" ",["text-sm","pr-2",Ls(a)]),children:Hs(a)}),(0,r.createElement)("div",I(yt([["className",Ie(" ",["ml-auto"])],(o=[(0,r.createElement)("div",I(yt([["className",Ie(" ",["-mx-1.5","-my-1.5"])],(i=[(0,r.createElement)("button",{type:"button",className:Ie(" ",qt(zt((()=>Xt(Yt("inline-flex"),zt((()=>Xt(Yt("rounded-md"),zt((()=>Xt(Yt("p-1.5"),zt((()=>Xt(Yt("focus:outline-none"),zt((()=>Xt(Yt("focus:ring-2"),zt((()=>Xt(Yt("focus:ring-offset-2"),zt((()=>function(e){switch(e.tag){case 0:return yt(["bg-green-50","text-green-500","hover:bg-green-100","focus:ring-offset-green-50","focus:ring-green-600"]);case 2:return yt(["bg-blue-50","text-blue-500","hover:bg-blue-100","focus:ring-offset-blue-50","focus:ring-blue-600"]);default:return yt(["bg-red-50","text-red-500","hover:bg-red-100","focus:ring-offset-red-50","focus:ring-red-600"])}}(a))))))))))))))))))))))),children:Et.Children.toArray([Mt]),onClick:e=>{vn(l),s()}})],["children",Et.Children.toArray(Array.from(i))])])))],["children",Et.Children.toArray(Array.from(o))])])))],["children",Et.Children.toArray(Array.from(n))])])))],["children",Et.Children.toArray(Array.from(t))])])))}class Gs extends me{constructor(e,t){super(),this.Value=e,this.Meta=t}}function Us(){return new Gs(void 0,{Valid:!1})}function zs(e){return new Gs(e,{Valid:!0})}function js(e){return new Gs(e,{Valid:!1})}function Ws(e){switch(e.tag){case 1:return"ForeignResidentForTaxPurposes";case 2:return"WorkingHolidayMaker";default:return"AustralianResidentForTaxPurposes"}}function Ys(e){switch(e){case"HELP":return new Fi(0,[]);case"VETStudentLoan":return new Fi(1,[]);case"FinancialSupplement":return new Fi(2,[]);case"StudentStartUpLoan":return new Fi(3,[]);case"TradeSupportLoan":return new Fi(4,[]);default:return}}function Ks(e){switch(e){case"FullTime":return new Ui(0,[]);case"PartTime":return new Ui(1,[]);case"LabourHire":return new Ui(2,[]);case"SuperIncomeStream":return new Ui(3,[]);case"Casual":return new Ui(4,[]);default:return}}function qs(e){return(0,r.createElement)("p",{className:Ie(" ",["block","text-sm","font-medium","text-gray-700","leading-5"]),children:e})}function Zs(e){let t;return(0,r.createElement)("div",I(yt([["className","flex items-start p-4 space-x-3 bg-amber-50 rounded-md mt-4"],(t=[Ot,(0,r.createElement)("span",{className:"text-sm leading-5 font-normal text-amber-700",children:e})],["children",Et.Children.toArray(Array.from(t))])])))}class Js extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Yes","No"]}}class Xs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Select","SelectInternal"]}}class Qs extends me{constructor(e,t){super(),this.Selected=e,this.Meta=t}}function ea(e){return new Qs(e,{Touched:!1})}function ta(e,t){return 1===e.tag?e.fields[1]||!t.Meta.Touched?new Qs(e.fields[0],t.Meta):t:new Qs(e.fields[0],{Touched:!0})}function na(e){const t=_(e.Parent.State.Selected,e.Selection)?qt(zt((()=>Xt(null!=e.Parent.Disable?Yt("bg-gray-50"):Yt("bg-white"),zt((()=>Xt(Yt("border-gray-200"),zt((()=>Xt(Yt("shadow-sm"),zt((()=>null!=e.Parent.Disable?Yt("text-gray-400"):Yt("text-gray-900"))))))))))))):qt(zt((()=>Xt(Yt("shadow-none"),zt((()=>null!=e.Parent.Disable?Yt("text-gray-400"):Yt("text-gray-700")))))));return(0,r.createElement)("button",{className:Ie(" ",qt(zt((()=>Xt(Yt("relative"),zt((()=>Xt(Yt("w-1/2"),zt((()=>Xt(Yt("border-gray-200"),zt((()=>Xt(Yt("rounded-md"),zt((()=>Xt(Yt("shadow-sm"),zt((()=>Xt(Yt("py-2"),zt((()=>Xt(Yt("text-sm"),zt((()=>Xt(Yt("font-medium"),zt((()=>Xt(Yt("whitespace-nowrap"),zt((()=>Xt(Yt("focus:outline-none"),zt((()=>Xt(Yt("focus:ring-inset"),zt((()=>Xt(Yt("focus:ring-1"),zt((()=>Xt(Yt("focus:ring-primary-focus"),zt((()=>Xt(Yt("focus:z-10"),zt((()=>Xt(Yt("w-auto"),zt((()=>Xt(Yt("px-8"),zt((()=>Xt(_(e.Parent.Disable,e.Selection)?Yt("disabled:cursor-not-allowed"):Wt(),zt((()=>t))))))))))))))))))))))))))))))))))))))))))))))))))))))),type:"button",name:"yesNoButtonGroup",onClick:t=>{e.Parent.Dispatch(new Xs(0,[e.Selection]))},disabled:_(e.Parent.Disable,e.Selection),children:pe(e.Selection)})}function ra(e){let t;return(0,r.createElement)("div",I(yt([["className",Ie(" ",["relative","self-start","bg-gray-100","rounded-lg","p-0.5","flex","mt-2","space-x-0.5"])],(t=[na({Parent:e,Selection:new Js(0,[])}),na({Parent:e,Selection:new Js(1,[])})],["children",Et.Children.toArray(Array.from(t))])])))}function oa(e,t,n){wt((n=>{try{n(t)}catch(t){e(t)}}),n)}function ia(){return ut()}function sa(e,t){return xt((t=>n=>{t((t=>{n(e(t))}))}),t)}function aa(e,t,n,r){return dt((o=>{e(t).then((e=>{o(n(e))})).catch((e=>{o(r(e))}))}))}function la(e){return Ie("/",e)}function ua(e,t,n){try{a(n)}catch(n){e(["Error stopping subscription: "+la(t),n])}}function ca(e,t){wt((t=>{ua(e,t[0],t[1])}),t)}function da(e,t,n,r,o,i){return wt((t=>{!function(e,t){const n=new Error("Duplicate SubId");e(["Duplicate SubId: "+la(t),n])}(e,t)}),n),wt((t=>{ua(e,t[0],t[1])}),r),bt(o,_t((n=>function(e,t,n,r){try{return[n,r(t)]}catch(t){return void e(["Error starting subscription: "+la(n),t])}}(e,t,n[0],n[1])),i))}function fa(e){return t=(e,t)=>{return n=e[0],r=e[1],o=t[0],i=t[1],s=t[2],Xo(n,i)?[ct(n,o),i,s]:[o,Qo(n,i),ct([n,r],s)];var n,r,o,i,s},n=e,r=[ut(),(o={Compare:k},qo(o)),ut()],et(t,mt(n),r);var t,n,r,o}const pa=ut();function ha(e,t){const n=Wo(r={Compare:k},zo(r,xt((e=>e[0]),e)));var r;const o=fa(t),i=o[1],s=o[0];if(n.Equals(i))return[s,ut(),e,ut()];{const t=function(e,t){const n=rt(),r=rt(),o=n,s=$t(((e,t)=>{let n,r;const o=e[0],s=e[1];return(e=>Xo(e[0],i))(t)?[(n=new tt(t,void 0),o.tail=n,n),s]:[o,(r=new tt(t,void 0),s.tail=r,r)]}),[o,r],t),a=rt();s[0].tail=a;const l=rt();return s[1].tail=l,[lt(o),lt(r)]}(0,e);return[s,t[1],t[0],St((e=>!Xo(e[0],n)),o[2])]}}function ma(e,t){return e>t?e:t}function $a(e,t,n,r,o){const i=function(e,t,n,r){const o=0|k(e,n);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return n=>{const o=0|k(n,t);return i&&o<=0||!i&&o>=0?[n,r(n,e)]:void 0}}(t,n,r,o);return zt((()=>{return t=i,n=e,Gt((()=>function(e,t){let n,r=t;return Ht((()=>{if(null!=n){const e=Fe(n)[0];return Fe(n)[1],e}return Dt()}),(()=>{if(n=e(r),null!=n){Fe(n)[0];const e=Fe(n)[1];return r=e,!0}return!1}),(()=>{}))}(t,n)));var t,n}))}class ga extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Writable","ReadWritable"]}}class wa{constructor(e){this.state=new ga(0,[Ye(new Array(ma(e,10)),0,ma(e,10),null),0])}}function va(e){const t=e.state;if(1===t.tag){const n=0|t.fields[1],r=0|t.fields[2],o=t.fields[0],i=(r+1)%o.length|0;return e.state=i===n?new ga(0,[o,n]):new ga(1,[o,n,i]),Be(Xe(r,o))}}class ya extends me{constructor(e,t,n,r,o,i,s){super(),this.init=e,this.update=t,this.subscribe=n,this.view=r,this.setState=o,this.onError=i,this.termination=s}}function ba(e,t,n){return new ya(e,t,(e=>ut()),n,M((e=>{const t=R(n)(e);return e=>{t(e)}})),(e=>{var t,n;t=e[0],n=e[1],console.error(Be(t),n)}),[e=>!1,e=>{}])}function xa(e,t){return new ya(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function Sa(e){return R(e.view)}function _a(e,t,n){let r;const o=n.init(t),i=o[0],s=n.subscribe(i),l=n.termination,u=new wa(10);let c=!1,d=i,f=pa,p=!1;const h=R(e)((e=>{p||(function(e,t){const n=e.state;if(1===n.tag){const i=0|n.fields[1],s=0|n.fields[2],l=n.fields[0];Qe(l,i,t);const u=(i+1)%l.length|0;e.state=new ga(1,u===s?[(r=s,o=l,Array.from(zt((()=>Xt(sn(r,o),zt((()=>{return Xt((e=r,t=o,Jt((()=>Ut(t)),((t,n)=>{if(t<e){if(n["System.Collections.IEnumerator.MoveNext"]())return Be(n["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Nt+"\\nParameter name: source")}}),(e=>{a(e)}))),zt((()=>an((e=>Yt(null)),$a(0,1,o.length,0,((e,t)=>e+t))))));var e,t}))))))),l.length,0]:[l,u,s])}else{const r=0|n.fields[1],o=n.fields[0];Qe(o,r,t);const i=(r+1)%o.length|0;e.state=new ga(1,[o,i,r])}var r,o}(u,e),c||(c=!0,m(),c=!1))})),m=()=>{let e,t=va(u);for(;!p&&null!=t;){const r=Fe(t);if(l[0](r))ca(n.onError,f),l[1](d),p=!0;else{const o=n.update(r,d),i=o[0],s=n.subscribe(i);n.setState(i,h),oa((e=>{n.onError([_e(xe("Error handling the message: %A"))(r),e])}),h,o[1]),d=i,e=ha(f,s),f=da(n.onError,h,e[0],e[1],e[2],e[3]),t=va(u)}}};c=!0,n.setState(i,h),oa((e=>{n.onError([_e(xe("Error intitializing:")),e])}),h,o[1]),r=ha(f,s),f=da(n.onError,h,r[0],r[1],r[2],r[3]),m(),c=!1}function Ea(e,t){_a(M((e=>e)),e,t)}var Ca=n(888);class Ta{constructor(e,t,n){this.arg=t,this.dependencies=n;const r=e(),o=[];let i;this.finalDispatch=void 0;const l=function(e){return e.init}(r)(this.arg);let u=l[0],c=l[1];i=[[u,e=>{const t=this.finalDispatch;null==t?o.push(e):t(e)},!1,o],c],this.state=i[0],this.cmd=i[1],this.subscribe=e=>{let t=!1;const n=s(this.state[0]);return Ea(this.arg,xa(((t,n)=>{const r=this.state;this.finalDispatch=n,this.state=[t,r[1],!0,o],t!==r[0]&&e()}),function(e,r,o,i,l,u,c){const d=R(e)(c.init),f=P(r)(R(c.update)),p=P(o)(R(c.view)),h=P(i)(R(c.setState));return new ya(d,M(f),R(l)(c.subscribe),M(p),M(h),c.onError,(m=c.termination,[e=>!!m[0](e)||n&&t,e=>{const t=e;s(t)?a(t):m[1](e)}]));var m}(((e,t)=>{const n=this.cmd;return this.cmd=ia(),[this.state[0],n]}),((e,t,n)=>e(t)(this.state[0])),O((e=>e)),O((e=>e)),M((e=>e)),0,r))),()=>{t=!0}}}}function ka(e,t,n){return new Ta(e,t,n)}function Ia(e,t,n){const o=(0,r.useState)((()=>ka(e,t,n))),s=o[0];(function(e,t,n){return!_(e.arg,t)||!_(e.dependencies,n)})(s,t,n)&&o[1](ka(e,t,n));const l=(0,Ca.useSyncExternalStore)(function(e){return e.subscribe}(s),(()=>function(e){return e.state}(s))),u=l[2],d=l[3],f=l[1];return(0,r.useEffect)((()=>{if(u&&d.length>0){let t=c(d);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout((()=>{f(e)}))}}finally{a(t)}i(e=d)?e.splice(0):e.clear()}var e}),[u,d]),[l[0],f]}class Aa extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class Ma extends me{constructor(e){super(),this.Selected=e}}function Ra(e){let t,n;const o=(i=e.InitialValue,[new Ma(i),ia()]);var i;return n=Ia((()=>ba((()=>o),((t,n)=>function(e,t){const n=function(e){return new Ma(e.fields[0])}(t);return e(new Gs(n.Selected,{Valid:null!=n.Selected})),[n,ia()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("div",I(yt([["className",Ie(" ",["space-y-2","mt-2"])],(t=qt(zt((()=>an((t=>{let o,i;const s=t[0];return Yt((0,r.createElement)("label",I(yt([["className",Ie(" ",["flex","items-start"])],(o=[(0,r.createElement)("input",{className:Ie(" ",["focus:ring-primary-focus","block","mt-0.5","mb-0.5","h-4","w-4","text-primary-base","border-gray-300"]),type:"radio",name:e.Name,id:s,checked:Ve(n[0].Selected)===s,onChange:e=>{e.target.checked,n[1](new Aa(s))}}),(0,r.createElement)("label",I(yt([["className",Ie(" ",["ml-3","block","text-sm"])],["for",s],(i=qt(zt((()=>Xt(Yt((0,r.createElement)("span",{className:Ie(" ",["block","text-gray-900"]),children:t[1]})),zt((()=>{const e=t[2];if(null==e)return Yt(null);{const t=e;return Yt((0,r.createElement)("span",{className:Ie(" ",["block","text-gray-500"]),children:t}))}})))))),["children",Et.Children.toArray(Array.from(i))])])))],["children",Et.Children.toArray(Array.from(o))])]))))}),e.ValueLabelPairs)))),["children",Et.Children.toArray(Array.from(t))])])))}class Oa extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetTfnInput","SetTfnTouched","SetTfnExemptionReason","SwitchEditingState","HideAlert"]}}class Pa extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}class Na extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","TfnValue"]}}class Da extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Truncated","Editing"]}}class Fa extends me{constructor(e,t,n,r,o){super(),this.YesNoButtonGroup=e,this.TruncatedTfn=t,this.CurrentAlert=n,this.EditingState=r,this.TfnInputTouched=o}}function La(e){let t;const n=e.EditingState;if(1===n.tag){const e=n.fields[0];return new Gs((t=e.Value,null==t?void 0:new Na(1,[t])),e.Meta)}return new Gs(new Na(0,[Ve(e.TruncatedTfn)]),{Valid:!0})}const Ba=e=>!(1===Ki(e).tag);function Ha(e){const t=e.EditingState;if(1===t.tag){const n=t.fields[0],r=n.Value;if(null==r)return new Fa(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Da(1,[new Gs(n.Value,{Valid:!1})]),e.TfnInputTouched);if(1===r.tag)return new Fa(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Da(1,[new Gs(n.Value,{Valid:!0})]),e.TfnInputTouched);{const t=r.fields[0].fields[0];return new Fa(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Da(1,[new Gs(n.Value,{Valid:Ba(t)})]),e.TfnInputTouched)}}return e}function Va(e){const t=e.EditingState;if(1===t.tag){const e=t.fields[0].Value;let n,r;return null!=e&&0===e.tag?(n=0,r=e.fields[0]):n=1,0===n?r.fields[0]:""}return""}function Ga(e){if(e.TfnInputTouched){const t=e.EditingState;return 1===t.tag&&!t.fields[0].Meta.Valid}return!1}function Ua(e){let t,n,o,i,s;const a=function(e){let t,n,r;return[Ha(new Fa(ea(null!=e&&1===e.tag&&1===e.fields[0].tag?new Js(1,[]):new Js(0,[])),(t=e,null!=t&&0===t.tag?(n=t.fields[0],n):void 0),void 0,null==e?new Da(1,[Us()]):1===e.tag?(r=e.fields[0],new Da(1,[new Gs(r,{Valid:!1})])):new Da(0,[]),!1)),ia()]}(e.InitialValue);s=Ia((()=>ba((()=>a),((t,n)=>function(e,t,n){const r=function(e,t){switch(e.tag){case 2:return new Fa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,t.EditingState,!0);case 1:{const n=e.fields[0],r=new Pa(0,[new zi(n)]),o=Ba(n);return t.EditingState.tag,new Fa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Da(1,[new Gs(r,{Valid:o})]),t.TfnInputTouched)}case 3:{const n=e.fields[0];let r,o;const i=n.Value;return o=null==i?void 0:function(e){switch(e){case"Under18AndBelowTaxThreshold":return new ji(0,[]);case"Pending":return new ji(1,[]);case"Pensioner":return new ji(2,[]);default:return}}(i),r=null==o?void 0:new Pa(1,[o]),t.EditingState.tag,new Fa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Da(1,[new Gs(r,n.Meta)]),t.TfnInputTouched)}case 4:return 1===t.EditingState.tag?new Fa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Da(0,[]),t.TfnInputTouched):new Fa(t.YesNoButtonGroup,t.TruncatedTfn,new Fs(2,["Please click the continue button at the end of\n this form to save the changes to your TFN."]),new Da(1,[Us()]),!1);case 5:return Ha(new Fa(t.YesNoButtonGroup,t.TruncatedTfn,void 0,t.EditingState,t.TfnInputTouched));default:{const n=e.fields[0];let r,o;n.tag,o=n.fields[0];const i=t.EditingState;if(1===o.tag)if(1===i.tag){const e=i.fields[0].Value;let n;n=null!=e&&1===e.tag?0:1,r=0===n?t.EditingState:new Da(1,[Us()])}else r=new Da(1,[Us()]);else if(1===i.tag){const e=i.fields[0].Value,n=t.TruncatedTfn;let o,s;switch(null!=e&&0===e.tag?o=0:null!=n?(o=1,s=n):o=2,o){case 0:r=t.EditingState;break;case 1:r=new Da(0,[]);break;default:r=new Da(1,[Us()])}}else r=new Da(0,[]);return new Fa(ta(n,t.YesNoButtonGroup),t.TruncatedTfn,t.CurrentAlert,r,t.TfnInputTouched)}}}(t,n);return e(La(r)),[r,ia()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const l=s[0],u=s[1],c=null==l.TruncatedTfn?null:(0,r.createElement)("div",I(dt((t=[(0,r.createElement)("button",I(yt([["className",Ie(" ",["relative","inline-flex","items-center","space-x-2","px-3","sm:py-2","py-3","border","border-gray-300","text-sm","font-medium","rounded-r-md","text-gray-700","bg-gray-50","hover:bg-gray-100","focus:outline-none","focus:ring-1","focus:ring-primary-focus","focus:border-primary-focus","focus:z-20","-ml-px"])],["type","button"],(n=qt(zt((()=>_(l.EditingState,new Da(0,[]))?Xt(Yt(Tt),zt((()=>Yt((0,r.createElement)("span",{children:["Edit"]}))))):Xt(Yt(kt),zt((()=>Yt((0,r.createElement)("span",{children:["Cancel"]})))))))),["children",Et.Children.toArray(Array.from(n))]),["onClick",e=>{u(new Oa(4,[]))}]])))],["children",Et.Children.toArray(Array.from(t))]))));return(0,r.createElement)("div",I(yt([["className",Ie(" ",Pt)],(o=[qs("Do you have your Tax File Number (TFN)?"),(0,r.createElement)(ra,{Dispatch:e=>{u(new Oa(0,[e]))},State:l.YesNoButtonGroup}),(0,r.createElement)("div",I(yt([["className",Ie(" ",["mt-4"])],(i=qt(zt((()=>{let e,t,n,o,i,s;return Xt((e=l.YesNoButtonGroup.Selected,null!=e?1===e.tag?Yt((0,r.createElement)(Ra,(t=xt((e=>[pe(e[0]),e[1],e[2]]),yt([[new ji(1,[]),"My TFN is pending",void 0],[new ji(0,[]),"I'm under 18 and don't have a TFN",void 0],[new ji(2,[]),"I have an exemption from quoting a TFN","E.g. receiving a social security or service pension"]])),{InitialValue:Le((n=La(l).Value,null!=n&&1===n.tag&&1===n.fields[0].tag?(o=n.fields[0].fields[0],pe(o)):void 0)),Name:"TfnExemption",OnUpdate:e=>{u(new Oa(3,[e]))},ValueLabelPairs:t}))):(i=l.TruncatedTfn,null!=i&&0===l.EditingState.tag?(s=i,Xt(Yt(qs("Enter your TFN")),zt((()=>{let e,t,n;return Yt((0,r.createElement)("div",I(yt([["className",Ie(" ",["mt-1","flex","rounded-md","shadow-sm"])],(e=[(0,r.createElement)("div",I(yt([["className","relative flex items-stretch flex-grow"],(t=[(0,r.createElement)("input",I(yt([["className",Ie(" ",["focus:ring-primary-focus","focus:border-primary-focus","bg-gray-50","focus:z-20","relative","block","w-full","rounded-none","rounded-l-md","pl-3","sm:text-sm","text-base","border","border-gray-300","text-gray-500"])],["disabled",!0],(n=`*** *** *${s}`,["ref",e=>{null==e||_(e.value,n)||(e.value=n)}])])))],["children",Et.Children.toArray(Array.from(t))])]))),c],["children",Et.Children.toArray(Array.from(e))])]))))})))):Xt(Yt(qs("Enter your TFN")),zt((()=>{let e;return Yt((0,r.createElement)("div",I(yt([["className",Ie(" ",["mt-1"])],(e=qt(zt((()=>{let e,t;return Xt(Yt((0,r.createElement)("div",I(yt([["className",Ie(" ",["relative","flex","items-stretch","flex-grow"])],(e=[(0,r.createElement)("input",I(yt([["className",Ie(" ",qt(zt((()=>Xt(Yt("block"),zt((()=>Xt(Yt("w-full"),zt((()=>Xt(Yt("focus:outline-none"),zt((()=>Xt(Yt("text-base"),zt((()=>Xt(Yt("focus:z-20"),zt((()=>Xt(Yt("relative"),zt((()=>Xt(Yt("sm:text-sm"),zt((()=>Xt(Yt("rounded-md"),zt((()=>Xt(Yt("border-gray-300"),zt((()=>Xt(Yt("focus:ring-primary-focus"),zt((()=>Xt(Yt("focus:border-primary-focus"),zt((()=>Xt(Yt("block"),zt((()=>Xt(Yt("w-full"),zt((()=>Xt(null==l.TruncatedTfn?Yt("rounded-md"):Yt("rounded-none rounded-l-md"),zt((()=>Ga(l)?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:Wt()))))))))))))))))))))))))))))))))))))))))))))))],["type","text"],["onChange",e=>{u(new Oa(1,[Oe(Si,e.target.value)]))}],(t=Va(l),["ref",e=>{null==e||_(e.value,t)||(e.value=t)}]),["onBlur",e=>{u(new Oa(2,[]))}],["inputMode","numeric"],["data-testid","tfn-input"]]))),c],["children",Et.Children.toArray(Array.from(e))])])))),zt((()=>Ga(l)?Yt((0,r.createElement)("div",{className:Ie(" ",["mt-1","text-sm","text-red-600"]),children:"That isn’t a valid Tax File Number"})):Wt())))}))),["children",Et.Children.toArray(Array.from(e))])]))))})))):Yt(null)),zt((()=>{let e;return Yt((e=qt(zt((()=>{const e=l.CurrentAlert;if(null==e)return Yt(null);{const t=e;return Yt((0,r.createElement)(Vs,{alert:t,hideAlert:()=>{u(new Oa(5,[]))}}))}}))),(0,r.createElement)("div",{children:Et.Children.toArray(Array.from(e))})))})))}))),["children",Et.Children.toArray(Array.from(i))])])))],["children",Et.Children.toArray(Array.from(o))])])))}function za(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function ja(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Wa(e){let t=null;return()=>(null==t&&(t=e()),t)}const Ya=Wa((function(){return ja(/^Mac/i)})),Ka=Wa((function(){return ja(/^iPhone/i)})),qa=Wa((function(){return ja(/^iPad/i)||Ya()&&navigator.maxTouchPoints>1})),Za=Wa((function(){return Ka()||qa()})),Ja=(Wa((function(){return Ya()||Za()})),Wa((function(){return za(/AppleWebKit/i)&&!Ja()})),Wa((function(){return za(/Chrome/i)}))),Xa=Wa((function(){return za(/Android/i)}));Wa((function(){return za(/Firefox/i)}));const Qa=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},el=e=>e&&"window"in e&&e.window===e?e:Qa(e).defaultView||window;let tl=null,nl=new Set,rl=new Map,ol=!1,il=!1;const sl={Tab:!0,Escape:!0};function al(e,t){for(let n of nl)n(e,t)}function ll(e){ol=!0,function(e){return!(e.metaKey||!Ya()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(tl="keyboard",al("keyboard",e))}function ul(e){tl="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(ol=!0,al("pointer",e))}function cl(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Xa()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(ol=!0,tl="virtual")}function dl(e){e.target!==window&&e.target!==document&&(ol||il||(tl="virtual",al("virtual",e)),ol=!1,il=!1)}function fl(){ol=!1,il=!0}function pl(e){if("undefined"==typeof window||rl.get(el(e)))return;const t=el(e),n=Qa(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ol=!0,r.apply(this,arguments)},n.addEventListener("keydown",ll,!0),n.addEventListener("keyup",ll,!0),n.addEventListener("click",cl,!0),t.addEventListener("focus",dl,!0),t.addEventListener("blur",fl,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",ul,!0),n.addEventListener("pointermove",ul,!0),n.addEventListener("pointerup",ul,!0)):(n.addEventListener("mousedown",ul,!0),n.addEventListener("mousemove",ul,!0),n.addEventListener("mouseup",ul,!0)),t.addEventListener("beforeunload",(()=>{hl(e)}),{once:!0}),rl.set(t,{focus:r})}const hl=(e,t)=>{const n=el(e),r=Qa(e);t&&r.removeEventListener("DOMContentLoaded",t),rl.has(n)&&(n.HTMLElement.prototype.focus=rl.get(n).focus,r.removeEventListener("keydown",ll,!0),r.removeEventListener("keyup",ll,!0),r.removeEventListener("click",cl,!0),n.removeEventListener("focus",dl,!0),n.removeEventListener("blur",fl,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",ul,!0),r.removeEventListener("pointermove",ul,!0),r.removeEventListener("pointerup",ul,!0)):(r.removeEventListener("mousedown",ul,!0),r.removeEventListener("mousemove",ul,!0),r.removeEventListener("mouseup",ul,!0)),rl.delete(n))};function ml(){return"pointer"!==tl}"undefined"!=typeof document&&function(e){const t=Qa(e);let n;"loading"!==t.readyState?pl(e):(n=()=>{pl(e)},t.addEventListener("DOMContentLoaded",n))}();const $l=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);const gl="undefined"!=typeof document?r.default.useLayoutEffect:()=>{};class wl{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function vl(e){let t=(0,r.useRef)({isFocused:!1,observer:null});gl((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=(0,r.useRef)(null);return gl((()=>{t.current=e}),[e]),(0,r.useCallback)(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return(0,r.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{t.current.isFocused=!1,r.disabled&&n(new wl("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}function yl(e={}){let{autoFocus:t=!1,isTextInput:n,within:o}=e,i=(0,r.useRef)({isFocused:!1,isFocusVisible:t||ml()}),[s,a]=(0,r.useState)(!1),[l,u]=(0,r.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),c=(0,r.useCallback)((()=>u(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,r.useCallback)((e=>{i.current.isFocused=e,a(e),c()}),[c]);var f,p,h;f=e=>{i.current.isFocusVisible=e,c()},p=[],h={isTextInput:n},pl(),(0,r.useEffect)((()=>{let e=(e,t)=>{(function(e,t,n){var r;const o="undefined"!=typeof window?el(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?el(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?el(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?el(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof o&&!$l.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof i||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!sl[n.key])})(!!(null==h?void 0:h.isTextInput),e,t)&&f(ml())};return nl.add(e),()=>{nl.delete(e)}}),p);let{focusProps:m}=function(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:i}=e;const s=(0,r.useCallback)((e=>{if(e.target===e.currentTarget)return o&&o(e),i&&i(!1),!0}),[o,i]),a=vl(s),l=(0,r.useCallback)((e=>{const t=Qa(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),a(e))}),[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||o)?l:void 0,onBlur:t||!o&&!i?void 0:s}}}({isDisabled:o,onFocusChange:d}),{focusWithinProps:$}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:o,onFocusWithinChange:i}=e,s=(0,r.useRef)({isFocusWithin:!1}),a=(0,r.useCallback)((e=>{s.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,s]),l=vl(a),u=(0,r.useCallback)((e=>{s.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),i&&i(!0),s.current.isFocusWithin=!0,l(e))}),[o,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}({isDisabled:!o,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:o?$:m}}let bl=!1,xl=0;function Sl(){bl=!0,setTimeout((()=>{bl=!1}),50)}function _l(e){"touch"===e.pointerType&&Sl()}function El(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",_l):document.addEventListener("touchend",Sl),xl++,()=>{xl--,xl>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",_l):document.removeEventListener("touchend",Sl))}}function Cl(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:o,isDisabled:i}=e,[s,a]=(0,r.useState)(!1),l=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(El,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,r.useMemo)((()=>{let e=(e,r)=>{if(l.pointerType=r,i||"touch"===r||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let o=e.currentTarget;l.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),a(!0)},r=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let r=e.currentTarget;o&&o({type:"hoverend",target:r,pointerType:t}),n&&n(!1),a(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{bl&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,e.pointerType)}):(s.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||bl||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,"mouse")}),{hoverProps:s,triggerHoverEnd:r}}),[t,n,o,i,l]);return(0,r.useEffect)((()=>{i&&c({currentTarget:l.target},l.pointerType)}),[i]),{hoverProps:u,isHovered:s}}function Tl(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,s,a,l;let u;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(u=Date.now());const c=e(),d=c.length!==o.length||c.some(((e,t)=>o[t]!==e));if(!d)return r;let f;if(o=c,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(f=Date.now()),r=t(...c),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-u))/100,t=Math.round(100*(Date.now()-f))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function kl(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const Il=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,o)),n)}},Al=e=>e,Ml=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Rl=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void o({width:e.inlineSize,height:e.blockSize})}o(n.getBoundingClientRect())}));return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Ol={passive:!0},Pl="undefined"==typeof window||"onscrollend"in window,Nl=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&Pl?()=>{}:Il(r,(()=>{t(o,!1)}),e.options.isScrollingResetDelay),s=r=>()=>{const{horizontal:s,isRtl:a}=e.options;o=s?n.scrollLeft*(a?-1:1):n.scrollTop,i(),t(o,r)},a=s(!0),l=s(!1);return l(),n.addEventListener("scroll",a,Ol),n.addEventListener("scrollend",l,Ol),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},Dl=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Fl=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const s=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class Ll{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Al,rangeExtractor:Ml,onChange:()=>{},measureElement:Dl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=Tl((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=Tl((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,n,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o})),{key:!1}),this.getMeasurements=Tl((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o},i)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,s);for(let o=s;o<e;o++){const e=r(o),s=1===this.options.lanes?a[o-1]:this.getFurthestMeasurement(a,o),l=s?s.end+this.options.gap:t+n,u=i.get(e),c="number"==typeof u?u:this.options.estimateSize(o),d=l+c,f=s?s.lane:o%this.options.lanes;a[o]={index:o,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=Tl((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=Bl(0,r,(t=>e[t].start),n);let i=o;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:o,endIndex:i}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=Tl((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const o=r.key,i=this.elementsCache.get(o);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=t-(this.itemSizeCache.get(n.key)??n.size);0!==r&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=Tl((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return kl(t[Bl(0,t.length-1,(e=>kl(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize(),r=this.getScrollOffset();"auto"===t&&(t=e<=r?"start":e>=r+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const o=this.options.horizontal?"scrollWidth":"scrollHeight",i=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-n;return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(n.end>=o+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[o,i]=r;this._scrollToOffset(o,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[t]=kl(this.getOffsetForIndex(e,i));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:i,behavior:n})}else this.scrollToIndex(e,{align:i,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Bl=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0},Hl="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;var Vl=Object.defineProperty,Gl=(e,t,n)=>(((e,t,n)=>{t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Ul=new class{constructor(){Gl(this,"current",this.detect()),Gl(this,"handoffState","pending"),Gl(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function zl(e){return Ul.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function jl(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Wl(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return jl((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=Wl();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Yl(){let[e]=(0,r.useState)(Wl);return(0,r.useEffect)((()=>()=>e.dispose()),[e]),e}let Kl=(e,t)=>{Ul.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function ql(e){let t=(0,r.useRef)(e);return Kl((()=>{t.current=e}),[e]),t}let Zl=function(e){let t=ql(e);return r.default.useCallback(((...e)=>t.current(...e)),[t])};function Jl(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function Xl(e,t=!1){let[n,o]=(0,r.useReducer)((()=>({})),{}),i=(0,r.useMemo)((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return Kl((()=>{if(!e)return;let t=new ResizeObserver(o);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}class Ql extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}function eu(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}function tu(e){return(0,r.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}let nu=new Ql((()=>eu((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function ru(e,t){let n=nu.get(t),o=(0,r.useId)(),i=tu(n);if(Kl((()=>{if(e)return n.dispatch("ADD",o),()=>n.dispatch("REMOVE",o)}),[n,e]),!e)return!1;let s=i.indexOf(o),a=i.length;return-1===s&&(s=a,a+=1),s===a-1}let ou=new Map,iu=new Map;function su(e){var t;let n=null!=(t=iu.get(e))?t:0;return iu.set(e,n+1),0!==n||(ou.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>function(e){var t;let n=null!=(t=iu.get(e))?t:1;if(1===n?iu.delete(e):iu.set(e,n-1),1!==n)return;let r=ou.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,ou.delete(e))}(e)}function au(e,{allowed:t,disallowed:n}={}){let r=ru(e,"inert-others");Kl((()=>{var e,o;if(!r)return;let i=Wl();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(su(t));let s=null!=(o=null==t?void 0:t())?o:[];for(let e of s){if(!e)continue;let t=zl(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)s.some((t=>e.contains(t)))||i.add(su(e));n=n.parentElement}}return i.dispose}),[r,t,n])}function lu(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,lu),r}let uu=["[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(",");["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var cu,du,fu,pu=((fu=pu||{})[fu.First=1]="First",fu[fu.Previous=2]="Previous",fu[fu.Next=4]="Next",fu[fu.Last=8]="Last",fu[fu.WrapAround=16]="WrapAround",fu[fu.NoScroll=32]="NoScroll",fu[fu.AutoFocus=64]="AutoFocus",fu),hu=((du=hu||{})[du.Error=0]="Error",du[du.Overflow=1]="Overflow",du[du.Success=2]="Success",du[du.Underflow=3]="Underflow",du),mu=((cu=mu||{})[cu.Previous=-1]="Previous",cu[cu.Next=1]="Next",cu),$u=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($u||{});var gu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(gu||{});function wu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function vu(){return wu()||/Android/gi.test(window.navigator.userAgent)}function yu(e,t,n,o){let i=ql(n);(0,r.useEffect)((()=>{if(e)return document.addEventListener(t,n,o),()=>document.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}function bu(e,t,n){let o=ru(e,"outside-click"),i=ql(n),s=(0,r.useCallback)((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var n;return e!==(null==(n=zl(e))?void 0:n.body)&&lu(t,{0:()=>e.matches(uu),1(){let t=e;for(;null!==t;){if(t.matches(uu))return!0;t=t.parentElement}return!1}})}(r,$u.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),a=(0,r.useRef)(null);yu(o,"pointerdown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),yu(o,"mousedown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),yu(o,"click",(e=>{vu()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=(0,r.useRef)({x:0,y:0});yu(o,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),yu(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=30||Math.abs(n-l.current.y)>=30))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,o){let i=ql((e=>s(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))));(0,r.useEffect)((()=>{if(e)return window.addEventListener(t,n,o),()=>window.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}(o,"blur",0,!0)}function xu(...e){return(0,r.useMemo)((()=>zl(...e)),[...e])}function Su(e){let t=(0,r.useRef)({value:"",selectionStart:null,selectionEnd:null});return function(e,t,n,o){let i=ql(n);(0,r.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}),[e,t,o])}(e,"blur",(e=>{let n=e.target;n instanceof HTMLInputElement&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})})),Zl((()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:r}=t.current;null!==n&&null!==r&&e.setSelectionRange(n,r)}t.current={value:"",selectionStart:null,selectionEnd:null}}}))}function _u(e,t){return(0,r.useMemo)((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function Eu(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function Cu(e){let t={};for(let n of e)Object.assign(t,n(t));return t}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0)),["textarea","input"].join(",");let Tu=eu((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:Wl(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Cu(n)},o=[wu()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=Wl();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),s=e.querySelector(o);s&&!r(s)&&(i=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},Eu(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function ku(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=tu(Tu),o=t?r.get(t):void 0;!!o&&o.count;Kl((()=>{if(t&&e)return Tu.dispatch("PUSH",t,n),()=>Tu.dispatch("POP",t,n)}),[e,t])}(ru(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}Tu.subscribe((()=>{let e=Tu.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Tu.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Tu.dispatch("TEARDOWN",n)}}));let Iu=Symbol();function Au(...e){let t=(0,r.useRef)(e);(0,r.useEffect)((()=>{t.current=e}),[e]);let n=Zl((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Iu])))?void 0:n}function Mu(e){return[e.screenX,e.screenY]}var Ru,Ou;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Ru=null==process?void 0:process.env)?void 0:Ru.NODE_ENV)&&void 0===(null==(Ou=null==Element?void 0:Element.prototype)?void 0:Ou.getAnimations)&&(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("\n")),[]});var Pu,Nu=((Pu=Nu||{})[Pu.None=0]="None",Pu[Pu.Closed=1]="Closed",Pu[Pu.Enter=2]="Enter",Pu[Pu.Leave=4]="Leave",Pu);function Du(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function Fu(e,t){let n=(0,r.useRef)([]),o=Zl(e);(0,r.useEffect)((()=>{let e=[...n.current];for(let[r,i]of t.entries())if(n.current[r]!==i){let r=o(t,e);return n.current=t,r}}),[o,...t])}let Lu=(0,r.createContext)(void 0);function Bu(){return(0,r.useContext)(Lu)}const Hu=Math.min,Vu=Math.max,Gu=Math.round,Uu=Math.floor,zu=e=>({x:e,y:e}),ju={left:"right",right:"left",bottom:"top",top:"bottom"},Wu={start:"end",end:"start"};function Yu(e,t,n){return Vu(e,Hu(t,n))}function Ku(e,t){return"function"==typeof e?e(t):e}function qu(e){return e.split("-")[0]}function Zu(e){return e.split("-")[1]}function Ju(e){return"x"===e?"y":"x"}function Xu(e){return"y"===e?"height":"width"}function Qu(e){return["top","bottom"].includes(qu(e))?"y":"x"}function ec(e){return Ju(Qu(e))}function tc(e){return e.replace(/start|end/g,(e=>Wu[e]))}function nc(e){return e.replace(/left|right|bottom|top/g,(e=>ju[e]))}function rc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function oc(){return"undefined"!=typeof window}function ic(e){return lc(e)?(e.nodeName||"").toLowerCase():"#document"}function sc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ac(e){var t;return null==(t=(lc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lc(e){return!!oc()&&(e instanceof Node||e instanceof sc(e).Node)}function uc(e){return!!oc()&&(e instanceof Element||e instanceof sc(e).Element)}function cc(e){return!!oc()&&(e instanceof HTMLElement||e instanceof sc(e).HTMLElement)}function dc(e){return!(!oc()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof sc(e).ShadowRoot)}function fc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=wc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pc(e){return["table","td","th"].includes(ic(e))}function hc(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function mc(e){const t=$c(),n=uc(e)?wc(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function $c(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function gc(e){return["html","body","#document"].includes(ic(e))}function wc(e){return sc(e).getComputedStyle(e)}function vc(e){return uc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yc(e){if("html"===ic(e))return e;const t=e.assignedSlot||e.parentNode||dc(e)&&e.host||ac(e);return dc(t)?t.host:t}function bc(e){const t=yc(e);return gc(t)?e.ownerDocument?e.ownerDocument.body:e.body:cc(t)&&fc(t)?t:bc(t)}function xc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=bc(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=sc(o);if(i){const e=Sc(s);return t.concat(s,s.visualViewport||[],fc(o)?o:[],e&&n?xc(e):[])}return t.concat(o,xc(o,[],n))}function Sc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _c(e,t,n){let{reference:r,floating:o}=e;const i=Qu(t),s=ec(t),a=Xu(s),l=qu(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Zu(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1)}return p}async function Ec(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ku(t,e),h=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[f?"floating"===d?"reference":"floating":d],$=rc(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},y=rc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:($.top-y.top+h.top)/v.y,bottom:(y.bottom-$.bottom+h.bottom)/v.y,left:($.left-y.left+h.left)/v.x,right:(y.right-$.right+h.right)/v.x}}function Cc(e){const t=wc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cc(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Gu(n)!==i||Gu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Tc(e){return uc(e)?e:e.contextElement}function kc(e){const t=Tc(e);if(!cc(t))return zu(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Cc(t);let s=(i?Gu(n.width):n.width)/r,a=(i?Gu(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ic=zu(0);function Ac(e){const t=sc(e);return $c()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ic}function Mc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Tc(e);let s=zu(1);t&&(r?uc(r)&&(s=kc(r)):s=kc(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==sc(e))&&t}(i,n,r)?Ac(i):zu(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const e=sc(i),t=r&&uc(r)?sc(r):r;let n=e,o=Sc(n);for(;o&&r&&t!==n;){const e=kc(o),t=o.getBoundingClientRect(),r=wc(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=s,n=sc(o),o=Sc(n)}}return rc({width:c,height:d,x:l,y:u})}function Rc(e,t){const n=vc(e).scrollLeft;return t?t.left+n:Mc(ac(e)).left+n}function Oc(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Rc(e,r)),y:r.top+t.scrollTop}}function Pc(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=sc(e),r=ac(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=$c();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=ac(e),n=vc(e),r=e.ownerDocument.body,o=Vu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Vu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rc(e);const a=-n.scrollTop;return"rtl"===wc(r).direction&&(s+=Vu(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(ac(e));else if(uc(t))r=function(e,t){const n=Mc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cc(e)?kc(e):zu(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ac(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rc(r)}function Nc(e,t){const n=yc(e);return!(n===t||!uc(n)||gc(n))&&("fixed"===wc(n).position||Nc(n,t))}function Dc(e,t,n){const r=cc(t),o=ac(t),i="fixed"===n,s=Mc(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=zu(0);if(r||!r&&!i)if(("body"!==ic(t)||fc(o))&&(a=vc(t)),r){const e=Mc(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Rc(o));const u=!o||r||i?zu(0):Oc(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function Fc(e){return"static"===wc(e).position}function Lc(e,t){if(!cc(e)||"fixed"===wc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ac(e)===n&&(n=n.ownerDocument.body),n}function Bc(e,t){const n=sc(e);if(hc(e))return n;if(!cc(e)){let t=yc(e);for(;t&&!gc(t);){if(uc(t)&&!Fc(t))return t;t=yc(t)}return n}let r=Lc(e,t);for(;r&&pc(r)&&Fc(r);)r=Lc(r,t);return r&&gc(r)&&Fc(r)&&!mc(r)?n:r||function(e){let t=yc(e);for(;cc(t)&&!gc(t);){if(mc(t))return t;if(hc(t))return null;t=yc(t)}return null}(e)||n}const Hc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=ac(r),a=!!t&&hc(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=zu(1);const c=zu(0),d=cc(r);if((d||!d&&!i)&&(("body"!==ic(r)||fc(s))&&(l=vc(r)),cc(r))){const e=Mc(r);u=kc(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}const f=!s||d||i?zu(0):Oc(s,l,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}},getDocumentElement:ac,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?hc(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=xc(e,[],!1).filter((e=>uc(e)&&"body"!==ic(e))),o=null;const i="fixed"===wc(e).position;let s=i?yc(e):e;for(;uc(s)&&!gc(s);){const t=wc(s),n=mc(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||fc(s)&&!n&&Nc(e,s))?r=r.filter((e=>e!==s)):o=t,s=yc(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=Pc(t,n,o);return e.top=Vu(r.top,e.top),e.right=Hu(r.right,e.right),e.bottom=Hu(r.bottom,e.bottom),e.left=Vu(r.left,e.left),e}),Pc(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Bc,getElementRects:async function(e){const t=this.getOffsetParent||Bc,n=this.getDimensions,r=await n(e.floating);return{reference:Dc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Cc(e);return{width:t,height:n}},getScale:kc,isElement:uc,isRTL:function(e){return"rtl"===wc(e).direction}};function Vc(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=Tc(e),c=o||i?[...u?xc(u):[],...xc(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const o=ac(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p={rootMargin:-Uu(c)+"px "+-Uu(o.clientWidth-(u+d))+"px "+-Uu(o.clientHeight-(c+f))+"px "+-Uu(u)+"px",threshold:Vu(0,Hu(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let m=l?Mc(e):null;return l&&function t(){const r=Mc(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Gc=Ec,Uc=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=qu(n),a=Zu(n),l="y"===Qu(n),u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,d=Ku(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},zc=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ku(e,t),u={x:n,y:r},c=await Ec(t,l),d=Qu(qu(o)),f=Ju(d);let p=u[f],h=u[d];if(i){const e="y"===f?"bottom":"right";p=Yu(p+c["y"===f?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";h=Yu(h+c["y"===d?"top":"left"],h,h-c[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},jc=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...$}=Ku(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=qu(o),w=Qu(a),v=qu(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=f||(v||!m?[nc(a)]:function(e){const t=nc(e);return[tc(e),t,tc(t)]}(a)),x="none"!==h;!f&&x&&b.push(...function(e,t,n,r){const o=Zu(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(qu(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(tc)))),i}(a,m,h,y));const S=[a,...b],_=await Ec(t,$),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(_[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Zu(e),o=ec(e),i=Xu(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=nc(s)),[s,nc(s)]}(o,s,y);E.push(_[e[0]],_[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var T,k;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(k=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var I;const e=null==(I=C.filter((e=>{if(x){const t=Qu(e.placement);return t===w||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Wc=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Ku(e,t),c=await Ec(t,u),d=qu(o),f=Zu(o),p="y"===Qu(o),{width:h,height:m}=i.floating;let $,g;"top"===d||"bottom"===d?($=d,g=f===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,$="end"===f?"top":"bottom");const w=m-c.top-c.bottom,v=h-c.left-c.right,y=Hu(m-c[$],w),b=Hu(h-c[g],v),x=!t.middlewareData.shift;let S=y,_=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=w),x&&!f){const e=Vu(c.left,0),t=Vu(c.right,0),n=Vu(c.top,0),r=Vu(c.bottom,0);p?_=h-2*(0!==e||0!==t?e+t:Vu(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Vu(c.top,c.bottom))}await l({...t,availableWidth:_,availableHeight:S});const E=await s.getDimensions(a.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Yc=(e,t,n)=>{const r=new Map,o={platform:Hc,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=_c(u,r,l),f=r,p={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:$,y:g,data:w,reset:v}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=$?$:c,d=null!=g?g:d,p={...p,[i]:{...p[i],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(u=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:c,y:d}=_c(u,f,l))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Kc="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!qc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||qc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Zc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jc(e,t){const n=Zc(e);return Math.round(t*n)/n}function Xc(e){const t=r.useRef(e);return Kc((()=>{t.current=e})),t}const Qc=(e,t)=>({...Uc(e),options:[e,t]}),ed=(e,t)=>({...jc(e),options:[e,t]}),td=(e,t)=>({...Wc(e),options:[e,t]}),nd={...r},rd=nd.useInsertionEffect||(e=>e());function od(e){const t=r.useRef((()=>{}));return rd((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var id="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let sd=!1,ad=0;const ld=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ad++,ud=nd.useId||function(){const[e,t]=r.useState((()=>sd?ld():void 0));return id((()=>{null==e&&t(ld())}),[]),r.useEffect((()=>{sd=!0}),[]),e};const cd=r.createContext(null),dd=r.createContext(null),fd="data-floating-ui-focusable";function pd(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=ud(),s=r.useRef({}),[a]=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=((null==(h=r.useContext(cd))?void 0:h.id)||null),[u,c]=r.useState(o.reference),d=od(((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=r.useMemo((()=>({setPositionReference:c})),[]),p=r.useMemo((()=>({reference:u||o.reference||null,floating:o.floating||null,domReference:o.reference})),[u,o.reference,o.floating]);var h;return r.useMemo((()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:f})),[t,d,p,a,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,a]=r.useState(null),[l,u]=r.useState(null),c=(null==i?void 0:i.domReference)||s,d=r.useRef(null),f=r.useContext(dd);id((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);qc(p,o)||h(o);const[m,$]=r.useState(null),[g,w]=r.useState(null),v=r.useCallback((e=>{e!==S.current&&(S.current=e,$(e))}),[]),y=r.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),b=s||m,x=a||g,S=r.useRef(null),_=r.useRef(null),E=r.useRef(d),C=null!=u,T=Xc(u),k=Xc(i),I=Xc(c),A=r.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Yc(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};M.current&&!qc(E.current,t)&&(E.current=t,r.flushSync((()=>{f(t)})))}))}),[p,t,n,k,I]);Kc((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[c]);const M=r.useRef(!1);Kc((()=>(M.current=!0,()=>{M.current=!1})),[]),Kc((()=>{if(b&&(S.current=b),x&&(_.current=x),b&&x){if(T.current)return T.current(b,x,A);A()}}),[b,x,A,T,C]);const R=r.useMemo((()=>({reference:S,floating:_,setReference:v,setFloating:y})),[v,y]),O=r.useMemo((()=>({reference:b,floating:x})),[b,x]),P=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Jc(O.floating,d.x),r=Jc(O.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Zc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,O.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:A,refs:R,elements:O,floatingStyles:P})),[d,A,R,O,P])}({...e,elements:{...i,...l&&{reference:l}}}),h=r.useCallback((e=>{const t=uc(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)}),[p.refs]),m=r.useCallback((e=>{(uc(e)||null===e)&&(d.current=e,a(e)),(uc(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!uc(e))&&p.refs.setReference(e)}),[p.refs]),$=r.useMemo((()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d})),[p.refs,m,h]),g=r.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),w=r.useMemo((()=>({...p,...o,refs:$,elements:g,nodeId:t})),[p,$,g,t,o]);return id((()=>{o.dataRef.current.floatingContext=w;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),r.useMemo((()=>({...p,context:w,refs:$,elements:g})),[p,$,g,w])}const hd="active",md="selected";function $d(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[hd]:t,[md]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[fd]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[hd,md].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function gd(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let wd=(0,r.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});wd.displayName="FloatingContext";let vd=(0,r.createContext)(null);function yd({children:e,enabled:t=!0}){let[n,o]=(0,r.useState)(null),[i,s]=(0,r.useState)(0),a=(0,r.useRef)(null),[l,u]=(0,r.useState)(null);!function(e){Kl((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(l);let c=t&&null!==n&&null!==l,{to:d="bottom",gap:f=0,offset:p=0,padding:h=0,inner:m}=function(e,t){var n,r,o;let i=bd(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=bd(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=bd(null!=(o=null==e?void 0:e.padding)?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}(n,l),[$,g="center"]=d.split(" ");Kl((()=>{c&&s(0)}),[c]);let{refs:w,floatingStyles:v,context:y}=pd({open:c,placement:"selection"===$?"center"===g?"bottom":`bottom-${g}`:"center"===g?`${$}`:`${$}-${g}`,strategy:"absolute",transform:!1,middleware:[Qc({mainAxis:"selection"===$?0:f,crossAxis:p}),(S={padding:h},{...zc(S),options:[S,_]}),"selection"!==$&&ed({padding:h}),"selection"===$&&m?(E={...m,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,n;if(!e)return;let r=y.elements.floating;if(!r)return;let o=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,i=Math.min(4,r.childElementCount),a=0,l=0;for(let e of null!=(n=null==(t=y.elements.floating)?void 0:t.childNodes)?n:[])if(e instanceof HTMLElement){let t=e.offsetTop,n=t+e.clientHeight+o,s=r.scrollTop,u=s+r.clientHeight;if(!(t>=s&&n<=u)){l=Math.max(0,Math.min(n,u)-Math.max(t,s)),a=e.clientHeight;break}i--}i>=1&&s((e=>{let t=a*i-l+o;return e>=t?e:t}))}},{name:"inner",options:E,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Ku(E,e),{rects:d,elements:{floating:f}}=e,p=t.current[s],h=(null==u?void 0:u.current)||f,m=f.clientTop||h.clientTop,$=0!==f.clientTop,g=0!==h.clientTop,w=f===h;if(!p)return{};const v={...e,...await Qc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Gc(gd(v,h.scrollHeight+m+f.clientTop),c),b=await Gc(v,{...c,elementContext:"reference"}),x=Vu(0,y.top),S=v.y+x,_=h.scrollHeight>h.clientHeight?e=>e:Gu,C=_(Vu(0,h.scrollHeight+($&&w||g?2*m:0)-x-Vu(0,y.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=x,o){const e=h.offsetHeight<p.offsetHeight*Hu(a,t.current.length)-1||b.top>=-l||b.bottom>=-l;r.flushSync((()=>o(e)))}return n&&(n.current=await Gc(gd({...v,y:S},h.offsetHeight+m+f.clientTop),c)),{y:S}}}):null,td({padding:h,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Vc}),[b=$,x=g]=y.placement.split("-");var S,_,E;"selection"===$&&(b="selection");let C=(0,r.useMemo)((()=>({anchor:[b,x].filter(Boolean).join(" ")})),[b,x]),T=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:s,scrollRef:a,onChange:l}=t,u=od(l),c=r.useRef(!1),d=r.useRef(null),f=r.useRef(null);r.useEffect((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==s.current)return;const n=e.deltaY,o=s.current.top>=-.5,i=s.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,l=n<0?-1:1,c=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!o&&n>0||!i&&n<0?(e.preventDefault(),r.flushSync((()=>{u((e=>e+Math[c](n,a*l)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==a?void 0:a.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{d.current=t.scrollTop,null!=s.current&&(f.current={...s.current})})),()=>{d.current=null,f.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,o.floating,s,a,u]);const p=r.useMemo((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||o.floating;if(s.current&&e&&c.current){if(null!==d.current){const t=e.scrollTop-d.current;(s.current.bottom<-.5&&t<-1||s.current.top<-.5&&t>1)&&r.flushSync((()=>u((e=>e+t))))}requestAnimationFrame((()=>{d.current=e.scrollTop}))}}})),[o.floating,u,s,a]);return r.useMemo((()=>i?{floating:p}:{}),[i,p])}(y,{overflowRef:a,onChange:s}),{getReferenceProps:k,getFloatingProps:I}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),o=e.map((e=>null==e?void 0:e.item)),i=r.useCallback((t=>$d(t,e,"reference")),t),s=r.useCallback((t=>$d(t,e,"floating")),n),a=r.useCallback((t=>$d(t,e,"item")),o);return r.useMemo((()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a})),[i,s,a])}([T]),A=Zl((e=>{u(e),w.setFloating(e)}));return r.createElement(vd.Provider,{value:o},r.createElement(wd.Provider,{value:{setFloating:A,setReference:w.setReference,styles:v,getReferenceProps:k,getFloatingProps:I,slot:C}},e))}function bd(e,t,n=void 0){let o=Yl(),i=Zl(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let r=Sd(e,t);return[r,n=>{let i=xd(e);{let s=i.map((e=>window.getComputedStyle(t).getPropertyValue(e)));o.requestAnimationFrame((function a(){o.nextFrame(a);let l=!1;for(let[e,n]of i.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=Sd(e,t);r!==u&&(n(u),r=u)}))}return o.dispose}]}return[n,null]})),s=(0,r.useMemo)((()=>i(e,t)[0]),[e,t]),[a=s,l]=(0,r.useState)();return Kl((()=>{let[n,r]=i(e,t);if(l(n),r)return r(l)}),[e,t]),a}function xd(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...xd(r)]:[n]}return[]}function Sd(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function _d(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Cd(n,Ed(t,r),o);return n}function Ed(e,t){return e?e+"["+t+"]":t}function Cd(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Cd(e,Ed(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):_d(n,t,e)}function Td(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}vd.displayName="PlacementContext";var kd=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(kd||{}),Id=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Id||{});function Ad(){let e=function(){let e=(0,r.useRef)([]),t=(0,r.useCallback)((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}();return(0,r.useCallback)((t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=null!=a?a:Rd;let l=Od(t,e);if(i)return Md(l,n,r,s,a);let u=null!=o?o:0;if(2&u){let{static:e=!1,...t}=l;if(e)return Md(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return lu(e?0:1,{0:()=>null,1:()=>Md({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Md(l,n,r,s,a)}({mergeRefs:e,...t})),[e])}function Md(e,t={},n,o,i){let{as:s=n,children:a,refName:l="ref",...u}=Fd(e,["unmount","static"]),c=void 0!==e.ref?{[l]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){f["data-headlessui-state"]=n.join(" ");for(let e of n)f[`data-${e}`]=""}}if(s===r.Fragment&&(Object.keys(Dd(u)).length>0||Object.keys(Dd(f)).length>0)){if((0,r.isValidElement)(d)&&!(Array.isArray(d)&&d.length>1)){let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Td(t(...e),u.className):Td(t,u.className),o=n?{className:n}:{},s=Od(d.props,Dd(Fd(u,["ref"])));for(let e in f)e in s&&delete f[e];return(0,r.cloneElement)(d,Object.assign({},s,f,c,{ref:i(Ld(d),c.ref)},o))}if(Object.keys(Dd(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Dd(u)).concat(Object.keys(Dd(f))).map((e=>` - ${e}`)).join("\n"),"","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((e=>` - ${e}`)).join("\n")].join("\n"))}return(0,r.createElement)(s,Object.assign({},Fd(u,["ref"]),s!==r.Fragment&&c,s!==r.Fragment&&f),d)}function Rd(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Od(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Pd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)null==e||e(...t)}});return t}function Nd(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Dd(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Fd(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Ld(e){return r.default.version.split(".")[0]>="19"?e.props.ref:e.ref}var Bd=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Bd||{});let Hd=Nd((function(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||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",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return Ad()({ourProps:i,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})})),Vd=(0,r.createContext)(null);function Gd({children:e}){let t=(0,r.useContext)(Vd);if(!t)return r.default.createElement(r.default.Fragment,null,e);let{target:n}=t;return n?(0,r.createPortal)(r.default.createElement(r.default.Fragment,null,e),n):null}function Ud({data:e,form:t,disabled:n,onReset:o,overrides:i}){let[s,a]=(0,r.useState)(null),l=Yl();return(0,r.useEffect)((()=>{if(o&&s)return l.addEventListener(s,"reset",o)}),[s,t,o]),r.default.createElement(Gd,null,r.default.createElement(zd,{setForm:a,formId:t}),_d(e).map((([e,o])=>r.default.createElement(Hd,{features:Bd.Hidden,...Dd({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:o,...i})}))))}function zd({setForm:e,formId:t}){return(0,r.useEffect)((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:r.default.createElement(Hd,{features:Bd.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function jd({children:e,freeze:t}){let n=Wd(t,e);return r.default.createElement(r.default.Fragment,null,n)}function Wd(e,t){let[n,o]=(0,r.useState)(t);return!e&&n!==t&&o(t),e?n:t}let Yd=(0,r.createContext)(void 0);function Kd(){return(0,r.useContext)(Yd)}let qd=(0,r.createContext)(null);qd.displayName="OpenClosedContext";var Zd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Zd||{});function Jd({value:e,children:t}){return r.default.createElement(qd.Provider,{value:e},t)}let Xd=[];!function(){function e(){"loading"!==document.readyState&&((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Xd[0]===e.target)return;let t=e.target;t=t.closest(uu),Xd.unshift(null!=t?t:e.target),Xd=Xd.filter((e=>null!=e&&e.isConnected)),Xd.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",e))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",e),e())}();var Qd=(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))(Qd||{});function ef(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===o&&(o=n.length);for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}let tf=(0,r.createContext)(null);function nf(){let e=(0,r.useContext)(tf);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,nf),e}return e}tf.displayName="DescriptionContext";let rf=Nd((function(e,t){let n=(0,r.useId)(),o=Bu(),{id:i=`headlessui-description-${n}`,...s}=e,a=nf(),l=Au(t);Kl((()=>a.register(i)),[i,a.register]);let u=o||!1,c=(0,r.useMemo)((()=>({...a.slot,disabled:u})),[a.slot,u]),d={ref:l,...a.props,id:i};return Ad()({ourProps:d,theirProps:s,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(rf,{});var of=(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))(of||{});let sf=(0,r.createContext)(null);function af(){let e=(0,r.useContext)(sf);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,af),e}return e}function lf(e){var t,n,o;let i=null!=(n=null==(t=(0,r.useContext)(sf))?void 0:t.value)?n:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[i,...e].filter(Boolean).join(" "):i}sf.displayName="LabelContext";let uf=Nd((function(e,t){var n;let o=(0,r.useId)(),i=af(),s=Kd(),a=Bu(),{id:l=`headlessui-label-${o}`,htmlFor:u=(null!=s?s:null==(n=i.props)?void 0:n.htmlFor),passive:c=!1,...d}=e,f=Au(t);Kl((()=>i.register(l)),[l,i.register]);let p=Zl((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,m=(0,r.useMemo)((()=>({...i.slot,disabled:h})),[i.slot,h]),$={ref:f,...i.props,id:l,htmlFor:u,onClick:p};return c&&("onClick"in $&&(delete $.htmlFor,delete $.onClick),"onClick"in d&&delete d.onClick),Ad()({ourProps:$,theirProps:d,slot:m,defaultTag:u?"label":"div",name:i.name||"Label"})})),cf=Object.assign(uf,{});var df,ff=((df=ff||{})[df.Left=0]="Left",df[df.Right=2]="Right",df);let pf=(0,r.createContext)(!1);let hf=r.Fragment,mf=Nd((function(e,t){let n=e,o=(0,r.useRef)(null),i=Au(function(e,t=!0){return Object.assign(e,{[Iu]:t})}((e=>{o.current=e})),t),s=xu(o),a=function(e){let t=(0,r.useContext)(pf),n=(0,r.useContext)(gf),o=xu(e),[i,s]=(0,r.useState)((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(Ul.isServer)return null;let r=null==o?void 0:o.getElementById("headlessui-portal-root");if(r)return r;if(null===o)return null;let i=o.createElement("div");return i.setAttribute("id","headlessui-portal-root"),o.body.appendChild(i)}));return(0,r.useEffect)((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),(0,r.useEffect)((()=>{t||null!==n&&s(n.current)}),[n,s,t]),i}(o),[l]=(0,r.useState)((()=>{var e;return Ul.isServer?null:null!=(e=null==s?void 0:s.createElement("div"))?e:null})),u=(0,r.useContext)(wf),c=function(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)(r)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=r.useState(Ul.isHandoffComplete);return t&&!1===Ul.isHandoffComplete&&n(!1),r.useEffect((()=>{!0!==t&&n(!0)}),[t]),r.useEffect((()=>Ul.handoff()),[]),!e&&t}();Kl((()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))}),[a,l]),Kl((()=>{if(l&&u)return u.register(l)}),[u,l]),function(e){let t=Zl(e),n=(0,r.useRef)(!1);(0,r.useEffect)((()=>(n.current=!1,()=>{n.current=!0,jl((()=>{n.current&&t()}))})),[t])}((()=>{var e;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let d=Ad();return c&&a&&l?(0,r.createPortal)(d({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:hf,name:"Portal"}),l):null})),$f=r.Fragment,gf=(0,r.createContext)(null),wf=(0,r.createContext)(null),vf=Nd((function(e,t){let n=Au(t),{enabled:o=!0,...i}=e,s=Ad();return o?r.default.createElement(mf,{...i,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:hf,name:"Portal"})})),yf=Nd((function(e,t){let{target:n,...o}=e,i={ref:Au(t)},s=Ad();return r.default.createElement(gf.Provider,{value:n},s({ourProps:i,theirProps:o,defaultTag:$f,name:"Popover.Group"}))})),bf=Object.assign(vf,{Group:yf});var xf,Sf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sf||{}),_f=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(_f||{}),Ef=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Ef||{}),Cf=((xf=Cf||{})[xf.OpenCombobox=0]="OpenCombobox",xf[xf.CloseCombobox=1]="CloseCombobox",xf[xf.GoToOption=2]="GoToOption",xf[xf.SetTyping=3]="SetTyping",xf[xf.RegisterOption=4]="RegisterOption",xf[xf.UnregisterOption=5]="UnregisterOption",xf[xf.SetActivationTrigger=6]="SetActivationTrigger",xf[xf.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",xf[xf.SetInputElement=8]="SetInputElement",xf[xf.SetButtonElement=9]="SetButtonElement",xf[xf.SetOptionsElement=10]="SetOptionsElement",xf);function Tf(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&null!==r[0].dataRef.current.order?r.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(r,(e=>e.dataRef.current.domRef.current)),i=n?o.indexOf(n):null;return-1===i&&(i=null),{options:o,activeOptionIndex:i}}let kf={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,r,o,i;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&(null==(r=e.dataRef.current)||!r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,i=t.focus===Qd.Specific?t.idx:ef(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,o;return null!=(o=null!=(t=e.activeOptionIndex)?t:n.findIndex((e=>!r(e))))?o:null},resolveDisabled:r,resolveId(){throw new Error("Function not implemented.")}}),s=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,activeOptionIndex:i,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=Tf(e);if(null===s.activeOptionIndex){let e=s.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(s.activeOptionIndex=e)}let a=t.focus===Qd.Specific?t.idx:ef(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),l=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===a&&e.activationTrigger===l?e:{...e,...s,isTyping:!1,activeOptionIndex:a,activationTrigger:l,__demoMode:!1}},4:(e,t)=>{var n,r,o;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,s=Tf(e,(e=>(e.push(i),e)));null===e.activeOptionIndex&&null!=(r=e.dataRef.current)&&r.isSelected(t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let a={...e,...s,activationTrigger:2};return null!=(o=e.dataRef.current)&&o.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let r=Tf(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...r,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n,r;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let o=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o=-1!==n?n:null}return{...e,activeOptionIndex:o,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},If=(0,r.createContext)(null);function Af(e){let t=(0,r.useContext)(If);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Af),t}return t}If.displayName="ComboboxActionsContext";let Mf=(0,r.createContext)(null);function Rf(e){let t=Pf("VirtualProvider"),{options:n}=t.virtual,[o,i]=(0,r.useMemo)((()=>{let e=t.optionsElement;if(!e)return[0,0];let n=window.getComputedStyle(e);return[parseFloat(n.paddingBlockStart||n.paddingTop),parseFloat(n.paddingBlockEnd||n.paddingBottom)]}),[t.optionsElement]),s=(u={enabled:0!==n.length,scrollPaddingStart:o,scrollPaddingEnd:i,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.optionsElement,overscan:12},function(e){const t=r.useReducer((()=>({})),{})[1],n={...e,onChange:(n,o)=>{var i;o?(0,r.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[o]=r.useState((()=>new Ll(n)));return o.setOptions(n),r.useEffect((()=>o._didMount()),[]),Hl((()=>o._willUpdate())),o}({observeElementRect:Rl,observeElementOffset:Nl,scrollToFn:Fl,...u})),[a,l]=(0,r.useState)(0);var u;Kl((()=>{l((e=>e+1))}),[n]);let c=s.getVirtualItems();return 0===c.length?null:r.default.createElement(Mf.Provider,{value:s},r.default.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&0!==t.activationTrigger&&null!==t.activeOptionIndex&&n.length>t.activeOptionIndex&&s.scrollToIndex(t.activeOptionIndex)}},c.map((t=>{var o;return r.default.createElement(r.Fragment,{key:t.key},r.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${a}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))}))))}let Of=(0,r.createContext)(null);function Pf(e){let t=(0,r.useContext)(Of);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Pf),t}return t}function Nf(e,t){return lu(t.type,kf,e,t)}Of.displayName="ComboboxDataContext";let Df=r.Fragment,Ff=kd.RenderStrategy|kd.Static,Lf=Nd((function(e,t){var n,o;let i=Bu(),{value:s,defaultValue:a,onChange:l,form:u,name:c,by:d,disabled:f=i||!1,onClose:p,__demoMode:h=!1,multiple:m=!1,immediate:$=!1,virtual:g=null,nullable:w,...v}=e,y=function(e){let[t]=(0,r.useState)(e);return t}(a),[b=(m?[]:void 0),x]=function(e,t,n){let[o,i]=(0,r.useState)(n),s=void 0!==e,a=(0,r.useRef)(s),l=(0,r.useRef)(!1),u=(0,r.useRef)(!1);return!s||a.current||l.current?!s&&a.current&&!u.current&&(u.current=!0,a.current=s,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.")):(l.current=!0,a.current=s,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.")),[s?e:o,Zl((e=>(s||i(e),null==t?void 0:t(e))))]}(s,l,y),[S,_]=(0,r.useReducer)(Nf,{dataRef:(0,r.createRef)(),comboboxState:h?0:1,isTyping:!1,options:[],virtual:g?{options:g.options,disabled:null!=(n=g.disabled)?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:h}),E=(0,r.useRef)(!1),C=(0,r.useRef)({static:!1,hold:!1}),T=function(e=Jl){return(0,r.useCallback)(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(d),k=Zl((e=>g?null===d?g.options.indexOf(e):g.options.findIndex((t=>T(t,e))):S.options.findIndex((t=>T(t.dataRef.current.value,e))))),I=(0,r.useCallback)((e=>lu(M.mode,{1:()=>b.some((t=>T(t,e))),0:()=>T(b,e)})),[b]),A=Zl((e=>S.activeOptionIndex===k(e))),M=(0,r.useMemo)((()=>({...S,immediate:$,optionsPropsRef:C,value:b,defaultValue:y,disabled:f,mode:m?1:0,virtual:g?S.virtual:null,get activeOptionIndex(){if(E.current&&null===S.activeOptionIndex&&(g?g.options.length>0:S.options.length>0)){if(g){let e=g.options.findIndex((e=>{var t,n;return!(null!=(n=null==(t=g.disabled)?void 0:t.call(g,e))&&n)}));if(-1!==e)return e}let e=S.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return S.activeOptionIndex},calculateIndex:k,compare:T,isSelected:I,isActive:A})),[b,y,f,m,h,S,g]);Kl((()=>{var e;g&&_({type:7,options:g.options,disabled:null!=(e=g.disabled)?e:null})}),[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),Kl((()=>{S.dataRef.current=M}),[M]),bu(0===M.comboboxState,[M.buttonElement,M.inputElement,M.optionsElement],(()=>z.closeCombobox()));let R=(0,r.useMemo)((()=>{var e,t,n;return{open:0===M.comboboxState,disabled:f,activeIndex:M.activeOptionIndex,activeOption:null===M.activeOptionIndex?null:M.virtual?M.virtual.options[null!=(e=M.activeOptionIndex)?e:0]:null!=(n=null==(t=M.options[M.activeOptionIndex])?void 0:t.dataRef.current.value)?n:null,value:b}}),[M,f,b]),O=Zl((()=>{if(null!==M.activeOptionIndex){if(z.setIsTyping(!1),M.virtual)B(M.virtual.options[M.activeOptionIndex]);else{let{dataRef:e}=M.options[M.activeOptionIndex];B(e.current.value)}z.goToOption(Qd.Specific,M.activeOptionIndex)}})),P=Zl((()=>{_({type:0}),E.current=!0})),N=Zl((()=>{_({type:1}),E.current=!1,null==p||p()})),D=Zl((e=>{_({type:3,isTyping:e})})),F=Zl(((e,t,n)=>(E.current=!1,e===Qd.Specific?_({type:2,focus:Qd.Specific,idx:t,trigger:n}):_({type:2,focus:e,trigger:n})))),L=Zl(((e,t)=>(_({type:4,payload:{id:e,dataRef:t}}),()=>{M.isActive(t.current.value)&&(E.current=!0),_({type:5,id:e})}))),B=Zl((e=>lu(M.mode,{0:()=>null==x?void 0:x(e),1(){let t=M.value.slice(),n=t.findIndex((t=>T(t,e)));return-1===n?t.push(e):t.splice(n,1),null==x?void 0:x(t)}}))),H=Zl((e=>{_({type:6,trigger:e})})),V=Zl((e=>{_({type:8,element:e})})),G=Zl((e=>{_({type:9,element:e})})),U=Zl((e=>{_({type:10,element:e})})),z=(0,r.useMemo)((()=>({onChange:B,registerOption:L,goToOption:F,setIsTyping:D,closeCombobox:N,openCombobox:P,setActivationTrigger:H,selectActiveOption:O,setInputElement:V,setButtonElement:G,setOptionsElement:U})),[]),[j,W]=function({inherit:e=!1}={}){let t=lf(),[n,o]=(0,r.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,r.useMemo)((()=>function(e){let t=Zl((e=>(o((t=>[...t,e])),()=>o((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=(0,r.useMemo)((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return r.default.createElement(sf.Provider,{value:n},e.children)}),[o])]}(),Y=null===t?{}:{ref:t},K=(0,r.useCallback)((()=>{if(void 0!==y)return null==x?void 0:x(y)}),[x,y]),q=Ad();return r.default.createElement(W,{value:j,props:{htmlFor:null==(o=M.inputElement)?void 0:o.id},slot:{open:0===M.comboboxState,disabled:f}},r.default.createElement(yd,null,r.default.createElement(If.Provider,{value:z},r.default.createElement(Of.Provider,{value:M},r.default.createElement(Jd,{value:lu(M.comboboxState,{0:Zd.Open,1:Zd.Closed})},null!=c&&r.default.createElement(Ud,{disabled:f,data:null!=b?{[c]:b}:{},form:u,onReset:K}),q({ourProps:Y,theirProps:v,slot:R,defaultTag:Df,name:"Combobox"}))))))})),Bf=Nd((function(e,t){var n;let o=Pf("Combobox.Button"),i=Af("Combobox.Button"),s=Au(t,i.setButtonElement),a=(0,r.useId)(),{id:l=`headlessui-combobox-button-${a}`,disabled:u=o.disabled||!1,autoFocus:c=!1,...d}=e,f=Su(o.inputElement),p=Zl((e=>{switch(e.key){case of.Space:case of.Enter:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&(0,r.flushSync)((()=>i.openCombobox())),void f();case of.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Qd.First)),void f();case of.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Qd.Last)),void f();case of.Escape:if(0!==o.comboboxState)return;return e.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,r.flushSync)((()=>i.closeCombobox())),void f();default:return}})),h=Zl((e=>{e.preventDefault(),!function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}(e.currentTarget)&&(e.button===ff.Left&&(0===o.comboboxState?i.closeCombobox():i.openCombobox()),f())})),m=lf([l]),{isFocusVisible:$,focusProps:g}=yl({autoFocus:c}),{isHovered:w,hoverProps:v}=Cl({isDisabled:u}),{pressed:y,pressProps:b}=function({disabled:e=!1}={}){let t=(0,r.useRef)(null),[n,o]=(0,r.useState)(!1),i=Yl(),s=Zl((()=>{t.current=null,o(!1),i.dispose()})),a=Zl((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,o(!0);{let n=zl(e.currentTarget);i.addEventListener(n,"pointerup",s,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);o(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",s,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:a,onPointerUp:s,onClick:s}}}({disabled:u}),x=(0,r.useMemo)((()=>({open:0===o.comboboxState,active:y||0===o.comboboxState,disabled:u,value:o.value,hover:w,focus:$})),[o,w,$,y,u]),S=Pd({ref:s,id:l,type:_u(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(n=o.optionsElement)?void 0:n.id,"aria-expanded":0===o.comboboxState,"aria-labelledby":m,disabled:u||void 0,autoFocus:c,onMouseDown:h,onKeyDown:p},g,v,b);return Ad()({ourProps:S,theirProps:d,slot:x,defaultTag:"button",name:"Combobox.Button"})})),Hf=Nd((function(e,t){var n,o,i,s,a;let l=Pf("Combobox.Input"),u=Af("Combobox.Input"),c=(0,r.useId)(),d=Kd(),{id:f=d||`headlessui-combobox-input-${c}`,onChange:p,displayValue:h,disabled:m=l.disabled||!1,autoFocus:$=!1,type:g="text",...w}=e,v=(0,r.useRef)(null),y=Au(v,t,(0,r.useContext)(wd).setReference,u.setInputElement),b=xu(l.inputElement),x=Yl(),S=Zl((()=>{u.onChange(null),l.optionsElement&&(l.optionsElement.scrollTop=0),u.goToOption(Qd.Nothing)})),_=(0,r.useMemo)((()=>{var e;return"function"==typeof h&&void 0!==l.value?null!=(e=h(l.value))?e:"":"string"==typeof l.value?l.value:""}),[l.value,h]);Fu((([e,t],[n,r])=>{if(l.isTyping)return;let o=v.current;o&&((0===r&&1===t||e!==n)&&(o.value=e),requestAnimationFrame((()=>{if(l.isTyping||!o||(null==b?void 0:b.activeElement)!==o)return;let{selectionStart:e,selectionEnd:t}=o;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&o.setSelectionRange(o.value.length,o.value.length)})))}),[_,l.comboboxState,b,l.isTyping]),Fu((([e],[t])=>{if(0===e&&1===t){if(l.isTyping)return;let e=v.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:o}=e;e.value="",e.value=t,null!==o?e.setSelectionRange(n,r,o):e.setSelectionRange(n,r)}}),[l.comboboxState]);let E=(0,r.useRef)(!1),C=Zl((()=>{E.current=!0})),T=Zl((()=>{x.nextFrame((()=>{E.current=!1}))})),k=Zl((e=>{switch(u.setIsTyping(!0),e.key){case of.Enter:if(0!==l.comboboxState||E.current)return;if(e.preventDefault(),e.stopPropagation(),null===l.activeOptionIndex)return void u.closeCombobox();u.selectActiveOption(),0===l.mode&&u.closeCombobox();break;case of.ArrowDown:return e.preventDefault(),e.stopPropagation(),lu(l.comboboxState,{0:()=>u.goToOption(Qd.Next),1:()=>u.openCombobox()});case of.ArrowUp:return e.preventDefault(),e.stopPropagation(),lu(l.comboboxState,{0:()=>u.goToOption(Qd.Previous),1:()=>{(0,r.flushSync)((()=>u.openCombobox())),l.value||u.goToOption(Qd.Last)}});case of.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Qd.First);case of.PageUp:return e.preventDefault(),e.stopPropagation(),u.goToOption(Qd.First);case of.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Qd.Last);case of.PageDown:return e.preventDefault(),e.stopPropagation(),u.goToOption(Qd.Last);case of.Escape:return 0!==l.comboboxState?void 0:(e.preventDefault(),l.optionsElement&&!l.optionsPropsRef.current.static&&e.stopPropagation(),0===l.mode&&null===l.value&&S(),u.closeCombobox());case of.Tab:if(0!==l.comboboxState)return;0===l.mode&&1!==l.activationTrigger&&u.selectActiveOption(),u.closeCombobox()}})),I=Zl((e=>{null==p||p(e),0===l.mode&&""===e.target.value&&S(),u.openCombobox()})),A=Zl((e=>{var t,n,r;let o=null!=(t=e.relatedTarget)?t:Xd.find((t=>t!==e.currentTarget));if(!(null!=(n=l.optionsElement)&&n.contains(o)||null!=(r=l.buttonElement)&&r.contains(o)||0!==l.comboboxState))return e.preventDefault(),0===l.mode&&null===l.value&&S(),u.closeCombobox()})),M=Zl((e=>{var t,n,o;let i=null!=(t=e.relatedTarget)?t:Xd.find((t=>t!==e.currentTarget));null!=(n=l.buttonElement)&&n.contains(i)||null!=(o=l.optionsElement)&&o.contains(i)||l.disabled||l.immediate&&0!==l.comboboxState&&x.microTask((()=>{(0,r.flushSync)((()=>u.openCombobox())),u.setActivationTrigger(1)}))})),R=lf(),O=function(){var e,t;return null!=(t=null==(e=(0,r.useContext)(tf))?void 0:e.value)?t:void 0}(),{isFocused:P,focusProps:N}=yl({autoFocus:$}),{isHovered:D,hoverProps:F}=Cl({isDisabled:m}),L=(0,r.useMemo)((()=>({open:0===l.comboboxState,disabled:m,hover:D,focus:P,autofocus:$})),[l,D,P,$,m]),B=Pd({ref:y,id:f,role:"combobox",type:g,"aria-controls":null==(n=l.optionsElement)?void 0:n.id,"aria-expanded":0===l.comboboxState,"aria-activedescendant":null===l.activeOptionIndex?void 0:l.virtual?null==(o=l.options.find((e=>!e.dataRef.current.disabled&&l.compare(e.dataRef.current.value,l.virtual.options[l.activeOptionIndex]))))?void 0:o.id:null==(i=l.options[l.activeOptionIndex])?void 0:i.id,"aria-labelledby":R,"aria-describedby":O,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(s=e.defaultValue)?s:void 0!==l.defaultValue?null==h?void 0:h(l.defaultValue):null)?a:l.defaultValue,disabled:m||void 0,autoFocus:$,onCompositionStart:C,onCompositionEnd:T,onKeyDown:k,onChange:I,onFocus:M,onBlur:A},N,F);return Ad()({ourProps:B,theirProps:w,slot:L,defaultTag:"input",name:"Combobox.Input"})})),Vf=cf,Gf=Nd((function(e,t){var n,o,i;let s=(0,r.useId)(),{id:a=`headlessui-combobox-options-${s}`,hold:l=!1,anchor:u,portal:c=!1,modal:d=!0,transition:f=!1,...p}=e,h=Pf("Combobox.Options"),m=Af("Combobox.Options"),$=function(e){return(0,r.useMemo)((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(u);$&&(c=!0);let[g,w]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,r.useContext)(vd),n=(0,r.useMemo)((()=>e),[JSON.stringify(e,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);Kl((()=>{null==t||t(null!=n?n:null)}),[t,n]);let o=(0,r.useContext)(wd);return(0,r.useMemo)((()=>[o.setFloating,e?o.styles:{}]),[o.setFloating,e,o.styles])}($),[v,y]=(0,r.useState)(null),b=function(){let{getFloatingProps:e,slot:t}=(0,r.useContext)(wd);return(0,r.useCallback)(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),x=Au(t,$?g:null,m.setOptionsElement,y),S=xu(h.optionsElement),_=(0,r.useContext)(qd),[E,C]=function(e,t,n,o){let[i,s]=(0,r.useState)(n),{hasFlag:a,addFlag:l,removeFlag:u}=function(e=0){let[t,n]=(0,r.useState)(e),o=(0,r.useCallback)((e=>n(e)),[t]),i=(0,r.useCallback)((e=>n((t=>t|e))),[t]),s=(0,r.useCallback)((e=>(t&e)===e),[t]),a=(0,r.useCallback)((e=>n((t=>t&~e))),[n]),l=(0,r.useCallback)((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:o,addFlag:i,hasFlag:s,removeFlag:a,toggleFlag:l}}(e&&i?3:0),c=(0,r.useRef)(!1),d=(0,r.useRef)(!1),f=Yl();return Kl((()=>{var r;if(e)return n&&s(!0),t?(null==(r=null==o?void 0:o.start)||r.call(o,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=Wl();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),i.nextFrame((()=>{n(),i.requestAnimationFrame((()=>{i.add(function(e,t){var n,r;let o=Wl();if(!e)return o.dispose;let i=!1;o.add((()=>{i=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),o.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{i||t()})),o.dispose)}(e,r))}))})),i.dispose}(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(l(3),u(4)):(l(4),u(2)))},run(){d.current?n?(u(3),l(4)):(u(4),l(3)):n?u(1):l(1)},done(){var e;d.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,u(7),n||s(!1),null==(e=null==o?void 0:o.end)||e.call(o,n))}})):void(n&&l(3))}),[e,n,t,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(f,v,null!==_?(_&Zd.Open)===Zd.Open:0===h.comboboxState);!function(e,t,n){let o=ql((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));(0,r.useEffect)((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let r=Wl();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}return()=>r.dispose()}),[t,o,e])}(E,h.inputElement,m.closeCombobox),ku(!h.__demoMode&&d&&0===h.comboboxState,S),au(!h.__demoMode&&d&&0===h.comboboxState,{allowed:(0,r.useCallback)((()=>[h.inputElement,h.buttonElement,h.optionsElement]),[h.inputElement,h.buttonElement,h.optionsElement])}),Kl((()=>{var t;h.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[h.optionsPropsRef,e.static]),Kl((()=>{h.optionsPropsRef.current.hold=l}),[h.optionsPropsRef,l]),function(e,{container:t,accept:n,walk:o}){let i=(0,r.useRef)(n),s=(0,r.useRef)(o);(0,r.useEffect)((()=>{i.current=n,s.current=o}),[n,o]),Kl((()=>{if(!t||!e)return;let n=zl(t);if(!n)return;let r=i.current,o=s.current,a=Object.assign((e=>r(e)),{acceptNode:r}),l=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)o(l.currentNode)}),[t,e,i,s])}(0===h.comboboxState,{container:h.optionsElement,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=lf([null==(n=h.buttonElement)?void 0:n.id]),k=(0,r.useMemo)((()=>({open:0===h.comboboxState,option:void 0})),[h.comboboxState]),I=Zl((()=>{m.setActivationTrigger(0)})),A=Zl((e=>{e.preventDefault(),m.setActivationTrigger(0)})),M=Pd($?b():{},{"aria-labelledby":T,role:"listbox","aria-multiselectable":1===h.mode||void 0,id:a,ref:x,style:{...p.style,...w,"--input-width":Xl(h.inputElement,!0).width,"--button-width":Xl(h.buttonElement,!0).width},onWheel:0===h.activationTrigger?void 0:I,onMouseDown:A,...Du(C)}),R=E&&1===h.comboboxState,O=Wd(R,null==(o=h.virtual)?void 0:o.options),P=Wd(R,h.value),N=Zl((e=>h.compare(P,e)));if(h.virtual){if(void 0===O)throw new Error("Missing `options` in virtual mode");Object.assign(p,{children:r.default.createElement(Of.Provider,{value:O!==h.virtual.options?{...h,virtual:{...h.virtual,options:O}}:h},r.default.createElement(Rf,{slot:k},p.children))})}let D=Ad();return r.default.createElement(bf,{enabled:!!c&&(e.static||E)},r.default.createElement(Of.Provider,{value:1===h.mode?h:{...h,isSelected:N}},D({ourProps:M,theirProps:{...p,children:r.default.createElement(jd,{freeze:R},"function"==typeof p.children?null==(i=p.children)?void 0:i.call(p,k):p.children)},slot:k,defaultTag:"div",features:Ff,visible:E,name:"Combobox.Options"})))})),Uf=Nd((function(e,t){var n,o,i,s;let a=Pf("Combobox.Option"),l=Af("Combobox.Option"),u=(0,r.useId)(),{id:c=`headlessui-combobox-option-${u}`,value:d,disabled:f=null!=(i=null==(o=null==(n=a.virtual)?void 0:n.disabled)?void 0:o.call(n,d))&&i,order:p=null,...h}=e,m=Su(a.inputElement),$=a.virtual?a.activeOptionIndex===a.calculateIndex(d):null!==a.activeOptionIndex&&(null==(s=a.options[a.activeOptionIndex])?void 0:s.id)===c,g=a.isSelected(d),w=(0,r.useRef)(null),v=ql({disabled:f,value:d,domRef:w,order:p}),y=(0,r.useContext)(Mf),b=Au(t,w,y?y.measureElement:null),x=Zl((()=>{l.setIsTyping(!1),l.onChange(d)}));Kl((()=>l.registerOption(c,v)),[v,c]);let S=(0,r.useRef)(!(a.virtual||a.__demoMode));Kl((()=>{if(!a.virtual&&!a.__demoMode)return Wl().requestAnimationFrame((()=>{S.current=!0}))}),[a.virtual,a.__demoMode]),Kl((()=>{if(S.current&&0===a.comboboxState&&$&&0!==a.activationTrigger)return Wl().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=w.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[w,$,a.comboboxState,a.activationTrigger,a.activeOptionIndex]);let _=Zl((e=>{e.preventDefault(),e.button===ff.Left&&(f||(x(),vu()||requestAnimationFrame((()=>m())),0===a.mode&&l.closeCombobox()))})),E=Zl((()=>{if(f)return l.goToOption(Qd.Nothing);let e=a.calculateIndex(d);l.goToOption(Qd.Specific,e)})),C=function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=Mu(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=Mu(t)}}}(),T=Zl((e=>C.update(e))),k=Zl((e=>{if(!C.wasMoved(e)||f||$)return;let t=a.calculateIndex(d);l.goToOption(Qd.Specific,t,0)})),I=Zl((e=>{C.wasMoved(e)&&(f||$&&(a.optionsPropsRef.current.hold||l.goToOption(Qd.Nothing)))})),A=(0,r.useMemo)((()=>({active:$,focus:$,selected:g,disabled:f})),[$,g,f]),M={id:c,ref:b,role:"option",tabIndex:!0===f?void 0:-1,"aria-disabled":!0===f||void 0,"aria-selected":g,disabled:void 0,onMouseDown:_,onFocus:E,onPointerEnter:T,onMouseEnter:T,onPointerMove:k,onMouseMove:k,onPointerLeave:I,onMouseLeave:I};return Ad()({ourProps:M,theirProps:h,slot:A,defaultTag:"div",name:"Combobox.Option"})})),zf=Object.assign(Lf,{Input:Hf,Button:Bf,Label:Vf,Options:Gf,Option:Uf});class jf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Value","OnChange","Children"]}}class Wf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["DisplayValue","OnChange","ClassName","AutoComplete"]}}function Yf(e){const t=Ei(e,1);return r.createElement(zf.Input,t)}class Kf extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["ClassName"]}}function qf(e,t){const n=Ei(e,1);return r.createElement(zf.Options,n,...t)}class Zf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ClassName","Children"]}}function Jf(e){const t=Ei(e,1);return r.createElement(zf.Button,t)}class Xf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Key","Value","ClassName","Children"]}}class Qf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetResidencyStatusRadioBox","SetCountry"]}}class ep extends me{constructor(e){super(),this.ResidencyStatus=e}}function tp(e){return function(e){let t,n;switch(null==e?t=2:2===e.tag?(t=1,n=e.fields[0]):t=0,t){case 0:return!0;case 1:return null!=n.HomeCountry;default:return!1}}(e)?zs(e):js(e)}function np(e){return new ep(tp(e.ResidencyStatus.Value))}function rp(e,t,n){let o,i;const s=Et.useState(""),a=e=>{let t,n;return Ue((n=Bi(e),t=1===n.tag?void 0:n.fields[0],null==t?void 0:t.Name),"")};let l;const u=He(s[0]);let c,d;return null!=u?""===u?c=0:(c=1,d=u):c=0,0===c?l=t:l=function(e,t){return sr(e.comparer,Kn(e.comparer,t,e.tree))}(t,((e,t)=>{const n=e=>{return(t=e,t.replace(new RegExp(de(" "),"g"),"")).toLocaleLowerCase();var t},r=n(t),o=n(d);return r.indexOf(o)>=0})),function(e){const t=Ei(e,1);return r.createElement(zf,t)}(yt([new jf(0,[a(e)]),new jf(1,[n]),new jf(2,[[(0,r.createElement)("div",I(yt([["className","relative mt-1"],(o=[(0,r.createElement)("div",I(yt([["className","relative w-full cursor-default overflow-hidden focus:outline-none focus:border-primary-focus"],(i=[Yf(yt([new Wf(0,[a(e)]),new Wf(2,["block w-full pr-10 focus:outline-none text-base sm:text-sm rounded-md border-gray-300 focus:border-primary-focus shadow-none focus:ring-0"]),new Wf(1,[e=>{s[1](e.target.value)}]),new Wf(3,["off"])])),Jf(yt([new Zf(0,["absolute inset-y-0 right-0 flex items-center pr-2"]),new Zf(1,[[Rt]])]))],["children",Et.Children.toArray(Array.from(i))])]))),qf(dt(new Kf("absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50")),qt(zt((()=>Xt(0===lr(l)?Yt((0,r.createElement)("div",{className:"relative cursor-default select-none py-2 px-4 text-gray-700",children:Et.Children.toArray(["Nothing found"])})):Wt(),zt((()=>an((e=>{const t=e,n=t[0];return Yt(function(e){const t=Ei(e,1);return r.createElement(zf.Option,t)}(yt([new Xf(0,[n]),new Xf(1,[n]),new Xf(2,["relative cursor-default select-none"]),new Xf(3,[e=>[(0,r.createElement)("span",{className:"py-2 pl-2 pr-4 block truncate "+(e.active||e.selected?"bg-primary-base":"bg-white text-black"),children:t[1]})]])])))}),l))))))))],["children",Et.Children.toArray(Array.from(o))])])))]])]))}function op(e){let t,n;const o=(i=e.InitialValue,[np(new ep(js(i))),ia()]);var i;n=Ia((()=>ba((()=>o),((t,n)=>function(e,t){const n=function(e){let t;if(1===e.tag){let t;const n=Bi(Ue(e.fields[0].Value,""));return t=1===n.tag?void 0:n.fields[0],np(new ep(js(null==t?Vi:Gi(t))))}return np(new ep(js((t=e.fields[0].Value,null==t?void 0:function(e){switch(e){case"AustralianResidentForTaxPurposes":return new Hi(0,[]);case"ForeignResidentForTaxPurposes":return new Hi(1,[]);case"WorkingHolidayMaker":return Vi;default:return}}(t)))))}(t);return e(n.ResidencyStatus),[n,ia()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",I(dt((t=qt(zt((()=>Xt(Yt(qs("Are you an Australian resident for tax purposes or a working holiday maker?")),zt((()=>{let e,t;return Xt(Yt((0,r.createElement)(Ra,(e=xt((e=>[Ws(e[0]),e[1],e[2]]),yt([[new Hi(0,[]),"Australian resident for tax purposes",void 0],[new Hi(1,[]),"Foreign resident",void 0],[new Hi(2,[{}]),"Working holiday maker",void 0]])),{InitialValue:Le((t=s.ResidencyStatus.Value,null==t?void 0:Ws(t))),Name:"ResidencyStatus",OnUpdate:e=>{a(new Qf(0,[e]))},ValueLabelPairs:e}))),zt((()=>{let e,t;const n=s.ResidencyStatus.Value;let o,i;return null!=n&&2===n.tag?(o=0,i=n.fields[0]):o=1,Yt(0===o?(0,r.createElement)("div",I(yt([["className",Ie(" ",["mt-4"])],(e=[qs("Your home country where your visa was issued"),rp(Ue((t=i.HomeCountry,null==t?void 0:t.Code),""),Di,(e=>{a(new Qf(1,[zs(e)]))}))],["children",Et.Children.toArray(Array.from(e))])]))):null)})))})))))),["children",Et.Children.toArray(Array.from(t))]))))}class ip extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetTfnInformation","SetPreviousSurname","SetResidencyStatus","SetClaimTaxFreeThreshold","SetDebtSupport","SetEmploymentBasis","GetData","ShowAlert","HideAlert","Saved","AppReady"]}}class sp extends me{constructor(e,t,n,r,o,i,s,a){super(),this.PreExistingTfnDec=e,this.CurrentAlert=t,this.TfnInformation=n,this.PreviousSurname=r,this.ResidencyStatus=o,this.ClaimTaxFreeThreshold=i,this.DebtSupportCheckboxGroup=s,this.EmploymentBasisRadioButtonGroup=a}}function ap(e){return 3===e.tag?Us():zs(e)}class lp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Web","ReactNative","WebComponent"]}}function up(){const e=Re(document.URL,["/"],void 0,0),t=qe("web",e,{Equals:(e,t)=>e===t,GetHashCode:w}),n=qe("react-native",e,{Equals:(e,t)=>e===t,GetHashCode:w}),r=He(document.querySelector("tax-component"));let o;switch(o=null==r?t?n?3:1:n?2:3:0,o){case 0:return new xr(0,[new lp(2,[r])]);case 1:return new xr(0,[new lp(0,[])]);case 2:return new xr(0,[new lp(1,[])]);default:return new xr(1,["Could not determine the embed mode"])}}class cp extends he{constructor(){super(),this.tag=0,this.fields=[]}cases(){return["SuccessRedirectionUrl"]}}function dp(e){return pe(e)}function fp(){return[new sp(new Sn(0,[]),void 0,Us(),zs(void 0),zs(new Hi(0,[])),ea(new Js(0,[])),zs(void 0),zs(new Ui(0,[]))),ia()]}function pp(e,t){let n;switch(e.tag){case 1:return[new sp(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,e.fields[0],t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),ia()];case 2:{const r=e.fields[0];return[new sp(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,r,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),(n=r.Value,null==n?ia():1===n.tag?dt((e=>{e(new ip(3,[new Xs(1,[new Js(1,[]),!1])]))})):2===n.tag?dt((e=>{e(new ip(3,[new Xs(1,[new Js(1,[]),!0])]))})):dt((e=>{e(new ip(3,[new Xs(1,[new Js(0,[]),!1])]))})))]}case 3:return[new sp(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,ta(e.fields[0],t.ClaimTaxFreeThreshold),t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),ia()];case 4:return[new sp(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,e.fields[0],t.EmploymentBasisRadioButtonGroup),ia()];case 5:{const n=(r=Ks,null!=(o=e.fields[0].Value)?r(Fe(o)):void 0);return[new sp(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,new Gs(n,{Valid:null!=n})),ia()]}case 6:{const n=e.fields[0],r=new sp(n,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),o=dt((e=>{e(new ip(7,[new Fs(1,["There was an error loading your tax declaration. Please try refreshing this page."])]))}));!function(){let e,t;const n=He(document.getElementById("external-loading-page-container"));nn((t=document.body,e=e=>t.removeChild(e),t=>{e(t)}),Ge(n))}();const i=dt((e=>{e(new ip(10,[]))}));switch(n.tag){case 2:if(1===n.fields[0].tag)return[r,o];{const e=ze((e=>function(e,t){let n;if(0===t.tag){const o=t.fields[0];let i;const s=o.TfnInformation;if(1===s.tag){const e=function(e){switch(e){case 0:return new xr(0,[new ji(0,[])]);case 1:return new xr(0,[new ji(1,[])]);case 2:return new xr(0,[new ji(2,[])]);default:return new xr(1,["Invalid ExemptionReason"])}}(s.fields[0]);i=1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[new Na(1,[new Pa(1,[e.fields[0]])])])}else i=new xr(0,[new Na(0,[s.fields[0]])]);if(1===i.tag)return new xr(1,[i.fields[0]]);{const t=Xi(o.ResidencyStatusV2);if(1===t.tag)return new xr(1,[t.fields[0]]);{const s=t.fields[0],a=1===s.tag||2===s.tag?new Js(1,[]):o.IsTaxFreeThresholdClaimed?new Js(0,[]):new Js(1,[]),l=ns(o.HasDebtSupport);if(1===l.tag)return new xr(1,[l.fields[0]]);{const t=l.fields[0],u=Qi(o.EmploymentBasis);return 1===u.tag?new xr(1,[u.fields[0]]):new xr(0,[new sp(e.PreExistingTfnDec,e.CurrentAlert,zs(i.fields[0]),zs((n=o.PreviousSurname,null==n?void 0:(r=n,new Wi(r)))),tp(s),ea(a),ft(t)?zs(void 0):zs(t),ap(u.fields[0]))])}}}}{const n=t.fields[0];let r,o;const i=n.ResidencyStatusV2;if(o=null==i?void 0:Xi(i),null!=o){const e=o;r=1===e.tag?new xr(1,[e.fields[0]]):new xr(0,[e.fields[0]])}else r=new xr(0,[void 0]);if(1===r.tag)return new xr(1,[r.fields[0]]);{const t=Qi(n.EmploymentBasis);return 1===t.tag?new xr(1,[t.fields[0]]):new xr(0,[new sp(e.PreExistingTfnDec,e.CurrentAlert,e.TfnInformation,e.PreviousSurname,tp(r.fields[0]),e.ClaimTaxFreeThreshold,e.DebtSupportCheckboxGroup,ap(t.fields[0]))])}}var r}(r,e)),n.fields[0].fields[0].Info);if(null==e)return[r,i];{const t=e;return 0===t.tag?[t.fields[0],i]:[r,o]}}case 3:return[r,o];default:return[r,i]}}case 7:return[new sp(t.PreExistingTfnDec,e.fields[0],t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),ia()];case 8:return[new sp(t.PreExistingTfnDec,void 0,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),ia()];case 9:return[new sp(new Sn(2,[new xr(0,[e.fields[0]])]),t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),ia()];case 10:return function(){const e=up();let t;if(0===e.tag)switch(e.fields[0].tag){case 0:case 1:t=0;break;default:t=1}else t=1;0===t&&window.parent.postMessage({sender:"flare",type:"appReady"},"*",Be(ut()))}(),[t,ia()];default:return[new sp(t.PreExistingTfnDec,t.CurrentAlert,e.fields[0],t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),ia()]}var r,o}class hp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetText","SetTouched"]}}class mp extends me{constructor(e,t){super(),this.Text=e,this.Meta=t}}class $p extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Number","Text"]}}function gp(e){let t,n;const o=function(e,t){const n=Ue(e,"");return[new mp(n,{Touched:!1,Valid:t(n)}),ia()]}(e.InitialValue,e.Validator);n=Ia((()=>ba((()=>o),((t,n)=>function(e,t,n,r){const o=function(e,t,n){if(1===t.tag)return new mp(n.Text,{Touched:!0,Valid:n.Meta.Valid});{const r=t.fields[0];return new mp(r,{Touched:n.Meta.Touched,Valid:e(r)})}}(t,n,r);return e(new Gs(o.Text,{Valid:o.Meta.Valid})),[o,ia()]}(e.OnUpdate,e.Validator,t,n)),((e,t)=>{}))),void 0,void 0);const i=n[0],s=n[1];return(0,r.createElement)("div",I(yt([["className",Ie(" ",bt(e.AdditionalWrapperClasses,dt("z-10")))],(t=qt(zt((()=>Xt(Yt((0,r.createElement)("input",I(qt(zt((()=>Xt(Yt(["className",Ie(" ",bt(e.AdditionalInputClasses,bt(yt(["block","w-full","pr-10","focus:outline-none","text-base","sm:text-sm","rounded-md","border-gray-300"]),qt(zt((()=>!i.Meta.Valid&&i.Meta.Touched?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:Wt()))))))]),zt((()=>Xt(Yt(["type","text"]),zt((()=>Xt(Yt(["onChange",t=>{const n=t.target.value;s(new hp(0,[1===e.InputType.tag?n:Oe(Si,n)]))}]),zt((()=>{let t;return Xt(Yt((t=i.Text,["ref",e=>{null==e||_(e.value,t)||(e.value=t)}])),zt((()=>Xt(Yt(["onBlur",e=>{s(new hp(1,[]))}]),zt((()=>Xt(_(e.InputType,new $p(0,[]))?Yt(["inputMode","numeric"]):Wt(),zt((()=>Yt(["data-testid",e.TestId]))))))))))}))))))))))))))),zt((()=>!i.Meta.Valid&&i.Meta.Touched?Yt((0,r.createElement)("div",{className:Ie(" ",["mt-1","text-sm","text-red-600"]),children:e.InvalidFeedback})):Wt())))))),["children",Et.Children.toArray(Array.from(t))])])))}class wp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetPreviousSurname"]}}class vp extends me{constructor(e,t){super(),this.YesNoButtonGroup=e,this.Data=t}}function yp(e){return 1!==function(e){const t=ke(n=e)?new xr(1,["Previous Surname cannot be null, empty or white spaces"]):new xr(0,[n]);var n;return 1===t.tag?new xr(1,[t.fields[0]]):function(e,t,n){return n.length<=59?new xr(0,[n]):new xr(1,["Previous Surname must be no more than 59 characters long."])}(0,0,t.fields[0])}(e).tag}function bp(e){const t=e.YesNoButtonGroup.Selected;return null==t?new vp(e.YesNoButtonGroup,new Gs(e.Data.Value,{Valid:!1})):1===t.tag?new vp(e.YesNoButtonGroup,new Gs(e.Data.Value,{Valid:!0})):new vp(e.YesNoButtonGroup,new Gs(e.Data.Value,{Valid:Ue(ze((e=>yp(e.fields[0])),e.Data.Value),!1)}))}function xp(e){let t,n;const o=(i=e.InitialValue,[bp(new vp(ea(new Js(null==i?1:0,[])),new Gs(i,{Valid:!1}))),ia()]);var i;n=Ia((()=>ba((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r,o;return bp(1===e.tag?(n=e.fields[0],new vp(t.YesNoButtonGroup,new Gs(ze((e=>new Wi(e)),n.Value),{Valid:n.Meta.Valid}))):(r=e.fields[0],r.tag,o=1===r.fields[0].tag?new Gs(void 0,t.Data.Meta):t.Data,new vp(ta(r,t.YesNoButtonGroup),o)))}(t,n);return e(r.Data),[r,ia()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",I(yt([["className",Ie(" ",Pt)],(t=qt(zt((()=>Xt(Yt(qs("Have you changed your surname since you last dealt with the Australian Tax Office (ATO)?")),zt((()=>Xt(Yt((0,r.createElement)(ra,{Dispatch:e=>{a(new wp(0,[e]))},State:s.YesNoButtonGroup})),zt((()=>{let e;const t=s.YesNoButtonGroup.Selected;let n;return n=null!=t&&0===t.tag?0:1,Yt(0===n?(0,r.createElement)("div",I(yt([["className",Ie(" ",["mt-4"])],(e=[qs("Enter your previous surname"),(0,r.createElement)(gp,{AdditionalInputClasses:yt(["focus:ring-primary-focus","focus:border-primary-focus"]),AdditionalWrapperClasses:dt("mt-1"),InitialValue:Le(ze(Yi,s.Data.Value)),InputType:new $p(1,[]),InvalidFeedback:"Please enter your previous surname with a maximum length of 59 characters",OnUpdate:e=>{a(new wp(1,[e]))},TestId:"surname-input",Validator:yp})],["children",Et.Children.toArray(Array.from(e))])]))):null)}))))))))),["children",Et.Children.toArray(Array.from(t))])])))}const Sp=yt(["mt-7","bg-white","px-4","border","border-gray-200","rounded-lg","shadow-sm"]),_p=yt(["group","relative","w-full","my-3","focus-visible:outline-primary-hover","flex","justify-between","items-center","text-left"]),Ep=yt(["text-sm","text-primary-base","leading-3","font-medium"]),Cp=yt(["ml-6","flex","items-center"]),Tp=yt(["pt-1","pb-3","prose","prose-sm","text-gray-500","text-sm"]);function kp(e){let t,n,o,i;const s=e.content,a=e.title,l=Et.useState(!0),u=l[0];return(0,r.createElement)("div",I(yt([["className",Ie(" ",Sp)],(t=[(n=dt((0,r.createElement)("button",I(yt([["type","button"],["className",Ie(" ",_p)],["aria-expanded",u],["onClick",e=>{l[1](!u)}],(o=[(0,r.createElement)("span",{className:Ie(" ",Ep),children:a}),(0,r.createElement)("span",I(yt([["className",Ie(" ",Cp)],(i=qt(zt((()=>Yt(u?At:It)))),["children",Et.Children.toArray(Array.from(i))])])))],["children",Et.Children.toArray(Array.from(o))])])))),(0,r.createElement)("h3",{children:Et.Children.toArray(Array.from(n))})),(0,r.createElement)("div",{className:Ie(" ",bt(Tp,qt(zt((()=>u?Yt("hidden"):Wt()))))),children:Et.Children.toArray([s])})],["children",Et.Children.toArray(Array.from(t))])])))}class Ip extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class Ap extends me{constructor(e){super(),this.Selected=e}}function Mp(e,t){return null!=function(e,t){return((t,n)=>{for(;;){const r=t,o=n;if(it(o))return;if(e(at(o)))return r;t=r+1,n=lt(o)}})(0,t)}((t=>e===t),t.Selected)}function Rp(e){let t,n;const o=(i=e.InitialValue,[new Ap(i),ia()]);var i;return n=Ia((()=>ba((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){const n=e.fields[0];return Mp(n,t)?new Ap(St((e=>n!==e),t.Selected)):new Ap(bt(dt(n),t.Selected))}(t,n);return e(r.Selected),[r,ia()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("fieldset",I(yt([["className",Ie(" ",["space-y-2","mt-2"])],(t=qt(zt((()=>an((e=>{let t,o,i;const s=e[0];return Yt((0,r.createElement)("div",I(yt([["className",Ie(" ",["relative","flex","items-start"])],["onChange",e=>{e.target.checked,n[1](new Ip(s))}],(t=[(0,r.createElement)("div",I(yt([["className",Ie(" ",["flex","items-center","h-5"])],(o=[(0,r.createElement)("input",{className:Ie(" ",["focus:ring-primary-focus","h-4","w-4","text-primary-base","border-gray-300","rounded"]),type:"checkbox",id:s,checked:Mp(s,n[0])})],["children",Et.Children.toArray(Array.from(o))])]))),(0,r.createElement)("div",I(yt([["className",Ie(" ",["ml-3","text-sm"])],(i=[(0,r.createElement)("label",{className:Ie(" ",["font-normal","text-gray-700"]),for:s,children:e[1]})],["children",Et.Children.toArray(Array.from(i))])])))],["children",Et.Children.toArray(Array.from(t))])]))))}),e.ValueLabelPairs)))),["children",Et.Children.toArray(Array.from(t))])])))}class Op extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetDebtSupport"]}}class Pp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ForeignResident","WorkingHolidayMaker"]}}class Np extends me{constructor(e,t,n){super(),this.YesNoButtonGroup=e,this.Data=t,this.DisableReason=n}}function Dp(e){let t,n;const r=e.YesNoButtonGroup.Selected;return null==r?new Np(e.YesNoButtonGroup,new Gs(e.Data.Value,{Valid:!1}),e.DisableReason):1===r.tag?new Np(e.YesNoButtonGroup,new Gs(e.Data.Value,{Valid:!0}),e.DisableReason):new Np(e.YesNoButtonGroup,new Gs(e.Data.Value,{Valid:(t=e.Data.Value,null!=t&&(o=t,st(o)>0&&(n=t,!0)))}),e.DisableReason);var o}function Fp(e){let t,n;const o=function(e,t,n){let r,o;const i=e.Value;let s;s=null==i||ft(i)?0:1,o=new Js(0===s?1:0,[]);const a=null!=t?null!=n?1===n.tag?function(e){let t;return t=1===e.tag&&1===e.fields[0].tag?1:0,0===t}(t)?void 0:(r=t,new Pp(0,[])):2===n.tag?new Pp(1,[]):void 0:void 0:null!=n?1===n.tag?new Pp(0,[]):2===n.tag?new Pp(1,[]):void 0:void 0,l=null==a?ia():dt((e=>{e(new Op(0,[new Xs(1,[new Js(1,[]),!0])]))}));return[Dp(new Np(ea(o),e,a)),l]}(e.InitialValue,e.TfnInfo,e.ResidencyStatus);n=Ia((()=>ba((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r;return Dp(1===e.tag?new Np(t.YesNoButtonGroup,zs(e.fields[0]),t.DisableReason):(n=e.fields[0],n.tag,r=1===n.fields[0].tag?zs(void 0):t.Data,new Np(ta(n,t.YesNoButtonGroup),r,t.DisableReason)))}(t,n);return e(r.Data),[r,ia()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,[e.TfnInfo,e.ResidencyStatus]);const i=n[0],s=n[1];return(0,r.createElement)("div",I(yt([["className",Ie(" ",Pt)],(t=qt(zt((()=>Xt(Yt(qs("Do you have any outstanding study and training support loans?")),zt((()=>Xt(Yt((0,r.createElement)(ra,{Disable:Le(ze((e=>new Js(0,[])),i.DisableReason)),Dispatch:e=>{s(new Op(0,[e]))},State:i.YesNoButtonGroup})),zt((()=>{let t;return Xt((t=i.DisableReason,null!=t?1===t.tag?Yt(Zs("Working holiday makers are ineligible for study and training support loans.")):Yt(Zs("You must provide your TFN to declare any outstanding study and training support loans.")):Yt(null)),zt((()=>{let t,n;const o=i.YesNoButtonGroup.Selected;let a;return a=null!=o&&0===o.tag?0:1,Yt(0===a?(0,r.createElement)("div",I(yt([["className",Ie(" ",["mt-4"])],(t=[(0,r.createElement)(Rp,(n=xt((e=>[pe(e[0]),e[1]]),yt([[new Fi(0,[]),"Higher Education Loan Program (HELP)"],[new Fi(1,[]),"VET Student Loan (VSL)"],[new Fi(2,[]),"Financial Supplement (FS)"],[new Fi(3,[]),"Student Start-up Loan (SSL)"],[new Fi(4,[]),"Trade Support Loan (TSL)"]])),{InitialValue:Ue(ze((e=>xt(pe,e)),e.InitialValue.Value),ut()),OnUpdate:e=>{s(new Op(1,[_t(Ys,e)]))},ValueLabelPairs:n}))],["children",Et.Children.toArray(Array.from(t))])]))):null)})))}))))))))),["children",Et.Children.toArray(Array.from(t))])])))}function Lp(e,t){return!!(e.TfnInformation.Meta.Valid&&e.PreviousSurname.Meta.Valid&&e.ResidencyStatus.Meta.Valid&&null!=e.ClaimTaxFreeThreshold.Selected&&e.EmploymentBasisRadioButtonGroup.Meta.Valid&&e.DebtSupportCheckboxGroup.Meta.Valid)&&!_(t,new Sn(1,[]))}function Bp(){return(0,r.createElement)("hr",{className:Ie(" ",["my-8"])})}const Hp=(0,r.createElement)("div",I(yt([["className",Ie(" ",["space-y-2"])],(()=>{let e,t,n;const o=[(e="You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months.",(0,r.createElement)("p",{children:["You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months."]})),(t="Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers.",(0,r.createElement)("p",{children:["Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers."]})),(n="If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different.",(0,r.createElement)("p",{children:["If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different."]}))];return["children",Et.Children.toArray(Array.from(o))]})()]))),Vp=(0,r.createElement)("div",I(yt([["className",Ie(" ",["space-y-2"])],(()=>{let e,t;const n=[(e="If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income.",(0,r.createElement)("p",{children:["If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income."]})),(t="You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes.",(0,r.createElement)("p",{children:["You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes."]})),(0,r.createElement)("p",{children:["Foreign residents and working holiday makers are ineligible to claim the threshold."]})];return["children",Et.Children.toArray(Array.from(n))]})()])));function Gp(e){const t=e.backendUrl,n=e.accessToken;let o;const i=fp();o=Ia((()=>ba((()=>i),pp,((e,t)=>{}))),void 0,void 0);const s=o[0],a=o[1],l=_n((()=>Os(n,t)),(e=>{a(new ip(6,[e]))}));Et.useEffect(l,[]);const u=Et.useState(new Sn(0,[])),c=u[0],d=_n((()=>function(e,t,n,r){let o;const i=Ds(e,t,n);return o=$n.Bind(i,(e=>{let t;const n=e;return 1===n.tag||r(new Fs(0,["Your tax declaration has been saved."])),t=n,$n.Return(t)})),$n.Bind(o,(e=>{let t;const n=e;if(1===n.tag){const e=n.fields[0];1===e.tag?r(new Fs(1,["There was an error saving your tax declaration. Please try saving again."])):r(new Fs(1,[`There was an error saving your tax declaration. ${e.fields[0]}`]))}return t=n,$n.Return(t)}))}(s,n,t,(e=>{a(new ip(7,[e]))}))),(e=>{let t,n;u[1](e),2===e.tag&&0===e.fields[0].tag?(t=0,n=e.fields[0].fields[0]):t=1,0===t&&(xn($n.Delay((()=>$n.Bind(bn(400),(()=>(function(){let e;const t=up();if(0===t.tag)switch(t.fields[0].tag){case 0:nn((e=>{window.parent.location.href=e}),Ge((n=new cp,He(sessionStorage.getItem(dp(n))))));break;case 1:nn((e=>{let t;t=JSON.stringify({stepStatus:"completed"}),e.postMessage(t)}),Ge(window.ReactNativeWebView));break;default:e=new CustomEvent("step-completion",{bubbles:!0,detail:"tax"}),t.fields[0].fields[0].dispatchEvent(e)}var n}(),$n.Zero())))))),a(new ip(9,[n])))}));switch(s.PreExistingTfnDec.tag){case 0:case 1:return(0,r.createElement)("div",{children:["Please wait..."]});default:{const e=qt(zt((()=>{let e,t;return Xt((e=s.CurrentAlert,null==e?Yt(null):(t=e,Yt((0,r.createElement)(Vs,{alert:t,hideAlert:()=>{a(new ip(8,[]))}})))),zt((()=>Xt(Yt((0,r.createElement)("h3",{className:Ie(" ",["text-3xl","font-bold","text-center","mb-8","sm:mb-12"]),children:"Tax Declaration"})),zt((()=>Xt(Yt((0,r.createElement)(Ua,{InitialValue:Le(s.TfnInformation.Value),OnUpdate:e=>{a(new ip(0,[e]))}})),zt((()=>Xt(Yt(Bp()),zt((()=>Xt(Yt((0,r.createElement)(xp,{InitialValue:Le(s.PreviousSurname.Value),OnUpdate:e=>{a(new ip(1,[e]))}})),zt((()=>Xt(Yt(Bp()),zt((()=>Xt(Yt((0,r.createElement)(op,{InitialValue:Le(s.ResidencyStatus.Value),OnUpdate:e=>{a(new ip(2,[e]))}})),zt((()=>Xt(Yt((0,r.createElement)(kp,{title:"About residency",content:Hp})),zt((()=>Xt(Yt(Bp()),zt((()=>{let e,t;return Xt(Yt((0,r.createElement)("div",I(yt([["className",Ie(" ",Pt)],(e=[qs("Would you like to claim the tax-free threshold from this employer?"),(0,r.createElement)(ra,{Disable:Le((t=s.ResidencyStatus.Value,null==t||2!==t.tag&&1!==t.tag?void 0:new Js(0,[]))),Dispatch:e=>{a(new ip(3,[e]))},State:s.ClaimTaxFreeThreshold})],["children",Et.Children.toArray(Array.from(e))])])))),zt((()=>{let e;return Xt((e=s.ResidencyStatus.Value,null!=e?2===e.tag?Yt(Zs("Working holiday makers are ineligible to claim the tax-free threshold.")):1===e.tag?Yt(Zs("Foreign residents are ineligible to claim the tax-free threshold.")):Yt(null):Yt(null)),zt((()=>Xt(Yt((0,r.createElement)(kp,{title:"About the tax-free threshold",content:Vp})),zt((()=>Xt(Yt(Bp()),zt((()=>Xt(Yt((0,r.createElement)(Fp,{InitialValue:s.DebtSupportCheckboxGroup,OnUpdate:e=>{a(new ip(4,[e]))},ResidencyStatus:Le(s.ResidencyStatus.Value),TfnInfo:Le(s.TfnInformation.Value)})),zt((()=>Xt(Yt(Bp()),zt((()=>Xt(Yt(qs("On what basis are you paid?")),zt((()=>Xt(Yt((0,r.createElement)("p",{className:"text-sm leading-5 font-normal text-gray-500",children:"Check with your employer if you’re unsure."})),zt((()=>{let e,t;return Xt(Yt((0,r.createElement)(Ra,(e=xt((e=>[pe(e[0]),e[1],e[2]]),yt([[new Ui(0,[]),"Full-time",void 0],[new Ui(1,[]),"Part-time",void 0],[new Ui(2,[]),"Labour Hire",void 0],[new Ui(4,[]),"Casual",void 0]])),{InitialValue:Le((t=s.EmploymentBasisRadioButtonGroup.Value,null==t?void 0:pe(t))),Name:"EmploymentBasis",OnUpdate:e=>{a(new ip(5,[e]))},ValueLabelPairs:e}))),zt((()=>Xt(Yt(Bp()),zt((()=>{let e;return Xt(Yt((0,r.createElement)("p",I(yt([["className","text-sm leading-5 font-normal text-gray-500"],(e="By clicking ‘Save and continue’ you declare that the information you have provided is true and correct.",["children","By clicking ‘Save and continue’ you declare that the information you have provided is true and correct."])])))),zt((()=>{let e;return Yt((0,r.createElement)("div",I(yt([["className",Ie(" ",["text-center"])],(e=[(0,r.createElement)("button",{className:Ie(" ",["w-full","max-w-320","px-10","py-2","mt-8","mb-10","border","border-transparent","text-sm","font-medium","rounded-md","shadow-sm","text-white","bg-primary-base","hover:bg-primary-hover","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-primary-focus","disabled:bg-gray-100","disabled:text-gray-400","disabled:border-gray-300","disabled:cursor-not-allowed"]),type:"button",disabled:!Lp(s,c),onClick:e=>{Lp(s,c)&&d()},children:"Save and continue","data-testid":"continue-button"})],["children",Et.Children.toArray(Array.from(e))])]))))})))}))))))})))))))))))))))))))))})))})))))))))))))))))))))))))))})));return(0,r.createElement)("form",{children:Et.Children.toArray(Array.from(e))})}}}function Up(e,t){return t.startsWith(e)?t:void 0}function zp(e,t){return t.endsWith(e)?t:void 0}function jp(e,t){return function(e){return 1===e?e=>{let t,n,r,o,i,s;return t=Up("/",e),null!=t?(n=t,"#"+n):(r=Up("#/",e),null!=r?(o=r,o):(i=Up("#",e),null!=i?(s=i,"#/"+Pe(s,1,s.length-1)):"#/"+e))}:e=>{let t,n;return t=Up("/",e),null!=t?(n=t,n):"/"+e}}(t)(Ie("/",xt((e=>e.indexOf("?")>=0||e.startsWith("#")||e.startsWith("/")?e:encodeURIComponent(e)),e)))}function Wp(e,t){return function(e,t){let n,r;const o=rt();let i=o,s=t;for(;!it(s);){let t=e(at(s));for(;!it(t);)n=i,r=new tt(at(t),void 0),n.tail=r,i=r,t=lt(t);s=lt(s)}const a=i,l=rt();return a.tail=l,lt(o)}((e=>{if(ke(e))return ut();{const t=function(e,...t){return 0===t.length?e.trimEnd():e.replace(new RegExp("["+de(t.join(""))+"]+$"),"")}(e,"#");if("?"===t)return ut();if(null!=Up("?",t))return dt(t);{const e=t.split("?");if(Je(((e,t)=>e===t),e,null)||1!==e.length){if(Je(((e,t)=>e===t),e,null)||2!==e.length)return ut();if(""===Xe(1,e)){const t=Xe(0,e);return dt(decodeURIComponent(t))}{const t=Xe(0,e),n=Xe(1,e);return yt([decodeURIComponent(t),"?"+n])}}{const t=Xe(0,e);return dt(decodeURIComponent(t))}}}}),yt(Re(null!=Up("#",e)?Pe(e,1,e.length-1):1!==t||null==zp("#",e)&&null==zp("#/",e)?e:"",["/"],void 0,0)))}const Yp=function(e){const t=Et.memo(e,M(Ue(ze(R,void 0),null)));return nn((t=>{e.displayName=t}),Ge(void 0)),e=>{const n=function(e,t){if(null==e)return t;{const n=e;return t.key=n(t),t}}(undefined,e);return Et.createElement(t,n)}}((e=>{const t=dn((t=>{const n=Ue(e.onUrlChanged,(e=>{}));!function(e,t){t(Wp(2===e?window.location.pathname+window.location.search:window.location.hash,e))}(Ue(e.hashMode,1),n)}));cn((()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),ln((()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))))),un((()=>{const e=document.createEvent("CustomEvent");e.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(e)}));const n=e.application;return null==n?null:n}));class Kp extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Token"]}}class qp extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["QueryString"]}}class Zp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Home","OidcSignIn","OidcSignInRedirectCallback","OidcSignInSilentCallback","NotFound"]}}function Jp(e){let t,n,r;if(ft(e))t=0;else if("oidc"===pt(e))if(ft(ht(e)))t=3;else switch(pt(ht(e))){case"callback":ft(ht(ht(e)))?t=3:ft(ht(ht(ht(e))))?(t=1,n=pt(ht(ht(e)))):t=3;break;case"silent-refresh":ft(ht(ht(e)))?t=3:ft(ht(ht(ht(e))))?(t=2,r=pt(ht(ht(e)))):t=3;break;default:t=3}else t=3;switch(t){case 0:{const e=window.location.search,t=new URLSearchParams(e),n=t.get("token");if(null==n)return new Zp(0,[]);{const e=n;return nn((e=>{!function(e,t){sessionStorage.setItem(dp(e),t)}(new cp,e)}),Ge(t.get("success-redirection-url"))),new Zp(1,[new Kp(e)])}}case 1:return new Zp(2,[new qp(n)]);case 2:return new Zp(3,[new qp(r)]);default:return new Zp(4,[])}}class Xp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved"]}}class Qp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Started","Finished"]}}class eh extends me{constructor(e){super(),this.AccessToken=e}}function th(e){return new eh(e.access_token)}class nh extends me{constructor(e){super(),this.Auth=e}}class rh extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GetUser","SignInRedirect","SignInRedirectCallback","SignInSilentCallback"]}}class oh extends me{constructor(e,t){super(),this.CurrentPage=e,this.Auth=t}}class ih extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["UrlChanged","AuthMsg"]}}class sh extends me{constructor(e,t,n){super(),this.model=e,this.render=t,this.equal=n}}class ah extends r.Component{constructor(e){super(e)}shouldComponentUpdate(e,t){return!this.props.equal(this.props.model,e.model)}render(){return this.props.render()}}const lh=(()=>{try{return Dr(r.version.slice(void 0,2),511,!1,32)>=18}catch(e){return!1}})(),uh=document.querySelector("#tfn-declaration-app"),ch=uh.getAttribute("data-identity-url"),dh=uh.getAttribute("data-backend-url"),fh=(()=>{const e={};return e.store=Be(window.sessionStorage),e})();function ph(){return new UserManager(function(){const e=(n=window.location.origin+window.location.pathname).endsWith("/")?n:n+"/",t={};var n;return t.authority=ch,t.client_id="apollo-tfn-declaration-ui",t.redirect_uri=e+"#/oidc/callback?",t.response_type="id_token token",t.scope="openid profile",t.automaticSilentRenew=!0,t.silent_redirect_uri=Be(e+"#/oidc/silent-refresh?"),t.post_logout_redirect_uri=e+"#/oidc/logout?",t.accessTokenExpiringNotificationTime=10,t.filterProtocolClaims=!0,t.loadUserInfo=!1,t.clockSkew=2592e3,t.userStore=new WebStorageStateStore(fh),t}())}function hh(e){return e.length>0?Pe(e,1):e}function mh(e){return ph().signinRedirect(Be({extraQueryParams:{irt:e.fields[0]}}))}function $h(e){return ph().signinRedirectCallback(hh(e.fields[0]))}function gh(e){return ph().signinSilentCallback(hh(e.fields[0]))}function wh(){return ph().getUser()}var vh;!function(e){Ea(void 0,e)}((vh=ba((function(){const e=Jp(Wp(window.location.hash,1)),t=function(){const e=Jp(Wp(window.location.hash,1));return[new nh(new Xp(0,[])),1===e.tag?dt((t=>{t(new rh(1,[new Qp(0,[]),e.fields[0]]))})):2===e.tag?dt((t=>{t(new rh(2,[new Qp(0,[]),e.fields[0]]))})):3===e.tag?dt((t=>{t(new rh(3,[new Qp(0,[]),e.fields[0]]))})):dt((e=>{e(new rh(0,[new Qp(0,[])]))}))]}();return[new oh(e,t[0]),sa((e=>new ih(1,[e])),t[1])]}),(function(e,t){if(1===e.tag){const n=function(e,t){const n=e=>[new nh(new Xp(2,[new xr(1,[e])])),ia()];switch(e.tag){case 1:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("SignInRedirect failed: %s"))(e.fields[0].fields[0].fields[0])):[t,ia()]:[new nh(new Xp(1,[])),(o=mh,i=e.fields[1],s=t=>new rh(1,[new Qp(1,[new xr(1,[t.message])]),e.fields[1]]),dt((e=>{o(i).catch((t=>{e(s(t))}))})))];case 2:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("failed sign in: %s"))(e.fields[0].fields[0].fields[0])):[new nh(new Xp(2,[new xr(0,[th(e.fields[0].fields[0].fields[0])])])),(r=e=>{!function(e){history.pushState(void 0,"",jp(e,1));const t=document.createEvent("CustomEvent");t.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(t)}(dt(""))},dt(r))]:[new nh(new Xp(1,[])),aa($h,e.fields[1],(t=>(window.gtag&&window.gtag("event","oidc_sign_in",{}),new rh(2,[new Qp(1,[new xr(0,[t])]),e.fields[1]]))),(t=>new rh(2,[new Qp(1,[new xr(1,[t.message])]),e.fields[1]])))];case 3:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("failed silent sign in: %s"))(e.fields[0].fields[0].fields[0])):null==e.fields[0].fields[0].fields[0]?n("silent refresh expected a user but got none"):[new nh(new Xp(2,[new xr(0,[th(e.fields[0].fields[0].fields[0])])])),ia()]:[t,aa(gh,e.fields[1],(t=>new rh(3,[new Qp(1,[new xr(0,[t])]),e.fields[1]])),(t=>new rh(3,[new Qp(1,[new xr(1,[t.message])]),e.fields[1]])))];default:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("failed to get current user: %s"))(e.fields[0].fields[0].fields[0])):null==e.fields[0].fields[0].fields[0]?n("expected a user but got none"):[new nh(new Xp(2,[new xr(0,[th(e.fields[0].fields[0].fields[0])])])),ia()]:[new nh(new Xp(1,[])),aa(wh,void 0,(e=>new rh(0,[new Qp(1,[new xr(0,[e])])])),(e=>new rh(0,[new Qp(1,[new xr(1,[e.message])])])))]}var r,o,i,s}(e.fields[0],t.Auth);return[new oh(t.CurrentPage,n[0]),sa((e=>new ih(1,[e])),n[1])]}return[new oh(Jp(e.fields[0]),t.Auth),ia()]}),((e,t)=>function(e,t,n){let i,s,a;switch(t.CurrentPage.tag){case 1:case 2:case 3:a=o();break;case 4:a=r.createElement("h1",{},"Not found");break;default:{const n=t.Auth.Auth;a=2===n.tag?1===n.fields[0].tag?r.createElement("h1",{},"Unauthorised"):(0,r.createElement)("div",I(yt([["className",Ie(" ",["font-inter","max-w-560","mx-auto"])],(i=[(0,r.createElement)("style",{children:[Ct]}),(0,r.createElement)(Gp,{accessToken:n.fields[0].fields[0].AccessToken,backendUrl:e})],["children",Et.Children.toArray(Array.from(i))])]))):o()}}return Yp(I(yt([["onUrlChanged",e=>{n(new ih(0,[e]))}],(s=dt((0,r.createElement)("div",{children:Et.Children.toArray([a])})),["application",r.createElement(r.Fragment,{},...s)])])))}(dh,e,t))),function(e,t,n){let o;return xa(M(lh?(i=document.getElementById(t),o={render:function(e){(0,r.render)(e,i)},unmount:function(){(0,r.unmountComponentAtNode)(i)}},t=>r=>{o.render(e((e=>t=>e===t),Sa(n),t,r))}):o=>i=>{r.render(e((e=>t=>e===t),Sa(n),o,i),document.getElementById(t))}),n);var i}(((e,t,n,o)=>function(e,t,n,o){const i=new sh(n,(()=>t(n,o)),e);return r.createElement(ah,i)}(M(e),M(t),n,o)),"tfn-declaration-app",vh)))})();
|
|
2
|
+
(()=>{"use strict";var e={725:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(601),o=n.n(r),i=n(314),s=n.n(i),a=n(417),l=n.n(a),u=new URL(n(354),n.b),c=new URL(n(764),n.b),d=new URL(n(945),n.b),f=new URL(n(608),n.b),p=s()(o()),h=l()(u),m=l()(c),$=l()(d),g=l()(f);p.push([e.id,`*,:after,:before{--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:rgba(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:rgba(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: }/*! tailwindcss v3.4.14 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;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;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height: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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url(${h});background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url(${m})}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(${$})}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(${g});background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.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}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{bottom:0;top:0}.right-0{right:0}.z-10{z-index:10}.z-50{z-index:50}.-mx-1\\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1\\.5{margin-bottom:-.375rem;margin-top:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-8{margin-bottom:2rem;margin-top:2rem}.-ml-px{margin-left:-1px}.mb-0\\.5{margin-bottom:.125rem}.mb-10{margin-bottom:2.5rem}.mb-8{margin-bottom:2rem}.ml-3{margin-left:.75rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.max-h-60{max-height:15rem}.w-1\\/2{width:50%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-auto{width:auto}.w-full{width:100%}.max-w-320{max-width:320px}.max-w-560{max-width:560px}.flex-none{flex:none}.flex-grow{flex-grow:1}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.125rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.125rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-primary-base{background-color:var(--fl-color-primary)}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-0\\.5{padding:.125rem}.p-1\\.5{padding:.375rem}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-top:.75rem}.pb-3,.py-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-inter{font-family:Inter,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.leading-3{line-height:.75rem}.leading-5{line-height:1.25rem}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-primary-base{color:var(--fl-color-primary)}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.placeholder-red-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-red-300::placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{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 rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-none,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.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))}.ring-opacity-5{--tw-ring-opacity:0.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)}.hover\\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)}.hover\\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.focus\\:z-10:focus{z-index:10}.focus\\:z-20:focus{z-index:20}.focus\\:border-primary-focus:focus{border-color:var(--fl-color-primary-focus)}.focus\\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0: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(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-1: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)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset:inset}.focus\\:ring-blue-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity))}.focus\\:ring-green-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.focus\\:ring-primary-focus:focus{--tw-ring-color:var(--fl-color-primary-focus)}.focus\\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\\:ring-red-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\\:ring-offset-blue-50:focus{--tw-ring-offset-color:#eff6ff}.focus\\:ring-offset-green-50:focus{--tw-ring-offset-color:#f0fdf4}.focus\\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\\:outline-primary-hover:focus-visible{outline-color:var(--fl-color-primary-hover)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.disabled\\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.group:hover .group-hover\\:text-primary-hover{color:var(--fl-color-primary-hover)}@media (min-width:640px){.sm\\:mb-12{margin-bottom:3rem}.sm\\:py-2{padding-bottom:.5rem;padding-top:.5rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}`,""]);const w=p},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&s[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},601:e=>{e.exports=function(e){return e[1]}},299:(e,t,n)=>{n.r(t),n.d(t,{Children:()=>z,Component:()=>a.uA,Fragment:()=>a.FK,PureComponent:()=>L,StrictMode:()=>Me,Suspense:()=>q,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>ye,cloneElement:()=>Ce,createContext:()=>a.q6,createElement:()=>a.n,createFactory:()=>xe,createPortal:()=>ne,createRef:()=>a._3,default:()=>Be,findDOMNode:()=>ke,flushSync:()=>Ae,forwardRef:()=>G,hydrate:()=>ce,isElement:()=>De,isFragment:()=>_e,isMemo:()=>Ee,isValidElement:()=>Se,lazy:()=>J,memo:()=>B,render:()=>ue,startTransition:()=>Re,unmountComponentAtNode:()=>Te,unstable_batchedUpdates:()=>Ie,useCallback:()=>E,useContext:()=>C,useDebugValue:()=>T,useDeferredValue:()=>Oe,useEffect:()=>y,useErrorBoundary:()=>k,useId:()=>I,useImperativeHandle:()=>S,useInsertionEffect:()=>Ne,useLayoutEffect:()=>b,useMemo:()=>_,useReducer:()=>v,useRef:()=>x,useState:()=>w,useSyncExternalStore:()=>Fe,useTransition:()=>Pe,version:()=>be});var r,o,i,s,a=n(172),l=0,u=[],c=a.fF,d=c.__b,f=c.__r,p=c.diffed,h=c.__c,m=c.unmount,$=c.__;function g(e,t){c.__h&&c.__h(o,e,l||t),l=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function w(e){return l=1,v(D,e)}function v(e,t,n){var i=g(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):D(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var s=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&i.__c.props===e)&&(!a||a.call(this,e,t,n))};o.u=!0;var a=o.shouldComponentUpdate,l=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}l&&l.call(this,e,t,n)},o.shouldComponentUpdate=s}return i.__N||i.__}function y(e,t){var n=g(r++,3);!c.__s&&N(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function b(e,t){var n=g(r++,4);!c.__s&&N(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function x(e){return l=5,_((function(){return{current:e}}),[])}function S(e,t,n){l=6,b((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function _(e,t){var n=g(r++,7);return N(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E(e,t){return l=8,_((function(){return e}),t)}function C(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function T(e,t){c.useDebugValue&&c.useDebugValue(t?t(e):e)}function k(e){var t=g(r++,10),n=w();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function I(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function A(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(P),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){o=null,d&&d(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$&&$(e,t)},c.__r=function(e){f&&f(e),r=0;var t=(o=e.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(P),t.__h=[],r=0)),i=o},c.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&s===c.requestAnimationFrame||((s=c.requestAnimationFrame)||R)(A)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),i=o=null},c.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||P(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],c.__e(n,e.__v)}})),h&&h(e,t)},c.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&c.__e(t,n.__v))};var M="function"==typeof requestAnimationFrame;function R(e){var t,n=function(){clearTimeout(r),M&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);M&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function P(e){var t=o;e.__c=e.__(),o=t}function N(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function D(e,t){return"function"==typeof t?t(e):t}function F(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function L(e,t){this.props=e,this.context=t}function B(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,a.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(L.prototype=new a.uA).isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,t){return F(this.props,e)||F(this.state,t)};var H=a.fF.__b;a.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),H&&H(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function G(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,a.v2)((0,a.v2)(e).map(t))},z={map:U,forEach:U,count:function(e){return e?(0,a.v2)(e).length:0},only:function(e){var t=(0,a.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:a.v2},j=a.fF.__e;a.fF.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);j(e,t,n,r)};var W=a.fF.unmount;function Y(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Y(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function q(){this.__u=0,this.t=null,this.__b=null}function Z(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,a.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function X(){this.u=null,this.o=null}a.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(q.prototype=new a.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Z(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Y(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,a.n)(a.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,a.n)(a.FK,null,t.__a?null:e.children),o]};var Q=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ee(e){return this.getChildContext=function(){return e.context},e.children}function te(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,a.XX)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,a.XX)((0,a.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,a.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new a.uA).__a=function(e){var t=this,n=Z(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Q(t,e,r)):o()};n?n(i):i()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,a.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Q(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,se=/[A-Z0-9]/g,ae="undefined"!=typeof document,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,a.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ce(e,t,n){return(0,a.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}a.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(a.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=a.fF.event;function fe(){}function pe(){return this.cancelBubble}function he(){return this.defaultPrevented}a.fF.event=function(e){return de&&(e=de(e)),e.persist=fe,e.isPropagationStopped=pe,e.isDefaultPrevented=he,e.nativeEvent=e};var me,$e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=a.fF.vnode;a.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var s=t[i];if(!("value"===i&&"defaultValue"in t&&null==s||ae&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":"translate"===l&&"no"===s?s=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||le(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":ie.test(i)&&(i=l):l=i="oninput":o&&oe.test(i)?i=i.replace(se,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",$e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var we=a.fF.__r;a.fF.__r=function(e){we&&we(e),me=e.__c};var ve=a.fF.diffed;a.fF.diffed=function(e){ve&&ve(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var ye={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:E,useContext:C,useDebugValue:T,useDeferredValue:Oe,useEffect:y,useId:I,useImperativeHandle:S,useInsertionEffect:Ne,useLayoutEffect:b,useMemo:_,useReducer:v,useRef:x,useState:w,useSyncExternalStore:Fe,useTransition:Pe}}},be="18.3.1";function xe(e){return a.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===re}function _e(e){return Se(e)&&e.type===a.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ce(e){return Se(e)?a.Ob.apply(null,arguments):e}function Te(e){return!!e.__k&&((0,a.XX)(null,e),!0)}function ke(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ie=function(e,t){return e(t)},Ae=function(e,t){return e(t)},Me=a.FK;function Re(e){e()}function Oe(e){return e}function Pe(){return[!1,Re]}var Ne=b,De=Se;function Fe(e,t){var n=t(),r=w({h:{__:n,v:t}}),o=r[0].h,i=r[1];return b((function(){o.__=n,o.v=t,Le(o)&&i({h:o})}),[e,n,t]),y((function(){return Le(o)&&i({h:o}),e((function(){Le(o)&&i({h:o})}))}),[e]),n}function Le(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Be={useState:w,useId:I,useReducer:v,useEffect:y,useLayoutEffect:b,useInsertionEffect:Ne,useTransition:Pe,useDeferredValue:Oe,useSyncExternalStore:Fe,startTransition:Re,useRef:x,useImperativeHandle:S,useMemo:_,useCallback:E,useContext:C,useDebugValue:T,version:"18.3.1",Children:z,render:ue,hydrate:ce,unmountComponentAtNode:Te,createPortal:ne,createElement:a.n,createContext:a.q6,createFactory:xe,cloneElement:Ce,createRef:a._3,Fragment:a.FK,isValidElement:Se,isElement:De,isFragment:_e,isMemo:Ee,findDOMNode:ke,Component:a.uA,PureComponent:L,memo:B,forwardRef:G,flushSync:Ae,unstable_batchedUpdates:Ie,StrictMode:Me,Suspense:q,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ye}},172:(e,t,n)=>{n.d(t,{FK:()=>S,Ob:()=>j,Qv:()=>z,XX:()=>U,_3:()=>x,fF:()=>o,n:()=>y,q6:()=>W,uA:()=>_,v2:()=>R});var r,o,i,s,a,l,u,c,d,f,p,h={},m=[],$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,n){var o,i,s,a={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return b(e,a,o,i,null)}function b(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++i:s,__i:-1,__u:0};return null==s&&null!=o.vnode&&o.vnode(a),a}function x(){return{current:null}}function S(e){return e.children}function _(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?E(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function T(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!k.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||l)(k)}function k(){var e,t,n,r,i,a,l,c;for(s.sort(u);e=s.shift();)e.__d&&(t=s.length,r=void 0,a=(i=(n=e).__v).__e,l=[],c=[],n.__P&&((r=w({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),F(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[a]:null,l,null==a?E(i):a,!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,L(l,r,c),r.__e!=a&&C(r)),s.length>t&&s.sort(u));k.__r=0}function I(e,t,n,r,o,i,s,a,l,u,c){var d,f,p,$,g,w=r&&r.__k||m,v=t.length;for(n.__d=l,A(n,t,w),l=n.__d,d=0;d<v;d++)null!=(p=n.__k[d])&&(f=-1===p.__i?h:w[p.__i]||h,p.__i=d,F(e,p,f,o,i,s,a,l,u,c),$=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&H(f.ref,null,p),c.push(p.ref,p.__c||$,p)),null==g&&null!=$&&(g=$),65536&p.__u||f.__k===p.__k?l=M(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:$&&(l=$.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=g}function A(e,t,n){var r,o,i,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?(s=r+d,(o=e.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,null):g(o)?b(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,i=null,-1!==(a=o.__i=O(o,n,s,c))&&(c--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:(a>s?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(c)for(r=0;r<u;r++)null!=(i=n[r])&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=E(i)),V(i,i))}function M(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=M(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=E(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function O(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&i===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||$.test(t)?n:n+"px"}function N(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||P(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=c,e.addEventListener(t,i?f:d,i)):e.removeEventListener(t,i?f:d,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function D(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=c++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function F(e,t,n,r,i,s,a,l,u,c){var d,f,p,h,m,$,v,y,b,x,E,C,T,k,A,M,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),s=[l=t.__e=n.__e]),(d=o.__b)&&d(t);e:if("function"==typeof R)try{if(y=t.props,b="prototype"in R&&R.prototype.render,x=(d=R.contextType)&&r[d.__c],E=d?x?x.props.value:d.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:(b?t.__c=f=new R(y,E):(t.__c=f=new _(y,E),f.constructor=R,f.render=G),x&&x.sub(f),f.props=y,f.state||(f.state={}),f.context=E,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),b&&null==f.__s&&(f.__s=f.state),b&&null!=R.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=w({},f.__s)),w(f.__s,R.getDerivedStateFromProps(y,f.__s))),h=f.props,m=f.state,f.__v=t,p)b&&null==R.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),b&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(b&&null==R.getDerivedStateFromProps&&y!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(y,E),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(y,f.__s,E)||t.__v===n.__v)){for(t.__v!==n.__v&&(f.props=y,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(y,f.__s,E),b&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,m,$)}))}if(f.context=E,f.props=y,f.__P=e,f.__e=!1,T=o.__r,k=0,b){for(f.state=f.__s,f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do{f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++k<25);f.state=f.__s,null!=f.getChildContext&&(r=w(w({},r),f.getChildContext())),b&&!p&&null!=f.getSnapshotBeforeUpdate&&($=f.getSnapshotBeforeUpdate(h,m)),I(e,g(M=null!=d&&d.type===S&&null==d.key?d.props.children:d)?M:[M],t,n,r,i,s,a,l,u,c),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),v&&(f.__E=f.__=null)}catch(e){if(t.__v=null,u||null!=s){for(t.__u|=u?160:128;l&&8===l.nodeType&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,t.__e=l}else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=B(n.__e,t,n,r,i,s,a,u,c);(d=o.diffed)&&d(t)}function L(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)H(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function B(e,t,n,i,s,a,l,u,c){var d,f,p,m,$,w,y,b=n.props,x=t.props,S=t.type;if("svg"===S?s="http://www.w3.org/2000/svg":"math"===S?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if(($=a[d])&&"setAttribute"in $==!!S&&(S?$.localName===S:3===$.nodeType)){e=$,a[d]=null;break}if(null==e){if(null===S)return document.createTextNode(x);e=document.createElementNS(s,S,x.is&&x),u&&(o.__m&&o.__m(t,a),u=!1),a=null}if(null===S)b===x||u&&e.data===x||(e.data=x);else{if(a=a&&r.call(e.childNodes),b=n.props||h,!u&&null!=a)for(b={},d=0;d<e.attributes.length;d++)b[($=e.attributes[d]).name]=$.value;for(d in b)if($=b[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=$;else if(!(d in x)){if("value"==d&&"defaultValue"in x||"checked"==d&&"defaultChecked"in x)continue;N(e,d,null,$,s)}for(d in x)$=x[d],"children"==d?m=$:"dangerouslySetInnerHTML"==d?f=$:"value"==d?w=$:"checked"==d?y=$:u&&"function"!=typeof $||b[d]===$||N(e,d,$,b[d],s);if(f)u||p&&(f.__html===p.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),I(e,g(m)?m:[m],t,n,i,"foreignObject"===S?"http://www.w3.org/1999/xhtml":s,a,l,a?a[0]:n.__k&&E(n,0),u,c),null!=a)for(d=a.length;d--;)v(a[d]);u||(d="value","progress"===S&&null==w?e.removeAttribute("value"):void 0!==w&&(w!==e[d]||"progress"===S&&!w||"option"===S&&w!==b[d])&&N(e,d,w,b[d],s),d="checked",void 0!==y&&y!==e[d]&&N(e,d,y,b[d],s))}return e}function H(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function V(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&V(r[i],t,n||"function"!=typeof e.type);n||v(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function G(e,t,n){return this.constructor(e,n)}function U(e,t,n){var i,s,a,l;o.__&&o.__(e,t),s=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],F(t,e=(!i&&n||t).__k=y(S,null,[e]),s||h,h,t.namespaceURI,!i&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:s?s.__e:t.firstChild,i,l),L(a,e,l)}function z(e,t){U(e,t,z)}function j(e,t,n){var o,i,s,a,l=w({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?o=t[s]:"ref"==s?i=t[s]:l[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),b(e.type,l,o||e.key,i||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,T(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},i=0,_.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},_.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},_.prototype.render=S,s=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,c=0,d=D(!1),f=D(!0),p=0},63:(e,t,n)=>{var r=n(299),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return a((function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})}),[e,n,t]),s((function(){return u(o)&&c({inst:o}),e((function(){u(o)&&c({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},888:(e,t,n)=>{e.exports=n(63)},945:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Ccircle cx=%278%27 cy=%278%27 r=%273%27/%3E%3C/svg%3E"},764:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0%27/%3E%3C/svg%3E"},608:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 16 16%27%3E%3Cpath stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M4 8h8%27/%3E%3C/svg%3E"},354:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3E%3Cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27m6 8 4 4 4-4%27/%3E%3C/svg%3E"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href;var r=n(299);function o(){return r.createElement("div",{},"Please wait...")}function i(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function s(e){return null!=e&&"function"==typeof e.Dispose}function a(e){s(e)&&e.Dispose()}function l(e,t){return Object.getPrototypeOf(e)?.constructor===Object.getPrototypeOf(t)?.constructor}Symbol.iterator;class u{constructor(e){this.iter=e,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function c(e){return function(e){return null!=e&&"function"==typeof e.GetEnumerator}(e)?e.GetEnumerator():new u(e[Symbol.iterator]())}function d(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"]();return{done:!t,value:t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0}}}}class f{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function p(e,t){return e.toString(10).padStart(t,"0")}function h(e){const t=e;return"number"==typeof t.offset?t.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function m(e,t){return(e=e<0&&null!=t&&10!==t?65535+e+1:e).toString(t)}function $(e,t){return(e=e<0&&null!=t&&10!==t?4294967295+e+1:e).toString(t)}class g{static id(e){return g.idMap.has(e)||g.idMap.set(e,++g.count),g.idMap.get(e)}}function w(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=33*n^e.charCodeAt(t++);return n}function v(e){return 2654435761*e|0}function y(e){let t=0;const n=e.length;for(let r=0;r<n;r++)t=(t<<5)+t^e[r];return t}function b(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return v(e);case"bigint":return function(e){return w(e.toString(32))}(e);case"string":return w(e);default:if(function(e){return null!=e&&"function"==typeof e.GetHashCode}(e))return e.GetHashCode();if(i(e))return function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=b(e[r]);return y(n)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e)?.constructor===Object){const t=Object.values(e).map((e=>b(e)));return y(t)}return v(g.id(e))}}function x(e,t,n){if(null==e)return null==t;if(null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function S(e,t){return x(e,t,_)}function _(e,t){return e===t||(null==e?null==t:null!=t&&(function(e){return null!=e&&"function"==typeof e.Equals}(e)?e.Equals(t):i(e)?i(t)&&S(e,t):"object"==typeof e&&(e instanceof Date?t instanceof Date&&0===E(e,t):Object.getPrototypeOf(e)?.constructor===Object&&function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!_(e[n[o]],t[r[o]]))return!1;return!0}(e,t))))}function E(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+h(e),r=t.getTime()+h(t)),n===r?0:n<r?-1:1}function C(e,t){return e===t?0:e<t?-1:1}function T(e,t){return function(e,t,n){if(null==e)return null==t?0:1;if(null==t)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),0!==o)return o;return 0}(e,t,k)}function k(e,t){return e===t?0:null==e?null==t?0:-1:null==t?1:function(e){return null!=e&&"function"==typeof e.CompareTo}(e)?e.CompareTo(t):i(e)?i(t)?T(e,t):-1:"object"!=typeof e?e<t?-1:1:e instanceof Date?t instanceof Date?E(e,t):-1:Object.getPrototypeOf(e)?.constructor===Object?function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,i=0;o<n.length;o++){const s=n[o];if(s!==r[o])return s<r[o]?-1:1;if(i=k(e[s],t[s]),0!==i)return i}return 0}(e,t):-1}function I(e){const t={};for(const n of e)t[n[0]]=n[1];return t}g.idMap=new WeakMap,g.count=0;const A=new WeakMap;function M(e){if(null==e)return null;const t=(t,n)=>e(t)(n);return A.set(t,e),t}function R(e){return A.get(e)??(t=>n=>e(t,n))}function O(e){if(null==e)return null;const t=(t,n,r)=>e(t)(n)(r);return A.set(t,e),t}function P(e){return A.get(e)??(t=>n=>r=>e(t,n,r))}const N=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],D=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],L=["January","February","March","April","May","June","July","August","September","October","November","December"];function B(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function H(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function V(e,t){let n=t;const r=e[t];let o="",i=!1;for(;t<e.length;){const n=e[++t];if(n===r){i=!0;break}if("\\"===n){if(!(t<e.length))throw new Error("Invalid string format");o+=e[++t]}else o+=n}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function G(e,t,n){let r=0,o=0,i="";const s=n?Y(e.getTime(),1):e;for(;r<t.length;){const e=t[r];switch(e){case"d":switch(o=B(t,r,"d"),r+=o,o){case 1:i+=J(s);break;case 2:i+=p(J(s),2);break;case 3:i+=N[re(s)];break;case 4:i+=D[re(s)]}break;case"f":if(o=B(t,r,"f"),r+=o,o<=3){const e=10**(3-o);i+=p(Math.floor(Q(s)/e),o)}else o<=7&&(i+=(""+Q(s)).padEnd(o,"0"));break;case"F":if(o=B(t,r,"F"),r+=o,o<=3){const e=10**(3-o),t=Math.floor(Q(s)/e);0!=t&&(i+=p(t,o))}else if(o<=7){const e=Q(s);0!=e&&(i+=p(e,3))}break;case"g":o=B(t,r,"g"),r+=o,o<=2&&(i+="A.D.");break;case"h":switch(o=B(t,r,"h"),r+=o,o){case 1:i+=X(s)%12;break;case 2:i+=p(X(s)%12,2)}break;case"H":switch(o=B(t,r,"H"),r+=o,o){case 1:i+=X(s);break;case 2:i+=p(X(s),2)}break;case"K":if(o=B(t,r,"K"),r+=o,1===o)switch(U(s)){case 1:i+="Z";break;case 2:i+=z(-6e4*s.getTimezoneOffset())}break;case"m":switch(o=B(t,r,"m"),r+=o,o){case 1:i+=ee(s);break;case 2:i+=p(ee(s),2)}break;case"M":switch(o=B(t,r,"M"),r+=o,o){case 1:i+=te(s);break;case 2:i+=p(te(s),2);break;case 3:i+=F[te(s)-1];break;case 4:i+=L[te(s)-1]}break;case"s":switch(o=B(t,r,"s"),r+=o,o){case 1:i+=ne(s);break;case 2:i+=p(ne(s),2)}break;case"t":switch(o=B(t,r,"t"),r+=o,o){case 1:i+=s.getHours()<12?"A":"P";break;case 2:i+=s.getHours()<12?"AM":"PM"}break;case"y":switch(o=B(t,r,"y"),r+=o,o){case 1:i+=s.getFullYear()%100;break;case 2:i+=p(s.getFullYear()%100,2);break;case 3:i+=p(s.getFullYear(),3);break;case 4:i+=p(s.getFullYear(),4);break;case 5:i+=p(s.getFullYear(),5)}break;case"z":o=B(t,r,"z"),r+=o;let a="";switch(U(s)){case 1:a="+00:00";break;case 2:a=z(-6e4*s.getTimezoneOffset());break;case 0:a=z(-6e4*Z(s).getTimezoneOffset())}const l="-"===a[0]?"-":"+",u=parseInt(a.substring(1,3),10),c=parseInt(a.substring(4,6),10);switch(o){case 1:i+=`${l}${u}`;break;case 2:i+=`${l}${p(u,2)}`;break;default:i+=`${l}${p(u,2)}:${p(c,2)}`}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[d,f]=V(t,r);i+=d,r+=f;break;case"%":const h=H(t,r);if(!(h>=0&&h!=="%".charCodeAt(0)))throw new Error("Invalid format string");r+=2,i+=G(s,String.fromCharCode(h),n);break;case"\\":const m=H(t,r);if(!(m>=0))throw new Error("Invalid format string");r+=2,i+=String.fromCharCode(m);break;default:r++,i+=e}}return i}function U(e){return e.kind||0}function z(e){const t=e<0,n=(e=Math.abs(e))%36e5/6e4;return(t?"-":"+")+p(~~(e/36e5),2)+":"+p(n,2)}function j(e,t){const n=e.toISOString();return"first"===t?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function W(e,t,n){return null!=e.offset?function(e,t){const n=new Date(e.getTime()+(e.offset??0));if("string"!=typeof t)return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+z(e.offset??0);if(1!==t.length)return G(n,t,!0);switch(t){case"D":case"d":return j(n,"first");case"T":case"t":return j(n,"second");case"O":case"o":return function(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+z(t)}(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}}(e,t):function(e,t){const n=1===e.kind;if("string"!=typeof t)return n?e.toUTCString():e.toLocaleString();if(1!==t.length)return G(e,t,n);switch(t){case"D":case"d":return n?j(e,"first"):e.toLocaleDateString();case"T":case"t":return n?j(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,t){if(t)return e.toISOString();{const t=null==e.kind||2===e.kind;return p(e.getFullYear(),4)+"-"+p(e.getMonth()+1,2)+"-"+p(e.getDate(),2)+"T"+p(e.getHours(),2)+":"+p(e.getMinutes(),2)+":"+p(e.getSeconds(),2)+"."+p(e.getMilliseconds(),3)+(t?z(-6e4*e.getTimezoneOffset()):"")}}(e,n);default:throw new Error("Unrecognized Date print format")}}(e,t)}function Y(e,t){const n=new Date(e);return n.kind=0|(null==t?0:t),n}function K(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||t(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,t=0;if(null!=o[2]){const e=o[2].split(":"),n=parseInt(e[0],10);t=3600*n+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&n<12&&(t+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const t=new Date;e=new Date(t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,t-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const t=new Date;e=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate())}n=new Date(e.getTime()+1e3*t),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}else t();isNaN(n.getTime())&&t()}return[n,r]}function q(e,t){try{return t.contents=function(e,t=!1){const[n,r]=K(e),o=null!=r?t&&"Z"===r?1:2:0;return Y(n.getTime(),o)}(e),!0}catch(e){return!1}}function Z(e){return 2===e.kind?e:Y(e.getTime(),2)}function J(e){return 1===e.kind?e.getUTCDate():e.getDate()}function X(e){return 1===e.kind?e.getUTCHours():e.getHours()}function Q(e){return 1===e.kind?e.getUTCMilliseconds():e.getMilliseconds()}function ee(e){return 1===e.kind?e.getUTCMinutes():e.getMinutes()}function te(e){return(1===e.kind?e.getUTCMonth():e.getMonth())+1}function ne(e){return 1===e.kind?e.getUTCSeconds():e.getSeconds()}function re(e){return 1===e.kind?e.getUTCDay():e.getDay()}const oe=Symbol("numeric");function ie(e){return"number"==typeof e||"bigint"==typeof e||e?.[oe]}function se(e,t){return"number"==typeof e?e*t:"bigint"==typeof e?e*BigInt(t):e[oe]().multiply(t)}function ae(e,t){return"number"==typeof e?e.toFixed(t):"bigint"==typeof e?e:e[oe]().toFixed(t)}function le(e,t){return"number"==typeof e?e.toPrecision(t):"bigint"==typeof e?e:e[oe]().toPrecision(t)}function ue(e,t){return"number"==typeof e?e.toExponential(t):"bigint"==typeof e?e:e[oe]().toExponential(t)}function ce(e){return"number"==typeof e?(Number(e)>>>0).toString(16):"bigint"==typeof e?BigInt.asUintN(64,e).toString(16):e[oe]().toHex()}function de(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fe(e,t,n=0){if(null==t)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,i=-1;for(;null!=(o=e.exec(t));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}function pe(e,t=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let t=0,n="[";for(const r of e){if(0===t)n+=pe(r);else{if(100===t){n+="; ...";break}n+="; "+pe(r)}t++}return n+"]"}(e);{const n=Object.getPrototypeOf(e)?.constructor;return n===Object&&t<10?"{ "+Object.entries(e).map((([e,n])=>e+" = "+pe(n,t+1))).join("\n ")+" }":n?.name??""}}return String(e)}class he{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,t){if(0===t.length)return e;{let n,r=!0;return 1===t.length?(n=pe(t[0]),r=n.indexOf(" ")>=0):n=t.map((e=>pe(e))).join(", "),e+(r?" (":" ")+n+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>b(e)));return e.splice(0,0,v(this.tag)),y(e)}Equals(e){return this===e||!!l(this,e)&&this.tag===e.tag&&S(this.fields,e.fields)}CompareTo(e){return this===e?0:l(this,e)?this.tag===e.tag?T(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class me{toJSON(){return function(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}(this)}toString(){return function(e){return"{ "+Object.entries(e).map((([e,t])=>e+" = "+pe(t))).join("\n ")+" }"}(this)}GetHashCode(){return function(e){const t=Object.values(e).map((e=>b(e)));return y(t)}(this)}Equals(e){return function(e,t){if(e===t)return!0;if(l(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!_(e[n[r]],t[n[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,t){if(e===t)return 0;if(l(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=k(e[n[r]],t[n[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class $e{get contents(){return this.getter()}set contents(e){this.setter(e)}constructor(e,t){"function"==typeof t?(this.getter=e,this.setter=t):(this.getter=()=>e,this.setter=t=>{e=t})}}class ge{constructor(e){this.message=e}}function we(e){return function(e){return e instanceof ge||e instanceof Error}(e)||function(e){return e instanceof Promise}(e)?e:new Error(String(e))}const ve=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,ye=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function be(e,t){return function(e,t){return"number"==typeof e||"bigint"==typeof e?e<t?-1:e>t?1:0:e.CompareTo(t)}(e,t)<0}function xe(e){return{input:e,cont:(t=e,e=>{ve.lastIndex=0;const n=[],r=[];let o=0,i=ve.exec(t);for(;i;){const e=i.index+(i[1]||"").length;n.push(t.substring(o,e).replace(/%%/g,"%")),r.push(i),o=ve.lastIndex,ve.lastIndex-=1,i=ve.exec(t)}return 0===n.length?e(t.replace(/%%/g,"%")):(n.push(t.substring(o).replace(/%%/g,"%")),Te(e,n,r))})};var t}function Se(e,t){return"string"==typeof t?e(t):t.cont(e)}function _e(e){return Se((e=>e),e)}function Ee(e){return Se((e=>{throw new Error(e)}),e)}function Ce(e,t,n,r,o){let i="";if(t=t||"",o=o||"",ie(e))switch("x"!==o.toLowerCase()&&(be(e,0)?(e=se(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=ae(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?le(e,r):le(e);break;case"e":case"E":e=null!=r?ue(e,r):ue(e);break;case"x":e=ce(e);break;case"X":e=ce(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?W(e):pe(e);if(n="number"==typeof n?n:parseInt(n,10),isNaN(n))e=i+e;else{const r=t.indexOf("0")>=0,o=t.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=Ae(e,n-i.length,s,o)):Ae(i+e,n,s,o)}return e}function Te(e,t,n,r="",o=-1){return(...i)=>{let s=r;const a=t.slice(),l=n.slice();for(const e of i){const[,,t,n,r,i]=l[0];let u=n;if(o>=0)u=o,o=-1;else if("*"===u){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=a[0],s+=Ce(e,t,u,r,i),a.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=a[0],e(s)):Te(e,a,l,s,o)}}function ke(e){return"string"!=typeof e||/^\s*$/.test(e)}function Ie(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function Ae(e,t,n,r){n=n||" ",t-=e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function Me(e,t,n){return Ae(e,t,n)}function Re(e,t,n,r){if(r="number"==typeof r?r:0,(n="number"==typeof n?n:void 0)&&n<0)throw new Error("Count cannot be less than zero");if(0===n)return[];const o=!(1&~r),i=!(2&~r);t=(t=t||[]).filter((e=>e)).map(de),t=t.length>0?t:["\\s"];const s=[],a=new RegExp(t.join("|"),"g");let l=!0,u=0;do{const t=a.exec(e);if(null===t){const t=i?e.substring(u).trim():e.substring(u);(!o||t.length>0)&&s.push(t),l=!1}else{const r=i?e.substring(u,t.index).trim():e.substring(u,t.index);(!o||r.length>0)&&(null!=n&&s.length+1===n?(s.push(i?e.substring(u).trim():e.substring(u)),l=!1):s.push(r)),u=a.lastIndex}}while(l);return s}function Oe(e,t){return t.split("").filter((t=>e(t))).join("")}function Pe(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=n?e.substr(t,n):e.substr(t)}var Ne=n(725);class De{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return b(this.value)}Equals(e){return null!=e&&_(this.value,e instanceof De?e.value:e)}CompareTo(e){return null==e?1:k(this.value,e instanceof De?e.value:e)}}function Fe(e){if(null==e)throw new Error("Option has no value");return e instanceof De?e.value:e}function Le(e){return e instanceof De?e.value:e}function Be(e){return null==e||e instanceof De?new De(e):e}function He(e){return null==e?void 0:e}function Ve(e){return null==e?null:Fe(e)}function Ge(e){return null==e?[]:[Fe(e)]}function Ue(e,t){return null!=e?Fe(e):t}function ze(e,t){return null!=t?Be(e(Fe(t))):void 0}const je="Collection was empty.";function We(e,t){return"function"==typeof e?new e(t):new Array(t)}function Ye(e,t,n,r){const o=0|t;return e.fill(r,o,o+n)}function Ke(e,t,n){const r=0|t.length,o=We(n,r);for(let n=0;n<=r-1;n++)Xe(o,n,e(Je(n,t)));return o}function qe(e,t,n){const r=e;return n.reduce(r,t)}function Ze(e,t,n){if(null==t)return null==n;if(null==n)return!1;{let r=0,o=!0;const i=0|t.length,s=0|n.length;if(i>s)return!1;if(i<s)return!1;for(;r<i&&o;)o=e(Je(r,t),Je(r,n)),r=r+1|0;return o}}function Je(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Xe(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function Qe(e,t,n){return t.reduceRight(((t,n)=>e(n,t)),n)}class et extends me{constructor(e,t){super(),this.head=e,this.tail=t}toString(){return"["+Ie("; ",this)+"]"}Equals(e){return this===e||((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Fe(o),a=Fe(i);if(_(n.head,r.head)){e=s,t=a;continue e}return!1}return!1}return null==i}})(this,e)}GetHashCode(){return 0|((e,t,n)=>{for(;;){const r=e,o=t,i=n,s=i.tail;if(null==s)return 0|o;{const a=Fe(s);if(r>18)return 0|o;e=r+1,t=(o<<1)+b(i.head)+631*r,n=a}}})(0,0,this)}toJSON(){return Array.from(this)}CompareTo(e){return 0|((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Fe(o),a=Fe(i),l=0|k(n.head,r.head);if(0===l){e=s,t=a;continue e}return 0|l}return 1}return null!=i?-1:0}})(this,e)}GetEnumerator(){return new tt(this)}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return c(this)}}class tt{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,t=e.it.tail;if(null!=t){const n=Fe(t);return e.current=e.it.head,e.it=n,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function nt(){return new et(null,void 0)}function rt(e,t){return new et(e,t)}function ot(e){return null==e.tail}function it(e){return 0|((e,t)=>{for(;;){const n=e,r=t.tail;if(null==r)return 0|n;e=n+1,t=Fe(r)}})(0,e)}function st(e){if(null!=e.tail)return e.head;throw new Error(je+"\\nParameter name: list")}function at(e){const t=e.tail;if(null!=t)return Fe(t);throw new Error(je+"\\nParameter name: list")}function lt(){return nt()}function ut(e,t){return rt(e,t)}function ct(e){return rt(e,nt())}function dt(e){return ot(e)}function ft(e){return st(e)}function pt(e){return at(e)}function ht(e){const t=0|it(e),n=Ye(new Array(t),0,t,null);return((e,t)=>{for(;;){const r=e,o=t;if(ot(o))break;Xe(n,r,st(o)),e=r+1,t=at(o)}})(0,e),n}function mt(e,t,n){let r=t,o=n;for(;!ot(o);)r=e(r,ft(o)),o=at(o);return r}function $t(e){return mt(((e,t)=>rt(t,e)),nt(),e)}function gt(e,t){mt(((t,n)=>{e(n)}),void 0,t)}function wt(e,t){let n=t;for(let t=e.length-1;t>=0;t--)n=rt(Je(t,e),n);return n}function vt(e){return wt(e,nt())}function yt(e,t){return mt(((e,t)=>rt(t,e)),t,$t(e))}function bt(e,t){const n=nt(),r=mt(((t,n)=>{const r=new et(e(n),void 0);return t.tail=r,r}),n,t),o=nt();return r.tail=o,at(n)}function xt(e,t){const n=nt(),r=mt(((t,n)=>{if(e(n)){const e=new et(n,void 0);return t.tail=e,e}return t}),n,t),o=nt();return r.tail=o,at(n)}function St(e,t){const n=nt(),r=mt(((t,n)=>{const r=e(n);if(null==r)return t;{const e=new et(Fe(r),void 0);return t.tail=e,e}}),n,t),o=nt();return r.tail=o,at(n)}const _t=r.default,Et=pe(Ne.A),Ct=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=ct((0,r.createElement)("path",I(ct((e="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z",["d","M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"])))));return["children",_t.Children.toArray(Array.from(t))]})()]))),Tt=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=ct((0,r.createElement)("path",I(vt([(e="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",["d","M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"]),["fill-rule","evenodd"],["clipRule","evenodd"]]))));return["children",_t.Children.toArray(Array.from(t))]})()]))),kt=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=ct((0,r.createElement)("path",{d:"M18 12H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",_t.Children.toArray(Array.from(e))]})()]))),It=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=ct((0,r.createElement)("path",{d:"M12 6v6m0 0v6m0-6h6m-6 0H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",_t.Children.toArray(Array.from(e))]})()]))),At=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ct((0,r.createElement)("path",I(vt([["fill-rule","evenodd"],(e="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",["d","M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",_t.Children.toArray(Array.from(t))]})()]))),Mt=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-5","w-5","text-gray-400"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ct((0,r.createElement)("path",I(vt([["fill-rule","evenodd"],(e="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",["d","M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",_t.Children.toArray(Array.from(t))]})()]))),Rt=(0,r.createElement)("svg",I(vt([["className",Ie(" ",["h-5","w-5","text-amber-400","flex-none"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=ct((0,r.createElement)("path",I(vt([["fill-rule","evenodd"],(e="M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z",["d","M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z"]),["clipRule","evenodd"]]))));return["children",_t.Children.toArray(Array.from(t))]})()]))),Ot=vt(["flex","flex-col","align-center"]),Pt="The input sequence has an insufficient number of elements.";function Nt(){throw new Error("Enumeration has not started. Call MoveNext.")}function Dt(){throw new Error("Enumeration already finished.")}class Ft{constructor(e){this.f=e}toString(){let e=0,t="seq [";const n=c(this);try{for(;e<4&&n["System.Collections.IEnumerator.MoveNext"]();)e>0&&(t+="; "),t+=pe(n["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(t+="; ..."),t+"]"}finally{a(n)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Lt{constructor(e,t,n){this.current=e,this.next=t,this.dispose=n}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function Bt(e,t,n){return new Lt(e,t,n)}function Ht(e,t,n){let r,o=!1,i=Be(e());const s=()=>{if(null!=i){const e=Fe(i);try{n(e)}finally{i=void 0}}},a=()=>{try{s()}finally{r=void 0}};return Bt((()=>(o||Nt(),null!=r?Fe(r):Dt())),(()=>{if(o||(o=!0),null!=i){const e=Fe(i);let n;try{n=t(e)}catch(e){throw a(),e}return null!=n?(r=n,!0):(a(),!1)}return!1}),s)}function Vt(e){return function(e){return new Ft(e)}(e)}function Gt(e){return t="source",null==e&&function(e){throw new Error(e)}(t),c(e);var t}function Ut(e){return Vt((()=>c(e())))}function zt(e){return Vt((()=>function(e){let t,n,r,o=!1,i=!1;const s=()=>{if(i=!0,null!=n){const e=Fe(n);try{a(e)}finally{n=void 0}}if(null!=t){const e=Fe(t);try{a(e)}finally{t=void 0}}};return Bt((()=>(o?i&&Dt():Nt(),null!=r?Fe(r):Dt())),(()=>{let l;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=t;if(null!=i)if(null!=n){const e=Fe(n);if(e["System.Collections.IEnumerator.MoveNext"]())r=Be(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{a(e)}finally{n=void 0}}else{const e=Fe(i);e["System.Collections.IEnumerator.MoveNext"]()?(l=e["System.Collections.Generic.IEnumerator`1.get_Current"](),n=c(l)):(s(),o=!1)}else t=c(e)}return Fe(o)}}),(()=>{i||s()}))}(e)))}function jt(){return Ut((()=>new Array(0)))}function Wt(e){return Ut((()=>function(e){const t=We(void 0,1);return Xe(t,0,e),t}(e)))}function Yt(e){return e instanceof et?ht(e):Array.from(e)}function Kt(e){return i(e)?vt(e):e instanceof et?e:function(e){let t,n;if(i(e))return vt(e);if(e instanceof et)return e;{const r=nt();let o=r;const i=c(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();t=o,n=new et(e,void 0),t.tail=n,o=n}}finally{a(i)}const s=o,l=nt();return s.tail=l,at(r)}}(e)}function qt(e,t,n){return Vt((()=>Ht(e,t,n)))}function Zt(e,t,n){return Vt((()=>{let r=-1;return Ht(e,(e=>(r=r+1|0,t(r,e))),n)}))}function Jt(e,t){return zt([e,t])}function Xt(e,t,n){const r=Gt(t);try{let t=!1;for(;!t&&r["System.Collections.IEnumerator.MoveNext"]();)t=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{a(r)}}function Qt(e,t){return function(e,t){return qt((()=>Gt(t)),(t=>{let n;for(;null==n&&t["System.Collections.IEnumerator.MoveNext"]();)n=e(t["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}),(e=>{a(e)}))}((t=>e(t)?Be(t):void 0),t)}function en(e,t,n){const r=Gt(n);try{let n=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)n=e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{a(r)}}function tn(e,t){en(((t,n)=>{e(n)}),void 0,t)}function nn(e,t){return qt((()=>Gt(t)),(t=>t["System.Collections.IEnumerator.MoveNext"]()?Be(e(t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{a(e)}))}function rn(e){return Ut((()=>function(e){return e.slice().reverse()}(Yt(e))))}function on(e,t){return Vt((()=>{const n=Gt(t);try{for(let t=1;t<=e;t++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Pt+"\\nParameter name: source");return function(e,t){return Bt((()=>t["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>t["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{a(t)}finally{e()}}))}((()=>{}),n)}catch(e){throw a(n),e}}))}function sn(e,t){return Ut((()=>zt(nn(e,t))))}function an(e){return{Dispose(){e()}}}function ln(e){const t=_t.useRef(!1);_t.useEffect((()=>{t.current||(t.current=!0,e())}),[])}function un(e){const t=_t.useRef(void 0),n=_t.useRef(!1),o=_t.useRef(!1);var i,s;n.current&&(o.current=!0),i=()=>{return r=n.current?void 0:(n.current=!0,t.current=Be(e()),o.current?t.current:void 0),{Dispose(){tn((e=>{a(e)}),Ge(r))}};var r},s=[],(0,r.useEffect)((()=>{const e=i();return()=>{e.Dispose()}}),s)}function cn(e){const t=_t.useRef(e),n=_t.useCallback((e=>t.current(e)),[]);var o;return o=n=>(t.current=e,an((()=>{}))),(0,r.useLayoutEffect)((()=>{const e=o();return()=>{e.Dispose()}})),n}Symbol.iterator;class dn{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const t=this._id;return this._listeners.set(this._id++,e),t}removeListener(e){return this._listeners.delete(e)}register(e,t){const n=this,r=this.addListener(null==t?e:()=>e(t));return{Dispose(){n.removeListener(r)}}}Dispose(){}}class fn extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,fn.prototype)}}class pn{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>pn.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function hn(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new fn);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack((()=>{try{e(t)}catch(e){t.onError(we(e))}}));else try{e(t)}catch(e){t.onError(we(e))}}}const mn=new class{Bind(e,t){return function(e,t){return hn((n=>{e({onSuccess:e=>{try{t(e)(n)}catch(e){n.onError(we(e))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})}))}(e,t)}Combine(e,t){return this.Bind(e,(()=>t))}Delay(e){return hn((t=>e()(t)))}For(e,t){const n=e[Symbol.iterator]();let r=n.next();return this.While((()=>!r.done),this.Delay((()=>{const e=t(r.value);return r=n.next(),e})))}Return(e){return function(e){return hn((t=>t.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,t){return hn((n=>{e({onSuccess:e=>{t(),n.onSuccess(e)},onError:e=>{t(),n.onError(e)},onCancel:e=>{t(),n.onCancel(e)},cancelToken:n.cancelToken,trampoline:n.trampoline})}))}TryWith(e,t){return hn((n=>{e({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline,onError:e=>{try{t(e)(n)}catch(e){n.onError(we(e))}}})}))}Using(e,t){return this.TryFinally(t(e),(()=>e.Dispose()))}While(e,t){return e()?this.Bind(t,(()=>this.While(e,t))):this.Return(void 0)}Zero(){return hn((e=>e.onSuccess(void 0)))}};function $n(e){}function gn(e){const t=new dn("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout((()=>{t.cancel()}),e),t}function wn(e){e.cancel()}const vn=new dn;function yn(e){return hn((t=>{let n;const r=setTimeout((()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)}),e);n=t.cancelToken.addListener((()=>{clearTimeout(r),t.onCancel(new fn)}))}))}function bn(e,t){return function(e,t){return function(e,t,n,r,o){"function"!=typeof t&&(o=t,t=void 0);const i=new pn;e({onSuccess:t||$n,onError:n||$n,onCancel:r||$n,cancelToken:o||vn,trampoline:i})}(e,t)}(e,t)}class xn extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Sn(e,t){let n;const r=gn();return n=_t.useRef(r),un((()=>an((()=>{wn(n.current)})))),cn((r=>{var o;null!=(o=n.current)&&o.isCancelled||bn(mn.Delay((()=>mn.TryWith(mn.Delay((()=>(t(new xn(1,[])),mn.Bind(e(r),(e=>(t(new xn(2,[e])),mn.Zero())))))),(e=>(t(new xn(3,[e])),mn.Zero()))))),n.current)}))}class _n extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class En extends he{constructor(e,t){super(),this.tag=0,this.fields=[e,t]}cases(){return["Header"]}}class Cn extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Empty","Text","Binary","Form"]}}class Tn extends me{constructor(e,t,n,r,o,i,s,a){super(),this.url=e,this.method=t,this.headers=n,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=a}}class kn extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class In extends me{constructor(e,t,n,r,o,i){super(),this.statusCode=0|e,this.responseText=t,this.responseType=n,this.responseUrl=r,this.responseHeaders=o,this.content=i}}class An{constructor(e,t){this.k=e,this.v=t}}function Mn(e,t){return new An(e,t)}function Rn(e){return e.k}function On(e){return e.v}class Pn extends An{constructor(e,t,n,r,o){super(e,t),this.left=n,this.right=r,this.h=0|o}}function Nn(e,t,n,r,o){return new Pn(e,t,n,r,o)}function Dn(e){return e.left}function Fn(e){return e.right}function Ln(e){return e.h}function Bn(e,t){e:for(;;){const n=e;if(null!=t){const r=Fe(t);if(r instanceof Pn){const o=r;e=Bn(n+1,Dn(o)),t=Fn(o);continue e}return n+1|0}return 0|n}}function Hn(e){return Bn(0,e)}function Vn(e,t,n,r){let o,i,s,a;if(null!=e){const t=Fe(e);s=t instanceof Pn?(o=t,Ln(o)):1}else s=0;if(null!=r){const e=Fe(r);a=e instanceof Pn?(i=e,Ln(i)):1}else a=0;const l=0|(s<a?a:s);return 0===l?Mn(t,n):Nn(t,n,e,r,l+1)}function Gn(e,t,n,r){let o,i,s,a,l,u,c,d,f,p;if(null!=e){const t=Fe(e);f=t instanceof Pn?(o=t,Ln(o)):1}else f=0;if(null!=r){const e=Fe(r);p=e instanceof Pn?(i=e,Ln(i)):1}else p=0;if(p>f+2){const o=Fe(r);if(o instanceof Pn){const r=o;if(s=Dn(r),(null!=s?(a=Fe(s),a instanceof Pn?(l=a,Ln(l)):1):0)>f+1){const o=Fe(Dn(r));if(o instanceof Pn){const i=o;return Vn(Vn(e,t,n,Dn(i)),Rn(i),On(i),Vn(Fn(i),Rn(r),On(r),Fn(r)))}throw new Error("internal error: Map.rebalance")}return Vn(Vn(e,t,n,Dn(r)),Rn(r),On(r),Fn(r))}throw new Error("internal error: Map.rebalance")}if(f>p+2){const o=Fe(e);if(o instanceof Pn){const e=o;if(u=Fn(e),(null!=u?(c=Fe(u),c instanceof Pn?(d=c,Ln(d)):1):0)>p+1){const o=Fe(Fn(e));if(o instanceof Pn){const i=o;return Vn(Vn(Dn(e),Rn(e),On(e),Dn(i)),Rn(i),On(i),Vn(Fn(i),t,n,r))}throw new Error("internal error: Map.rebalance")}return Vn(Dn(e),Rn(e),On(e),Vn(Fn(e),t,n,r))}throw new Error("internal error: Map.rebalance")}return Vn(e,t,n,r)}function Un(e,t,n,r){if(null!=r){const o=Fe(r),i=0|e.Compare(t,Rn(o));if(o instanceof Pn){const r=o;return i<0?Gn(Un(e,t,n,Dn(r)),Rn(r),On(r),Fn(r)):0===i?Nn(t,n,Dn(r),Fn(r),Ln(r)):Gn(Dn(r),Rn(r),On(r),Un(e,t,n,Fn(r)))}return i<0?Nn(t,n,void 0,r,2):0===i?Mn(t,n):Nn(t,n,r,void 0,2)}return Mn(t,n)}function zn(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Fe(n),s=0|r.Compare(o,Rn(i));if(0===s)return Be(On(i));if(i instanceof Pn){const a=i;e=r,t=o,n=s<0?Dn(a):Fn(a);continue e}return}return}}function jn(e,t,n,r,o){return t(n,r)?Un(e,n,r,o):o}function Wn(e,t,n,r){e:for(;;){const o=e,i=t,s=r;if(null!=n){const a=Fe(n);if(a instanceof Pn){const l=a,u=Wn(o,i,Dn(l),s),c=jn(o,i,Rn(l),On(l),u);e=o,t=i,n=Fn(l),r=c;continue e}return jn(o,i,Rn(a),On(a),s)}return s}}function Yn(e,t,n){return Wn(e,t,n,void 0)}function Kn(e,t){e:for(;;){const n=e;if(null!=t){const r=Fe(t);if(r instanceof Pn){const o=r;Kn(n,Dn(o)),n(Rn(o),On(o)),e=n,t=Fn(o);continue e}n(Rn(r),On(r))}break}}function qn(e,t){Kn(e,t)}function Zn(e,t){if(null!=t){const n=Fe(t);if(n instanceof Pn){const t=n,r=Zn(e,Dn(t)),o=e(Rn(t),On(t)),i=Zn(e,Fn(t));return Nn(Rn(t),o,r,i,Ln(t))}return Mn(Rn(n),e(Rn(n),On(n)))}}function Jn(e,t){return Zn(e,t)}function Xn(e,t){if(i(t))return function(e,t){let n;for(let r=0;r<=t.length-1;r++){const o=Je(r,t);n=Un(e,o[0],o[1],n)}return n}(e,t);if(t instanceof et)return function(e,t){return mt(((t,n)=>Un(e,n[0],n[1],t)),void 0,t)}(e,t);{const n=c(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Un(r,s[0],s[1],o),n=i}}}(e,void 0,n)}finally{a(n)}}}class Qn extends me{constructor(e,t){super(),this.stack=e,this.started=t}}function er(e){e:for(;;){const t=e;if(dt(t))return lt();{const n=pt(t),r=ft(t);if(null!=r){const o=Fe(r);if(o instanceof Pn){const t=o;e=wt([Dn(t),Mn(Rn(t),On(t)),Fn(t)],n);continue e}return t}e=n;continue e}}}function tr(e){return new Qn(er(ct(e)),!1)}function nr(e){if(e.started){const t=e.stack;if(dt(t))return function(){throw new Error("enumeration already finished")}();if(null!=ft(t)){const e=Fe(ft(t));if(e instanceof Pn)throw new Error("Please report error: Map iterator, unexpected stack for current");return[Rn(e),On(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function rr(e){let t=tr(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>nr(t),"System.Collections.IEnumerator.get_Current":()=>nr(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(dt(t))return!1;if(null!=ft(t)){if(Fe(ft(t))instanceof Pn)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=er(pt(t)),!dt(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!dt(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=tr(e)},Dispose(){}}}class or{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){const t=(e,t)=>(e<<1)+t+631;let n=0;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=0|t(n,b(e[0])),n=0|t(n,b(e[1]))}}finally{a(r)}return 0|n}(this)}Equals(e){if(!(e instanceof or))return!1;{const t=e,n=c(this);try{const e=c(t);try{const t=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!_(r[0],o[0])||!_(r[1],o[1]))&&t()}return!0}return!1};return t()}finally{a(e)}}finally{a(n)}}}toString(){return"map ["+Ie("; ",nn((e=>function(e,...t){let n;return"object"==typeof e?(n=String(t[0]),t.shift()):n=e,n.replace(ye,((e,n,r,o,i,s)=>{if(n<0||n>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let a=t[n];if(ie(a))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":a=ae(a,i=null!=i?i:2);break;case"g":case"G":a=null!=i?le(a,i):le(a);break;case"e":case"E":a=null!=i?ue(a,i):ue(a);break;case"p":case"P":i=null!=i?i:2,a=ae(se(a,100),i)+" %";break;case"d":case"D":a=null!=i?Me(String(a),i,"0"):String(a);break;case"x":case"X":a=null!=i?Me(ce(a),i,"0"):ce(a),"X"===o&&(a=a.toUpperCase());break;default:if(s){let e="";a=s.replace(/([0#,]+)(\.[0#]+)?/,((t,n,r)=>{be(a,0)&&(a=se(a,-1),e="-"),r=null==r?"":r.substring(1),a=ae(a,Math.max(r.length,0));let[o,i]=a.split(".");i||(i=""),o=Me(o,n.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,t){return Ae(e,t,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),n.indexOf(",")>0){const e=o.length%3,t=Math.floor(o.length/3);let n=e>0?o.substr(0,e)+(t>0?",":""):"";for(let r=0;r<t;r++)n+=o.substr(e+3*r,3)+(r<t-1?",":"");o=n}return i.length>0?o+"."+i:o})),a=e+a}}else a=a instanceof Date?W(a,s||o):pe(a);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(a=Ae(String(a),Math.abs(r)," ",r<0)),a}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){return Array.from(this)}GetEnumerator(){return rr(this.tree)}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return rr(this.tree)}CompareTo(e){const t=this;if(e instanceof or)return 0|function(e,t,n){const r=Gt(t);try{const t=Gt(n);try{let n=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]();for(;0===n&&o&&i;)n=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),t["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===n&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==n?n:o?1:i?-1:0)}finally{a(t)}}finally{a(r)}}(((e,n)=>{const r=0|t.comparer.Compare(e[0],n[0]);return 0|(0!==r?r:k(e[1],n[1]))}),t,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return lr(this,e[0])&&_(sr(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){!function(e,t,n){let r=n;qn(((e,n)=>{Xe(t,r,[e,n]),r=r+1|0}),e)}(this.tree,e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|ar(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|ar(this)}get size(){return 0|ar(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return nn((e=>[e[0],e[1]]),this)}get(e){return sr(this,e)}has(e){return lr(this,e)}keys(){return nn((e=>e[0]),this)}set(e,t){throw new Error("Map cannot be mutated")}values(){return nn((e=>e[1]),this)}forEach(e,t){const n=this;tn((t=>{e(t[1],t[0],n)}),n)}}function ir(e,t){return new or(e,t)}function sr(e,t){return function(e,t,n){const r=zn(e,t,n);if(null==r)throw new Error;return Fe(r)}(e.comparer,t,e.tree)}function ar(e){return Hn(e.tree)}function lr(e,t){return function(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Fe(n),s=0|r.Compare(o,Rn(i));if(i instanceof Pn){const a=i;if(s<0){e=r,t=o,n=Dn(a);continue e}if(0===s)return!0;e=r,t=o,n=Fn(a);continue e}return 0===s}return!1}}(e.comparer,t,e.tree)}function ur(e,t,n){return function(e,t,n){return ir(e.comparer,Un(e.comparer,t,n,e.tree))}(n,e,t)}function cr(e,t){return function(e,t){return zn(e.comparer,t,e.tree)}(t,e)}function dr(e,t){return r=e,ir((n=t).comparer,Jn(r,n.tree));var n,r}function fr(e,t){return ir(t,Xn(t,e))}function pr(e){return function(e){return ir(e,void 0)}(e)}const hr=new Tn("",new _n(0,[]),lt(),!1,void 0,void 0,void 0,new Cn(0,[]));function mr(e,t){return"string"!=typeof(n=t)||0===n.length?new Array(0):Re(t,[e],void 0,0);var n}function $r(e){return new Tn(e,hr.method,hr.headers,hr.withCredentials,hr.overridenMimeType,hr.overridenResponseType,hr.timeout,hr.content)}function gr(e,t){return new Tn(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function wr(e,t){return new Tn(t.url,t.method,yt(t.headers,ct(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function vr(e){return t=t=>{const n=new XMLHttpRequest;n.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),n.onreadystatechange=()=>{let e,r,o,i,s,a,l;var u,c;4===n.readyState&&t[0]((r=n.responseType,e=""===r||"text"===r?n.responseText:"",o=0|n.status,i=n.responseType,a=n.responseType,s=""===a||"text"===a?new kn(0,[n.responseText]):new kn("arraybuffer"===a?2:"blob"===a?1:3,[n.response]),u=function(e,t,n){const r=[];for(let n=0;n<=t.length-1;n++){const o=e(Je(n,t));if(null!=o){const e=Fe(o);r.push(e)}}return _(n,null)?r:Ke((e=>e),r,n)}((e=>{const t=vt(mr(":",e));return dt(t)?void 0:[ft(t).toLocaleLowerCase(),Ie(":",pt(t)).trim()]}),mr("\r\n",n.getAllResponseHeaders())),l=ir(c={Compare:C},Xn(c,u)),new In(o,e,i,n.responseURL,l,s)))};const r=c(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(e.fields[0],e.fields[1])}}finally{a(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;n.overrideMimeType(e)}const i=e.overridenResponseType;if(null==i);else switch(i.tag){case 1:n.responseType="blob";break;case 2:n.responseType="arraybuffer";break;default:n.responseType="text"}const s=e.timeout;if(null==s);else{const e=0|s;n.timeout=0|e}const l=e.content;switch(l.tag){case 1:case 3:case 2:n.send(Be(l.fields[0]));break;default:n.send()}},hn((e=>t([e.onSuccess,e.onError,e.onCancel])));var t}function yr(e){return new br(1,[e])}new In(0,"","","",pr({Compare:C}),new kn(0,[""]));class br extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Ok","Error"]}}function xr(e,t){return 0===t.tag?(n=e(t.fields[0]),new br(0,[n])):yr(t.fields[0]);var n}class Sr extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class _r extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class Er{constructor(){this.cache=new Map([])}}function Cr(){return new Er}function Tr(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function kr(e,t){switch(e.tag){case 2:return function(e,t,n,r,o=0){if("string"==typeof e){const n=e;e=function(e,t=0){if(-284&t)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=1&t?"i":"",n+=2&t?"m":"",n+=16&t?"s":"",new RegExp(e,n)}(t,r??0),t=n,r=void 0}if("function"==typeof n)return r=null==r?-1:r,t.substring(0,o)+t.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const t=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)t.push(arguments[e]);t.index=arguments[s++],t.input=arguments[s++],i&&(t.groups=arguments[s]),e=n(t)}return e}));if(n=n.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=t.substring(o),a=fe(e,s),l=fe.length>r?(i=a[r-1],s.substring(0,i.index+i[0].length)):s;return t.substring(0,o)+l.replace(e,n)+t.substring(o+l.length)}return t.replace(e,n)}(Tr(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return Tr(t)}}Cr(),Cr();const Ir=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Ar=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Mr=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Rr(e,t){try{return t.contents=function(e){function t(e){return e.replace(Ar,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(Ir.test(n))return function(e,...t){if(0===t.length)return e.trim();const n="["+de(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}(n,"{","}","(",")");if(Ar.test(n))return t(n);if(Mr.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch{return!1}}var Or;function Pr(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function Nr(e,t,n,r,o){const i=function(e,t,n){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;n=n||function(e,t){if(t&Or.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,t);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(n);if(!i.test(o))return function(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}(r,n)}return null}(e,t,o);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[t,o]=Pr(!0,r);!n&&10!==i.radix&&e>=t&&e<=o&&(e=e<<32-r>>32-r);const[s,a]=Pr(n,r);if(e>=s&&e<=a)return e}}throw new Error(`The input string ${e} was not in a correct format.`)}function Dr(e,t,n,r,o){try{return o.contents=Nr(e,t,n,r),!0}catch{return!1}}function Fr(e,t){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(t);const n=new Date(e);return n.offset=null!=t?t:-6e4*(new Date).getTimezoneOffset(),n}function Lr(e,t){try{return t.contents=function(e){const[t,n]=K(e),r=null==n?-6e4*t.getTimezoneOffset():"Z"===n?0:6e4*n;return Fr(t.getTime(),r)}(e),!0}catch(e){return!1}}function Br(e){return e<0?Math.ceil(e):Math.floor(e)}function Hr(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return Number(BigInt(arguments[0])/10000n);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*t+6e4*n+1e3*r+o}function Vr(e,t){try{return t.contents=function(e){const t=e.search("\\."),n=e.search("\\:");if(-1===t&&-1===n){const t=parseInt(e,0);if(isNaN(t))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Hr(t,0,0,0,0)}if(n>0){const t=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=t&&null!=t[4]&&null!=t[5]){let n=0,r=0,o=0;const i=null!=t[1]&&"-"===t[1]?-1:1,s=+t[4],a=+t[5];if(null!=t[3]&&(n=+t[3]),null!=t[7]&&(o=+t[7]),null!=t[8])switch(t[8].length){case 1:r=100*+t[8];break;case 2:r=10*+t[8];break;case 3:r=+t[8];break;case 4:r=+t[8]/10;break;case 5:r=+t[8]/100;break;case 6:r=+t[8]/1e3;break;case 7:r=+t[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*Hr(n,s,a,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch{return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Or||(Or={}));class Gr{constructor(e,t,n,r){this.declaringType=e,this.tag=t,this.name=n,this.fields=r}}class Ur{constructor(e,t,n,r,o,i,s){this.fullname=e,this.generics=t,this.construct=n,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return oo(this)}GetHashCode(){return jr(this)}Equals(e){return Wr(this,e)}}function zr(e){return null!=e.generics?e.generics:[]}function jr(e){return y([w(e.fullname),...zr(e).map(jr)])}function Wr(e,t){return""===e.fullname?""===t.fullname&&x(mo(e),mo(t),(([e,t],[n,r])=>e===n&&Wr(t,r))):e.fullname===t.fullname&&x(zr(e),zr(t),Wr)}function Yr(e,t,n,r){return new Ur(e,t,n,void 0,r)}function Kr(...e){return new Ur("",void 0,void 0,void 0,(()=>e))}function qr(e,t,n,r){const o=new Ur(e,t,n,void 0,void 0,(()=>{const e=n.prototype.cases();return r().map(((t,n)=>new Gr(o,n,e[n],t)))}));return o}function Zr(e){return new Ur("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Jr(e){return new Ur("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Xr(e,t,n){return new Ur(e,[t],void 0,void 0,void 0,void 0,n)}const Qr=new Ur("System.Object"),eo=(new Ur("Microsoft.FSharp.Core.Unit"),new Ur("System.Char"),new Ur("System.String")),to=new Ur("System.Boolean"),no=(new Ur("System.SByte"),new Ur("System.Byte"),new Ur("System.Int16"),new Ur("System.UInt16"),new Ur("System.Int32"));function ro(e){if(Array.isArray(e))return e[0];if(e instanceof Ur){const t=so(e);if(null!=t)return ro(t)+"[]";{const t=e.fullname.lastIndexOf(".");return-1===t?e.fullname:e.fullname.substr(t+1)}}return e.name}function oo(e){const t=so(e);return null!=t?oo(t)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>oo(e))).join(",")+"]"}function io(e){return null!=so(e)}function so(e){return"[]"===e.fullname&&1===e.generics?.length?e.generics[0]:void 0}function ao(e){return null!=e.generics&&e.generics.length>0}function lo(e){return null!=e.enumCases&&e.enumCases.length>0}function uo(e){return null==e.generics?e:new Ur(e.fullname,e.generics.map((()=>Qr)))}function co(e){return e.generics?.[0]}function fo(e){if(lo(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function po(e,t){const n=parseInt(t,10);return function(e,t){if(null!=e.enumCases){if("string"==typeof t){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(n)?t:n)[1]}function ho(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function mo(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function $o(e){if(vo(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function go(e){return e instanceof Ur?null!=e.cases:e instanceof he}function wo(e){return e instanceof Ur?null!=e.fields:e instanceof me}function vo(e){return e.fullname.startsWith("System.Tuple")}function yo(e){return null==e.fields?[]:e.fields}new Ur("System.UInt32"),new Ur("System.Int64"),new Ur("System.UInt64"),new Ur("System.Int128"),new Ur("System.UInt128"),new Ur("System.IntPtr"),new Ur("System.UIntPtr"),new Ur("System.Half"),new Ur("System.Single"),new Ur("System.Double"),new Ur("System.Decimal"),new Ur("System.Numerics.BigInteger");class bo{constructor(e){this.k=e}}function xo(e){return new bo(e)}function So(e){return e.k}class _o extends bo{constructor(e,t,n,r){super(e),this.left=t,this.right=n,this.h=0|r}}function Eo(e,t,n,r){return new _o(e,t,n,r)}function Co(e){return e.left}function To(e){return e.right}function ko(e){return e.h}function Io(e,t){e:for(;;){const n=t;if(null!=e){const r=Fe(e);if(r instanceof _o){const o=r;e=Co(o),t=Io(To(o),n+1);continue e}return n+1|0}return 0|n}}function Ao(e){return Io(e,0)}function Mo(e,t,n){let r,o,i,s;if(null!=e){const t=Fe(e);i=t instanceof _o?(r=t,ko(r)):1}else i=0;if(null!=n){const e=Fe(n);s=e instanceof _o?(o=e,ko(o)):1}else s=0;const a=0|(i<s?s:i);return 0===a?xo(t):Eo(t,e,n,a+1)}function Ro(e,t,n){let r,o,i,s,a,l,u,c,d,f;if(null!=e){const t=Fe(e);d=t instanceof _o?(r=t,ko(r)):1}else d=0;if(null!=n){const e=Fe(n);f=e instanceof _o?(o=e,ko(o)):1}else f=0;if(f>d+2){const r=Fe(n);if(r instanceof _o){const n=r;if(i=Co(n),(null!=i?(s=Fe(i),s instanceof _o?(a=s,ko(a)):1):0)>d+1){const r=Fe(Co(n));if(r instanceof _o){const o=r;return Mo(Mo(e,t,Co(o)),So(o),Mo(To(o),So(n),To(n)))}throw new Error("internal error: Set.rebalance")}return Mo(Mo(e,t,Co(n)),So(n),To(n))}throw new Error("internal error: Set.rebalance")}if(d>f+2){const r=Fe(e);if(r instanceof _o){const e=r;if(l=To(e),(null!=l?(u=Fe(l),u instanceof _o?(c=u,ko(c)):1):0)>f+1){const r=Fe(To(e));if(r instanceof _o){const o=r;return Mo(Mo(Co(e),So(e),Co(o)),So(o),Mo(To(o),t,n))}throw new Error("internal error: Set.rebalance")}return Mo(Co(e),So(e),Mo(To(e),t,n))}throw new Error("internal error: Set.rebalance")}return Mo(e,t,n)}function Oo(e,t,n){if(null!=n){const r=Fe(n),o=0|e.Compare(t,So(r));if(r instanceof _o){const i=r;return o<0?Ro(Oo(e,t,Co(i)),So(i),To(i)):0===o?n:Ro(Co(i),So(i),Oo(e,t,To(i)))}{const o=0|e.Compare(t,So(r));return o<0?Eo(t,void 0,n,2):0===o?n:Eo(t,n,void 0,2)}}return xo(t)}function Po(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Fe(n),s=0|r.Compare(o,So(i));if(i instanceof _o){const a=i;if(s<0){e=r,t=o,n=Co(a);continue e}if(0===s)return!0;e=r,t=o,n=To(a);continue e}return 0===s}return!1}}function No(e,t){e:for(;;){const n=e;if(null!=t){const r=Fe(t);if(r instanceof _o){const o=r;No(n,Co(o)),n(So(o)),e=n,t=To(o);continue e}n(So(r))}break}}class Do extends me{constructor(e,t){super(),this.stack=e,this.started=t}}function Fo(e){e:for(;;){const t=e;if(dt(t))return lt();{const n=ft(t),r=pt(t);if(null!=n){const o=Fe(n);if(o instanceof _o){const t=o;e=wt([Co(t),xo(So(t)),To(t)],r);continue e}return t}e=r;continue e}}}function Lo(e){return new Do(Fo(ct(e)),!1)}function Bo(e){if(e.started){const t=e.stack;if(dt(t))return function(){throw new Error("Enumeration already started")}();if(null!=ft(t))return So(Fe(ft(t)));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Ho(e){let t=Lo(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Bo(t),"System.Collections.IEnumerator.get_Current":()=>Bo(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(dt(t))return!1;if(null!=ft(t)){if(Fe(ft(t))instanceof _o)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Fo(pt(t)),!dt(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!dt(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=Lo(e)},Dispose(){}}}function Vo(e,t,n){return null==t?null==n?0:-1:null==n?1:0|function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(dt(o))return dt(i)?0:-1;if(dt(i))return 1;if(null!=ft(i))if(null!=ft(o)){const s=Fe(ft(o)),a=Fe(ft(i));if(s instanceof _o){const l=s;if(null==Co(l)){if(!(a instanceof _o)){const s=0|r.Compare(So(l),So(a));if(0!==s)return 0|s;e=r,t=ut(To(l),pt(o)),n=ut(void 0,pt(i));continue e}{const s=a;if(null==Co(s)){const a=0|r.Compare(So(l),So(s));if(0!==a)return 0|a;e=r,t=ut(To(l),pt(o)),n=ut(To(s),pt(i));continue e}{let s,a,l,u,c;switch(dt(o)?dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2:null!=ft(o)?(s=0,a=pt(o),l=Fe(ft(o))):dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2,s){case 0:if(l instanceof _o){const o=l;e=r,t=wt([Co(o),Eo(So(o),void 0,To(o),0)],a),n=i;continue e}e=r,t=wt([void 0,xo(So(l))],a),n=i;continue e;case 1:if(c instanceof _o){const i=c;e=r,t=o,n=wt([Co(i),Eo(So(i),void 0,To(i),0)],u);continue e}e=r,t=o,n=wt([void 0,xo(So(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{let s,a,l,u,c;switch(dt(o)?dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2:null!=ft(o)?(s=0,a=pt(o),l=Fe(ft(o))):dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2,s){case 0:if(l instanceof _o){const o=l;e=r,t=wt([Co(o),Eo(So(o),void 0,To(o),0)],a),n=i;continue e}e=r,t=wt([void 0,xo(So(l))],a),n=i;continue e;case 1:if(c instanceof _o){const i=c;e=r,t=o,n=wt([Co(i),Eo(So(i),void 0,To(i),0)],u);continue e}e=r,t=o,n=wt([void 0,xo(So(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(a instanceof _o)){const l=0|r.Compare(So(s),So(a));if(0!==l)return 0|l;e=r,t=pt(o),n=pt(i);continue e}{const l=a;if(null==Co(l)){const a=0|r.Compare(So(s),So(l));if(0!==a)return 0|a;e=r,t=ut(void 0,pt(o)),n=ut(To(l),pt(i));continue e}{let s,a,l,u,c;switch(dt(o)?dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2:null!=ft(o)?(s=0,a=pt(o),l=Fe(ft(o))):dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2,s){case 0:if(l instanceof _o){const o=l;e=r,t=wt([Co(o),Eo(So(o),void 0,To(o),0)],a),n=i;continue e}e=r,t=wt([void 0,xo(So(l))],a),n=i;continue e;case 1:if(c instanceof _o){const i=c;e=r,t=o,n=wt([Co(i),Eo(So(i),void 0,To(i),0)],u);continue e}e=r,t=o,n=wt([void 0,xo(So(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{let s,a,l,u,c;switch(Fe(ft(i)),dt(o)?dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2:null!=ft(o)?(s=0,a=pt(o),l=Fe(ft(o))):dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2,s){case 0:if(l instanceof _o){const o=l;e=r,t=wt([Co(o),Eo(So(o),void 0,To(o),0)],a),n=i;continue e}e=r,t=wt([void 0,xo(So(l))],a),n=i;continue e;case 1:if(c instanceof _o){const i=c;e=r,t=o,n=wt([Co(i),Eo(So(i),void 0,To(i),0)],u);continue e}e=r,t=o,n=wt([void 0,xo(So(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==ft(o)){e=r,t=pt(o),n=pt(i);continue e}{let s,a,l,u,c;switch(Fe(ft(o)),dt(o)?dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2:null!=ft(o)?(s=0,a=pt(o),l=Fe(ft(o))):dt(i)?s=2:null!=ft(i)?(s=1,u=pt(i),c=Fe(ft(i))):s=2,s){case 0:if(l instanceof _o){const o=l;e=r,t=wt([Co(o),Eo(So(o),void 0,To(o),0)],a),n=i;continue e}e=r,t=wt([void 0,xo(So(l))],a),n=i;continue e;case 1:if(c instanceof _o){const i=c;e=r,t=o,n=wt([Co(i),Eo(So(i),void 0,To(i),0)],u);continue e}e=r,t=o,n=wt([void 0,xo(So(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,ct(t),ct(n))}function Go(e,t,n){let r=n;No((e=>{Xe(t,r,e),r=r+1|0}),e)}function Uo(e,t){if(i(t))return function(e,t){return qe(((t,n)=>Oo(e,n,t)),void 0,t)}(e,t);if(t instanceof et)return function(e,t){return mt(((t,n)=>Oo(e,n,t)),void 0,t)}(e,t);{const n=c(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,t=Oo(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=i}}(e,void 0,n)}finally{a(n)}}}class zo{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){let t=0;const n=c(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=(t<<1)+b(n["System.Collections.Generic.IEnumerator`1.get_Current"]())+631|0}finally{a(n)}return 0|Math.abs(t)}(this)}Equals(e){let t;return e instanceof zo&&(t=e,0===Vo(Wo(this),Yo(this),Yo(t)))}toString(){return"set ["+Ie("; ",nn((e=>pe(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){return Array.from(this)}CompareTo(e){return 0|Vo(Wo(this),Yo(this),Yo(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Po(Wo(this),e,Yo(this))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){Go(Yo(this),e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|qo(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|qo(this)}GetEnumerator(){return Ho(Yo(this))}[Symbol.iterator](){return d(c(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Ho(Yo(this))}get size(){return 0|qo(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return Zo(this,e)}keys(){return nn((e=>e),this)}values(){return nn((e=>e),this)}entries(){return nn((e=>[e,e]),this)}forEach(e,t){const n=this;tn((t=>{e(t,t,n)}),n)}}function jo(e,t){return new zo(e,t)}function Wo(e){return e.comparer}function Yo(e){return e.tree}function Ko(e){return jo(e,void 0)}function qo(e){return Ao(Yo(e))}function Zo(e,t){return Po(Wo(e),t,Yo(e))}function Jo(e,t){return Zo(t,e)}function Xo(e,t){return function(e,t){return jo(Wo(e),Oo(Wo(e),t,Yo(e)))}(t,e)}function Qo(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?"\n":" ")+JSON.stringify(t,null,4)}catch(t){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?"\n":" ")}}function ei(e,t){const n=2===t.tag?Qo(t.fields[0],t.fields[1],!0):1===t.tag?Qo(t.fields[0],t.fields[1],!1)+"\nReason: "+t.fields[2]:3===t.tag?Qo(t.fields[0],t.fields[1],!0):4===t.tag?Qo(t.fields[0],t.fields[1],!0)+"\nNode `"+t.fields[2]+"` is unkown.":5===t.tag?"Expecting "+t.fields[0]+".\n"+JSON.stringify(t.fields[1],null,4):7===t.tag?"The following errors were found:\n\n"+Ie("\n\n",t.fields[0]):6===t.tag?"The following `failure` occurred with the decoder: "+t.fields[0]:Qo(t.fields[0],t.fields[1],!1);return 7===t.tag?n:"Error at: `"+e+"`\n"+n}function ti(e,t,n){const r=t(e,n);if(1===r.tag){const e=r.fields[0];return new br(1,[ei(e[0],e[1])])}return new br(0,[r.fields[0]])}function ni(e,t){try{return ti("$",e,JSON.parse(t))}catch(e){if(e instanceof SyntaxError)return new br(1,["Given an invalid JSON: "+e.message]);throw e}}function ri(e,t){return"string"==typeof t?new br(0,[t]):new br(1,[[e,new Sr(0,["a string",t])]])}const oi=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new br(0,[(e+128&255)-128]):new br(1,[[n,new Sr(1,["a sbyte",e,"Value was either too large or too small for a sbyte"])]]):new br(1,[[n,new Sr(1,["a sbyte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Dr(r,511,!1,8,new $e((()=>t),(e=>{t=0|e}))),t],e[0]?new br(0,[e[1]]):new br(1,[[n,new Sr(0,["a sbyte",r])]])}return new br(1,[[n,new Sr(0,["a sbyte",r])]])},ii=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new br(0,[255&e]):new br(1,[[n,new Sr(1,["a byte",e,"Value was either too large or too small for a byte"])]]):new br(1,[[n,new Sr(1,["a byte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Dr(r,511,!0,8,new $e((()=>t),(e=>{t=e}))),t],e[0]?new br(0,[e[1]]):new br(1,[[n,new Sr(0,["a byte",r])]])}return new br(1,[[n,new Sr(0,["a byte",r])]])},si=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new br(0,[(e+32768&65535)-32768]):new br(1,[[n,new Sr(1,["an int16",e,"Value was either too large or too small for an int16"])]]):new br(1,[[n,new Sr(1,["an int16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Dr(r,511,!1,16,new $e((()=>t),(e=>{t=0|e}))),t],e[0]?new br(0,[e[1]]):new br(1,[[n,new Sr(0,["an int16",r])]])}return new br(1,[[n,new Sr(0,["an int16",r])]])},ai=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new br(0,[65535&e]):new br(1,[[n,new Sr(1,["an uint16",e,"Value was either too large or too small for an uint16"])]]):new br(1,[[n,new Sr(1,["an uint16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Dr(r,511,!0,16,new $e((()=>t),(e=>{t=e}))),t],e[0]?new br(0,[e[1]]):new br(1,[[n,new Sr(0,["an uint16",r])]])}return new br(1,[[n,new Sr(0,["an uint16",r])]])},li=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new br(0,[~~e]):new br(1,[[n,new Sr(1,["an int",e,"Value was either too large or too small for an int"])]]):new br(1,[[n,new Sr(1,["an int",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Dr(r,511,!1,32,new $e((()=>t),(e=>{t=0|e}))),t],e[0]?new br(0,[e[1]]):new br(1,[[n,new Sr(0,["an int",r])]])}return new br(1,[[n,new Sr(0,["an int",r])]])},ui=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new br(0,[e>>>0]):new br(1,[[n,new Sr(1,["an uint32",e,"Value was either too large or too small for an uint32"])]]):new br(1,[[n,new Sr(1,["an uint32",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Dr(r,511,!0,32,new $e((()=>t),(e=>{t=e}))),t],e[0]?new br(0,[e[1]]):new br(1,[[n,new Sr(0,["an uint32",r])]])}return new br(1,[[n,new Sr(0,["an uint32",r])]])};function ci(e,t,n,r){let o;const i=n+".["+$(e)+"]";if(Array.isArray(r)){const n=r;return e<n.length?t(i,Je(e,n)):new br(1,[[i,new Sr(5,["a longer array. Need index `"+$(e)+"` but there are only `"+(o=n.length,$(o)+"` entries"),r])]])}return new br(1,[[i,new Sr(0,["an array",r])]])}function di(e,t,n){if(Array.isArray(n)){let r=-1;return xr($t,qe(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+$(r)+"]",o);return 0===i.tag?new br(0,[ut(i.fields[0],n.fields[0])]):new br(1,[i.fields[0]])}return n}),new br(0,[lt()]),n))}return new br(1,[[t,new Sr(0,["a list",n])]])}function fi(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return qe(((n,o)=>{if(r=r+1|0,0===n.tag){const i=n.fields[0],s=e(t+".["+$(r)+"]",o);return 0===s.tag?(Xe(i,r,s.fields[0]),new br(0,[i])):new br(1,[s.fields[0]])}return n}),new br(0,[Ye(new Array(o.length),0,o.length,null)]),o)}return new br(1,[[t,new Sr(0,["an array",n])]])}function pi(e,t,n,r){const o=t(n,r);return 0===o.tag?e(o.fields[0],n,r):new br(1,[o.fields[0]])}function hi(e,t){let n;const r=e;return n=e=>t=>ci(0,r,e,t),e=>r=>pi(O((e=>{let n;const r=t;return n=e=>t=>ci(1,r,e,t),t=>r=>pi(((t,n,r)=>new br(0,[[e,t]])),M(n),t,r)})),M(n),e,r)}function mi(e){return fr(e,{Compare:k})}function $i(e,t,n,r){let o;const i=t.length+e|0;if(i!==r.length)return new br(1,[[n,new Sr(6,[(o=0|r.length,_e(xe("Expected array of length %i but got %i"))(i)(o))])]]);{let o=new br(0,[lt()]);for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],a=_e(xe("%s[%i]"))(n)(i),l=Je(i-e,t),u=Je(i,r);o=xr((e=>ut(e,s)),l(a)(u))}return xr($t,o)}}function gi(e,t,n,r,o,i){const s=function(e,t){return t.find((e=>ro(e)===r))}(0,ho(n));if(null!=s){const n=s,r=Ke((n=>vi(e,t,!1,n[1])),yo(n));return xr((e=>function(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return null==r?{}:e.declaringType.cases&&1==e.declaringType.cases().length?new r(...t):new r(e.tag,t)}(n,ht(e))),0===r.length&&i.length<=1?new br(0,[lt()]):$i(1,r,o,i))}return new br(1,[[o,new Sr(6,["Cannot find case "+r+" in "+oo(n)])]])}function wi(e,t,n,r){let o;const i=new $e(null);let s;const a=oo(r);let l;if(s=""===a?e:ur(a,i,e),wo(r)){const e=Ke((e=>[kr(t,ro(e)),vi(s,t,!1,e[1])]),mo(r));l=t=>n=>xr((e=>function(e,t){const n=mo(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return null!=e.construct?new e.construct(...t):n.reduce(((e,[n,r],o)=>(e[n]=t[o],e)),{})}(r,ht(e))),function(e,t,n){return null===n||Object.getPrototypeOf(n||!1)!==Object.prototype?new br(1,[[t,new Sr(0,["an object",n])]]):Qe(((e,r)=>{const o=e[0];return 0===r.tag?xr((e=>ut(e,r.fields[0])),e[1](t+"."+o)(n[o])):r}),e,new br(0,[lt()]))}(e,t,n))}else if(go(r))l=e=>n=>{if("string"==typeof n)return gi(s,t,r,n,e,[]);if(Array.isArray(n)){const a=n;return o=n=>gi(s,t,r,n,e,a),0===(i=ri(e+"[0]",Je(0,a))).tag?o(i.fields[0]):yr(i.fields[0])}return new br(1,[[e,new Sr(0,["a string or array",n])]]);var o,i};else{if(!n)throw new Error((o=oo(r),_e(xe("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>t=>new br(1,[[e,new Sr(2,["an extra coder for "+oo(r),t])]])}return i.contents=l,l}function vi(e,t,n,r){let o,i,s,a;const l=oo(r),u=cr(l,e);if(null!=u){const e=u;return t=>n=>e.contents(t)(n)}if(io(r)){const n=vi(e,t,!1,so(r));return e=>t=>fi(M(n),e,t)}if(lo(r))switch(oo(co(r))){case"System.SByte":return e=>t=>{const n=r,o=e,i=t,s=oi(o)(i);if(1===s.tag)return new br(1,[s.fields[0]]);{const e=0|s.fields[0];return Xt(e,fo(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new br(0,[po(n,e.toString())]):new br(1,[[o,new Sr(1,[oo(n),i,"Unkown value provided for the enum"])]])}};case"System.Byte":return e=>t=>{const n=r,o=e,i=t,s=ii(o)(i);if(1===s.tag)return new br(1,[s.fields[0]]);{const e=s.fields[0];return Xt(e,fo(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new br(0,[po(n,e.toString())]):new br(1,[[o,new Sr(1,[oo(n),i,"Unkown value provided for the enum"])]])}};case"System.Int16":return e=>t=>{const n=r,o=e,i=t,s=si(o)(i);if(1===s.tag)return new br(1,[s.fields[0]]);{const e=0|s.fields[0];return Xt(e,fo(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new br(0,[po(n,m(e))]):new br(1,[[o,new Sr(1,[oo(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt16":return e=>t=>{const n=r,o=e,i=t,s=ai(o)(i);if(1===s.tag)return new br(1,[s.fields[0]]);{const e=s.fields[0];return Xt(e,fo(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new br(0,[po(n,e.toString())]):new br(1,[[o,new Sr(1,[oo(n),i,"Unkown value provided for the enum"])]])}};case"System.Int32":return e=>t=>{const n=r,o=e,i=t,s=li(o)(i);if(1===s.tag)return new br(1,[s.fields[0]]);{const e=0|s.fields[0];return Xt(e,fo(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new br(0,[po(n,$(e))]):new br(1,[[o,new Sr(1,[oo(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt32":return e=>t=>{const n=r,o=e,i=t,s=ui(o)(i);if(1===s.tag)return new br(1,[s.fields[0]]);{const e=s.fields[0];return Xt(e,fo(n),{Equals:(e,t)=>e===t,GetHashCode:v})?new br(0,[po(n,e.toString())]):new br(1,[[o,new Sr(1,[oo(n),i,"Unkown value provided for the enum"])]])}};default:{const e=oo(r),t=Ee(xe("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>t(e)}}else if(ao(r)){if(vo(r)){const n=Ke((n=>vi(e,t,!1,n)),$o(r));return e=>t=>Array.isArray(t)?xr((e=>ht(e)),$i(0,n,e,t)):new br(1,[[e,new Sr(0,["an array",t])]])}switch(oo(uo(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=vi(e,t,!0,Je(0,zr(r))),e=>t=>{return n=M(o),r=e,null==(i=t)?new br(0,[void 0]):xr(Be,n(r,i));var n,r,i};case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=vi(e,t,!1,Je(0,zr(r))),e=>t=>di(M(i),e,t);case"System.Collections.Generic.IEnumerable`1[System.Object]":return s=vi(e,t,!1,Je(0,zr(r))),e=>t=>function(e,t,n){if(Array.isArray(n)){let r=-1;return xr(rn,qe(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+$(r)+"]",o);return 0===i.tag?new br(0,[Jt([i.fields[0]],n.fields[0])]):new br(1,[i.fields[0]])}return n}),new br(0,[[]]),n))}return new br(1,[[t,new Sr(0,["a seq",n])]])}(M(s),e,t);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const n=vi(e,t,!1,Je(0,zr(r))),o=vi(e,t,!1,Je(1,zr(r)));let i;const s=vt([e=>t=>function(e,t,n,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new br(1,[[n,new Sr(0,["an object",r])]]):en(((o,i)=>{if(0===o.tag){const s=e(n,i);if(0===s.tag){const e=t(n+"."+i,r[i]);return 0===e.tag?new br(0,[ut([s.fields[0],e.fields[0]],o.fields[0])]):new br(1,[e.fields[0]])}return new br(1,[s.fields[0]])}return o}),new br(0,[lt()]),Object.keys(r))}(M(n),M(o),e,t),(a=hi(M(n),M(o)),e=>t=>di(M(a),e,t))]);return i=e=>t=>{return n=e,r=t,((e,t)=>{e:for(;;){const o=e,i=t;if(dt(o))return new br(1,[[n,new Sr(7,[i])]]);{const s=ti(n,M(ft(o)),r);if(1===s.tag){e=pt(o),t=yt(i,ct(s.fields[0]));continue e}return new br(0,[s.fields[0]])}}})(s,lt());var n,r},e=>t=>function(e,t,n,r){const o=t(n,r);return 1===o.tag?new br(1,[o.fields[0]]):new br(0,[e(o.fields[0])])}(mi,M(i),e,t)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const n=vi(e,t,!1,Je(0,zr(r)));return e=>t=>{const r=fi(M(n),e,t);return 0===r.tag?new br(0,[(o=r.fields[0],jo(i={Compare:k},Uo(i,o)))]):new br(1,[r.fields[0]]);var o,i}}default:return wi(e,t,n,r)}}else switch(l){case"System.Boolean":return e=>t=>{return n=e,"boolean"==typeof(r=t)?new br(0,[r]):new br(1,[[n,new Sr(0,["a boolean",r])]]);var n,r};case"Microsoft.FSharp.Core.Unit":return e=>t=>{return n=e,null==(r=t)?new br(0,[void 0]):new br(1,[[n,new Sr(0,["null",r])]]);var n,r};case"System.String":return e=>t=>ri(e,t);case"System.Char":return e=>t=>function(e,t){if("string"==typeof t){const n=t;return 1===n.length?new br(0,[n[0]]):new br(1,[[e,new Sr(0,["a single character string",t])]])}return new br(1,[[e,new Sr(0,["a char",t])]])}(e,t);case"System.SByte":return oi;case"System.Byte":return ii;case"System.Int16":return si;case"System.UInt16":return ai;case"System.Int32":return li;case"System.UInt32":return ui;case"System.Double":return e=>t=>{return n=e,"number"==typeof(r=t)?new br(0,[r]):new br(1,[[n,new Sr(0,["a float",r])]]);var n,r};case"System.Single":return e=>t=>{return n=e,"number"==typeof(r=t)?new br(0,[r]):new br(1,[[n,new Sr(0,["a float32",r])]]);var n,r};case"System.DateTime":return e=>t=>function(e,t){if("string"==typeof t){let r,o=Y(-621355968e5,1);return r=[q(t,new $e((()=>o),(e=>{o=e}))),o],r[0]?new br(0,[(n=r[1],1===n.kind?n:Y(n.getTime(),1))]):new br(1,[[e,new Sr(0,["a datetime",t])]])}var n;return new br(1,[[e,new Sr(0,["a datetime",t])]])}(e,t);case"System.DateTimeOffset":return e=>t=>function(e,t){if("string"==typeof t){let n,r=Fr(-621355968e5,0);return n=[Lr(t,new $e((()=>r),(e=>{r=e}))),r],n[0]?new br(0,[n[1]]):new br(1,[[e,new Sr(0,["a datetimeoffset",t])]])}return new br(1,[[e,new Sr(0,["a datetime",t])]])}(e,t);case"System.TimeSpan":return e=>t=>function(e,t){if("string"==typeof t){let n,r=0;return n=[Vr(t,new $e((()=>r),(e=>{r=e}))),r],n[0]?new br(0,[n[1]]):new br(1,[[e,new Sr(0,["a timespan",t])]])}return new br(1,[[e,new Sr(0,["a timespan",t])]])}(e,t);case"System.Guid":return e=>t=>function(e,t){if("string"==typeof t){let n,r="00000000-0000-0000-0000-000000000000";return n=[Rr(t,new $e((()=>r),(e=>{r=e}))),r],n[0]?new br(0,[n[1]]):new br(1,[[e,new Sr(0,["a guid",t])]])}return new br(1,[[e,new Sr(0,["a guid",t])]])}(e,t);case"System.Object":return e=>e=>new br(0,[e]);default:return wi(e,t,n,r)}}function yi(e,t,n){const r=Ue(t,new _r(0,[]));return vi(function(e){return null!=e?dr(((e,t)=>new $e(t[1])),e.Coders):pr({Compare:C})}(n),r,!1,e)}const bi=function(){const e=[..."#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$R$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1E(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν$(.çђ$,ɪ⇜ɜ*B$-'%A%($-S*(''$$--$*$8(6˓CC:'n'$$Z*'0c%$$$.%1+ӹM,⌚łT&4'+Ưध(0&,*-%$%$'ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&/|*/7/'[+-)K+A%%q$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ፮$A£ē︳𐀡%𐀡"].map((e=>(e.codePointAt(0)??0)-35)),t=[..."1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@"].map((e=>(e.codePointAt(0)??0)-35)),n=new Uint32Array(e),r=new Uint8Array(t);for(let e=1;e<n.length;++e)n[e]+=n[e-1];return e=>{let t=n.length,o=0;for(;t-o>1;){const r=Math.floor((t+o)/2),i=n[r];if(e<i)t=r;else{if(e===i){t=o=r;break}i<e&&(o=r)}}return r[o]}}();const xi=e=>function(e){const t=1<<function(e,t){const n=function(e,t){if(t>=0&&t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}(e,t);return bi(n)}(e,0);return!!(256&t)}(e);function Si(e,t){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+t+e.charAt(1).toLowerCase()))}function _i(e,t=0){const n={},r=t;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,t,r){e=function(e,t){switch(t){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return Si(e,"_");case 3:return Si(e,"_").toUpperCase();case 4:return Si(e,"-");default:return e}}(e,t),n[e]=r}for(let t of e){let e=0;if(null==t&&o(t),t instanceof he){const n=t.cases()[t.tag];t=0===t.fields.length?n:[n].concat(t.fields),e=r}if(Array.isArray(t))switch(t.length){case 0:o(t);break;case 1:i(t[0],e,!0);break;case 2:const n=t[1];i(t[0],e,n);break;default:i(t[0],e,t.slice(1))}else"string"==typeof t?i(t,e,!0):o(t)}return n}function Ei(e,t){return!t.has(e)&&(t.add(e),!0)}function Ci(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class Ti{constructor(e,t){const n=new $e(null);this.comparer=t,n.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const r=c(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();Mi(n.contents,e)}}finally{a(r)}}get[Symbol.toStringTag](){return"HashSet"}toJSON(){return Array.from(this)}"System.Collections.IEnumerable.GetEnumerator"(){return c(this)}GetEnumerator(){return c(zt(this.hashMap.values()))}[Symbol.iterator](){return d(c(this))}"System.Collections.Generic.ICollection`1.Add2B595"(e){Mi(this,e)}"System.Collections.Generic.ICollection`1.Clear"(){Ii(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Ri(this,e)}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){var n;n=(n,r)=>{Xe(e,t+n,r)},en(((e,t)=>(n(e,t),e+1|0)),0,this)}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Ai(this)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(e){return Oi(this,e)}get size(){return 0|Ai(this)}add(e){return Mi(this,e),this}clear(){Ii(this)}delete(e){return Oi(this,e)}has(e){return Ri(this,e)}keys(){return nn((e=>e),this)}values(){return nn((e=>e),this)}entries(){return nn((e=>[e,e]),this)}forEach(e,t){const n=this;tn((t=>{e(t,t,n)}),n)}}function ki(e,t){const n=0|e.comparer.GetHashCode(t);let r,o=null;return r=[(i=e.hashMap,s=n,a=new $e((()=>o),(e=>{o=e})),!!i.has(s)&&(a.contents=i.get(s),!0)),o],r[0]?[!0,n,r[1].findIndex((n=>e.comparer.Equals(t,n)))]:[!1,n,-1];var i,s,a}function Ii(e){e.hashMap.clear()}function Ai(e){let t=0,n=c(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=t+n["System.Collections.Generic.IEnumerator`1.get_Current"]().length|0}finally{a(n)}return 0|t}function Mi(e,t){const n=ki(e,t);return n[0]?!(n[2]>-1)&&(Ci(e.hashMap,n[1]).push(t),!0):(e.hashMap.set(n[1],[t]),!0)}function Ri(e,t){const n=ki(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r}function Oi(e,t){const n=ki(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r&&(Ci(e.hashMap,n[1]).splice(n[2],1),!0)}class Pi extends me{constructor(e,t){super(),this.Code=e,this.Name=t}}const Ni=fr([["AFG","Afghanistan"],["ALA","Aland Islands"],["ALB","Albania"],["DZA","Algeria"],["ASM","American Samoa"],["AND","Andorra"],["AGO","Angola"],["AIA","Anguilla"],["ATA","Antarctica"],["ATG","Antigua and Barbuda"],["ARG","Argentina"],["ARM","Armenia"],["ABW","Aruba"],["AUT","Austria"],["AZE","Azerbaijan"],["BHS","Bahamas"],["BHR","Bahrain"],["BGD","Bangladesh"],["BRB","Barbados"],["BLR","Belarus"],["BEL","Belgium"],["BLZ","Belize"],["BEN","Benin"],["BMU","Bermuda"],["BTN","Bhutan"],["BOL","Bolivia"],["BES","Bonaire Saint Eustatius, and Saba Islands"],["BIH","Bosnia and Herzegovina"],["BWA","Botswana"],["BVT","Bouvet Island"],["BRA","Brazil"],["IOT","British Indian Ocean Territory"],["VGB","British Virgin Islands"],["BRN","Brunei Darussalam"],["BGR","Bulgaria"],["BFA","Burkina Faso"],["BDI","Burundi"],["KHM","Cambodia"],["CMR","Cameroon"],["CAN","Canada"],["CPV","Cabo Verde"],["CYM","Cayman Islands"],["CAF","Central African Republic"],["TCD","Chad"],["CHL","Chile"],["CHN","China"],["CXR","Christmas Island"],["CCK","Cocos (Keeling) Islands"],["COL","Colombia"],["COM","Comoros"],["COD","Congo, Democratic Republic of (was Zaire)"],["COG","Congo, Republic of"],["COK","Cook Islands"],["CRI","Costa Rica"],["CIV","Cote D'Ivoire (Ivory Coast)"],["HRV","Croatia (Hrvatska)"],["CUB","Cuba"],["CUW","Curacao"],["CYP","Cyprus"],["CZE","Czech Republic"],["DNK","Denmark"],["DJI","Djibouti"],["DMA","Dominica"],["DOM","Dominican Republic"],["ECU","Ecuador"],["EGY","Egypt"],["SLV","El Salvador"],["GNQ","Equatorial Guinea"],["ERI","Eritrea"],["EST","Estonia"],["SWZ","eSwatini"],["ETH","Ethiopia"],["FLK","Falkland Islands (Malvinas)"],["FRO","Faroe Islands"],["FJI","Fiji"],["FIN","Finland"],["FRA","France"],["GUF","French Guiana"],["PYF","French Polynesia"],["ATF","French Southern Territories"],["GAB","Gabon"],["GMB","Gambia"],["GEO","Georgia"],["DEU","Germany"],["GHA","Ghana"],["GIB","Gibraltar"],["GRC","Greece"],["GRL","Greenland"],["GRD","Grenada"],["GLP","Guadeloupe"],["GUM","Guam"],["GTM","Guatemala"],["GGY","Guernsey"],["GIN","Guinea"],["GNB","Guinea-Bissau"],["GUY","Guyana"],["HTI","Haiti"],["HMD","Heard and McDonald Islands"],["VAT","Holy See (Vatican City State)"],["HND","Honduras"],["HKG","Hong Kong"],["HRV","Hrvatska (Croatia)"],["HUN","Hungary"],["ISL","Iceland"],["IND","India"],["IDN","Indonesia"],["IRN","Iran"],["IRQ","Iraq"],["IRL","Ireland"],["IMN","Isle of Man, The"],["ISR","Israel"],["ITA","Italy"],["CIV","Ivory Coast (Cote D'Ivoire)"],["JAM","Jamaica"],["JPN","Japan"],["JEY","Jersey"],["JOR","Jordan"],["KAZ","Kazakhstan"],["KEN","Kenya"],["KIR","Kiribati"],["PRK","Korea, Democratic People's Republic of (North Korea)"],["KOR","Korea, Republic of (South Korea)"],["KWT","Kuwait"],["KGZ","Kyrgyzstan"],["LAO","Laos"],["LVA","Latvia"],["LBN","Lebanon"],["LSO","Lesotho"],["LBR","Liberia"],["LBY","Libya"],["LIE","Liechtenstein"],["LTU","Lithuania"],["LUX","Luxembourg"],["MAC","Macau"],["MKD","North Macedonia, Republic of"],["MDG","Madagascar"],["MWI","Malawi"],["MYS","Malaysia"],["MDV","Maldives"],["MLI","Mali"],["MLT","Malta"],["MHL","Marshall Islands"],["MTQ","Martinique"],["MRT","Mauritania"],["MUS","Mauritius"],["MYT","Mayotte"],["MEX","Mexico"],["FSM","Micronesia, Federated States of"],["MDA","Moldova"],["MCO","Monaco"],["MNG","Mongolia"],["MNE","Montenegro"],["MSR","Montserrat"],["MAR","Morocco"],["MOZ","Mozambique"],["MMR","Myanmar (was Burma)"],["NAM","Namibia"],["NRU","Nauru"],["NPL","Nepal"],["NLD","Netherlands"],["NCL","New Caledonia"],["NZL","New Zealand"],["NIC","Nicaragua"],["NER","Niger"],["NGA","Nigeria"],["NIU","Niue"],["NFK","Norfolk Island"],["MNP","Northern Mariana Islands"],["PRK","North Korea (Korea, Democratic People's Republic of)"],["NOR","Norway"],["OMN","Oman"],["PAK","Pakistan"],["PLW","Palau"],["PSE","Palestinian Territories"],["PAN","Panama"],["PNG","Papua New Guinea"],["PRY","Paraguay"],["PER","Peru"],["PHL","Philippines"],["PCN","Pitcairn Island"],["POL","Poland"],["PRT","Portugal"],["PRI","Puerto Rico"],["QAT","Qatar"],["REU","Reunion"],["ROU","Romania"],["RUS","Russian Federation"],["RWA","Rwanda"],["BLM","Saint Barthelemy"],["SHN","Saint Helena"],["KNA","Saint Kitts and Nevis"],["LCA","Saint Lucia"],["SXM","Saint Maarten (Dutch part)"],["MAF","Saint Martin (French part)"],["SPM","Saint Pierre and Miquelon"],["VCT","Saint Vincent and the Grenadines"],["WSM","Samoa"],["SMR","San Marino"],["STP","Sao Tome and Principe"],["SAU","Saudi Arabia"],["SEN","Senegal"],["SRB","Serbia"],["SYC","Seychelles"],["SLE","Sierra Leone"],["SGP","Singapore"],["SVK","Slovakia (Slovak Republic)"],["SVN","Slovenia"],["SLB","Solomon Islands"],["SOM","Somalia"],["ZAF","South Africa"],["SGS","South Georgia and the South Sandwich Islands"],["KOR","South Korea (Korea, Republic of)"],["SSD","South Sudan"],["ESP","Spain"],["LKA","Sri Lanka"],["SDN","Sudan"],["SUR","Suriname"],["SJM","Svalbard and Jan Mayen Islands"],["SWE","Sweden"],["CHE","Switzerland"],["SYR","Syria"],["TWN","Taiwan"],["TJK","Tajikistan"],["TZA","Tanzania"],["THA","Thailand"],["TLS","Timor-Leste"],["TGO","Togo"],["TKL","Tokelau"],["TON","Tonga"],["TTO","Trinidad and Tobago"],["TUN","Tunisia"],["TUR","Turkey"],["TKM","Turkmenistan"],["TCA","Turks and Caicos Islands"],["TUV","Tuvalu"],["UGA","Uganda"],["UKR","Ukraine"],["ARE","United Arab Emirates"],["GBR","United Kingdom"],["USA","United States"],["UMI","United States Minor Outlying Islands"],["VIR","United States Virgin Islands"],["URY","Uruguay"],["UZB","Uzbekistan"],["VUT","Vanuatu"],["VAT","Vatican City State (Holy See)"],["VEN","Venezuela"],["VNM","Vietnam"],["WLF","Wallis and Futuna"],["ESH","Western Sahara"],["YEM","Yemen"],["ZMB","Zambia"],["ZWE","Zimbabwe"]],{Compare:C});class Di extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HELP","VETStudentLoan","FinancialSupplement","StudentStartUpLoan","TradeSupportLoan"]}}class Fi extends me{constructor(e,t){super(),this.Code=e,this.Name=t}}function Li(e){let t;const n=function(e){const t=function(e){const t=cr(e,Ni);return null==t?void 0:new Pi(e,t)}(e),n=_e(xe("Country code:%A is not accepted"))(e),r=t;return null==r?new br(1,[n]):new br(0,[r])}(e);return 1===n.tag?new br(1,[n.fields[0]]):new br(0,[(t=n.fields[0],new Fi(t.Code,t.Name))])}class Bi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}const Hi=new Bi(2,[{}]);function Vi(e){return new Bi(2,[{HomeCountry:e}])}class Gi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["FullTime","PartTime","LabourHire","SuperIncomeStream","Casual"]}}class Ui extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Tfn"]}}class zi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Under18AndBelowTaxThreshold","Pending","Pensioner"]}}class ji extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["PreviousSurname"]}}function Wi(e){return e.fields[0]}function Yi(e){const t=function(e){const t=Oe(xi,e),n=t===e?new br(0,[void 0]):new br(1,["TFN must contain digits only"]);if(1===n.tag)return new br(1,[n.fields[0]]);{const e=9===t.length?new br(0,[void 0]):new br(1,["TFN must be 9 digits"]);if(1===e.tag)return new br(1,[e.fields[0]]);{const e=function(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,Je(r,e));return n}(function(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=We(r,t.length);for(let r=0;r<=t.length-1;r++)Xe(o,r,e(Je(r,t),Je(r,n)));return o}(((e,t)=>e*t),Ke((e=>Nr(e,511,!1,32)),t.split(""),Int32Array),new Int32Array([1,4,3,7,5,8,6,9,10]),Int32Array),{GetZero:()=>0,Add:(e,t)=>e+t})%11==0?new br(0,[void 0]):new br(1,["TFN is not valid"]);return 1===e.tag?new br(1,[e.fields[0]]):new br(0,[t])}}}(e);if(1===t.tag)return new br(1,[t.fields[0]]);{const e=t.fields[0],r=function(e){if(i(e))return 0===e.length;if(e instanceof et)return dt(e);{const t=Gt(e);try{return!t["System.Collections.IEnumerator.MoveNext"]()}finally{a(t)}}}((n={Equals:(e,t)=>e===t,GetHashCode:w},Yt(function(e,t,n){return Ut((()=>{const r=new Ti(e,n);return Qt((e=>Ei(e,r)),t)}))}(["0"],e.split(""),n))))?new br(1,["TFN must not contain all zeros"]):new br(0,[void 0]);return 1===r.tag?new br(1,[r.fields[0]]):new br(0,[e])}var n}class Ki extends me{constructor(e,t){super(),this.Code=e,this.Name=t}}new class extends me{constructor(e){super(),this.Unused=e}}(void 0);class qi extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function Zi(){return qr("Dto.Dto.ResidencyStatusV2Dto",[],qi,(()=>[[],[],[["Item",Kr(["HomeCountry",Zr(Yr("Dto.Dto.CountryDto",[],Ki,(()=>[["Code",eo],["Name",eo]])))])]]]))}function Ji(e){let t,n;switch(e.tag){case 1:return new br(0,[new Bi(1,[])]);case 2:return Ue((t=e.fields[0].HomeCountry,null==t?void 0:(n=Li(t.Code),1===n.tag?new br(1,[n.fields[0]]):new br(0,[Vi(n.fields[0])]))),new br(0,[Hi]));default:return new br(0,[new Bi(0,[])])}}function Xi(e){switch(e){case 0:return new br(0,[new Gi(0,[])]);case 1:return new br(0,[new Gi(1,[])]);case 2:return new br(0,[new Gi(2,[])]);case 3:return new br(0,[new Gi(3,[])]);case 4:return new br(0,[new Gi(4,[])]);default:return new br(1,["Invalid EmploymentBasis"])}}function Qi(e){switch(e){case 0:return new br(0,[new Di(0,[])]);case 1:return new br(0,[new Di(1,[])]);case 2:return new br(0,[new Di(2,[])]);case 3:return new br(0,[new Di(3,[])]);case 4:return new br(0,[new Di(4,[])]);default:return new br(1,["Invalid DebtSupport"])}}function es(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}const ts=e=>{return t=Qi,r={Equals:(e,t)=>e===t,GetHashCode:v},n=Kt(function(e,t){return Ut((()=>{const n=new Ti([],t);return Qt((e=>Ei(e,n)),e)}))}(e,r)),function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(dt(i)){const e=r;return 1===e.tag?new br(1,[e.fields[0]]):new br(0,[$t(e.fields[0])])}{let s;const a=o(ft(i));if(1===a.tag)s=new br(1,[a.fields[0]]);else{const e=r;s=1===e.tag?new br(1,[e.fields[0]]):new br(0,[ut(a.fields[0],e.fields[0])])}if(1===s.tag)return s;e=s,t=o,n=pt(i);continue e}}}(new br(0,[lt()]),t,n);var t,n,r};function ns(e){switch(e.tag){case 1:return 1;case 2:return 2;default:return 0}}class rs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}function os(){return qr("Dto.Dto.ProvidedTfnInformationDto",[],rs,(()=>[[["Item",eo]],[["Item",Xr("Dto.Dto.ExemptionReasonDto",no,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))}class is extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","Exempted"]}}class ss extends me{constructor(e,t,n,r,o,i,s){super(),this.TfnInformation=e,this.PreviousSurname=t,this.ResidencyStatus=0|n,this.ResidencyStatusV2=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class as extends me{constructor(e,t){super(),this.ResidencyStatusV2=e,this.EmploymentBasis=0|t}}class ls extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnInfo","EmploymentInfo"]}}class us extends me{constructor(e,t){super(),this.Meta=e,this.Info=t}}class cs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function ds(){return qr("Dto.Commands.ResidencyStatusV2Dto",[],cs,(()=>[[],[],[["Item",Yr("Dto.Commands.WorkingHolidayPayload",[],fs,(()=>[["HomeCountry",Yr("Dto.Commands.CountryCode",[],ps,(()=>[["Code",eo]]))]]))]]]))}class fs extends me{constructor(e){super(),this.HomeCountry=e}}class ps extends me{constructor(e){super(),this.Code=e}}class hs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["CreateOrUpdate","Update","ProvideFullTfnDeclaration"]}}class ms extends me{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class $s extends me{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class gs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted","Truncated"]}}function ws(e){return e}function vs(e){return Array.from(e)}function ys(e){return W(e,"O")}function bs(e){return function(e,t="c"){if(-1===["c","g","G"].indexOf(t))throw new Error("Custom formats are not supported");const n=Math.abs(function(e){return Br(e/864e5)}(e)),r=Math.abs(function(e){return Br(e%864e5/36e5)}(e)),o=Math.abs(function(e){return Br(e%36e5/6e4)}(e)),i=Math.abs(function(e){return Br(e%6e4/1e3)}(e)),s=Math.abs(function(e){return Br(e%1e3)}(e));return`${e<0?"-":""}${0!==n||"c"!==t&&"g"!==t?"c"===t?n+".":n+":":""}${"g"===t?r:p(r,2)}:${p(o,2)}:${p(i,2)}${0!==s||"c"!==t&&"g"!==t?"g"===t?"."+p(s,3):"."+function(e){return e.toString(10).padStart(3,"0").padEnd(7,"0")}(s):""}`}(e)}function xs(){return null}function Ss(e){return W(e,"O")}function _s(e,t){return JSON.stringify(t,void 0,Be(e))}function Es(e,t,n,r){let o;const i=new $e(null);let s;const a=oo(r);let l;if(s=""===a?e:ur(a,i,e),wo(r)){const e=Ke((e=>{const r=kr(t,ro(e)),o=Cs(s,t,n,e[1]);return t=>i=>{const s=function(e,t){return e[t[0]]}(t,e);return(!n||n&&null!=s)&&(i[r]=o(s)),i}}),mo(r));l=t=>en(((e,n)=>n(t)(e)),{},e)}else{if(!go(r))throw new Error((o=oo(r),_e(xe("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>{const o=function(e,t){const n=ho(t)[e.tag];if(null==n)throw new Error(`Cannot find case ${e.name} in union type`);return[n,e.fields]}(e,r),i=o[0],a=o[1],l=0|a.length;if(0===l)return ro(i);{const e=0|l,r=yo(i),o=Ye(new Array(e+1),0,e+1,null);Xe(o,0,ro(i));for(let i=1;i<=e;i++)Xe(o,i,Cs(s,t,n,Je(i-1,r)[1])(Je(i-1,a)));return o}}}return i.contents=l,l}function Cs(e,t,n,r){const o=oo(r),i=cr(o,e);if(null!=i){const e=i;return t=>e.contents(t)}if(io(r)){const o=Cs(e,t,n,so(r));return e=>vs(nn(o,e))}if(lo(r))switch(oo(co(r))){case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;default:{const e=oo(r);return Ee(xe("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}else{if(ao(r)){if(vo(r)){const o=Ke((r=>Cs(e,t,n,r)),$o(r));return e=>{return vs((t=(e,t)=>Je(e,o)(t),n=e,Zt((()=>Gt(n)),((e,n)=>n["System.Collections.IEnumerator.MoveNext"]()?Be(t(e,n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{a(e)}))));var t,n}}{const o=oo(uo(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new f((()=>{return o=Cs(e,t,n,Je(0,zr(r))),e=>{return null!=(t=ze(o,e))?Fe(t):null;var t};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=Cs(e,t,n,Je(0,zr(r)));return e=>vs(nn(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Je(0,zr(r)),i=Cs(e,t,n,Je(1,zr(r)));if("System.String"===oo(o)||"System.Guid"===oo(o))return e=>en(((e,t)=>{const n=t;return e[n[0]]=i(n[1]),e}),{},e);{let r;const s=Cs(e,t,n,o);return r=s,e=>vs(nn((e=>{const t=e;return[r(t[0]),i(t[1])]}),e))}}return Es(e,t,n,r)}}switch(o){case"System.Boolean":return e=>e;case"Microsoft.FSharp.Core.Unit":return xs;case"System.String":return e=>e;case"System.Char":return e=>e;case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;case"System.Double":return e=>e;case"System.Single":return e=>e;case"System.DateTime":return Ss;case"System.DateTimeOffset":return ys;case"System.TimeSpan":return bs;case"System.Guid":return ws;case"System.Object":return e=>e;default:return Es(e,t,n,r)}}}function Ts(e,t,n,r){const o=Ue(t,new _r(0,[])),i=Ue(r,!0);return Cs(function(e){return null!=e?dr(((e,t)=>new $e(t[0])),e.Coders):pr({Compare:C})}(n),o,i,e)}function ks(e){return _e(xe("%s/tfn-declaration/backend"))(e)}function Is(e,t){return mn.Delay((()=>{const n=wr(function(e){return new En("Authorization",e)}(_e(xe("Bearer %s"))(e)),t);let r;const o=vr(n);return r=mn.Bind(o,(e=>mn.Return(new br(0,[e])))),mn.Bind(r,(e=>{const t=e;if(1===t.tag)return mn.Return(new br(1,[t.fields[0]]));{const e=t.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=vr(n);return mn.Bind(e,(e=>mn.Return(new br(0,[e]))))}return mn.Return(new br(0,[e]))}}))}))}const As=e=>ni(M(yi(Yr("Dto.BackendApiModels.Read.TfnDeclarationDetailsWithMeta",[],us,(()=>[["Meta",Kr(["AccountId",eo])],["Info",Zr(qr("Dto.BackendApiModels.Read.Information",[],ls,(()=>[[["Item",Yr("Dto.BackendApiModels.Read.TfnDeclarationDetails",[],ss,(()=>[["TfnInformation",qr("Dto.BackendApiModels.Read.TfnInformation",[],is,(()=>[[["Item",eo]],[["Item",Xr("Dto.Dto.ExemptionReasonDto",no,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))],["PreviousSurname",Zr(eo)],["ResidencyStatus",Xr("Dto.Dto.ResidencyStatusDto",no,[["AustralianResidentForTaxPurposes",0],["ForeignResidentForTaxPurposes",1],["WorkingHolidayMaker",2]])],["ResidencyStatusV2",Zi()],["EmploymentBasis",Xr("Dto.Dto.EmploymentBasisDto",no,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",to],["HasDebtSupport",Jr(Xr("Dto.Dto.DebtSupportDto",no,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Yr("Dto.BackendApiModels.Read.EmploymentInfo",[],as,(()=>[["ResidencyStatusV2",Zr(Zi())],["EmploymentBasis",Xr("Dto.Dto.EmploymentBasisDto",no,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])]]))]]])))]])),new _r(1,[]),void 0)),e);class Ms extends me{constructor(e){super(),this.Message=e}}function Rs(e,t){return mn.Delay((()=>{const n=Is(e,gr(new _n(0,[]),$r(ks(t))));return mn.Bind(n,(e=>{const t=e;if(1===t.tag)return mn.Return(new br(1,[t.fields[0]]));{const e=t.fields[0];if(200===e.statusCode){const t=As(e.responseText);return mn.Return(t)}return mn.Return(new br(1,["Unexpected response from backend"]))}}))}))}function Os(e,t){let n,r,o;const i=e.TfnInformation.Value;if(o=null==i?new br(1,["missing TFN info"]):new br(0,[i]),1===o.tag)return new br(1,[o.fields[0]]);{const i=o.fields[0];let s;const a=e.PreviousSurname.Value;let l,u;s=null==a?void 0:Wi(a);const c=e.ResidencyStatus.Value;if(null==c)u=void 0;else{const e=function(e){switch(e.tag){case 1:return new br(0,[new cs(1,[])]);case 2:{let t;const n=e.fields[0].HomeCountry;return t=null==n?new br(1,["Home country should be specified for WorkingHolidayMaker"]):new br(0,[n]),1===t.tag?new br(1,[t.fields[0]]):new br(0,[new cs(2,[new fs(new ps(t.fields[0].Code))])])}default:return new br(0,[new cs(0,[])])}}(c);u=1===e.tag?void 0:e.fields[0]}if(l=null==u?new br(1,["missing residency status"]):new br(0,[u]),1===l.tag)return new br(1,[l.fields[0]]);{const o=l.fields[0];let a,u;const c=e.EmploymentBasisRadioButtonGroup.Value;if(u=null==c?void 0:function(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}(c),a=null==u?new br(1,["missing employment basis"]):new br(0,[u]),1===a.tag)return new br(1,[a.fields[0]]);{const l=0|a.fields[0];let u,c;const d=e.ClaimTaxFreeThreshold.Selected;if(c=null==d?void 0:(n=d,!(1===n.tag)),u=null==c?new br(1,["missing is tax-free threshold claimed"]):new br(0,[c]),1===u.tag)return new br(1,[u.fields[0]]);{const n=u.fields[0],a=Ue((r=e.DebtSupportCheckboxGroup.Value,null==r?void 0:(e=>bt(es,e))(r)),lt()),c=()=>0===i.tag?new br(1,["New TFN declaration cannot have a truncated TFN"]):1===i.fields[0].tag?new br(0,[new rs(1,[ns(i.fields[0].fields[0])])]):new br(0,[new rs(0,[i.fields[0].fields[0].fields[0]])]),d=t.Info;if(null!=d){if(0===d.tag)return new br(0,[ct(new hs(1,[new $s(t.Meta.AccountId,0===i.tag?new gs(2,[i.fields[0]]):1===i.fields[0].tag?new gs(1,[ns(i.fields[0].fields[0])]):new gs(0,[i.fields[0].fields[0].fields[0]]),s,o,l,n,a)]))]);{const e=c();return 1===e.tag?new br(1,[e.fields[0]]):new br(0,[ct(new hs(2,[{EmploymentBasis:l,HasDebtSupport:a,IsTaxFreeThresholdClaimed:n,PreviousSurname:Le(s),ResidencyStatus:o,TfnInformation:e.fields[0]}]))])}}{const e=c();return 1===e.tag?new br(1,[e.fields[0]]):new br(0,[ct(new hs(0,[new ms(t.Meta.AccountId,e.fields[0],s,o,l,n,a)]))])}}}}}}class Ps extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadRequest","Other"]}}function Ns(e,t,n){return mn.Delay((()=>{let r;const o=e.PreExistingTfnDec;let i,s;if(2===o.tag&&0===o.fields[0].tag?(i=0,s=o.fields[0].fields[0]):i=1,0===i)r=mn.Delay((()=>mn.Return(new br(0,[s]))));else{const e=Rs(t,n);r=mn.Bind(e,(e=>{let t;const n=e;return t=1===n.tag?new br(1,[new Ps(1,[n.fields[0]])]):new br(0,[n.fields[0]]),mn.Return(t)}))}return mn.Bind(r,(r=>{const o=r;if(1===o.tag)return mn.Return(new br(1,[o.fields[0]]));{const r=o.fields[0];let i,s;const a=Os(e,r);return s=1===a.tag?new br(1,[new Ps(1,[a.fields[0]])]):new br(0,[a.fields[0]]),i=mn.Return(s),mn.Bind(i,(e=>{let o;const i=e;if(1===i.tag)return mn.Return(new br(1,[i.fields[0]]));{const e=i.fields[0];if(dt(e))return mn.Return(new br(0,[r]));{const r=Is(t,(s=new Cn(1,[_s(0,Ts(Jr(qr("Dto.Commands.TfnDeclarationCommandDto",[],hs,(()=>[[["Item",Yr("Dto.Commands.TfnDeclarationDetailsDto",[],ms,(()=>[["AccountId",eo],["TfnInformation",os()],["PreviousSurname",Zr(eo)],["ResidencyStatus",ds()],["EmploymentBasis",Xr("Dto.Dto.EmploymentBasisDto",no,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",to],["HasDebtSupport",Jr(Xr("Dto.Dto.DebtSupportDto",no,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Yr("Dto.Commands.UpdateTfnDeclarationDetailsDto",[],$s,(()=>[["AccountId",eo],["TfnInformation",qr("Dto.Commands.UpdateProvidedTfnInformationDto",[],gs,(()=>[[["Item",eo]],[["Item",Xr("Dto.Dto.ExemptionReasonDto",no,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]],[["Item",eo]]]))],["PreviousSurname",Zr(eo)],["ResidencyStatus",ds()],["EmploymentBasis",Xr("Dto.Dto.EmploymentBasisDto",no,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",to],["HasDebtSupport",Jr(Xr("Dto.Dto.DebtSupportDto",no,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Kr(["EmploymentBasis",Xr("Dto.Dto.EmploymentBasisDto",no,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["HasDebtSupport",Jr(Xr("Dto.Dto.DebtSupportDto",no,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))],["IsTaxFreeThresholdClaimed",to],["PreviousSurname",Zr(eo)],["ResidencyStatus",ds()],["TfnInformation",os()])]]]))),new _r(1,[]),void 0,void 0)(e))]),a=gr(new _n(2,[]),$r(ks(n))),o=new Tn(a.url,a.method,a.headers,a.withCredentials,a.overridenMimeType,a.overridenResponseType,a.timeout,s),wr(new En("Content-Type","application/json"),o)));return mn.Bind(r,(e=>{const t=e;if(1===t.tag)return mn.Return(new br(1,[t.fields[0]]));{const e=t.fields[0];let r;switch(0|e.statusCode){case 200:{const t=As(e.responseText);r=1===t.tag?new br(1,[new Ps(1,[t.fields[0]])]):new br(0,[t.fields[0]]);break}case 400:{let t;const o=(n=e.responseText,ni(M(yi(Yr("Service.BadRequestErrorDetails",[],Ms,(()=>[["Message",eo]])),new _r(1,[]),void 0)),n));t=1===o.tag?new br(1,[new Ps(1,[o.fields[0]])]):new br(0,[o.fields[0]]),r=1===t.tag?new br(1,[t.fields[0]]):new br(1,[new Ps(0,[t.fields[0].Message])]);break}default:r=new br(1,[new Ps(1,["Unexpected response from backend"])])}return mn.Return(r)}var n}))}}var s,a}))}}))}))}class Ds extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Success","Failure","Info"]}}function Fs(e){switch(e.tag){case 0:return"text-green-700";case 2:return"text-blue-700";default:return"text-red-700"}}function Ls(e){switch(e.tag){case 0:return"bg-green-50";case 2:return"bg-blue-50";default:return"bg-red-50"}}function Bs(e){return e.tag,e.fields[0]}function Hs(e){let t,n,o,i;const s=e.hideAlert,a=e.alert,l=gn();return ln((()=>{!function(e,t){bn(mn.Delay((()=>mn.Bind(yn(5e3),(()=>(e(),mn.Zero()))))),t)}(s,l)})),(0,r.createElement)("div",I(vt([["className",Ie(" ",["rounded-md","p-4","my-4",Ls(a)])],["data-testid","alert"],(t=[(0,r.createElement)("div",I(vt([["className",Ie(" ",["flex"])],(n=[(0,r.createElement)("p",{className:Ie(" ",["text-sm","pr-2",Fs(a)]),children:Bs(a)}),(0,r.createElement)("div",I(vt([["className",Ie(" ",["ml-auto"])],(o=[(0,r.createElement)("div",I(vt([["className",Ie(" ",["-mx-1.5","-my-1.5"])],(i=[(0,r.createElement)("button",{type:"button",className:Ie(" ",Kt(Ut((()=>Jt(Wt("inline-flex"),Ut((()=>Jt(Wt("rounded-md"),Ut((()=>Jt(Wt("p-1.5"),Ut((()=>Jt(Wt("focus:outline-none"),Ut((()=>Jt(Wt("focus:ring-2"),Ut((()=>Jt(Wt("focus:ring-offset-2"),Ut((()=>function(e){switch(e.tag){case 0:return vt(["bg-green-50","text-green-500","hover:bg-green-100","focus:ring-offset-green-50","focus:ring-green-600"]);case 2:return vt(["bg-blue-50","text-blue-500","hover:bg-blue-100","focus:ring-offset-blue-50","focus:ring-blue-600"]);default:return vt(["bg-red-50","text-red-500","hover:bg-red-100","focus:ring-offset-red-50","focus:ring-red-600"])}}(a))))))))))))))))))))))),children:_t.Children.toArray([At]),onClick:e=>{wn(l),s()}})],["children",_t.Children.toArray(Array.from(i))])])))],["children",_t.Children.toArray(Array.from(o))])])))],["children",_t.Children.toArray(Array.from(n))])])))],["children",_t.Children.toArray(Array.from(t))])])))}class Vs extends me{constructor(e,t){super(),this.Value=e,this.Meta=t}}function Gs(){return new Vs(void 0,{Valid:!1})}function Us(e){return new Vs(e,{Valid:!0})}function zs(e){return new Vs(e,{Valid:!1})}function js(e){switch(e.tag){case 1:return"ForeignResidentForTaxPurposes";case 2:return"WorkingHolidayMaker";default:return"AustralianResidentForTaxPurposes"}}function Ws(e){switch(e){case"HELP":return new Di(0,[]);case"VETStudentLoan":return new Di(1,[]);case"FinancialSupplement":return new Di(2,[]);case"StudentStartUpLoan":return new Di(3,[]);case"TradeSupportLoan":return new Di(4,[]);default:return}}function Ys(e){switch(e){case"FullTime":return new Gi(0,[]);case"PartTime":return new Gi(1,[]);case"LabourHire":return new Gi(2,[]);case"SuperIncomeStream":return new Gi(3,[]);case"Casual":return new Gi(4,[]);default:return}}function Ks(e){return(0,r.createElement)("p",{className:Ie(" ",["block","text-sm","font-medium","text-gray-700","leading-5"]),children:e})}function qs(e){let t;return(0,r.createElement)("div",I(vt([["className","flex items-start p-4 space-x-3 bg-amber-50 rounded-md mt-4"],(t=[Rt,(0,r.createElement)("span",{className:"text-sm leading-5 font-normal text-amber-700",children:e})],["children",_t.Children.toArray(Array.from(t))])])))}class Zs extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Yes","No"]}}class Js extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Select","SelectInternal"]}}class Xs extends me{constructor(e,t){super(),this.Selected=e,this.Meta=t}}function Qs(e){return new Xs(e,{Touched:!1})}function ea(e,t){return 1===e.tag?e.fields[1]||!t.Meta.Touched?new Xs(e.fields[0],t.Meta):t:new Xs(e.fields[0],{Touched:!0})}function ta(e){const t=_(e.Parent.State.Selected,e.Selection)?Kt(Ut((()=>Jt(null!=e.Parent.Disable?Wt("bg-gray-50"):Wt("bg-white"),Ut((()=>Jt(Wt("border-gray-200"),Ut((()=>Jt(Wt("shadow-sm"),Ut((()=>null!=e.Parent.Disable?Wt("text-gray-400"):Wt("text-gray-900"))))))))))))):Kt(Ut((()=>Jt(Wt("shadow-none"),Ut((()=>null!=e.Parent.Disable?Wt("text-gray-400"):Wt("text-gray-700")))))));return(0,r.createElement)("button",{className:Ie(" ",Kt(Ut((()=>Jt(Wt("relative"),Ut((()=>Jt(Wt("w-1/2"),Ut((()=>Jt(Wt("border-gray-200"),Ut((()=>Jt(Wt("rounded-md"),Ut((()=>Jt(Wt("shadow-sm"),Ut((()=>Jt(Wt("py-2"),Ut((()=>Jt(Wt("text-sm"),Ut((()=>Jt(Wt("font-medium"),Ut((()=>Jt(Wt("whitespace-nowrap"),Ut((()=>Jt(Wt("focus:outline-none"),Ut((()=>Jt(Wt("focus:ring-inset"),Ut((()=>Jt(Wt("focus:ring-1"),Ut((()=>Jt(Wt("focus:ring-primary-focus"),Ut((()=>Jt(Wt("focus:z-10"),Ut((()=>Jt(Wt("w-auto"),Ut((()=>Jt(Wt("px-8"),Ut((()=>Jt(_(e.Parent.Disable,e.Selection)?Wt("disabled:cursor-not-allowed"):jt(),Ut((()=>t))))))))))))))))))))))))))))))))))))))))))))))))))))))),type:"button",name:"yesNoButtonGroup",onClick:t=>{e.Parent.Dispatch(new Js(0,[e.Selection]))},disabled:_(e.Parent.Disable,e.Selection),children:pe(e.Selection)})}function na(e){let t;return(0,r.createElement)("div",I(vt([["className",Ie(" ",["relative","self-start","bg-gray-100","rounded-lg","p-0.5","flex","mt-2","space-x-0.5"])],(t=[ta({Parent:e,Selection:new Zs(0,[])}),ta({Parent:e,Selection:new Zs(1,[])})],["children",_t.Children.toArray(Array.from(t))])])))}function ra(e,t,n){gt((n=>{try{n(t)}catch(t){e(t)}}),n)}function oa(){return lt()}function ia(e,t){return bt((t=>n=>{t((t=>{n(e(t))}))}),t)}function sa(e,t,n,r){return ct((o=>{e(t).then((e=>{o(n(e))})).catch((e=>{o(r(e))}))}))}function aa(e){return Ie("/",e)}function la(e,t,n){try{a(n)}catch(n){e(["Error stopping subscription: "+aa(t),n])}}function ua(e,t){gt((t=>{la(e,t[0],t[1])}),t)}function ca(e,t,n,r,o,i){return gt((t=>{!function(e,t){const n=new Error("Duplicate SubId");e(["Duplicate SubId: "+aa(t),n])}(e,t)}),n),gt((t=>{la(e,t[0],t[1])}),r),yt(o,St((n=>function(e,t,n,r){try{return[n,r(t)]}catch(t){return void e(["Error starting subscription: "+aa(n),t])}}(e,t,n[0],n[1])),i))}function da(e){return t=(e,t)=>{return n=e[0],r=e[1],o=t[0],i=t[1],s=t[2],Jo(n,i)?[ut(n,o),i,s]:[o,Xo(n,i),ut([n,r],s)];var n,r,o,i,s},n=e,r=[lt(),(o={Compare:k},Ko(o)),lt()],Qe(t,ht(n),r);var t,n,r,o}const fa=lt();function pa(e,t){const n=jo(r={Compare:k},Uo(r,bt((e=>e[0]),e)));var r;const o=da(t),i=o[1],s=o[0];if(n.Equals(i))return[s,lt(),e,lt()];{const t=function(e,t){const n=nt(),r=nt(),o=n,s=mt(((e,t)=>{let n,r;const o=e[0],s=e[1];return(e=>Jo(e[0],i))(t)?[(n=new et(t,void 0),o.tail=n,n),s]:[o,(r=new et(t,void 0),s.tail=r,r)]}),[o,r],t),a=nt();s[0].tail=a;const l=nt();return s[1].tail=l,[at(o),at(r)]}(0,e);return[s,t[1],t[0],xt((e=>!Jo(e[0],n)),o[2])]}}function ha(e,t){return e>t?e:t}function ma(e,t,n,r,o){const i=function(e,t,n,r){const o=0|k(e,n);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return n=>{const o=0|k(n,t);return i&&o<=0||!i&&o>=0?[n,r(n,e)]:void 0}}(t,n,r,o);return Ut((()=>{return t=i,n=e,Vt((()=>function(e,t){let n,r=t;return Bt((()=>{if(null!=n){const e=Fe(n)[0];return Fe(n)[1],e}return Nt()}),(()=>{if(n=e(r),null!=n){Fe(n)[0];const e=Fe(n)[1];return r=e,!0}return!1}),(()=>{}))}(t,n)));var t,n}))}class $a extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Writable","ReadWritable"]}}class ga{constructor(e){this.state=new $a(0,[Ye(new Array(ha(e,10)),0,ha(e,10),null),0])}}function wa(e){const t=e.state;if(1===t.tag){const n=0|t.fields[1],r=0|t.fields[2],o=t.fields[0],i=(r+1)%o.length|0;return e.state=i===n?new $a(0,[o,n]):new $a(1,[o,n,i]),Be(Je(r,o))}}class va extends me{constructor(e,t,n,r,o,i,s){super(),this.init=e,this.update=t,this.subscribe=n,this.view=r,this.setState=o,this.onError=i,this.termination=s}}function ya(e,t,n){return new va(e,t,(e=>lt()),n,M((e=>{const t=R(n)(e);return e=>{t(e)}})),(e=>{var t,n;t=e[0],n=e[1],console.error(Be(t),n)}),[e=>!1,e=>{}])}function ba(e,t){return new va(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function xa(e){return R(e.view)}function Sa(e,t,n){let r;const o=n.init(t),i=o[0],s=n.subscribe(i),l=n.termination,u=new ga(10);let c=!1,d=i,f=fa,p=!1;const h=R(e)((e=>{p||(function(e,t){const n=e.state;if(1===n.tag){const i=0|n.fields[1],s=0|n.fields[2],l=n.fields[0];Xe(l,i,t);const u=(i+1)%l.length|0;e.state=new $a(1,u===s?[(r=s,o=l,Array.from(Ut((()=>Jt(on(r,o),Ut((()=>{return Jt((e=r,t=o,Zt((()=>Gt(t)),((t,n)=>{if(t<e){if(n["System.Collections.IEnumerator.MoveNext"]())return Be(n["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Pt+"\\nParameter name: source")}}),(e=>{a(e)}))),Ut((()=>sn((e=>Wt(null)),ma(0,1,o.length,0,((e,t)=>e+t))))));var e,t}))))))),l.length,0]:[l,u,s])}else{const r=0|n.fields[1],o=n.fields[0];Xe(o,r,t);const i=(r+1)%o.length|0;e.state=new $a(1,[o,i,r])}var r,o}(u,e),c||(c=!0,m(),c=!1))})),m=()=>{let e,t=wa(u);for(;!p&&null!=t;){const r=Fe(t);if(l[0](r))ua(n.onError,f),l[1](d),p=!0;else{const o=n.update(r,d),i=o[0],s=n.subscribe(i);n.setState(i,h),ra((e=>{n.onError([_e(xe("Error handling the message: %A"))(r),e])}),h,o[1]),d=i,e=pa(f,s),f=ca(n.onError,h,e[0],e[1],e[2],e[3]),t=wa(u)}}};c=!0,n.setState(i,h),ra((e=>{n.onError([_e(xe("Error intitializing:")),e])}),h,o[1]),r=pa(f,s),f=ca(n.onError,h,r[0],r[1],r[2],r[3]),m(),c=!1}function _a(e,t){Sa(M((e=>e)),e,t)}var Ea=n(888);class Ca{constructor(e,t,n){this.arg=t,this.dependencies=n;const r=e(),o=[];let i;this.finalDispatch=void 0;const l=function(e){return e.init}(r)(this.arg);let u=l[0],c=l[1];i=[[u,e=>{const t=this.finalDispatch;null==t?o.push(e):t(e)},!1,o],c],this.state=i[0],this.cmd=i[1],this.subscribe=e=>{let t=!1;const n=s(this.state[0]);return _a(this.arg,ba(((t,n)=>{const r=this.state;this.finalDispatch=n,this.state=[t,r[1],!0,o],t!==r[0]&&e()}),function(e,r,o,i,l,u,c){const d=R(e)(c.init),f=P(r)(R(c.update)),p=P(o)(R(c.view)),h=P(i)(R(c.setState));return new va(d,M(f),R(l)(c.subscribe),M(p),M(h),c.onError,(m=c.termination,[e=>!!m[0](e)||n&&t,e=>{const t=e;s(t)?a(t):m[1](e)}]));var m}(((e,t)=>{const n=this.cmd;return this.cmd=oa(),[this.state[0],n]}),((e,t,n)=>e(t)(this.state[0])),O((e=>e)),O((e=>e)),M((e=>e)),0,r))),()=>{t=!0}}}}function Ta(e,t,n){return new Ca(e,t,n)}function ka(e,t,n){const o=(0,r.useState)((()=>Ta(e,t,n))),s=o[0];(function(e,t,n){return!_(e.arg,t)||!_(e.dependencies,n)})(s,t,n)&&o[1](Ta(e,t,n));const l=(0,Ea.useSyncExternalStore)(function(e){return e.subscribe}(s),(()=>function(e){return e.state}(s))),u=l[2],d=l[3],f=l[1];return(0,r.useEffect)((()=>{if(u&&d.length>0){let t=c(d);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout((()=>{f(e)}))}}finally{a(t)}i(e=d)?e.splice(0):e.clear()}var e}),[u,d]),[l[0],f]}class Ia extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class Aa extends me{constructor(e){super(),this.Selected=e}}function Ma(e){let t,n;const o=(i=e.InitialValue,[new Aa(i),oa()]);var i;return n=ka((()=>ya((()=>o),((t,n)=>function(e,t){const n=function(e){return new Aa(e.fields[0])}(t);return e(new Vs(n.Selected,{Valid:null!=n.Selected})),[n,oa()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("div",I(vt([["className",Ie(" ",["space-y-2","mt-2"])],(t=Kt(Ut((()=>sn((t=>{let o,i;const s=t[0];return Wt((0,r.createElement)("label",I(vt([["className",Ie(" ",["flex","items-start"])],(o=[(0,r.createElement)("input",{className:Ie(" ",["focus:ring-primary-focus","block","mt-0.5","mb-0.5","h-4","w-4","text-primary-base","border-gray-300"]),type:"radio",name:e.Name,id:s,checked:Ve(n[0].Selected)===s,onChange:e=>{e.target.checked,n[1](new Ia(s))}}),(0,r.createElement)("label",I(vt([["className",Ie(" ",["ml-3","block","text-sm"])],["for",s],(i=Kt(Ut((()=>Jt(Wt((0,r.createElement)("span",{className:Ie(" ",["block","text-gray-900"]),children:t[1]})),Ut((()=>{const e=t[2];if(null==e)return Wt(null);{const t=e;return Wt((0,r.createElement)("span",{className:Ie(" ",["block","text-gray-500"]),children:t}))}})))))),["children",_t.Children.toArray(Array.from(i))])])))],["children",_t.Children.toArray(Array.from(o))])]))))}),e.ValueLabelPairs)))),["children",_t.Children.toArray(Array.from(t))])])))}class Ra extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetTfnInput","SetTfnTouched","SetTfnExemptionReason","SwitchEditingState","HideAlert"]}}class Oa extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}class Pa extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","TfnValue"]}}class Na extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Truncated","Editing"]}}class Da extends me{constructor(e,t,n,r,o){super(),this.YesNoButtonGroup=e,this.TruncatedTfn=t,this.CurrentAlert=n,this.EditingState=r,this.TfnInputTouched=o}}function Fa(e){let t;const n=e.EditingState;if(1===n.tag){const e=n.fields[0];return new Vs((t=e.Value,null==t?void 0:new Pa(1,[t])),e.Meta)}return new Vs(new Pa(0,[Ve(e.TruncatedTfn)]),{Valid:!0})}const La=e=>!(1===Yi(e).tag);function Ba(e){const t=e.EditingState;if(1===t.tag){const n=t.fields[0],r=n.Value;if(null==r)return new Da(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Na(1,[new Vs(n.Value,{Valid:!1})]),e.TfnInputTouched);if(1===r.tag)return new Da(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Na(1,[new Vs(n.Value,{Valid:!0})]),e.TfnInputTouched);{const t=r.fields[0].fields[0];return new Da(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Na(1,[new Vs(n.Value,{Valid:La(t)})]),e.TfnInputTouched)}}return e}function Ha(e){const t=e.EditingState;if(1===t.tag){const e=t.fields[0].Value;let n,r;return null!=e&&0===e.tag?(n=0,r=e.fields[0]):n=1,0===n?r.fields[0]:""}return""}function Va(e){if(e.TfnInputTouched){const t=e.EditingState;return 1===t.tag&&!t.fields[0].Meta.Valid}return!1}function Ga(e){let t,n,o,i,s;const a=function(e){let t,n,r;return[Ba(new Da(Qs(null!=e&&1===e.tag&&1===e.fields[0].tag?new Zs(1,[]):new Zs(0,[])),(t=e,null!=t&&0===t.tag?(n=t.fields[0],n):void 0),void 0,null==e?new Na(1,[Gs()]):1===e.tag?(r=e.fields[0],new Na(1,[new Vs(r,{Valid:!1})])):new Na(0,[]),!1)),oa()]}(e.InitialValue);s=ka((()=>ya((()=>a),((t,n)=>function(e,t,n){const r=function(e,t){switch(e.tag){case 2:return new Da(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,t.EditingState,!0);case 1:{const n=e.fields[0],r=new Oa(0,[new Ui(n)]),o=La(n);return t.EditingState.tag,new Da(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Na(1,[new Vs(r,{Valid:o})]),t.TfnInputTouched)}case 3:{const n=e.fields[0];let r,o;const i=n.Value;return o=null==i?void 0:function(e){switch(e){case"Under18AndBelowTaxThreshold":return new zi(0,[]);case"Pending":return new zi(1,[]);case"Pensioner":return new zi(2,[]);default:return}}(i),r=null==o?void 0:new Oa(1,[o]),t.EditingState.tag,new Da(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Na(1,[new Vs(r,n.Meta)]),t.TfnInputTouched)}case 4:return 1===t.EditingState.tag?new Da(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Na(0,[]),t.TfnInputTouched):new Da(t.YesNoButtonGroup,t.TruncatedTfn,new Ds(2,["Please click the continue button at the end of\n this form to save the changes to your TFN."]),new Na(1,[Gs()]),!1);case 5:return Ba(new Da(t.YesNoButtonGroup,t.TruncatedTfn,void 0,t.EditingState,t.TfnInputTouched));default:{const n=e.fields[0];let r,o;n.tag,o=n.fields[0];const i=t.EditingState;if(1===o.tag)if(1===i.tag){const e=i.fields[0].Value;let n;n=null!=e&&1===e.tag?0:1,r=0===n?t.EditingState:new Na(1,[Gs()])}else r=new Na(1,[Gs()]);else if(1===i.tag){const e=i.fields[0].Value,n=t.TruncatedTfn;let o,s;switch(null!=e&&0===e.tag?o=0:null!=n?(o=1,s=n):o=2,o){case 0:r=t.EditingState;break;case 1:r=new Na(0,[]);break;default:r=new Na(1,[Gs()])}}else r=new Na(0,[]);return new Da(ea(n,t.YesNoButtonGroup),t.TruncatedTfn,t.CurrentAlert,r,t.TfnInputTouched)}}}(t,n);return e(Fa(r)),[r,oa()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const l=s[0],u=s[1],c=null==l.TruncatedTfn?null:(0,r.createElement)("div",I(ct((t=[(0,r.createElement)("button",I(vt([["className",Ie(" ",["relative","inline-flex","items-center","space-x-2","px-3","sm:py-2","py-3","border","border-gray-300","text-sm","font-medium","rounded-r-md","text-gray-700","bg-gray-50","hover:bg-gray-100","focus:outline-none","focus:ring-1","focus:ring-primary-focus","focus:border-primary-focus","focus:z-20","-ml-px"])],["type","button"],(n=Kt(Ut((()=>_(l.EditingState,new Na(0,[]))?Jt(Wt(Ct),Ut((()=>Wt((0,r.createElement)("span",{children:["Edit"]}))))):Jt(Wt(Tt),Ut((()=>Wt((0,r.createElement)("span",{children:["Cancel"]})))))))),["children",_t.Children.toArray(Array.from(n))]),["onClick",e=>{u(new Ra(4,[]))}]])))],["children",_t.Children.toArray(Array.from(t))]))));return(0,r.createElement)("div",I(vt([["className",Ie(" ",Ot)],(o=[Ks("Do you have your Tax File Number (TFN)?"),(0,r.createElement)(na,{Dispatch:e=>{u(new Ra(0,[e]))},State:l.YesNoButtonGroup}),(0,r.createElement)("div",I(vt([["className",Ie(" ",["mt-4"])],(i=Kt(Ut((()=>{let e,t,n,o,i,s;return Jt((e=l.YesNoButtonGroup.Selected,null!=e?1===e.tag?Wt((0,r.createElement)(Ma,(t=bt((e=>[pe(e[0]),e[1],e[2]]),vt([[new zi(1,[]),"My TFN is pending",void 0],[new zi(0,[]),"I'm under 18 and don't have a TFN",void 0],[new zi(2,[]),"I have an exemption from quoting a TFN","E.g. receiving a social security or service pension"]])),{InitialValue:Le((n=Fa(l).Value,null!=n&&1===n.tag&&1===n.fields[0].tag?(o=n.fields[0].fields[0],pe(o)):void 0)),Name:"TfnExemption",OnUpdate:e=>{u(new Ra(3,[e]))},ValueLabelPairs:t}))):(i=l.TruncatedTfn,null!=i&&0===l.EditingState.tag?(s=i,Jt(Wt(Ks("Enter your TFN")),Ut((()=>{let e,t,n;return Wt((0,r.createElement)("div",I(vt([["className",Ie(" ",["mt-1","flex","rounded-md","shadow-sm"])],(e=[(0,r.createElement)("div",I(vt([["className","relative flex items-stretch flex-grow"],(t=[(0,r.createElement)("input",I(vt([["className",Ie(" ",["focus:ring-primary-focus","focus:border-primary-focus","bg-gray-50","focus:z-20","relative","block","w-full","rounded-none","rounded-l-md","pl-3","sm:text-sm","text-base","border","border-gray-300","text-gray-500"])],["disabled",!0],(n=`*** *** *${s}`,["ref",e=>{null==e||_(e.value,n)||(e.value=n)}])])))],["children",_t.Children.toArray(Array.from(t))])]))),c],["children",_t.Children.toArray(Array.from(e))])]))))})))):Jt(Wt(Ks("Enter your TFN")),Ut((()=>{let e;return Wt((0,r.createElement)("div",I(vt([["className",Ie(" ",["mt-1"])],(e=Kt(Ut((()=>{let e,t;return Jt(Wt((0,r.createElement)("div",I(vt([["className",Ie(" ",["relative","flex","items-stretch","flex-grow"])],(e=[(0,r.createElement)("input",I(vt([["className",Ie(" ",Kt(Ut((()=>Jt(Wt("block"),Ut((()=>Jt(Wt("w-full"),Ut((()=>Jt(Wt("focus:outline-none"),Ut((()=>Jt(Wt("text-base"),Ut((()=>Jt(Wt("focus:z-20"),Ut((()=>Jt(Wt("relative"),Ut((()=>Jt(Wt("sm:text-sm"),Ut((()=>Jt(Wt("rounded-md"),Ut((()=>Jt(Wt("border-gray-300"),Ut((()=>Jt(Wt("focus:ring-primary-focus"),Ut((()=>Jt(Wt("focus:border-primary-focus"),Ut((()=>Jt(Wt("block"),Ut((()=>Jt(Wt("w-full"),Ut((()=>Jt(null==l.TruncatedTfn?Wt("rounded-md"):Wt("rounded-none rounded-l-md"),Ut((()=>Va(l)?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:jt()))))))))))))))))))))))))))))))))))))))))))))))],["type","text"],["onChange",e=>{u(new Ra(1,[Oe(xi,e.target.value)]))}],(t=Ha(l),["ref",e=>{null==e||_(e.value,t)||(e.value=t)}]),["onBlur",e=>{u(new Ra(2,[]))}],["inputMode","numeric"],["data-testid","tfn-input"]]))),c],["children",_t.Children.toArray(Array.from(e))])])))),Ut((()=>Va(l)?Wt((0,r.createElement)("div",{className:Ie(" ",["mt-1","text-sm","text-red-600"]),children:"That isn’t a valid Tax File Number"})):jt())))}))),["children",_t.Children.toArray(Array.from(e))])]))))})))):Wt(null)),Ut((()=>{let e;return Wt((e=Kt(Ut((()=>{const e=l.CurrentAlert;if(null==e)return Wt(null);{const t=e;return Wt((0,r.createElement)(Hs,{alert:t,hideAlert:()=>{u(new Ra(5,[]))}}))}}))),(0,r.createElement)("div",{children:_t.Children.toArray(Array.from(e))})))})))}))),["children",_t.Children.toArray(Array.from(i))])])))],["children",_t.Children.toArray(Array.from(o))])])))}function Ua(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function za(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function ja(e){let t=null;return()=>(null==t&&(t=e()),t)}const Wa=ja((function(){return za(/^Mac/i)})),Ya=ja((function(){return za(/^iPhone/i)})),Ka=ja((function(){return za(/^iPad/i)||Wa()&&navigator.maxTouchPoints>1})),qa=ja((function(){return Ya()||Ka()})),Za=(ja((function(){return Wa()||qa()})),ja((function(){return Ua(/AppleWebKit/i)&&!Za()})),ja((function(){return Ua(/Chrome/i)}))),Ja=ja((function(){return Ua(/Android/i)}));ja((function(){return Ua(/Firefox/i)}));const Xa=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Qa=e=>e&&"window"in e&&e.window===e?e:Xa(e).defaultView||window;let el=null,tl=new Set,nl=new Map,rl=!1,ol=!1;const il={Tab:!0,Escape:!0};function sl(e,t){for(let n of tl)n(e,t)}function al(e){rl=!0,function(e){return!(e.metaKey||!Wa()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(el="keyboard",sl("keyboard",e))}function ll(e){el="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(rl=!0,sl("pointer",e))}function ul(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ja()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(rl=!0,el="virtual")}function cl(e){e.target!==window&&e.target!==document&&(rl||ol||(el="virtual",sl("virtual",e)),rl=!1,ol=!1)}function dl(){rl=!1,ol=!0}function fl(e){if("undefined"==typeof window||nl.get(Qa(e)))return;const t=Qa(e),n=Xa(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){rl=!0,r.apply(this,arguments)},n.addEventListener("keydown",al,!0),n.addEventListener("keyup",al,!0),n.addEventListener("click",ul,!0),t.addEventListener("focus",cl,!0),t.addEventListener("blur",dl,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",ll,!0),n.addEventListener("pointermove",ll,!0),n.addEventListener("pointerup",ll,!0)):(n.addEventListener("mousedown",ll,!0),n.addEventListener("mousemove",ll,!0),n.addEventListener("mouseup",ll,!0)),t.addEventListener("beforeunload",(()=>{pl(e)}),{once:!0}),nl.set(t,{focus:r})}const pl=(e,t)=>{const n=Qa(e),r=Xa(e);t&&r.removeEventListener("DOMContentLoaded",t),nl.has(n)&&(n.HTMLElement.prototype.focus=nl.get(n).focus,r.removeEventListener("keydown",al,!0),r.removeEventListener("keyup",al,!0),r.removeEventListener("click",ul,!0),n.removeEventListener("focus",cl,!0),n.removeEventListener("blur",dl,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",ll,!0),r.removeEventListener("pointermove",ll,!0),r.removeEventListener("pointerup",ll,!0)):(r.removeEventListener("mousedown",ll,!0),r.removeEventListener("mousemove",ll,!0),r.removeEventListener("mouseup",ll,!0)),nl.delete(n))};function hl(){return"pointer"!==el}"undefined"!=typeof document&&function(e){const t=Xa(e);let n;"loading"!==t.readyState?fl(e):(n=()=>{fl(e)},t.addEventListener("DOMContentLoaded",n))}();const ml=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);const $l="undefined"!=typeof document?r.default.useLayoutEffect:()=>{};class gl{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function wl(e){let t=(0,r.useRef)({isFocused:!1,observer:null});$l((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=(0,r.useRef)(null);return $l((()=>{t.current=e}),[e]),(0,r.useCallback)(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return(0,r.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{t.current.isFocused=!1,r.disabled&&n(new gl("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}function vl(e={}){let{autoFocus:t=!1,isTextInput:n,within:o}=e,i=(0,r.useRef)({isFocused:!1,isFocusVisible:t||hl()}),[s,a]=(0,r.useState)(!1),[l,u]=(0,r.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),c=(0,r.useCallback)((()=>u(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,r.useCallback)((e=>{i.current.isFocused=e,a(e),c()}),[c]);var f,p,h;f=e=>{i.current.isFocusVisible=e,c()},p=[],h={isTextInput:n},fl(),(0,r.useEffect)((()=>{let e=(e,t)=>{(function(e,t,n){var r;const o="undefined"!=typeof window?Qa(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?Qa(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Qa(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Qa(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof o&&!ml.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof i||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!il[n.key])})(!!(null==h?void 0:h.isTextInput),e,t)&&f(hl())};return tl.add(e),()=>{tl.delete(e)}}),p);let{focusProps:m}=function(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:i}=e;const s=(0,r.useCallback)((e=>{if(e.target===e.currentTarget)return o&&o(e),i&&i(!1),!0}),[o,i]),a=wl(s),l=(0,r.useCallback)((e=>{const t=Xa(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),a(e))}),[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||o)?l:void 0,onBlur:t||!o&&!i?void 0:s}}}({isDisabled:o,onFocusChange:d}),{focusWithinProps:$}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:o,onFocusWithinChange:i}=e,s=(0,r.useRef)({isFocusWithin:!1}),a=(0,r.useCallback)((e=>{s.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,s]),l=wl(a),u=(0,r.useCallback)((e=>{s.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),i&&i(!0),s.current.isFocusWithin=!0,l(e))}),[o,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}({isDisabled:!o,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:o?$:m}}let yl=!1,bl=0;function xl(){yl=!0,setTimeout((()=>{yl=!1}),50)}function Sl(e){"touch"===e.pointerType&&xl()}function _l(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",Sl):document.addEventListener("touchend",xl),bl++,()=>{bl--,bl>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",Sl):document.removeEventListener("touchend",xl))}}function El(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:o,isDisabled:i}=e,[s,a]=(0,r.useState)(!1),l=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(_l,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,r.useMemo)((()=>{let e=(e,r)=>{if(l.pointerType=r,i||"touch"===r||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let o=e.currentTarget;l.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),a(!0)},r=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let r=e.currentTarget;o&&o({type:"hoverend",target:r,pointerType:t}),n&&n(!1),a(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{yl&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,e.pointerType)}):(s.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||yl||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,"mouse")}),{hoverProps:s,triggerHoverEnd:r}}),[t,n,o,i,l]);return(0,r.useEffect)((()=>{i&&c({currentTarget:l.target},l.pointerType)}),[i]),{hoverProps:u,isHovered:s}}function Cl(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,s,a,l;let u;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(u=Date.now());const c=e(),d=c.length!==o.length||c.some(((e,t)=>o[t]!==e));if(!d)return r;let f;if(o=c,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(f=Date.now()),r=t(...c),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-u))/100,t=Math.round(100*(Date.now()-f))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function Tl(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const kl=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,o)),n)}},Il=e=>e,Al=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Ml=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void o({width:e.inlineSize,height:e.blockSize})}o(n.getBoundingClientRect())}));return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Rl={passive:!0},Ol="undefined"==typeof window||"onscrollend"in window,Pl=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&Ol?()=>{}:kl(r,(()=>{t(o,!1)}),e.options.isScrollingResetDelay),s=r=>()=>{const{horizontal:s,isRtl:a}=e.options;o=s?n.scrollLeft*(a?-1:1):n.scrollTop,i(),t(o,r)},a=s(!0),l=s(!1);return l(),n.addEventListener("scroll",a,Rl),n.addEventListener("scrollend",l,Rl),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},Nl=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Dl=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const s=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class Fl{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Il,rangeExtractor:Al,onChange:()=>{},measureElement:Nl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=Cl((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=Cl((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,n,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o})),{key:!1}),this.getMeasurements=Cl((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o},i)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,s);for(let o=s;o<e;o++){const e=r(o),s=1===this.options.lanes?a[o-1]:this.getFurthestMeasurement(a,o),l=s?s.end+this.options.gap:t+n,u=i.get(e),c="number"==typeof u?u:this.options.estimateSize(o),d=l+c,f=s?s.lane:o%this.options.lanes;a[o]={index:o,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=Cl((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=Ll(0,r,(t=>e[t].start),n);let i=o;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:o,endIndex:i}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=Cl((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const o=r.key,i=this.elementsCache.get(o);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=t-(this.itemSizeCache.get(n.key)??n.size);0!==r&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=Cl((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return Tl(t[Ll(0,t.length-1,(e=>Tl(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize(),r=this.getScrollOffset();"auto"===t&&(t=e<=r?"start":e>=r+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const o=this.options.horizontal?"scrollWidth":"scrollHeight",i=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-n;return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(n.end>=o+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[o,i]=r;this._scrollToOffset(o,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[t]=Tl(this.getOffsetForIndex(e,i));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:i,behavior:n})}else this.scrollToIndex(e,{align:i,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Ll=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0},Bl="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;var Hl=Object.defineProperty,Vl=(e,t,n)=>(((e,t,n)=>{t in e?Hl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Gl=new class{constructor(){Vl(this,"current",this.detect()),Vl(this,"handoffState","pending"),Vl(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Ul(e){return Gl.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function zl(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function jl(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return zl((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=jl();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Wl(){let[e]=(0,r.useState)(jl);return(0,r.useEffect)((()=>()=>e.dispose()),[e]),e}let Yl=(e,t)=>{Gl.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function Kl(e){let t=(0,r.useRef)(e);return Yl((()=>{t.current=e}),[e]),t}let ql=function(e){let t=Kl(e);return r.default.useCallback(((...e)=>t.current(...e)),[t])};function Zl(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function Jl(e,t=!1){let[n,o]=(0,r.useReducer)((()=>({})),{}),i=(0,r.useMemo)((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return Yl((()=>{if(!e)return;let t=new ResizeObserver(o);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}class Xl extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}function Ql(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}function eu(e){return(0,r.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}let tu=new Xl((()=>Ql((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function nu(e,t){let n=tu.get(t),o=(0,r.useId)(),i=eu(n);if(Yl((()=>{if(e)return n.dispatch("ADD",o),()=>n.dispatch("REMOVE",o)}),[n,e]),!e)return!1;let s=i.indexOf(o),a=i.length;return-1===s&&(s=a,a+=1),s===a-1}let ru=new Map,ou=new Map;function iu(e){var t;let n=null!=(t=ou.get(e))?t:0;return ou.set(e,n+1),0!==n||(ru.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>function(e){var t;let n=null!=(t=ou.get(e))?t:1;if(1===n?ou.delete(e):ou.set(e,n-1),1!==n)return;let r=ru.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,ru.delete(e))}(e)}function su(e,{allowed:t,disallowed:n}={}){let r=nu(e,"inert-others");Yl((()=>{var e,o;if(!r)return;let i=jl();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(iu(t));let s=null!=(o=null==t?void 0:t())?o:[];for(let e of s){if(!e)continue;let t=Ul(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)s.some((t=>e.contains(t)))||i.add(iu(e));n=n.parentElement}}return i.dispose}),[r,t,n])}function au(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,au),r}let lu=["[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(",");["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var uu,cu,du,fu=((du=fu||{})[du.First=1]="First",du[du.Previous=2]="Previous",du[du.Next=4]="Next",du[du.Last=8]="Last",du[du.WrapAround=16]="WrapAround",du[du.NoScroll=32]="NoScroll",du[du.AutoFocus=64]="AutoFocus",du),pu=((cu=pu||{})[cu.Error=0]="Error",cu[cu.Overflow=1]="Overflow",cu[cu.Success=2]="Success",cu[cu.Underflow=3]="Underflow",cu),hu=((uu=hu||{})[uu.Previous=-1]="Previous",uu[uu.Next=1]="Next",uu),mu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(mu||{});var $u=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))($u||{});function gu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function wu(){return gu()||/Android/gi.test(window.navigator.userAgent)}function vu(e,t,n,o){let i=Kl(n);(0,r.useEffect)((()=>{if(e)return document.addEventListener(t,n,o),()=>document.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}function yu(e,t,n){let o=nu(e,"outside-click"),i=Kl(n),s=(0,r.useCallback)((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var n;return e!==(null==(n=Ul(e))?void 0:n.body)&&au(t,{0:()=>e.matches(lu),1(){let t=e;for(;null!==t;){if(t.matches(lu))return!0;t=t.parentElement}return!1}})}(r,mu.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),a=(0,r.useRef)(null);vu(o,"pointerdown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),vu(o,"mousedown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),vu(o,"click",(e=>{wu()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=(0,r.useRef)({x:0,y:0});vu(o,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),vu(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=30||Math.abs(n-l.current.y)>=30))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,o){let i=Kl((e=>s(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))));(0,r.useEffect)((()=>{if(e)return window.addEventListener(t,n,o),()=>window.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}(o,"blur",0,!0)}function bu(...e){return(0,r.useMemo)((()=>Ul(...e)),[...e])}function xu(e){let t=(0,r.useRef)({value:"",selectionStart:null,selectionEnd:null});return function(e,t,n,o){let i=Kl(n);(0,r.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}),[e,t,o])}(e,"blur",(e=>{let n=e.target;n instanceof HTMLInputElement&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})})),ql((()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:r}=t.current;null!==n&&null!==r&&e.setSelectionRange(n,r)}t.current={value:"",selectionStart:null,selectionEnd:null}}}))}function Su(e,t){return(0,r.useMemo)((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function _u(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function Eu(e){let t={};for(let n of e)Object.assign(t,n(t));return t}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0)),["textarea","input"].join(",");let Cu=Ql((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:jl(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Eu(n)},o=[gu()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=jl();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),s=e.querySelector(o);s&&!r(s)&&(i=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},_u(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Tu(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=eu(Cu),o=t?r.get(t):void 0;!!o&&o.count;Yl((()=>{if(t&&e)return Cu.dispatch("PUSH",t,n),()=>Cu.dispatch("POP",t,n)}),[e,t])}(nu(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}Cu.subscribe((()=>{let e=Cu.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Cu.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Cu.dispatch("TEARDOWN",n)}}));let ku=Symbol();function Iu(...e){let t=(0,r.useRef)(e);(0,r.useEffect)((()=>{t.current=e}),[e]);let n=ql((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[ku])))?void 0:n}function Au(e){return[e.screenX,e.screenY]}var Mu,Ru;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Mu=null==process?void 0:process.env)?void 0:Mu.NODE_ENV)&&void 0===(null==(Ru=null==Element?void 0:Element.prototype)?void 0:Ru.getAnimations)&&(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("\n")),[]});var Ou,Pu=((Ou=Pu||{})[Ou.None=0]="None",Ou[Ou.Closed=1]="Closed",Ou[Ou.Enter=2]="Enter",Ou[Ou.Leave=4]="Leave",Ou);function Nu(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function Du(e,t){let n=(0,r.useRef)([]),o=ql(e);(0,r.useEffect)((()=>{let e=[...n.current];for(let[r,i]of t.entries())if(n.current[r]!==i){let r=o(t,e);return n.current=t,r}}),[o,...t])}let Fu=(0,r.createContext)(void 0);function Lu(){return(0,r.useContext)(Fu)}const Bu=Math.min,Hu=Math.max,Vu=Math.round,Gu=Math.floor,Uu=e=>({x:e,y:e}),zu={left:"right",right:"left",bottom:"top",top:"bottom"},ju={start:"end",end:"start"};function Wu(e,t,n){return Hu(e,Bu(t,n))}function Yu(e,t){return"function"==typeof e?e(t):e}function Ku(e){return e.split("-")[0]}function qu(e){return e.split("-")[1]}function Zu(e){return"x"===e?"y":"x"}function Ju(e){return"y"===e?"height":"width"}function Xu(e){return["top","bottom"].includes(Ku(e))?"y":"x"}function Qu(e){return Zu(Xu(e))}function ec(e){return e.replace(/start|end/g,(e=>ju[e]))}function tc(e){return e.replace(/left|right|bottom|top/g,(e=>zu[e]))}function nc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function rc(){return"undefined"!=typeof window}function oc(e){return ac(e)?(e.nodeName||"").toLowerCase():"#document"}function ic(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sc(e){var t;return null==(t=(ac(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ac(e){return!!rc()&&(e instanceof Node||e instanceof ic(e).Node)}function lc(e){return!!rc()&&(e instanceof Element||e instanceof ic(e).Element)}function uc(e){return!!rc()&&(e instanceof HTMLElement||e instanceof ic(e).HTMLElement)}function cc(e){return!(!rc()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ic(e).ShadowRoot)}function dc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function fc(e){return["table","td","th"].includes(oc(e))}function pc(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function hc(e){const t=mc(),n=lc(e)?gc(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function mc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $c(e){return["html","body","#document"].includes(oc(e))}function gc(e){return ic(e).getComputedStyle(e)}function wc(e){return lc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vc(e){if("html"===oc(e))return e;const t=e.assignedSlot||e.parentNode||cc(e)&&e.host||sc(e);return cc(t)?t.host:t}function yc(e){const t=vc(e);return $c(t)?e.ownerDocument?e.ownerDocument.body:e.body:uc(t)&&dc(t)?t:yc(t)}function bc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=yc(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=ic(o);if(i){const e=xc(s);return t.concat(s,s.visualViewport||[],dc(o)?o:[],e&&n?bc(e):[])}return t.concat(o,bc(o,[],n))}function xc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sc(e,t,n){let{reference:r,floating:o}=e;const i=Xu(t),s=Qu(t),a=Ju(s),l=Ku(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(qu(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1)}return p}async function _c(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Yu(t,e),h=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[f?"floating"===d?"reference":"floating":d],$=nc(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},y=nc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:($.top-y.top+h.top)/v.y,bottom:(y.bottom-$.bottom+h.bottom)/v.y,left:($.left-y.left+h.left)/v.x,right:(y.right-$.right+h.right)/v.x}}function Ec(e){const t=gc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=uc(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Vu(n)!==i||Vu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Cc(e){return lc(e)?e:e.contextElement}function Tc(e){const t=Cc(e);if(!uc(t))return Uu(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ec(t);let s=(i?Vu(n.width):n.width)/r,a=(i?Vu(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const kc=Uu(0);function Ic(e){const t=ic(e);return mc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:kc}function Ac(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Cc(e);let s=Uu(1);t&&(r?lc(r)&&(s=Tc(r)):s=Tc(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ic(e))&&t}(i,n,r)?Ic(i):Uu(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const e=ic(i),t=r&&lc(r)?ic(r):r;let n=e,o=xc(n);for(;o&&r&&t!==n;){const e=Tc(o),t=o.getBoundingClientRect(),r=gc(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=s,n=ic(o),o=xc(n)}}return nc({width:c,height:d,x:l,y:u})}function Mc(e,t){const n=wc(e).scrollLeft;return t?t.left+n:Ac(sc(e)).left+n}function Rc(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Mc(e,r)),y:r.top+t.scrollTop}}function Oc(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ic(e),r=sc(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=mc();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=sc(e),n=wc(e),r=e.ownerDocument.body,o=Hu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Hu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Mc(e);const a=-n.scrollTop;return"rtl"===gc(r).direction&&(s+=Hu(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(sc(e));else if(lc(t))r=function(e,t){const n=Ac(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=uc(e)?Tc(e):Uu(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ic(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nc(r)}function Pc(e,t){const n=vc(e);return!(n===t||!lc(n)||$c(n))&&("fixed"===gc(n).position||Pc(n,t))}function Nc(e,t,n){const r=uc(t),o=sc(t),i="fixed"===n,s=Ac(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Uu(0);if(r||!r&&!i)if(("body"!==oc(t)||dc(o))&&(a=wc(t)),r){const e=Ac(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Mc(o));const u=!o||r||i?Uu(0):Rc(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function Dc(e){return"static"===gc(e).position}function Fc(e,t){if(!uc(e)||"fixed"===gc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return sc(e)===n&&(n=n.ownerDocument.body),n}function Lc(e,t){const n=ic(e);if(pc(e))return n;if(!uc(e)){let t=vc(e);for(;t&&!$c(t);){if(lc(t)&&!Dc(t))return t;t=vc(t)}return n}let r=Fc(e,t);for(;r&&fc(r)&&Dc(r);)r=Fc(r,t);return r&&$c(r)&&Dc(r)&&!hc(r)?n:r||function(e){let t=vc(e);for(;uc(t)&&!$c(t);){if(hc(t))return t;if(pc(t))return null;t=vc(t)}return null}(e)||n}const Bc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=sc(r),a=!!t&&pc(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Uu(1);const c=Uu(0),d=uc(r);if((d||!d&&!i)&&(("body"!==oc(r)||dc(s))&&(l=wc(r)),uc(r))){const e=Ac(r);u=Tc(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}const f=!s||d||i?Uu(0):Rc(s,l,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}},getDocumentElement:sc,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?pc(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=bc(e,[],!1).filter((e=>lc(e)&&"body"!==oc(e))),o=null;const i="fixed"===gc(e).position;let s=i?vc(e):e;for(;lc(s)&&!$c(s);){const t=gc(s),n=hc(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||dc(s)&&!n&&Pc(e,s))?r=r.filter((e=>e!==s)):o=t,s=vc(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=Oc(t,n,o);return e.top=Hu(r.top,e.top),e.right=Bu(r.right,e.right),e.bottom=Bu(r.bottom,e.bottom),e.left=Hu(r.left,e.left),e}),Oc(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Lc,getElementRects:async function(e){const t=this.getOffsetParent||Lc,n=this.getDimensions,r=await n(e.floating);return{reference:Nc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ec(e);return{width:t,height:n}},getScale:Tc,isElement:lc,isRTL:function(e){return"rtl"===gc(e).direction}};function Hc(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=Cc(e),c=o||i?[...u?bc(u):[],...bc(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const o=sc(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p={rootMargin:-Gu(c)+"px "+-Gu(o.clientWidth-(u+d))+"px "+-Gu(o.clientHeight-(c+f))+"px "+-Gu(u)+"px",threshold:Hu(0,Bu(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let m=l?Ac(e):null;return l&&function t(){const r=Ac(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Vc=_c,Gc=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Ku(n),a=qu(n),l="y"===Xu(n),u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,d=Yu(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Uc=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Yu(e,t),u={x:n,y:r},c=await _c(t,l),d=Xu(Ku(o)),f=Zu(d);let p=u[f],h=u[d];if(i){const e="y"===f?"bottom":"right";p=Wu(p+c["y"===f?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";h=Wu(h+c["y"===d?"top":"left"],h,h-c[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},zc=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...$}=Yu(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Ku(o),w=Xu(a),v=Ku(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=f||(v||!m?[tc(a)]:function(e){const t=tc(e);return[ec(e),t,ec(t)]}(a)),x="none"!==h;!f&&x&&b.push(...function(e,t,n,r){const o=qu(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(Ku(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ec)))),i}(a,m,h,y));const S=[a,...b],_=await _c(t,$),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(_[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=qu(e),o=Qu(e),i=Ju(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=tc(s)),[s,tc(s)]}(o,s,y);E.push(_[e[0]],_[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var T,k;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(k=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var I;const e=null==(I=C.filter((e=>{if(x){const t=Xu(e.placement);return t===w||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},jc=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Yu(e,t),c=await _c(t,u),d=Ku(o),f=qu(o),p="y"===Xu(o),{width:h,height:m}=i.floating;let $,g;"top"===d||"bottom"===d?($=d,g=f===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,$="end"===f?"top":"bottom");const w=m-c.top-c.bottom,v=h-c.left-c.right,y=Bu(m-c[$],w),b=Bu(h-c[g],v),x=!t.middlewareData.shift;let S=y,_=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=w),x&&!f){const e=Hu(c.left,0),t=Hu(c.right,0),n=Hu(c.top,0),r=Hu(c.bottom,0);p?_=h-2*(0!==e||0!==t?e+t:Hu(c.left,c.right)):S=m-2*(0!==n||0!==r?n+r:Hu(c.top,c.bottom))}await l({...t,availableWidth:_,availableHeight:S});const E=await s.getDimensions(a.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Wc=(e,t,n)=>{const r=new Map,o={platform:Bc,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Sc(u,r,l),f=r,p={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:$,y:g,data:w,reset:v}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=$?$:c,d=null!=g?g:d,p={...p,[i]:{...p[i],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(u=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:c,y:d}=Sc(u,f,l))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Yc="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Kc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Kc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Kc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function qc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zc(e,t){const n=qc(e);return Math.round(t*n)/n}function Jc(e){const t=r.useRef(e);return Yc((()=>{t.current=e})),t}const Xc=(e,t)=>({...Gc(e),options:[e,t]}),Qc=(e,t)=>({...zc(e),options:[e,t]}),ed=(e,t)=>({...jc(e),options:[e,t]}),td={...r},nd=td.useInsertionEffect||(e=>e());function rd(e){const t=r.useRef((()=>{}));return nd((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var od="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let id=!1,sd=0;const ad=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sd++,ld=td.useId||function(){const[e,t]=r.useState((()=>id?ad():void 0));return od((()=>{null==e&&t(ad())}),[]),r.useEffect((()=>{id=!0}),[]),e};const ud=r.createContext(null),cd=r.createContext(null),dd="data-floating-ui-focusable";function fd(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=ld(),s=r.useRef({}),[a]=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=((null==(h=r.useContext(ud))?void 0:h.id)||null),[u,c]=r.useState(o.reference),d=rd(((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=r.useMemo((()=>({setPositionReference:c})),[]),p=r.useMemo((()=>({reference:u||o.reference||null,floating:o.floating||null,domReference:o.reference})),[u,o.reference,o.floating]);var h;return r.useMemo((()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:f})),[t,d,p,a,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,a]=r.useState(null),[l,u]=r.useState(null),c=(null==i?void 0:i.domReference)||s,d=r.useRef(null),f=r.useContext(cd);od((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Kc(p,o)||h(o);const[m,$]=r.useState(null),[g,w]=r.useState(null),v=r.useCallback((e=>{e!==S.current&&(S.current=e,$(e))}),[]),y=r.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),b=s||m,x=a||g,S=r.useRef(null),_=r.useRef(null),E=r.useRef(d),C=null!=u,T=Jc(u),k=Jc(i),I=Jc(c),A=r.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Wc(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};M.current&&!Kc(E.current,t)&&(E.current=t,r.flushSync((()=>{f(t)})))}))}),[p,t,n,k,I]);Yc((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[c]);const M=r.useRef(!1);Yc((()=>(M.current=!0,()=>{M.current=!1})),[]),Yc((()=>{if(b&&(S.current=b),x&&(_.current=x),b&&x){if(T.current)return T.current(b,x,A);A()}}),[b,x,A,T,C]);const R=r.useMemo((()=>({reference:S,floating:_,setReference:v,setFloating:y})),[v,y]),O=r.useMemo((()=>({reference:b,floating:x})),[b,x]),P=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Zc(O.floating,d.x),r=Zc(O.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...qc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,O.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:A,refs:R,elements:O,floatingStyles:P})),[d,A,R,O,P])}({...e,elements:{...i,...l&&{reference:l}}}),h=r.useCallback((e=>{const t=lc(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)}),[p.refs]),m=r.useCallback((e=>{(lc(e)||null===e)&&(d.current=e,a(e)),(lc(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!lc(e))&&p.refs.setReference(e)}),[p.refs]),$=r.useMemo((()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d})),[p.refs,m,h]),g=r.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),w=r.useMemo((()=>({...p,...o,refs:$,elements:g,nodeId:t})),[p,$,g,t,o]);return od((()=>{o.dataRef.current.floatingContext=w;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),r.useMemo((()=>({...p,context:w,refs:$,elements:g})),[p,$,g,w])}const pd="active",hd="selected";function md(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[pd]:t,[hd]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[dd]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[pd,hd].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function $d(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let gd=(0,r.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});gd.displayName="FloatingContext";let wd=(0,r.createContext)(null);function vd({children:e,enabled:t=!0}){let[n,o]=(0,r.useState)(null),[i,s]=(0,r.useState)(0),a=(0,r.useRef)(null),[l,u]=(0,r.useState)(null);!function(e){Yl((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(l);let c=t&&null!==n&&null!==l,{to:d="bottom",gap:f=0,offset:p=0,padding:h=0,inner:m}=function(e,t){var n,r,o;let i=yd(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=yd(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=yd(null!=(o=null==e?void 0:e.padding)?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}(n,l),[$,g="center"]=d.split(" ");Yl((()=>{c&&s(0)}),[c]);let{refs:w,floatingStyles:v,context:y}=fd({open:c,placement:"selection"===$?"center"===g?"bottom":`bottom-${g}`:"center"===g?`${$}`:`${$}-${g}`,strategy:"absolute",transform:!1,middleware:[Xc({mainAxis:"selection"===$?0:f,crossAxis:p}),(S={padding:h},{...Uc(S),options:[S,_]}),"selection"!==$&&Qc({padding:h}),"selection"===$&&m?(E={...m,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,n;if(!e)return;let r=y.elements.floating;if(!r)return;let o=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,i=Math.min(4,r.childElementCount),a=0,l=0;for(let e of null!=(n=null==(t=y.elements.floating)?void 0:t.childNodes)?n:[])if(e instanceof HTMLElement){let t=e.offsetTop,n=t+e.clientHeight+o,s=r.scrollTop,u=s+r.clientHeight;if(!(t>=s&&n<=u)){l=Math.max(0,Math.min(n,u)-Math.max(t,s)),a=e.clientHeight;break}i--}i>=1&&s((e=>{let t=a*i-l+o;return e>=t?e:t}))}},{name:"inner",options:E,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Yu(E,e),{rects:d,elements:{floating:f}}=e,p=t.current[s],h=(null==u?void 0:u.current)||f,m=f.clientTop||h.clientTop,$=0!==f.clientTop,g=0!==h.clientTop,w=f===h;if(!p)return{};const v={...e,...await Xc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Vc($d(v,h.scrollHeight+m+f.clientTop),c),b=await Vc(v,{...c,elementContext:"reference"}),x=Hu(0,y.top),S=v.y+x,_=h.scrollHeight>h.clientHeight?e=>e:Vu,C=_(Hu(0,h.scrollHeight+($&&w||g?2*m:0)-x-Hu(0,y.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=x,o){const e=h.offsetHeight<p.offsetHeight*Bu(a,t.current.length)-1||b.top>=-l||b.bottom>=-l;r.flushSync((()=>o(e)))}return n&&(n.current=await Vc($d({...v,y:S},h.offsetHeight+m+f.clientTop),c)),{y:S}}}):null,ed({padding:h,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Hc}),[b=$,x=g]=y.placement.split("-");var S,_,E;"selection"===$&&(b="selection");let C=(0,r.useMemo)((()=>({anchor:[b,x].filter(Boolean).join(" ")})),[b,x]),T=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:s,scrollRef:a,onChange:l}=t,u=rd(l),c=r.useRef(!1),d=r.useRef(null),f=r.useRef(null);r.useEffect((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==s.current)return;const n=e.deltaY,o=s.current.top>=-.5,i=s.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,l=n<0?-1:1,c=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!o&&n>0||!i&&n<0?(e.preventDefault(),r.flushSync((()=>{u((e=>e+Math[c](n,a*l)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==a?void 0:a.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{d.current=t.scrollTop,null!=s.current&&(f.current={...s.current})})),()=>{d.current=null,f.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,o.floating,s,a,u]);const p=r.useMemo((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||o.floating;if(s.current&&e&&c.current){if(null!==d.current){const t=e.scrollTop-d.current;(s.current.bottom<-.5&&t<-1||s.current.top<-.5&&t>1)&&r.flushSync((()=>u((e=>e+t))))}requestAnimationFrame((()=>{d.current=e.scrollTop}))}}})),[o.floating,u,s,a]);return r.useMemo((()=>i?{floating:p}:{}),[i,p])}(y,{overflowRef:a,onChange:s}),{getReferenceProps:k,getFloatingProps:I}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),o=e.map((e=>null==e?void 0:e.item)),i=r.useCallback((t=>md(t,e,"reference")),t),s=r.useCallback((t=>md(t,e,"floating")),n),a=r.useCallback((t=>md(t,e,"item")),o);return r.useMemo((()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a})),[i,s,a])}([T]),A=ql((e=>{u(e),w.setFloating(e)}));return r.createElement(wd.Provider,{value:o},r.createElement(gd.Provider,{value:{setFloating:A,setReference:w.setReference,styles:v,getReferenceProps:k,getFloatingProps:I,slot:C}},e))}function yd(e,t,n=void 0){let o=Wl(),i=ql(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let r=xd(e,t);return[r,n=>{let i=bd(e);{let s=i.map((e=>window.getComputedStyle(t).getPropertyValue(e)));o.requestAnimationFrame((function a(){o.nextFrame(a);let l=!1;for(let[e,n]of i.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=xd(e,t);r!==u&&(n(u),r=u)}))}return o.dispose}]}return[n,null]})),s=(0,r.useMemo)((()=>i(e,t)[0]),[e,t]),[a=s,l]=(0,r.useState)();return Yl((()=>{let[n,r]=i(e,t);if(l(n),r)return r(l)}),[e,t]),a}function bd(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...bd(r)]:[n]}return[]}function xd(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Sd(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Ed(n,_d(t,r),o);return n}function _d(e,t){return e?e+"["+t+"]":t}function Ed(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Ed(e,_d(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):Sd(n,t,e)}function Cd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}wd.displayName="PlacementContext";var Td=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Td||{}),kd=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(kd||{});function Id(){let e=function(){let e=(0,r.useRef)([]),t=(0,r.useCallback)((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}();return(0,r.useCallback)((t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=null!=a?a:Md;let l=Rd(t,e);if(i)return Ad(l,n,r,s,a);let u=null!=o?o:0;if(2&u){let{static:e=!1,...t}=l;if(e)return Ad(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return au(e?0:1,{0:()=>null,1:()=>Ad({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return Ad(l,n,r,s,a)}({mergeRefs:e,...t})),[e])}function Ad(e,t={},n,o,i){let{as:s=n,children:a,refName:l="ref",...u}=Dd(e,["unmount","static"]),c=void 0!==e.ref?{[l]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){f["data-headlessui-state"]=n.join(" ");for(let e of n)f[`data-${e}`]=""}}if(s===r.Fragment&&(Object.keys(Nd(u)).length>0||Object.keys(Nd(f)).length>0)){if((0,r.isValidElement)(d)&&!(Array.isArray(d)&&d.length>1)){let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Cd(t(...e),u.className):Cd(t,u.className),o=n?{className:n}:{},s=Rd(d.props,Nd(Dd(u,["ref"])));for(let e in f)e in s&&delete f[e];return(0,r.cloneElement)(d,Object.assign({},s,f,c,{ref:i(Fd(d),c.ref)},o))}if(Object.keys(Nd(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Nd(u)).concat(Object.keys(Nd(f))).map((e=>` - ${e}`)).join("\n"),"","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((e=>` - ${e}`)).join("\n")].join("\n"))}return(0,r.createElement)(s,Object.assign({},Dd(u,["ref"]),s!==r.Fragment&&c,s!==r.Fragment&&f),d)}function Md(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Rd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Od(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)null==e||e(...t)}});return t}function Pd(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Nd(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Dd(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Fd(e){return r.default.version.split(".")[0]>="19"?e.props.ref:e.ref}var Ld=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ld||{});let Bd=Pd((function(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||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",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return Id()({ourProps:i,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})})),Hd=(0,r.createContext)(null);function Vd({children:e}){let t=(0,r.useContext)(Hd);if(!t)return r.default.createElement(r.default.Fragment,null,e);let{target:n}=t;return n?(0,r.createPortal)(r.default.createElement(r.default.Fragment,null,e),n):null}function Gd({data:e,form:t,disabled:n,onReset:o,overrides:i}){let[s,a]=(0,r.useState)(null),l=Wl();return(0,r.useEffect)((()=>{if(o&&s)return l.addEventListener(s,"reset",o)}),[s,t,o]),r.default.createElement(Vd,null,r.default.createElement(Ud,{setForm:a,formId:t}),Sd(e).map((([e,o])=>r.default.createElement(Bd,{features:Ld.Hidden,...Nd({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:o,...i})}))))}function Ud({setForm:e,formId:t}){return(0,r.useEffect)((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:r.default.createElement(Bd,{features:Ld.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function zd({children:e,freeze:t}){let n=jd(t,e);return r.default.createElement(r.default.Fragment,null,n)}function jd(e,t){let[n,o]=(0,r.useState)(t);return!e&&n!==t&&o(t),e?n:t}let Wd=(0,r.createContext)(void 0);function Yd(){return(0,r.useContext)(Wd)}let Kd=(0,r.createContext)(null);Kd.displayName="OpenClosedContext";var qd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qd||{});function Zd({value:e,children:t}){return r.default.createElement(Kd.Provider,{value:e},t)}let Jd=[];!function(){function e(){"loading"!==document.readyState&&((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Jd[0]===e.target)return;let t=e.target;t=t.closest(lu),Jd.unshift(null!=t?t:e.target),Jd=Jd.filter((e=>null!=e&&e.isConnected)),Jd.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",e))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",e),e())}();var Xd=(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))(Xd||{});function Qd(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===o&&(o=n.length);for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}let ef=(0,r.createContext)(null);function tf(){let e=(0,r.useContext)(ef);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,tf),e}return e}ef.displayName="DescriptionContext";let nf=Pd((function(e,t){let n=(0,r.useId)(),o=Lu(),{id:i=`headlessui-description-${n}`,...s}=e,a=tf(),l=Iu(t);Yl((()=>a.register(i)),[i,a.register]);let u=o||!1,c=(0,r.useMemo)((()=>({...a.slot,disabled:u})),[a.slot,u]),d={ref:l,...a.props,id:i};return Id()({ourProps:d,theirProps:s,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(nf,{});var rf=(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))(rf||{});let of=(0,r.createContext)(null);function sf(){let e=(0,r.useContext)(of);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,sf),e}return e}function af(e){var t,n,o;let i=null!=(n=null==(t=(0,r.useContext)(of))?void 0:t.value)?n:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[i,...e].filter(Boolean).join(" "):i}of.displayName="LabelContext";let lf=Pd((function(e,t){var n;let o=(0,r.useId)(),i=sf(),s=Yd(),a=Lu(),{id:l=`headlessui-label-${o}`,htmlFor:u=(null!=s?s:null==(n=i.props)?void 0:n.htmlFor),passive:c=!1,...d}=e,f=Iu(t);Yl((()=>i.register(l)),[l,i.register]);let p=ql((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,m=(0,r.useMemo)((()=>({...i.slot,disabled:h})),[i.slot,h]),$={ref:f,...i.props,id:l,htmlFor:u,onClick:p};return c&&("onClick"in $&&(delete $.htmlFor,delete $.onClick),"onClick"in d&&delete d.onClick),Id()({ourProps:$,theirProps:d,slot:m,defaultTag:u?"label":"div",name:i.name||"Label"})})),uf=Object.assign(lf,{});var cf,df=((cf=df||{})[cf.Left=0]="Left",cf[cf.Right=2]="Right",cf);let ff=(0,r.createContext)(!1);let pf=r.Fragment,hf=Pd((function(e,t){let n=e,o=(0,r.useRef)(null),i=Iu(function(e,t=!0){return Object.assign(e,{[ku]:t})}((e=>{o.current=e})),t),s=bu(o),a=function(e){let t=(0,r.useContext)(ff),n=(0,r.useContext)($f),o=bu(e),[i,s]=(0,r.useState)((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(Gl.isServer)return null;let r=null==o?void 0:o.getElementById("headlessui-portal-root");if(r)return r;if(null===o)return null;let i=o.createElement("div");return i.setAttribute("id","headlessui-portal-root"),o.body.appendChild(i)}));return(0,r.useEffect)((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),(0,r.useEffect)((()=>{t||null!==n&&s(n.current)}),[n,s,t]),i}(o),[l]=(0,r.useState)((()=>{var e;return Gl.isServer?null:null!=(e=null==s?void 0:s.createElement("div"))?e:null})),u=(0,r.useContext)(gf),c=function(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)(r)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=r.useState(Gl.isHandoffComplete);return t&&!1===Gl.isHandoffComplete&&n(!1),r.useEffect((()=>{!0!==t&&n(!0)}),[t]),r.useEffect((()=>Gl.handoff()),[]),!e&&t}();Yl((()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))}),[a,l]),Yl((()=>{if(l&&u)return u.register(l)}),[u,l]),function(e){let t=ql(e),n=(0,r.useRef)(!1);(0,r.useEffect)((()=>(n.current=!1,()=>{n.current=!0,zl((()=>{n.current&&t()}))})),[t])}((()=>{var e;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let d=Id();return c&&a&&l?(0,r.createPortal)(d({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:pf,name:"Portal"}),l):null})),mf=r.Fragment,$f=(0,r.createContext)(null),gf=(0,r.createContext)(null),wf=Pd((function(e,t){let n=Iu(t),{enabled:o=!0,...i}=e,s=Id();return o?r.default.createElement(hf,{...i,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:pf,name:"Portal"})})),vf=Pd((function(e,t){let{target:n,...o}=e,i={ref:Iu(t)},s=Id();return r.default.createElement($f.Provider,{value:n},s({ourProps:i,theirProps:o,defaultTag:mf,name:"Popover.Group"}))})),yf=Object.assign(wf,{Group:vf});var bf,xf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xf||{}),Sf=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Sf||{}),_f=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(_f||{}),Ef=((bf=Ef||{})[bf.OpenCombobox=0]="OpenCombobox",bf[bf.CloseCombobox=1]="CloseCombobox",bf[bf.GoToOption=2]="GoToOption",bf[bf.SetTyping=3]="SetTyping",bf[bf.RegisterOption=4]="RegisterOption",bf[bf.UnregisterOption=5]="UnregisterOption",bf[bf.SetActivationTrigger=6]="SetActivationTrigger",bf[bf.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",bf[bf.SetInputElement=8]="SetInputElement",bf[bf.SetButtonElement=9]="SetButtonElement",bf[bf.SetOptionsElement=10]="SetOptionsElement",bf);function Cf(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&null!==r[0].dataRef.current.order?r.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(r,(e=>e.dataRef.current.domRef.current)),i=n?o.indexOf(n):null;return-1===i&&(i=null),{options:o,activeOptionIndex:i}}let Tf={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,r,o,i;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&(null==(r=e.dataRef.current)||!r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,i=t.focus===Xd.Specific?t.idx:Qd(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,o;return null!=(o=null!=(t=e.activeOptionIndex)?t:n.findIndex((e=>!r(e))))?o:null},resolveDisabled:r,resolveId(){throw new Error("Function not implemented.")}}),s=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,activeOptionIndex:i,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=Cf(e);if(null===s.activeOptionIndex){let e=s.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(s.activeOptionIndex=e)}let a=t.focus===Xd.Specific?t.idx:Qd(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),l=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===a&&e.activationTrigger===l?e:{...e,...s,isTyping:!1,activeOptionIndex:a,activationTrigger:l,__demoMode:!1}},4:(e,t)=>{var n,r,o;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,s=Cf(e,(e=>(e.push(i),e)));null===e.activeOptionIndex&&null!=(r=e.dataRef.current)&&r.isSelected(t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let a={...e,...s,activationTrigger:2};return null!=(o=e.dataRef.current)&&o.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let r=Cf(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...r,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n,r;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let o=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o=-1!==n?n:null}return{...e,activeOptionIndex:o,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},kf=(0,r.createContext)(null);function If(e){let t=(0,r.useContext)(kf);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,If),t}return t}kf.displayName="ComboboxActionsContext";let Af=(0,r.createContext)(null);function Mf(e){let t=Of("VirtualProvider"),{options:n}=t.virtual,[o,i]=(0,r.useMemo)((()=>{let e=t.optionsElement;if(!e)return[0,0];let n=window.getComputedStyle(e);return[parseFloat(n.paddingBlockStart||n.paddingTop),parseFloat(n.paddingBlockEnd||n.paddingBottom)]}),[t.optionsElement]),s=(u={enabled:0!==n.length,scrollPaddingStart:o,scrollPaddingEnd:i,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.optionsElement,overscan:12},function(e){const t=r.useReducer((()=>({})),{})[1],n={...e,onChange:(n,o)=>{var i;o?(0,r.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[o]=r.useState((()=>new Fl(n)));return o.setOptions(n),r.useEffect((()=>o._didMount()),[]),Bl((()=>o._willUpdate())),o}({observeElementRect:Ml,observeElementOffset:Pl,scrollToFn:Dl,...u})),[a,l]=(0,r.useState)(0);var u;Yl((()=>{l((e=>e+1))}),[n]);let c=s.getVirtualItems();return 0===c.length?null:r.default.createElement(Af.Provider,{value:s},r.default.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&0!==t.activationTrigger&&null!==t.activeOptionIndex&&n.length>t.activeOptionIndex&&s.scrollToIndex(t.activeOptionIndex)}},c.map((t=>{var o;return r.default.createElement(r.Fragment,{key:t.key},r.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${a}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))}))))}let Rf=(0,r.createContext)(null);function Of(e){let t=(0,r.useContext)(Rf);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Of),t}return t}function Pf(e,t){return au(t.type,Tf,e,t)}Rf.displayName="ComboboxDataContext";let Nf=r.Fragment,Df=Td.RenderStrategy|Td.Static,Ff=Pd((function(e,t){var n,o;let i=Lu(),{value:s,defaultValue:a,onChange:l,form:u,name:c,by:d,disabled:f=i||!1,onClose:p,__demoMode:h=!1,multiple:m=!1,immediate:$=!1,virtual:g=null,nullable:w,...v}=e,y=function(e){let[t]=(0,r.useState)(e);return t}(a),[b=(m?[]:void 0),x]=function(e,t,n){let[o,i]=(0,r.useState)(n),s=void 0!==e,a=(0,r.useRef)(s),l=(0,r.useRef)(!1),u=(0,r.useRef)(!1);return!s||a.current||l.current?!s&&a.current&&!u.current&&(u.current=!0,a.current=s,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.")):(l.current=!0,a.current=s,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.")),[s?e:o,ql((e=>(s||i(e),null==t?void 0:t(e))))]}(s,l,y),[S,_]=(0,r.useReducer)(Pf,{dataRef:(0,r.createRef)(),comboboxState:h?0:1,isTyping:!1,options:[],virtual:g?{options:g.options,disabled:null!=(n=g.disabled)?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:h}),E=(0,r.useRef)(!1),C=(0,r.useRef)({static:!1,hold:!1}),T=function(e=Zl){return(0,r.useCallback)(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(d),k=ql((e=>g?null===d?g.options.indexOf(e):g.options.findIndex((t=>T(t,e))):S.options.findIndex((t=>T(t.dataRef.current.value,e))))),I=(0,r.useCallback)((e=>au(M.mode,{1:()=>b.some((t=>T(t,e))),0:()=>T(b,e)})),[b]),A=ql((e=>S.activeOptionIndex===k(e))),M=(0,r.useMemo)((()=>({...S,immediate:$,optionsPropsRef:C,value:b,defaultValue:y,disabled:f,mode:m?1:0,virtual:g?S.virtual:null,get activeOptionIndex(){if(E.current&&null===S.activeOptionIndex&&(g?g.options.length>0:S.options.length>0)){if(g){let e=g.options.findIndex((e=>{var t,n;return!(null!=(n=null==(t=g.disabled)?void 0:t.call(g,e))&&n)}));if(-1!==e)return e}let e=S.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return S.activeOptionIndex},calculateIndex:k,compare:T,isSelected:I,isActive:A})),[b,y,f,m,h,S,g]);Yl((()=>{var e;g&&_({type:7,options:g.options,disabled:null!=(e=g.disabled)?e:null})}),[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),Yl((()=>{S.dataRef.current=M}),[M]),yu(0===M.comboboxState,[M.buttonElement,M.inputElement,M.optionsElement],(()=>z.closeCombobox()));let R=(0,r.useMemo)((()=>{var e,t,n;return{open:0===M.comboboxState,disabled:f,activeIndex:M.activeOptionIndex,activeOption:null===M.activeOptionIndex?null:M.virtual?M.virtual.options[null!=(e=M.activeOptionIndex)?e:0]:null!=(n=null==(t=M.options[M.activeOptionIndex])?void 0:t.dataRef.current.value)?n:null,value:b}}),[M,f,b]),O=ql((()=>{if(null!==M.activeOptionIndex){if(z.setIsTyping(!1),M.virtual)B(M.virtual.options[M.activeOptionIndex]);else{let{dataRef:e}=M.options[M.activeOptionIndex];B(e.current.value)}z.goToOption(Xd.Specific,M.activeOptionIndex)}})),P=ql((()=>{_({type:0}),E.current=!0})),N=ql((()=>{_({type:1}),E.current=!1,null==p||p()})),D=ql((e=>{_({type:3,isTyping:e})})),F=ql(((e,t,n)=>(E.current=!1,e===Xd.Specific?_({type:2,focus:Xd.Specific,idx:t,trigger:n}):_({type:2,focus:e,trigger:n})))),L=ql(((e,t)=>(_({type:4,payload:{id:e,dataRef:t}}),()=>{M.isActive(t.current.value)&&(E.current=!0),_({type:5,id:e})}))),B=ql((e=>au(M.mode,{0:()=>null==x?void 0:x(e),1(){let t=M.value.slice(),n=t.findIndex((t=>T(t,e)));return-1===n?t.push(e):t.splice(n,1),null==x?void 0:x(t)}}))),H=ql((e=>{_({type:6,trigger:e})})),V=ql((e=>{_({type:8,element:e})})),G=ql((e=>{_({type:9,element:e})})),U=ql((e=>{_({type:10,element:e})})),z=(0,r.useMemo)((()=>({onChange:B,registerOption:L,goToOption:F,setIsTyping:D,closeCombobox:N,openCombobox:P,setActivationTrigger:H,selectActiveOption:O,setInputElement:V,setButtonElement:G,setOptionsElement:U})),[]),[j,W]=function({inherit:e=!1}={}){let t=af(),[n,o]=(0,r.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,r.useMemo)((()=>function(e){let t=ql((e=>(o((t=>[...t,e])),()=>o((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=(0,r.useMemo)((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return r.default.createElement(of.Provider,{value:n},e.children)}),[o])]}(),Y=null===t?{}:{ref:t},K=(0,r.useCallback)((()=>{if(void 0!==y)return null==x?void 0:x(y)}),[x,y]),q=Id();return r.default.createElement(W,{value:j,props:{htmlFor:null==(o=M.inputElement)?void 0:o.id},slot:{open:0===M.comboboxState,disabled:f}},r.default.createElement(vd,null,r.default.createElement(kf.Provider,{value:z},r.default.createElement(Rf.Provider,{value:M},r.default.createElement(Zd,{value:au(M.comboboxState,{0:qd.Open,1:qd.Closed})},null!=c&&r.default.createElement(Gd,{disabled:f,data:null!=b?{[c]:b}:{},form:u,onReset:K}),q({ourProps:Y,theirProps:v,slot:R,defaultTag:Nf,name:"Combobox"}))))))})),Lf=Pd((function(e,t){var n;let o=Of("Combobox.Button"),i=If("Combobox.Button"),s=Iu(t,i.setButtonElement),a=(0,r.useId)(),{id:l=`headlessui-combobox-button-${a}`,disabled:u=o.disabled||!1,autoFocus:c=!1,...d}=e,f=xu(o.inputElement),p=ql((e=>{switch(e.key){case rf.Space:case rf.Enter:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&(0,r.flushSync)((()=>i.openCombobox())),void f();case rf.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Xd.First)),void f();case rf.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Xd.Last)),void f();case rf.Escape:if(0!==o.comboboxState)return;return e.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,r.flushSync)((()=>i.closeCombobox())),void f();default:return}})),h=ql((e=>{e.preventDefault(),!function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}(e.currentTarget)&&(e.button===df.Left&&(0===o.comboboxState?i.closeCombobox():i.openCombobox()),f())})),m=af([l]),{isFocusVisible:$,focusProps:g}=vl({autoFocus:c}),{isHovered:w,hoverProps:v}=El({isDisabled:u}),{pressed:y,pressProps:b}=function({disabled:e=!1}={}){let t=(0,r.useRef)(null),[n,o]=(0,r.useState)(!1),i=Wl(),s=ql((()=>{t.current=null,o(!1),i.dispose()})),a=ql((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,o(!0);{let n=Ul(e.currentTarget);i.addEventListener(n,"pointerup",s,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);o(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",s,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:a,onPointerUp:s,onClick:s}}}({disabled:u}),x=(0,r.useMemo)((()=>({open:0===o.comboboxState,active:y||0===o.comboboxState,disabled:u,value:o.value,hover:w,focus:$})),[o,w,$,y,u]),S=Od({ref:s,id:l,type:Su(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(n=o.optionsElement)?void 0:n.id,"aria-expanded":0===o.comboboxState,"aria-labelledby":m,disabled:u||void 0,autoFocus:c,onMouseDown:h,onKeyDown:p},g,v,b);return Id()({ourProps:S,theirProps:d,slot:x,defaultTag:"button",name:"Combobox.Button"})})),Bf=Pd((function(e,t){var n,o,i,s,a;let l=Of("Combobox.Input"),u=If("Combobox.Input"),c=(0,r.useId)(),d=Yd(),{id:f=d||`headlessui-combobox-input-${c}`,onChange:p,displayValue:h,disabled:m=l.disabled||!1,autoFocus:$=!1,type:g="text",...w}=e,v=(0,r.useRef)(null),y=Iu(v,t,(0,r.useContext)(gd).setReference,u.setInputElement),b=bu(l.inputElement),x=Wl(),S=ql((()=>{u.onChange(null),l.optionsElement&&(l.optionsElement.scrollTop=0),u.goToOption(Xd.Nothing)})),_=(0,r.useMemo)((()=>{var e;return"function"==typeof h&&void 0!==l.value?null!=(e=h(l.value))?e:"":"string"==typeof l.value?l.value:""}),[l.value,h]);Du((([e,t],[n,r])=>{if(l.isTyping)return;let o=v.current;o&&((0===r&&1===t||e!==n)&&(o.value=e),requestAnimationFrame((()=>{if(l.isTyping||!o||(null==b?void 0:b.activeElement)!==o)return;let{selectionStart:e,selectionEnd:t}=o;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&o.setSelectionRange(o.value.length,o.value.length)})))}),[_,l.comboboxState,b,l.isTyping]),Du((([e],[t])=>{if(0===e&&1===t){if(l.isTyping)return;let e=v.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:o}=e;e.value="",e.value=t,null!==o?e.setSelectionRange(n,r,o):e.setSelectionRange(n,r)}}),[l.comboboxState]);let E=(0,r.useRef)(!1),C=ql((()=>{E.current=!0})),T=ql((()=>{x.nextFrame((()=>{E.current=!1}))})),k=ql((e=>{switch(u.setIsTyping(!0),e.key){case rf.Enter:if(0!==l.comboboxState||E.current)return;if(e.preventDefault(),e.stopPropagation(),null===l.activeOptionIndex)return void u.closeCombobox();u.selectActiveOption(),0===l.mode&&u.closeCombobox();break;case rf.ArrowDown:return e.preventDefault(),e.stopPropagation(),au(l.comboboxState,{0:()=>u.goToOption(Xd.Next),1:()=>u.openCombobox()});case rf.ArrowUp:return e.preventDefault(),e.stopPropagation(),au(l.comboboxState,{0:()=>u.goToOption(Xd.Previous),1:()=>{(0,r.flushSync)((()=>u.openCombobox())),l.value||u.goToOption(Xd.Last)}});case rf.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Xd.First);case rf.PageUp:return e.preventDefault(),e.stopPropagation(),u.goToOption(Xd.First);case rf.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Xd.Last);case rf.PageDown:return e.preventDefault(),e.stopPropagation(),u.goToOption(Xd.Last);case rf.Escape:return 0!==l.comboboxState?void 0:(e.preventDefault(),l.optionsElement&&!l.optionsPropsRef.current.static&&e.stopPropagation(),0===l.mode&&null===l.value&&S(),u.closeCombobox());case rf.Tab:if(0!==l.comboboxState)return;0===l.mode&&1!==l.activationTrigger&&u.selectActiveOption(),u.closeCombobox()}})),I=ql((e=>{null==p||p(e),0===l.mode&&""===e.target.value&&S(),u.openCombobox()})),A=ql((e=>{var t,n,r;let o=null!=(t=e.relatedTarget)?t:Jd.find((t=>t!==e.currentTarget));if(!(null!=(n=l.optionsElement)&&n.contains(o)||null!=(r=l.buttonElement)&&r.contains(o)||0!==l.comboboxState))return e.preventDefault(),0===l.mode&&null===l.value&&S(),u.closeCombobox()})),M=ql((e=>{var t,n,o;let i=null!=(t=e.relatedTarget)?t:Jd.find((t=>t!==e.currentTarget));null!=(n=l.buttonElement)&&n.contains(i)||null!=(o=l.optionsElement)&&o.contains(i)||l.disabled||l.immediate&&0!==l.comboboxState&&x.microTask((()=>{(0,r.flushSync)((()=>u.openCombobox())),u.setActivationTrigger(1)}))})),R=af(),O=function(){var e,t;return null!=(t=null==(e=(0,r.useContext)(ef))?void 0:e.value)?t:void 0}(),{isFocused:P,focusProps:N}=vl({autoFocus:$}),{isHovered:D,hoverProps:F}=El({isDisabled:m}),L=(0,r.useMemo)((()=>({open:0===l.comboboxState,disabled:m,hover:D,focus:P,autofocus:$})),[l,D,P,$,m]),B=Od({ref:y,id:f,role:"combobox",type:g,"aria-controls":null==(n=l.optionsElement)?void 0:n.id,"aria-expanded":0===l.comboboxState,"aria-activedescendant":null===l.activeOptionIndex?void 0:l.virtual?null==(o=l.options.find((e=>!e.dataRef.current.disabled&&l.compare(e.dataRef.current.value,l.virtual.options[l.activeOptionIndex]))))?void 0:o.id:null==(i=l.options[l.activeOptionIndex])?void 0:i.id,"aria-labelledby":R,"aria-describedby":O,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(s=e.defaultValue)?s:void 0!==l.defaultValue?null==h?void 0:h(l.defaultValue):null)?a:l.defaultValue,disabled:m||void 0,autoFocus:$,onCompositionStart:C,onCompositionEnd:T,onKeyDown:k,onChange:I,onFocus:M,onBlur:A},N,F);return Id()({ourProps:B,theirProps:w,slot:L,defaultTag:"input",name:"Combobox.Input"})})),Hf=uf,Vf=Pd((function(e,t){var n,o,i;let s=(0,r.useId)(),{id:a=`headlessui-combobox-options-${s}`,hold:l=!1,anchor:u,portal:c=!1,modal:d=!0,transition:f=!1,...p}=e,h=Of("Combobox.Options"),m=If("Combobox.Options"),$=function(e){return(0,r.useMemo)((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(u);$&&(c=!0);let[g,w]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,r.useContext)(wd),n=(0,r.useMemo)((()=>e),[JSON.stringify(e,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);Yl((()=>{null==t||t(null!=n?n:null)}),[t,n]);let o=(0,r.useContext)(gd);return(0,r.useMemo)((()=>[o.setFloating,e?o.styles:{}]),[o.setFloating,e,o.styles])}($),[v,y]=(0,r.useState)(null),b=function(){let{getFloatingProps:e,slot:t}=(0,r.useContext)(gd);return(0,r.useCallback)(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),x=Iu(t,$?g:null,m.setOptionsElement,y),S=bu(h.optionsElement),_=(0,r.useContext)(Kd),[E,C]=function(e,t,n,o){let[i,s]=(0,r.useState)(n),{hasFlag:a,addFlag:l,removeFlag:u}=function(e=0){let[t,n]=(0,r.useState)(e),o=(0,r.useCallback)((e=>n(e)),[t]),i=(0,r.useCallback)((e=>n((t=>t|e))),[t]),s=(0,r.useCallback)((e=>(t&e)===e),[t]),a=(0,r.useCallback)((e=>n((t=>t&~e))),[n]),l=(0,r.useCallback)((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:o,addFlag:i,hasFlag:s,removeFlag:a,toggleFlag:l}}(e&&i?3:0),c=(0,r.useRef)(!1),d=(0,r.useRef)(!1),f=Wl();return Yl((()=>{var r;if(e)return n&&s(!0),t?(null==(r=null==o?void 0:o.start)||r.call(o,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=jl();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),i.nextFrame((()=>{n(),i.requestAnimationFrame((()=>{i.add(function(e,t){var n,r;let o=jl();if(!e)return o.dispose;let i=!1;o.add((()=>{i=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),o.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{i||t()})),o.dispose)}(e,r))}))})),i.dispose}(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(l(3),u(4)):(l(4),u(2)))},run(){d.current?n?(u(3),l(4)):(u(4),l(3)):n?u(1):l(1)},done(){var e;d.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,u(7),n||s(!1),null==(e=null==o?void 0:o.end)||e.call(o,n))}})):void(n&&l(3))}),[e,n,t,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(f,v,null!==_?(_&qd.Open)===qd.Open:0===h.comboboxState);!function(e,t,n){let o=Kl((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));(0,r.useEffect)((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let r=jl();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}return()=>r.dispose()}),[t,o,e])}(E,h.inputElement,m.closeCombobox),Tu(!h.__demoMode&&d&&0===h.comboboxState,S),su(!h.__demoMode&&d&&0===h.comboboxState,{allowed:(0,r.useCallback)((()=>[h.inputElement,h.buttonElement,h.optionsElement]),[h.inputElement,h.buttonElement,h.optionsElement])}),Yl((()=>{var t;h.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[h.optionsPropsRef,e.static]),Yl((()=>{h.optionsPropsRef.current.hold=l}),[h.optionsPropsRef,l]),function(e,{container:t,accept:n,walk:o}){let i=(0,r.useRef)(n),s=(0,r.useRef)(o);(0,r.useEffect)((()=>{i.current=n,s.current=o}),[n,o]),Yl((()=>{if(!t||!e)return;let n=Ul(t);if(!n)return;let r=i.current,o=s.current,a=Object.assign((e=>r(e)),{acceptNode:r}),l=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)o(l.currentNode)}),[t,e,i,s])}(0===h.comboboxState,{container:h.optionsElement,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=af([null==(n=h.buttonElement)?void 0:n.id]),k=(0,r.useMemo)((()=>({open:0===h.comboboxState,option:void 0})),[h.comboboxState]),I=ql((()=>{m.setActivationTrigger(0)})),A=ql((e=>{e.preventDefault(),m.setActivationTrigger(0)})),M=Od($?b():{},{"aria-labelledby":T,role:"listbox","aria-multiselectable":1===h.mode||void 0,id:a,ref:x,style:{...p.style,...w,"--input-width":Jl(h.inputElement,!0).width,"--button-width":Jl(h.buttonElement,!0).width},onWheel:0===h.activationTrigger?void 0:I,onMouseDown:A,...Nu(C)}),R=E&&1===h.comboboxState,O=jd(R,null==(o=h.virtual)?void 0:o.options),P=jd(R,h.value),N=ql((e=>h.compare(P,e)));if(h.virtual){if(void 0===O)throw new Error("Missing `options` in virtual mode");Object.assign(p,{children:r.default.createElement(Rf.Provider,{value:O!==h.virtual.options?{...h,virtual:{...h.virtual,options:O}}:h},r.default.createElement(Mf,{slot:k},p.children))})}let D=Id();return r.default.createElement(yf,{enabled:!!c&&(e.static||E)},r.default.createElement(Rf.Provider,{value:1===h.mode?h:{...h,isSelected:N}},D({ourProps:M,theirProps:{...p,children:r.default.createElement(zd,{freeze:R},"function"==typeof p.children?null==(i=p.children)?void 0:i.call(p,k):p.children)},slot:k,defaultTag:"div",features:Df,visible:E,name:"Combobox.Options"})))})),Gf=Pd((function(e,t){var n,o,i,s;let a=Of("Combobox.Option"),l=If("Combobox.Option"),u=(0,r.useId)(),{id:c=`headlessui-combobox-option-${u}`,value:d,disabled:f=null!=(i=null==(o=null==(n=a.virtual)?void 0:n.disabled)?void 0:o.call(n,d))&&i,order:p=null,...h}=e,m=xu(a.inputElement),$=a.virtual?a.activeOptionIndex===a.calculateIndex(d):null!==a.activeOptionIndex&&(null==(s=a.options[a.activeOptionIndex])?void 0:s.id)===c,g=a.isSelected(d),w=(0,r.useRef)(null),v=Kl({disabled:f,value:d,domRef:w,order:p}),y=(0,r.useContext)(Af),b=Iu(t,w,y?y.measureElement:null),x=ql((()=>{l.setIsTyping(!1),l.onChange(d)}));Yl((()=>l.registerOption(c,v)),[v,c]);let S=(0,r.useRef)(!(a.virtual||a.__demoMode));Yl((()=>{if(!a.virtual&&!a.__demoMode)return jl().requestAnimationFrame((()=>{S.current=!0}))}),[a.virtual,a.__demoMode]),Yl((()=>{if(S.current&&0===a.comboboxState&&$&&0!==a.activationTrigger)return jl().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=w.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[w,$,a.comboboxState,a.activationTrigger,a.activeOptionIndex]);let _=ql((e=>{e.preventDefault(),e.button===df.Left&&(f||(x(),wu()||requestAnimationFrame((()=>m())),0===a.mode&&l.closeCombobox()))})),E=ql((()=>{if(f)return l.goToOption(Xd.Nothing);let e=a.calculateIndex(d);l.goToOption(Xd.Specific,e)})),C=function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=Au(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=Au(t)}}}(),T=ql((e=>C.update(e))),k=ql((e=>{if(!C.wasMoved(e)||f||$)return;let t=a.calculateIndex(d);l.goToOption(Xd.Specific,t,0)})),I=ql((e=>{C.wasMoved(e)&&(f||$&&(a.optionsPropsRef.current.hold||l.goToOption(Xd.Nothing)))})),A=(0,r.useMemo)((()=>({active:$,focus:$,selected:g,disabled:f})),[$,g,f]),M={id:c,ref:b,role:"option",tabIndex:!0===f?void 0:-1,"aria-disabled":!0===f||void 0,"aria-selected":g,disabled:void 0,onMouseDown:_,onFocus:E,onPointerEnter:T,onMouseEnter:T,onPointerMove:k,onMouseMove:k,onPointerLeave:I,onMouseLeave:I};return Id()({ourProps:M,theirProps:h,slot:A,defaultTag:"div",name:"Combobox.Option"})})),Uf=Object.assign(Ff,{Input:Bf,Button:Lf,Label:Hf,Options:Vf,Option:Gf});class zf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Value","OnChange","Children"]}}class jf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["DisplayValue","OnChange","ClassName","AutoComplete"]}}function Wf(e){const t=_i(e,1);return r.createElement(Uf.Input,t)}class Yf extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["ClassName"]}}function Kf(e,t){const n=_i(e,1);return r.createElement(Uf.Options,n,...t)}class qf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ClassName","Children"]}}function Zf(e){const t=_i(e,1);return r.createElement(Uf.Button,t)}class Jf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Key","Value","ClassName","Children"]}}class Xf extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetResidencyStatusRadioBox","SetCountry"]}}class Qf extends me{constructor(e){super(),this.ResidencyStatus=e}}function ep(e){return function(e){let t,n;switch(null==e?t=2:2===e.tag?(t=1,n=e.fields[0]):t=0,t){case 0:return!0;case 1:return null!=n.HomeCountry;default:return!1}}(e)?Us(e):zs(e)}function tp(e){return new Qf(ep(e.ResidencyStatus.Value))}function np(e,t,n){let o,i;const s=_t.useState(""),a=e=>{let t,n;return Ue((n=Li(e),t=1===n.tag?void 0:n.fields[0],null==t?void 0:t.Name),"")};let l;const u=He(s[0]);let c,d;return null!=u?""===u?c=0:(c=1,d=u):c=0,0===c?l=t:l=function(e,t){return ir(e.comparer,Yn(e.comparer,t,e.tree))}(t,((e,t)=>{const n=e=>{return(t=e,t.replace(new RegExp(de(" "),"g"),"")).toLocaleLowerCase();var t},r=n(t),o=n(d);return r.indexOf(o)>=0})),function(e){const t=_i(e,1);return r.createElement(Uf,t)}(vt([new zf(0,[a(e)]),new zf(1,[n]),new zf(2,[[(0,r.createElement)("div",I(vt([["className","relative mt-1"],(o=[(0,r.createElement)("div",I(vt([["className","relative w-full cursor-default overflow-hidden focus:outline-none focus:border-primary-focus"],(i=[Wf(vt([new jf(0,[a(e)]),new jf(2,["block w-full pr-10 focus:outline-none text-base sm:text-sm rounded-md border-gray-300 focus:border-primary-focus shadow-none focus:ring-0"]),new jf(1,[e=>{s[1](e.target.value)}]),new jf(3,["off"])])),Zf(vt([new qf(0,["absolute inset-y-0 right-0 flex items-center pr-2"]),new qf(1,[[Mt]])]))],["children",_t.Children.toArray(Array.from(i))])]))),Kf(ct(new Yf("absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50")),Kt(Ut((()=>Jt(0===ar(l)?Wt((0,r.createElement)("div",{className:"relative cursor-default select-none py-2 px-4 text-gray-700",children:_t.Children.toArray(["Nothing found"])})):jt(),Ut((()=>sn((e=>{const t=e,n=t[0];return Wt(function(e){const t=_i(e,1);return r.createElement(Uf.Option,t)}(vt([new Jf(0,[n]),new Jf(1,[n]),new Jf(2,["relative cursor-default select-none"]),new Jf(3,[e=>[(0,r.createElement)("span",{className:"py-2 pl-2 pr-4 block truncate "+(e.active||e.selected?"bg-primary-base":"bg-white text-black"),children:t[1]})]])])))}),l))))))))],["children",_t.Children.toArray(Array.from(o))])])))]])]))}function rp(e){let t,n;const o=(i=e.InitialValue,[tp(new Qf(zs(i))),oa()]);var i;n=ka((()=>ya((()=>o),((t,n)=>function(e,t){const n=function(e){let t;if(1===e.tag){let t;const n=Li(Ue(e.fields[0].Value,""));return t=1===n.tag?void 0:n.fields[0],tp(new Qf(zs(null==t?Hi:Vi(t))))}return tp(new Qf(zs((t=e.fields[0].Value,null==t?void 0:function(e){switch(e){case"AustralianResidentForTaxPurposes":return new Bi(0,[]);case"ForeignResidentForTaxPurposes":return new Bi(1,[]);case"WorkingHolidayMaker":return Hi;default:return}}(t)))))}(t);return e(n.ResidencyStatus),[n,oa()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",I(ct((t=Kt(Ut((()=>Jt(Wt(Ks("Are you an Australian resident for tax purposes or a working holiday maker?")),Ut((()=>{let e,t;return Jt(Wt((0,r.createElement)(Ma,(e=bt((e=>[js(e[0]),e[1],e[2]]),vt([[new Bi(0,[]),"Australian resident for tax purposes",void 0],[new Bi(1,[]),"Foreign resident",void 0],[new Bi(2,[{}]),"Working holiday maker",void 0]])),{InitialValue:Le((t=s.ResidencyStatus.Value,null==t?void 0:js(t))),Name:"ResidencyStatus",OnUpdate:e=>{a(new Xf(0,[e]))},ValueLabelPairs:e}))),Ut((()=>{let e,t;const n=s.ResidencyStatus.Value;let o,i;return null!=n&&2===n.tag?(o=0,i=n.fields[0]):o=1,Wt(0===o?(0,r.createElement)("div",I(vt([["className",Ie(" ",["mt-4"])],(e=[Ks("Your home country where your visa was issued"),np(Ue((t=i.HomeCountry,null==t?void 0:t.Code),""),Ni,(e=>{a(new Xf(1,[Us(e)]))}))],["children",_t.Children.toArray(Array.from(e))])]))):null)})))})))))),["children",_t.Children.toArray(Array.from(t))]))))}class op extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetTfnInformation","SetPreviousSurname","SetResidencyStatus","SetClaimTaxFreeThreshold","SetDebtSupport","SetEmploymentBasis","GetData","ShowAlert","HideAlert","Saved","AppReady"]}}class ip extends me{constructor(e,t,n,r,o,i,s,a){super(),this.PreExistingTfnDec=e,this.CurrentAlert=t,this.TfnInformation=n,this.PreviousSurname=r,this.ResidencyStatus=o,this.ClaimTaxFreeThreshold=i,this.DebtSupportCheckboxGroup=s,this.EmploymentBasisRadioButtonGroup=a}}function sp(e){return 3===e.tag?Gs():Us(e)}class ap extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Web","WebComponent"]}}function lp(){const e=function(e,t,n){return function(e,t,n,r,o){const i=0|Ue(n,0),s=0|Ue(ze((e=>i+e),r),e.length);return 0|(n=>{for(;;){const r=n;if(r>=s)return-1;if(o.Equals(t,Je(r,e)))return 0|r;n=r+1}})(i)}(t,"web",void 0,void 0,n)>=0}(0,Re(document.URL,["/"],void 0,0),{Equals:(e,t)=>e===t,GetHashCode:w}),t=He(document.querySelector("tax-component"));return null==t?e?new br(0,[new ap(0,[])]):new br(1,["Could not determine the embed mode"]):new br(0,[new ap(1,[t])])}class up extends he{constructor(){super(),this.tag=0,this.fields=[]}cases(){return["SuccessRedirectionUrl"]}}function cp(e){return pe(e)}function dp(){return[new ip(new xn(0,[]),void 0,Gs(),Us(void 0),Us(new Bi(0,[])),Qs(new Zs(0,[])),Us(void 0),Us(new Gi(0,[]))),oa()]}function fp(e,t){let n;switch(e.tag){case 1:return[new ip(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,e.fields[0],t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),oa()];case 2:{const r=e.fields[0];return[new ip(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,r,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),(n=r.Value,null==n?oa():1===n.tag?ct((e=>{e(new op(3,[new Js(1,[new Zs(1,[]),!1])]))})):2===n.tag?ct((e=>{e(new op(3,[new Js(1,[new Zs(1,[]),!0])]))})):ct((e=>{e(new op(3,[new Js(1,[new Zs(0,[]),!1])]))})))]}case 3:return[new ip(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,ea(e.fields[0],t.ClaimTaxFreeThreshold),t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),oa()];case 4:return[new ip(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,e.fields[0],t.EmploymentBasisRadioButtonGroup),oa()];case 5:{const n=(r=Ys,null!=(o=e.fields[0].Value)?r(Fe(o)):void 0);return[new ip(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,new Vs(n,{Valid:null!=n})),oa()]}case 6:{const n=e.fields[0],r=new ip(n,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),o=ct((e=>{e(new op(7,[new Ds(1,["There was an error loading your tax declaration. Please try refreshing this page."])]))}));!function(){let e,t;const n=He(document.getElementById("external-loading-page-container"));tn((t=document.body,e=e=>t.removeChild(e),t=>{e(t)}),Ge(n))}();const i=ct((e=>{e(new op(10,[]))}));switch(n.tag){case 2:if(1===n.fields[0].tag)return[r,o];{const e=ze((e=>function(e,t){let n;if(0===t.tag){const o=t.fields[0];let i;const s=o.TfnInformation;if(1===s.tag){const e=function(e){switch(e){case 0:return new br(0,[new zi(0,[])]);case 1:return new br(0,[new zi(1,[])]);case 2:return new br(0,[new zi(2,[])]);default:return new br(1,["Invalid ExemptionReason"])}}(s.fields[0]);i=1===e.tag?new br(1,[e.fields[0]]):new br(0,[new Pa(1,[new Oa(1,[e.fields[0]])])])}else i=new br(0,[new Pa(0,[s.fields[0]])]);if(1===i.tag)return new br(1,[i.fields[0]]);{const t=Ji(o.ResidencyStatusV2);if(1===t.tag)return new br(1,[t.fields[0]]);{const s=t.fields[0],a=1===s.tag||2===s.tag?new Zs(1,[]):o.IsTaxFreeThresholdClaimed?new Zs(0,[]):new Zs(1,[]),l=ts(o.HasDebtSupport);if(1===l.tag)return new br(1,[l.fields[0]]);{const t=l.fields[0],u=Xi(o.EmploymentBasis);return 1===u.tag?new br(1,[u.fields[0]]):new br(0,[new ip(e.PreExistingTfnDec,e.CurrentAlert,Us(i.fields[0]),Us((n=o.PreviousSurname,null==n?void 0:(r=n,new ji(r)))),ep(s),Qs(a),dt(t)?Us(void 0):Us(t),sp(u.fields[0]))])}}}}{const n=t.fields[0];let r,o;const i=n.ResidencyStatusV2;if(o=null==i?void 0:Ji(i),null!=o){const e=o;r=1===e.tag?new br(1,[e.fields[0]]):new br(0,[e.fields[0]])}else r=new br(0,[void 0]);if(1===r.tag)return new br(1,[r.fields[0]]);{const t=Xi(n.EmploymentBasis);return 1===t.tag?new br(1,[t.fields[0]]):new br(0,[new ip(e.PreExistingTfnDec,e.CurrentAlert,e.TfnInformation,e.PreviousSurname,ep(r.fields[0]),e.ClaimTaxFreeThreshold,e.DebtSupportCheckboxGroup,sp(t.fields[0]))])}}var r}(r,e)),n.fields[0].fields[0].Info);if(null==e)return[r,i];{const t=e;return 0===t.tag?[t.fields[0],i]:[r,o]}}case 3:return[r,o];default:return[r,i]}}case 7:return[new ip(t.PreExistingTfnDec,e.fields[0],t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),oa()];case 8:return[new ip(t.PreExistingTfnDec,void 0,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),oa()];case 9:return[new ip(new xn(2,[new br(0,[e.fields[0]])]),t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),oa()];case 10:return function(){const e=lp();let t;t=0===e.tag&&0===e.fields[0].tag?0:1,0===t&&window.parent.postMessage({sender:"flare",type:"appReady"},"*",Be(lt()))}(),[t,oa()];default:return[new ip(t.PreExistingTfnDec,t.CurrentAlert,e.fields[0],t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),oa()]}var r,o}class pp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetText","SetTouched"]}}class hp extends me{constructor(e,t){super(),this.Text=e,this.Meta=t}}class mp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Number","Text"]}}function $p(e){let t,n;const o=function(e,t){const n=Ue(e,"");return[new hp(n,{Touched:!1,Valid:t(n)}),oa()]}(e.InitialValue,e.Validator);n=ka((()=>ya((()=>o),((t,n)=>function(e,t,n,r){const o=function(e,t,n){if(1===t.tag)return new hp(n.Text,{Touched:!0,Valid:n.Meta.Valid});{const r=t.fields[0];return new hp(r,{Touched:n.Meta.Touched,Valid:e(r)})}}(t,n,r);return e(new Vs(o.Text,{Valid:o.Meta.Valid})),[o,oa()]}(e.OnUpdate,e.Validator,t,n)),((e,t)=>{}))),void 0,void 0);const i=n[0],s=n[1];return(0,r.createElement)("div",I(vt([["className",Ie(" ",yt(e.AdditionalWrapperClasses,ct("z-10")))],(t=Kt(Ut((()=>Jt(Wt((0,r.createElement)("input",I(Kt(Ut((()=>Jt(Wt(["className",Ie(" ",yt(e.AdditionalInputClasses,yt(vt(["block","w-full","pr-10","focus:outline-none","text-base","sm:text-sm","rounded-md","border-gray-300"]),Kt(Ut((()=>!i.Meta.Valid&&i.Meta.Touched?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:jt()))))))]),Ut((()=>Jt(Wt(["type","text"]),Ut((()=>Jt(Wt(["onChange",t=>{const n=t.target.value;s(new pp(0,[1===e.InputType.tag?n:Oe(xi,n)]))}]),Ut((()=>{let t;return Jt(Wt((t=i.Text,["ref",e=>{null==e||_(e.value,t)||(e.value=t)}])),Ut((()=>Jt(Wt(["onBlur",e=>{s(new pp(1,[]))}]),Ut((()=>Jt(_(e.InputType,new mp(0,[]))?Wt(["inputMode","numeric"]):jt(),Ut((()=>Wt(["data-testid",e.TestId]))))))))))}))))))))))))))),Ut((()=>!i.Meta.Valid&&i.Meta.Touched?Wt((0,r.createElement)("div",{className:Ie(" ",["mt-1","text-sm","text-red-600"]),children:e.InvalidFeedback})):jt())))))),["children",_t.Children.toArray(Array.from(t))])])))}class gp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetPreviousSurname"]}}class wp extends me{constructor(e,t){super(),this.YesNoButtonGroup=e,this.Data=t}}function vp(e){return 1!==function(e){const t=ke(n=e)?new br(1,["Previous Surname cannot be null, empty or white spaces"]):new br(0,[n]);var n;return 1===t.tag?new br(1,[t.fields[0]]):function(e,t,n){return n.length<=59?new br(0,[n]):new br(1,["Previous Surname must be no more than 59 characters long."])}(0,0,t.fields[0])}(e).tag}function yp(e){const t=e.YesNoButtonGroup.Selected;return null==t?new wp(e.YesNoButtonGroup,new Vs(e.Data.Value,{Valid:!1})):1===t.tag?new wp(e.YesNoButtonGroup,new Vs(e.Data.Value,{Valid:!0})):new wp(e.YesNoButtonGroup,new Vs(e.Data.Value,{Valid:Ue(ze((e=>vp(e.fields[0])),e.Data.Value),!1)}))}function bp(e){let t,n;const o=(i=e.InitialValue,[yp(new wp(Qs(new Zs(null==i?1:0,[])),new Vs(i,{Valid:!1}))),oa()]);var i;n=ka((()=>ya((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r,o;return yp(1===e.tag?(n=e.fields[0],new wp(t.YesNoButtonGroup,new Vs(ze((e=>new ji(e)),n.Value),{Valid:n.Meta.Valid}))):(r=e.fields[0],r.tag,o=1===r.fields[0].tag?new Vs(void 0,t.Data.Meta):t.Data,new wp(ea(r,t.YesNoButtonGroup),o)))}(t,n);return e(r.Data),[r,oa()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",I(vt([["className",Ie(" ",Ot)],(t=Kt(Ut((()=>Jt(Wt(Ks("Have you changed your surname since you last dealt with the Australian Tax Office (ATO)?")),Ut((()=>Jt(Wt((0,r.createElement)(na,{Dispatch:e=>{a(new gp(0,[e]))},State:s.YesNoButtonGroup})),Ut((()=>{let e;const t=s.YesNoButtonGroup.Selected;let n;return n=null!=t&&0===t.tag?0:1,Wt(0===n?(0,r.createElement)("div",I(vt([["className",Ie(" ",["mt-4"])],(e=[Ks("Enter your previous surname"),(0,r.createElement)($p,{AdditionalInputClasses:vt(["focus:ring-primary-focus","focus:border-primary-focus"]),AdditionalWrapperClasses:ct("mt-1"),InitialValue:Le(ze(Wi,s.Data.Value)),InputType:new mp(1,[]),InvalidFeedback:"Please enter your previous surname with a maximum length of 59 characters",OnUpdate:e=>{a(new gp(1,[e]))},TestId:"surname-input",Validator:vp})],["children",_t.Children.toArray(Array.from(e))])]))):null)}))))))))),["children",_t.Children.toArray(Array.from(t))])])))}const xp=vt(["mt-7","bg-white","px-4","border","border-gray-200","rounded-lg","shadow-sm"]),Sp=vt(["group","relative","w-full","my-3","focus-visible:outline-primary-hover","flex","justify-between","items-center","text-left"]),_p=vt(["text-sm","text-primary-base","leading-3","font-medium"]),Ep=vt(["ml-6","flex","items-center"]),Cp=vt(["pt-1","pb-3","prose","prose-sm","text-gray-500","text-sm"]);function Tp(e){let t,n,o,i;const s=e.content,a=e.title,l=_t.useState(!0),u=l[0];return(0,r.createElement)("div",I(vt([["className",Ie(" ",xp)],(t=[(n=ct((0,r.createElement)("button",I(vt([["type","button"],["className",Ie(" ",Sp)],["aria-expanded",u],["onClick",e=>{l[1](!u)}],(o=[(0,r.createElement)("span",{className:Ie(" ",_p),children:a}),(0,r.createElement)("span",I(vt([["className",Ie(" ",Ep)],(i=Kt(Ut((()=>Wt(u?It:kt)))),["children",_t.Children.toArray(Array.from(i))])])))],["children",_t.Children.toArray(Array.from(o))])])))),(0,r.createElement)("h3",{children:_t.Children.toArray(Array.from(n))})),(0,r.createElement)("div",{className:Ie(" ",yt(Cp,Kt(Ut((()=>u?Wt("hidden"):jt()))))),children:_t.Children.toArray([s])})],["children",_t.Children.toArray(Array.from(t))])])))}class kp extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class Ip extends me{constructor(e){super(),this.Selected=e}}function Ap(e,t){return null!=function(e,t){return((t,n)=>{for(;;){const r=t,o=n;if(ot(o))return;if(e(st(o)))return r;t=r+1,n=at(o)}})(0,t)}((t=>e===t),t.Selected)}function Mp(e){let t,n;const o=(i=e.InitialValue,[new Ip(i),oa()]);var i;return n=ka((()=>ya((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){const n=e.fields[0];return Ap(n,t)?new Ip(xt((e=>n!==e),t.Selected)):new Ip(yt(ct(n),t.Selected))}(t,n);return e(r.Selected),[r,oa()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("fieldset",I(vt([["className",Ie(" ",["space-y-2","mt-2"])],(t=Kt(Ut((()=>sn((e=>{let t,o,i;const s=e[0];return Wt((0,r.createElement)("div",I(vt([["className",Ie(" ",["relative","flex","items-start"])],["onChange",e=>{e.target.checked,n[1](new kp(s))}],(t=[(0,r.createElement)("div",I(vt([["className",Ie(" ",["flex","items-center","h-5"])],(o=[(0,r.createElement)("input",{className:Ie(" ",["focus:ring-primary-focus","h-4","w-4","text-primary-base","border-gray-300","rounded"]),type:"checkbox",id:s,checked:Ap(s,n[0])})],["children",_t.Children.toArray(Array.from(o))])]))),(0,r.createElement)("div",I(vt([["className",Ie(" ",["ml-3","text-sm"])],(i=[(0,r.createElement)("label",{className:Ie(" ",["font-normal","text-gray-700"]),for:s,children:e[1]})],["children",_t.Children.toArray(Array.from(i))])])))],["children",_t.Children.toArray(Array.from(t))])]))))}),e.ValueLabelPairs)))),["children",_t.Children.toArray(Array.from(t))])])))}class Rp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetDebtSupport"]}}class Op extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ForeignResident","WorkingHolidayMaker"]}}class Pp extends me{constructor(e,t,n){super(),this.YesNoButtonGroup=e,this.Data=t,this.DisableReason=n}}function Np(e){let t,n;const r=e.YesNoButtonGroup.Selected;return null==r?new Pp(e.YesNoButtonGroup,new Vs(e.Data.Value,{Valid:!1}),e.DisableReason):1===r.tag?new Pp(e.YesNoButtonGroup,new Vs(e.Data.Value,{Valid:!0}),e.DisableReason):new Pp(e.YesNoButtonGroup,new Vs(e.Data.Value,{Valid:(t=e.Data.Value,null!=t&&(o=t,it(o)>0&&(n=t,!0)))}),e.DisableReason);var o}function Dp(e){let t,n;const o=function(e,t,n){let r,o;const i=e.Value;let s;s=null==i||dt(i)?0:1,o=new Zs(0===s?1:0,[]);const a=null!=t?null!=n?1===n.tag?function(e){let t;return t=1===e.tag&&1===e.fields[0].tag?1:0,0===t}(t)?void 0:(r=t,new Op(0,[])):2===n.tag?new Op(1,[]):void 0:void 0:null!=n?1===n.tag?new Op(0,[]):2===n.tag?new Op(1,[]):void 0:void 0,l=null==a?oa():ct((e=>{e(new Rp(0,[new Js(1,[new Zs(1,[]),!0])]))}));return[Np(new Pp(Qs(o),e,a)),l]}(e.InitialValue,e.TfnInfo,e.ResidencyStatus);n=ka((()=>ya((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r;return Np(1===e.tag?new Pp(t.YesNoButtonGroup,Us(e.fields[0]),t.DisableReason):(n=e.fields[0],n.tag,r=1===n.fields[0].tag?Us(void 0):t.Data,new Pp(ea(n,t.YesNoButtonGroup),r,t.DisableReason)))}(t,n);return e(r.Data),[r,oa()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,[e.TfnInfo,e.ResidencyStatus]);const i=n[0],s=n[1];return(0,r.createElement)("div",I(vt([["className",Ie(" ",Ot)],(t=Kt(Ut((()=>Jt(Wt(Ks("Do you have any outstanding study and training support loans?")),Ut((()=>Jt(Wt((0,r.createElement)(na,{Disable:Le(ze((e=>new Zs(0,[])),i.DisableReason)),Dispatch:e=>{s(new Rp(0,[e]))},State:i.YesNoButtonGroup})),Ut((()=>{let t;return Jt((t=i.DisableReason,null!=t?1===t.tag?Wt(qs("Working holiday makers are ineligible for study and training support loans.")):Wt(qs("You must provide your TFN to declare any outstanding study and training support loans.")):Wt(null)),Ut((()=>{let t,n;const o=i.YesNoButtonGroup.Selected;let a;return a=null!=o&&0===o.tag?0:1,Wt(0===a?(0,r.createElement)("div",I(vt([["className",Ie(" ",["mt-4"])],(t=[(0,r.createElement)(Mp,(n=bt((e=>[pe(e[0]),e[1]]),vt([[new Di(0,[]),"Higher Education Loan Program (HELP)"],[new Di(1,[]),"VET Student Loan (VSL)"],[new Di(2,[]),"Financial Supplement (FS)"],[new Di(3,[]),"Student Start-up Loan (SSL)"],[new Di(4,[]),"Trade Support Loan (TSL)"]])),{InitialValue:Ue(ze((e=>bt(pe,e)),e.InitialValue.Value),lt()),OnUpdate:e=>{s(new Rp(1,[St(Ws,e)]))},ValueLabelPairs:n}))],["children",_t.Children.toArray(Array.from(t))])]))):null)})))}))))))))),["children",_t.Children.toArray(Array.from(t))])])))}function Fp(e,t){return!!(e.TfnInformation.Meta.Valid&&e.PreviousSurname.Meta.Valid&&e.ResidencyStatus.Meta.Valid&&null!=e.ClaimTaxFreeThreshold.Selected&&e.EmploymentBasisRadioButtonGroup.Meta.Valid&&e.DebtSupportCheckboxGroup.Meta.Valid)&&!_(t,new xn(1,[]))}function Lp(){return(0,r.createElement)("hr",{className:Ie(" ",["my-8"])})}const Bp=(0,r.createElement)("div",I(vt([["className",Ie(" ",["space-y-2"])],(()=>{let e,t,n;const o=[(e="You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months.",(0,r.createElement)("p",{children:["You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months."]})),(t="Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers.",(0,r.createElement)("p",{children:["Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers."]})),(n="If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different.",(0,r.createElement)("p",{children:["If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different."]}))];return["children",_t.Children.toArray(Array.from(o))]})()]))),Hp=(0,r.createElement)("div",I(vt([["className",Ie(" ",["space-y-2"])],(()=>{let e,t;const n=[(e="If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income.",(0,r.createElement)("p",{children:["If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income."]})),(t="You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes.",(0,r.createElement)("p",{children:["You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes."]})),(0,r.createElement)("p",{children:["Foreign residents and working holiday makers are ineligible to claim the threshold."]})];return["children",_t.Children.toArray(Array.from(n))]})()])));function Vp(e){const t=e.backendUrl,n=e.accessToken;let o;const i=dp();o=ka((()=>ya((()=>i),fp,((e,t)=>{}))),void 0,void 0);const s=o[0],a=o[1],l=Sn((()=>Rs(n,t)),(e=>{a(new op(6,[e]))}));_t.useEffect(l,[]);const u=_t.useState(new xn(0,[])),c=u[0],d=Sn((()=>function(e,t,n,r){let o;const i=Ns(e,t,n);return o=mn.Bind(i,(e=>{let t;const n=e;return 1===n.tag||r(new Ds(0,["Your tax declaration has been saved."])),t=n,mn.Return(t)})),mn.Bind(o,(e=>{let t;const n=e;if(1===n.tag){const e=n.fields[0];1===e.tag?r(new Ds(1,["There was an error saving your tax declaration. Please try saving again."])):r(new Ds(1,[`There was an error saving your tax declaration. ${e.fields[0]}`]))}return t=n,mn.Return(t)}))}(s,n,t,(e=>{a(new op(7,[e]))}))),(e=>{let t,n;u[1](e),2===e.tag&&0===e.fields[0].tag?(t=0,n=e.fields[0].fields[0]):t=1,0===t&&(bn(mn.Delay((()=>mn.Bind(yn(400),(()=>(function(){let e;const t=lp();var n;0===t.tag&&(0===t.fields[0].tag?tn((e=>{window.parent.location.href=e}),Ge((n=new up,He(sessionStorage.getItem(cp(n)))))):(e=new CustomEvent("step-completion",{bubbles:!0,detail:"tax"}),t.fields[0].fields[0].dispatchEvent(e)))}(),mn.Zero())))))),a(new op(9,[n])))}));switch(s.PreExistingTfnDec.tag){case 0:case 1:return(0,r.createElement)("div",{children:["Please wait..."]});default:{const e=Kt(Ut((()=>{let e,t;return Jt((e=s.CurrentAlert,null==e?Wt(null):(t=e,Wt((0,r.createElement)(Hs,{alert:t,hideAlert:()=>{a(new op(8,[]))}})))),Ut((()=>Jt(Wt((0,r.createElement)("h3",{className:Ie(" ",["text-3xl","font-bold","text-center","mb-8","sm:mb-12"]),children:"Tax Declaration"})),Ut((()=>Jt(Wt((0,r.createElement)(Ga,{InitialValue:Le(s.TfnInformation.Value),OnUpdate:e=>{a(new op(0,[e]))}})),Ut((()=>Jt(Wt(Lp()),Ut((()=>Jt(Wt((0,r.createElement)(bp,{InitialValue:Le(s.PreviousSurname.Value),OnUpdate:e=>{a(new op(1,[e]))}})),Ut((()=>Jt(Wt(Lp()),Ut((()=>Jt(Wt((0,r.createElement)(rp,{InitialValue:Le(s.ResidencyStatus.Value),OnUpdate:e=>{a(new op(2,[e]))}})),Ut((()=>Jt(Wt((0,r.createElement)(Tp,{title:"About residency",content:Bp})),Ut((()=>Jt(Wt(Lp()),Ut((()=>{let e,t;return Jt(Wt((0,r.createElement)("div",I(vt([["className",Ie(" ",Ot)],(e=[Ks("Would you like to claim the tax-free threshold from this employer?"),(0,r.createElement)(na,{Disable:Le((t=s.ResidencyStatus.Value,null==t||2!==t.tag&&1!==t.tag?void 0:new Zs(0,[]))),Dispatch:e=>{a(new op(3,[e]))},State:s.ClaimTaxFreeThreshold})],["children",_t.Children.toArray(Array.from(e))])])))),Ut((()=>{let e;return Jt((e=s.ResidencyStatus.Value,null!=e?2===e.tag?Wt(qs("Working holiday makers are ineligible to claim the tax-free threshold.")):1===e.tag?Wt(qs("Foreign residents are ineligible to claim the tax-free threshold.")):Wt(null):Wt(null)),Ut((()=>Jt(Wt((0,r.createElement)(Tp,{title:"About the tax-free threshold",content:Hp})),Ut((()=>Jt(Wt(Lp()),Ut((()=>Jt(Wt((0,r.createElement)(Dp,{InitialValue:s.DebtSupportCheckboxGroup,OnUpdate:e=>{a(new op(4,[e]))},ResidencyStatus:Le(s.ResidencyStatus.Value),TfnInfo:Le(s.TfnInformation.Value)})),Ut((()=>Jt(Wt(Lp()),Ut((()=>Jt(Wt(Ks("On what basis are you paid?")),Ut((()=>Jt(Wt((0,r.createElement)("p",{className:"text-sm leading-5 font-normal text-gray-500",children:"Check with your employer if you’re unsure."})),Ut((()=>{let e,t;return Jt(Wt((0,r.createElement)(Ma,(e=bt((e=>[pe(e[0]),e[1],e[2]]),vt([[new Gi(0,[]),"Full-time",void 0],[new Gi(1,[]),"Part-time",void 0],[new Gi(2,[]),"Labour Hire",void 0],[new Gi(4,[]),"Casual",void 0]])),{InitialValue:Le((t=s.EmploymentBasisRadioButtonGroup.Value,null==t?void 0:pe(t))),Name:"EmploymentBasis",OnUpdate:e=>{a(new op(5,[e]))},ValueLabelPairs:e}))),Ut((()=>Jt(Wt(Lp()),Ut((()=>{let e;return Jt(Wt((0,r.createElement)("p",I(vt([["className","text-sm leading-5 font-normal text-gray-500"],(e="By clicking ‘Save and continue’ you declare that the information you have provided is true and correct.",["children","By clicking ‘Save and continue’ you declare that the information you have provided is true and correct."])])))),Ut((()=>{let e;return Wt((0,r.createElement)("div",I(vt([["className",Ie(" ",["text-center"])],(e=[(0,r.createElement)("button",{className:Ie(" ",["w-full","max-w-320","px-10","py-2","mt-8","mb-10","border","border-transparent","text-sm","font-medium","rounded-md","shadow-sm","text-white","bg-primary-base","hover:bg-primary-hover","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-primary-focus","disabled:bg-gray-100","disabled:text-gray-400","disabled:border-gray-300","disabled:cursor-not-allowed"]),type:"button",disabled:!Fp(s,c),onClick:e=>{Fp(s,c)&&d()},children:"Save and continue","data-testid":"continue-button"})],["children",_t.Children.toArray(Array.from(e))])]))))})))}))))))})))))))))))))))))))))})))})))))))))))))))))))))))))))})));return(0,r.createElement)("form",{children:_t.Children.toArray(Array.from(e))})}}}function Gp(e,t){return t.startsWith(e)?t:void 0}function Up(e,t){return t.endsWith(e)?t:void 0}function zp(e,t){return function(e){return 1===e?e=>{let t,n,r,o,i,s;return t=Gp("/",e),null!=t?(n=t,"#"+n):(r=Gp("#/",e),null!=r?(o=r,o):(i=Gp("#",e),null!=i?(s=i,"#/"+Pe(s,1,s.length-1)):"#/"+e))}:e=>{let t,n;return t=Gp("/",e),null!=t?(n=t,n):"/"+e}}(t)(Ie("/",bt((e=>e.indexOf("?")>=0||e.startsWith("#")||e.startsWith("/")?e:encodeURIComponent(e)),e)))}function jp(e,t){return function(e,t){let n,r;const o=nt();let i=o,s=t;for(;!ot(s);){let t=e(st(s));for(;!ot(t);)n=i,r=new et(st(t),void 0),n.tail=r,i=r,t=at(t);s=at(s)}const a=i,l=nt();return a.tail=l,at(o)}((e=>{if(ke(e))return lt();{const t=function(e,...t){return 0===t.length?e.trimEnd():e.replace(new RegExp("["+de(t.join(""))+"]+$"),"")}(e,"#");if("?"===t)return lt();if(null!=Gp("?",t))return ct(t);{const e=t.split("?");if(Ze(((e,t)=>e===t),e,null)||1!==e.length){if(Ze(((e,t)=>e===t),e,null)||2!==e.length)return lt();if(""===Je(1,e)){const t=Je(0,e);return ct(decodeURIComponent(t))}{const t=Je(0,e),n=Je(1,e);return vt([decodeURIComponent(t),"?"+n])}}{const t=Je(0,e);return ct(decodeURIComponent(t))}}}}),vt(Re(null!=Gp("#",e)?Pe(e,1,e.length-1):1!==t||null==Up("#",e)&&null==Up("#/",e)?e:"",["/"],void 0,0)))}const Wp=function(e){const t=_t.memo(e,M(Ue(ze(R,void 0),null)));return tn((t=>{e.displayName=t}),Ge(void 0)),e=>{const n=function(e,t){if(null==e)return t;{const n=e;return t.key=n(t),t}}(undefined,e);return _t.createElement(t,n)}}((e=>{const t=cn((t=>{const n=Ue(e.onUrlChanged,(e=>{}));!function(e,t){t(jp(2===e?window.location.pathname+window.location.search:window.location.hash,e))}(Ue(e.hashMode,1),n)}));un((()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),an((()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))))),ln((()=>{const e=document.createEvent("CustomEvent");e.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(e)}));const n=e.application;return null==n?null:n}));class Yp extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Token"]}}class Kp extends he{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["QueryString"]}}class qp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Home","OidcSignIn","OidcSignInRedirectCallback","OidcSignInSilentCallback","NotFound"]}}function Zp(e){let t,n,r;if(dt(e))t=0;else if("oidc"===ft(e))if(dt(pt(e)))t=3;else switch(ft(pt(e))){case"callback":dt(pt(pt(e)))?t=3:dt(pt(pt(pt(e))))?(t=1,n=ft(pt(pt(e)))):t=3;break;case"silent-refresh":dt(pt(pt(e)))?t=3:dt(pt(pt(pt(e))))?(t=2,r=ft(pt(pt(e)))):t=3;break;default:t=3}else t=3;switch(t){case 0:{const e=window.location.search,t=new URLSearchParams(e),n=t.get("token");if(null==n)return new qp(0,[]);{const e=n;return tn((e=>{!function(e,t){sessionStorage.setItem(cp(e),t)}(new up,e)}),Ge(t.get("success-redirection-url"))),new qp(1,[new Yp(e)])}}case 1:return new qp(2,[new Kp(n)]);case 2:return new qp(3,[new Kp(r)]);default:return new qp(4,[])}}class Jp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved"]}}class Xp extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Started","Finished"]}}class Qp extends me{constructor(e){super(),this.AccessToken=e}}function eh(e){return new Qp(e.access_token)}class th extends me{constructor(e){super(),this.Auth=e}}class nh extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GetUser","SignInRedirect","SignInRedirectCallback","SignInSilentCallback"]}}class rh extends me{constructor(e,t){super(),this.CurrentPage=e,this.Auth=t}}class oh extends he{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["UrlChanged","AuthMsg"]}}class ih extends me{constructor(e,t,n){super(),this.model=e,this.render=t,this.equal=n}}class sh extends r.Component{constructor(e){super(e)}shouldComponentUpdate(e,t){return!this.props.equal(this.props.model,e.model)}render(){return this.props.render()}}const ah=(()=>{try{return Nr(r.version.slice(void 0,2),511,!1,32)>=18}catch(e){return!1}})(),lh=document.querySelector("#tfn-declaration-app"),uh=lh.getAttribute("data-identity-url"),ch=lh.getAttribute("data-backend-url"),dh=(()=>{const e={};return e.store=Be(window.sessionStorage),e})();function fh(){return new UserManager(function(){const e=(n=window.location.origin+window.location.pathname).endsWith("/")?n:n+"/",t={};var n;return t.authority=uh,t.client_id="apollo-tfn-declaration-ui",t.redirect_uri=e+"#/oidc/callback?",t.response_type="id_token token",t.scope="openid profile",t.automaticSilentRenew=!0,t.silent_redirect_uri=Be(e+"#/oidc/silent-refresh?"),t.post_logout_redirect_uri=e+"#/oidc/logout?",t.accessTokenExpiringNotificationTime=10,t.filterProtocolClaims=!0,t.loadUserInfo=!1,t.clockSkew=2592e3,t.userStore=new WebStorageStateStore(dh),t}())}function ph(e){return e.length>0?Pe(e,1):e}function hh(e){return fh().signinRedirect(Be({extraQueryParams:{irt:e.fields[0]}}))}function mh(e){return fh().signinRedirectCallback(ph(e.fields[0]))}function $h(e){return fh().signinSilentCallback(ph(e.fields[0]))}function gh(){return fh().getUser()}var wh;!function(e){_a(void 0,e)}((wh=ya((function(){const e=Zp(jp(window.location.hash,1)),t=function(){const e=Zp(jp(window.location.hash,1));return[new th(new Jp(0,[])),1===e.tag?ct((t=>{t(new nh(1,[new Xp(0,[]),e.fields[0]]))})):2===e.tag?ct((t=>{t(new nh(2,[new Xp(0,[]),e.fields[0]]))})):3===e.tag?ct((t=>{t(new nh(3,[new Xp(0,[]),e.fields[0]]))})):ct((e=>{e(new nh(0,[new Xp(0,[])]))}))]}();return[new rh(e,t[0]),ia((e=>new oh(1,[e])),t[1])]}),(function(e,t){if(1===e.tag){const n=function(e,t){const n=e=>[new th(new Jp(2,[new br(1,[e])])),oa()];switch(e.tag){case 1:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("SignInRedirect failed: %s"))(e.fields[0].fields[0].fields[0])):[t,oa()]:[new th(new Jp(1,[])),(o=hh,i=e.fields[1],s=t=>new nh(1,[new Xp(1,[new br(1,[t.message])]),e.fields[1]]),ct((e=>{o(i).catch((t=>{e(s(t))}))})))];case 2:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("failed sign in: %s"))(e.fields[0].fields[0].fields[0])):[new th(new Jp(2,[new br(0,[eh(e.fields[0].fields[0].fields[0])])])),(r=e=>{!function(e){history.pushState(void 0,"",zp(e,1));const t=document.createEvent("CustomEvent");t.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(t)}(ct(""))},ct(r))]:[new th(new Jp(1,[])),sa(mh,e.fields[1],(t=>(window.gtag&&window.gtag("event","oidc_sign_in",{}),new nh(2,[new Xp(1,[new br(0,[t])]),e.fields[1]]))),(t=>new nh(2,[new Xp(1,[new br(1,[t.message])]),e.fields[1]])))];case 3:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("failed silent sign in: %s"))(e.fields[0].fields[0].fields[0])):null==e.fields[0].fields[0].fields[0]?n("silent refresh expected a user but got none"):[new th(new Jp(2,[new br(0,[eh(e.fields[0].fields[0].fields[0])])])),oa()]:[t,sa($h,e.fields[1],(t=>new nh(3,[new Xp(1,[new br(0,[t])]),e.fields[1]])),(t=>new nh(3,[new Xp(1,[new br(1,[t.message])]),e.fields[1]])))];default:return 1===e.fields[0].tag?1===e.fields[0].fields[0].tag?n(_e(xe("failed to get current user: %s"))(e.fields[0].fields[0].fields[0])):null==e.fields[0].fields[0].fields[0]?n("expected a user but got none"):[new th(new Jp(2,[new br(0,[eh(e.fields[0].fields[0].fields[0])])])),oa()]:[new th(new Jp(1,[])),sa(gh,void 0,(e=>new nh(0,[new Xp(1,[new br(0,[e])])])),(e=>new nh(0,[new Xp(1,[new br(1,[e.message])])])))]}var r,o,i,s}(e.fields[0],t.Auth);return[new rh(t.CurrentPage,n[0]),ia((e=>new oh(1,[e])),n[1])]}return[new rh(Zp(e.fields[0]),t.Auth),oa()]}),((e,t)=>function(e,t,n){let i,s,a;switch(t.CurrentPage.tag){case 1:case 2:case 3:a=o();break;case 4:a=r.createElement("h1",{},"Not found");break;default:{const n=t.Auth.Auth;a=2===n.tag?1===n.fields[0].tag?r.createElement("h1",{},"Unauthorised"):(0,r.createElement)("div",I(vt([["className",Ie(" ",["font-inter","max-w-560","mx-auto"])],(i=[(0,r.createElement)("style",{children:[Et]}),(0,r.createElement)(Vp,{accessToken:n.fields[0].fields[0].AccessToken,backendUrl:e})],["children",_t.Children.toArray(Array.from(i))])]))):o()}}return Wp(I(vt([["onUrlChanged",e=>{n(new oh(0,[e]))}],(s=ct((0,r.createElement)("div",{children:_t.Children.toArray([a])})),["application",r.createElement(r.Fragment,{},...s)])])))}(ch,e,t))),function(e,t,n){let o;return ba(M(ah?(i=document.getElementById(t),o={render:function(e){(0,r.render)(e,i)},unmount:function(){(0,r.unmountComponentAtNode)(i)}},t=>r=>{o.render(e((e=>t=>e===t),xa(n),t,r))}):o=>i=>{r.render(e((e=>t=>e===t),xa(n),o,i),document.getElementById(t))}),n);var i}(((e,t,n,o)=>function(e,t,n,o){const i=new ih(n,(()=>t(n,o)),e);return r.createElement(sh,i)}(M(e),M(t),n,o)),"tfn-declaration-app",wh)))})();
|