@getcredify/credify-insurance-widget 1.38.1 → 1.38.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,40 +1,40 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;700&display=swap";/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties,theme,base,components,utilities;@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-600:oklch(59.6% .145 163.225);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-widest:.1em;--leading-snug:1.375;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.z-\\[10000\\]{z-index:10000}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.\\!w-auto{width:auto!important}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-60{width:calc(var(--spacing)*60)}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[7rem\\]{max-width:7rem}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8\\.5rem\\]{min-width:8.5rem}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-amber-300{border-color:var(--color-amber-300)}.border-cyan-500{border-color:var(--color-cyan-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-t-slate-600{border-top-color:var(--color-slate-600)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\\/40{background-color:color-mix(in oklab,var(--color-amber-50)40%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--text-primary\\)\\]{color:var(--text-primary)}.text-amber-800{color:var(--color-amber-800)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.focus-within\\:border-\\[var\\(--primary-color\\)\\]:focus-within{border-color:var(--primary-color)}@media (hover:hover){.hover\\:bg-blue-600\\/90:hover{background-color:#155dfce6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/90:hover{background-color:color-mix(in oklab,var(--color-blue-600)90%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-amber-900:hover{color:var(--color-amber-900)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:#155dfc66}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-600)40%,transparent)}}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-slate-300:disabled{background-color:var(--color-slate-300)}.disabled\\:text-slate-500:disabled{color:var(--color-slate-500)}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (min-width:40rem){.sm\\:w-\\[calc\\(50\\%-0\\.5rem\\)\\]{width:calc(50% - .5rem)}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:w-\\[calc\\(33\\.333\\%-0\\.667rem\\)\\]{width:calc(33.333% - .667rem)}}@media (min-width:80rem){.xl\\:w-\\[calc\\(25\\%-0\\.75rem\\)\\]{width:calc(25% - .75rem)}}}:root{--primary-color:#0b7248;--primary-hover-color:#095c3b;--secondary-color:#eaf3fc;--brand-blue:#005cee;--background-color:#fff;--text-primary:#10233f;--text-secondary:#42566e;--accent-color:#dbe8f5;--surface-muted:#eaf3fc;--brand-border:#c8dff4;--radius-sm:.25rem;--radius-md:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-2xl:1.25rem;--radius-3xl:1.75rem;--radius-full:9999px;--radio-dot-svg:url("data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27%230b7248%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3ccircle cx=%278%27 cy=%278%27 r=%274%27/%3e%3c/svg%3e");--select-button-svg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24px' height='24px' fill='%23718096' viewBox='0 0 256 256'%3e%3cpath d='m215.39 92.94-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 1 1 11.32-11.32L128 154.06l74.07-72.44a8 8 0 0 1 11.32 11.32Z'/%3e%3c/svg%3e")}#insurance-widget-root,#root{color:var(--text-primary);font-family:Spline Sans,ui-sans-serif,system-ui,sans-serif}#insurance-widget-root .backdrop,#root .backdrop{background:#00000080;position:fixed;inset:0}#insurance-widget-root .modal-panel,#root .modal-panel{--modal-edge-padding:1rem;border-radius:var(--radius-lg);height:min(80dvh,820px);max-height:min(80dvh,820px);padding:var(--modal-edge-padding);box-shadow:0 24px 64px -20px #0f233f59;background:linear-gradient(180deg,#fff 0%,var(--surface-muted)34%,#dcecfb 100%)!important}@media (min-width:640px){#insurance-widget-root .modal-panel,#root .modal-panel{--modal-edge-padding:1.25rem}}@media (min-width:768px){#insurance-widget-root .modal-panel,#root .modal-panel{--modal-edge-padding:1.5rem}}@media (max-width:767px){#insurance-widget-root .modal-panel,#root .modal-panel{--modal-edge-padding:0rem;width:100%;max-width:none;height:100%;max-height:none;box-shadow:none;border-radius:0;position:fixed;inset:0;background:linear-gradient(180deg,#fff 0%,var(--surface-muted)34%,#dcecfb 100%)!important}}#insurance-widget-root .h1-title,#root .h1-title{color:var(--text-primary);padding-inline:1.75rem;font-size:1.375rem;font-weight:800;line-height:1.75rem}@media (min-width:640px){#insurance-widget-root .h1-title,#root .h1-title{font-size:1.625rem;line-height:2rem}}#insurance-widget-root .p-subtitle,#root .p-subtitle{color:var(--text-secondary);margin-top:.5rem}#insurance-widget-root .form-area,#root .form-area{gap:1.5rem;margin:0;padding:0;display:grid}#insurance-widget-root .form-section,#root .form-section,#insurance-widget-root .form-question,#root .form-question,#insurance-widget-root .form-field,#root .form-field{min-width:0}#insurance-widget-root .form-label,#root .form-label{color:var(--text-secondary);margin-bottom:.5rem;font-size:.875rem;font-weight:500;display:block}#insurance-widget-root .form-input,#root .form-input{border-radius:var(--radius-md);border:1px solid var(--accent-color);width:100%;color:var(--text-primary);background:#fff;outline:none;padding:.75rem 1rem;font-size:1rem;transition:box-shadow .15s,border-color .15s}#insurance-widget-root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number],#root input[type=number]{-moz-appearance:textfield}#insurance-widget-root .form-input::placeholder,#root .form-input::placeholder{color:#94a3b8}#insurance-widget-root .form-input:focus,#root .form-input:focus{border-color:var(--primary-color);box-shadow:0 0 0 1px var(--primary-color)}#insurance-widget-root .date-picker,#root .date-picker{width:100%;position:relative}#insurance-widget-root .date-picker-group,#root .date-picker-group{cursor:pointer;align-items:center;gap:.375rem;min-height:3rem;padding:.25rem .375rem .25rem .875rem;display:flex!important}#insurance-widget-root .date-picker-group:hover,#root .date-picker-group:hover{border-color:var(--brand-blue)}#insurance-widget-root .date-picker[data-focus-within] .date-picker-group,#root .date-picker[data-focus-within] .date-picker-group{border-color:var(--primary-color);box-shadow:0 0 0 1px var(--primary-color)}#insurance-widget-root .date-picker-input,#root .date-picker-input{flex:auto;align-items:center;gap:.0625rem;min-width:0;display:inline-flex}#insurance-widget-root .date-picker-segment,#root .date-picker-segment{border-radius:var(--radius-sm);color:var(--text-primary);font-variant-numeric:tabular-nums;padding:0 .125rem;line-height:1.6}#insurance-widget-root .date-picker-segment[data-placeholder],#root .date-picker-segment[data-placeholder]{color:#94a3b8}#insurance-widget-root .date-picker-segment[data-focused],#root .date-picker-segment[data-focused]{color:#064fa8;background:#eaf3ff;outline:none}#insurance-widget-root .date-picker-button,#root .date-picker-button{border-radius:var(--radius-sm);color:#64748b;cursor:pointer;width:2.25rem;height:2.25rem;font:inherit;background:0 0;border:0;flex:none;justify-content:center;align-items:center;font-size:1.125rem;display:inline-flex}#insurance-widget-root .date-picker-button:hover,#root .date-picker-button:hover{color:#064fa8;background:#eaf3ff}#insurance-widget-root .date-picker-button[data-disabled],#root .date-picker-button[data-disabled]{cursor:not-allowed;opacity:.5}#insurance-widget-root .date-picker-popover,#root .date-picker-popover{z-index:80;border:1px solid var(--brand-border);border-radius:var(--radius-md);background:#fff;max-width:min(100vw - 2rem,22rem);padding:.75rem;box-shadow:0 24px 56px -24px #0f233f80}#insurance-widget-root .date-picker-calendar-header,#root .date-picker-calendar-header{grid-template-columns:2.25rem 1fr 2.25rem;align-items:center;gap:.5rem;margin-bottom:.625rem;display:grid}#insurance-widget-root .date-picker-heading,#root .date-picker-heading{color:var(--text-primary);text-align:center;font-size:.95rem;font-weight:800;line-height:1.25rem}#insurance-widget-root .date-picker-selects,#root .date-picker-selects{grid-template-columns:minmax(0,1fr) 5.75rem;gap:.5rem;min-width:0;display:grid}#insurance-widget-root .date-picker-select,#root .date-picker-select{border:1px solid var(--brand-border);border-radius:var(--radius-sm);width:100%;min-width:0;min-height:2.5rem;color:var(--text-primary);cursor:pointer;font:inherit;background-color:#fff;padding:0 .625rem;font-size:.875rem;font-weight:700;line-height:1.2}#insurance-widget-root .date-picker-select:hover,#root .date-picker-select:hover,#insurance-widget-root .date-picker-select:focus,#root .date-picker-select:focus{border-color:var(--brand-blue);box-shadow:0 0 0 1px var(--brand-blue);outline:none}#insurance-widget-root .date-picker-nav-button,#root .date-picker-nav-button{border:1px solid var(--brand-border);border-radius:var(--radius-sm);width:2.25rem;height:2.25rem;color:var(--text-primary);cursor:pointer;font:inherit;background:#fff;place-items:center;font-size:1.25rem;line-height:1;display:grid}#insurance-widget-root .date-picker-nav-button:hover,#root .date-picker-nav-button:hover{border-color:var(--brand-blue);color:#064fa8;background:#eaf3ff}#insurance-widget-root .date-picker-nav-button[data-disabled],#root .date-picker-nav-button[data-disabled]{cursor:not-allowed;opacity:.45}#insurance-widget-root .date-picker-grid,#root .date-picker-grid{border-collapse:collapse;width:100%}#insurance-widget-root .date-picker-header-cell,#root .date-picker-header-cell{color:#64748b;text-align:center;padding:.25rem;font-size:.75rem;font-weight:700}#insurance-widget-root .date-picker-cell,#root .date-picker-cell{border-radius:var(--radius-sm);width:2.25rem;height:2.25rem;color:var(--text-primary);cursor:pointer;text-align:center;font-size:.875rem;line-height:2.25rem}#insurance-widget-root .date-picker-cell:hover,#root .date-picker-cell:hover,#insurance-widget-root .date-picker-cell[data-focused],#root .date-picker-cell[data-focused]{color:#064fa8;background:#eaf3ff}#insurance-widget-root .date-picker-cell[data-selected],#root .date-picker-cell[data-selected]{background:var(--brand-blue);color:#fff;font-weight:800}#insurance-widget-root .date-picker-cell[data-outside-month],#root .date-picker-cell[data-outside-month]{color:#94a3b8}#insurance-widget-root .date-picker-cell[data-disabled],#root .date-picker-cell[data-disabled]{cursor:not-allowed;opacity:.35}.date-picker-popover{z-index:80;box-sizing:border-box;border:1px solid var(--brand-border,#c8dff4);border-radius:var(--radius-md,.5rem);background:#fff;width:min(22rem,100vw - 1rem);max-width:calc(100vw - 1rem);padding:.75rem;box-shadow:0 24px 56px -24px #0f233f80}.date-picker-calendar{width:100%}.date-picker-calendar-header{grid-template-columns:2.5rem 1fr 2.5rem;align-items:center;gap:.5rem;margin-bottom:.75rem;display:grid}.date-picker-heading{color:var(--text-primary,#10233f);text-align:center;font-size:.95rem;font-weight:800;line-height:1.25rem}.date-picker-selects{grid-template-columns:minmax(0,1fr) 5.75rem;gap:.5rem;min-width:0;display:grid}.date-picker-select{border:1px solid var(--brand-border,#c8dff4);border-radius:var(--radius-sm,.25rem);width:100%;min-width:0;min-height:2.5rem;color:var(--text-primary,#10233f);cursor:pointer;font:inherit;background-color:#fff;padding:0 .625rem;font-size:.875rem;font-weight:700;line-height:1.2}.date-picker-select:hover,.date-picker-select:focus{border-color:var(--brand-blue,#005cee);box-shadow:0 0 0 1px var(--brand-blue,#005cee);outline:none}.date-picker-nav-button{border:1px solid var(--brand-border,#c8dff4);border-radius:var(--radius-sm,.25rem);width:2.5rem;height:2.5rem;color:var(--text-primary,#10233f);cursor:pointer;font:inherit;background:#fff;place-items:center;font-size:1.35rem;line-height:1;display:grid}.date-picker-nav-button:hover{border-color:var(--brand-blue,#005cee);color:#064fa8;background:#eaf3ff}.date-picker-nav-button[data-disabled]{cursor:not-allowed;opacity:.45}.date-picker-grid{border-collapse:separate;border-spacing:.125rem;table-layout:fixed;width:100%}.date-picker-header-cell{color:#64748b;text-align:center;padding:.25rem;font-size:.75rem;font-weight:700}.date-picker-cell{border-radius:var(--radius-sm,.25rem);width:2.5rem;height:2.5rem;color:var(--text-primary,#10233f);cursor:pointer;text-align:center;font-size:.9rem;line-height:2.5rem}.date-picker-cell:hover,.date-picker-cell[data-focused]{color:#064fa8;background:#eaf3ff}.date-picker-cell[data-selected]{background:var(--brand-blue,#005cee);color:#fff;font-weight:800}.date-picker-cell[data-outside-month]{color:#94a3b8}.date-picker-cell[data-disabled]{cursor:not-allowed;opacity:.35}@media (max-width:420px){.date-picker-popover{width:calc(100vw - 1rem);padding:.625rem}.date-picker-cell{width:2.25rem;height:2.25rem;line-height:2.25rem}}#insurance-widget-root .stage-footer-hint,#root .stage-footer-hint{color:#475569;text-align:left;margin:1rem 0 0;font-size:.75rem;line-height:1.35}#insurance-widget-root .stage-footer-hint>*+*,#root .stage-footer-hint>*+*{margin-top:.25rem}#insurance-widget-root .select-caret,#root .select-caret{background-image:var(--select-button-svg);appearance:none;background-position:right .75rem center;background-repeat:no-repeat;background-size:1.25rem 1.25rem;padding-right:2.5rem}#insurance-widget-root .combobox-wrapper,#root .combobox-wrapper{position:relative}#insurance-widget-root .combobox-input,#root .combobox-input{padding-right:2.5rem}#insurance-widget-root .combobox-caret,#root .combobox-caret{pointer-events:none;border-bottom:2px solid #64748b;border-right:2px solid #64748b;width:.625rem;height:.625rem;position:absolute;top:50%;right:.875rem;transform:translateY(-65%)rotate(45deg)}#insurance-widget-root .combobox-listbox,#root .combobox-listbox{z-index:60;border:1px solid var(--brand-border);border-radius:var(--radius-md);background:#fff;max-height:min(16rem,42dvh);padding:.25rem;position:absolute;top:calc(100% + .375rem);left:0;right:0;overflow-y:auto;box-shadow:0 18px 42px -22px #0f233f73}#insurance-widget-root .combobox-listbox[data-placement=top],#root .combobox-listbox[data-placement=top]{top:auto;bottom:calc(100% + .375rem)}#insurance-widget-root .combobox-option,#root .combobox-option{border-radius:var(--radius-sm);width:100%;min-height:2.5rem;color:var(--text-primary);cursor:pointer;font:inherit;text-align:left;background:#fff;border:0;justify-content:flex-start;align-items:center;padding:.625rem .75rem;font-size:.9375rem;line-height:1.25rem;display:flex!important}#insurance-widget-root .combobox-option:hover,#root .combobox-option:hover,#insurance-widget-root .combobox-option[data-highlighted=true],#root .combobox-option[data-highlighted=true]{color:#064fa8;background:#eaf3ff}#insurance-widget-root .combobox-option[data-selected=true],#root .combobox-option[data-selected=true]{background:var(--brand-blue);color:#fff}#insurance-widget-root .combobox-option[aria-disabled=true],#root .combobox-option[aria-disabled=true]{cursor:not-allowed;opacity:.55}#insurance-widget-root .combobox-empty,#root .combobox-empty{color:#64748b;padding:.75rem;font-size:.875rem}#insurance-widget-root .radio-card,#root .radio-card{border-radius:var(--radius-sm);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:center;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .radio-card:hover,#root .radio-card:hover{border-color:#cfd8e3}#insurance-widget-root .radio-input,#root .radio-input{border:2px solid var(--accent-color);appearance:none;background:0 0;border-radius:9999px;outline:none;width:1.25rem;height:1.25rem}#insurance-widget-root .radio-input:checked,#root .radio-input:checked{border-color:var(--primary-color);background-image:var(--radio-dot-svg);background-position:50%;background-repeat:no-repeat}#insurance-widget-root .radio-input:focus-visible,#root .radio-input:focus-visible,#insurance-widget-root .checkbox-input:focus-visible,#root .checkbox-input:focus-visible{outline:3px solid var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .radio-input:focus-visible,#root .radio-input:focus-visible,#insurance-widget-root .checkbox-input:focus-visible,#root .checkbox-input:focus-visible{outline:3px solid color-mix(in oklab,var(--primary-color)55%,white)}}#insurance-widget-root .radio-input:focus-visible,#root .radio-input:focus-visible,#insurance-widget-root .checkbox-input:focus-visible,#root .checkbox-input:focus-visible{outline-offset:3px}#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .radio-label,#root .radio-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .btn-primary,#root .btn-primary{border-radius:var(--radius-md);background:var(--primary-color);color:#fff;letter-spacing:.02em;justify-content:center;align-items:center;width:100%;height:3rem;font-weight:700;transition:opacity .15s;display:flex}#insurance-widget-root .btn-primary:hover,#root .btn-primary:hover{background:var(--primary-hover-color);opacity:1}#insurance-widget-root .btn-outline,#root .btn-outline{border-radius:var(--radius-md);width:100%;height:3rem;color:var(--text-primary);border:1px solid var(--accent-color);letter-spacing:.02em;background:#fff;justify-content:center;align-items:center;font-weight:700;transition:background .15s,color .15s,border-color .15s,opacity .15s;display:flex}#insurance-widget-root .btn-outline:hover,#root .btn-outline:hover{border-color:#cfd8e3}#insurance-widget-root .btn-primary,#root .btn-primary,#insurance-widget-root .btn-outline,#root .btn-outline{cursor:pointer}#insurance-widget-root .btn-primary:disabled,#root .btn-primary:disabled,#insurance-widget-root .btn-outline:disabled,#root .btn-outline:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(20%)}#insurance-widget-root .btn-primary:not(:disabled):hover,#root .btn-primary:not(:disabled):hover{opacity:.95}#insurance-widget-root .btn-outline:not(:disabled):hover,#root .btn-outline:not(:disabled):hover{border-color:#cfd8e3}#insurance-widget-root .quote-btn,#root .quote-btn{border-radius:var(--radius-md);background-color:var(--color-blue-600);padding-inline:calc(var(--spacing)*6);padding-block:calc(var(--spacing)*3);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){:is(#insurance-widget-root .quote-btn,#root .quote-btn):hover{background-color:var(--color-blue-700)}}#insurance-widget-root .input-error,#root .input-error{border-color:#dc2626!important;box-shadow:0 0 0 1px #dc2626!important}#insurance-widget-root .checkbox-card,#root .checkbox-card{border-radius:var(--radius-sm);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:flex-start;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .checkbox-card:hover,#root .checkbox-card:hover{border-color:#cfd8e3}#insurance-widget-root .checkbox-input,#root .checkbox-input{border:2px solid var(--accent-color);appearance:none;background:#fff;border-radius:.375rem;outline:none;flex-shrink:0;place-items:center;width:1.25rem;height:1.25rem;margin-top:.125rem;display:grid}#insurance-widget-root .checkbox-input:checked,#root .checkbox-input:checked{border-color:var(--primary-color);background-color:var(--primary-color);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 24 24'%3e%3cpath d='M20.285 6.709a1 1 0 0 1 0 1.414l-9.192 9.193a1 1 0 0 1-1.414 0L3.715 11.55a1 1 0 1 1 1.414-1.414l5.05 5.05 8.485-8.478a1 1 0 0 1 1.621.001z'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat}#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .checkbox-label,#root .checkbox-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{border-width:2px;border-color:var(--primary-color);background:var(--primary-color);align-items:flex-start;gap:.875rem;padding:1rem 1.125rem}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{background:color-mix(in oklab,var(--primary-color)7%,#fff)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{border-color:var(--primary-color);background:var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{background:color-mix(in oklab,var(--primary-color)11%,#fff)}}#insurance-widget-root .communications-consent-checkbox .checkbox-input,#root .communications-consent-checkbox .checkbox-input{border-width:3px;border-color:var(--primary-color);flex-shrink:0;width:1.625rem;height:1.625rem;margin-top:.0625rem}#insurance-widget-root .communications-consent-checkbox .checkbox-input:checked,#root .communications-consent-checkbox .checkbox-input:checked{background-size:1.125rem 1.125rem}#insurance-widget-root .communications-consent-checkbox .checkbox-label,#root .communications-consent-checkbox .checkbox-label{font-size:.875rem;font-weight:400;line-height:1.4}#insurance-widget-root .modal-scroll,#root .modal-scroll{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-height:min(90dvh,800px);overflow-y:auto}#insurance-widget-root .modal-scroll .h1-title,#root .modal-scroll .h1-title{z-index:1;background:0 0;padding-top:.25rem;padding-bottom:.75rem;position:sticky;top:0}#insurance-widget-root .panel-body,#root .panel-body{padding:0;scroll-padding:0}#insurance-widget-root .widget-modal-header,#root .widget-modal-header{margin:calc(-1*var(--modal-edge-padding))calc(-1*var(--modal-edge-padding))0;padding:1rem calc(var(--modal-edge-padding) + 3rem).875rem max(var(--modal-edge-padding),.875rem);background:0 0}#insurance-widget-root .widget-legal-footer,#root .widget-legal-footer{margin:0 calc(-1*var(--modal-edge-padding))calc(-1*var(--modal-edge-padding))!important;padding:.625rem max(var(--modal-edge-padding),.875rem).75rem!important;background:0 0!important}#insurance-widget-root .widget-legal-footer p,#root .widget-legal-footer p{color:#64748b!important;margin:0!important;font-size:.75rem!important;line-height:1.25!important}#insurance-widget-root .form-wizard-actions,#root .form-wizard-actions{z-index:2;background:#fff;margin:0;padding:.625rem 0 .875rem}#insurance-widget-root .tel-input-wrapper:focus-within:not(.error),#root .tel-input-wrapper:focus-within:not(.error){outline:1px solid var(--primary-color);outline-offset:0px;z-index:1}#insurance-widget-root .tel-input-wrapper.error,#root .tel-input-wrapper.error{outline-offset:0px;z-index:1;outline:1px solid #ef4444}#insurance-widget-root .tel-input-wrapper:focus-within:after,#root .tel-input-wrapper:focus-within:after{content:"";border:1px solid var(--primary-color);pointer-events:none;z-index:10;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .tel-input-wrapper.error:after,#root .tel-input-wrapper.error:after{content:"";pointer-events:none;z-index:10;border:1px solid #ef4444;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .legend-required:after,#root .legend-required:after{content:" *";color:#dc2626;margin-left:.25rem}#insurance-widget-root .scrollbar-hide,#root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#insurance-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#root .scrollbar-hide::-webkit-scrollbar{display:none}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;border-radius:var(--radius-md)!important;background-color:var(--primary-color)!important;color:#fff!important;min-height:3rem!important;box-shadow:none!important;font-weight:800!important;display:flex!important;position:relative!important;overflow:visible!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:not(:disabled),#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:not(:disabled){cursor:pointer!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{opacity:.5!important;box-shadow:none!important;background-color:#cbd5e1!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:not(:disabled):hover,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:not(:disabled):hover{background-color:var(--primary-hover-color)!important}#insurance-widget-root .credify-link-underline,#root .credify-link-underline{color:var(--primary-color);text-decoration:underline}#insurance-widget-root .credify-link-underline:hover,#root .credify-link-underline:hover{color:#0052cc}#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{appearance:none;visibility:visible!important;opacity:1!important;cursor:pointer!important;border:1px solid var(--brand-border)!important;clip-path:none!important;pointer-events:auto!important;border-radius:var(--radius-md)!important;min-width:2.75rem!important;min-height:2.75rem!important;color:var(--text-primary)!important;background:#fff!important;justify-content:center!important;align-items:center!important;padding:0!important;font-size:1.75rem!important;line-height:1!important;transition:background-color .15s,border-color .15s,color .15s,transform .15s!important;display:inline-flex!important;top:.75rem!important;right:.75rem!important;overflow:visible!important;box-shadow:0 4px 12px #0f233f14!important}#insurance-widget-root button.modal-close-btn[type=button]:hover,#root button.modal-close-btn[type=button]:hover{background:var(--surface-muted)!important;border-color:var(--primary-color)!important}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root button.modal-close-btn[type=button]:hover,#root button.modal-close-btn[type=button]:hover{border-color:color-mix(in oklab,var(--primary-color)45%,var(--brand-border))!important}}#insurance-widget-root button.modal-close-btn[type=button]:hover,#root button.modal-close-btn[type=button]:hover{color:var(--primary-color)!important}@media (max-width:767px){#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{visibility:visible!important;pointer-events:auto!important;border-radius:var(--radius-md)!important;justify-content:center!important;align-items:center!important;min-width:2.75rem!important;min-height:2.75rem!important;display:inline-flex!important}}#insurance-widget-root button.credify-btn-back[type=button],#root button.credify-btn-back[type=button],#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{transition:border-color .15s,background-color .15s;visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;border-radius:var(--radius-md)!important;color:#1a202c!important;text-align:center!important;cursor:pointer!important;background-color:#fff!important;border:1px solid #e2e8f0!important;place-content:center!important;place-items:center!important;height:3rem!important;min-height:3rem!important;margin:0!important;padding:0!important;font-size:1rem!important;font-weight:600!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button]:not(:disabled):hover,#root button.credify-btn-back[type=button]:not(:disabled):hover{background-color:#f9fafb!important;border-color:#cbd5e1!important}#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{opacity:.5!important;cursor:not-allowed!important;background-color:#f3f4f6!important}#insurance-widget-root button.credify-btn-back[type=button][data-testid=communications-consent-decline],#root button.credify-btn-back[type=button][data-testid=communications-consent-decline]{font-weight:400!important}#insurance-widget-root button.credify-btn-back-rates[type=button],#root button.credify-btn-back-rates[type=button]{margin-top:2rem!important}#insurance-widget-root button.credify-retry-btn[type=button],#root button.credify-retry-btn[type=button]{cursor:pointer;font:inherit;border:none;visibility:visible!important;color:var(--text-primary)!important;clip-path:none!important;pointer-events:auto!important;background:0 0!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root button:focus-visible,#root button:focus-visible,#insurance-widget-root a:focus-visible,#root a:focus-visible,#insurance-widget-root [tabindex]:focus-visible,#root [tabindex]:focus-visible{outline:3px solid var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root button:focus-visible,#root button:focus-visible,#insurance-widget-root a:focus-visible,#root a:focus-visible,#insurance-widget-root [tabindex]:focus-visible,#root [tabindex]:focus-visible{outline:3px solid color-mix(in oklab,var(--primary-color)55%,white)}}#insurance-widget-root button:focus-visible,#root button:focus-visible,#insurance-widget-root a:focus-visible,#root a:focus-visible,#insurance-widget-root [tabindex]:focus-visible,#root [tabindex]:focus-visible{outline-offset:3px}#insurance-widget-root .close-confirm-backdrop,#root .close-confirm-backdrop{z-index:20;background:#0f233f6b;place-items:center;padding:1rem;display:grid;position:absolute;inset:0}#insurance-widget-root .close-confirm-dialog,#root .close-confirm-dialog{border-radius:var(--radius-lg);border:1px solid var(--brand-border);background:#fff;width:min(100%,24rem);padding:1rem;box-shadow:0 24px 64px -20px #0f233f73}#insurance-widget-root .close-confirm-dialog h3,#root .close-confirm-dialog h3{color:var(--text-primary);margin:0;font-size:1.125rem;font-weight:800;line-height:1.35}#insurance-widget-root .close-confirm-dialog p,#root .close-confirm-dialog p{color:var(--text-secondary);margin:.5rem 0 0;font-size:.925rem;line-height:1.45}#insurance-widget-root .close-confirm-actions,#root .close-confirm-actions{grid-template-columns:1fr;gap:.625rem;margin-top:1rem;display:grid}#insurance-widget-root .close-confirm-actions .btn-primary,#root .close-confirm-actions .btn-primary,#insurance-widget-root .close-confirm-actions .btn-outline,#root .close-confirm-actions .btn-outline{min-height:2.75rem!important}#insurance-widget-root .close-confirm-danger,#root .close-confirm-danger{box-shadow:none!important;background:#b42318!important}#insurance-widget-root .close-confirm-danger:hover,#root .close-confirm-danger:hover{background:#8f1d14!important}@media (min-width:440px){#insurance-widget-root .close-confirm-actions,#root .close-confirm-actions{grid-template-columns:1fr 1fr}}@media (max-width:420px){#insurance-widget-root .repeatable-controls,#root .repeatable-controls{flex-direction:column;align-items:stretch}#insurance-widget-root .repeatable-actions,#root .repeatable-actions{gap:.5rem;width:100%;display:grid}#insurance-widget-root .repeatable-actions>button,#root .repeatable-actions>button{width:100%;margin-inline:0!important}}@media (prefers-reduced-motion:reduce){#insurance-widget-root *,#root *{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}#insurance-widget-root button.rates-bind-btn[type=button],#root button.rates-bind-btn[type=button],#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;text-align:center!important;border-radius:var(--radius-md)!important;background-color:var(--primary-color)!important;color:#fff!important;place-content:center!important;place-items:center!important;min-height:2.5rem!important;padding:0 1rem!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{opacity:.5!important;background-color:#cbd5e1!important}#insurance-widget-root button.rates-bind-btn.rates-bind-btn-requested,#root button.rates-bind-btn.rates-bind-btn-requested{background-color:var(--primary-color)!important;color:#fff!important}#insurance-widget-root button.quote-btn[type=button],#root button.quote-btn[type=button]{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;border-radius:var(--radius-md)!important;background-color:var(--primary-color)!important;color:#fff!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root a.credify-link-underline[href],#root a.credify-link-underline[href]{color:var(--primary-color);visibility:visible!important;clip-path:none!important;pointer-events:auto!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root input.form-input,#root input.form-input,#insurance-widget-root select.form-input,#root select.form-input,#insurance-widget-root textarea.form-input,#root textarea.form-input{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;display:block!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit],#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button],#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{visibility:visible!important;opacity:1!important;border-radius:var(--radius-md)!important;clip-path:none!important;pointer-events:auto!important;min-height:3rem!important;display:flex!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit]{background-color:var(--primary-color)!important;color:#fff!important}#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button]{color:var(--text-primary)!important;border:1px solid var(--accent-color)!important;background-color:#fff!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{opacity:.5!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled{color:#fff!important;background-color:#d1d5db!important}#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{color:var(--text-primary)!important;background-color:#f1f5f9!important}#insurance-widget-root .form-wizard-shell,#root .form-wizard-shell{background:0 0;flex-direction:column;height:100%;min-height:0;display:flex}#insurance-widget-root .form-wizard-steps-header,#root .form-wizard-steps-header{margin:0 calc(-1*var(--modal-edge-padding));padding:.625rem max(var(--modal-edge-padding),.875rem).75rem;background:0 0;justify-content:flex-start;align-items:center;visibility:visible!important;display:flex!important}#insurance-widget-root .form-wizard-steps-scroll,#root .form-wizard-steps-scroll{flex:auto;min-width:0;position:relative}#insurance-widget-root .form-wizard-steps-scroll:after,#root .form-wizard-steps-scroll:after{content:"";pointer-events:none;-webkit-backdrop-filter:blur(1.5px);width:2.25rem;position:absolute;top:0;bottom:0;right:0;-webkit-mask-image:linear-gradient(90deg,#0000,#000 70%);mask-image:linear-gradient(90deg,#0000,#000 70%)}#insurance-widget-root .form-wizard-steps,#root .form-wizard-steps{overscroll-behavior-x:contain;touch-action:pan-x;-webkit-overflow-scrolling:touch;flex:1;align-items:center;gap:.625rem;min-width:0;margin:0;padding:0 .75rem 0 0;font-size:.75rem;line-height:1rem;list-style:none;overflow-x:auto;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 2.5rem),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 2.5rem),#0000);display:flex!important}#insurance-widget-root .form-wizard-step-pill,#root .form-wizard-step-pill{border-radius:var(--radius-md);white-space:nowrap;border:1px solid;flex-shrink:0;justify-content:center;align-items:center;min-height:2rem;padding:.3125rem .7rem;font-size:.78rem;font-weight:700;line-height:1rem;transition:background-color .15s,border-color .15s,color .15s;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-pill:not(:disabled),#root .form-wizard-step-pill:not(:disabled){cursor:pointer}#insurance-widget-root .form-wizard-step-pill[data-step-state=complete],#root .form-wizard-step-pill[data-step-state=complete]{color:#075fc9;background:#f5f9ff;border-color:#9dc4f8}#insurance-widget-root .form-wizard-step-pill[data-step-state=current],#root .form-wizard-step-pill[data-step-state=current]{border-color:var(--brand-blue);background:var(--brand-blue);color:#fff}#insurance-widget-root .form-wizard-step-pill[data-step-state=upcoming],#root .form-wizard-step-pill[data-step-state=upcoming]{color:#526276;background:#ffffffad;border-color:#cbd8e6}#insurance-widget-root .form-wizard-step-pill:not(:disabled):hover,#root .form-wizard-step-pill:not(:disabled):hover{border-color:var(--brand-blue);color:#064fa8;background:#eaf3ff}#insurance-widget-root .form-wizard-step-pill:disabled,#root .form-wizard-step-pill:disabled{cursor:not-allowed;opacity:.65}#insurance-widget-root .form-wizard-step-arrow,#root .form-wizard-step-arrow{color:#526276;flex-shrink:0;justify-content:center;align-items:center;width:.875rem;font-size:1.25rem;font-weight:700;line-height:1;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-content,#root .form-wizard-content{min-height:0;padding:1rem max(var(--modal-edge-padding),.875rem)0;-webkit-overflow-scrolling:touch;flex:auto;overflow-y:auto}#insurance-widget-root .form-wizard-card,#root .form-wizard-card{min-height:0;margin:0 calc(-1*var(--modal-edge-padding));border-radius:var(--radius-lg);background:#fff;flex-direction:column;flex:auto;display:flex;position:relative;overflow:hidden}#insurance-widget-root .form-wizard-card:before,#root .form-wizard-card:before{content:"";z-index:1;width:var(--form-wizard-progress,0%);background:var(--brand-blue);pointer-events:none;height:.25rem;transition:width .2s;position:absolute;top:0;left:0}#insurance-widget-root .form-wizard-card .form-wizard-actions,#root .form-wizard-card .form-wizard-actions{padding-inline:max(var(--modal-edge-padding),.875rem)}@media (min-width:768px){#insurance-widget-root .form-wizard-card,#root .form-wizard-card{border-radius:var(--radius-lg);margin-inline:0}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(){if(typeof pt>"u")var pt={env:{}}})();(function(pt,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime","react-dom"],d):(pt=typeof globalThis<"u"?globalThis:pt||self,d(pt.CredifyInsuranceWidget={},pt.React,pt.ReactDOM,pt.React,pt.ReactDOM))})(this,(function(pt,d,__,m,Vl){"use strict";function v_(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ti=v_(d),Te=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,tr="8.55.2",we=globalThis;function ka(e,t,r){const n=r||we,a=n.__SENTRY__=n.__SENTRY__||{},o=a[tr]=a[tr]||{};return o[e]||(o[e]=t())}const wr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,E_="Sentry Logger ",Pi=["debug","info","warn","error","log","assert","trace"],Ta={};function xr(e){if(!("console"in we))return e();const t=we.console,r={},n=Object.keys(Ta);n.forEach(a=>{const o=Ta[a];r[a]=t[a],t[a]=o});try{return e()}finally{n.forEach(a=>{t[a]=r[a]})}}function D_(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return wr?Pi.forEach(r=>{t[r]=(...n)=>{e&&xr(()=>{we.console[r](`${E_}[${r}]:`,...n)})}}):Pi.forEach(r=>{t[r]=()=>{}}),t}const ge=ka("logger",D_),zl=50,$r="?",jl=/\(error: (.*)\)/,Zl=/captureMessage|captureException/;function Gl(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,a=0)=>{const o=[],i=r.split(`
3
- `);for(let s=n;s<i.length;s++){const u=i[s];if(u.length>1024)continue;const l=jl.test(u)?u.replace(jl,"$1"):u;if(!l.match(/\S*Error: /)){for(const c of t){const f=c(l);if(f){o.push(f);break}}if(o.length>=zl+a)break}}return C_(o.slice(a))}}function S_(e){return Array.isArray(e)?Gl(...e):e}function C_(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Pa(t).function||"")&&t.pop(),t.reverse(),Zl.test(Pa(t).function||"")&&(t.pop(),Zl.test(Pa(t).function||"")&&t.pop()),t.slice(0,zl).map(r=>({...r,filename:r.filename||Pa(t).filename,function:r.function||$r}))}function Pa(e){return e[e.length-1]||{}}const Ii="<anonymous>";function rr(e){try{return!e||typeof e!="function"?Ii:e.name||Ii}catch{return Ii}}function ql(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}const Ia={},Kl={};function Ar(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t)}function kr(e,t){if(!Kl[e]){Kl[e]=!0;try{t()}catch(r){wr&&ge.error(`Error while instrumenting ${e}`,r)}}}function kt(e,t){const r=e&&Ia[e];if(r)for(const n of r)try{n(t)}catch(a){wr&&ge.error(`Error while triggering instrumentation handler.
2
+ (function(){if(typeof pt>"u")var pt={env:{}}})();(function(pt,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime","react-dom"],d):(pt=typeof globalThis<"u"?globalThis:pt||self,d(pt.CredifyInsuranceWidget={},pt.React,pt.ReactDOM,pt.React,pt.ReactDOM))})(this,(function(pt,d,v_,m,Vl){"use strict";function E_(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ti=E_(d),Te=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,tr="8.55.2",we=globalThis;function ka(e,t,r){const n=r||we,a=n.__SENTRY__=n.__SENTRY__||{},o=a[tr]=a[tr]||{};return o[e]||(o[e]=t())}const wr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,D_="Sentry Logger ",Pi=["debug","info","warn","error","log","assert","trace"],Ta={};function xr(e){if(!("console"in we))return e();const t=we.console,r={},n=Object.keys(Ta);n.forEach(a=>{const o=Ta[a];r[a]=t[a],t[a]=o});try{return e()}finally{n.forEach(a=>{t[a]=r[a]})}}function S_(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return wr?Pi.forEach(r=>{t[r]=(...n)=>{e&&xr(()=>{we.console[r](`${D_}[${r}]:`,...n)})}}):Pi.forEach(r=>{t[r]=()=>{}}),t}const ge=ka("logger",S_),zl=50,$r="?",jl=/\(error: (.*)\)/,Zl=/captureMessage|captureException/;function Gl(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,a=0)=>{const o=[],i=r.split(`
3
+ `);for(let s=n;s<i.length;s++){const u=i[s];if(u.length>1024)continue;const l=jl.test(u)?u.replace(jl,"$1"):u;if(!l.match(/\S*Error: /)){for(const c of t){const f=c(l);if(f){o.push(f);break}}if(o.length>=zl+a)break}}return w_(o.slice(a))}}function C_(e){return Array.isArray(e)?Gl(...e):e}function w_(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Pa(t).function||"")&&t.pop(),t.reverse(),Zl.test(Pa(t).function||"")&&(t.pop(),Zl.test(Pa(t).function||"")&&t.pop()),t.slice(0,zl).map(r=>({...r,filename:r.filename||Pa(t).filename,function:r.function||$r}))}function Pa(e){return e[e.length-1]||{}}const Ii="<anonymous>";function rr(e){try{return!e||typeof e!="function"?Ii:e.name||Ii}catch{return Ii}}function ql(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}const Ia={},Kl={};function Ar(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t)}function kr(e,t){if(!Kl[e]){Kl[e]=!0;try{t()}catch(r){wr&&ge.error(`Error while instrumenting ${e}`,r)}}}function kt(e,t){const r=e&&Ia[e];if(r)for(const n of r)try{n(t)}catch(a){wr&&ge.error(`Error while triggering instrumentation handler.
4
4
  Type: ${e}
5
5
  Name: ${rr(n)}
6
- Error:`,a)}}let Mi=null;function w_(e){const t="error";Ar(t,e),kr(t,x_)}function x_(){Mi=we.onerror,we.onerror=function(e,t,r,n,a){return kt("error",{column:n,error:a,line:r,msg:e,url:t}),Mi?Mi.apply(this,arguments):!1},we.onerror.__SENTRY_INSTRUMENTED__=!0}let Fi=null;function $_(e){const t="unhandledrejection";Ar(t,e),kr(t,A_)}function A_(){Fi=we.onunhandledrejection,we.onunhandledrejection=function(e){return kt("unhandledrejection",e),Fi?Fi.apply(this,arguments):!0},we.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ma(){return Oi(we),we}function Oi(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||tr,t[tr]=t[tr]||{}}const Yl=Object.prototype.toString;function Fa(e){switch(Yl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Tr(e,Error)}}function an(e,t){return Yl.call(e)===`[object ${t}]`}function Ql(e){return an(e,"ErrorEvent")}function Xl(e){return an(e,"DOMError")}function k_(e){return an(e,"DOMException")}function Nt(e){return an(e,"String")}function Bi(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Li(e){return e===null||Bi(e)||typeof e!="object"&&typeof e!="function"}function on(e){return an(e,"Object")}function Oa(e){return typeof Event<"u"&&Tr(e,Event)}function T_(e){return typeof Element<"u"&&Tr(e,Element)}function P_(e){return an(e,"RegExp")}function Ba(e){return!!(e&&e.then&&typeof e.then=="function")}function I_(e){return on(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Tr(e,t){try{return e instanceof t}catch{return!1}}function Wl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Ri=we,M_=80;function Jl(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,a=[];let o=0,i=0;const s=" > ",u=s.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||M_;for(;r&&o++<n&&(l=F_(r,c),!(l==="html"||o>1&&i+a.length*u+l.length>=f));)a.push(l),i+=l.length,r=r.parentNode;return a.reverse().join(s)}catch{return"<unknown>"}}function F_(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(Ri.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const a=t&&t.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(a&&a.length)a.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const i=r.className;if(i&&Nt(i)){const s=i.split(/\s+/);for(const u of s)n.push(`.${u}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const s=r.getAttribute(i);s&&n.push(`[${i}="${s}"]`)}return n.join("")}function O_(){try{return Ri.document.location.href}catch{return""}}function B_(e){if(!Ri.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function sn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ec(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const a=e[n];try{Wl(a)?r.push("[VueViewModel]"):r.push(String(a))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function L_(e,t,r=!1){return Nt(e)?P_(t)?t.test(e):Nt(t)?r?e===t:e.includes(t):!1:!1}function La(e,t=[],r=!1){return t.some(n=>L_(e,n,r))}function ht(e,t,r){if(!(t in e))return;const n=e[t],a=r(n);typeof a=="function"&&tc(a,n);try{e[t]=a}catch{wr&&ge.log(`Failed to replace method "${t}" in object`,e)}}function Pr(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{wr&&ge.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function tc(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Pr(e,"__sentry_original__",t)}catch{}}function Ni(e){return e.__sentry_original__}function rc(e){if(Fa(e))return{message:e.message,name:e.name,stack:e.stack,...ac(e)};if(Oa(e)){const t={type:e.type,target:nc(e.target),currentTarget:nc(e.currentTarget),...ac(e)};return typeof CustomEvent<"u"&&Tr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function nc(e){try{return T_(e)?Jl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ac(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function R_(e,t=40){const r=Object.keys(rc(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return sn(n,t);for(let a=r.length;a>0;a--){const o=r.slice(0,a).join(", ");if(!(o.length>t))return a===r.length?o:sn(o,t)}return""}function _t(e){return Ui(e,new Map)}function Ui(e,t){if(N_(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const a of Object.getOwnPropertyNames(e))typeof e[a]<"u"&&(n[a]=Ui(e[a],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(a=>{n.push(Ui(a,t))}),n}return e}function N_(e){if(!on(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const oc=1e3;function Ln(){return Date.now()/oc}function U_(){const{performance:e}=we;if(!e||!e.now)return Ln;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/oc}const Ut=U_();(()=>{const{performance:e}=we;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,o=a<t,i=e.timing&&e.timing.navigationStart,u=typeof i=="number"?Math.abs(i+r-n):t,l=u<t;return o||l?a<=u?e.timeOrigin:i:n})();function vt(){const e=we,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function ic(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function nr(e){const{message:t,event_id:r}=e;if(t)return t;const n=ic(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Hi(e,t,r){const n=e.exception=e.exception||{},a=n.values=n.values||[],o=a[0]=a[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function un(e,t){const r=ic(e);if(!r)return;const n={type:"generic",handled:!0},a=r.mechanism;if(r.mechanism={...n,...a,...t},t&&"data"in t){const o={...a&&a.data,...t.data};r.mechanism.data=o}}function sc(e){if(H_(e))return!0;try{Pr(e,"__sentry_captured__",!0)}catch{}return!1}function H_(e){try{return e.__sentry_captured__}catch{}}var Ht;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(Ht||(Ht={}));function Ir(e){return new Et(t=>{t(e)})}function Ra(e){return new Et((t,r)=>{r(e)})}class Et{constructor(t){Et.prototype.__init.call(this),Et.prototype.__init2.call(this),Et.prototype.__init3.call(this),Et.prototype.__init4.call(this),this._state=Ht.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Et((n,a)=>{this._handlers.push([!1,o=>{if(!t)n(o);else try{n(t(o))}catch(i){a(i)}},o=>{if(!r)a(o);else try{n(r(o))}catch(i){a(i)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new Et((r,n)=>{let a,o;return this.then(i=>{o=!1,a=i,t&&t()},i=>{o=!0,a=i,t&&t()}).then(()=>{if(o){n(a);return}r(a)})})}__init(){this._resolve=t=>{this._setResult(Ht.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ht.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Ht.PENDING){if(Ba(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ht.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Ht.RESOLVED&&r[1](this._value),this._state===Ht.REJECTED&&r[2](this._value),r[0]=!0)})}}}function V_(e){const t=Ut(),r={sid:vt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>j_(r)};return e&&ln(r,e),r}function ln(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ut(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:vt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function z_(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),ln(e,r)}function j_(e){return _t({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function uc(){return vt()}function Vi(){return vt().substring(16)}function Na(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const n={...e};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=Na(n[a],t[a],r-1));return n}const zi="_sentrySpan";function lc(e,t){t?Pr(e,zi,t):delete e[zi]}function cc(e){return e[zi]}const Z_=100;class ji{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:uc(),spanId:Vi()}}clone(){const t=new ji;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,lc(t,cc(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ln(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,[n,a]=r instanceof ar?[r.getScopeData(),r.getRequestSession()]:on(r)?[t,t.requestSession]:[],{tags:o,extra:i,user:s,contexts:u,level:l,fingerprint:c=[],propagationContext:f}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...u},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),c.length&&(this._fingerprint=c),f&&(this._propagationContext=f),a&&(this._requestSession=a),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,lc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:uc()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:Z_;if(n<=0)return this;const a={timestamp:Ln(),...t};return this._breadcrumbs.push(a),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:cc(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Na(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Vi(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:vt();if(!this._client)return ge.warn("No client configured on scope - will not capture exception!"),n;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...r,event_id:n},this),n}captureMessage(t,r,n){const a=n&&n.event_id?n.event_id:vt();if(!this._client)return ge.warn("No client configured on scope - will not capture message!"),a;const o=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:o,...n,event_id:a},this),a}captureEvent(t,r){const n=r&&r.event_id?r.event_id:vt();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(ge.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const ar=ji;function G_(){return ka("defaultCurrentScope",()=>new ar)}function q_(){return ka("defaultIsolationScope",()=>new ar)}class K_{constructor(t,r){let n;t?n=t:n=new ar;let a;r?a=r:a=new ar,this._stack=[{scope:n}],this._isolationScope=a}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(a){throw this._popScope(),a}return Ba(n)?n.then(a=>(this._popScope(),a),a=>{throw this._popScope(),a}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function cn(){const e=Ma(),t=Oi(e);return t.stack=t.stack||new K_(G_(),q_())}function Y_(e){return cn().withScope(e)}function Q_(e,t){const r=cn();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function dc(e){return cn().withScope(()=>e(cn().getIsolationScope()))}function X_(){return{withIsolationScope:dc,withScope:Y_,withSetScope:Q_,withSetIsolationScope:(e,t)=>dc(t),getCurrentScope:()=>cn().getScope(),getIsolationScope:()=>cn().getIsolationScope()}}function Zi(e){const t=Oi(e);return t.acs?t.acs:X_()}function It(){const e=Ma();return Zi(e).getCurrentScope()}function Mr(){const e=Ma();return Zi(e).getIsolationScope()}function W_(){return ka("globalScope",()=>new ar)}function Gi(...e){const t=Ma(),r=Zi(t);if(e.length===2){const[n,a]=e;return n?r.withSetScope(n,a):r.withScope(a)}return r.withScope(e[0])}function Ge(){return It().getClient()}function J_(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:a}=t;return _t({trace_id:r,span_id:n,parent_span_id:a})}const ev="_sentryMetrics";function tv(e){const t=e[ev];if(!t)return;const r={};for(const[,[n,a]]of t)(r[n]||(r[n]=[])).push(_t(a));return r}const rv="sentry.source",nv="sentry.sample_rate",av="sentry.op",ov="sentry.origin",iv=0,sv=1,uv="sentry-",lv=/^sentry-/;function cv(e){const t=dv(e);if(!t)return;const r=Object.entries(t).reduce((n,[a,o])=>{if(a.match(lv)){const i=a.slice(uv.length);n[i]=o}return n},{});if(Object.keys(r).length>0)return r}function dv(e){if(!(!e||!Nt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=fc(r);return Object.entries(n).forEach(([a,o])=>{t[a]=o}),t},{}):fc(e)}function fc(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const fv=1;let mc=!1;function mv(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),a=n?t:qi(e).parent_span_id,o=n?Vi():t;return _t({parent_span_id:a,span_id:o,trace_id:r})}function pc(e){return typeof e=="number"?hc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?hc(e.getTime()):Ut()}function hc(e){return e>9999999999?e/1e3:e}function qi(e){if(hv(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(pv(e)){const{attributes:n,startTime:a,name:o,endTime:i,parentSpanId:s,status:u}=e;return _t({span_id:t,trace_id:r,data:n,description:o,parent_span_id:s,start_timestamp:pc(a),timestamp:pc(i)||void 0,status:yv(u),op:n[av],origin:n[ov],_metrics_summary:tv(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function pv(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function hv(e){return typeof e.getSpanJSON=="function"}function gv(e){const{traceFlags:t}=e.spanContext();return t===fv}function yv(e){if(!(!e||e.code===iv))return e.code===sv?"ok":e.message||"unknown_error"}const bv="_sentryRootSpan";function gc(e){return e[bv]||e}function _v(){mc||(xr(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),mc=!0)}function vv(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ge(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const Ki="production",Ev="_frozenDsc";function yc(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},a=_t({environment:r.environment||Ki,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",a),a}function Dv(e,t){const r=t.getPropagationContext();return r.dsc||yc(r.traceId,e)}function Sv(e){const t=Ge();if(!t)return{};const r=gc(e),n=r[Ev];if(n)return n;const a=r.spanContext().traceState,o=a&&a.get("sentry.dsc"),i=o&&cv(o);if(i)return i;const s=yc(e.spanContext().traceId,t),u=qi(r),l=u.data||{},c=l[nv];c!=null&&(s.sample_rate=`${c}`);const f=l[rv],p=u.description;return f!=="url"&&p&&(s.transaction=p),vv()&&(s.sampled=String(gv(r))),t.emit("createDsc",s,r),s}function Cv(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){Te&&ge.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}const wv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xv(e){return e==="http"||e==="https"}function Rn(e,t=!1){const{host:r,path:n,pass:a,port:o,projectId:i,protocol:s,publicKey:u}=e;return`${s}://${u}${t&&a?`:${a}`:""}@${r}${o?`:${o}`:""}/${n&&`${n}/`}${i}`}function $v(e){const t=wv.exec(e);if(!t){xr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,a="",o="",i="",s=""]=t.slice(1);let u="",l=s;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const f=l.match(/^\d+/);f&&(l=f[0])}return bc({host:o,pass:a,path:u,projectId:l,port:i,protocol:r,publicKey:n})}function bc(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Av(e){if(!wr)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(ge.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?xv(n)?t&&isNaN(parseInt(t,10))?(ge.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(ge.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(ge.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function _c(e){const t=typeof e=="string"?$v(e):bc(e);if(!(!t||!Av(t)))return t}function kv(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let o=0;o<t.length;o++)if(t[o]===a)return!0;return t.push(a),!1}function n(a){if(e)t.delete(a);else for(let o=0;o<t.length;o++)if(t[o]===a){t.splice(o,1);break}}return[r,n]}function Vt(e,t=100,r=1/0){try{return Yi("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function vc(e,t=3,r=100*1024){const n=Vt(e,t);return Mv(n)>r?vc(e,t-1,r):n}function Yi(e,t,r=1/0,n=1/0,a=kv()){const[o,i]=a;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=Tv(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(u===0)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const h=l.toJSON();return Yi("",h,u-1,n,a)}catch{}const c=Array.isArray(t)?[]:{};let f=0;const p=rc(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(f>=n){c[h]="[MaxProperties ~]";break}const g=p[h];c[h]=Yi(h,g,u-1,n,a),f++}return i(t),c}function Tv(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Wl(t))return"[VueViewModel]";if(I_(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${rr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Pv(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Pv(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Iv(e){return~-encodeURI(e).split(/%..|./).length}function Mv(e){return Iv(JSON.stringify(e))}function Nn(e,t=[]){return[e,t]}function Fv(e,t){const[r,n]=e;return[r,[...n,t]]}function Ec(e,t){const r=e[1];for(const n of r){const a=n[0].type;if(t(n,a))return!0}return!1}function Qi(e){return we.__SENTRY__&&we.__SENTRY__.encodePolyfill?we.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Ov(e){const[t,r]=e;let n=JSON.stringify(t);function a(o){typeof n=="string"?n=typeof o=="string"?n+o:[Qi(n),o]:n.push(typeof o=="string"?Qi(o):o)}for(const o of r){const[i,s]=o;if(a(`
6
+ Error:`,a)}}let Mi=null;function x_(e){const t="error";Ar(t,e),kr(t,$_)}function $_(){Mi=we.onerror,we.onerror=function(e,t,r,n,a){return kt("error",{column:n,error:a,line:r,msg:e,url:t}),Mi?Mi.apply(this,arguments):!1},we.onerror.__SENTRY_INSTRUMENTED__=!0}let Fi=null;function A_(e){const t="unhandledrejection";Ar(t,e),kr(t,k_)}function k_(){Fi=we.onunhandledrejection,we.onunhandledrejection=function(e){return kt("unhandledrejection",e),Fi?Fi.apply(this,arguments):!0},we.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ma(){return Oi(we),we}function Oi(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||tr,t[tr]=t[tr]||{}}const Yl=Object.prototype.toString;function Fa(e){switch(Yl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Tr(e,Error)}}function an(e,t){return Yl.call(e)===`[object ${t}]`}function Ql(e){return an(e,"ErrorEvent")}function Xl(e){return an(e,"DOMError")}function T_(e){return an(e,"DOMException")}function Nt(e){return an(e,"String")}function Bi(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Li(e){return e===null||Bi(e)||typeof e!="object"&&typeof e!="function"}function on(e){return an(e,"Object")}function Oa(e){return typeof Event<"u"&&Tr(e,Event)}function P_(e){return typeof Element<"u"&&Tr(e,Element)}function I_(e){return an(e,"RegExp")}function Ba(e){return!!(e&&e.then&&typeof e.then=="function")}function M_(e){return on(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Tr(e,t){try{return e instanceof t}catch{return!1}}function Wl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Ri=we,F_=80;function Jl(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,a=[];let o=0,i=0;const s=" > ",u=s.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||F_;for(;r&&o++<n&&(l=O_(r,c),!(l==="html"||o>1&&i+a.length*u+l.length>=f));)a.push(l),i+=l.length,r=r.parentNode;return a.reverse().join(s)}catch{return"<unknown>"}}function O_(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(Ri.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const a=t&&t.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(a&&a.length)a.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const i=r.className;if(i&&Nt(i)){const s=i.split(/\s+/);for(const u of s)n.push(`.${u}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const s=r.getAttribute(i);s&&n.push(`[${i}="${s}"]`)}return n.join("")}function B_(){try{return Ri.document.location.href}catch{return""}}function L_(e){if(!Ri.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function sn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ec(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const a=e[n];try{Wl(a)?r.push("[VueViewModel]"):r.push(String(a))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function R_(e,t,r=!1){return Nt(e)?I_(t)?t.test(e):Nt(t)?r?e===t:e.includes(t):!1:!1}function La(e,t=[],r=!1){return t.some(n=>R_(e,n,r))}function ht(e,t,r){if(!(t in e))return;const n=e[t],a=r(n);typeof a=="function"&&tc(a,n);try{e[t]=a}catch{wr&&ge.log(`Failed to replace method "${t}" in object`,e)}}function Pr(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{wr&&ge.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function tc(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Pr(e,"__sentry_original__",t)}catch{}}function Ni(e){return e.__sentry_original__}function rc(e){if(Fa(e))return{message:e.message,name:e.name,stack:e.stack,...ac(e)};if(Oa(e)){const t={type:e.type,target:nc(e.target),currentTarget:nc(e.currentTarget),...ac(e)};return typeof CustomEvent<"u"&&Tr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function nc(e){try{return P_(e)?Jl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ac(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function N_(e,t=40){const r=Object.keys(rc(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return sn(n,t);for(let a=r.length;a>0;a--){const o=r.slice(0,a).join(", ");if(!(o.length>t))return a===r.length?o:sn(o,t)}return""}function _t(e){return Ui(e,new Map)}function Ui(e,t){if(U_(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const a of Object.getOwnPropertyNames(e))typeof e[a]<"u"&&(n[a]=Ui(e[a],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(a=>{n.push(Ui(a,t))}),n}return e}function U_(e){if(!on(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const oc=1e3;function Bn(){return Date.now()/oc}function H_(){const{performance:e}=we;if(!e||!e.now)return Bn;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/oc}const Ut=H_();(()=>{const{performance:e}=we;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,o=a<t,i=e.timing&&e.timing.navigationStart,u=typeof i=="number"?Math.abs(i+r-n):t,l=u<t;return o||l?a<=u?e.timeOrigin:i:n})();function vt(){const e=we,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function ic(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function nr(e){const{message:t,event_id:r}=e;if(t)return t;const n=ic(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Hi(e,t,r){const n=e.exception=e.exception||{},a=n.values=n.values||[],o=a[0]=a[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function un(e,t){const r=ic(e);if(!r)return;const n={type:"generic",handled:!0},a=r.mechanism;if(r.mechanism={...n,...a,...t},t&&"data"in t){const o={...a&&a.data,...t.data};r.mechanism.data=o}}function sc(e){if(V_(e))return!0;try{Pr(e,"__sentry_captured__",!0)}catch{}return!1}function V_(e){try{return e.__sentry_captured__}catch{}}var Ht;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(Ht||(Ht={}));function Ir(e){return new Et(t=>{t(e)})}function Ra(e){return new Et((t,r)=>{r(e)})}class Et{constructor(t){Et.prototype.__init.call(this),Et.prototype.__init2.call(this),Et.prototype.__init3.call(this),Et.prototype.__init4.call(this),this._state=Ht.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Et((n,a)=>{this._handlers.push([!1,o=>{if(!t)n(o);else try{n(t(o))}catch(i){a(i)}},o=>{if(!r)a(o);else try{n(r(o))}catch(i){a(i)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new Et((r,n)=>{let a,o;return this.then(i=>{o=!1,a=i,t&&t()},i=>{o=!0,a=i,t&&t()}).then(()=>{if(o){n(a);return}r(a)})})}__init(){this._resolve=t=>{this._setResult(Ht.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ht.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Ht.PENDING){if(Ba(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ht.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Ht.RESOLVED&&r[1](this._value),this._state===Ht.REJECTED&&r[2](this._value),r[0]=!0)})}}}function z_(e){const t=Ut(),r={sid:vt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Z_(r)};return e&&ln(r,e),r}function ln(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ut(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:vt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function j_(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),ln(e,r)}function Z_(e){return _t({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function uc(){return vt()}function Vi(){return vt().substring(16)}function Na(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const n={...e};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=Na(n[a],t[a],r-1));return n}const zi="_sentrySpan";function lc(e,t){t?Pr(e,zi,t):delete e[zi]}function cc(e){return e[zi]}const G_=100;class ji{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:uc(),spanId:Vi()}}clone(){const t=new ji;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,lc(t,cc(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ln(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,[n,a]=r instanceof ar?[r.getScopeData(),r.getRequestSession()]:on(r)?[t,t.requestSession]:[],{tags:o,extra:i,user:s,contexts:u,level:l,fingerprint:c=[],propagationContext:f}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...u},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),c.length&&(this._fingerprint=c),f&&(this._propagationContext=f),a&&(this._requestSession=a),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,lc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:uc()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:G_;if(n<=0)return this;const a={timestamp:Bn(),...t};return this._breadcrumbs.push(a),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:cc(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Na(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Vi(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:vt();if(!this._client)return ge.warn("No client configured on scope - will not capture exception!"),n;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...r,event_id:n},this),n}captureMessage(t,r,n){const a=n&&n.event_id?n.event_id:vt();if(!this._client)return ge.warn("No client configured on scope - will not capture message!"),a;const o=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:o,...n,event_id:a},this),a}captureEvent(t,r){const n=r&&r.event_id?r.event_id:vt();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(ge.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const ar=ji;function q_(){return ka("defaultCurrentScope",()=>new ar)}function K_(){return ka("defaultIsolationScope",()=>new ar)}class Y_{constructor(t,r){let n;t?n=t:n=new ar;let a;r?a=r:a=new ar,this._stack=[{scope:n}],this._isolationScope=a}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(a){throw this._popScope(),a}return Ba(n)?n.then(a=>(this._popScope(),a),a=>{throw this._popScope(),a}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function cn(){const e=Ma(),t=Oi(e);return t.stack=t.stack||new Y_(q_(),K_())}function Q_(e){return cn().withScope(e)}function X_(e,t){const r=cn();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function dc(e){return cn().withScope(()=>e(cn().getIsolationScope()))}function W_(){return{withIsolationScope:dc,withScope:Q_,withSetScope:X_,withSetIsolationScope:(e,t)=>dc(t),getCurrentScope:()=>cn().getScope(),getIsolationScope:()=>cn().getIsolationScope()}}function Zi(e){const t=Oi(e);return t.acs?t.acs:W_()}function It(){const e=Ma();return Zi(e).getCurrentScope()}function Mr(){const e=Ma();return Zi(e).getIsolationScope()}function J_(){return ka("globalScope",()=>new ar)}function Gi(...e){const t=Ma(),r=Zi(t);if(e.length===2){const[n,a]=e;return n?r.withSetScope(n,a):r.withScope(a)}return r.withScope(e[0])}function Ge(){return It().getClient()}function ev(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:a}=t;return _t({trace_id:r,span_id:n,parent_span_id:a})}const tv="_sentryMetrics";function rv(e){const t=e[tv];if(!t)return;const r={};for(const[,[n,a]]of t)(r[n]||(r[n]=[])).push(_t(a));return r}const nv="sentry.source",av="sentry.sample_rate",ov="sentry.op",iv="sentry.origin",sv=0,uv=1,lv="sentry-",cv=/^sentry-/;function dv(e){const t=fv(e);if(!t)return;const r=Object.entries(t).reduce((n,[a,o])=>{if(a.match(cv)){const i=a.slice(lv.length);n[i]=o}return n},{});if(Object.keys(r).length>0)return r}function fv(e){if(!(!e||!Nt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=fc(r);return Object.entries(n).forEach(([a,o])=>{t[a]=o}),t},{}):fc(e)}function fc(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const mv=1;let mc=!1;function pv(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),a=n?t:qi(e).parent_span_id,o=n?Vi():t;return _t({parent_span_id:a,span_id:o,trace_id:r})}function pc(e){return typeof e=="number"?hc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?hc(e.getTime()):Ut()}function hc(e){return e>9999999999?e/1e3:e}function qi(e){if(gv(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(hv(e)){const{attributes:n,startTime:a,name:o,endTime:i,parentSpanId:s,status:u}=e;return _t({span_id:t,trace_id:r,data:n,description:o,parent_span_id:s,start_timestamp:pc(a),timestamp:pc(i)||void 0,status:bv(u),op:n[ov],origin:n[iv],_metrics_summary:rv(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function hv(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function gv(e){return typeof e.getSpanJSON=="function"}function yv(e){const{traceFlags:t}=e.spanContext();return t===mv}function bv(e){if(!(!e||e.code===sv))return e.code===uv?"ok":e.message||"unknown_error"}const _v="_sentryRootSpan";function gc(e){return e[_v]||e}function vv(){mc||(xr(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),mc=!0)}function Ev(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ge(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const Ki="production",Dv="_frozenDsc";function yc(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},a=_t({environment:r.environment||Ki,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",a),a}function Sv(e,t){const r=t.getPropagationContext();return r.dsc||yc(r.traceId,e)}function Cv(e){const t=Ge();if(!t)return{};const r=gc(e),n=r[Dv];if(n)return n;const a=r.spanContext().traceState,o=a&&a.get("sentry.dsc"),i=o&&dv(o);if(i)return i;const s=yc(e.spanContext().traceId,t),u=qi(r),l=u.data||{},c=l[av];c!=null&&(s.sample_rate=`${c}`);const f=l[nv],p=u.description;return f!=="url"&&p&&(s.transaction=p),Ev()&&(s.sampled=String(yv(r))),t.emit("createDsc",s,r),s}function wv(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){Te&&ge.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}const xv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function $v(e){return e==="http"||e==="https"}function Ln(e,t=!1){const{host:r,path:n,pass:a,port:o,projectId:i,protocol:s,publicKey:u}=e;return`${s}://${u}${t&&a?`:${a}`:""}@${r}${o?`:${o}`:""}/${n&&`${n}/`}${i}`}function Av(e){const t=xv.exec(e);if(!t){xr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,a="",o="",i="",s=""]=t.slice(1);let u="",l=s;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const f=l.match(/^\d+/);f&&(l=f[0])}return bc({host:o,pass:a,path:u,projectId:l,port:i,protocol:r,publicKey:n})}function bc(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function kv(e){if(!wr)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(ge.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?$v(n)?t&&isNaN(parseInt(t,10))?(ge.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(ge.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(ge.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function _c(e){const t=typeof e=="string"?Av(e):bc(e);if(!(!t||!kv(t)))return t}function Tv(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let o=0;o<t.length;o++)if(t[o]===a)return!0;return t.push(a),!1}function n(a){if(e)t.delete(a);else for(let o=0;o<t.length;o++)if(t[o]===a){t.splice(o,1);break}}return[r,n]}function Vt(e,t=100,r=1/0){try{return Yi("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function vc(e,t=3,r=100*1024){const n=Vt(e,t);return Fv(n)>r?vc(e,t-1,r):n}function Yi(e,t,r=1/0,n=1/0,a=Tv()){const[o,i]=a;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=Pv(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(u===0)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const h=l.toJSON();return Yi("",h,u-1,n,a)}catch{}const c=Array.isArray(t)?[]:{};let f=0;const p=rc(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(f>=n){c[h]="[MaxProperties ~]";break}const g=p[h];c[h]=Yi(h,g,u-1,n,a),f++}return i(t),c}function Pv(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Wl(t))return"[VueViewModel]";if(M_(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${rr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Iv(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Iv(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Mv(e){return~-encodeURI(e).split(/%..|./).length}function Fv(e){return Mv(JSON.stringify(e))}function Rn(e,t=[]){return[e,t]}function Ov(e,t){const[r,n]=e;return[r,[...n,t]]}function Ec(e,t){const r=e[1];for(const n of r){const a=n[0].type;if(t(n,a))return!0}return!1}function Qi(e){return we.__SENTRY__&&we.__SENTRY__.encodePolyfill?we.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Bv(e){const[t,r]=e;let n=JSON.stringify(t);function a(o){typeof n=="string"?n=typeof o=="string"?n+o:[Qi(n),o]:n.push(typeof o=="string"?Qi(o):o)}for(const o of r){const[i,s]=o;if(a(`
7
7
  ${JSON.stringify(i)}
8
- `),typeof s=="string"||s instanceof Uint8Array)a(s);else{let u;try{u=JSON.stringify(s)}catch{u=JSON.stringify(Vt(s))}a(u)}}return typeof n=="string"?n:Bv(n)}function Bv(e){const t=e.reduce((a,o)=>a+o.length,0),r=new Uint8Array(t);let n=0;for(const a of e)r.set(a,n),n+=a.length;return r}function Lv(e){const t=typeof e.data=="string"?Qi(e.data):e.data;return[_t({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Rv={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Dc(e){return Rv[e]}function Sc(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function Nv(e,t,r,n){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:Rn(n)},...a&&{trace:_t({...a})}}}function Uv(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Hv(e,t,r,n){const a=Sc(r),o={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!n&&t&&{dsn:Rn(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Nn(o,[i])}function Vv(e,t,r,n){const a=Sc(r),o=e.type&&e.type!=="replay_event"?e.type:"event";Uv(e,r&&r.sdk);const i=Nv(e,a,n,t);return delete e.sdkProcessingMetadata,Nn(i,[[{type:o},e]])}function Xi(e,t,r,n=0){return new Et((a,o)=>{const i=e[n];if(t===null||typeof i!="function")a(t);else{const s=i({...t},r);Te&&i.id&&s===null&&ge.log(`Event processor "${i.id}" dropped event`),Ba(s)?s.then(u=>Xi(e,u,r,n+1).then(a)).then(null,o):Xi(e,s,r,n+1).then(a).then(null,o)}})}let Ua,Cc,Ha;function zv(e){const t=we._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return Ha&&r.length===Cc||(Cc=r.length,Ha=r.reduce((n,a)=>{Ua||(Ua={});const o=Ua[a];if(o)n[o[0]]=o[1];else{const i=e(a);for(let s=i.length-1;s>=0;s--){const u=i[s],l=u&&u.filename,c=t[a];if(l&&c){n[l]=c,Ua[a]=[l,c];break}}}return n},{})),Ha}function jv(e,t){const{fingerprint:r,span:n,breadcrumbs:a,sdkProcessingMetadata:o}=t;Zv(e,t),n&&Kv(e,n),Yv(e,r),Gv(e,a),qv(e,o)}function wc(e,t){const{extra:r,tags:n,user:a,contexts:o,level:i,sdkProcessingMetadata:s,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:f,propagationContext:p,transactionName:h,span:g}=t;Va(e,"extra",r),Va(e,"tags",n),Va(e,"user",a),Va(e,"contexts",o),e.sdkProcessingMetadata=Na(e.sdkProcessingMetadata,s,2),i&&(e.level=i),h&&(e.transactionName=h),g&&(e.span=g),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Va(e,t,r){e[t]=Na(e[t],r,1)}function Zv(e,t){const{extra:r,tags:n,user:a,contexts:o,level:i,transactionName:s}=t,u=_t(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=_t(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=_t(a);c&&Object.keys(c).length&&(e.user={...c,...e.user});const f=_t(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),i&&(e.level=i),s&&e.type!=="transaction"&&(e.transaction=s)}function Gv(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function qv(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Kv(e,t){e.contexts={trace:mv(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Sv(t),...e.sdkProcessingMetadata};const r=gc(t),n=qi(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function Yv(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Qv(e,t,r,n,a,o){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=e,u={...t,event_id:t.event_id||r.event_id||vt(),timestamp:t.timestamp||Ln()},l=r.integrations||e.integrations.map(_=>_.name);Xv(u,e),e4(u,l),a&&a.emit("applyFrameMetadata",t),t.type===void 0&&Wv(u,e.stackParser);const c=r4(n,r.captureContext);r.mechanism&&un(u,r.mechanism);const f=a?a.getEventProcessors():[],p=W_().getScopeData();if(o){const _=o.getScopeData();wc(p,_)}if(c){const _=c.getScopeData();wc(p,_)}const h=[...r.attachments||[],...p.attachments];h.length&&(r.attachments=h),jv(u,p);const g=[...f,...p.eventProcessors];return Xi(g,u,r).then(_=>(_&&Jv(_),typeof i=="number"&&i>0?t4(_,i,s):_))}function Xv(e,t){const{environment:r,release:n,dist:a,maxValueLength:o=250}=t;e.environment=e.environment||r||Ki,!e.release&&n&&(e.release=n),!e.dist&&a&&(e.dist=a),e.message&&(e.message=sn(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=sn(i.value,o));const s=e.request;s&&s.url&&(s.url=sn(s.url,o))}function Wv(e,t){const r=zv(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(a=>{r&&a.filename&&(a.debug_id=r[a.filename])})})}catch{}}function Jv(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([n,a])=>{r.push({type:"sourcemap",code_file:n,debug_id:a})})}function e4(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function t4(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>({...a,...a.data&&{data:Vt(a.data,t,r)}}))},...e.user&&{user:Vt(e.user,t,r)},...e.contexts&&{contexts:Vt(e.contexts,t,r)},...e.extra&&{extra:Vt(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Vt(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(a=>({...a,...a.data&&{data:Vt(a.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=Vt(e.contexts.flags,3,r)),n}function r4(e,t){if(!t)return e;const r=e?e.clone():new ar;return r.update(t),r}function n4(e){if(e)return a4(e)?{captureContext:e}:i4(e)?{captureContext:e}:e}function a4(e){return e instanceof ar||typeof e=="function"}const o4=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function i4(e){return Object.keys(e).some(t=>o4.includes(t))}function za(e,t){return It().captureException(e,n4(t))}function xc(e,t){return It().captureEvent(e,t)}function s4(e,t){Mr().setContext(e,t)}function u4(){return Mr().lastEventId()}function $c(e){const t=Ge(),r=Mr(),n=It(),{release:a,environment:o=Ki}=t&&t.getOptions()||{},{userAgent:i}=we.navigator||{},s=V_({release:a,environment:o,user:n.getUser()||r.getUser(),...i&&{userAgent:i},...e}),u=r.getSession();return u&&u.status==="ok"&&ln(u,{status:"exited"}),Ac(),r.setSession(s),n.setSession(s),s}function Ac(){const e=Mr(),t=It(),r=t.getSession()||e.getSession();r&&z_(r),kc(),e.setSession(),t.setSession()}function kc(){const e=Mr(),t=It(),r=Ge(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function Tc(e=!1){if(e){Ac();return}kc()}const l4="7";function Pc(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function c4(e){return`${Pc(e)}${e.projectId}/envelope/`}function d4(e,t){const r={sentry_version:l4};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function f4(e,t,r){return t||`${c4(e)}?${d4(e,r)}`}function m4(e,t){const r=_c(e);if(!r)return"";const n=`${Pc(r)}embed/error-page/`;let a=`dsn=${Rn(r)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(a+=`&name=${encodeURIComponent(i.name)}`),i.email&&(a+=`&email=${encodeURIComponent(i.email)}`)}else a+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${n}?${a}`}const Ic=[];function p4(e){const t={};return e.forEach(r=>{const{name:n}=r,a=t[n];a&&!a.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function h4(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){const i=r(t);n=Array.isArray(i)?i:[i]}else n=t;const a=p4(n),o=a.findIndex(i=>i.name==="Debug");if(o>-1){const[i]=a.splice(o,1);a.push(i)}return a}function g4(e,t){const r={};return t.forEach(n=>{n&&Fc(e,n,r)}),r}function Mc(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function Fc(e,t,r){if(r[t.name]){Te&&ge.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,Ic.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ic.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,o)=>n(a,o,e))}if(typeof t.processEvent=="function"){const n=t.processEvent.bind(t),a=Object.assign((o,i)=>n(o,i,e),{id:t.name});e.addEventProcessor(a)}Te&&ge.log(`Integration installed: ${t.name}`)}function y4(e){const t=Ge();if(!t){Te&&ge.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function UP(e){return e}function b4(e,t,r){const n=[{type:"client_report"},{timestamp:Ln(),discarded_events:e}];return Nn(t?{dsn:t}:{},[n])}class Tt extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const Oc="Not capturing exception because it's already been captured.";class _4{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_c(t.dsn):Te&&ge.warn("No DSN provided, client will not send events."),this._dsn){const a=f4(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:a})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find(a=>a in t&&t[a]==null);n&&xr(()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,r,n){const a=vt();if(sc(t))return Te&&ge.log(Oc),a;const o={event_id:a,...r};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,n))),o.event_id}captureMessage(t,r,n,a){const o={event_id:vt(),...n},i=Bi(t)?t:String(t),s=Li(t)?this.eventFromMessage(i,r,o):this.eventFromException(t,o);return this._process(s.then(u=>this._captureEvent(u,o,a))),o.event_id}captureEvent(t,r,n){const a=vt();if(r&&r.originalException&&sc(r.originalException))return Te&&ge.log(Oc),a;const o={event_id:a,...r},s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,s||n)),o.event_id}captureSession(t){typeof t.release!="string"?Te&&ge.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ln(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(a=>n&&a))):Ir(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];Fc(this,t,this._integrations),r||Mc(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=Vv(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of r.attachments||[])n=Fv(n,Lv(o));const a=this.sendEnvelope(n);a&&a.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const r=Hv(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const a=typeof n=="number"?n:1,o=`${t}:${r}`;Te&&ge.log(`Recording outcome: "${o}"${a>1?` (${a} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+a}}on(t,r){const n=this._hooks[t]=this._hooks[t]||[];return n.push(r),()=>{const a=n.indexOf(r);a>-1&&n.splice(a,1)}}emit(t,...r){const n=this._hooks[t];n&&n.forEach(a=>a(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(Te&&ge.error("Error while sending envelope:",r),r)):(Te&&ge.error("Transport disabled"),Ir({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=g4(this,t),Mc(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",a=!1;const o=r.exception&&r.exception.values;if(o){a=!0;for(const u of o){const l=u.mechanism;if(l&&l.handled===!1){n=!0;break}}}const i=t.status==="ok";(i&&t.errors===0||i&&n)&&(ln(t,{...n&&{status:"crashed"},errors:t.errors||Number(a||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Et(r=>{let n=0;const a=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),r(!0)):(n+=a,t&&n>=t&&(clearInterval(o),r(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n=It(),a=Mr()){const o=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&i.length>0&&(r.integrations=i),this.emit("preprocessEvent",t,r),t.type||a.setLastEventId(t.event_id||r.event_id),Qv(o,t,r,n,this,a).then(s=>{if(s===null)return s;s.contexts={trace:J_(n),...s.contexts};const u=Dv(this,n);return s.sdkProcessingMetadata={dynamicSamplingContext:u,...s.sdkProcessingMetadata},s})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(a=>a.event_id,a=>{Te&&(a instanceof Tt&&a.logLevel==="log"?ge.log(a.message):ge.warn(a))})}_processEvent(t,r,n){const a=this.getOptions(),{sampleRate:o}=a,i=Lc(t),s=Bc(t),u=t.type||"error",l=`before send for type \`${u}\``,c=typeof o>"u"?void 0:Cv(o);if(s&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",t),Ra(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=u==="replay_event"?"replay":u,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,h).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new Tt("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return g;const _=E4(this,a,g,r);return v4(_,l)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),i){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new Tt(`${l} returned \`null\`, will not send event.`,"log")}const y=n&&n.getSession();if(!i&&y&&this._updateSessionFromEvent(y,g),i){const D=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,w=g.spans?g.spans.length:0,b=D-w;b>0&&this.recordDroppedEvent("before_send","span",b)}const _=g.transaction_info;if(i&&_&&g.transaction!==t.transaction){const D="custom";g.transaction_info={..._,source:D}}return this.sendEvent(g,r),g}).then(null,g=>{throw g instanceof Tt?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
9
- Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{const[a,o]=r.split(":");return{reason:a,category:o,quantity:n}})}_flushOutcomes(){Te&&ge.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Te&&ge.log("No outcomes to send");return}if(!this._dsn){Te&&ge.log("No dsn provided, will not send outcomes");return}Te&&ge.log("Sending outcomes:",t);const r=b4(t,this._options.tunnel&&Rn(this._dsn));this.sendEnvelope(r)}}function v4(e,t){const r=`${t} must return \`null\` or a valid event.`;if(Ba(e))return e.then(n=>{if(!on(n)&&n!==null)throw new Tt(r);return n},n=>{throw new Tt(`${t} rejected with ${n}`)});if(!on(e)&&e!==null)throw new Tt(r);return e}function E4(e,t,r,n){const{beforeSend:a,beforeSendTransaction:o,beforeSendSpan:i}=t;if(Bc(r)&&a)return a(r,n);if(Lc(r)){if(r.spans&&i){const s=[];for(const u of r.spans){const l=i(u);l?s.push(l):(_v(),e.recordDroppedEvent("before_send","span"))}r.spans=s}if(o){if(r.spans){const s=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:s}}return o(r,n)}}return r}function Bc(e){return e.type===void 0}function Lc(e){return e.type==="transaction"}function D4(e,t){t.debug===!0&&(Te?ge.enable():xr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),It().update(t.initialScope);const n=new e(t);return S4(n),n.init(),n}function S4(e){It().setClient(e)}function C4(e){const t=[];function r(){return e===void 0||t.length<e}function n(i){return t.splice(t.indexOf(i),1)[0]||Promise.resolve(void 0)}function a(i){if(!r())return Ra(new Tt("Not adding Promise because buffer limit was reached."));const s=i();return t.indexOf(s)===-1&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function o(i){return new Et((s,u)=>{let l=t.length;if(!l)return s(!0);const c=setTimeout(()=>{i&&i>0&&s(!1)},i);t.forEach(f=>{Ir(f).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:t,add:a,drain:o}}const w4=60*1e3;function x4(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?w4:n-t}function $4(e,t){return e[t]||e.all||0}function A4(e,t,r=Date.now()){return $4(e,t)>r}function k4(e,{statusCode:t,headers:r},n=Date.now()){const a={...e},o=r&&r["x-sentry-rate-limits"],i=r&&r["retry-after"];if(o)for(const s of o.trim().split(",")){const[u,l,,,c]=s.split(":",5),f=parseInt(u,10),p=(isNaN(f)?60:f)*1e3;if(!l)a.all=n+p;else for(const h of l.split(";"))h==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(a[h]=n+p):a[h]=n+p}else i?a.all=n+x4(i,n):t===429&&(a.all=n+60*1e3);return a}const T4=64;function P4(e,t,r=C4(e.bufferSize||T4)){let n={};const a=i=>r.drain(i);function o(i){const s=[];if(Ec(i,(f,p)=>{const h=Dc(p);if(A4(n,h)){const g=Rc(f,p);e.recordDroppedEvent("ratelimit_backoff",h,g)}else s.push(f)}),s.length===0)return Ir({});const u=Nn(i[0],s),l=f=>{Ec(u,(p,h)=>{const g=Rc(p,h);e.recordDroppedEvent(f,Dc(h),g)})},c=()=>t({body:Ov(u)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&Te&&ge.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=k4(n,f),f),f=>{throw l("network_error"),f});return r.add(c).then(f=>f,f=>{if(f instanceof Tt)return Te&&ge.error("Skipped sending event because buffer is full."),l("queue_overflow"),Ir({});throw f})}return{send:o,flush:a}}function Rc(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Nc(e,t,r=[t],n="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:r.map(o=>({name:`${n}:@sentry/${o}`,version:tr})),version:tr}),e._metadata=a}const I4=100;function Fr(e,t){const r=Ge(),n=Mr();if(!r)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:o=I4}=r.getOptions();if(o<=0)return;const s={timestamp:Ln(),...e},u=a?xr(()=>a(s,t)):s;u!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",u,t),n.addBreadcrumb(u,o))}let Uc;const M4="FunctionToString",Hc=new WeakMap,F4=(()=>({name:M4,setupOnce(){Uc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ni(this),r=Hc.has(Ge())&&t!==void 0?t:this;return Uc.apply(r,e)}}catch{}},setup(e){Hc.set(e,!0)}})),O4=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],B4="InboundFilters",L4=((e={})=>({name:B4,processEvent(t,r,n){const a=n.getOptions(),o=R4(e,a);return N4(t,o)?null:t}}));function R4(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:O4],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function N4(e,t){return t.ignoreInternal&&Z4(e)?(Te&&ge.warn(`Event dropped due to being internal Sentry Error.
10
- Event: ${nr(e)}`),!0):U4(e,t.ignoreErrors)?(Te&&ge.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11
- Event: ${nr(e)}`),!0):q4(e)?(Te&&ge.warn(`Event dropped due to not having an error message, error type or stacktrace.
12
- Event: ${nr(e)}`),!0):H4(e,t.ignoreTransactions)?(Te&&ge.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
13
- Event: ${nr(e)}`),!0):V4(e,t.denyUrls)?(Te&&ge.warn(`Event dropped due to being matched by \`denyUrls\` option.
8
+ `),typeof s=="string"||s instanceof Uint8Array)a(s);else{let u;try{u=JSON.stringify(s)}catch{u=JSON.stringify(Vt(s))}a(u)}}return typeof n=="string"?n:Lv(n)}function Lv(e){const t=e.reduce((a,o)=>a+o.length,0),r=new Uint8Array(t);let n=0;for(const a of e)r.set(a,n),n+=a.length;return r}function Rv(e){const t=typeof e.data=="string"?Qi(e.data):e.data;return[_t({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Nv={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Dc(e){return Nv[e]}function Sc(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function Uv(e,t,r,n){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:Ln(n)},...a&&{trace:_t({...a})}}}function Hv(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Vv(e,t,r,n){const a=Sc(r),o={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!n&&t&&{dsn:Ln(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Rn(o,[i])}function zv(e,t,r,n){const a=Sc(r),o=e.type&&e.type!=="replay_event"?e.type:"event";Hv(e,r&&r.sdk);const i=Uv(e,a,n,t);return delete e.sdkProcessingMetadata,Rn(i,[[{type:o},e]])}function Xi(e,t,r,n=0){return new Et((a,o)=>{const i=e[n];if(t===null||typeof i!="function")a(t);else{const s=i({...t},r);Te&&i.id&&s===null&&ge.log(`Event processor "${i.id}" dropped event`),Ba(s)?s.then(u=>Xi(e,u,r,n+1).then(a)).then(null,o):Xi(e,s,r,n+1).then(a).then(null,o)}})}let Ua,Cc,Ha;function jv(e){const t=we._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return Ha&&r.length===Cc||(Cc=r.length,Ha=r.reduce((n,a)=>{Ua||(Ua={});const o=Ua[a];if(o)n[o[0]]=o[1];else{const i=e(a);for(let s=i.length-1;s>=0;s--){const u=i[s],l=u&&u.filename,c=t[a];if(l&&c){n[l]=c,Ua[a]=[l,c];break}}}return n},{})),Ha}function Zv(e,t){const{fingerprint:r,span:n,breadcrumbs:a,sdkProcessingMetadata:o}=t;Gv(e,t),n&&Yv(e,n),Qv(e,r),qv(e,a),Kv(e,o)}function wc(e,t){const{extra:r,tags:n,user:a,contexts:o,level:i,sdkProcessingMetadata:s,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:f,propagationContext:p,transactionName:h,span:g}=t;Va(e,"extra",r),Va(e,"tags",n),Va(e,"user",a),Va(e,"contexts",o),e.sdkProcessingMetadata=Na(e.sdkProcessingMetadata,s,2),i&&(e.level=i),h&&(e.transactionName=h),g&&(e.span=g),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Va(e,t,r){e[t]=Na(e[t],r,1)}function Gv(e,t){const{extra:r,tags:n,user:a,contexts:o,level:i,transactionName:s}=t,u=_t(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=_t(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=_t(a);c&&Object.keys(c).length&&(e.user={...c,...e.user});const f=_t(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),i&&(e.level=i),s&&e.type!=="transaction"&&(e.transaction=s)}function qv(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Kv(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Yv(e,t){e.contexts={trace:pv(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Cv(t),...e.sdkProcessingMetadata};const r=gc(t),n=qi(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function Qv(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Xv(e,t,r,n,a,o){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=e,u={...t,event_id:t.event_id||r.event_id||vt(),timestamp:t.timestamp||Bn()},l=r.integrations||e.integrations.map(_=>_.name);Wv(u,e),t4(u,l),a&&a.emit("applyFrameMetadata",t),t.type===void 0&&Jv(u,e.stackParser);const c=n4(n,r.captureContext);r.mechanism&&un(u,r.mechanism);const f=a?a.getEventProcessors():[],p=J_().getScopeData();if(o){const _=o.getScopeData();wc(p,_)}if(c){const _=c.getScopeData();wc(p,_)}const h=[...r.attachments||[],...p.attachments];h.length&&(r.attachments=h),Zv(u,p);const g=[...f,...p.eventProcessors];return Xi(g,u,r).then(_=>(_&&e4(_),typeof i=="number"&&i>0?r4(_,i,s):_))}function Wv(e,t){const{environment:r,release:n,dist:a,maxValueLength:o=250}=t;e.environment=e.environment||r||Ki,!e.release&&n&&(e.release=n),!e.dist&&a&&(e.dist=a),e.message&&(e.message=sn(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=sn(i.value,o));const s=e.request;s&&s.url&&(s.url=sn(s.url,o))}function Jv(e,t){const r=jv(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(a=>{r&&a.filename&&(a.debug_id=r[a.filename])})})}catch{}}function e4(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([n,a])=>{r.push({type:"sourcemap",code_file:n,debug_id:a})})}function t4(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function r4(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>({...a,...a.data&&{data:Vt(a.data,t,r)}}))},...e.user&&{user:Vt(e.user,t,r)},...e.contexts&&{contexts:Vt(e.contexts,t,r)},...e.extra&&{extra:Vt(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Vt(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(a=>({...a,...a.data&&{data:Vt(a.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=Vt(e.contexts.flags,3,r)),n}function n4(e,t){if(!t)return e;const r=e?e.clone():new ar;return r.update(t),r}function a4(e){if(e)return o4(e)?{captureContext:e}:s4(e)?{captureContext:e}:e}function o4(e){return e instanceof ar||typeof e=="function"}const i4=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function s4(e){return Object.keys(e).some(t=>i4.includes(t))}function za(e,t){return It().captureException(e,a4(t))}function xc(e,t){return It().captureEvent(e,t)}function u4(e,t){Mr().setContext(e,t)}function l4(){return Mr().lastEventId()}function $c(e){const t=Ge(),r=Mr(),n=It(),{release:a,environment:o=Ki}=t&&t.getOptions()||{},{userAgent:i}=we.navigator||{},s=z_({release:a,environment:o,user:n.getUser()||r.getUser(),...i&&{userAgent:i},...e}),u=r.getSession();return u&&u.status==="ok"&&ln(u,{status:"exited"}),Ac(),r.setSession(s),n.setSession(s),s}function Ac(){const e=Mr(),t=It(),r=t.getSession()||e.getSession();r&&j_(r),kc(),e.setSession(),t.setSession()}function kc(){const e=Mr(),t=It(),r=Ge(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function Tc(e=!1){if(e){Ac();return}kc()}const c4="7";function Pc(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function d4(e){return`${Pc(e)}${e.projectId}/envelope/`}function f4(e,t){const r={sentry_version:c4};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function m4(e,t,r){return t||`${d4(e)}?${f4(e,r)}`}function p4(e,t){const r=_c(e);if(!r)return"";const n=`${Pc(r)}embed/error-page/`;let a=`dsn=${Ln(r)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(a+=`&name=${encodeURIComponent(i.name)}`),i.email&&(a+=`&email=${encodeURIComponent(i.email)}`)}else a+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${n}?${a}`}const Ic=[];function h4(e){const t={};return e.forEach(r=>{const{name:n}=r,a=t[n];a&&!a.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function g4(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){const i=r(t);n=Array.isArray(i)?i:[i]}else n=t;const a=h4(n),o=a.findIndex(i=>i.name==="Debug");if(o>-1){const[i]=a.splice(o,1);a.push(i)}return a}function y4(e,t){const r={};return t.forEach(n=>{n&&Fc(e,n,r)}),r}function Mc(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function Fc(e,t,r){if(r[t.name]){Te&&ge.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,Ic.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ic.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,o)=>n(a,o,e))}if(typeof t.processEvent=="function"){const n=t.processEvent.bind(t),a=Object.assign((o,i)=>n(o,i,e),{id:t.name});e.addEventProcessor(a)}Te&&ge.log(`Integration installed: ${t.name}`)}function b4(e){const t=Ge();if(!t){Te&&ge.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function HP(e){return e}function _4(e,t,r){const n=[{type:"client_report"},{timestamp:Bn(),discarded_events:e}];return Rn(t?{dsn:t}:{},[n])}class Tt extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const Oc="Not capturing exception because it's already been captured.";class v4{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_c(t.dsn):Te&&ge.warn("No DSN provided, client will not send events."),this._dsn){const a=m4(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:a})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find(a=>a in t&&t[a]==null);n&&xr(()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,r,n){const a=vt();if(sc(t))return Te&&ge.log(Oc),a;const o={event_id:a,...r};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,n))),o.event_id}captureMessage(t,r,n,a){const o={event_id:vt(),...n},i=Bi(t)?t:String(t),s=Li(t)?this.eventFromMessage(i,r,o):this.eventFromException(t,o);return this._process(s.then(u=>this._captureEvent(u,o,a))),o.event_id}captureEvent(t,r,n){const a=vt();if(r&&r.originalException&&sc(r.originalException))return Te&&ge.log(Oc),a;const o={event_id:a,...r},s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,s||n)),o.event_id}captureSession(t){typeof t.release!="string"?Te&&ge.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ln(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(a=>n&&a))):Ir(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];Fc(this,t,this._integrations),r||Mc(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=zv(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of r.attachments||[])n=Ov(n,Rv(o));const a=this.sendEnvelope(n);a&&a.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const r=Vv(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const a=typeof n=="number"?n:1,o=`${t}:${r}`;Te&&ge.log(`Recording outcome: "${o}"${a>1?` (${a} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+a}}on(t,r){const n=this._hooks[t]=this._hooks[t]||[];return n.push(r),()=>{const a=n.indexOf(r);a>-1&&n.splice(a,1)}}emit(t,...r){const n=this._hooks[t];n&&n.forEach(a=>a(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(Te&&ge.error("Error while sending envelope:",r),r)):(Te&&ge.error("Transport disabled"),Ir({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=y4(this,t),Mc(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",a=!1;const o=r.exception&&r.exception.values;if(o){a=!0;for(const u of o){const l=u.mechanism;if(l&&l.handled===!1){n=!0;break}}}const i=t.status==="ok";(i&&t.errors===0||i&&n)&&(ln(t,{...n&&{status:"crashed"},errors:t.errors||Number(a||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Et(r=>{let n=0;const a=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),r(!0)):(n+=a,t&&n>=t&&(clearInterval(o),r(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n=It(),a=Mr()){const o=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&i.length>0&&(r.integrations=i),this.emit("preprocessEvent",t,r),t.type||a.setLastEventId(t.event_id||r.event_id),Xv(o,t,r,n,this,a).then(s=>{if(s===null)return s;s.contexts={trace:ev(n),...s.contexts};const u=Sv(this,n);return s.sdkProcessingMetadata={dynamicSamplingContext:u,...s.sdkProcessingMetadata},s})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(a=>a.event_id,a=>{Te&&(a instanceof Tt&&a.logLevel==="log"?ge.log(a.message):ge.warn(a))})}_processEvent(t,r,n){const a=this.getOptions(),{sampleRate:o}=a,i=Lc(t),s=Bc(t),u=t.type||"error",l=`before send for type \`${u}\``,c=typeof o>"u"?void 0:wv(o);if(s&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",t),Ra(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=u==="replay_event"?"replay":u,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,h).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new Tt("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return g;const _=D4(this,a,g,r);return E4(_,l)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),i){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new Tt(`${l} returned \`null\`, will not send event.`,"log")}const y=n&&n.getSession();if(!i&&y&&this._updateSessionFromEvent(y,g),i){const D=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,w=g.spans?g.spans.length:0,b=D-w;b>0&&this.recordDroppedEvent("before_send","span",b)}const _=g.transaction_info;if(i&&_&&g.transaction!==t.transaction){const D="custom";g.transaction_info={..._,source:D}}return this.sendEvent(g,r),g}).then(null,g=>{throw g instanceof Tt?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
9
+ Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{const[a,o]=r.split(":");return{reason:a,category:o,quantity:n}})}_flushOutcomes(){Te&&ge.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Te&&ge.log("No outcomes to send");return}if(!this._dsn){Te&&ge.log("No dsn provided, will not send outcomes");return}Te&&ge.log("Sending outcomes:",t);const r=_4(t,this._options.tunnel&&Ln(this._dsn));this.sendEnvelope(r)}}function E4(e,t){const r=`${t} must return \`null\` or a valid event.`;if(Ba(e))return e.then(n=>{if(!on(n)&&n!==null)throw new Tt(r);return n},n=>{throw new Tt(`${t} rejected with ${n}`)});if(!on(e)&&e!==null)throw new Tt(r);return e}function D4(e,t,r,n){const{beforeSend:a,beforeSendTransaction:o,beforeSendSpan:i}=t;if(Bc(r)&&a)return a(r,n);if(Lc(r)){if(r.spans&&i){const s=[];for(const u of r.spans){const l=i(u);l?s.push(l):(vv(),e.recordDroppedEvent("before_send","span"))}r.spans=s}if(o){if(r.spans){const s=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:s}}return o(r,n)}}return r}function Bc(e){return e.type===void 0}function Lc(e){return e.type==="transaction"}function S4(e,t){t.debug===!0&&(Te?ge.enable():xr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),It().update(t.initialScope);const n=new e(t);return C4(n),n.init(),n}function C4(e){It().setClient(e)}function w4(e){const t=[];function r(){return e===void 0||t.length<e}function n(i){return t.splice(t.indexOf(i),1)[0]||Promise.resolve(void 0)}function a(i){if(!r())return Ra(new Tt("Not adding Promise because buffer limit was reached."));const s=i();return t.indexOf(s)===-1&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function o(i){return new Et((s,u)=>{let l=t.length;if(!l)return s(!0);const c=setTimeout(()=>{i&&i>0&&s(!1)},i);t.forEach(f=>{Ir(f).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:t,add:a,drain:o}}const x4=60*1e3;function $4(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?x4:n-t}function A4(e,t){return e[t]||e.all||0}function k4(e,t,r=Date.now()){return A4(e,t)>r}function T4(e,{statusCode:t,headers:r},n=Date.now()){const a={...e},o=r&&r["x-sentry-rate-limits"],i=r&&r["retry-after"];if(o)for(const s of o.trim().split(",")){const[u,l,,,c]=s.split(":",5),f=parseInt(u,10),p=(isNaN(f)?60:f)*1e3;if(!l)a.all=n+p;else for(const h of l.split(";"))h==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(a[h]=n+p):a[h]=n+p}else i?a.all=n+$4(i,n):t===429&&(a.all=n+60*1e3);return a}const P4=64;function I4(e,t,r=w4(e.bufferSize||P4)){let n={};const a=i=>r.drain(i);function o(i){const s=[];if(Ec(i,(f,p)=>{const h=Dc(p);if(k4(n,h)){const g=Rc(f,p);e.recordDroppedEvent("ratelimit_backoff",h,g)}else s.push(f)}),s.length===0)return Ir({});const u=Rn(i[0],s),l=f=>{Ec(u,(p,h)=>{const g=Rc(p,h);e.recordDroppedEvent(f,Dc(h),g)})},c=()=>t({body:Bv(u)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&Te&&ge.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=T4(n,f),f),f=>{throw l("network_error"),f});return r.add(c).then(f=>f,f=>{if(f instanceof Tt)return Te&&ge.error("Skipped sending event because buffer is full."),l("queue_overflow"),Ir({});throw f})}return{send:o,flush:a}}function Rc(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Nc(e,t,r=[t],n="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:r.map(o=>({name:`${n}:@sentry/${o}`,version:tr})),version:tr}),e._metadata=a}const M4=100;function Fr(e,t){const r=Ge(),n=Mr();if(!r)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:o=M4}=r.getOptions();if(o<=0)return;const s={timestamp:Bn(),...e},u=a?xr(()=>a(s,t)):s;u!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",u,t),n.addBreadcrumb(u,o))}let Uc;const F4="FunctionToString",Hc=new WeakMap,O4=(()=>({name:F4,setupOnce(){Uc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ni(this),r=Hc.has(Ge())&&t!==void 0?t:this;return Uc.apply(r,e)}}catch{}},setup(e){Hc.set(e,!0)}})),B4=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],L4="InboundFilters",R4=((e={})=>({name:L4,processEvent(t,r,n){const a=n.getOptions(),o=N4(e,a);return U4(t,o)?null:t}}));function N4(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:B4],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function U4(e,t){return t.ignoreInternal&&G4(e)?(Te&&ge.warn(`Event dropped due to being internal Sentry Error.
10
+ Event: ${nr(e)}`),!0):H4(e,t.ignoreErrors)?(Te&&ge.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11
+ Event: ${nr(e)}`),!0):K4(e)?(Te&&ge.warn(`Event dropped due to not having an error message, error type or stacktrace.
12
+ Event: ${nr(e)}`),!0):V4(e,t.ignoreTransactions)?(Te&&ge.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
13
+ Event: ${nr(e)}`),!0):z4(e,t.denyUrls)?(Te&&ge.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
14
  Event: ${nr(e)}.
15
- Url: ${ja(e)}`),!0):z4(e,t.allowUrls)?!1:(Te&&ge.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
+ Url: ${ja(e)}`),!0):j4(e,t.allowUrls)?!1:(Te&&ge.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
16
  Event: ${nr(e)}.
17
- Url: ${ja(e)}`),!0)}function U4(e,t){return e.type||!t||!t.length?!1:j4(e).some(r=>La(r,t))}function H4(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?La(r,t):!1}function V4(e,t){if(!t||!t.length)return!1;const r=ja(e);return r?La(r,t):!1}function z4(e,t){if(!t||!t.length)return!0;const r=ja(e);return r?La(r,t):!0}function j4(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function Z4(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function G4(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function ja(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?G4(t):null}catch{return Te&&ge.error(`Cannot extract url for event ${nr(e)}`),null}}function q4(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function K4(e,t,r=250,n,a,o,i){if(!o.exception||!o.exception.values||!i||!Tr(i.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Y4(Wi(e,t,a,i.originalException,n,o.exception.values,s,0),r))}function Wi(e,t,r,n,a,o,i,s){if(o.length>=r+1)return o;let u=[...o];if(Tr(n[a],Error)){Vc(i,s);const l=e(t,n[a]),c=u.length;zc(l,a,c,s),u=Wi(e,t,r,n[a],a,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Tr(l,Error)){Vc(i,s);const f=e(t,l),p=u.length;zc(f,`errors[${c}]`,p,s),u=Wi(e,t,r,l,a,[f,...u],f,p)}}),u}function Vc(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function zc(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function Y4(e,t){return e.map(r=>(r.value&&(r.value=sn(r.value,t)),r))}function Ji(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function Q4(e){const t="console";Ar(t,e),kr(t,X4)}function X4(){"console"in we&&Pi.forEach(function(e){e in we.console&&ht(we.console,e,function(t){return Ta[e]=t,function(...r){kt("console",{args:r,level:e});const a=Ta[e];a&&a.apply(we.console,r)}})})}function W4(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const J4="Dedupe",e3=(()=>{let e;return{name:J4,processEvent(t){if(t.type)return t;try{if(t3(t,e))return Te&&ge.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function t3(e,t){return t?!!(r3(e,t)||n3(e,t)):!1}function r3(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Zc(e,t)||!jc(e,t))}function n3(e,t){const r=Gc(t),n=Gc(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Zc(e,t)||!jc(e,t))}function jc(e,t){let r=ql(e),n=ql(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let a=0;a<n.length;a++){const o=n[a],i=r[a];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Zc(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Gc(e){return e.exception&&e.exception.values&&e.exception.values[0]}function qc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const es=we;function Kc(){if(!("fetch"in es))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ts(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function a3(){if(typeof EdgeRuntime=="string")return!0;if(!Kc())return!1;if(ts(es.fetch))return!0;let e=!1;const t=es.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=ts(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){wr&&ge.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function o3(e,t){const r="fetch";Ar(r,e),kr(r,()=>i3(void 0,t))}function i3(e,t=!1){t&&!a3()||ht(we,"fetch",function(r){return function(...n){const a=new Error,{method:o,url:i}=s3(n),s={args:n,fetchData:{method:o,url:i},startTimestamp:Ut()*1e3,virtualError:a};return kt("fetch",{...s}),r.apply(we,n).then(async u=>(kt("fetch",{...s,endTimestamp:Ut()*1e3,response:u}),u),u=>{throw kt("fetch",{...s,endTimestamp:Ut()*1e3,error:u}),Fa(u)&&u.stack===void 0&&(u.stack=a.stack,Pr(u,"framesToPop",1)),u})}})}function rs(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Yc(e){return typeof e=="string"?e:e?rs(e,"url")?e.url:e.toString?e.toString():"":""}function s3(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:Yc(r),method:rs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Yc(t),method:rs(t,"method")?String(t.method).toUpperCase():"GET"}}function u3(){return"npm"}const Za=we;function l3(){const e=Za.chrome,t=e&&e.app&&e.app.runtime,r="history"in Za&&!!Za.history.pushState&&!!Za.history.replaceState;return!t&&r}const Ee=we;let ns=0;function Qc(){return ns>0}function c3(){ns++,setTimeout(()=>{ns--})}function dn(e,t={}){function r(a){return typeof a=="function"}if(!r(e))return e;try{const a=e.__sentry_wrapped__;if(a)return typeof a=="function"?a:e;if(Ni(e))return e}catch{return e}const n=function(...a){try{const o=a.map(i=>dn(i,t));return e.apply(this,o)}catch(o){throw c3(),Gi(i=>{i.addEventProcessor(s=>(t.mechanism&&(Hi(s,void 0),un(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),za(o)}),o}};try{for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}catch{}tc(n,e),Pr(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const or=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function as(e,t){const r=is(e,t),n={type:h3(t),value:g3(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function d3(e,t,r,n){const a=Ge(),o=a&&a.getOptions().normalizeDepth,i=E3(t),s={__serialized__:vc(t,o)};if(i)return{exception:{values:[as(e,i)]},extra:s};const u={exception:{values:[{type:Oa(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:_3(t,{isUnhandledRejection:n})}]},extra:s};if(r){const l=is(e,r);l.length&&(u.exception.values[0].stacktrace={frames:l})}return u}function os(e,t){return{exception:{values:[as(e,t)]}}}function is(e,t){const r=t.stacktrace||t.stack||"",n=m3(t),a=p3(t);try{return e(r,n,a)}catch{}return[]}const f3=/Minified React error #\d+;/i;function m3(e){return e&&f3.test(e.message)?1:0}function p3(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Xc(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function h3(e){const t=e&&e.name;return!t&&Xc(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function g3(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Xc(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function y3(e,t,r,n){const a=r&&r.syntheticException||void 0,o=ss(e,t,a,n);return un(o),o.level="error",r&&r.event_id&&(o.event_id=r.event_id),Ir(o)}function b3(e,t,r="info",n,a){const o=n&&n.syntheticException||void 0,i=us(e,t,o,a);return i.level=r,n&&n.event_id&&(i.event_id=n.event_id),Ir(i)}function ss(e,t,r,n,a){let o;if(Ql(t)&&t.error)return os(e,t.error);if(Xl(t)||k_(t)){const i=t;if("stack"in t)o=os(e,t);else{const s=i.name||(Xl(i)?"DOMError":"DOMException"),u=i.message?`${s}: ${i.message}`:s;o=us(e,u,r,n),Hi(o,u)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Fa(t)?os(e,t):on(t)||Oa(t)?(o=d3(e,t,r,a),un(o,{synthetic:!0}),o):(o=us(e,t,r,n),Hi(o,`${t}`),un(o,{synthetic:!0}),o)}function us(e,t,r,n){const a={};if(n&&r){const o=is(e,r);o.length&&(a.exception={values:[{value:t,stacktrace:{frames:o}}]}),un(a,{synthetic:!0})}if(Bi(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return a.logentry={message:o,params:i},a}return a.message=t,a}function _3(e,{isUnhandledRejection:t}){const r=R_(e),n=t?"promise rejection":"exception";return Ql(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Oa(e)?`Event \`${v3(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function v3(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function E3(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function D3(e,{metadata:t,tunnel:r,dsn:n}){const a={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:Rn(n)}},o=S3(e);return Nn(a,[o])}function S3(e){return[{type:"user_report"},e]}class C3 extends _4{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=Ee.SENTRY_SDK_SOURCE||u3();Nc(r,"browser",["browser"],n),super(r),r.sendClientReports&&Ee.document&&Ee.document.addEventListener("visibilitychange",()=>{Ee.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return y3(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return b3(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){or&&ge.warn("SDK not enabled, will not capture user feedback.");return}const r=D3(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}}const w3=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rt=we,x3=1e3;let Wc,ls,cs;function $3(e){Ar("dom",e),kr("dom",A3)}function A3(){if(!rt.document)return;const e=kt.bind(null,"dom"),t=Jc(e,!0);rt.document.addEventListener("click",t,!1),rt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const a=rt[r],o=a&&a.prototype;!o||!o.hasOwnProperty||!o.hasOwnProperty("addEventListener")||(ht(o,"addEventListener",function(i){return function(s,u,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=c[s]=c[s]||{refCount:0};if(!f.handler){const p=Jc(e);f.handler=p,i.call(this,s,p,l)}f.refCount++}catch{}return i.call(this,s,u,l)}}),ht(o,"removeEventListener",function(i){return function(s,u,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},f=c[s];f&&(f.refCount--,f.refCount<=0&&(i.call(this,s,f.handler,l),f.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,u,l)}}))})}function k3(e){if(e.type!==ls)return!1;try{if(!e.target||e.target._sentryId!==cs)return!1}catch{}return!0}function T3(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Jc(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=P3(r);if(T3(r.type,n))return;Pr(r,"_sentryCaptured",!0),n&&!n._sentryId&&Pr(n,"_sentryId",vt());const a=r.type==="keypress"?"input":r.type;k3(r)||(e({event:r,name:a,global:t}),ls=r.type,cs=n?n._sentryId:void 0),clearTimeout(Wc),Wc=rt.setTimeout(()=>{cs=void 0,ls=void 0},x3)}}function P3(e){try{return e.target}catch{return null}}let Ga;function ed(e){const t="history";Ar(t,e),kr(t,I3)}function I3(){if(!l3())return;const e=rt.onpopstate;rt.onpopstate=function(...r){const n=rt.location.href,a=Ga;if(Ga=n,kt("history",{from:a,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const a=n.length>2?n[2]:void 0;if(a){const o=Ga,i=String(a);Ga=i,kt("history",{from:o,to:i})}return r.apply(this,n)}}ht(rt.history,"pushState",t),ht(rt.history,"replaceState",t)}const qa={};function M3(e){const t=qa[e];if(t)return t;let r=rt[e];if(ts(r))return qa[e]=r.bind(rt);const n=rt.document;if(n&&typeof n.createElement=="function")try{const a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a);const o=a.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(a)}catch(a){w3&&ge.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,a)}return r&&(qa[e]=r.bind(rt))}function td(e){qa[e]=void 0}const Un="__sentry_xhr_v3__";function F3(e){Ar("xhr",e),kr("xhr",O3)}function O3(){if(!rt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const a=new Error,o=Ut()*1e3,i=Nt(n[0])?n[0].toUpperCase():void 0,s=B3(n[1]);if(!i||!s)return t.apply(r,n);r[Un]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const u=()=>{const l=r[Un];if(l&&r.readyState===4){try{l.status_code=r.status}catch{}const c={endTimestamp:Ut()*1e3,startTimestamp:o,xhr:r,virtualError:a};kt("xhr",c)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(l,c,f){return u(),l.apply(c,f)}}):r.addEventListener("readystatechange",u),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(l,c,f){const[p,h]=f,g=c[Un];return g&&Nt(p)&&Nt(h)&&(g.request_headers[p.toLowerCase()]=h),l.apply(c,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const a=r[Un];if(!a)return t.apply(r,n);n[0]!==void 0&&(a.body=n[0]);const o={startTimestamp:Ut()*1e3,xhr:r};return kt("xhr",o),t.apply(r,n)}})}function B3(e){if(Nt(e))return e;try{return e.toString()}catch{}}function L3(e,t=M3("fetch")){let r=0,n=0;function a(o){const i=o.body.length;r+=i,n++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return td("fetch"),Ra("No fetch implementation available");try{return t(e.url,s).then(u=>(r-=i,n--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return td("fetch"),r-=i,n--,Ra(u)}}return P4(e,a)}const R3=30,N3=50;function ds(e,t,r,n){const a={filename:e,function:t==="<anonymous>"?$r:t,in_app:!0};return r!==void 0&&(a.lineno=r),n!==void 0&&(a.colno=n),a}const U3=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,H3=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,V3=/\((\S*)(?::(\d+))(?::(\d+))\)/,z3=[R3,e=>{const t=U3.exec(e);if(t){const[,n,a,o]=t;return ds(n,$r,+a,+o)}const r=H3.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const i=V3.exec(r[2]);i&&(r[2]=i[1],r[3]=i[2],r[4]=i[3])}const[a,o]=rd(r[1]||$r,r[2]);return ds(o,a,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],j3=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Z3=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,G3=Gl(...[z3,[N3,e=>{const t=j3.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=Z3.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let n=t[3],a=t[1]||$r;return[a,n]=rd(a,n),ds(n,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),rd=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:$r,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ka=1024,q3="Breadcrumbs",K3=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:q3,setup(r){t.console&&Q4(X3(r)),t.dom&&$3(Q3(r,t.dom)),t.xhr&&F3(W3(r)),t.fetch&&o3(J3(r)),t.history&&ed(e1(r)),t.sentry&&r.on("beforeSendEvent",Y3(r))}}});function Y3(e){return function(r){Ge()===e&&Fr({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:nr(r)},{event:r})}}function Q3(e,t){return function(n){if(Ge()!==e)return;let a,o,i=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>Ka&&(or&&ge.warn(`\`dom.maxStringLength\` cannot exceed ${Ka}, but a value of ${s} was configured. Sentry will use ${Ka} instead.`),s=Ka),typeof i=="string"&&(i=[i]);try{const l=n.event,c=t1(l)?l.target:l;a=Jl(c,{keyAttrs:i,maxStringLength:s}),o=B_(c)}catch{a="<unknown>"}if(a.length===0)return;const u={category:`ui.${n.name}`,message:a};o&&(u.data={"ui.component_name":o}),Fr(u,{event:n.event,name:n.name,global:n.global})}}function X3(e){return function(r){if(Ge()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:W4(r.level),message:ec(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${ec(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Fr(n,{input:r.args,level:r.level})}}function W3(e){return function(r){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:a}=r,o=r.xhr[Un];if(!n||!a||!o)return;const{method:i,url:s,status_code:u,body:l}=o,c={method:i,url:s,status_code:u},f={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:a},p=qc(u);Fr({category:"xhr",data:c,type:"http",level:p},f)}}function J3(e){return function(r){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:a}=r;if(a&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const o=r.fetchData,i={data:r.error,input:r.args,startTimestamp:n,endTimestamp:a};Fr({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=r.response,i={...r.fetchData,status_code:o&&o.status},s={input:r.args,response:o,startTimestamp:n,endTimestamp:a},u=qc(i.status_code);Fr({category:"fetch",data:i,type:"http",level:u},s)}}}function e1(e){return function(r){if(Ge()!==e)return;let n=r.from,a=r.to;const o=Ji(Ee.location.href);let i=n?Ji(n):void 0;const s=Ji(a);(!i||!i.path)&&(i=o),o.protocol===s.protocol&&o.host===s.host&&(a=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Fr({category:"navigation",data:{from:n,to:a}})}}function t1(e){return!!e&&!!e.target}const r1=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],n1="BrowserApiErrors",a1=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:n1,setupOnce(){t.setTimeout&&ht(Ee,"setTimeout",nd),t.setInterval&&ht(Ee,"setInterval",nd),t.requestAnimationFrame&&ht(Ee,"requestAnimationFrame",o1),t.XMLHttpRequest&&"XMLHttpRequest"in Ee&&ht(XMLHttpRequest.prototype,"send",i1);const r=t.eventTarget;r&&(Array.isArray(r)?r:r1).forEach(s1)}}});function nd(e){return function(...t){const r=t[0];return t[0]=dn(r,{mechanism:{data:{function:rr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function o1(e){return function(t){return e.apply(this,[dn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:rr(e)},handled:!1,type:"instrument"}})])}}function i1(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in r&&typeof r[a]=="function"&&ht(r,a,function(o){const i={mechanism:{data:{function:a,handler:rr(o)},handled:!1,type:"instrument"}},s=Ni(o);return s&&(i.mechanism.data.handler=rr(s)),dn(o,i)})}),e.apply(this,t)}}function s1(e){const r=Ee[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ht(n,"addEventListener",function(a){return function(o,i,s){try{u1(i)&&(i.handleEvent=dn(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:rr(i),target:e},handled:!1,type:"instrument"}}))}catch{}return a.apply(this,[o,dn(i,{mechanism:{data:{function:"addEventListener",handler:rr(i),target:e},handled:!1,type:"instrument"}}),s])}}),ht(n,"removeEventListener",function(a){return function(o,i,s){try{const u=i.__sentry_wrapped__;u&&a.call(this,o,u,s)}catch{}return a.call(this,o,i,s)}}))}function u1(e){return typeof e.handleEvent=="function"}const l1=()=>({name:"BrowserSession",setupOnce(){if(typeof Ee.document>"u"){or&&ge.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}$c({ignoreDuration:!0}),Tc(),ed(({from:e,to:t})=>{e!==void 0&&e!==t&&($c({ignoreDuration:!0}),Tc())})}}),c1="GlobalHandlers",d1=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:c1,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(f1(r),ad("onerror")),t.onunhandledrejection&&(m1(r),ad("onunhandledrejection"))}}});function f1(e){w_(t=>{const{stackParser:r,attachStacktrace:n}=od();if(Ge()!==e||Qc())return;const{msg:a,url:o,line:i,column:s,error:u}=t,l=g1(ss(r,u||a,void 0,n,!1),o,i,s);l.level="error",xc(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function m1(e){$_(t=>{const{stackParser:r,attachStacktrace:n}=od();if(Ge()!==e||Qc())return;const a=p1(t),o=Li(a)?h1(a):ss(r,a,void 0,n,!0);o.level="error",xc(o,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function p1(e){if(Li(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function h1(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function g1(e,t,r,n){const a=e.exception=e.exception||{},o=a.values=a.values||[],i=o[0]=o[0]||{},s=i.stacktrace=i.stacktrace||{},u=s.frames=s.frames||[],l=n,c=r,f=Nt(t)&&t.length>0?t:O_();return u.length===0&&u.push({colno:l,filename:f,function:$r,in_app:!0,lineno:c}),e}function ad(e){or&&ge.log(`Global Handler attached: ${e}`)}function od(){const e=Ge();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const y1=()=>({name:"HttpContext",preprocessEvent(e){if(!Ee.navigator&&!Ee.location&&!Ee.document)return;const t=e.request&&e.request.url||Ee.location&&Ee.location.href,{referrer:r}=Ee.document||{},{userAgent:n}=Ee.navigator||{},a={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},o={...e.request,...t&&{url:t},headers:a};e.request=o}}),b1="cause",_1=5,v1="LinkedErrors",E1=((e={})=>{const t=e.limit||_1,r=e.key||b1;return{name:v1,preprocessEvent(n,a,o){const i=o.getOptions();K4(as,i.stackParser,i.maxValueLength,r,t,n,a)}}});function D1(e){const t=[L4(),F4(),a1(),K3(),d1(),E1(),e3(),y1()];return e.autoSessionTracking!==!1&&t.push(l1()),t}function S1(e={}){const t={defaultIntegrations:D1(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ee.SENTRY_RELEASE&&Ee.SENTRY_RELEASE.id?Ee.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function C1(){const e=typeof Ee.window<"u"&&Ee;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,a=Ee.location&&Ee.location.href||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],i=!!n&&Ee===Ee.top&&o.some(u=>a.startsWith(`${u}//`)),s=typeof e.nw<"u";return!!n&&!i&&!s}function w1(e={}){const t=S1(e);if(!t.skipBrowserExtensionCheck&&C1()){xr(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}or&&(Kc()||ge.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:S_(t.stackParser||G3),integrations:h4(t),transport:t.transport||L3};return D4(C3,r)}function id(e={}){if(!Ee.document){or&&ge.error("Global document not defined in showReportDialog call");return}const t=It(),r=t.getClient(),n=r&&r.getDsn();if(!n){or&&ge.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const s=u4();s&&(e.eventId=s)}const a=Ee.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=m4(n,e),e.onLoad&&(a.onload=e.onLoad);const{onClose:o}=e;if(o){const s=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{Ee.removeEventListener("message",s)}};Ee.addEventListener("message",s)}const i=Ee.document.head||Ee.document.body;i?i.appendChild(a):or&&ge.error("Not injecting report dialog. No injection point found in HTML")}const x1={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},sd=Ee;async function $1(e,t){const r=x1[e],n=sd.Sentry=sd.Sentry||{},a=n[e];if(typeof a=="function"&&!("_isShim"in a))return a;const o=A1(r),i=Ee.document.createElement("script");i.src=o,i.crossOrigin="anonymous",i.referrerPolicy="origin";const s=new Promise((f,p)=>{i.addEventListener("load",()=>f()),i.addEventListener("error",p)}),u=Ee.document.currentScript,l=Ee.document.body||Ee.document.head||u&&u.parentElement;if(l)l.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw new Error(`Error when loading integration: ${e}`)}const c=n[e];if(typeof c!="function")throw new Error(`Could not load integration: ${e}`);return c}function A1(e){const t=Ge(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${tr}/${e}.min.js`,n).toString()}function k1(e){const t={...e};return Nc(t,"react"),s4("react",{version:d.version}),w1(t)}function T1(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function P1(e,t){const r=new WeakSet;function n(a,o){if(!r.has(a)){if(a.cause)return r.add(a),n(a.cause,o);a.cause=o}}n(e,t)}function I1(e,{componentStack:t},r){if(T1(d.version)&&Fa(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,P1(e,n)}return za(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var fs={exports:{}},xe={};/** @license React v16.13.1
17
+ Url: ${ja(e)}`),!0)}function H4(e,t){return e.type||!t||!t.length?!1:Z4(e).some(r=>La(r,t))}function V4(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?La(r,t):!1}function z4(e,t){if(!t||!t.length)return!1;const r=ja(e);return r?La(r,t):!1}function j4(e,t){if(!t||!t.length)return!0;const r=ja(e);return r?La(r,t):!0}function Z4(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function G4(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function q4(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function ja(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?q4(t):null}catch{return Te&&ge.error(`Cannot extract url for event ${nr(e)}`),null}}function K4(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function Y4(e,t,r=250,n,a,o,i){if(!o.exception||!o.exception.values||!i||!Tr(i.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Q4(Wi(e,t,a,i.originalException,n,o.exception.values,s,0),r))}function Wi(e,t,r,n,a,o,i,s){if(o.length>=r+1)return o;let u=[...o];if(Tr(n[a],Error)){Vc(i,s);const l=e(t,n[a]),c=u.length;zc(l,a,c,s),u=Wi(e,t,r,n[a],a,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Tr(l,Error)){Vc(i,s);const f=e(t,l),p=u.length;zc(f,`errors[${c}]`,p,s),u=Wi(e,t,r,l,a,[f,...u],f,p)}}),u}function Vc(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function zc(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function Q4(e,t){return e.map(r=>(r.value&&(r.value=sn(r.value,t)),r))}function Ji(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function X4(e){const t="console";Ar(t,e),kr(t,W4)}function W4(){"console"in we&&Pi.forEach(function(e){e in we.console&&ht(we.console,e,function(t){return Ta[e]=t,function(...r){kt("console",{args:r,level:e});const a=Ta[e];a&&a.apply(we.console,r)}})})}function J4(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const e3="Dedupe",t3=(()=>{let e;return{name:e3,processEvent(t){if(t.type)return t;try{if(r3(t,e))return Te&&ge.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function r3(e,t){return t?!!(n3(e,t)||a3(e,t)):!1}function n3(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Zc(e,t)||!jc(e,t))}function a3(e,t){const r=Gc(t),n=Gc(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Zc(e,t)||!jc(e,t))}function jc(e,t){let r=ql(e),n=ql(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let a=0;a<n.length;a++){const o=n[a],i=r[a];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Zc(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Gc(e){return e.exception&&e.exception.values&&e.exception.values[0]}function qc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const es=we;function Kc(){if(!("fetch"in es))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ts(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function o3(){if(typeof EdgeRuntime=="string")return!0;if(!Kc())return!1;if(ts(es.fetch))return!0;let e=!1;const t=es.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=ts(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){wr&&ge.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function i3(e,t){const r="fetch";Ar(r,e),kr(r,()=>s3(void 0,t))}function s3(e,t=!1){t&&!o3()||ht(we,"fetch",function(r){return function(...n){const a=new Error,{method:o,url:i}=u3(n),s={args:n,fetchData:{method:o,url:i},startTimestamp:Ut()*1e3,virtualError:a};return kt("fetch",{...s}),r.apply(we,n).then(async u=>(kt("fetch",{...s,endTimestamp:Ut()*1e3,response:u}),u),u=>{throw kt("fetch",{...s,endTimestamp:Ut()*1e3,error:u}),Fa(u)&&u.stack===void 0&&(u.stack=a.stack,Pr(u,"framesToPop",1)),u})}})}function rs(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Yc(e){return typeof e=="string"?e:e?rs(e,"url")?e.url:e.toString?e.toString():"":""}function u3(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:Yc(r),method:rs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Yc(t),method:rs(t,"method")?String(t.method).toUpperCase():"GET"}}function l3(){return"npm"}const Za=we;function c3(){const e=Za.chrome,t=e&&e.app&&e.app.runtime,r="history"in Za&&!!Za.history.pushState&&!!Za.history.replaceState;return!t&&r}const Ee=we;let ns=0;function Qc(){return ns>0}function d3(){ns++,setTimeout(()=>{ns--})}function dn(e,t={}){function r(a){return typeof a=="function"}if(!r(e))return e;try{const a=e.__sentry_wrapped__;if(a)return typeof a=="function"?a:e;if(Ni(e))return e}catch{return e}const n=function(...a){try{const o=a.map(i=>dn(i,t));return e.apply(this,o)}catch(o){throw d3(),Gi(i=>{i.addEventProcessor(s=>(t.mechanism&&(Hi(s,void 0),un(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),za(o)}),o}};try{for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}catch{}tc(n,e),Pr(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const or=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function as(e,t){const r=is(e,t),n={type:g3(t),value:y3(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function f3(e,t,r,n){const a=Ge(),o=a&&a.getOptions().normalizeDepth,i=D3(t),s={__serialized__:vc(t,o)};if(i)return{exception:{values:[as(e,i)]},extra:s};const u={exception:{values:[{type:Oa(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:v3(t,{isUnhandledRejection:n})}]},extra:s};if(r){const l=is(e,r);l.length&&(u.exception.values[0].stacktrace={frames:l})}return u}function os(e,t){return{exception:{values:[as(e,t)]}}}function is(e,t){const r=t.stacktrace||t.stack||"",n=p3(t),a=h3(t);try{return e(r,n,a)}catch{}return[]}const m3=/Minified React error #\d+;/i;function p3(e){return e&&m3.test(e.message)?1:0}function h3(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Xc(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function g3(e){const t=e&&e.name;return!t&&Xc(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function y3(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Xc(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function b3(e,t,r,n){const a=r&&r.syntheticException||void 0,o=ss(e,t,a,n);return un(o),o.level="error",r&&r.event_id&&(o.event_id=r.event_id),Ir(o)}function _3(e,t,r="info",n,a){const o=n&&n.syntheticException||void 0,i=us(e,t,o,a);return i.level=r,n&&n.event_id&&(i.event_id=n.event_id),Ir(i)}function ss(e,t,r,n,a){let o;if(Ql(t)&&t.error)return os(e,t.error);if(Xl(t)||T_(t)){const i=t;if("stack"in t)o=os(e,t);else{const s=i.name||(Xl(i)?"DOMError":"DOMException"),u=i.message?`${s}: ${i.message}`:s;o=us(e,u,r,n),Hi(o,u)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Fa(t)?os(e,t):on(t)||Oa(t)?(o=f3(e,t,r,a),un(o,{synthetic:!0}),o):(o=us(e,t,r,n),Hi(o,`${t}`),un(o,{synthetic:!0}),o)}function us(e,t,r,n){const a={};if(n&&r){const o=is(e,r);o.length&&(a.exception={values:[{value:t,stacktrace:{frames:o}}]}),un(a,{synthetic:!0})}if(Bi(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return a.logentry={message:o,params:i},a}return a.message=t,a}function v3(e,{isUnhandledRejection:t}){const r=N_(e),n=t?"promise rejection":"exception";return Ql(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Oa(e)?`Event \`${E3(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function E3(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function D3(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function S3(e,{metadata:t,tunnel:r,dsn:n}){const a={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:Ln(n)}},o=C3(e);return Rn(a,[o])}function C3(e){return[{type:"user_report"},e]}class w3 extends v4{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=Ee.SENTRY_SDK_SOURCE||l3();Nc(r,"browser",["browser"],n),super(r),r.sendClientReports&&Ee.document&&Ee.document.addEventListener("visibilitychange",()=>{Ee.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return b3(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return _3(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){or&&ge.warn("SDK not enabled, will not capture user feedback.");return}const r=S3(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}}const x3=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rt=we,$3=1e3;let Wc,ls,cs;function A3(e){Ar("dom",e),kr("dom",k3)}function k3(){if(!rt.document)return;const e=kt.bind(null,"dom"),t=Jc(e,!0);rt.document.addEventListener("click",t,!1),rt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const a=rt[r],o=a&&a.prototype;!o||!o.hasOwnProperty||!o.hasOwnProperty("addEventListener")||(ht(o,"addEventListener",function(i){return function(s,u,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=c[s]=c[s]||{refCount:0};if(!f.handler){const p=Jc(e);f.handler=p,i.call(this,s,p,l)}f.refCount++}catch{}return i.call(this,s,u,l)}}),ht(o,"removeEventListener",function(i){return function(s,u,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},f=c[s];f&&(f.refCount--,f.refCount<=0&&(i.call(this,s,f.handler,l),f.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,u,l)}}))})}function T3(e){if(e.type!==ls)return!1;try{if(!e.target||e.target._sentryId!==cs)return!1}catch{}return!0}function P3(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Jc(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=I3(r);if(P3(r.type,n))return;Pr(r,"_sentryCaptured",!0),n&&!n._sentryId&&Pr(n,"_sentryId",vt());const a=r.type==="keypress"?"input":r.type;T3(r)||(e({event:r,name:a,global:t}),ls=r.type,cs=n?n._sentryId:void 0),clearTimeout(Wc),Wc=rt.setTimeout(()=>{cs=void 0,ls=void 0},$3)}}function I3(e){try{return e.target}catch{return null}}let Ga;function ed(e){const t="history";Ar(t,e),kr(t,M3)}function M3(){if(!c3())return;const e=rt.onpopstate;rt.onpopstate=function(...r){const n=rt.location.href,a=Ga;if(Ga=n,kt("history",{from:a,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const a=n.length>2?n[2]:void 0;if(a){const o=Ga,i=String(a);Ga=i,kt("history",{from:o,to:i})}return r.apply(this,n)}}ht(rt.history,"pushState",t),ht(rt.history,"replaceState",t)}const qa={};function F3(e){const t=qa[e];if(t)return t;let r=rt[e];if(ts(r))return qa[e]=r.bind(rt);const n=rt.document;if(n&&typeof n.createElement=="function")try{const a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a);const o=a.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(a)}catch(a){x3&&ge.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,a)}return r&&(qa[e]=r.bind(rt))}function td(e){qa[e]=void 0}const Nn="__sentry_xhr_v3__";function O3(e){Ar("xhr",e),kr("xhr",B3)}function B3(){if(!rt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const a=new Error,o=Ut()*1e3,i=Nt(n[0])?n[0].toUpperCase():void 0,s=L3(n[1]);if(!i||!s)return t.apply(r,n);r[Nn]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const u=()=>{const l=r[Nn];if(l&&r.readyState===4){try{l.status_code=r.status}catch{}const c={endTimestamp:Ut()*1e3,startTimestamp:o,xhr:r,virtualError:a};kt("xhr",c)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(l,c,f){return u(),l.apply(c,f)}}):r.addEventListener("readystatechange",u),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(l,c,f){const[p,h]=f,g=c[Nn];return g&&Nt(p)&&Nt(h)&&(g.request_headers[p.toLowerCase()]=h),l.apply(c,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const a=r[Nn];if(!a)return t.apply(r,n);n[0]!==void 0&&(a.body=n[0]);const o={startTimestamp:Ut()*1e3,xhr:r};return kt("xhr",o),t.apply(r,n)}})}function L3(e){if(Nt(e))return e;try{return e.toString()}catch{}}function R3(e,t=F3("fetch")){let r=0,n=0;function a(o){const i=o.body.length;r+=i,n++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return td("fetch"),Ra("No fetch implementation available");try{return t(e.url,s).then(u=>(r-=i,n--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return td("fetch"),r-=i,n--,Ra(u)}}return I4(e,a)}const N3=30,U3=50;function ds(e,t,r,n){const a={filename:e,function:t==="<anonymous>"?$r:t,in_app:!0};return r!==void 0&&(a.lineno=r),n!==void 0&&(a.colno=n),a}const H3=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,V3=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,z3=/\((\S*)(?::(\d+))(?::(\d+))\)/,j3=[N3,e=>{const t=H3.exec(e);if(t){const[,n,a,o]=t;return ds(n,$r,+a,+o)}const r=V3.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const i=z3.exec(r[2]);i&&(r[2]=i[1],r[3]=i[2],r[4]=i[3])}const[a,o]=rd(r[1]||$r,r[2]);return ds(o,a,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Z3=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,G3=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,q3=Gl(...[j3,[U3,e=>{const t=Z3.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=G3.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let n=t[3],a=t[1]||$r;return[a,n]=rd(a,n),ds(n,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),rd=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:$r,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ka=1024,K3="Breadcrumbs",Y3=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:K3,setup(r){t.console&&X4(W3(r)),t.dom&&A3(X3(r,t.dom)),t.xhr&&O3(J3(r)),t.fetch&&i3(e1(r)),t.history&&ed(t1(r)),t.sentry&&r.on("beforeSendEvent",Q3(r))}}});function Q3(e){return function(r){Ge()===e&&Fr({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:nr(r)},{event:r})}}function X3(e,t){return function(n){if(Ge()!==e)return;let a,o,i=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>Ka&&(or&&ge.warn(`\`dom.maxStringLength\` cannot exceed ${Ka}, but a value of ${s} was configured. Sentry will use ${Ka} instead.`),s=Ka),typeof i=="string"&&(i=[i]);try{const l=n.event,c=r1(l)?l.target:l;a=Jl(c,{keyAttrs:i,maxStringLength:s}),o=L_(c)}catch{a="<unknown>"}if(a.length===0)return;const u={category:`ui.${n.name}`,message:a};o&&(u.data={"ui.component_name":o}),Fr(u,{event:n.event,name:n.name,global:n.global})}}function W3(e){return function(r){if(Ge()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:J4(r.level),message:ec(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${ec(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Fr(n,{input:r.args,level:r.level})}}function J3(e){return function(r){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:a}=r,o=r.xhr[Nn];if(!n||!a||!o)return;const{method:i,url:s,status_code:u,body:l}=o,c={method:i,url:s,status_code:u},f={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:a},p=qc(u);Fr({category:"xhr",data:c,type:"http",level:p},f)}}function e1(e){return function(r){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:a}=r;if(a&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const o=r.fetchData,i={data:r.error,input:r.args,startTimestamp:n,endTimestamp:a};Fr({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=r.response,i={...r.fetchData,status_code:o&&o.status},s={input:r.args,response:o,startTimestamp:n,endTimestamp:a},u=qc(i.status_code);Fr({category:"fetch",data:i,type:"http",level:u},s)}}}function t1(e){return function(r){if(Ge()!==e)return;let n=r.from,a=r.to;const o=Ji(Ee.location.href);let i=n?Ji(n):void 0;const s=Ji(a);(!i||!i.path)&&(i=o),o.protocol===s.protocol&&o.host===s.host&&(a=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Fr({category:"navigation",data:{from:n,to:a}})}}function r1(e){return!!e&&!!e.target}const n1=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],a1="BrowserApiErrors",o1=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:a1,setupOnce(){t.setTimeout&&ht(Ee,"setTimeout",nd),t.setInterval&&ht(Ee,"setInterval",nd),t.requestAnimationFrame&&ht(Ee,"requestAnimationFrame",i1),t.XMLHttpRequest&&"XMLHttpRequest"in Ee&&ht(XMLHttpRequest.prototype,"send",s1);const r=t.eventTarget;r&&(Array.isArray(r)?r:n1).forEach(u1)}}});function nd(e){return function(...t){const r=t[0];return t[0]=dn(r,{mechanism:{data:{function:rr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function i1(e){return function(t){return e.apply(this,[dn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:rr(e)},handled:!1,type:"instrument"}})])}}function s1(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in r&&typeof r[a]=="function"&&ht(r,a,function(o){const i={mechanism:{data:{function:a,handler:rr(o)},handled:!1,type:"instrument"}},s=Ni(o);return s&&(i.mechanism.data.handler=rr(s)),dn(o,i)})}),e.apply(this,t)}}function u1(e){const r=Ee[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ht(n,"addEventListener",function(a){return function(o,i,s){try{l1(i)&&(i.handleEvent=dn(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:rr(i),target:e},handled:!1,type:"instrument"}}))}catch{}return a.apply(this,[o,dn(i,{mechanism:{data:{function:"addEventListener",handler:rr(i),target:e},handled:!1,type:"instrument"}}),s])}}),ht(n,"removeEventListener",function(a){return function(o,i,s){try{const u=i.__sentry_wrapped__;u&&a.call(this,o,u,s)}catch{}return a.call(this,o,i,s)}}))}function l1(e){return typeof e.handleEvent=="function"}const c1=()=>({name:"BrowserSession",setupOnce(){if(typeof Ee.document>"u"){or&&ge.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}$c({ignoreDuration:!0}),Tc(),ed(({from:e,to:t})=>{e!==void 0&&e!==t&&($c({ignoreDuration:!0}),Tc())})}}),d1="GlobalHandlers",f1=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:d1,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(m1(r),ad("onerror")),t.onunhandledrejection&&(p1(r),ad("onunhandledrejection"))}}});function m1(e){x_(t=>{const{stackParser:r,attachStacktrace:n}=od();if(Ge()!==e||Qc())return;const{msg:a,url:o,line:i,column:s,error:u}=t,l=y1(ss(r,u||a,void 0,n,!1),o,i,s);l.level="error",xc(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function p1(e){A_(t=>{const{stackParser:r,attachStacktrace:n}=od();if(Ge()!==e||Qc())return;const a=h1(t),o=Li(a)?g1(a):ss(r,a,void 0,n,!0);o.level="error",xc(o,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function h1(e){if(Li(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function g1(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function y1(e,t,r,n){const a=e.exception=e.exception||{},o=a.values=a.values||[],i=o[0]=o[0]||{},s=i.stacktrace=i.stacktrace||{},u=s.frames=s.frames||[],l=n,c=r,f=Nt(t)&&t.length>0?t:B_();return u.length===0&&u.push({colno:l,filename:f,function:$r,in_app:!0,lineno:c}),e}function ad(e){or&&ge.log(`Global Handler attached: ${e}`)}function od(){const e=Ge();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const b1=()=>({name:"HttpContext",preprocessEvent(e){if(!Ee.navigator&&!Ee.location&&!Ee.document)return;const t=e.request&&e.request.url||Ee.location&&Ee.location.href,{referrer:r}=Ee.document||{},{userAgent:n}=Ee.navigator||{},a={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},o={...e.request,...t&&{url:t},headers:a};e.request=o}}),_1="cause",v1=5,E1="LinkedErrors",D1=((e={})=>{const t=e.limit||v1,r=e.key||_1;return{name:E1,preprocessEvent(n,a,o){const i=o.getOptions();Y4(as,i.stackParser,i.maxValueLength,r,t,n,a)}}});function S1(e){const t=[R4(),O4(),o1(),Y3(),f1(),D1(),t3(),b1()];return e.autoSessionTracking!==!1&&t.push(c1()),t}function C1(e={}){const t={defaultIntegrations:S1(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ee.SENTRY_RELEASE&&Ee.SENTRY_RELEASE.id?Ee.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function w1(){const e=typeof Ee.window<"u"&&Ee;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,a=Ee.location&&Ee.location.href||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],i=!!n&&Ee===Ee.top&&o.some(u=>a.startsWith(`${u}//`)),s=typeof e.nw<"u";return!!n&&!i&&!s}function x1(e={}){const t=C1(e);if(!t.skipBrowserExtensionCheck&&w1()){xr(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}or&&(Kc()||ge.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:C_(t.stackParser||q3),integrations:g4(t),transport:t.transport||R3};return S4(w3,r)}function id(e={}){if(!Ee.document){or&&ge.error("Global document not defined in showReportDialog call");return}const t=It(),r=t.getClient(),n=r&&r.getDsn();if(!n){or&&ge.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const s=l4();s&&(e.eventId=s)}const a=Ee.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=p4(n,e),e.onLoad&&(a.onload=e.onLoad);const{onClose:o}=e;if(o){const s=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{Ee.removeEventListener("message",s)}};Ee.addEventListener("message",s)}const i=Ee.document.head||Ee.document.body;i?i.appendChild(a):or&&ge.error("Not injecting report dialog. No injection point found in HTML")}const $1={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},sd=Ee;async function A1(e,t){const r=$1[e],n=sd.Sentry=sd.Sentry||{},a=n[e];if(typeof a=="function"&&!("_isShim"in a))return a;const o=k1(r),i=Ee.document.createElement("script");i.src=o,i.crossOrigin="anonymous",i.referrerPolicy="origin";const s=new Promise((f,p)=>{i.addEventListener("load",()=>f()),i.addEventListener("error",p)}),u=Ee.document.currentScript,l=Ee.document.body||Ee.document.head||u&&u.parentElement;if(l)l.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw new Error(`Error when loading integration: ${e}`)}const c=n[e];if(typeof c!="function")throw new Error(`Could not load integration: ${e}`);return c}function k1(e){const t=Ge(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${tr}/${e}.min.js`,n).toString()}function T1(e){const t={...e};return Nc(t,"react"),u4("react",{version:d.version}),x1(t)}function P1(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function I1(e,t){const r=new WeakSet;function n(a,o){if(!r.has(a)){if(a.cause)return r.add(a),n(a.cause,o);a.cause=o}}n(e,t)}function M1(e,{componentStack:t},r){if(P1(d.version)&&Fa(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,I1(e,n)}return za(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var fs={exports:{}},xe={};/** @license React v16.13.1
18
18
  * react-is.production.min.js
19
19
  *
20
20
  * Copyright (c) Facebook, Inc. and its affiliates.
21
21
  *
22
22
  * This source code is licensed under the MIT license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
- */var ud;function M1(){if(ud)return xe;ud=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function b(v){if(typeof v=="object"&&v!==null){var k=v.$$typeof;switch(k){case t:switch(v=v.type,v){case u:case l:case n:case o:case a:case f:return v;default:switch(v=v&&v.$$typeof,v){case s:case c:case g:case h:case i:return v;default:return k}}case r:return k}}}function C(v){return b(v)===l}return xe.AsyncMode=u,xe.ConcurrentMode=l,xe.ContextConsumer=s,xe.ContextProvider=i,xe.Element=t,xe.ForwardRef=c,xe.Fragment=n,xe.Lazy=g,xe.Memo=h,xe.Portal=r,xe.Profiler=o,xe.StrictMode=a,xe.Suspense=f,xe.isAsyncMode=function(v){return C(v)||b(v)===u},xe.isConcurrentMode=C,xe.isContextConsumer=function(v){return b(v)===s},xe.isContextProvider=function(v){return b(v)===i},xe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},xe.isForwardRef=function(v){return b(v)===c},xe.isFragment=function(v){return b(v)===n},xe.isLazy=function(v){return b(v)===g},xe.isMemo=function(v){return b(v)===h},xe.isPortal=function(v){return b(v)===r},xe.isProfiler=function(v){return b(v)===o},xe.isStrictMode=function(v){return b(v)===a},xe.isSuspense=function(v){return b(v)===f},xe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===l||v===o||v===a||v===f||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===h||v.$$typeof===i||v.$$typeof===s||v.$$typeof===c||v.$$typeof===_||v.$$typeof===D||v.$$typeof===w||v.$$typeof===y)},xe.typeOf=b,xe}var ld;function F1(){return ld||(ld=1,fs.exports=M1()),fs.exports}var ms,cd;function O1(){if(cd)return ms;cd=1;var e=F1(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=n,o[e.Memo]=a;function i(g){return e.isMemo(g)?a:o[g.$$typeof]||t}var s=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(g,y,_){if(typeof y!="string"){if(p){var D=f(y);D&&D!==p&&h(g,D,_)}var w=u(y);l&&(w=w.concat(l(y)));for(var b=i(g),C=i(y),v=0;v<w.length;++v){var k=w[v];if(!r[k]&&!(_&&_[k])&&!(C&&C[k])&&!(b&&b[k])){var I=c(y,k);try{s(g,k,I)}catch{}}}}return g}return ms=h,ms}O1();const B1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,dd={componentStack:null,error:null,eventId:null};class ps extends Ti.Component{constructor(t){super(t),ps.prototype.__init.call(this),this.state=dd,this._openFallbackReportDialog=!0;const r=Ge();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&id({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,a=n??void 0,{beforeCapture:o,onError:i,showDialog:s,dialogOptions:u}=this.props;Gi(l=>{o&&o(l,t,a);const c=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=I1(t,r,{mechanism:{handled:c}});i&&i(t,a,f),s&&(this._lastEventId=f,this._openFallbackReportDialog&&id({...u,eventId:f})),this.setState({error:t,componentStack:n,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:a}=this.props;a&&a(t,r,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:a}=this.state;t&&t(r,n,a),this.setState(dd)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let a;return typeof t=="function"?a=Ti.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):a=t,Ti.isValidElement(a)?a:(t&&B1&&ge.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}function gt({id:e,label:t,hint:r,error:n,required:a,className:o,children:i}){const s=e.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),u=["form-field",s?`form-field--${s}`:null,o].filter(Boolean).join(" ");return m.jsxs("div",{className:u,"data-field-id":e,children:[m.jsxs("label",{htmlFor:e,className:"form-label form-field__label",children:[t,a&&m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-red-600","aria-hidden":"true",children:[" ","*"]}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),i,r&&m.jsx("p",{id:`${e}-hint`,className:"form-field__hint mt-1 text-sm text-slate-500",children:r}),n&&m.jsx("p",{id:`${e}-error`,className:"form-field__error mt-1 text-sm text-red-600",children:n})]})}function Ya({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,...i,type:"text"})})}function fd(e,t){if(!e)return"";const r=parseInt(e,10);if(isNaN(r))return"";const n=r.toLocaleString("en-US");return t?`$${n}`:n}function L1({id:e,label:t,hint:r,error:n,required:a,className:o,value:i,onChange:s,onKeyDown:u,isCurrency:l=!1,maxDigits:c,...f}){const[p,h]=d.useState(""),g=d.useRef(null);d.useEffect(()=>{if(i==null||i===""){h("");return}const D=String(i).replace(/\D/g,"");h(fd(D,l))},[i,l]);const y=D=>{let w=D.target.value.replace(/\D/g,"");c!==void 0&&(w=w.slice(0,c)),h(fd(w,l));const b={...D,currentTarget:{...D.currentTarget,value:w},target:{...D.target,value:w}};s?.(b)},_=D=>{if(["-","+",".","e","E"].includes(D.key)){D.preventDefault();return}if(c!==void 0&&/^\d$/.test(D.key)&&D.currentTarget.value.replace(/\D/g,"").length>=c){D.preventDefault();return}u?.(D)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{ref:g,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,value:p,onChange:y,onKeyDown:_,...f})})}function md(e){return e.length<=3?e:e.length<=5?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,5)}-${e.slice(5,9)}`}function R1({id:e,label:t,hint:r,error:n,required:a,className:o,value:i="",onChange:s,...u}){const[l,c]=d.useState(""),f=d.useRef(null);d.useEffect(()=>{const h=i.replace(/\D/g,"").slice(0,9);c(md(h))},[i]);const p=h=>{const g=h.target.value,y=h.target.selectionStart??0,_=g.replace(/\D/g,"").slice(0,9),D=md(_);c(D);const w={...h,currentTarget:{...h.currentTarget,value:D},target:{...h.target,value:D}};s?.(w),setTimeout(()=>{if(f.current){const b=g.slice(0,y).replace(/\D/g,"").length;let C=b;b>5?C+=2:b>3&&(C+=1),f.current.setSelectionRange(C,C)}},0)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{ref:f,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:l,onChange:p,...u})})}function hs({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"number",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,...i})})}function N1({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"email",className:`form-input ${n?"input-error":""}`,inputMode:"email",autoComplete:"email",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...i})})}function gs(e){const t=e.replace(/\D/g,"");if(t.length===10)return`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`;if(t.length>10){const r=t.slice(0,10);return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`}return t.length>=6?`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`:t.length>=3?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length>0?`(${t}`:t}function ys(e){return e.replace(/\D/g,"")}function pd({id:e,label:t,hint:r,error:n,required:a,className:o,value:i="",onChange:s,...u}){const[l,c]=d.useState(""),f=d.useRef(null),p=d.useRef(0);d.useEffect(()=>{if(!i){c("");return}let g=ys(i);g.length===11&&g.startsWith("1")&&(g=g.slice(1));const y=g.slice(0,10);c(gs(y))},[i]);const h=g=>{const y=g.target,_=y.value;p.current=y.selectionStart||0;const w=ys(_).slice(0,10),b=gs(w);c(b);const C=w.length===10?`+1${w}`:w,v={...g,currentTarget:{...g.currentTarget,value:C},target:{...g.target,value:C}};s?.(v),setTimeout(()=>{if(f.current){const k=_.slice(0,p.current),I=ys(k),G=gs(I),O=Math.min(G.length,b.length);f.current.setSelectionRange(O,O)}},0)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${n?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[m.jsx("label",{htmlFor:e,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),m.jsx("input",{ref:f,id:e,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${n?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,value:l,onChange:h,...u})]})})}function U1({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"url",className:`form-input ${n?"input-error":""}`,inputMode:"url",autoComplete:"url",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...i})})}function H1({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"password",className:`form-input ${n?"input-error":""}`,autoComplete:"current-password",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...i})})}function V1({id:e,label:t,hint:r,error:n,required:a,className:o,rows:i=4,...s}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("textarea",{id:e,rows:i,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,...s})})}function Qa(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}const $e=typeof document<"u"?d.useLayoutEffect:()=>{},hd={prefix:String(Math.round(Math.random()*1e10)),current:0},gd=d.createContext(hd),z1=d.createContext(!1);let bs=new WeakMap;function j1(e=!1){let t=d.useContext(gd),r=d.useRef(null);if(r.current===null&&!e){let n=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(n){let a=bs.get(n);a==null?bs.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==a.state&&(t.current=a.id,bs.delete(n))}r.current=++t.current}return r.current}function Z1(e){let t=d.useContext(gd),r=j1(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`}function G1(e){let t=d.useId(),[r]=d.useState(_s()),n=r?"react-aria":`react-aria${hd.prefix}`;return e||`${n}-${t}`}const q1=typeof d.useId=="function"?G1:Z1;function K1(){return!1}function Y1(){return!0}function Q1(e){return()=>{}}function _s(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Q1,K1,Y1):d.useContext(z1)}function X1(e){let[t,r]=d.useState(e),n=d.useRef(t),a=d.useRef(null),o=d.useRef(()=>{if(!a.current)return;let s=a.current.next();if(s.done){a.current=null;return}n.current===s.value?o.current():r(s.value)});$e(()=>{n.current=t,a.current&&o.current()});let i=d.useCallback(s=>{a.current=s(n.current),o.current()},[o]);return[t,i]}let W1=!!(typeof window<"u"&&window.document&&window.document.createElement),fn=new Map,Hn;typeof FinalizationRegistry<"u"&&(Hn=new FinalizationRegistry(e=>{fn.delete(e)}));function Mt(e){let[t,r]=d.useState(e),n=d.useRef(null),a=q1(t),o=d.useRef(null);if(Hn&&Hn.register(o,a),W1){const i=fn.get(a);i&&!i.includes(n)?i.push(n):fn.set(a,[n])}return $e(()=>{let i=a;return()=>{Hn&&Hn.unregister(o),fn.delete(i)}},[a]),d.useEffect(()=>{let i=n.current;return i&&r(i),()=>{i&&(n.current=null)}}),a}function J1(e,t){if(e===t)return e;let r=fn.get(e);if(r)return r.forEach(a=>a.current=t),t;let n=fn.get(t);return n?(n.forEach(a=>a.current=e),e):t}function Xa(e=[]){let t=Mt(),[r,n]=X1(t),a=d.useCallback(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return $e(a,[t,a,...e]),r}function vs(...e){return e.length===1&&e[0]?e[0]:t=>{let r=!1;const n=e.map(a=>{const o=yd(a,t);return r||=typeof o=="function",o});if(r)return()=>{n.forEach((a,o)=>{typeof a=="function"?a():yd(e[o],null)})}}}function yd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=bd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function eE(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=bd(e))&&(n&&(n+=" "),n+=t);return n}function Ae(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let a in n){let o=t[a],i=n[a];typeof o=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Qa(o,i):(a==="className"||a==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?t[a]=eE(o,i):a==="id"&&o&&i?t.id=J1(o,i):a==="ref"&&o&&i?t.ref=vs(o,i):t[a]=i!==void 0?i:o}}return t}function _d(e){const t=d.useRef(null),r=d.useRef(void 0),n=d.useCallback(a=>{if(typeof e=="function"){const o=e,i=o(a);return()=>{typeof i=="function"?i():o(null)}}else if(e)return e.current=a,()=>{e.current=null}},[e]);return d.useMemo(()=>({get current(){return t.current},set current(a){t.current=a,r.current&&(r.current(),r.current=void 0),a!=null&&(r.current=n(a))}}),[n])}const Es=Symbol("default");function Wa({values:e,children:t}){for(let[r,n]of e)t=d.createElement(r.Provider,{value:n},t);return t}function zt(e){let{className:t,style:r,children:n,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s,render:u}=e;return d.useMemo(()=>{let l,c,f;return typeof t=="function"?l=t({...s,defaultClassName:a}):l=t,typeof r=="function"?c=r({...s,defaultStyle:i||{}}):c=r,typeof n=="function"?f=n({...s,defaultChildren:o}):n==null?f=o:f=n,{className:l??a,style:c||i?{...i,...c}:void 0,children:f??o,"data-rac":"",render:u?p=>u(p,s):void 0}},[t,r,n,a,o,i,s,u])}function Ja(e,t){let r=d.useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=t||Es;if(!r.slots[n]){let a=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`)),o=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${a}.`)}return r.slots[n]}return r}function jt(e,t,r){let n=Ja(r,e.slot)||{},{ref:a,...o}=n,i=_d(d.useMemo(()=>vs(t,a),[t,a])),s=Ae(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&(typeof o.style=="function"||typeof e.style=="function"?s.style=u=>{let l=typeof o.style=="function"?o.style(u):o.style,c={...u.defaultStyle,...l},f=typeof e.style=="function"?e.style({...u,defaultStyle:c}):e.style;return{...c,...f}}:s.style={...o.style,...e.style}),[s,i]}function tE(e=!0){let[t,r]=d.useState(e),n=d.useRef(!1),a=d.useCallback(o=>{n.current=!0,r(!!o)},[]);return $e(()=>{n.current||r(!1)},[]),[a,t]}function rE(e){const t=/^(data-.*)$/;let r={};for(const n in e)t.test(n)||(r[n]=e[n]);return r}function nE(e,t,r){let{render:n,...a}=t,o=d.useRef(null),i=d.useMemo(()=>vs(r,o),[r,o]);$e(()=>{},[e,n]);let s={...a,ref:i};return n?n(s,void 0):d.createElement(e,s)}const vd={},st=new Proxy({},{get(e,t){if(typeof t!="string")return;let r=vd[t];return r||(r=d.forwardRef(nE.bind(null,t)),vd[t]=r),r}}),Se=e=>e?.ownerDocument??document,nt=e=>e&&"window"in e&&e.window===e?e:Se(e).defaultView||window;function aE(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function oE(e){return aE(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let iE=!1;function Zt(){return iE}function Ce(e,t){if(!Zt())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;for(;r!==null;){if(r===e)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:oE(r)?r=r.host:r=r.parentNode}return!1}const Ie=(e=document)=>{if(!Zt())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function he(e){if(Zt()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function Ds(e){if(!e)return!1;let t=e.getRootNode(),r=nt(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return n!=null&&e.contains(n)}function Or(e){if(sE())e.focus({preventScroll:!0});else{let t=uE(e);e.focus(),lE(t)}}let eo=null;function sE(){if(eo==null){eo=!1;try{document.createElement("div").focus({get preventScroll(){return eo=!0,!0}})}catch{}}return eo}function uE(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function lE(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}const cE=typeof Element<"u"&&"checkVisibility"in Element.prototype;function dE(e){const t=nt(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,a=r!=="none"&&n!=="hidden"&&n!=="collapse";if(a){const{getComputedStyle:o}=nt(e);let{display:i,visibility:s}=o(e);a=i!=="none"&&s!=="hidden"&&s!=="collapse"}return a}function fE(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Ss(e,t){return cE?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&dE(e)&&fE(e,t)&&(!e.parentElement||Ss(e.parentElement,e))}const Cs=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],mE=Cs.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Cs.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const pE=Cs.join(':not([hidden]):not([tabindex="-1"]),');function Ed(e,t){return e.matches(mE)&&!Dd(e)&&(t?.skipVisibilityCheck||Ss(e))}function hE(e){return e.matches(pE)&&Ss(e)&&!Dd(e)}function Dd(e){let t=e;for(;t!=null;){if(t instanceof nt(t).HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function ws(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Sd(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Cd(e){let t=d.useRef({isFocused:!1,observer:null});return $e(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),d.useCallback(r=>{let n=he(r);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){t.current.isFocused=!0;let a=n,o=i=>{if(t.current.isFocused=!1,a.disabled){let s=ws(i);e?.(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};a.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){t.current.observer?.disconnect();let i=a===Ie()?null:Ie();a.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let to=!1;function gE(e){for(;e&&!Ed(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=nt(e),r=t.document.activeElement;if(!r||r===e)return;to=!0;let n=!1,a=c=>{(he(c)===r||n)&&c.stopImmediatePropagation()},o=c=>{(he(c)===r||n)&&(c.stopImmediatePropagation(),!e&&!n&&(n=!0,Or(r),u()))},i=c=>{(he(c)===e||n)&&c.stopImmediatePropagation()},s=c=>{(he(c)===e||n)&&(c.stopImmediatePropagation(),n||(n=!0,Or(r),u()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let u=()=>{cancelAnimationFrame(l),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),to=!1,n=!1},l=requestAnimationFrame(u);return u}function ro(e){if(typeof window>"u"||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function ir(e){let t=null;return()=>(t==null&&(t=e()),t)}const mn=ir(function(){return xs(/^Mac/i)}),yE=ir(function(){return xs(/^iPhone/i)}),wd=ir(function(){return xs(/^iPad/i)||mn()&&navigator.maxTouchPoints>1}),Vn=ir(function(){return yE()||wd()}),xd=ir(function(){return ro(/AppleWebKit/i)&&!$d()}),$d=ir(function(){return ro(/Chrome/i)}),$s=ir(function(){return ro(/Android/i)}),bE=ir(function(){return ro(/Firefox/i)});function Ad(e){return e.pointerType===""&&e.isTrusted?!0:$s()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _E(e){return!$s()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Br(e,t,r=!0){let{metaKey:n,ctrlKey:a,altKey:o,shiftKey:i}=t;bE()&&window.event?.type?.startsWith("key")&&e.target==="_blank"&&(mn()?n=!0:a=!0);let s=xd()&&mn()&&!wd()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:a,altKey:o,shiftKey:i}):new MouseEvent("click",{metaKey:n,ctrlKey:a,altKey:o,shiftKey:i,detail:1,bubbles:!0,cancelable:!0});Br.isOpening=r,Or(e),e.dispatchEvent(s),Br.isOpening=!1}Br.isOpening=!1;let Lr=null;const As=new Set;let zn=new Map,Rr=!1,ks=!1;const vE={Tab:!0,Escape:!0};function no(e,t){for(let r of As)r(e,t)}function EE(e){return!(e.metaKey||!mn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ao(e){Rr=!0,!Br.isOpening&&EE(e)&&(Lr="keyboard",no("keyboard",e))}function pn(e){Lr="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Rr=!0,no("pointer",e))}function kd(e){!Br.isOpening&&Ad(e)&&(Rr=!0,Lr="virtual")}function Td(e){let t=nt(he(e)),r=Se(he(e));he(e)===t||he(e)===r||to||!e.isTrusted||(!Rr&&!ks&&(Lr="virtual",no("virtual",e)),Rr=!1,ks=!1)}function Pd(){to||(Rr=!1,ks=!0)}function Ts(e){if(typeof window>"u"||typeof document>"u")return;const t=nt(e),r=Se(e);if(zn.get(t))return;let n=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Rr=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",ao,!0),r.addEventListener("keyup",ao,!0),r.addEventListener("click",kd,!0),t.addEventListener("focus",Td,!0),t.addEventListener("blur",Pd,!1),typeof PointerEvent<"u"&&(r.addEventListener("pointerdown",pn,!0),r.addEventListener("pointermove",pn,!0),r.addEventListener("pointerup",pn,!0)),t.addEventListener("beforeunload",()=>{Id(e)},{once:!0}),zn.set(t,{focus:n})}const Id=(e,t)=>{const r=nt(e),n=Se(e);t&&n.removeEventListener("DOMContentLoaded",t),zn.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:zn.get(r).focus}),n.removeEventListener("keydown",ao,!0),n.removeEventListener("keyup",ao,!0),n.removeEventListener("click",kd,!0),r.removeEventListener("focus",Td,!0),r.removeEventListener("blur",Pd,!1),typeof PointerEvent<"u"&&(n.removeEventListener("pointerdown",pn,!0),n.removeEventListener("pointermove",pn,!0),n.removeEventListener("pointerup",pn,!0)),zn.delete(r))};function DE(e){const t=Se(e);let r;return t.readyState!=="loading"?Ts(e):(r=()=>{Ts(e)},t.addEventListener("DOMContentLoaded",r)),()=>Id(e,r)}typeof document<"u"&&DE();function Ps(){return Lr!=="pointer"}function oo(){return Lr}function SE(e){Lr=e,no(e,null)}const CE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wE(e,t,r){let n=r?he(r):void 0,a=Se(n),o=nt(n);const i=typeof o<"u"?o.HTMLInputElement:HTMLInputElement,s=typeof o<"u"?o.HTMLTextAreaElement:HTMLTextAreaElement,u=typeof o<"u"?o.HTMLElement:HTMLElement,l=typeof o<"u"?o.KeyboardEvent:KeyboardEvent;let c=Ie(a);return e=e||c instanceof i&&!CE.has(c.type)||c instanceof s||c instanceof u&&c.isContentEditable,!(e&&t==="keyboard"&&r instanceof l&&!vE[r.key])}function xE(e,t,r){Ts(),d.useEffect(()=>{if(r?.enabled===!1)return;let n=(a,o)=>{wE(!!r?.isTextInput,a,o)&&e(Ps())};return As.add(n),()=>{As.delete(n)}},t)}const $E=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Is(e){return e instanceof HTMLInputElement&&!$E.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const AE=d.useInsertionEffect??$e;function qe(e){const t=d.useRef(null);return AE(()=>{t.current=e},[e]),d.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function Ms(e,t,r,n){let a=qe(r),o=r==null;d.useEffect(()=>{if(o||!e.current)return;let i=e.current;return i.addEventListener(t,a,n),()=>{i.removeEventListener(t,a,n)}},[e,t,n,o])}function jn(e,t){let{id:r,"aria-label":n,"aria-labelledby":a}=e;return r=Mt(r),a&&n?a=[...new Set([r,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!n&&!a&&t&&(n=t),{id:r,"aria-label":n,"aria-labelledby":a}}const kE=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),TE=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function PE(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return kE.has(r.script)}let t=e.split("-")[0];return TE.has(t)}const Md=Symbol.for("react-aria.i18n.locale");function Fd(){let e=typeof window<"u"&&window[Md]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:PE(e)?"rtl":"ltr"}}let Fs=Fd(),Zn=new Set;function Od(){Fs=Fd();for(let e of Zn)e(Fs)}function IE(){let e=_s(),[t,r]=d.useState(Fs);return d.useEffect(()=>(Zn.size===0&&window.addEventListener("languagechange",Od),Zn.add(r),()=>{Zn.delete(r),Zn.size===0&&window.removeEventListener("languagechange",Od)}),[]),e?{locale:typeof window<"u"&&window[Md]||"en-US",direction:"ltr"}:t}const ME=d.createContext(null);function Je(){let e=IE();return d.useContext(ME)||e}const FE=Symbol.for("react-aria.i18n.locale"),OE=Symbol.for("react-aria.i18n.strings");let io;class Nr{constructor(t,r="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,n])=>n)),this.defaultLocale=r}getStringForLocale(t,r){let a=this.getStringsForLocale(r)[t];if(!a)throw new Error(`Could not find intl message ${t} in ${r} locale`);return a}getStringsForLocale(t){let r=this.strings[t];return r||(r=BE(t,this.strings,this.defaultLocale),this.strings[t]=r),r}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let r=window[FE];if(io===void 0){let a=window[OE];if(!a)return null;io={};for(let o in a)io[o]=new Nr({[r]:a[o]},r)}let n=io?.[t];if(!n)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}function BE(e,t,r="en-US"){if(t[e])return t[e];let n=LE(e);if(t[n])return t[n];for(let a in t)if(a.startsWith(n+"-"))return t[a];return t[r]}function LE(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Bd=new Map,Ld=new Map;class Rd{constructor(t,r){this.locale=t,this.strings=r}format(t,r){let n=this.strings.getStringForLocale(t,this.locale);return typeof n=="function"?n(r,this):n}plural(t,r,n="cardinal"){let a=r["="+t];if(a)return typeof a=="function"?a():a;let o=this.locale+":"+n,i=Bd.get(o);i||(i=new Intl.PluralRules(this.locale,{type:n}),Bd.set(o,i));let s=i.select(t);return a=r[s]||r.other,typeof a=="function"?a():a}number(t){let r=Ld.get(this.locale);return r||(r=new Intl.NumberFormat(this.locale),Ld.set(this.locale,r)),r.format(t)}select(t,r){let n=t[r]||t.other;return typeof n=="function"?n():n}}const Nd=new WeakMap;function RE(e){let t=Nd.get(e);return t||(t=new Nr(e),Nd.set(e,t)),t}function Ud(e,t){return t&&Nr.getGlobalDictionaryForPackage(t)||RE(e)}function sr(e,t){let{locale:r}=Je(),n=Ud(e,t);return d.useMemo(()=>new Rd(r,n),[r,n])}const NE=typeof document<"u"?d.useInsertionEffect??d.useLayoutEffect:()=>{};function Gn(e,t,r){let[n,a]=d.useState(e||t),o=d.useRef(n),i=d.useRef(e!==void 0),s=e!==void 0;d.useEffect(()=>{i.current,i.current=s},[s]);let u=s?e:n;NE(()=>{o.current=u});let[,l]=d.useReducer(()=>({}),{}),c=d.useCallback((f,...p)=>{let h=typeof f=="function"?f(o.current):f;Object.is(o.current,h)||(o.current=h,a(h),l(),r?.(h,...p))},[r]);return[u,c]}let ur=new Map,Os=new Set;function Hd(){if(typeof window>"u")return;function e(n){return"propertyName"in n}let t=n=>{let a=he(n);if(!e(n)||!a)return;let o=ur.get(a);o||(o=new Set,ur.set(a,o),a.addEventListener("transitioncancel",r,{once:!0})),o.add(n.propertyName)},r=n=>{let a=he(n);if(!e(n)||!a)return;let o=ur.get(a);if(o&&(o.delete(n.propertyName),o.size===0&&(a.removeEventListener("transitioncancel",r),ur.delete(a)),ur.size===0)){for(let i of Os)i();Os.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Hd():document.addEventListener("DOMContentLoaded",Hd));function UE(){for(const[e]of ur)"isConnected"in e&&!e.isConnected&&ur.delete(e)}function Vd(e){requestAnimationFrame(()=>{UE(),ur.size===0?e():Os.add(e)})}function qn(e){if(!e.isConnected)return;const t=Se(e);if(oo()==="virtual"){let r=Ie(t);Vd(()=>{const n=Ie(t);(n===r||n===t.body)&&e.isConnected&&Or(e)})}else Or(e)}function zd(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:a}=e;const o=d.useCallback(u=>{if(he(u)===u.currentTarget)return n&&n(u),a&&a(!1),!0},[n,a]),i=Cd(o),s=d.useCallback(u=>{let l=he(u);const c=Se(l),f=c?Ie(c):Ie();l===u.currentTarget&&l===f&&(r&&r(u),a&&a(!0),i(u))},[a,r,i]);return{focusProps:{onFocus:!t&&(r||a||n)?s:void 0,onBlur:!t&&(n||a)?o:void 0}}}function jd(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1,typeof r.continuePropagation=="function"&&r.continuePropagation()},isPropagationStopped(){return t}};e(n),t&&r.stopPropagation()}}function HE(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:jd(e.onKeyDown),onKeyUp:jd(e.onKeyUp)}}}function Zd(e,t){$e(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}let VE=d.createContext(null);function zE(e){let t=d.useContext(VE)||{};Zd(t,e);let{ref:r,...n}=t;return n}function jE(e,t){let{focusProps:r}=zd(e),{keyboardProps:n}=HE(e),a=Ae(r,n),o=zE(t),i=e.isDisabled?{}:o,s=d.useRef(e.autoFocus);d.useEffect(()=>{s.current&&t.current&&qn(t.current),s.current=!1},[t]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:Ae({...a,tabIndex:u},i)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));const Gd=d.createContext(!1);function qd(e){let t=(r,n)=>d.useContext(Gd)?null:e(r,n);return t.displayName=e.displayName||e.name,d.forwardRef(t)}function ZE(){return d.useContext(Gd)}const GE=new Set(["id"]),qE=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),KE=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),YE=new Set(["dir","lang","hidden","inert","translate"]),Kd=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),QE=/^(data-.*)$/;function et(e,t={}){let{labelable:r,isLink:n,global:a,events:o=a,propNames:i}=t,s={};for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&(GE.has(u)||r&&qE.has(u)||n&&KE.has(u)||a&&YE.has(u)||o&&(Kd.has(u)||u.endsWith("Capture")&&Kd.has(u.slice(0,-7)))||i?.has(u)||QE.test(u))&&(s[u]=e[u]);return s}let hn="default",Bs="",so=new WeakMap;function XE(e){if(Vn()){if(hn==="default"){const t=Se(e);Bs=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hn="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";so.set(e,e.style[t]),e.style[t]="none"}}function Yd(e){if(Vn()){if(hn!=="disabled")return;hn="restoring",setTimeout(()=>{Vd(()=>{if(hn==="restoring"){const t=Se(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Bs||""),Bs="",hn="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&so.has(e)){let t=so.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[r]==="none"&&(e.style[r]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),so.delete(e)}}function Qd(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let Ls=new WeakMap;function Xd(e){let t=e??(typeof document<"u"?document:void 0);if(!t)return Qd(t);if(Ls.has(t))return Ls.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof nt(r).HTMLMetaElement&&(r.nonce||r.content)||Qd(t)||void 0;return n!==void 0&&Ls.set(t,n),n}const Rs=d.createContext({register:()=>{}});Rs.displayName="PressResponderContext";function uo(){let e=d.useRef(new Map),t=d.useCallback((a,o,i,s)=>{let u=s?.once?(...l)=>{e.current.delete(i),i(...l)}:i;e.current.set(i,{type:o,eventTarget:a,fn:u,options:s}),a.addEventListener(o,u,s)},[]),r=d.useCallback((a,o,i,s)=>{let u=e.current.get(i)?.fn||i;a.removeEventListener(o,u,s),e.current.delete(i)},[]),n=d.useCallback(()=>{e.current.forEach((a,o)=>{r(a.eventTarget,a.type,o,a.options)})},[r]);return d.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function WE(e){let t=d.useContext(Rs);if(t){let{register:r,ref:n,...a}=t;e=Ae(a,e),r()}return Zd(t,e.ref),e}class lo{#e;constructor(t,r,n,a){this.#e=!0;const i=(a?.target??n.currentTarget)?.getBoundingClientRect();let s,u=0,l,c=null;n.clientX!=null&&n.clientY!=null&&(l=n.clientX,c=n.clientY),i&&(l!=null&&c!=null?(s=l-i.left,u=c-i.top):(s=i.width/2,u=i.height/2)),this.type=t,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=u,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const Wd=Symbol("linkClicked"),Jd="react-aria-pressable-style",ef="data-react-aria-pressable";function Ns(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:u,preventFocusOnPress:l,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:f,ref:p,...h}=WE(e),[g,y]=d.useState(!1),_=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:D,removeAllGlobalListeners:w}=uo(),b=d.useCallback((x,z)=>{let U=_.current;if(s||U.didFirePressStart)return!1;let P=!0;if(U.isTriggeringEvent=!0,n){let K=new lo("pressstart",z,x);n(K),P=K.shouldStopPropagation}return r&&r(!0),U.isTriggeringEvent=!1,U.didFirePressStart=!0,y(!0),P},[s,n,r]),C=d.useCallback((x,z,U=!0)=>{let P=_.current;if(!P.didFirePressStart)return!1;P.didFirePressStart=!1,P.isTriggeringEvent=!0;let K=!0;if(a){let $=new lo("pressend",z,x);a($),K=$.shouldStopPropagation}if(r&&r(!1),y(!1),t&&U&&!s){let $=new lo("press",z,x);t($),K&&=$.shouldStopPropagation}return P.isTriggeringEvent=!1,K},[s,a,r,t]),v=qe(C),k=d.useCallback((x,z)=>{let U=_.current;if(s)return!1;if(o){U.isTriggeringEvent=!0;let P=new lo("pressup",z,x);return o(P),U.isTriggeringEvent=!1,P.shouldStopPropagation}return!0},[s,o]),I=qe(k),G=d.useCallback(x=>{let z=_.current;if(z.isPressed&&z.target){z.didFirePressStart&&z.pointerType!=null&&C(Ur(z.target,x),z.pointerType,!1),z.isPressed=!1,z.isOverTarget=!1,z.activePointerId=null,z.pointerType=null,w(),f||Yd(z.target);for(let U of z.disposables)U();z.disposables=[]}},[f,w,C]),O=qe(G);d.useEffect(()=>{s&&_.current.isPressed&&O({currentTarget:_.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let Z=d.useCallback(x=>{c&&G(x)},[c,G]),M=d.useCallback(x=>{s||i?.(x)},[s,i]),X=d.useCallback((x,z)=>{if(!s&&i){let U=new MouseEvent("click",x);Sd(U,z),i(ws(U))}},[s,i]),de=d.useMemo(()=>{let x=_.current,z={onKeyDown(P){if(Hs(P.nativeEvent,P.currentTarget)&&Ce(P.currentTarget,he(P))){tf(he(P),P.key)&&P.preventDefault();let K=!0;!x.isPressed&&!P.repeat&&(x.target=P.currentTarget,x.isPressed=!0,x.pointerType="keyboard",K=b(P,"keyboard"));let $=P.currentTarget,T=Y=>{Hs(Y,$)&&!Y.repeat&&Ce($,he(Y))&&x.target&&I(Ur(x.target,Y),"keyboard")};D(Se(P.currentTarget),"keyup",Qa(T,U),!0),K&&P.stopPropagation(),P.metaKey&&mn()&&x.metaKeyEvents?.set(P.key,P.nativeEvent)}else P.key==="Meta"&&(x.metaKeyEvents=new Map)},onClick(P){if(!(P&&!Ce(P.currentTarget,he(P)))&&P&&P.button===0&&!x.isTriggeringEvent&&!Br.isOpening){let K=!0;if(s&&P.preventDefault(),!x.ignoreEmulatedMouseEvents&&!x.isPressed&&(x.pointerType==="virtual"||Ad(P.nativeEvent))){let $=b(P,"virtual"),T=I(P,"virtual"),Y=v(P,"virtual");M(P),K=$&&T&&Y}else if(x.isPressed&&x.pointerType!=="keyboard"){let $=x.pointerType||P.nativeEvent.pointerType||"virtual",T=I(Ur(P.currentTarget,P),$),Y=v(Ur(P.currentTarget,P),$,!0);K=T&&Y,x.isOverTarget=!1,M(P),O(P)}x.ignoreEmulatedMouseEvents=!1,K&&P.stopPropagation()}}},U=P=>{if(x.isPressed&&x.target&&Hs(P,x.target)){tf(he(P),P.key)&&P.preventDefault();let K=he(P),$=Ce(x.target,K);v(Ur(x.target,P),"keyboard",$),$&&X(P,x.target),w(),P.key!=="Enter"&&Us(x.target)&&Ce(x.target,K)&&!P[Wd]&&(P[Wd]=!0,Br(x.target,P,!1)),x.isPressed=!1,x.metaKeyEvents?.delete(P.key)}else if(P.key==="Meta"&&x.metaKeyEvents?.size){let K=x.metaKeyEvents;x.metaKeyEvents=void 0;for(let $ of K.values())x.target?.dispatchEvent(new KeyboardEvent("keyup",$))}};if(typeof PointerEvent<"u"){z.onPointerDown=$=>{if($.button!==0||!Ce($.currentTarget,he($)))return;if(_E($.nativeEvent)){x.pointerType="virtual";return}x.pointerType=$.pointerType;let T=!0;if(!x.isPressed){x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=$.pointerId,x.target=$.currentTarget,f||XE(x.target),T=b($,x.pointerType);let Y=he($);"releasePointerCapture"in Y&&("hasPointerCapture"in Y?Y.hasPointerCapture($.pointerId)&&Y.releasePointerCapture($.pointerId):Y.releasePointerCapture($.pointerId)),D(Se($.currentTarget),"pointerup",P,!1),D(Se($.currentTarget),"pointercancel",K,!1)}T&&$.stopPropagation()},z.onMouseDown=$=>{if(Ce($.currentTarget,he($))&&$.button===0){if(l){let T=gE($.target);T&&x.disposables.push(T)}$.stopPropagation()}},z.onPointerUp=$=>{!Ce($.currentTarget,he($))||x.pointerType==="virtual"||$.button===0&&!x.isPressed&&I($,x.pointerType||$.pointerType)},z.onPointerEnter=$=>{$.pointerId===x.activePointerId&&x.target&&!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,b(Ur(x.target,$),x.pointerType))},z.onPointerLeave=$=>{$.pointerId===x.activePointerId&&x.target&&x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,v(Ur(x.target,$),x.pointerType,!1),Z($))};let P=$=>{if($.pointerId===x.activePointerId&&x.isPressed&&$.button===0&&x.target){if(Ce(x.target,he($))&&x.pointerType!=null){let T=!1,Y=setTimeout(()=>{x.isPressed&&x.target instanceof HTMLElement&&(T?O($):(Or(x.target),x.target.click()))},80);D($.currentTarget,"click",()=>T=!0,!0),x.disposables.push(()=>clearTimeout(Y))}else O($);x.isOverTarget=!1}},K=$=>{O($)};z.onDragStart=$=>{Ce($.currentTarget,he($))&&O($)}}return z},[D,s,l,w,f,Z,b,M,X]);return d.useEffect(()=>{if(!p)return;const x=Se(p.current);if(!x||!x.head||x.getElementById(Jd))return;const z=x.createElement("style");z.id=Jd;let U=Xd(x);U&&(z.nonce=U),z.textContent=`
24
+ */var ud;function F1(){if(ud)return xe;ud=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function b(v){if(typeof v=="object"&&v!==null){var k=v.$$typeof;switch(k){case t:switch(v=v.type,v){case u:case l:case n:case o:case a:case f:return v;default:switch(v=v&&v.$$typeof,v){case s:case c:case g:case h:case i:return v;default:return k}}case r:return k}}}function C(v){return b(v)===l}return xe.AsyncMode=u,xe.ConcurrentMode=l,xe.ContextConsumer=s,xe.ContextProvider=i,xe.Element=t,xe.ForwardRef=c,xe.Fragment=n,xe.Lazy=g,xe.Memo=h,xe.Portal=r,xe.Profiler=o,xe.StrictMode=a,xe.Suspense=f,xe.isAsyncMode=function(v){return C(v)||b(v)===u},xe.isConcurrentMode=C,xe.isContextConsumer=function(v){return b(v)===s},xe.isContextProvider=function(v){return b(v)===i},xe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},xe.isForwardRef=function(v){return b(v)===c},xe.isFragment=function(v){return b(v)===n},xe.isLazy=function(v){return b(v)===g},xe.isMemo=function(v){return b(v)===h},xe.isPortal=function(v){return b(v)===r},xe.isProfiler=function(v){return b(v)===o},xe.isStrictMode=function(v){return b(v)===a},xe.isSuspense=function(v){return b(v)===f},xe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===l||v===o||v===a||v===f||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===h||v.$$typeof===i||v.$$typeof===s||v.$$typeof===c||v.$$typeof===_||v.$$typeof===D||v.$$typeof===w||v.$$typeof===y)},xe.typeOf=b,xe}var ld;function O1(){return ld||(ld=1,fs.exports=F1()),fs.exports}var ms,cd;function B1(){if(cd)return ms;cd=1;var e=O1(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=n,o[e.Memo]=a;function i(g){return e.isMemo(g)?a:o[g.$$typeof]||t}var s=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(g,y,_){if(typeof y!="string"){if(p){var D=f(y);D&&D!==p&&h(g,D,_)}var w=u(y);l&&(w=w.concat(l(y)));for(var b=i(g),C=i(y),v=0;v<w.length;++v){var k=w[v];if(!r[k]&&!(_&&_[k])&&!(C&&C[k])&&!(b&&b[k])){var I=c(y,k);try{s(g,k,I)}catch{}}}}return g}return ms=h,ms}B1();const L1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,dd={componentStack:null,error:null,eventId:null};class ps extends Ti.Component{constructor(t){super(t),ps.prototype.__init.call(this),this.state=dd,this._openFallbackReportDialog=!0;const r=Ge();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&id({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,a=n??void 0,{beforeCapture:o,onError:i,showDialog:s,dialogOptions:u}=this.props;Gi(l=>{o&&o(l,t,a);const c=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=M1(t,r,{mechanism:{handled:c}});i&&i(t,a,f),s&&(this._lastEventId=f,this._openFallbackReportDialog&&id({...u,eventId:f})),this.setState({error:t,componentStack:n,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:a}=this.props;a&&a(t,r,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:a}=this.state;t&&t(r,n,a),this.setState(dd)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let a;return typeof t=="function"?a=Ti.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):a=t,Ti.isValidElement(a)?a:(t&&L1&&ge.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}function gt({id:e,label:t,hint:r,error:n,required:a,className:o,children:i}){const s=e.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),u=["form-field",s?`form-field--${s}`:null,o].filter(Boolean).join(" ");return m.jsxs("div",{className:u,"data-field-id":e,children:[m.jsxs("label",{htmlFor:e,className:"form-label form-field__label",children:[t,a&&m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-red-600","aria-hidden":"true",children:[" ","*"]}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),i,r&&m.jsx("p",{id:`${e}-hint`,className:"form-field__hint mt-1 text-sm text-slate-500",children:r}),n&&m.jsx("p",{id:`${e}-error`,className:"form-field__error mt-1 text-sm text-red-600",children:n})]})}function Ya({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,...i,type:"text"})})}function fd(e,t){if(!e)return"";const r=parseInt(e,10);if(isNaN(r))return"";const n=r.toLocaleString("en-US");return t?`$${n}`:n}function R1({id:e,label:t,hint:r,error:n,required:a,className:o,value:i,onChange:s,onKeyDown:u,isCurrency:l=!1,maxDigits:c,...f}){const[p,h]=d.useState(""),g=d.useRef(null);d.useEffect(()=>{if(i==null||i===""){h("");return}const D=String(i).replace(/\D/g,"");h(fd(D,l))},[i,l]);const y=D=>{let w=D.target.value.replace(/\D/g,"");c!==void 0&&(w=w.slice(0,c)),h(fd(w,l));const b={...D,currentTarget:{...D.currentTarget,value:w},target:{...D.target,value:w}};s?.(b)},_=D=>{if(["-","+",".","e","E"].includes(D.key)){D.preventDefault();return}if(c!==void 0&&/^\d$/.test(D.key)&&D.currentTarget.value.replace(/\D/g,"").length>=c){D.preventDefault();return}u?.(D)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{ref:g,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,value:p,onChange:y,onKeyDown:_,...f})})}function md(e){return e.length<=3?e:e.length<=5?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,5)}-${e.slice(5,9)}`}function N1({id:e,label:t,hint:r,error:n,required:a,className:o,value:i="",onChange:s,...u}){const[l,c]=d.useState(""),f=d.useRef(null);d.useEffect(()=>{const h=i.replace(/\D/g,"").slice(0,9);c(md(h))},[i]);const p=h=>{const g=h.target.value,y=h.target.selectionStart??0,_=g.replace(/\D/g,"").slice(0,9),D=md(_);c(D);const w={...h,currentTarget:{...h.currentTarget,value:D},target:{...h.target,value:D}};s?.(w),setTimeout(()=>{if(f.current){const b=g.slice(0,y).replace(/\D/g,"").length;let C=b;b>5?C+=2:b>3&&(C+=1),f.current.setSelectionRange(C,C)}},0)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{ref:f,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:l,onChange:p,...u})})}function hs({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"number",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,...i})})}function U1({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"email",className:`form-input ${n?"input-error":""}`,inputMode:"email",autoComplete:"email",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...i})})}function gs(e){const t=e.replace(/\D/g,"");if(t.length===10)return`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`;if(t.length>10){const r=t.slice(0,10);return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`}return t.length>=6?`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`:t.length>=3?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length>0?`(${t}`:t}function ys(e){return e.replace(/\D/g,"")}function pd({id:e,label:t,hint:r,error:n,required:a,className:o,value:i="",onChange:s,...u}){const[l,c]=d.useState(""),f=d.useRef(null),p=d.useRef(0);d.useEffect(()=>{if(!i){c("");return}let g=ys(i);g.length===11&&g.startsWith("1")&&(g=g.slice(1));const y=g.slice(0,10);c(gs(y))},[i]);const h=g=>{const y=g.target,_=y.value;p.current=y.selectionStart||0;const w=ys(_).slice(0,10),b=gs(w);c(b);const C=w.length===10?`+1${w}`:w,v={...g,currentTarget:{...g.currentTarget,value:C},target:{...g.target,value:C}};s?.(v),setTimeout(()=>{if(f.current){const k=_.slice(0,p.current),I=ys(k),G=gs(I),O=Math.min(G.length,b.length);f.current.setSelectionRange(O,O)}},0)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${n?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[m.jsx("label",{htmlFor:e,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),m.jsx("input",{ref:f,id:e,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${n?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,value:l,onChange:h,...u})]})})}function H1({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"url",className:`form-input ${n?"input-error":""}`,inputMode:"url",autoComplete:"url",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...i})})}function V1({id:e,label:t,hint:r,error:n,required:a,className:o,...i}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("input",{id:e,type:"password",className:`form-input ${n?"input-error":""}`,autoComplete:"current-password",required:a,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...i})})}function z1({id:e,label:t,hint:r,error:n,required:a,className:o,rows:i=4,...s}){return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsx("textarea",{id:e,rows:i,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,...s})})}function Qa(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}const $e=typeof document<"u"?d.useLayoutEffect:()=>{},hd={prefix:String(Math.round(Math.random()*1e10)),current:0},gd=d.createContext(hd),j1=d.createContext(!1);let bs=new WeakMap;function Z1(e=!1){let t=d.useContext(gd),r=d.useRef(null);if(r.current===null&&!e){let n=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(n){let a=bs.get(n);a==null?bs.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==a.state&&(t.current=a.id,bs.delete(n))}r.current=++t.current}return r.current}function G1(e){let t=d.useContext(gd),r=Z1(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`}function q1(e){let t=d.useId(),[r]=d.useState(_s()),n=r?"react-aria":`react-aria${hd.prefix}`;return e||`${n}-${t}`}const K1=typeof d.useId=="function"?q1:G1;function Y1(){return!1}function Q1(){return!0}function X1(e){return()=>{}}function _s(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(X1,Y1,Q1):d.useContext(j1)}function W1(e){let[t,r]=d.useState(e),n=d.useRef(t),a=d.useRef(null),o=d.useRef(()=>{if(!a.current)return;let s=a.current.next();if(s.done){a.current=null;return}n.current===s.value?o.current():r(s.value)});$e(()=>{n.current=t,a.current&&o.current()});let i=d.useCallback(s=>{a.current=s(n.current),o.current()},[o]);return[t,i]}let J1=!!(typeof window<"u"&&window.document&&window.document.createElement),fn=new Map,Un;typeof FinalizationRegistry<"u"&&(Un=new FinalizationRegistry(e=>{fn.delete(e)}));function Mt(e){let[t,r]=d.useState(e),n=d.useRef(null),a=K1(t),o=d.useRef(null);if(Un&&Un.register(o,a),J1){const i=fn.get(a);i&&!i.includes(n)?i.push(n):fn.set(a,[n])}return $e(()=>{let i=a;return()=>{Un&&Un.unregister(o),fn.delete(i)}},[a]),d.useEffect(()=>{let i=n.current;return i&&r(i),()=>{i&&(n.current=null)}}),a}function eE(e,t){if(e===t)return e;let r=fn.get(e);if(r)return r.forEach(a=>a.current=t),t;let n=fn.get(t);return n?(n.forEach(a=>a.current=e),e):t}function Xa(e=[]){let t=Mt(),[r,n]=W1(t),a=d.useCallback(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return $e(a,[t,a,...e]),r}function vs(...e){return e.length===1&&e[0]?e[0]:t=>{let r=!1;const n=e.map(a=>{const o=yd(a,t);return r||=typeof o=="function",o});if(r)return()=>{n.forEach((a,o)=>{typeof a=="function"?a():yd(e[o],null)})}}}function yd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=bd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function tE(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=bd(e))&&(n&&(n+=" "),n+=t);return n}function Ae(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let a in n){let o=t[a],i=n[a];typeof o=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Qa(o,i):(a==="className"||a==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?t[a]=tE(o,i):a==="id"&&o&&i?t.id=eE(o,i):a==="ref"&&o&&i?t.ref=vs(o,i):t[a]=i!==void 0?i:o}}return t}function _d(e){const t=d.useRef(null),r=d.useRef(void 0),n=d.useCallback(a=>{if(typeof e=="function"){const o=e,i=o(a);return()=>{typeof i=="function"?i():o(null)}}else if(e)return e.current=a,()=>{e.current=null}},[e]);return d.useMemo(()=>({get current(){return t.current},set current(a){t.current=a,r.current&&(r.current(),r.current=void 0),a!=null&&(r.current=n(a))}}),[n])}const Es=Symbol("default");function Wa({values:e,children:t}){for(let[r,n]of e)t=d.createElement(r.Provider,{value:n},t);return t}function zt(e){let{className:t,style:r,children:n,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s,render:u}=e;return d.useMemo(()=>{let l,c,f;return typeof t=="function"?l=t({...s,defaultClassName:a}):l=t,typeof r=="function"?c=r({...s,defaultStyle:i||{}}):c=r,typeof n=="function"?f=n({...s,defaultChildren:o}):n==null?f=o:f=n,{className:l??a,style:c||i?{...i,...c}:void 0,children:f??o,"data-rac":"",render:u?p=>u(p,s):void 0}},[t,r,n,a,o,i,s,u])}function Ja(e,t){let r=d.useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=t||Es;if(!r.slots[n]){let a=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`)),o=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${a}.`)}return r.slots[n]}return r}function jt(e,t,r){let n=Ja(r,e.slot)||{},{ref:a,...o}=n,i=_d(d.useMemo(()=>vs(t,a),[t,a])),s=Ae(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&(typeof o.style=="function"||typeof e.style=="function"?s.style=u=>{let l=typeof o.style=="function"?o.style(u):o.style,c={...u.defaultStyle,...l},f=typeof e.style=="function"?e.style({...u,defaultStyle:c}):e.style;return{...c,...f}}:s.style={...o.style,...e.style}),[s,i]}function rE(e=!0){let[t,r]=d.useState(e),n=d.useRef(!1),a=d.useCallback(o=>{n.current=!0,r(!!o)},[]);return $e(()=>{n.current||r(!1)},[]),[a,t]}function nE(e){const t=/^(data-.*)$/;let r={};for(const n in e)t.test(n)||(r[n]=e[n]);return r}function aE(e,t,r){let{render:n,...a}=t,o=d.useRef(null),i=d.useMemo(()=>vs(r,o),[r,o]);$e(()=>{},[e,n]);let s={...a,ref:i};return n?n(s,void 0):d.createElement(e,s)}const vd={},st=new Proxy({},{get(e,t){if(typeof t!="string")return;let r=vd[t];return r||(r=d.forwardRef(aE.bind(null,t)),vd[t]=r),r}}),Se=e=>e?.ownerDocument??document,nt=e=>e&&"window"in e&&e.window===e?e:Se(e).defaultView||window;function oE(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function iE(e){return oE(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let sE=!1;function Zt(){return sE}function Ce(e,t){if(!Zt())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;for(;r!==null;){if(r===e)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:iE(r)?r=r.host:r=r.parentNode}return!1}const Ie=(e=document)=>{if(!Zt())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function he(e){if(Zt()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function Ds(e){if(!e)return!1;let t=e.getRootNode(),r=nt(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return n!=null&&e.contains(n)}function Or(e){if(uE())e.focus({preventScroll:!0});else{let t=lE(e);e.focus(),cE(t)}}let eo=null;function uE(){if(eo==null){eo=!1;try{document.createElement("div").focus({get preventScroll(){return eo=!0,!0}})}catch{}}return eo}function lE(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function cE(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}const dE=typeof Element<"u"&&"checkVisibility"in Element.prototype;function fE(e){const t=nt(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,a=r!=="none"&&n!=="hidden"&&n!=="collapse";if(a){const{getComputedStyle:o}=nt(e);let{display:i,visibility:s}=o(e);a=i!=="none"&&s!=="hidden"&&s!=="collapse"}return a}function mE(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Ss(e,t){return dE?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&fE(e)&&mE(e,t)&&(!e.parentElement||Ss(e.parentElement,e))}const Cs=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],pE=Cs.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Cs.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const hE=Cs.join(':not([hidden]):not([tabindex="-1"]),');function Ed(e,t){return e.matches(pE)&&!Dd(e)&&(t?.skipVisibilityCheck||Ss(e))}function gE(e){return e.matches(hE)&&Ss(e)&&!Dd(e)}function Dd(e){let t=e;for(;t!=null;){if(t instanceof nt(t).HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function ws(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Sd(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Cd(e){let t=d.useRef({isFocused:!1,observer:null});return $e(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),d.useCallback(r=>{let n=he(r);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){t.current.isFocused=!0;let a=n,o=i=>{if(t.current.isFocused=!1,a.disabled){let s=ws(i);e?.(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};a.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){t.current.observer?.disconnect();let i=a===Ie()?null:Ie();a.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let to=!1;function yE(e){for(;e&&!Ed(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=nt(e),r=t.document.activeElement;if(!r||r===e)return;to=!0;let n=!1,a=c=>{(he(c)===r||n)&&c.stopImmediatePropagation()},o=c=>{(he(c)===r||n)&&(c.stopImmediatePropagation(),!e&&!n&&(n=!0,Or(r),u()))},i=c=>{(he(c)===e||n)&&c.stopImmediatePropagation()},s=c=>{(he(c)===e||n)&&(c.stopImmediatePropagation(),n||(n=!0,Or(r),u()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let u=()=>{cancelAnimationFrame(l),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),to=!1,n=!1},l=requestAnimationFrame(u);return u}function ro(e){if(typeof window>"u"||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function ir(e){let t=null;return()=>(t==null&&(t=e()),t)}const mn=ir(function(){return xs(/^Mac/i)}),bE=ir(function(){return xs(/^iPhone/i)}),wd=ir(function(){return xs(/^iPad/i)||mn()&&navigator.maxTouchPoints>1}),Hn=ir(function(){return bE()||wd()}),xd=ir(function(){return ro(/AppleWebKit/i)&&!$d()}),$d=ir(function(){return ro(/Chrome/i)}),$s=ir(function(){return ro(/Android/i)}),_E=ir(function(){return ro(/Firefox/i)});function Ad(e){return e.pointerType===""&&e.isTrusted?!0:$s()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function vE(e){return!$s()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Br(e,t,r=!0){let{metaKey:n,ctrlKey:a,altKey:o,shiftKey:i}=t;_E()&&window.event?.type?.startsWith("key")&&e.target==="_blank"&&(mn()?n=!0:a=!0);let s=xd()&&mn()&&!wd()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:a,altKey:o,shiftKey:i}):new MouseEvent("click",{metaKey:n,ctrlKey:a,altKey:o,shiftKey:i,detail:1,bubbles:!0,cancelable:!0});Br.isOpening=r,Or(e),e.dispatchEvent(s),Br.isOpening=!1}Br.isOpening=!1;let Lr=null;const As=new Set;let Vn=new Map,Rr=!1,ks=!1;const EE={Tab:!0,Escape:!0};function no(e,t){for(let r of As)r(e,t)}function DE(e){return!(e.metaKey||!mn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ao(e){Rr=!0,!Br.isOpening&&DE(e)&&(Lr="keyboard",no("keyboard",e))}function pn(e){Lr="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Rr=!0,no("pointer",e))}function kd(e){!Br.isOpening&&Ad(e)&&(Rr=!0,Lr="virtual")}function Td(e){let t=nt(he(e)),r=Se(he(e));he(e)===t||he(e)===r||to||!e.isTrusted||(!Rr&&!ks&&(Lr="virtual",no("virtual",e)),Rr=!1,ks=!1)}function Pd(){to||(Rr=!1,ks=!0)}function Ts(e){if(typeof window>"u"||typeof document>"u")return;const t=nt(e),r=Se(e);if(Vn.get(t))return;let n=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Rr=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",ao,!0),r.addEventListener("keyup",ao,!0),r.addEventListener("click",kd,!0),t.addEventListener("focus",Td,!0),t.addEventListener("blur",Pd,!1),typeof PointerEvent<"u"&&(r.addEventListener("pointerdown",pn,!0),r.addEventListener("pointermove",pn,!0),r.addEventListener("pointerup",pn,!0)),t.addEventListener("beforeunload",()=>{Id(e)},{once:!0}),Vn.set(t,{focus:n})}const Id=(e,t)=>{const r=nt(e),n=Se(e);t&&n.removeEventListener("DOMContentLoaded",t),Vn.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:Vn.get(r).focus}),n.removeEventListener("keydown",ao,!0),n.removeEventListener("keyup",ao,!0),n.removeEventListener("click",kd,!0),r.removeEventListener("focus",Td,!0),r.removeEventListener("blur",Pd,!1),typeof PointerEvent<"u"&&(n.removeEventListener("pointerdown",pn,!0),n.removeEventListener("pointermove",pn,!0),n.removeEventListener("pointerup",pn,!0)),Vn.delete(r))};function SE(e){const t=Se(e);let r;return t.readyState!=="loading"?Ts(e):(r=()=>{Ts(e)},t.addEventListener("DOMContentLoaded",r)),()=>Id(e,r)}typeof document<"u"&&SE();function Ps(){return Lr!=="pointer"}function oo(){return Lr}function CE(e){Lr=e,no(e,null)}const wE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xE(e,t,r){let n=r?he(r):void 0,a=Se(n),o=nt(n);const i=typeof o<"u"?o.HTMLInputElement:HTMLInputElement,s=typeof o<"u"?o.HTMLTextAreaElement:HTMLTextAreaElement,u=typeof o<"u"?o.HTMLElement:HTMLElement,l=typeof o<"u"?o.KeyboardEvent:KeyboardEvent;let c=Ie(a);return e=e||c instanceof i&&!wE.has(c.type)||c instanceof s||c instanceof u&&c.isContentEditable,!(e&&t==="keyboard"&&r instanceof l&&!EE[r.key])}function $E(e,t,r){Ts(),d.useEffect(()=>{if(r?.enabled===!1)return;let n=(a,o)=>{xE(!!r?.isTextInput,a,o)&&e(Ps())};return As.add(n),()=>{As.delete(n)}},t)}const AE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Is(e){return e instanceof HTMLInputElement&&!AE.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const kE=d.useInsertionEffect??$e;function qe(e){const t=d.useRef(null);return kE(()=>{t.current=e},[e]),d.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function Ms(e,t,r,n){let a=qe(r),o=r==null;d.useEffect(()=>{if(o||!e.current)return;let i=e.current;return i.addEventListener(t,a,n),()=>{i.removeEventListener(t,a,n)}},[e,t,n,o])}function zn(e,t){let{id:r,"aria-label":n,"aria-labelledby":a}=e;return r=Mt(r),a&&n?a=[...new Set([r,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!n&&!a&&t&&(n=t),{id:r,"aria-label":n,"aria-labelledby":a}}const TE=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),PE=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function IE(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return TE.has(r.script)}let t=e.split("-")[0];return PE.has(t)}const Md=Symbol.for("react-aria.i18n.locale");function Fd(){let e=typeof window<"u"&&window[Md]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:IE(e)?"rtl":"ltr"}}let Fs=Fd(),jn=new Set;function Od(){Fs=Fd();for(let e of jn)e(Fs)}function ME(){let e=_s(),[t,r]=d.useState(Fs);return d.useEffect(()=>(jn.size===0&&window.addEventListener("languagechange",Od),jn.add(r),()=>{jn.delete(r),jn.size===0&&window.removeEventListener("languagechange",Od)}),[]),e?{locale:typeof window<"u"&&window[Md]||"en-US",direction:"ltr"}:t}const FE=d.createContext(null);function Je(){let e=ME();return d.useContext(FE)||e}const OE=Symbol.for("react-aria.i18n.locale"),BE=Symbol.for("react-aria.i18n.strings");let io;class Nr{constructor(t,r="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,n])=>n)),this.defaultLocale=r}getStringForLocale(t,r){let a=this.getStringsForLocale(r)[t];if(!a)throw new Error(`Could not find intl message ${t} in ${r} locale`);return a}getStringsForLocale(t){let r=this.strings[t];return r||(r=LE(t,this.strings,this.defaultLocale),this.strings[t]=r),r}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let r=window[OE];if(io===void 0){let a=window[BE];if(!a)return null;io={};for(let o in a)io[o]=new Nr({[r]:a[o]},r)}let n=io?.[t];if(!n)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}function LE(e,t,r="en-US"){if(t[e])return t[e];let n=RE(e);if(t[n])return t[n];for(let a in t)if(a.startsWith(n+"-"))return t[a];return t[r]}function RE(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Bd=new Map,Ld=new Map;class Rd{constructor(t,r){this.locale=t,this.strings=r}format(t,r){let n=this.strings.getStringForLocale(t,this.locale);return typeof n=="function"?n(r,this):n}plural(t,r,n="cardinal"){let a=r["="+t];if(a)return typeof a=="function"?a():a;let o=this.locale+":"+n,i=Bd.get(o);i||(i=new Intl.PluralRules(this.locale,{type:n}),Bd.set(o,i));let s=i.select(t);return a=r[s]||r.other,typeof a=="function"?a():a}number(t){let r=Ld.get(this.locale);return r||(r=new Intl.NumberFormat(this.locale),Ld.set(this.locale,r)),r.format(t)}select(t,r){let n=t[r]||t.other;return typeof n=="function"?n():n}}const Nd=new WeakMap;function NE(e){let t=Nd.get(e);return t||(t=new Nr(e),Nd.set(e,t)),t}function Ud(e,t){return t&&Nr.getGlobalDictionaryForPackage(t)||NE(e)}function sr(e,t){let{locale:r}=Je(),n=Ud(e,t);return d.useMemo(()=>new Rd(r,n),[r,n])}const UE=typeof document<"u"?d.useInsertionEffect??d.useLayoutEffect:()=>{};function Zn(e,t,r){let[n,a]=d.useState(e||t),o=d.useRef(n),i=d.useRef(e!==void 0),s=e!==void 0;d.useEffect(()=>{i.current,i.current=s},[s]);let u=s?e:n;UE(()=>{o.current=u});let[,l]=d.useReducer(()=>({}),{}),c=d.useCallback((f,...p)=>{let h=typeof f=="function"?f(o.current):f;Object.is(o.current,h)||(o.current=h,a(h),l(),r?.(h,...p))},[r]);return[u,c]}let ur=new Map,Os=new Set;function Hd(){if(typeof window>"u")return;function e(n){return"propertyName"in n}let t=n=>{let a=he(n);if(!e(n)||!a)return;let o=ur.get(a);o||(o=new Set,ur.set(a,o),a.addEventListener("transitioncancel",r,{once:!0})),o.add(n.propertyName)},r=n=>{let a=he(n);if(!e(n)||!a)return;let o=ur.get(a);if(o&&(o.delete(n.propertyName),o.size===0&&(a.removeEventListener("transitioncancel",r),ur.delete(a)),ur.size===0)){for(let i of Os)i();Os.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Hd():document.addEventListener("DOMContentLoaded",Hd));function HE(){for(const[e]of ur)"isConnected"in e&&!e.isConnected&&ur.delete(e)}function Vd(e){requestAnimationFrame(()=>{HE(),ur.size===0?e():Os.add(e)})}function Gn(e){if(!e.isConnected)return;const t=Se(e);if(oo()==="virtual"){let r=Ie(t);Vd(()=>{const n=Ie(t);(n===r||n===t.body)&&e.isConnected&&Or(e)})}else Or(e)}function zd(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:a}=e;const o=d.useCallback(u=>{if(he(u)===u.currentTarget)return n&&n(u),a&&a(!1),!0},[n,a]),i=Cd(o),s=d.useCallback(u=>{let l=he(u);const c=Se(l),f=c?Ie(c):Ie();l===u.currentTarget&&l===f&&(r&&r(u),a&&a(!0),i(u))},[a,r,i]);return{focusProps:{onFocus:!t&&(r||a||n)?s:void 0,onBlur:!t&&(n||a)?o:void 0}}}function jd(e){if(!e)return;let t=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1,typeof r.continuePropagation=="function"&&r.continuePropagation()},isPropagationStopped(){return t}};e(n),t&&r.stopPropagation()}}function VE(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:jd(e.onKeyDown),onKeyUp:jd(e.onKeyUp)}}}function Zd(e,t){$e(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}let zE=d.createContext(null);function jE(e){let t=d.useContext(zE)||{};Zd(t,e);let{ref:r,...n}=t;return n}function ZE(e,t){let{focusProps:r}=zd(e),{keyboardProps:n}=VE(e),a=Ae(r,n),o=jE(t),i=e.isDisabled?{}:o,s=d.useRef(e.autoFocus);d.useEffect(()=>{s.current&&t.current&&Gn(t.current),s.current=!1},[t]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:Ae({...a,tabIndex:u},i)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));const Gd=d.createContext(!1);function qd(e){let t=(r,n)=>d.useContext(Gd)?null:e(r,n);return t.displayName=e.displayName||e.name,d.forwardRef(t)}function GE(){return d.useContext(Gd)}const qE=new Set(["id"]),KE=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),YE=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),QE=new Set(["dir","lang","hidden","inert","translate"]),Kd=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),XE=/^(data-.*)$/;function et(e,t={}){let{labelable:r,isLink:n,global:a,events:o=a,propNames:i}=t,s={};for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&(qE.has(u)||r&&KE.has(u)||n&&YE.has(u)||a&&QE.has(u)||o&&(Kd.has(u)||u.endsWith("Capture")&&Kd.has(u.slice(0,-7)))||i?.has(u)||XE.test(u))&&(s[u]=e[u]);return s}let hn="default",Bs="",so=new WeakMap;function WE(e){if(Hn()){if(hn==="default"){const t=Se(e);Bs=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hn="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";so.set(e,e.style[t]),e.style[t]="none"}}function Yd(e){if(Hn()){if(hn!=="disabled")return;hn="restoring",setTimeout(()=>{Vd(()=>{if(hn==="restoring"){const t=Se(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Bs||""),Bs="",hn="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&so.has(e)){let t=so.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[r]==="none"&&(e.style[r]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),so.delete(e)}}function Qd(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let Ls=new WeakMap;function Xd(e){let t=e??(typeof document<"u"?document:void 0);if(!t)return Qd(t);if(Ls.has(t))return Ls.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof nt(r).HTMLMetaElement&&(r.nonce||r.content)||Qd(t)||void 0;return n!==void 0&&Ls.set(t,n),n}const Rs=d.createContext({register:()=>{}});Rs.displayName="PressResponderContext";function uo(){let e=d.useRef(new Map),t=d.useCallback((a,o,i,s)=>{let u=s?.once?(...l)=>{e.current.delete(i),i(...l)}:i;e.current.set(i,{type:o,eventTarget:a,fn:u,options:s}),a.addEventListener(o,u,s)},[]),r=d.useCallback((a,o,i,s)=>{let u=e.current.get(i)?.fn||i;a.removeEventListener(o,u,s),e.current.delete(i)},[]),n=d.useCallback(()=>{e.current.forEach((a,o)=>{r(a.eventTarget,a.type,o,a.options)})},[r]);return d.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function JE(e){let t=d.useContext(Rs);if(t){let{register:r,ref:n,...a}=t;e=Ae(a,e),r()}return Zd(t,e.ref),e}class lo{#e;constructor(t,r,n,a){this.#e=!0;const i=(a?.target??n.currentTarget)?.getBoundingClientRect();let s,u=0,l,c=null;n.clientX!=null&&n.clientY!=null&&(l=n.clientX,c=n.clientY),i&&(l!=null&&c!=null?(s=l-i.left,u=c-i.top):(s=i.width/2,u=i.height/2)),this.type=t,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=u,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const Wd=Symbol("linkClicked"),Jd="react-aria-pressable-style",ef="data-react-aria-pressable";function Ns(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:u,preventFocusOnPress:l,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:f,ref:p,...h}=JE(e),[g,y]=d.useState(!1),_=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:D,removeAllGlobalListeners:w}=uo(),b=d.useCallback((x,z)=>{let U=_.current;if(s||U.didFirePressStart)return!1;let P=!0;if(U.isTriggeringEvent=!0,n){let K=new lo("pressstart",z,x);n(K),P=K.shouldStopPropagation}return r&&r(!0),U.isTriggeringEvent=!1,U.didFirePressStart=!0,y(!0),P},[s,n,r]),C=d.useCallback((x,z,U=!0)=>{let P=_.current;if(!P.didFirePressStart)return!1;P.didFirePressStart=!1,P.isTriggeringEvent=!0;let K=!0;if(a){let $=new lo("pressend",z,x);a($),K=$.shouldStopPropagation}if(r&&r(!1),y(!1),t&&U&&!s){let $=new lo("press",z,x);t($),K&&=$.shouldStopPropagation}return P.isTriggeringEvent=!1,K},[s,a,r,t]),v=qe(C),k=d.useCallback((x,z)=>{let U=_.current;if(s)return!1;if(o){U.isTriggeringEvent=!0;let P=new lo("pressup",z,x);return o(P),U.isTriggeringEvent=!1,P.shouldStopPropagation}return!0},[s,o]),I=qe(k),G=d.useCallback(x=>{let z=_.current;if(z.isPressed&&z.target){z.didFirePressStart&&z.pointerType!=null&&C(Ur(z.target,x),z.pointerType,!1),z.isPressed=!1,z.isOverTarget=!1,z.activePointerId=null,z.pointerType=null,w(),f||Yd(z.target);for(let U of z.disposables)U();z.disposables=[]}},[f,w,C]),O=qe(G);d.useEffect(()=>{s&&_.current.isPressed&&O({currentTarget:_.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let Z=d.useCallback(x=>{c&&G(x)},[c,G]),M=d.useCallback(x=>{s||i?.(x)},[s,i]),X=d.useCallback((x,z)=>{if(!s&&i){let U=new MouseEvent("click",x);Sd(U,z),i(ws(U))}},[s,i]),de=d.useMemo(()=>{let x=_.current,z={onKeyDown(P){if(Hs(P.nativeEvent,P.currentTarget)&&Ce(P.currentTarget,he(P))){tf(he(P),P.key)&&P.preventDefault();let K=!0;!x.isPressed&&!P.repeat&&(x.target=P.currentTarget,x.isPressed=!0,x.pointerType="keyboard",K=b(P,"keyboard"));let $=P.currentTarget,T=Y=>{Hs(Y,$)&&!Y.repeat&&Ce($,he(Y))&&x.target&&I(Ur(x.target,Y),"keyboard")};D(Se(P.currentTarget),"keyup",Qa(T,U),!0),K&&P.stopPropagation(),P.metaKey&&mn()&&x.metaKeyEvents?.set(P.key,P.nativeEvent)}else P.key==="Meta"&&(x.metaKeyEvents=new Map)},onClick(P){if(!(P&&!Ce(P.currentTarget,he(P)))&&P&&P.button===0&&!x.isTriggeringEvent&&!Br.isOpening){let K=!0;if(s&&P.preventDefault(),!x.ignoreEmulatedMouseEvents&&!x.isPressed&&(x.pointerType==="virtual"||Ad(P.nativeEvent))){let $=b(P,"virtual"),T=I(P,"virtual"),Y=v(P,"virtual");M(P),K=$&&T&&Y}else if(x.isPressed&&x.pointerType!=="keyboard"){let $=x.pointerType||P.nativeEvent.pointerType||"virtual",T=I(Ur(P.currentTarget,P),$),Y=v(Ur(P.currentTarget,P),$,!0);K=T&&Y,x.isOverTarget=!1,M(P),O(P)}x.ignoreEmulatedMouseEvents=!1,K&&P.stopPropagation()}}},U=P=>{if(x.isPressed&&x.target&&Hs(P,x.target)){tf(he(P),P.key)&&P.preventDefault();let K=he(P),$=Ce(x.target,K);v(Ur(x.target,P),"keyboard",$),$&&X(P,x.target),w(),P.key!=="Enter"&&Us(x.target)&&Ce(x.target,K)&&!P[Wd]&&(P[Wd]=!0,Br(x.target,P,!1)),x.isPressed=!1,x.metaKeyEvents?.delete(P.key)}else if(P.key==="Meta"&&x.metaKeyEvents?.size){let K=x.metaKeyEvents;x.metaKeyEvents=void 0;for(let $ of K.values())x.target?.dispatchEvent(new KeyboardEvent("keyup",$))}};if(typeof PointerEvent<"u"){z.onPointerDown=$=>{if($.button!==0||!Ce($.currentTarget,he($)))return;if(vE($.nativeEvent)){x.pointerType="virtual";return}x.pointerType=$.pointerType;let T=!0;if(!x.isPressed){x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=$.pointerId,x.target=$.currentTarget,f||WE(x.target),T=b($,x.pointerType);let Y=he($);"releasePointerCapture"in Y&&("hasPointerCapture"in Y?Y.hasPointerCapture($.pointerId)&&Y.releasePointerCapture($.pointerId):Y.releasePointerCapture($.pointerId)),D(Se($.currentTarget),"pointerup",P,!1),D(Se($.currentTarget),"pointercancel",K,!1)}T&&$.stopPropagation()},z.onMouseDown=$=>{if(Ce($.currentTarget,he($))&&$.button===0){if(l){let T=yE($.target);T&&x.disposables.push(T)}$.stopPropagation()}},z.onPointerUp=$=>{!Ce($.currentTarget,he($))||x.pointerType==="virtual"||$.button===0&&!x.isPressed&&I($,x.pointerType||$.pointerType)},z.onPointerEnter=$=>{$.pointerId===x.activePointerId&&x.target&&!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,b(Ur(x.target,$),x.pointerType))},z.onPointerLeave=$=>{$.pointerId===x.activePointerId&&x.target&&x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,v(Ur(x.target,$),x.pointerType,!1),Z($))};let P=$=>{if($.pointerId===x.activePointerId&&x.isPressed&&$.button===0&&x.target){if(Ce(x.target,he($))&&x.pointerType!=null){let T=!1,Y=setTimeout(()=>{x.isPressed&&x.target instanceof HTMLElement&&(T?O($):(Or(x.target),x.target.click()))},80);D($.currentTarget,"click",()=>T=!0,!0),x.disposables.push(()=>clearTimeout(Y))}else O($);x.isOverTarget=!1}},K=$=>{O($)};z.onDragStart=$=>{Ce($.currentTarget,he($))&&O($)}}return z},[D,s,l,w,f,Z,b,M,X]);return d.useEffect(()=>{if(!p)return;const x=Se(p.current);if(!x||!x.head||x.getElementById(Jd))return;const z=x.createElement("style");z.id=Jd;let U=Xd(x);U&&(z.nonce=U),z.textContent=`
25
25
  @layer {
26
26
  [${ef}] {
27
27
  touch-action: pan-x pan-y pinch-zoom;
28
28
  }
29
29
  }
30
- `.trim(),x.head.prepend(z)},[p]),d.useEffect(()=>{let x=_.current;return()=>{f||Yd(x.target??void 0);for(let z of x.disposables)z();x.disposables=[]}},[f]),{isPressed:u||g,pressProps:Ae(h,de,{[ef]:!0})}}function Us(e){return e.tagName==="A"&&e.hasAttribute("href")}function Hs(e,t){const{key:r,code:n}=e,a=t,o=a.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(a instanceof nt(a).HTMLInputElement&&!rf(a,r)||a instanceof nt(a).HTMLTextAreaElement||a.isContentEditable)&&!((o==="link"||!o&&Us(a))&&r!=="Enter")}function Ur(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function JE(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Us(e)}function tf(e,t){return e instanceof HTMLInputElement?!rf(e,t):JE(e)}const eD=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function rf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":eD.has(e.type)}function Kn(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:a}=e,o=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=uo(),u=d.useCallback(f=>{Ce(f.currentTarget,he(f))&&o.current.isFocusWithin&&!Ce(f.currentTarget,f.relatedTarget)&&(o.current.isFocusWithin=!1,s(),r&&r(f),a&&a(!1))},[r,a,o,s]),l=Cd(u),c=d.useCallback(f=>{if(!Ce(f.currentTarget,he(f)))return;let p=he(f);const h=Se(p),g=Ie(h);if(!o.current.isFocusWithin&&g===p){n&&n(f),a&&a(!0),o.current.isFocusWithin=!0,l(f);let y=f.currentTarget;i(h,"focus",_=>{let D=he(_);if(o.current.isFocusWithin&&!Ce(y,D)){let w=new h.defaultView.FocusEvent("blur",{relatedTarget:D});Sd(w,y);let b=ws(w);u(b)}},{capture:!0})}},[n,a,l,i,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:u}}}function gn(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,a=d.useRef({isFocused:!1,isFocusVisible:t||Ps()}),[o,i]=d.useState(!1),[s,u]=d.useState(()=>a.current.isFocused&&a.current.isFocusVisible),l=d.useCallback(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),c=d.useCallback(h=>{a.current.isFocused=h,a.current.isFocusVisible=Ps(),i(h),l()},[l]);xE(h=>{a.current.isFocusVisible=h,l()},[r,o],{enabled:o,isTextInput:r});let{focusProps:f}=zd({isDisabled:n,onFocusChange:c}),{focusWithinProps:p}=Kn({isDisabled:!n,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:n?p:f}}let Vs=!1,co=0;function tD(){Vs=!0,setTimeout(()=>{Vs=!1},500)}function nf(e){e.pointerType==="touch"&&tD()}function rD(){let e=Se(null);if(!(typeof e>"u"))return co===0&&typeof PointerEvent<"u"&&e.addEventListener("pointerup",nf),co++,()=>{co--,!(co>0)&&typeof PointerEvent<"u"&&e.removeEventListener("pointerup",nf)}}function Yn(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:a}=e,[o,i]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(rD,[]);let{addGlobalListener:u,removeAllGlobalListeners:l}=uo(),{hoverProps:c,triggerHoverEnd:f}=d.useMemo(()=>{let p=(y,_)=>{if(s.pointerType=_,a||_==="touch"||s.isHovered||!Ce(y.currentTarget,he(y)))return;s.isHovered=!0;let D=y.currentTarget;s.target=D,u(Se(he(y)),"pointerover",w=>{s.isHovered&&s.target&&!Ce(s.target,he(w))&&h(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:D,pointerType:_}),r&&r(!0),i(!0)},h=(y,_)=>{let D=s.target;s.pointerType="",s.target=null,!(_==="touch"||!s.isHovered||!D)&&(s.isHovered=!1,l(),n&&n({type:"hoverend",target:D,pointerType:_}),r&&r(!1),i(!1))},g={};return typeof PointerEvent<"u"&&(g.onPointerEnter=y=>{Vs&&y.pointerType==="mouse"||p(y,y.pointerType)},g.onPointerLeave=y=>{!a&&Ce(y.currentTarget,he(y))&&h(y,y.pointerType)}),{hoverProps:g,triggerHoverEnd:h}},[t,r,n,a,s,u,l]);return d.useEffect(()=>{a&&f({currentTarget:s.target},s.pointerType)},[a]),{hoverProps:c,isHovered:o}}const af=d.createContext({});function nD(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":a,labelElementType:o="label"}=e;t=Mt(t);let i=Mt(),s={};r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:o==="label"?t:void 0});let u=jn({id:t,"aria-label":a,"aria-labelledby":n});return{labelProps:s,fieldProps:u}}let zs=new Map,js=!1;try{js=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let fo=!1;try{fo=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const of={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Zs{constructor(t,r={}){this.numberFormatter=aD(t,r),this.options=r}format(t){let r="";if(!js&&this.options.signDisplay!=null?r=oD(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!fo){let{unit:n,unitDisplay:a="short",locale:o}=this.resolvedOptions();if(!n)return r;let i=of[n]?.[a];r+=i[o]||i.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(t),a=this.numberFormatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!js&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!fo&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}}function aD(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),t.style==="unit"&&!fo){let{unit:o,unitDisplay:i="short"}=t;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!of[o]?.[i])throw new Error(`Unsupported unit ${o} with unitDisplay = ${i}`);t={...t,style:"decimal"}}let n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(zs.has(n))return zs.get(n);let a=new Intl.NumberFormat(e,t);return zs.set(n,a),a}function oD(e,t,r){if(t==="auto")return e.format(r);if(t==="never")return e.format(Math.abs(r));{let n=!1;if(t==="always"?n=r>0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let a=e.format(-r),o=e.format(r),i=a.replace(o,"").replace(/\u200e|\u061C/,"");return[...i].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),a.replace(o,"!!!").replace(i,"+").replace("!!!",o)}else return e.format(r)}}const iD=new RegExp("^.*\\(.*\\).*$"),sD=["latn","arab","hanidec","deva","beng","fullwide"];class sf{constructor(t,r={}){this.locale=t,this.options=r}parse(t){return Gs(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,r,n){return Gs(this.locale,this.options,t).isValidPartialNumber(t,r,n)}getNumberingSystem(t){return Gs(this.locale,this.options,t).options.numberingSystem}}const uf=new Map;function Gs(e,t,r){let n=lf(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r)){for(let a of sD)if(a!==n.options.numberingSystem){let o=lf(e+(e.includes("-u-")?"-nu-":"-u-nu-")+a,t);if(o.isValidPartialNumber(r))return o}}return n}function lf(e,t){let r=e+(t?Object.entries(t).sort((a,o)=>a[0]<o[0]?-1:1).join():""),n=uf.get(r);return n||(n=new uD(e,t),uf.set(r,n)),n}class uD{constructor(t,r={}){this.locale=t,r.roundingIncrement!==1&&r.roundingIncrement!=null&&(r.maximumFractionDigits==null&&r.minimumFractionDigits==null?(r.maximumFractionDigits=0,r.minimumFractionDigits=0):r.maximumFractionDigits==null?r.maximumFractionDigits=r.minimumFractionDigits:r.minimumFractionDigits==null&&(r.minimumFractionDigits=r.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,r),this.options=this.formatter.resolvedOptions(),this.symbols=lD(t,this.formatter,this.options,r),this.options.style==="percent"&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}parse(t){let r=this.formatter.resolvedOptions().useGrouping,n=this.sanitize(t);if(!r&&this.symbols.group&&n.includes(this.symbols.group))return NaN;if(this.symbols.group&&(n=n.replaceAll(this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let o=n.indexOf("-");n=n.replace("-",""),n=n.replace("+","");let i=n.indexOf(".");i===-1&&(i=n.length),n=n.replace(".",""),i-2===0?n=`0.${n}`:i-2===-1?n=`0.0${n}`:i-2===-2?n="0.00":n=`${n.slice(0,i-2)}.${n.slice(i-2)}`,o>-1&&(n=`-${n}`)}let a=n?+n:NaN;if(isNaN(a))return NaN;if(this.options.style==="percent"){let o={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new sf(this.locale,o).parse(new Zs(this.locale,o).format(a))}return this.options.currencySign==="accounting"&&iD.test(t)&&(a=-1*a),a}sanitize(t){let r=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(n=>n.unit===t)?this.symbols.noNumeralUnits.find(n=>n.unit===t).value.toString():(t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=lr(t,",",this.symbols.decimal),t=lr(t,"،",this.symbols.decimal)),this.symbols.group&&r&&(t=lr(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&r&&(t=lr(t,"'",this.symbols.group)),this.symbols.group==="'"&&t.includes("’")&&r&&(t=lr(t,"’",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&r&&(t=lr(t," ",this.symbols.group),t=lr(t,/\u00A0/g,this.symbols.group)),t)}isValidPartialNumber(t,r=-1/0,n=1/0){let a=this.formatter.resolvedOptions().useGrouping;return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&r<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&n>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&a&&(t=lr(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}}const cf=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),df=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function lD(e,t,r,n){let a=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand",useGrouping:!0}),o=a.formatToParts(-10000.111),i=a.formatToParts(10000.111),s=df.map(k=>a.formatToParts(k)),u=s.map((k,I)=>{let G=k.find(O=>O.type==="unit");return G&&!k.some(O=>O.type==="integer"||O.type==="fraction")?{unit:G.value,value:df[I]}:null}).filter(k=>!!k),l=o.find(k=>k.type==="minusSign")?.value??"-",c=i.find(k=>k.type==="plusSign")?.value;!c&&(n?.signDisplay==="exceptZero"||n?.signDisplay==="always")&&(c="+");let p=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(k=>k.type==="decimal")?.value,h=o.find(k=>k.type==="group")?.value,g=o.filter(k=>!cf.has(k.type)).map(k=>ff(k.value)),y=s.flatMap(k=>k.filter(I=>!cf.has(I.type)).map(I=>ff(I.value))),_=[...new Set([...g,...y])].sort((k,I)=>I.length-k.length),D=_.length===0?new RegExp("\\p{White_Space}|\\p{Cf}","gu"):new RegExp(`${_.join("|")}|\\p{White_Space}|\\p{Cf}`,"gu"),w=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(9876543210)].reverse(),b=new Map(w.map((k,I)=>[k,I])),C=new RegExp(`[${w.join("")}]`,"g");return{minusSign:l,plusSign:c,decimal:p,group:h,literals:D,numeral:C,numerals:w,index:k=>String(b.get(k)),noNumeralUnits:u}}function lr(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function ff(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qs(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}const cD=d.createContext(null),mf=7e3;let cr=null;function Qn(e,t="assertive",r=mf){cr?cr.announce(e,t,r):(cr=new fD,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?cr.announce(e,t,r):setTimeout(()=>{cr?.isAttached()&&cr?.announce(e,t,r)},100))}function dD(e){cr&&cr.clear(e)}class fD{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(t){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",t),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,r="assertive",n=mf){if(!this.node)return;let a=document.createElement("div");typeof t=="object"?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",t["aria-labelledby"])):a.textContent=t,r==="assertive"?this.assertiveLog?.appendChild(a):this.politeLog?.appendChild(a),t!==""&&setTimeout(()=>{a.remove()},n)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function mD(e,t){let{elementType:r="button",isDisabled:n,onPress:a,onPressStart:o,onPressEnd:i,onPressUp:s,onPressChange:u,preventFocusOnPress:l,allowFocusWhenDisabled:c,onClick:f,href:p,target:h,rel:g,type:y="button"}=e,_;r==="button"?_={type:y,disabled:n,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:_={role:"button",href:r==="a"&&!n?p:void 0,target:r==="a"?h:void 0,type:r==="input"?y:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?g:void 0};let{pressProps:D,isPressed:w}=Ns({onPressStart:o,onPressEnd:i,onPressChange:u,onPress:a,onPressUp:s,onClick:f,isDisabled:n,preventFocusOnPress:l,ref:t}),{focusableProps:b}=jE(e,t);c&&(b.tabIndex=n?-1:b.tabIndex);let C=Ae(b,D,et(e,{labelable:!0}));return{isPressed:w,buttonProps:Ae(_,C,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}const Xn=d.createContext({}),Ks=qd(function(t,r){[t,r]=jt(t,r,Xn);let n=t,{isPending:a}=n,{buttonProps:o,isPressed:i}=mD(t,r);o=hD(o,a);let{focusProps:s,isFocused:u,isFocusVisible:l}=gn(t),{hoverProps:c,isHovered:f}=Yn({...t,isDisabled:t.isDisabled||a}),p={isHovered:f,isPressed:(n.isPressed||i)&&!a,isFocused:u,isFocusVisible:l,isDisabled:t.isDisabled||!1,isPending:a??!1},h=zt({...t,values:p,defaultClassName:"react-aria-Button"}),g=Mt(o.id),y=Mt(),_=o["aria-labelledby"];a&&(_?_=`${_} ${y}`:o["aria-label"]&&(_=`${g} ${y}`));let D=d.useRef(a);d.useEffect(()=>{let b={"aria-labelledby":_||g};(!D.current&&u&&a||D.current&&u&&!a)&&Qn(b,"assertive"),D.current=a},[a,u,_,g]);let w=et(t,{global:!0});return delete w.onClick,d.createElement(st.button,{...Ae(w,h,o,s,c),type:o.type==="submit"&&a?"button":o.type,id:g,ref:r,"aria-labelledby":_,slot:t.slot||void 0,"aria-disabled":a?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":a||void 0,"data-focus-visible":l||void 0},d.createElement(cD.Provider,{value:{id:y}},h.children))}),pD=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function hD(e,t){if(t){for(const r in e)r.startsWith("on")&&!pD.test(r)&&(e[r]=void 0);e.href=void 0,e.target=void 0}return e}const Ys=d.createContext({}),gD=d.forwardRef(function(t,r){[t,r]=jt(t,r,Ys);let{children:n,level:a=3,className:o,...i}=t,s=st[`h${a}`];return d.createElement(s,{...i,ref:r,className:o??"react-aria-Heading"},n)}),Qs=d.createContext({});var pf={};pf={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var hf={};hf={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var gf={};gf={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var yf={};yf={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var bf={};bf={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var _f={};_f={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var vf={};vf={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var Ef={};Ef={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var Df={};Df={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var Sf={};Sf={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var Cf={};Cf={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var wf={};wf={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var xf={};xf={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var $f={};$f={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var Af={};Af={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var kf={};kf={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var Tf={};Tf={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var Pf={};Pf={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var If={};If={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var Mf={};Mf={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var Ff={};Ff={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var Of={};Of={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var Bf={};Bf={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var Lf={};Lf={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var Rf={};Rf={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var Nf={};Nf={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var Uf={};Uf={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var Hf={};Hf={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var Vf={};Vf={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var zf={};zf={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var jf={};jf={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var Zf={};Zf={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var Gf={};Gf={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var qf={};qf={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var Wn={};Wn={"ar-AE":pf,"bg-BG":hf,"cs-CZ":gf,"da-DK":yf,"de-DE":bf,"el-GR":_f,"en-US":vf,"es-ES":Ef,"et-EE":Df,"fi-FI":Sf,"fr-FR":Cf,"he-IL":wf,"hr-HR":xf,"hu-HU":$f,"it-IT":Af,"ja-JP":kf,"ko-KR":Tf,"lt-LT":Pf,"lv-LV":If,"nb-NO":Mf,"nl-NL":Ff,"pl-PL":Of,"pt-BR":Bf,"pt-PT":Lf,"ro-RO":Rf,"ru-RU":Nf,"sk-SK":Uf,"sl-SI":Hf,"sr-SP":Vf,"sv-SE":zf,"tr-TR":jf,"uk-UA":Zf,"zh-CN":Gf,"zh-TW":qf};function Kf(e,t){let r=d.useRef(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yn(e,t){return e-t*Math.floor(e/t)}const Yf=1721426;function Hr(e,t,r,n){t=Jn(e,t);let a=t-1,o=-2;return r<=2?o=0:dr(t)&&(o=-1),Yf-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*r-362)/12+o+n)}function dr(e){return e%4===0&&(e%100!==0||e%400===0)}function Jn(e,t){return e==="BC"?1-t:t}function mo(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const yD={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class at{fromJulianDay(t){let r=t,n=r-Yf,a=Math.floor(n/146097),o=yn(n,146097),i=Math.floor(o/36524),s=yn(o,36524),u=Math.floor(s/1461),l=yn(s,1461),c=Math.floor(l/365),f=a*400+i*100+u*4+c+(i!==4&&c!==4?1:0),[p,h]=mo(f),g=r-Hr(p,h,1,1),y=2;r<Hr(p,h,3,1)?y=0:dr(h)&&(y=1);let _=Math.floor(((g+y)*12+373)/367),D=r-Hr(p,h,_,1)+1;return new Ne(p,h,_,D)}toJulianDay(t){return Hr(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return yD[dr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return dr(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const bD={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Be(e,t){return t=Me(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function _D(e,t){return t=Me(t,e.calendar),e=Vr(e),t=Vr(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function vD(e,t){return t=Me(t,e.calendar),e=eu(e),t=eu(t),e.era===t.era&&e.year===t.year}function ED(e,t){return po(e.calendar,t.calendar)&&Be(e,t)}function po(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Qf(e,t){return Be(e,Ws(t))}const DD={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Xs(e,t,r){let n=e.calendar.toJulianDay(e),a=r?DD[r]:xD(t),o=Math.ceil(n+1-a)%7;return o<0&&(o+=7),o}function Xf(e){return qt(Date.now(),e)}function Ws(e){return ot(Xf(e))}function Wf(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Jf(e,t){return em(e)-em(t)}function em(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Js=null,SD=!1;function ho(){return Js==null&&(Js=new Intl.DateTimeFormat().resolvedOptions().timeZone),Js}function tm(){return SD}function Vr(e){return e.subtract({days:e.day-1})}function go(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function eu(e){return Vr(e.subtract({months:e.month-1}))}function ea(e,t,r){let n=Xs(e,t,r);return e.subtract({days:n})}function CD(e,t,r){return ea(e,t,r).add({days:6})}const rm=new Map,tu=new Map;function wD(e){if(Intl.Locale){let r=rm.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&rm.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function xD(e){let t=tu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return tu.set(e,t),t.firstDay}let r=wD(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&bD[r]||0};tu.set(e,t)}return t.firstDay}function $D(e,t,r){let n=e.calendar.getDaysInMonth(e);return Math.ceil((Xs(Vr(e),t,r)+n)/7)}function nm(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function am(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function bn(e){e=Me(e,new at);let t=Jn(e.era,e.year);return om(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function om(e,t,r,n,a,o,i){let s=new Date;return s.setUTCHours(n,a,o,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function ru(e,t){if(t==="UTC")return 0;if(e>0&&t===ho()&&!tm())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:a,hour:o,minute:i,second:s}=sm(e,t);return om(r,n,a,o,i,s,0)-Math.floor(e/1e3)*1e3}const im=new Map;function sm(e,t){let r=im.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),im.set(t,r));let n=r.formatToParts(new Date(e)),a={};for(let o of n)o.type!=="literal"&&(a[o.type]=o.value);return{year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}const um=864e5;function AD(e,t,r,n){return(r===n?[r]:[r,n]).filter(o=>kD(e,t,o))}function kD(e,t,r){let n=sm(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Gt(e,t,r="compatible"){let n=Kt(e);if(t==="UTC")return bn(n);if(t===ho()&&r==="compatible"&&!tm()){n=Me(n,new at);let u=new Date,l=Jn(n.era,n.year);return u.setFullYear(l,n.month-1,n.day),u.setHours(n.hour,n.minute,n.second,n.millisecond),u.getTime()}let a=bn(n),o=ru(a-um,t),i=ru(a+um,t),s=AD(n,t,a-o,a-i);if(s.length===1)return s[0];if(s.length>1)switch(r){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-o,a-i);case"compatible":case"later":return Math.max(a-o,a-i);case"reject":throw new RangeError("No such absolute time found")}}function lm(e,t,r="compatible"){return new Date(Gt(e,t,r))}function qt(e,t){let r=ru(e,t),n=new Date(e+r),a=n.getUTCFullYear(),o=n.getUTCMonth()+1,i=n.getUTCDate(),s=n.getUTCHours(),u=n.getUTCMinutes(),l=n.getUTCSeconds(),c=n.getUTCMilliseconds();return new aa(a<1?"BC":"AD",a<1?-a+1:a,o,i,t,r,s,u,l,c)}function ot(e){return new Ne(e.calendar,e.era,e.year,e.month,e.day)}function Kt(e,t){let r=0,n=0,a=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:a,millisecond:o}=t),new na(e.calendar,e.era,e.year,e.month,e.day,r,n,a,o)}function Me(e,t){if(po(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,zr(n),n}function TD(e,t,r){if(e instanceof aa)return e.timeZone===t?e:cm(e,t);let n=Gt(e,t,r);return qt(n,t)}function PD(e){let t=bn(e)-e.offset;return new Date(t)}function cm(e,t){let r=bn(e)-e.offset;return Me(qt(r,t),e.calendar)}function ID(e){return cm(e,ho())}const ta=36e5;function yo(e,t){let r=e.copy(),n="hour"in r?pm(r,t):0;nu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,au(r),dm(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,MD(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let a=r.calendar.getYearsInEra(r);if(r.year>a){let i=r.calendar.isInverseEra?.(r);r.year=a,r.month=i?1:r.calendar.getMonthsInYear(r),r.day=i?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let o=r.calendar.getMonthsInYear(r);return r.month>o&&(r.month=o,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function nu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function au(e){for(;e.month<1;)nu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,nu(e,1)}function MD(e){for(;e.day<1;)e.month--,au(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,au(e)}function dm(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function zr(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),dm(e)}function ou(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function fm(e,t){return yo(e,ou(t))}function iu(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),zr(r),r}function ra(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),mm(r),r}function FD(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=bo(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bo(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bo(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=bo(e.hour,24),t}function mm(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function bo(e,t){let r=e%t;return r<0&&(r+=t),r}function pm(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,FD(e)}function hm(e,t){let r=e.copy();return pm(r,t),r}function OD(e,t){return hm(e,ou(t))}function su(e,t,r,n){let a=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),i=o.indexOf(e.era);if(i<0)throw new Error("Invalid era: "+e.era);i=Yt(i,r,0,o.length-1,n?.round),a.era=o[i],zr(a);break}case"year":a.calendar.isInverseEra?.(a)&&(r=-r),a.year=Yt(e.year,r,-1/0,9999,n?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=Yt(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":a.day=Yt(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),zr(a),a}function uu(e,t,r,n){let a=e.copy();switch(t){case"hour":{let o=e.hour,i=0,s=23;if(n?.hourCycle===12){let u=o>=12;i=u?12:0,s=u?23:11}a.hour=Yt(o,r,i,s,n?.round);break}case"minute":a.minute=Yt(e.minute,r,0,59,n?.round);break;case"second":a.second=Yt(e.second,r,0,59,n?.round);break;case"millisecond":a.millisecond=Yt(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return a}function Yt(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gm(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let a=yo(Kt(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=Gt(a,e.timeZone)}else r=bn(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=qt(r,e.timeZone);return Me(n,e.calendar)}function BD(e,t){return gm(e,ou(t))}function LD(e,t,r,n){switch(t){case"hour":{let a=0,o=23;if(n?.hourCycle===12){let g=e.hour>=12;a=g?12:0,o=g?23:11}let i=Kt(e),s=Me(ra(i,{hour:a}),new at),u=[Gt(s,e.timeZone,"earlier"),Gt(s,e.timeZone,"later")].filter(g=>qt(g,e.timeZone).day===s.day)[0],l=Me(ra(i,{hour:o}),new at),c=[Gt(l,e.timeZone,"earlier"),Gt(l,e.timeZone,"later")].filter(g=>qt(g,e.timeZone).day===l.day).pop(),f=bn(e)-e.offset,p=Math.floor(f/ta),h=f%ta;return f=Yt(p,r,Math.floor(u/ta),Math.floor(c/ta),n?.round)*ta+h,Me(qt(f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return uu(e,t,r,n);case"era":case"year":case"month":case"day":{let a=su(Kt(e),t,r,n),o=Gt(a,e.timeZone);return Me(qt(o,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function RD(e,t,r){let n=Kt(e),a=ra(iu(n,t),t);if(a.compare(n)===0)return e;let o=Gt(a,e.timeZone,r);return Me(qt(o,e.timeZone),e.calendar)}const ND=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,UD=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,ym=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function bm(e){let t=e.match(ND);if(!t)throw ym.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Ne(Ft(t[1],0,9999),Ft(t[2],1,12),1);return r.day=Ft(t[3],1,r.calendar.getDaysInMonth(r)),r}function HD(e){let t=e.match(UD);if(!t)throw ym.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Ft(t[1],-9999,9999),n=r<1?"BC":"AD",a=new na(n,r<1?-r+1:r,Ft(t[2],1,12),1,t[4]?Ft(t[4],0,23):0,t[5]?Ft(t[5],0,59):0,t[6]?Ft(t[6],0,59):0,t[7]?Ft(t[7],0,1/0)*1e3:0);return a.day=Ft(t[3],0,a.calendar.getDaysInMonth(a)),a}function Ft(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function _m(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function vm(e){let t=Me(e,new at),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Em(e){return`${vm(e)}T${_m(e)}`}function VD(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return a!==0&&(o+=`:${String(a).padStart(2,"0")}`),o}function zD(e){return`${Em(e)}${VD(e.offset)}[${e.timeZone}]`}function lu(e){let t=typeof e[0]=="object"?e.shift():new at,r;if(typeof e[0]=="string")r=e.shift();else{let i=t.getEras();r=i[i.length-1]}let n=e.shift(),a=e.shift(),o=e.shift();return[t,r,n,a,o]}class Ne{#e;constructor(...t){let[r,n,a,o,i]=lu(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=i,zr(this)}copy(){return this.era?new Ne(this.calendar,this.era,this.year,this.month,this.day):new Ne(this.calendar,this.year,this.month,this.day)}add(t){return yo(this,t)}subtract(t){return fm(this,t)}set(t){return iu(this,t)}cycle(t,r,n){return su(this,t,r,n)}toDate(t){return lm(this,t)}toString(){return vm(this)}compare(t){return Wf(this,t)}}class cu{#e;constructor(t=0,r=0,n=0,a=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=a,mm(this)}copy(){return new cu(this.hour,this.minute,this.second,this.millisecond)}add(t){return hm(this,t)}subtract(t){return OD(this,t)}set(t){return ra(this,t)}cycle(t,r,n){return uu(this,t,r,n)}toString(){return _m(this)}compare(t){return Jf(this,t)}}class na{#e;constructor(...t){let[r,n,a,o,i]=lu(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,zr(this)}copy(){return this.era?new na(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new na(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return yo(this,t)}subtract(t){return fm(this,t)}set(t){return iu(ra(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return su(this,t,r,n);default:return uu(this,t,r,n)}}toDate(t,r){return lm(this,t,r)}toString(){return Em(this)}compare(t){let r=Wf(this,t);return r===0?Jf(this,Kt(t)):r}}class aa{#e;constructor(...t){let[r,n,a,o,i]=lu(t),s=t.shift(),u=t.shift();this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=i,this.timeZone=s,this.offset=u,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,zr(this)}copy(){return this.era?new aa(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new aa(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return gm(this,t)}subtract(t){return BD(this,t)}set(t,r){return RD(this,t,r)}cycle(t,r,n){return LD(this,t,r,n)}toDate(){return PD(this)}toString(){return zD(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-TD(t,this.timeZone).toDate().getTime()}}const _n=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],jD=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_o=[1867,1911,1925,1988,2018],fr=["meiji","taisho","showa","heisei","reiwa"];function Dm(e){const t=_n.findIndex(([r,n,a])=>e.year<r||e.year===r&&e.month<n||e.year===r&&e.month===n&&e.day<a);return t===-1?_n.length-1:t===0?0:t-1}function du(e){let t=_o[fr.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Ne(e.year+t,e.month,e.day)}class ZD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=Dm(r);return new Ne(this,fr[n],r.year-_o[n],r.month,r.day)}toJulianDay(t){return super.toJulianDay(du(t))}balanceDate(t){let r=du(t),n=Dm(r);fr[n]!==t.era&&(t.era=fr[n],t.year=r.year-_o[n]),this.constrainDate(t)}constrainDate(t){let r=fr.indexOf(t.era),n=jD[r];if(n!=null){let[a,o,i]=n,s=a-_o[r];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(o,t.month),t.month===o&&(t.day=Math.min(i,t.day)))}if(t.year===1&&r>=0){let[,a,o]=_n[r];t.month=Math.max(a,t.month),t.month===a&&(t.day=Math.max(o,t.day))}}getEras(){return fr}getYearsInEra(t){let r=fr.indexOf(t.era),n=_n[r],a=_n[r+1];if(a==null)return 9999-n[0]+1;let o=a[0]-n[0];return(t.month<a[1]||t.month===a[1]&&t.day<a[2])&&o++,o}getDaysInMonth(t){return super.getDaysInMonth(du(t))}getMinimumMonthInYear(t){let r=Sm(t);return r?r[1]:1}getMinimumDayInMonth(t){let r=Sm(t);return r&&t.month===r[1]?r[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function Sm(e){if(e.year===1){let t=fr.indexOf(e.era);return _n[t]}}const Cm=-543;class GD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=Jn(r.era,r.year);return new Ne(this,n-Cm,r.month,r.day)}toJulianDay(t){return super.toJulianDay(wm(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(wm(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function wm(e){let[t,r]=mo(e.year+Cm);return new Ne(t,r,e.month,e.day)}const vo=1911;function xm(e){return e.era==="minguo"?e.year+vo:1-e.year+vo}function $m(e){let t=e-vo;return t>0?["minguo",t]:["before_minguo",1-t]}class qD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=Jn(r.era,r.year),[a,o]=$m(n);return new Ne(this,a,o,r.month,r.day)}toJulianDay(t){return super.toJulianDay(Am(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[r,n]=$m(xm(t));t.era=r,t.year=n}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(Am(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-vo}constructor(...t){super(...t),this.identifier="roc"}}function Am(e){let[t,r]=mo(xm(e));return new Ne(t,r,e.month,e.day)}const km=1948320,Tm=[0,31,62,93,124,155,186,216,246,276,306,336];class KD{fromJulianDay(t){let r=t-km,n=1+Math.floor((33*r+3)/12053),a=365*(n-1)+Math.floor((8*n+21)/33),o=r-a,i=o<216?Math.floor(o/31):Math.floor((o-6)/30),s=o-Tm[i]+1;return new Ne(this,n,i+1,s)}toJulianDay(t){let r=km-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return r+=Tm[t.month-1],r+=t.day,r}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||yn(25*t.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const fu=78,Pm=80;class YD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=r.year-fu,a=t-Hr(r.era,r.year,1,1),o;a<Pm?(n--,o=dr(r.year-1)?31:30,a+=o+155+90+10):(o=dr(r.year)?31:30,a-=Pm);let i,s;if(a<o)i=1,s=a+1;else{let u=a-o;u<155?(i=Math.floor(u/31)+2,s=u%31+1):(u-=155,i=Math.floor(u/30)+7,s=u%30+1)}return new Ne(this,n,i,s)}toJulianDay(t){let r=t.year+fu,[n,a]=mo(r),o,i;return dr(a)?(o=31,i=Hr(n,a,3,21)):(o=30,i=Hr(n,a,3,22)),t.month===1?i+t.day-1:(i+=o+Math.min(t.month-2,5)*31,t.month>=8&&(i+=(t.month-7)*30),i+=t.day-1,i)}getDaysInMonth(t){return t.month===1&&dr(t.year+fu)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Eo=1948440,Im=1948439,Dt=1300,vn=1600,QD=460322;function Do(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Mm(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),a=Math.min(12,Math.ceil((r-(29+Do(t,n,1,1)))/29.5)+1),o=r-Do(t,n,a,1)+1;return new Ne(e,n,a,o)}function Fm(e){return(14+11*e)%30<11}class mu{fromJulianDay(t){return Mm(this,Eo,t)}toJulianDay(t){return Do(Eo,t.year,t.month,t.day)}getDaysInMonth(t){let r=29+t.month%2;return t.month===12&&Fm(t.year)&&r++,r}getMonthsInYear(){return 12}getDaysInYear(t){return Fm(t.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class XD extends mu{fromJulianDay(t){return Mm(this,Im,t)}toJulianDay(t){return Do(Im,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const WD="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let pu,En;function So(e){return QD+En[e-Dt]}function oa(e,t){let r=e-Dt,n=1<<11-(t-1);return(pu[r]&n)===0?29:30}function Om(e,t){let r=So(e);for(let n=1;n<t;n++)r+=oa(e,n);return r}function Bm(e){return En[e+1-Dt]-En[e-Dt]}class JD extends mu{constructor(){if(super(),this.identifier="islamic-umalqura",pu||(pu=new Uint16Array(Uint8Array.from(atob(WD),t=>t.charCodeAt(0)).buffer)),!En){En=new Uint32Array(vn-Dt+1);let t=0;for(let r=Dt;r<=vn;r++){En[r-Dt]=t;for(let n=1;n<=12;n++)t+=oa(r,n)}}}fromJulianDay(t){let r=t-Eo,n=So(Dt),a=So(vn);if(r<n||r>a)return super.fromJulianDay(t);{let o=Dt-1,i=1,s=1;for(;s>0;){o++,s=r-So(o)+1;let u=Bm(o);if(s===u){i=12;break}else if(s<u){let l=oa(o,i);for(i=1;s>l;)s-=l,i++,l=oa(o,i);break}}return new Ne(this,o,i,r-Om(o,i)+1)}}toJulianDay(t){return t.year<Dt||t.year>vn?super.toJulianDay(t):Eo+Om(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<Dt||t.year>vn?super.getDaysInMonth(t):oa(t.year,t.month)}getDaysInYear(t){return t.year<Dt||t.year>vn?super.getDaysInYear(t):Bm(t.year)}}const Lm=347997,Rm=1080,Nm=24*Rm,eS=29,tS=12*Rm+793,rS=eS*Nm+tS;function jr(e){return yn(e*7+1,19)<7}function Co(e){let t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return yn(3*(n+1),7)<3&&(n+=1),n}function nS(e){let t=Co(e-1),r=Co(e);return Co(e+1)-r===356?2:r-t===382?1:0}function ia(e){return Co(e)+nS(e)}function Um(e){return ia(e+1)-ia(e)}function aS(e){let t=Um(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function wo(e,t){if(t>=6&&!jr(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let r=aS(e);return t===2?r===2?30:29:t===3?r===0?29:30:t===6?jr(e)?30:0:30}class oS{fromJulianDay(t){let r=t-Lm,n=r*Nm/rS,a=Math.floor((19*n+234)/235)+1,o=ia(a),i=Math.floor(r-o);for(;i<1;)a--,o=ia(a),i=Math.floor(r-o);let s=1,u=0;for(;u<i;)u+=wo(a,s),s++;s--,u-=wo(a,s);let l=i-u;return new Ne(this,a,s,l)}toJulianDay(t){let r=ia(t.year);for(let n=1;n<t.month;n++)r+=wo(t.year,n);return r+t.day+Lm}getDaysInMonth(t){return wo(t.year,t.month)}getMonthsInYear(t){return jr(t.year)?13:12}getDaysInYear(t){return Um(t.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,r){r.year!==t.year&&(jr(r.year)&&!jr(t.year)&&r.month>6?t.month--:!jr(r.year)&&jr(t.year)&&r.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const hu=1723856,Hm=1824665,gu=5500;function xo(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function yu(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-xo(e,r,1,1))/30),a=t+1-xo(e,r,n,1);return[r,n,a]}function Vm(e){return Math.floor(e%4/3)}function zm(e,t){return t%13!==0?30:Vm(e)+5}class bu{fromJulianDay(t){let[r,n,a]=yu(hu,t),o="AM";return r<=0&&(o="AA",r+=gu),new Ne(this,o,r,n,a)}toJulianDay(t){let r=t.year;return t.era==="AA"&&(r-=gu),xo(hu,r,t.month,t.day)}getDaysInMonth(t){return zm(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+Vm(t.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class iS extends bu{fromJulianDay(t){let[r,n,a]=yu(hu,t);return r+=gu,new Ne(this,"AA",r,n,a)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class sS extends bu{fromJulianDay(t){let[r,n,a]=yu(Hm,t),o="CE";return r<=0&&(o="BCE",r=1-r),new Ne(this,o,r,n,a)}toJulianDay(t){let r=t.year;return t.era==="BCE"&&(r=1-r),xo(Hm,r,t.month,t.day)}getDaysInMonth(t){let r=t.year;return t.era==="BCE"&&(r=1-r),zm(r,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function jm(e){switch(e){case"buddhist":return new GD;case"ethiopic":return new bu;case"ethioaa":return new iS;case"coptic":return new sS;case"hebrew":return new oS;case"indian":return new YD;case"islamic-civil":return new mu;case"islamic-tbla":return new XD;case"islamic-umalqura":return new JD;case"japanese":return new ZD;case"persian":return new KD;case"roc":return new qD;case"gregory":default:return new at}}let _u=new Map;class Qt{constructor(t,r={}){this.formatter=Zm(t,r),this.options=r}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return cS()&&(this.resolvedHourCycle||(this.resolvedHourCycle=dS(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const uS={true:{ja:"h11"},false:{}};function Zm(e,t={}){if(typeof t.hour12=="boolean"&&lS()){t={...t};let a=uS[String(t.hour12)][e.split("-")[0]],o=t.hour12?"h12":"h23";t.hourCycle=a??o,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(_u.has(r))return _u.get(r);let n=new Intl.DateTimeFormat(e,t);return _u.set(r,n),n}let vu=null;function lS(){return vu==null&&(vu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),vu}let Eu=null;function cS(){return Eu==null&&(Eu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Eu}function dS(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=Zm(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}function St(e){e=Kf(e??{},fS);let{locale:t}=Je();return d.useMemo(()=>new Qt(t,e),[t,e])}function fS(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a of r)if(t[a]!==e[a])return!1;return!0}function Gm(e){return e&&e.__esModule?e.default:e}const Du=new WeakMap;function sa(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function mS(e){let t=sr(Gm(Wn),"@react-aria/calendar"),r,n;"highlightedRange"in e?{start:r,end:n}=e.highlightedRange||{}:(r=Array.isArray(e.value)?e.value[0]:e.value??void 0,n=Array.isArray(e.value)?e.value.at(-1):e.value??void 0);let a=St({weekday:"long",month:"long",year:"numeric",day:"numeric",era:sa(r)||sa(n),timeZone:e.timeZone}),{locale:o}=Je(),i=d.useMemo(()=>new Intl.ListFormat(o),[o]),s="anchorDate"in e?e.anchorDate:null;return d.useMemo(()=>{if(!s&&r&&n){if(Be(r,n)){let u=a.format(r.toDate(e.timeZone));return t.format("selectedDateDescription",{date:u})}else if("highlightedRange"in e){let u=Cu(a,t,r,n,e.timeZone);return t.format("selectedRangeDescription",{dateRange:u})}else if(Array.isArray(e.value)){let u=e.value.map(c=>a.format(c.toDate(e.timeZone))),l=i.format(u);return t.format("selectedDateDescription",{date:l})}}return""},[r,n,s,e,t,a,i])}function Su(e,t,r,n){let a=sr(Gm(Wn),"@react-aria/calendar"),o=sa(e)||sa(t),i=St({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:r}),s=St({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:r});return d.useMemo(()=>{if(Be(e,Vr(e))){let u=e,l=t;if(e.calendar.getFormattableMonth&&(u=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(l=t.calendar.getFormattableMonth(t)),Be(t,go(e)))return i.format(u.toDate(r));if(Be(t,go(t)))return n?Cu(i,a,u,l,r):i.formatRange(u.toDate(r),l.toDate(r))}return n?Cu(s,a,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,a,r,n])}function Cu(e,t,r,n,a){let o=e.formatRangeToParts(r.toDate(a),n.toDate(a)),i=-1;for(let l=0;l<o.length;l++){let c=o[l];if(c.source==="shared"&&c.type==="literal")i=l;else if(c.source==="endRange")break}let s="",u="";for(let l=0;l<o.length;l++)l<i?s+=o[l].value:l>i&&(u+=o[l].value);return t.format("dateRange",{startDate:s,endDate:u})}function qm(e,t){const r=d.useRef(!0),n=d.useRef(null);let a=qe(e);d.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),d.useEffect(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((i,s)=>!Object.is(i,o[s])))&&a(),n.current=t},t)}function pS(e){return e&&e.__esModule?e.default:e}function hS(e,t){let r=sr(pS(Wn),"@react-aria/calendar"),n=et(e),a=Su(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),o=Su(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);qm(()=>{t.isFocused||Qn(o)},[o]);let i=mS(t);qm(()=>{i&&Qn(i,"polite",4e3)},[i]);let s=Xa([!!e.errorMessage,e.isInvalid,e.validationState]);Du.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:s,selectedDateDescription:i});let[u,l]=d.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&u&&(l(!1),t.setFocused(!0));let[f,p]=d.useState(!1),h=e.isDisabled||t.isPreviousVisibleRangeInvalid();h&&f&&(p(!1),t.setFocused(!0));let g=jn({id:e.id,"aria-label":[e["aria-label"],o].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:Ae(n,g,{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":r.format("next"),isDisabled:c,onFocusChange:l},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":r.format("previous"),isDisabled:h,onFocusChange:p},errorMessageProps:{id:s},title:a}}function gS(e,t){return hS(e,t)}function yS(e,t){let{startDate:r=t.visibleRange.start,endDate:n=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:o}=Je(),i=y=>{switch(y.key){case"Enter":case" ":y.preventDefault(),t.selectFocusedDate();break;case"PageUp":y.preventDefault(),y.stopPropagation(),t.focusPreviousSection(y.shiftKey);break;case"PageDown":y.preventDefault(),y.stopPropagation(),t.focusNextSection(y.shiftKey);break;case"End":y.preventDefault(),y.stopPropagation(),t.focusSectionEnd();break;case"Home":y.preventDefault(),y.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":y.preventDefault(),y.stopPropagation(),o==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":y.preventDefault(),y.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":y.preventDefault(),y.stopPropagation(),o==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":y.preventDefault(),y.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(y.preventDefault(),t.setAnchorDate(null));break}},s=Su(r,n,t.timeZone,!0),{ariaLabel:u,ariaLabelledBy:l}=Du.get(t),c=jn({"aria-label":[u,s].filter(Boolean).join(", "),"aria-labelledby":l}),f=St({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=Je(),h=d.useMemo(()=>{let y=t.visibleDuration.days&&t.visibleDuration.days<7,_=y?r:ea(Ws(t.timeZone),p,a),D=y?t.visibleDuration.days:7;return[...new Array(D).keys()].map(w=>{let C=_.add({days:w}).toDate(t.timeZone);return f.format(C)})},[p,t.timeZone,f,a,r,t.visibleDuration.days]),g=t.getWeeksInMonth(r);return{gridProps:Ae(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||t.selectionMode==="multiple"||void 0,onKeyDown:i,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:h,weeksInMonth:g}}function $o(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,a=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&r.overflow!=="hidden"&&(a=!0),a&&t&&(a=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),a}function Ao(e,t){let r=e;for($o(r,t)&&(r=r.parentElement);r&&!$o(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function wu(e,t){let r=[],n=document.scrollingElement||document.documentElement;for(;e&&($o(e,t)&&r.push(e),e!==n);)e=e.parentElement;return r}function xu(e,t,r={}){let{block:n="nearest",inline:a="nearest"}=r;if(e===t)return;let o=e.scrollTop,i=e.scrollLeft,s=t.getBoundingClientRect(),u=e.getBoundingClientRect(),l=window.getComputedStyle(t),c=window.getComputedStyle(e),f=document.scrollingElement||document.documentElement,p=e===f,h=e===f?0:u.top,g=e===f?e.clientHeight:u.bottom,y=e===f?0:u.left,_=e===f?e.clientWidth:u.right,D=parseFloat(l.scrollMarginTop)||0,w=parseFloat(l.scrollMarginBottom)||0,b=parseFloat(l.scrollMarginLeft)||0,C=parseFloat(l.scrollMarginRight)||0,v=parseFloat(c.scrollPaddingTop)||0,k=parseFloat(c.scrollPaddingBottom)||0,I=parseFloat(c.scrollPaddingLeft)||0,G=parseFloat(c.scrollPaddingRight)||0,O=parseFloat(c.borderTopWidth)||0,Z=parseFloat(c.borderBottomWidth)||0,M=parseFloat(c.borderLeftWidth)||0,X=parseFloat(c.borderRightWidth)||0,de=s.top-D,x=s.bottom+w,z=s.left-b,U=s.right+C,P=e===f?0:M+X,K=e===f?0:O+Z,$=e===f?0:e.offsetWidth-e.clientWidth-P,T=e===f?0:e.offsetHeight-e.clientHeight-K,Y=h+(p?0:O)+v,se=g-(p?0:Z)-k-T,te=y+(p?0:M)+I,H=_-(p?0:X)-G;c.direction==="rtl"&&!Vn()?te+=$:H-=$;let Q=de<Y||x>se,A=z<te||U>H;if(Q&&n==="start")o+=de-Y;else if(Q&&n==="center")o+=(de+x)/2-(Y+se)/2;else if(Q&&n==="end")o+=x-se;else if(Q&&n==="nearest"){let S=de-Y,E=x-se;o+=Math.abs(S)<=Math.abs(E)?S:E}if(A&&a==="start")i+=z-te;else if(A&&a==="center")i+=(z+U)/2-(te+H)/2;else if(A&&a==="end")i+=U-H;else if(A&&a==="nearest"){let S=z-te,E=U-H;i+=Math.abs(S)<=Math.abs(E)?S:E}e.scrollTo({left:i,top:o})}function Km(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let{left:o,top:i}=e.getBoundingClientRect(),s=wu(e,!0);for(let c of s)xu(c,e);let{left:u,top:l}=e.getBoundingClientRect();if(Math.abs(o-u)>1||Math.abs(i-l)>1){s=r?wu(r,!0):[];for(let c of s)xu(c,r,{block:"center",inline:"center"});for(let c of wu(e,!0))xu(c,e)}}else{let{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:s,top:u}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-u)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let bS=0;const $u=new Map;function Au(e){let[t,r]=d.useState();return $e(()=>{if(!e)return;let n=$u.get(e);if(n)r(n.element.id);else{let a=`react-aria-description-${bS++}`;r(a);let o=document.createElement("div");o.id=a,o.style.display="none",o.textContent=e,document.body.appendChild(o),n={refCount:0,element:o},$u.set(e,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),$u.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _S(e){return e&&e.__esModule?e.default:e}function vS(e,t,r){let{date:n,isDisabled:a}=e,{errorMessageId:o,selectedDateDescription:i}=Du.get(t),s=sr(_S(Wn),"@react-aria/calendar"),u=St({weekday:"long",day:"numeric",month:"long",year:"numeric",era:sa(n),timeZone:t.timeZone}),l=t.isCellFocused(n)&&!e.isOutsideMonth;a=a||t.isCellDisabled(n)||!!e.isOutsideMonth;let c=t.isCellUnavailable(n),f=!a&&!c,p=t.isSelected(n)&&f,h=!1;t.isValueInvalid&&("highlightedRange"in t?h=!t.anchorDate&&t.highlightedRange!=null&&n.compare(t.highlightedRange.start)>=0&&n.compare(t.highlightedRange.end)<=0:Array.isArray(t.value)?h=t.value.some(M=>Be(M,n)):t.value&&(h=Be(t.value,n))),h&&!a&&(p=!0),n=Kf(n,ED);let g=d.useMemo(()=>n.toDate(t.timeZone),[n,t.timeZone]),y=Qf(n,t.timeZone),_=d.useMemo(()=>{let M="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Be(n,t.value.start)||Be(n,t.value.end))&&(M=i+", "),M+=u.format(g),y?M=s.format(p?"todayDateSelected":"todayDate",{date:M}):p&&(M=s.format("dateSelected",{date:M})),t.minValue&&Be(n,t.minValue)?M+=", "+s.format("minimumDate"):t.maxValue&&Be(n,t.maxValue)&&(M+=", "+s.format("maximumDate")),M},[u,g,s,p,y,n,t,i]),D="";"anchorDate"in t&&l&&!t.isReadOnly&&f&&(t.anchorDate?D=s.format("finishRangeSelectionPrompt"):D=s.format("startRangeSelectionPrompt"));let w=Au(D),b=d.useRef(!1),C=d.useRef(!1),v=d.useRef(void 0),{pressProps:k,isPressed:I}=Ns({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(M){if(t.isReadOnly){t.setFocusedDate(n),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&(M.pointerType==="mouse"||M.pointerType==="touch")){if(t.highlightedRange&&!h){if(Be(n,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(n),t.setFocused(!0),t.setDragging(!0),C.current=!0;return}else if(Be(n,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(n),t.setFocused(!0),t.setDragging(!0),C.current=!0;return}}let X=()=>{t.setDragging(!0),v.current=void 0,t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0),b.current=!0};M.pointerType==="touch"?v.current=setTimeout(X,200):X()}},onPressEnd(){C.current=!1,b.current=!1,clearTimeout(v.current),v.current=void 0},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0))},onPressUp(M){t.isReadOnly||("anchorDate"in t&&v.current&&(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0)),"anchorDate"in t&&(C.current?t.setAnchorDate(n):t.anchorDate&&!b.current?(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0)):M.pointerType==="keyboard"&&!t.anchorDate?(t.selectDate(n),t.focusNearestAvailableDate(n)):M.pointerType==="virtual"&&(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0))))}}),G;a||(G=Be(n,t.focusedDate)?0:-1),d.useEffect(()=>{l&&r.current&&(Or(r.current),oo()!=="pointer"&&Ie()===r.current&&Km(r.current,{containingElement:Ao(r.current)}))},[l,r]);let O=St({day:"numeric",timeZone:t.timeZone,calendar:n.calendar.identifier}),Z=d.useMemo(()=>O.formatToParts(g).find(M=>M.type==="day").value,[O,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":p||void 0,"aria-invalid":h||void 0},buttonProps:Ae(k,{onFocus(){a||(t.setFocusedDate(n),t.setFocused(!0))},tabIndex:G,role:"button","aria-disabled":!f||void 0,"aria-label":_,"aria-invalid":h||void 0,"aria-describedby":[h?o:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(M){"highlightDate"in t&&(M.pointerType!=="touch"||t.isDragging)&&f&&t.highlightDate(n)},onPointerDown(M){let X=he(M);X instanceof HTMLElement&&"releasePointerCapture"in X&&("hasPointerCapture"in X?X.hasPointerCapture(M.pointerId)&&X.releasePointerCapture(M.pointerId):X.releasePointerCapture(M.pointerId))},onContextMenu(M){M.preventDefault()}}),isPressed:I,isFocused:l,isSelected:p,isDisabled:a,isUnavailable:c,isOutsideVisibleRange:n.compare(t.visibleRange.start)<0||n.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:Z}}function ES(e,t){let r=St({month:e.format||"short",calendar:t.focusedDate.calendar.identifier,timeZone:t.timeZone}),n=[],a=t.focusedDate.calendar.getMonthsInYear(t.focusedDate);for(let s=1;s<=a;s++){let u=t.focusedDate.set({month:s}),l=u.calendar.getFormattableMonth?u.calendar.getFormattableMonth(u):u;n.push({id:s,date:u,formatted:r.format(l.toDate(t.timeZone))})}let{locale:o}=Je();return{"aria-label":d.useMemo(()=>new Intl.DisplayNames(o,{type:"dateTimeField"}).of("month"),[o]),value:t.focusedDate.month,onChange:s=>{s!=null&&t.setFocusedDate(n[Number(s)-1].date)},items:n}}function DS(e,t){let r=St({year:e.format?.year||"numeric",era:e.format?.era||(t.focusedDate.calendar.identifier==="gregory"&&t.focusedDate.era==="BC"?"short":void 0),calendar:t.focusedDate.calendar.identifier,timeZone:t.timeZone}),n=e.visibleYears||20,a=t.focusedDate.subtract({years:Math.floor(n/2)}),o=t.focusedDate.add({years:Math.ceil(n/2)-1});t.maxValue&&o.compare(t.maxValue)>0&&(o=ot(t.maxValue),a=o.subtract({years:n-1})),t.minValue&&a.compare(t.minValue)<0&&(a=ot(t.minValue),o=a.add({years:n-1}),t.maxValue&&o.compare(t.maxValue)>0&&(o=ot(t.maxValue)));let i=[],s=a,u=0;for(;s.compare(o)<=0;)vD(s,t.focusedDate)&&(u=i.length),i.push({id:i.length,date:s,formatted:r.format(s.toDate(t.timeZone))}),s=s.add({years:1});let{locale:l}=Je();return{"aria-label":d.useMemo(()=>new Intl.DisplayNames(l,{type:"dateTimeField"}).of("year"),[l]),value:u,onChange:f=>{f!=null&&t.setFocusedDate(i[f].date)},items:i}}function ko(e,t,r){return t!=null&&e.compare(t)<0||r!=null&&e.compare(r)>0}function Ym(e,t,r,n,a){let o={};for(let s in t)o[s]=Math.floor(t[s]/2),o[s]>0&&t[s]%2===0&&o[s]--;let i=Zr(e,t,r).subtract(o);return ua(e,i,t,r,n,a)}function Zr(e,t,r,n,a){let o=e;return t.years?o=eu(e):t.months?o=Vr(e):(t.weeks||t.days&&t.days>7)&&(o=ea(e,r)),ua(e,o,t,r,n,a)}function ku(e,t,r,n,a){let o={...t};o.days?o.days--:o.weeks?o.weeks--:o.months?o.months--:o.years&&o.years--;let i=Zr(e,t,r).subtract(o);return ua(e,i,t,r,n,a)}function ua(e,t,r,n,a,o){if(a&&e.compare(a)>=0){let i=am(t,Zr(ot(a),r,n));i&&(t=i)}if(o&&e.compare(o)<=0){let i=nm(t,ku(ot(o),r,n));i&&(t=i)}return t}function Xt(e,t,r){if(t){let n=am(e,ot(t));n&&(e=n)}if(r){let n=nm(e,ot(r));n&&(e=n)}return e}function SS(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function CS(e,t){return e===t?!0:e.days===t.days&&e.weeks===t.weeks&&e.months===t.months&&e.years===t.years}function wS(e){let t=d.useMemo(()=>new Qt(e.locale),[e.locale]),r=d.useMemo(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:a,visibleDuration:o={months:1},minValue:i,maxValue:s,selectionAlignment:u,isDateUnavailable:l,pageBehavior:c="visible",selectionMode:f="single",firstDayOfWeek:p,weeksInMonth:h}=e,g=d.useMemo(()=>a(r.calendar),[a,r.calendar]),[y,_]=Gn(e.value,e.defaultValue??null,e.onChange),D=d.useMemo(()=>Array.isArray(y)?y.map(H=>Me(ot(H),g)):y?Me(ot(y),g):null,[y,g]),w=d.useMemo(()=>{let H=Array.isArray(y)?y[0]:y;return H&&"timeZone"in H?H.timeZone:r.timeZone},[y,r.timeZone]),b=d.useMemo(()=>e.focusedValue?Xt(Me(ot(e.focusedValue),g),i,s):void 0,[e.focusedValue,g,i,s]),C=d.useMemo(()=>e.defaultFocusedValue?Xt(Me(ot(e.defaultFocusedValue),g),i,s):Xt(D?Array.isArray(D)?D[0]:D:Me(Ws(w),g),i,s),[e.defaultFocusedValue,D,w,g,i,s]),[v,k]=Gn(b,C,e.onFocusChange),I=()=>{switch(u){case"start":return Zr(v,o,n,i,s);case"end":return ku(v,o,n,i,s);case"center":default:return Ym(v,o,n,i,s)}},[G,O]=d.useState(I),[Z,M]=d.useState(e.autoFocus||!1),[X,de]=d.useState(o);CS(o,X)||(de(o),O(I()));let x=d.useMemo(()=>{let H={...o};return H.days?H.days--:H.days=-1,G.add(H)},[G,o]),[z,U]=d.useState(g);if(!po(g,z)){let H=Me(v,g);O(Ym(H,o,n,i,s)),k(H),U(g)}ko(v,i,s)?k(Xt(v,i,s)):v.compare(G)<0?O(ku(v,o,n,i,s)):v.compare(x)>0&&O(Zr(v,o,n,i,s));function P(H){H=Xt(H,i,s),k(H)}function K(H){let Q=Xt(H,i,s),A=SS(Q,G,l);if(!A)return null;let S=Array.isArray(y)?y[0]:y,E=Me(A,S?.calendar||new at);return S&&"hour"in S?S.set(E):E}function $(H){if(!e.isDisabled&&!e.isReadOnly){if(H===null){_(f==="multiple"?[]:null);return}if(Array.isArray(H))_(H.map(K).filter(Boolean));else{let Q=K(H);Q&&_(Q)}}}let T=d.useMemo(()=>D?Array.isArray(D)?D.some(H=>l?.(H)||ko(H,i,s)):l?.(D)||ko(D,i,s):!1,[D,l,i,s]),Y=e.isInvalid||e.validationState==="invalid"||T,se=Y?"invalid":null,te=d.useMemo(()=>c==="visible"?o:Tu(o),[c,o]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:D,setValue:$,selectionMode:f,visibleDuration:o,visibleRange:{start:G,end:x},minValue:i,maxValue:s,focusedDate:v,timeZone:w,validationState:se,isValueInvalid:Y,setFocusedDate(H){P(H)},focusNextDay(){P(v.add({days:1}))},focusPreviousDay(){P(v.subtract({days:1}))},focusNextRow(){o.days?this.focusNextPage():(o.weeks||o.months||o.years)&&P(v.add({weeks:1}))},focusPreviousRow(){o.days?this.focusPreviousPage():(o.weeks||o.months||o.years)&&P(v.subtract({weeks:1}))},focusNextPage(){let H=G.add(te);k(Xt(v.add(te),i,s)),O(Zr(ua(v,H,te,n,i,s),te,n))},focusPreviousPage(){let H=G.subtract(te);k(Xt(v.subtract(te),i,s)),O(Zr(ua(v,H,te,n,i,s),te,n))},focusSectionStart(){o.days?P(G):o.weeks?P(ea(v,n)):(o.months||o.years)&&P(Vr(v))},focusSectionEnd(){o.days?P(x):o.weeks?P(CD(v,n)):(o.months||o.years)&&P(go(v))},focusNextSection(H){if(!H&&!o.days){P(v.add(Tu(o)));return}o.days?this.focusNextPage():o.weeks?P(v.add({months:1})):(o.months||o.years)&&P(v.add({years:1}))},focusPreviousSection(H){if(!H&&!o.days){P(v.subtract(Tu(o)));return}o.days?this.focusPreviousPage():o.weeks?P(v.subtract({months:1})):(o.months||o.years)&&P(v.subtract({years:1}))},selectFocusedDate(){l&&l(v)||this.selectDate(v)},selectDate(H){if(!(e.isDisabled||e.isReadOnly))if(f==="multiple"&&H!=null){let Q=K(H);if(!Q)return;let A=[];Array.isArray(y)?A=y:y!=null&&(A=[y]);let S=A.findIndex(j=>Be(j,Q)),E=S>=0?A.slice(0,S).concat(A.slice(S+1)):[...A,Q];_(E)}else $(H)},isFocused:Z,setFocused:M,isInvalid(H){return ko(H,i,s)},isSelected(H){return!D||this.isCellDisabled(H)||this.isCellUnavailable(H)?!1:Array.isArray(D)?D.some(Q=>Be(Q,H)):Be(H,D)},isCellFocused(H){return Z&&v&&Be(H,v)},isCellDisabled(H){return e.isDisabled||H.compare(G)<0||H.compare(x)>0||this.isInvalid(H)},isCellUnavailable(H){return e.isDateUnavailable?e.isDateUnavailable(H):!1},isPreviousVisibleRangeInvalid(){let H=G.subtract({days:1});return Be(H,G)||this.isInvalid(H)},isNextVisibleRangeInvalid(){let H=x.add({days:1});return Be(H,x)||this.isInvalid(H)},getDatesInWeek(H,Q=G){let A=Q.add({weeks:H}),S=[],E=o.days&&o.days<7?o.days:7;if(E===7){A=ea(A,n,p);let j=Xs(A,n,p);for(let q=0;q<j;q++)S.push(null)}for(;S.length<E;){S.push(A);let j=A.add({days:1});if(Be(A,j))break;A=j}for(;S.length<E;)S.push(null);return S},getWeeksInMonth(H=G){let Q=h||$D(H,n,p);return(o.weeks||o.days)&&(Q=o.weeks??0,o.days&&(Q+=Math.ceil(o.days/7))),Q}}}function Tu(e){let t={...e};for(let r in e)t[r]=1;return t}const Qm={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Xm(e={}){let{style:t,isFocusable:r}=e,[n,a]=d.useState(!1),{focusWithinProps:o}=Kn({isDisabled:!r,onFocusWithinChange:s=>a(s)}),i=d.useMemo(()=>n?t:t?{...Qm,...t}:Qm,[n]);return{visuallyHiddenProps:{...o,style:i}}}function Pu(e){let{children:t,elementType:r="div",isFocusable:n,style:a,...o}=e,{visuallyHiddenProps:i}=Xm(e);return d.createElement(r,Ae(o,i),t)}const To=d.createContext(null),xS=d.createContext(null),Dn=d.createContext(null),la=d.createContext(null),$S=d.forwardRef(function(t,r){[t,r]=jt(t,r,To);let{locale:n}=Je(),a=wS({...t,locale:n,createCalendar:t.createCalendar||jm}),{calendarProps:o,prevButtonProps:i,nextButtonProps:s,errorMessageProps:u,title:l}=gS(t,a),c=zt({...t,values:{state:a,isDisabled:t.isDisabled||!1,isInvalid:a.isValueInvalid},defaultClassName:"react-aria-Calendar"}),f=et(t,{global:!0});return d.createElement(st.div,{...Ae(f,c,o),ref:r,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":a.isValueInvalid||void 0},d.createElement(Wa,{values:[[Xn,{slots:{previous:i,next:s}}],[Ys,{"aria-hidden":!0,level:2,children:l}],[Dn,a],[To,t],[Qs,{slots:{errorMessage:u}}]]},d.createElement(Pu,null,d.createElement("h2",null,o["aria-label"])),c.children,d.createElement(Pu,null,d.createElement("button",{"aria-label":s["aria-label"],disabled:s.isDisabled,onClick:()=>a.focusNextPage(),tabIndex:-1}))))}),Po=d.createContext(null),AS=d.forwardRef(function(t,r){let n=d.useContext(Dn),a=d.useContext(la),o=Ja(To),i=Ja(xS),s=n??a,u=s.visibleRange.start;t.offset&&(u=u.add(t.offset));let l=o?.firstDayOfWeek??i?.firstDayOfWeek,{gridProps:c,headerProps:f,weekDays:p,weeksInMonth:h}=yS({startDate:u,endDate:go(u),weekdayStyle:t.weekdayStyle,firstDayOfWeek:l},s),g=et(t,{global:!0});return d.createElement(Po.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:h}},d.createElement(st.table,{render:t.render,...Ae(g,c),ref:r,style:t.style,cellPadding:0,className:t.className??"react-aria-CalendarGrid"},typeof t.children!="function"?t.children:d.createElement(d.Fragment,null,d.createElement(Wm,null,y=>d.createElement(Jm,null,y)),d.createElement(ep,null,t.children))))});function kS(e,t){let{children:r,style:n,className:a}=e,{headerProps:o,weekDays:i}=d.useContext(Po),s=et(e,{global:!0});return d.createElement(st.thead,{render:e.render,...Ae(s,o),ref:t,style:n,className:a??"react-aria-CalendarGridHeader"},d.createElement("tr",null,i.map((u,l)=>d.cloneElement(r(u),{key:l}))))}const Wm=d.forwardRef(kS);function TS(e,t){let{children:r,style:n,className:a}=e,o=et(e,{global:!0});return d.createElement(st.th,{render:e.render,...o,ref:t,style:n,className:a||"react-aria-CalendarHeaderCell"},r)}const Jm=d.forwardRef(TS);function PS(e,t){let{children:r,style:n,className:a}=e,o=d.useContext(Dn),i=d.useContext(la),s=o??i,{startDate:u,weeksInMonth:l}=d.useContext(Po),c=et(e,{global:!0});return d.createElement(st.tbody,{render:e.render,...c,ref:t,style:n,className:a??"react-aria-CalendarGridBody"},[...new Array(l).keys()].map(f=>d.createElement("tr",{key:f},s.getDatesInWeek(f,u).map((p,h)=>p?d.cloneElement(r(p),{key:h}):d.createElement("td",{key:h})))))}const ep=d.forwardRef(PS),IS=d.forwardRef(function({date:t,...r},n){let a=d.useContext(Dn),o=d.useContext(la),i=a??o,{startDate:s}=d.useContext(Po)??{startDate:i.visibleRange.start},u=i.visibleDuration.days||i.visibleDuration.weeks?!1:!_D(s,t),l=Qf(t,i.timeZone),c=d.useRef(null),{cellProps:f,buttonProps:p,...h}=vS({date:t,isOutsideMonth:u},i,c),{hoverProps:g,isHovered:y}=Yn({...r,isDisabled:h.isDisabled||h.isUnavailable}),{focusProps:_,isFocusVisible:D}=gn();D&&=h.isFocused;let w=!1,b=!1;"highlightedRange"in i&&i.highlightedRange&&(w=Be(t,i.highlightedRange.start),b=Be(t,i.highlightedRange.end));let C=zt({...r,defaultChildren:h.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:t,isHovered:y,isOutsideMonth:u,isFocusVisible:D,isSelectionStart:w,isSelectionEnd:b,isToday:l,...h}}),v={"data-focused":h.isFocused||void 0,"data-hovered":y||void 0,"data-pressed":h.isPressed||void 0,"data-unavailable":h.isUnavailable||void 0,"data-disabled":h.isDisabled||void 0,"data-focus-visible":D||void 0,"data-outside-visible-range":h.isOutsideVisibleRange||void 0,"data-outside-month":u||void 0,"data-selected":h.isSelected||void 0,"data-selection-start":w||void 0,"data-selection-end":b||void 0,"data-invalid":h.isInvalid||void 0,"data-today":l||void 0},k=et(r,{global:!0});return d.createElement("td",{...f,ref:n},d.createElement(st.div,{...Ae(k,p,_,g,v,C),ref:c}))});function MS(e){let t=d.useContext(Dn),r=d.useContext(la),a=DS(e,t||r);return e.children(a)}function FS(e){let t=d.useContext(Dn),r=d.useContext(la),a=ES(e,t||r);return e.children(a)}const OS=d.createContext(null),tp={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},rp={...tp,customError:!0,valid:!1},ca={isInvalid:!1,validationDetails:tp,validationErrors:[]},BS=d.createContext({}),Iu="__reactAriaFormValidationState";function np(e){if(e[Iu]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:a,commitValidation:o}=e[Iu];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:a,commitValidation:o}}return LS(e)}function LS(e){let{isInvalid:t,validationState:r,name:n,value:a,builtinValidation:o,validate:i,validationBehavior:s="aria"}=e;r&&(t||=r==="invalid");let u=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:rp}:null,l=d.useMemo(()=>{if(!i||a==null)return null;let Z=RS(i,a);return ap(Z)},[i,a]);o?.validationDetails.valid&&(o=void 0);let c=d.useContext(BS),f=d.useMemo(()=>n?Array.isArray(n)?n.flatMap(Z=>Mu(c[Z])):Mu(c[n]):[],[c,n]),[p,h]=d.useState(c),[g,y]=d.useState(!1);c!==p&&(h(c),y(!1));let _=d.useMemo(()=>ap(g?[]:f),[g,f]),D=d.useRef(ca),[w,b]=d.useState(ca),C=d.useRef(ca),v=()=>{if(!k)return;I(!1);let Z=l||o||D.current;Fu(Z,C.current)||(C.current=Z,b(Z))},[k,I]=d.useState(!1);return d.useEffect(v),{realtimeValidation:u||_||l||o||ca,displayValidation:s==="native"?u||_||w:u||_||l||o||w,updateValidation(Z){s==="aria"&&!Fu(w,Z)?b(Z):D.current=Z},resetValidation(){let Z=ca;Fu(Z,C.current)||(C.current=Z,b(Z)),s==="native"&&I(!1),y(!0)},commitValidation(){s==="native"&&I(!0),y(!0)}}}function Mu(e){return e?Array.isArray(e)?e:[e]:[]}function RS(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return Mu(r)}return[]}function ap(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:rp}:null}function Fu(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,n)=>r===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([r,n])=>t.validationDetails[r]===n)}const NS=d.createContext(null);function op(e){let{description:t,errorMessage:r,isInvalid:n,validationState:a}=e,{labelProps:o,fieldProps:i}=nD(e),s=Xa([!!t,!!r,n,a]),u=Xa([!!t,!!r,n,a]);return i=Ae(i,{"aria-describedby":[s,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:i,descriptionProps:{id:s},errorMessageProps:{id:u}}}function US(e,t,r){let n=qe(a=>{r&&!a.defaultPrevented&&r(t)});d.useEffect(()=>{let a=e?.current?.form;return a?.addEventListener("reset",n),()=>{a?.removeEventListener("reset",n)}},[e])}function HS(e,t,r){let{validationBehavior:n,focus:a}=e;$e(()=>{if(n==="native"&&r?.current&&"setCustomValidity"in r.current&&!r.current.disabled){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(l),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(zS(r.current))}});let o=d.useRef(!1),i=qe(()=>{o.current||t.resetValidation()}),s=qe(l=>{t.displayValidation.isInvalid||t.commitValidation();let c=r?.current?.form;!l.defaultPrevented&&r&&c&&jS(c)===r.current&&(a?a():r.current?.focus(),SE("keyboard")),l.preventDefault()}),u=qe(()=>{t.commitValidation()});d.useEffect(()=>{let l=r?.current;if(!l)return;let c=l.form,f=c?.reset;return c&&(c.reset=()=>{o.current=!window.event||window.event.type==="message"&&he(window.event)instanceof MessagePort,f?.call(c),o.current=!1}),l.addEventListener("invalid",s),l.addEventListener("change",u),c?.addEventListener("reset",i),()=>{l.removeEventListener("invalid",s),l.removeEventListener("change",u),c?.removeEventListener("reset",i),c&&(c.reset=f)}},[r,n])}function VS(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function zS(e){return{isInvalid:!e.validity.valid,validationDetails:VS(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function jS(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}const Io=d.createContext({}),ip=d.forwardRef(function(t,r){[t,r]=jt(t,r,Io);let{isDisabled:n,isInvalid:a,isReadOnly:o,onHoverStart:i,onHoverChange:s,onHoverEnd:u,...l}=t;n??=!!t["aria-disabled"]&&t["aria-disabled"]!=="false",a??=!!t["aria-invalid"]&&t["aria-invalid"]!=="false";let{hoverProps:c,isHovered:f}=Yn({onHoverStart:i,onHoverChange:s,onHoverEnd:u,isDisabled:n}),{isFocused:p,isFocusVisible:h,focusProps:g}=gn({within:!0}),y=zt({...t,values:{isHovered:f,isFocusWithin:p,isFocusVisible:h,isDisabled:n,isInvalid:a},defaultClassName:"react-aria-Group"});return d.createElement(st.div,{...Ae(l,g,c),...y,ref:r,role:t.role??"group",slot:t.slot??void 0,"data-focus-within":p||void 0,"data-hovered":f||void 0,"data-focus-visible":h||void 0,"data-disabled":n||void 0,"data-invalid":a||void 0,"data-readonly":o||void 0},y.children)}),sp=d.createContext({});let ZS=e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...a}=e;return a};const GS=qd(function(t,r){[t,r]=jt(t,r,sp);let{hoverProps:n,isHovered:a}=Yn({...t,isDisabled:t.disabled}),{isFocused:o,isFocusVisible:i,focusProps:s}=gn({isTextInput:!0,autoFocus:t.autoFocus}),u=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",l=zt({...t,values:{isHovered:a,isFocused:o,isFocusVisible:i,isDisabled:t.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return d.createElement(st.input,{...Ae(ZS(t),s,n),...l,ref:r,"data-focused":o||void 0,"data-disabled":t.disabled||void 0,"data-hovered":a||void 0,"data-focus-visible":i||void 0,"data-invalid":u||void 0})});var up={};up={Empty:"فارغ"};var lp={};lp={Empty:"Изпразни"};var cp={};cp={Empty:"Prázdné"};var dp={};dp={Empty:"Tom"};var fp={};fp={Empty:"Leer"};var mp={};mp={Empty:"Άδειο"};var pp={};pp={Empty:"Empty"};var hp={};hp={Empty:"Vacío"};var gp={};gp={Empty:"Tühjenda"};var yp={};yp={Empty:"Tyhjä"};var bp={};bp={Empty:"Vide"};var _p={};_p={Empty:"ריק"};var vp={};vp={Empty:"Prazno"};var Ep={};Ep={Empty:"Üres"};var Dp={};Dp={Empty:"Vuoto"};var Sp={};Sp={Empty:"空"};var Cp={};Cp={Empty:"비어 있음"};var wp={};wp={Empty:"Tuščias"};var xp={};xp={Empty:"Tukšs"};var $p={};$p={Empty:"Tom"};var Ap={};Ap={Empty:"Leeg"};var kp={};kp={Empty:"Pusty"};var Tp={};Tp={Empty:"Vazio"};var Pp={};Pp={Empty:"Vazio"};var Ip={};Ip={Empty:"Gol"};var Mp={};Mp={Empty:"Не заполнено"};var Fp={};Fp={Empty:"Prázdne"};var Op={};Op={Empty:"Prazen"};var Bp={};Bp={Empty:"Prazno"};var Lp={};Lp={Empty:"Tomt"};var Rp={};Rp={Empty:"Boş"};var Np={};Np={Empty:"Пусто"};var Up={};Up={Empty:"空"};var Hp={};Hp={Empty:"空白"};var Vp={};Vp={"ar-AE":up,"bg-BG":lp,"cs-CZ":cp,"da-DK":dp,"de-DE":fp,"el-GR":mp,"en-US":pp,"es-ES":hp,"et-EE":gp,"fi-FI":yp,"fr-FR":bp,"he-IL":_p,"hr-HR":vp,"hu-HU":Ep,"it-IT":Dp,"ja-JP":Sp,"ko-KR":Cp,"lt-LT":wp,"lv-LV":xp,"nb-NO":$p,"nl-NL":Ap,"pl-PL":kp,"pt-BR":Tp,"pt-PT":Pp,"ro-RO":Ip,"ru-RU":Mp,"sk-SK":Fp,"sl-SI":Op,"sr-SP":Bp,"sv-SE":Lp,"tr-TR":Rp,"uk-UA":Np,"zh-CN":Up,"zh-TW":Hp};function qS(e){return e&&e.__esModule?e.default:e}const zp=()=>{};function KS(e){const t=d.useRef(void 0);let{value:r,textValue:n,minValue:a,maxValue:o,isDisabled:i,isReadOnly:s,isRequired:u,onIncrement:l,onIncrementPage:c,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:g}=e;const y=sr(qS(Vp),"@react-aria/spinbutton");let _=d.useRef(!1);const D=d.useCallback(()=>{clearTimeout(t.current),_.current=!1},[]),w=qe(()=>{D()});d.useEffect(()=>()=>w(),[]);let b=te=>{if(!(te.ctrlKey||te.metaKey||te.shiftKey||te.altKey||s||te.nativeEvent.isComposing))switch(te.key){case"PageUp":if(c){te.preventDefault(),c?.();break}case"ArrowUp":case"Up":l&&(te.preventDefault(),l?.());break;case"PageDown":if(p){te.preventDefault(),p?.();break}case"ArrowDown":case"Down":f&&(te.preventDefault(),f?.());break;case"Home":h&&(te.preventDefault(),h?.());break;case"End":g&&(te.preventDefault(),g?.());break}},C=d.useRef(!1),v=()=>{C.current=!0},k=()=>{C.current=!1},I=n===""?y.format("Empty"):(n||`${r}`).replace("-","−");d.useEffect(()=>{C.current&&(dD("assertive"),Qn(I,"assertive"))},[I]);let G=d.useCallback(()=>{D()},[D]);const O=qe(l??zp),Z=qe(f??zp),M=qe(()=>{(o===void 0||isNaN(o)||r===void 0||isNaN(r)||r<o)&&(O(),X(60))}),X=qe(te=>{w(),_.current=!0,t.current=window.setTimeout(M,te)}),de=qe(()=>{(a===void 0||isNaN(a)||r===void 0||isNaN(r)||r>a)&&(Z(),x(60))}),x=qe(te=>{w(),_.current=!0,t.current=window.setTimeout(de,te)});let z=te=>{te.preventDefault()},{addGlobalListener:U,removeAllGlobalListeners:P}=uo(),K=d.useRef(!1),[$,T]=d.useState(null);d.useEffect(()=>{$==="touch"?X(600):$?X(400):$||w()},[$]);let[Y,se]=d.useState(null);return d.useEffect(()=>{Y==="touch"?x(600):Y?x(400):Y||w()},[Y]),{spinButtonProps:{role:"spinbutton","aria-valuenow":r!==void 0&&!isNaN(r)?r:void 0,"aria-valuetext":I,"aria-valuemin":a,"aria-valuemax":o,"aria-disabled":i||void 0,"aria-readonly":s||void 0,"aria-required":u||void 0,onKeyDown:b,onFocus:v,onBlur:k},incrementButtonProps:{onPressStart:te=>{D(),te.pointerType!=="touch"?(l?.(),T("mouse")):(U(window,"pointercancel",G,{capture:!0}),K.current=!1,T("touch")),U(window,"contextmenu",z)},onPressUp:te=>{D(),te.pointerType==="touch"&&(K.current=!0),P(),T(null)},onPressEnd:te=>{D(),te.pointerType==="touch"&&!_.current&&K.current&&l?.(),K.current=!1,T(null)},onFocus:v,onBlur:k},decrementButtonProps:{onPressStart:te=>{D(),te.pointerType!=="touch"?(f?.(),se("mouse")):(U(window,"pointercancel",G,{capture:!0}),K.current=!1,se("touch"))},onPressUp:te=>{D(),te.pointerType==="touch"&&(K.current=!0),P(),se(null)},onPressEnd:te=>{D(),te.pointerType==="touch"&&!_.current&&K.current&&f?.(),K.current=!1,se(null)},onFocus:v,onBlur:k}}}class YS{constructor(t,r,n,a){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=i=>{if(i.nodeType===Node.ELEMENT_NODE){const s=i.shadowRoot;if(s){const u=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(i);if(this.filter?.acceptNode)return this.filter.acceptNode(i);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=r,this.filter=a??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(t.createTreeWalker(r,n,this._acceptNode));const o=r.shadowRoot;if(o){const i=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(i)}}get currentNode(){return this._currentNode}set currentNode(t){if(!Ce(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=t,a=t;for(this._currentNode=t;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const i=n,s=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});r.push(s),s.currentNode=a,this._currentSetFor.add(s),n=a=i.host}else n=n.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(o),o.currentNode=a,this._currentSetFor.add(o),this._walkerStack=r}get doc(){return this._doc}firstChild(){let t=this.currentNode,r=this.nextNode();return Ce(t,r)?(r&&(this.currentNode=r),r):(this.currentNode=t,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){let n;if(typeof this.filter=="function"?n=this.filter(t):this.filter?.acceptNode&&(n=this.filter.acceptNode(t)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let a=this.nextNode();return a&&(this.currentNode=a),a}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null;return null}const r=t.previousNode();if(r){if(r.shadowRoot){let a;if(typeof this.filter=="function"?a=this.filter(r):this.filter?.acceptNode&&(a=this.filter.acceptNode(r)),a===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let o=this.lastChild();return o&&(this.currentNode=o),o}return r&&(this.currentNode=r),r}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function jp(e,t,r,n){return Zt()?new YS(e,t,r,n):e.createTreeWalker(t,r,n)}const Zp=d.createContext(null),Ou="react-aria-focus-scope-restore";let Fe=null;function QS(e){let{children:t,contain:r,restoreFocus:n,autoFocus:a}=e,o=d.useRef(null),i=d.useRef(null),s=d.useRef([]),{parentNode:u}=d.useContext(Zp)||{},l=d.useMemo(()=>new Uu({scopeRef:s}),[s]);$e(()=>{let p=u||je.root;if(je.getTreeNode(p.scopeRef)&&Fe&&!Mo(Fe,p.scopeRef)){let h=je.getTreeNode(Fe);h&&(p=h)}p.addChild(l),je.addNode(l)},[l,u]),$e(()=>{let p=je.getTreeNode(s);p&&(p.contain=!!r)},[r]),$e(()=>{let p=o.current?.nextSibling,h=[],g=y=>y.stopPropagation();for(;p&&p!==i.current;)h.push(p),p.addEventListener(Ou,g),p=p.nextSibling;return s.current=h,()=>{for(let y of h)y.removeEventListener(Ou,g)}},[t]),nC(s,n,r),eC(s,r),aC(s,n,r),rC(s,a),d.useEffect(()=>{const p=Ie(Se(s.current?s.current[0]:void 0));let h=null;if(Ct(p,s.current)){for(let g of je.traverse())g.scopeRef&&Ct(p,g.scopeRef.current)&&(h=g);h===je.getTreeNode(s)&&(Fe=h.scopeRef)}},[s]),$e(()=>()=>{let p=je.getTreeNode(s)?.parent?.scopeRef??null;(s===Fe||Mo(s,Fe))&&(!p||je.getTreeNode(p))&&(Fe=p),je.removeTreeNode(s)},[s]);let c=d.useMemo(()=>XS(s),[]),f=d.useMemo(()=>({focusManager:c,parentNode:l}),[l,c]);return d.createElement(Zp.Provider,{value:f},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:i}))}function XS(e){return{focusNext(t={}){let r=e.current,{from:n,tabbable:a,wrap:o,accept:i}=t,s=n||Ie(Se(r[0]??void 0)),u=r[0].previousElementSibling,l=Gr(r),c=lt(l,{tabbable:a,accept:i},r);c.currentNode=Ct(s,r)?s:u;let f=c.nextNode();return!f&&o&&(c.currentNode=u,f=c.nextNode()),f&&ut(f,!0),f},focusPrevious(t={}){let r=e.current,{from:n,tabbable:a,wrap:o,accept:i}=t,s=n||Ie(Se(r[0]??void 0)),u=r[r.length-1].nextElementSibling,l=Gr(r),c=lt(l,{tabbable:a,accept:i},r);c.currentNode=Ct(s,r)?s:u;let f=c.previousNode();return!f&&o&&(c.currentNode=u,f=c.previousNode()),f&&ut(f,!0),f},focusFirst(t={}){let r=e.current,{tabbable:n,accept:a}=t,o=Gr(r),i=lt(o,{tabbable:n,accept:a},r);i.currentNode=r[0].previousElementSibling;let s=i.nextNode();return s&&ut(s,!0),s},focusLast(t={}){let r=e.current,{tabbable:n,accept:a}=t,o=Gr(r),i=lt(o,{tabbable:n,accept:a},r);i.currentNode=r[r.length-1].nextElementSibling;let s=i.previousNode();return s&&ut(s,!0),s}}}function Gr(e){return e[0].parentElement}function da(e){let t=je.getTreeNode(Fe);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function WS(e){if(!e.form)return Array.from(Se(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(n=>!n.form);const t=e.form.elements.namedItem(e.name);let r=nt(e);return t instanceof r.RadioNodeList?Array.from(t).filter(n=>n instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}function JS(e){if(e.checked)return!0;const t=WS(e);return t.length>0&&!t.some(r=>r.checked)}function eC(e,t){let r=d.useRef(void 0),n=d.useRef(void 0);$e(()=>{let a=e.current;if(!t){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const o=Se(a?a[0]:void 0);let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!da(e)||l.isComposing)return;let c=Ie(o),f=e.current;if(!f||!Ct(c,f))return;let p=Gr(f),h=lt(p,{tabbable:!0},f);if(!c)return;h.currentNode=c;let g=l.shiftKey?h.previousNode():h.nextNode();g||(h.currentNode=l.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=l.shiftKey?h.previousNode():h.nextNode()),l.preventDefault(),g&&(ut(g,!0),g instanceof nt(g).HTMLInputElement&&g.select())},s=l=>{(!Fe||Mo(Fe,e))&&Ct(he(l),e.current)?(Fe=e,r.current=he(l)):da(e)&&!mr(he(l),e)?r.current?r.current.focus():Fe&&Fe.current&&Bu(Fe.current):da(e)&&(r.current=he(l))},u=l=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let c=oo(),f=(c==="virtual"||c===null)&&$s()&&$d(),p=Ie(o);if(!f&&p&&da(e)&&!mr(p,e)){Fe=e;let h=he(l);h&&h.isConnected?(r.current=h,r.current?.focus()):Fe.current&&Bu(Fe.current)}})};return o.addEventListener("keydown",i,!1),o.addEventListener("focusin",s,!1),a?.forEach(l=>l.addEventListener("focusin",s,!1)),a?.forEach(l=>l.addEventListener("focusout",u,!1)),()=>{o.removeEventListener("keydown",i,!1),o.removeEventListener("focusin",s,!1),a?.forEach(l=>l.removeEventListener("focusin",s,!1)),a?.forEach(l=>l.removeEventListener("focusout",u,!1))}},[e,t]),$e(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function Gp(e){return mr(e)}function Ct(e,t){return!e||!t?!1:t.some(r=>Ce(r,e))}function mr(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of je.traverse(je.getTreeNode(t)))if(r&&Ct(e,r.current))return!0;return!1}function tC(e){return mr(e,Fe)}function Mo(e,t){let r=je.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function ut(e,t=!1){if(e!=null&&!t)try{qn(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function qp(e,t=!0){let r=e[0].previousElementSibling,n=Gr(e),a=lt(n,{tabbable:t},e);a.currentNode=r;let o=a.nextNode();return t&&!o&&(n=Gr(e),a=lt(n,{tabbable:!1},e),a.currentNode=r,o=a.nextNode()),o}function Bu(e,t=!0){ut(qp(e,t))}function rC(e,t){const r=d.useRef(t);d.useEffect(()=>{if(r.current){Fe=e;const n=Se(e.current?e.current[0]:void 0);!Ct(Ie(n),Fe.current)&&e.current&&Bu(e.current)}r.current=!1},[e])}function nC(e,t,r){$e(()=>{if(t||r)return;let n=e.current;const a=Se(n?n[0]:void 0);let o=i=>{let s=he(i);Ct(s,e.current)?Fe=e:Gp(s)||(Fe=null)};return a.addEventListener("focusin",o,!1),n?.forEach(i=>i.addEventListener("focusin",o,!1)),()=>{a.removeEventListener("focusin",o,!1),n?.forEach(i=>i.removeEventListener("focusin",o,!1))}},[e,t,r])}function Kp(e){let t=je.getTreeNode(Fe);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function aC(e,t,r){const n=d.useRef(typeof document<"u"?Ie(Se(e.current?e.current[0]:void 0)):null);$e(()=>{let a=e.current;const o=Se(a?a[0]:void 0);if(!t||r)return;let i=()=>{(!Fe||Mo(Fe,e))&&Ct(Ie(o),e.current)&&(Fe=e)};return o.addEventListener("focusin",i,!1),a?.forEach(s=>s.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),a?.forEach(s=>s.removeEventListener("focusin",i,!1))}},[e,r]),$e(()=>{const a=Se(e.current?e.current[0]:void 0);if(!t)return;let o=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!da(e)||i.isComposing)return;let s=a.activeElement;if(!mr(s,e)||!Kp(e))return;let u=je.getTreeNode(e);if(!u)return;let l=u.nodeToRestore,c=lt(a.body,{tabbable:!0});c.currentNode=s;let f=i.shiftKey?c.previousNode():c.nextNode();if((!l||!l.isConnected||l===a.body)&&(l=void 0,u.nodeToRestore=void 0),(!f||!mr(f,e))&&l){c.currentNode=l;do f=i.shiftKey?c.previousNode():c.nextNode();while(mr(f,e));i.preventDefault(),i.stopPropagation(),f?ut(f,!0):Gp(l)?ut(l,!0):s.blur()}};return r||a.addEventListener("keydown",o,!0),()=>{r||a.removeEventListener("keydown",o,!0)}},[e,t,r]),$e(()=>{const a=Se(e.current?e.current[0]:void 0);if(!t)return;let o=je.getTreeNode(e);if(o)return o.nodeToRestore=n.current??void 0,()=>{let i=je.getTreeNode(e);if(!i)return;let s=i.nodeToRestore,u=Ie(a);if(t&&s&&(u&&mr(u,e)||u===a.body&&Kp(e))){let l=je.clone();requestAnimationFrame(()=>{if(a.activeElement===a.body){let c=l.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){Yp(c.nodeToRestore);return}c=c.parent}for(c=l.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&je.getTreeNode(c.scopeRef)){let f=qp(c.scopeRef.current,!0);Yp(f);return}c=c.parent}}})}}},[e,t])}function Yp(e){e.dispatchEvent(new CustomEvent(Ou,{bubbles:!0,cancelable:!0}))&&ut(e)}function lt(e,t,r){let n=t?.tabbable?hE:Ed,a=e?.nodeType===Node.ELEMENT_NODE?e:null,o=Se(a),i=jp(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return Ce(t?.from,s)||t?.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!JS(s)||i.currentNode.tagName==="INPUT"&&i.currentNode.type==="radio"&&i.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:n(s)&&(!r||Ct(s,r))&&(!t?.accept||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function Lu(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,u=a||Ie(Se(n)),l=lt(n,{tabbable:o,accept:s});Ce(n,u)&&(l.currentNode=u);let c=l.nextNode();return!c&&i&&(l.currentNode=n,c=l.nextNode()),c&&ut(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,u=a||Ie(Se(n)),l=lt(n,{tabbable:o,accept:s});if(Ce(n,u))l.currentNode=u;else{let f=Ru(l);return f&&ut(f,!0),f??null}let c=l.previousNode();if(!c&&i){l.currentNode=n;let f=Ru(l);if(!f)return null;c=f}return c&&ut(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=r,s=lt(n,{tabbable:a,accept:o}).nextNode();return s&&ut(s,!0),s},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=r,i=lt(n,{tabbable:a,accept:o}),s=Ru(i);return s&&ut(s,!0),s??null}}}function Ru(e){let t,r;do r=e.lastChild(),r&&(t=r);while(r);return t}class Nu{constructor(){this.fastMap=new Map,this.root=new Uu({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,n){let a=this.fastMap.get(r??null);if(!a)return;let o=new Uu({scopeRef:t});a.addChild(o),o.parent=a,this.fastMap.set(t,o),n&&(o.nodeToRestore=n)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t);if(!r)return;let n=r.parent;for(let o of this.traverse())o!==r&&r.nodeToRestore&&o.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&Ct(o.nodeToRestore,r.scopeRef.current)&&(o.nodeToRestore=r.nodeToRestore);let a=r.children;n&&(n.removeChild(r),a.size>0&&a.forEach(o=>n&&n.addChild(o))),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){let t=new Nu;for(let r of this.traverse())t.addTreeNode(r.scopeRef,r.parent?.scopeRef??null,r.nodeToRestore);return t}}class Uu{constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}}let je=new Nu,Hu=new Map;function oC(e){let{locale:t}=Je(),r=t+(e?Object.entries(e).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(Hu.has(r))return Hu.get(r);let n=new Intl.Collator(t,e);return Hu.set(r,n),n}const iC=d.createContext({placement:"bottom"}),sC=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Qp(e){return e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer!==void 0}let fa=new WeakMap,ct=[];function uC(e,t){let r=nt(e?.[0]),n=t instanceof r.Element?{root:t}:t,a=n?.root??document.body,o=n?.shouldUseInert&&sC,i=new Set(e),s=new Set,u=_=>o&&_ instanceof r.HTMLElement?_.inert:_.getAttribute("aria-hidden")==="true",l=(_,D)=>{o&&_ instanceof r.HTMLElement?_.inert=D:D?_.setAttribute("aria-hidden","true"):(_.removeAttribute("aria-hidden"),_ instanceof r.HTMLElement&&(_.inert=!1))},c=new Set;if(Zt())for(let _ of e){let D=_;for(;D&&D!==a;){let w=D.getRootNode();"shadowRoot"in w&&c.add(w.shadowRoot),D=w.parentNode}}let f=_=>{for(let C of _.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))i.add(C);let D=C=>{if(s.has(C)||i.has(C)||C.parentElement&&s.has(C.parentElement)&&C.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let v of i)if(Ce(C,v))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},w=jp(Se(_),_,NodeFilter.SHOW_ELEMENT,{acceptNode:D}),b=D(_);if(b===NodeFilter.FILTER_ACCEPT&&p(_),b!==NodeFilter.FILTER_REJECT){let C=w.nextNode();for(;C!=null;)p(C),C=w.nextNode()}},p=_=>{let D=fa.get(_)??0;u(_)&&D===0||(D===0&&l(_,!0),s.add(_),fa.set(_,D+1))};ct.length&&ct[ct.length-1].disconnect(),f(a);let h=new MutationObserver(_=>{for(let D of _)if(D.type==="childList"){if(D.target.isConnected&&![...i,...s].some(w=>Ce(w,D.target)))for(let w of D.addedNodes)(w instanceof HTMLElement||w instanceof SVGElement)&&Qp(w)?i.add(w):w instanceof Element&&f(w);if(Zt()){for(let w of c)if(!w.isConnected){h.disconnect();break}}}});h.observe(a,{childList:!0,subtree:!0});let g=new Set;if(Zt())for(let _ of c){let D=new MutationObserver(w=>{for(let b of w)if(b.type==="childList"){if(b.target.isConnected&&![...i,...s].some(C=>Ce(C,b.target)))for(let C of b.addedNodes)(C instanceof HTMLElement||C instanceof SVGElement)&&Qp(C)?i.add(C):C instanceof Element&&f(C);if(Zt()){for(let C of c)if(!C.isConnected){h.disconnect();break}}}});D.observe(_,{childList:!0,subtree:!0}),g.add(D)}let y={visibleNodes:i,hiddenNodes:s,observe(){h.observe(a,{childList:!0,subtree:!0})},disconnect(){h.disconnect()}};return ct.push(y),()=>{if(h.disconnect(),Zt())for(let _ of g)_.disconnect();for(let _ of s){let D=fa.get(_);D!=null&&(D===1?(l(_,!1),fa.delete(_)):fa.set(_,D-1))}y===ct[ct.length-1]?(ct.pop(),ct.length&&ct[ct.length-1].observe()):ct.splice(ct.indexOf(y),1)}}function lC(e){let t=ct[ct.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}const wt={top:"top",bottom:"top",left:"left",right:"left"},Fo={top:"bottom",bottom:"top",left:"right",right:"left"},cC={top:"left",left:"top"},Vu={top:"height",left:"width"},Xp={width:"totalWidth",height:"totalHeight"},Oo={};let dC=()=>typeof document<"u"?window.visualViewport:null;function Wp(e,t){let r=0,n=0,a=0,o=0,i=0,s=0,u={},l=(t?.scale??1)>1;if(e.tagName==="BODY"||e.tagName==="HTML"){let c=document.documentElement;a=c.clientWidth,o=c.clientHeight,r=t?.width??a,n=t?.height??o,u.top=c.scrollTop||e.scrollTop,u.left=c.scrollLeft||e.scrollLeft,t&&(i=t.offsetTop,s=t.offsetLeft)}else({width:r,height:n,top:i,left:s}=ma(e,!1)),u.top=e.scrollTop,u.left=e.scrollLeft,a=r,o=n;return xd()&&(e.tagName==="BODY"||e.tagName==="HTML")&&l&&(u.top=0,u.left=0,i=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:a,totalHeight:o,scroll:u,top:i,left:s}}function fC(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function Jp(e,t,r,n,a,o,i){let s=a.scroll[e]??0,u=n[Vu[e]],l=i[e]+n.scroll[wt[e]]+o,c=i[e]+n.scroll[wt[e]]+u-o,f=t-s+n.scroll[wt[e]]+i[e]-n[wt[e]],p=t-s+r+n.scroll[wt[e]]+i[e]-n[wt[e]];return f<l?l-f:p>c?Math.max(c-p,l-f):0}function mC(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function eh(e){if(Oo[e])return Oo[e];let[t,r]=e.split(" "),n=wt[t]||"right",a=cC[n];wt[r]||(r="center");let o=Vu[n],i=Vu[a];return Oo[e]={placement:t,crossPlacement:r,axis:n,crossAxis:a,size:o,crossSize:i},Oo[e]}function zu(e,t,r,n,a,o,i,s,u,l,c){let{placement:f,crossPlacement:p,axis:h,crossAxis:g,size:y,crossSize:_}=n,D={};D[g]=e[g]??0,p==="center"?D[g]+=((e[_]??0)-(r[_]??0))/2:p!==g&&(D[g]+=(e[_]??0)-(r[_]??0)),D[g]+=o;const w=e[g]-r[_]+u+l,b=e[g]+e[_]-u-l;if(D[g]=qs(D[g],w,b),f===h){let C=s?c[y]:c[Xp[y]];D[Fo[h]]=Math.floor(C-e[h]+a)}else D[h]=Math.floor(e[h]+e[y]+a);return D}function pC(e,t,r,n,a,o,i,s,u,l,c){let f=(e.top!=null?e.top:u[Xp.height]-(e.bottom??0)-i)-(u.scroll.top??0),p=l?r.top:0,h={top:Math.max(t.top+p,(c?.offsetTop??t.top)+p),bottom:Math.min(t.top+t.height+p,(c?.offsetTop??0)+(c?.height??0))};return s!=="top"?Math.max(0,h.bottom-f-((a.top??0)+(a.bottom??0)+o)):Math.max(0,f+i-h.top-((a.top??0)+(a.bottom??0)+o))}function th(e,t,r,n,a,o,i,s){let{placement:u,axis:l,size:c}=o;return u===l?Math.max(0,r[l]-(i.scroll[l]??0)-(e[l]+(s?t[l]:0))-(n[l]??0)-n[Fo[l]]-a):Math.max(0,e[c]+e[l]+(s?t[l]:0)-r[l]-r[c]+(i.scroll[l]??0)-(n[l]??0)-n[Fo[l]]-a)}function hC(e,t,r,n,a,o,i,s,u,l,c,f,p,h,g,y,_,D){let w=eh(e),{size:b,crossAxis:C,crossSize:v,placement:k,crossPlacement:I}=w,G=zu(t,s,r,w,c,f,l,p,g,y,u),O=c,Z=th(s,l,t,a,o+c,w,u,_);if(i&&r[b]>Z){let Q=eh(`${Fo[k]} ${I}`),A=zu(t,s,r,Q,c,f,l,p,g,y,u);th(s,l,t,a,o+c,Q,u,_)>Z&&(w=Q,G=A,O=c)}let M="bottom";w.axis==="top"?w.placement==="top"?M="top":w.placement==="bottom"&&(M="bottom"):w.crossAxis==="top"&&(w.crossPlacement==="top"?M="bottom":w.crossPlacement==="bottom"&&(M="top"));let X=Jp(C,G[C],r[v],s,u,o,l);G[C]+=X;let de=pC(G,s,l,p,a,o,r.height,M,u,_,D);h&&h<de&&(de=h),r.height=Math.min(r.height,de),G=zu(t,s,r,w,O,f,l,p,g,y,u),X=Jp(C,G[C],r[v],s,u,o,l),G[C]+=X;let x={},z=t[C]-G[C]-a[wt[C]],U=z+.5*t[v];const P=g/2+y,K=wt[C]==="left"?(a.left??0)+(a.right??0):(a.top??0)+(a.bottom??0),$=r[v]-K-g/2-y,T=t[C]+g/2-(G[C]+a[wt[C]]),Y=t[C]+t[v]-g/2-(G[C]+a[wt[C]]),se=qs(U,T,Y);x[C]=qs(se,P,$),{placement:k,crossPlacement:I}=w,g?z=x[C]:I==="right"?z+=t[v]:I==="center"&&(z+=t[v]/2);let te=k==="left"||k==="top"?r[b]:0,H={x:k==="top"||k==="bottom"?z:te,y:k==="left"||k==="right"?z:te};return{position:G,maxHeight:de,arrowOffsetLeft:x.left,arrowOffsetTop:x.top,placement:k,triggerAnchorPoint:H}}function gC(e){let{placement:t,targetNode:r,overlayNode:n,scrollNode:a,padding:o,shouldFlip:i,boundaryElement:s,offset:u,crossOffset:l,maxHeight:c,arrowSize:f=0,arrowBoundaryOffset:p=0,targetRect:h}=e,g=dC(),y=n instanceof HTMLElement?yC(n):document.documentElement,_=y===document.documentElement;const D=window.getComputedStyle(y).position;let w=!!D&&D!=="static",b=_?ma(r,!1,h):rh(r,y,!1,h);if(!_){let{marginTop:M,marginLeft:X}=window.getComputedStyle(r);b.top+=parseInt(M,10)||0,b.left+=parseInt(X,10)||0}let C=ma(n,!0),v=mC(n);C.width+=(v.left??0)+(v.right??0),C.height+=(v.top??0)+(v.bottom??0);let k=fC(a),I=Wp(s,g),G=Wp(y,g),O;if((s.tagName==="BODY"||s.tagName==="HTML")&&!_){let M=Bo(y,!1);O={top:-(M.top-I.top),left:-(M.left-I.left),width:0,height:0}}else(s.tagName==="BODY"||s.tagName==="HTML")&&_?O={top:0,left:0,width:0,height:0}:O=rh(s,y,!1);let Z=Ce(s,y);return hC(t,b,C,k,v,o,i,I,G,O,u,l,w,c,f,p,Z,g)}function Bo(e,t){let{top:r,left:n,width:a,height:o}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(a=e.offsetWidth,o=e.offsetHeight),{top:r,left:n,width:a,height:o}}function ma(e,t,r){let{top:n,left:a,width:o,height:i}=r||Bo(e,t),{scrollTop:s,scrollLeft:u,clientTop:l,clientLeft:c}=document.documentElement;return{top:n+s-l,left:a+u-c,width:o,height:i}}function rh(e,t,r,n){let a=window.getComputedStyle(e),o;if(a.position==="fixed")o=n||Bo(e,r);else{o=ma(e,r,n);let i=ma(t,r),s=window.getComputedStyle(t);i.top+=(parseInt(s.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(s.borderLeftWidth,10)||0)-t.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(a.marginTop,10)||0,o.left-=parseInt(a.marginLeft,10)||0,o}function yC(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!nh(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!nh(t);)t=t.parentElement;return t||document.documentElement}function nh(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const bC=new WeakMap;function _C(e){let{triggerRef:t,isOpen:r,onClose:n}=e;d.useEffect(()=>{if(!r||n===null)return;let a=o=>{let i=he(o);if(!t.current||i instanceof Node&&!Ce(i,t.current)||i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)return;let s=n||bC.get(t.current);s&&s()};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[r,n,t])}function vC(){return typeof window.ResizeObserver<"u"}function ju(e){const{ref:t,box:r,onResize:n}=e;let a=qe(n);d.useEffect(()=>{let o=t?.current;if(o)if(vC()){const i=new window.ResizeObserver(s=>{s.length&&a()});return i.observe(o,{box:r}),()=>{o&&i.unobserve(o)}}else return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}},[t,r])}let qr=typeof document<"u"?window.visualViewport:null;function EC(e){let{direction:t}=Je(),{arrowSize:r,targetRef:n,overlayRef:a,arrowRef:o,scrollRef:i=a,placement:s="bottom",containerPadding:u=12,shouldFlip:l=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:_,arrowBoundaryOffset:D=0,getTargetRect:w}=e,[b,C]=d.useState(null),v=[h,s,a.current,n.current,o?.current,i.current,u,l,c,f,p,g,t,_,D,r],k=d.useRef(qr?.scale);d.useEffect(()=>{g&&(k.current=qr?.scale)},[g]);let I=d.useCallback(()=>{if(h===!1||!g||!a.current||!n.current||!c||qr?.scale!==k.current)return;let Z=null;if(i.current&&Ds(i.current)){let x=Ie()?.getBoundingClientRect(),z=i.current.getBoundingClientRect();Z={type:"top",offset:(x?.top??0)-z.top},Z.offset>z.height/2&&(Z.type="bottom",Z.offset=(x?.bottom??0)-z.bottom)}let M=a.current;!_&&a.current&&(M.style.top="0px",M.style.bottom="",M.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let X=gC({placement:SC(s,t),overlayNode:a.current,targetNode:n.current,scrollNode:i.current||a.current,padding:u,shouldFlip:l,boundaryElement:c,offset:f,crossOffset:p,maxHeight:_,arrowSize:r??(o?.current?Bo(o.current,!0).width:0),arrowBoundaryOffset:D,targetRect:w?.(n.current)});if(!X.position)return;M.style.top="",M.style.bottom="",M.style.left="",M.style.right="",Object.keys(X.position).forEach(x=>M.style[x]=X.position[x]+"px"),M.style.maxHeight=X.maxHeight!=null?X.maxHeight+"px":"";let de=Ie();if(Z&&de&&i.current){let x=de.getBoundingClientRect(),z=i.current.getBoundingClientRect(),U=x[Z.type]-z[Z.type];i.current.scrollTop+=U-Z.offset}C(X)},v);$e(I,v),DC(I),ju({ref:a,onResize:I}),ju({ref:n,onResize:I});let G=d.useRef(!1);$e(()=>{let Z,M=()=>{G.current=!0,clearTimeout(Z),Z=setTimeout(()=>{G.current=!1},500),I()},X=()=>{G.current&&M()};return qr?.addEventListener("resize",M),qr?.addEventListener("scroll",X),()=>{qr?.removeEventListener("resize",M),qr?.removeEventListener("scroll",X)}},[I]);let O=d.useCallback(()=>{G.current||y?.()},[y,G]);return _C({triggerRef:n,isOpen:g,onClose:y&&O}),{overlayProps:{style:{position:b?"absolute":"fixed",top:b?void 0:0,left:b?void 0:0,zIndex:1e5,...b?.position,maxHeight:b?.maxHeight??"100vh"}},placement:b?.placement??null,triggerAnchorPoint:b?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:b?.arrowOffsetLeft,top:b?.arrowOffsetTop}},updatePosition:I}}function DC(e){$e(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function SC(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}function CC(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:a}=e,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=qe(u=>{r&&ah(u,t)&&(a&&a(u),o.current.isPointerDown=!0)}),s=qe(u=>{r&&r(u)});d.useEffect(()=>{let u=o.current;if(n)return;const l=t.current,c=Se(l);if(typeof PointerEvent<"u"){let f=p=>{u.isPointerDown&&ah(p,t)&&s(p),u.isPointerDown=!1};return c.addEventListener("pointerdown",i,!0),c.addEventListener("click",f,!0),()=>{c.removeEventListener("pointerdown",i,!0),c.removeEventListener("click",f,!0)}}},[t,n])}function ah(e,t){if(e.button>0)return!1;let r=he(e);if(r){const n=r.ownerDocument;if(!n||!Ce(n.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const Ot=[];function wC(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:a,isDismissable:o=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e,u=d.useRef(void 0);d.useEffect(()=>{if(a&&!Ot.includes(t))return Ot.push(t),()=>{let g=Ot.indexOf(t);g>=0&&Ot.splice(g,1)}},[a,t]);let l=()=>{Ot[Ot.length-1]===t&&r&&r()},c=g=>{const y=Ot[Ot.length-1];u.current=y,(!s||s(he(g)))&&y===t&&g.stopPropagation()},f=g=>{(!s||s(he(g)))&&(Ot[Ot.length-1]===t&&g.stopPropagation(),u.current===t&&l()),u.current=void 0},p=g=>{g.key==="Escape"&&!i&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),l())};CC({ref:t,onInteractOutside:o&&a?f:void 0,onInteractOutsideStart:c});let{focusWithinProps:h}=Kn({isDisabled:!n,onBlurWithin:g=>{!g.relatedTarget||tC(g.relatedTarget)||(!s||s(g.relatedTarget))&&r?.()}});return{overlayProps:{onKeyDown:p,...h},underlayProps:{}}}const pa=typeof document<"u"&&window.visualViewport;let Lo=0,Zu;function xC(e={}){let{isDisabled:t}=e;$e(()=>{if(!t)return Lo++,Lo===1&&(Vn()?Zu=AC():Zu=$C()),()=>{Lo--,Lo===0&&Zu()}},[t])}function $C(){let e=window.innerWidth-document.documentElement.clientWidth;return Qa(e>0&&("scrollbarGutter"in document.documentElement.style?Ro(document.documentElement,"scrollbarGutter","stable"):Ro(document.documentElement,"paddingRight",`${e}px`)),Ro(document.documentElement,"overflow","hidden"))}function AC(){let e=Ro(document.documentElement,"overflow","hidden"),t,r=!1,n=c=>{let f=he(c);t=$o(f)?f:Ao(f,!0),r=!1;let p=f.ownerDocument.defaultView.getSelection();p&&!p.isCollapsed&&p.containsNode(f,!0)&&(r=!0),c.composedPath().some(h=>h instanceof HTMLInputElement&&h.type==="range")&&(r=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(r=!0)},a=document.createElement("style"),o=Xd();o&&(a.nonce=o),a.textContent=`
30
+ `.trim(),x.head.prepend(z)},[p]),d.useEffect(()=>{let x=_.current;return()=>{f||Yd(x.target??void 0);for(let z of x.disposables)z();x.disposables=[]}},[f]),{isPressed:u||g,pressProps:Ae(h,de,{[ef]:!0})}}function Us(e){return e.tagName==="A"&&e.hasAttribute("href")}function Hs(e,t){const{key:r,code:n}=e,a=t,o=a.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(a instanceof nt(a).HTMLInputElement&&!rf(a,r)||a instanceof nt(a).HTMLTextAreaElement||a.isContentEditable)&&!((o==="link"||!o&&Us(a))&&r!=="Enter")}function Ur(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function eD(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Us(e)}function tf(e,t){return e instanceof HTMLInputElement?!rf(e,t):eD(e)}const tD=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function rf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":tD.has(e.type)}function qn(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:a}=e,o=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=uo(),u=d.useCallback(f=>{Ce(f.currentTarget,he(f))&&o.current.isFocusWithin&&!Ce(f.currentTarget,f.relatedTarget)&&(o.current.isFocusWithin=!1,s(),r&&r(f),a&&a(!1))},[r,a,o,s]),l=Cd(u),c=d.useCallback(f=>{if(!Ce(f.currentTarget,he(f)))return;let p=he(f);const h=Se(p),g=Ie(h);if(!o.current.isFocusWithin&&g===p){n&&n(f),a&&a(!0),o.current.isFocusWithin=!0,l(f);let y=f.currentTarget;i(h,"focus",_=>{let D=he(_);if(o.current.isFocusWithin&&!Ce(y,D)){let w=new h.defaultView.FocusEvent("blur",{relatedTarget:D});Sd(w,y);let b=ws(w);u(b)}},{capture:!0})}},[n,a,l,i,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:u}}}function gn(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,a=d.useRef({isFocused:!1,isFocusVisible:t||Ps()}),[o,i]=d.useState(!1),[s,u]=d.useState(()=>a.current.isFocused&&a.current.isFocusVisible),l=d.useCallback(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),c=d.useCallback(h=>{a.current.isFocused=h,a.current.isFocusVisible=Ps(),i(h),l()},[l]);$E(h=>{a.current.isFocusVisible=h,l()},[r,o],{enabled:o,isTextInput:r});let{focusProps:f}=zd({isDisabled:n,onFocusChange:c}),{focusWithinProps:p}=qn({isDisabled:!n,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:n?p:f}}let Vs=!1,co=0;function rD(){Vs=!0,setTimeout(()=>{Vs=!1},500)}function nf(e){e.pointerType==="touch"&&rD()}function nD(){let e=Se(null);if(!(typeof e>"u"))return co===0&&typeof PointerEvent<"u"&&e.addEventListener("pointerup",nf),co++,()=>{co--,!(co>0)&&typeof PointerEvent<"u"&&e.removeEventListener("pointerup",nf)}}function Kn(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:a}=e,[o,i]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(nD,[]);let{addGlobalListener:u,removeAllGlobalListeners:l}=uo(),{hoverProps:c,triggerHoverEnd:f}=d.useMemo(()=>{let p=(y,_)=>{if(s.pointerType=_,a||_==="touch"||s.isHovered||!Ce(y.currentTarget,he(y)))return;s.isHovered=!0;let D=y.currentTarget;s.target=D,u(Se(he(y)),"pointerover",w=>{s.isHovered&&s.target&&!Ce(s.target,he(w))&&h(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:D,pointerType:_}),r&&r(!0),i(!0)},h=(y,_)=>{let D=s.target;s.pointerType="",s.target=null,!(_==="touch"||!s.isHovered||!D)&&(s.isHovered=!1,l(),n&&n({type:"hoverend",target:D,pointerType:_}),r&&r(!1),i(!1))},g={};return typeof PointerEvent<"u"&&(g.onPointerEnter=y=>{Vs&&y.pointerType==="mouse"||p(y,y.pointerType)},g.onPointerLeave=y=>{!a&&Ce(y.currentTarget,he(y))&&h(y,y.pointerType)}),{hoverProps:g,triggerHoverEnd:h}},[t,r,n,a,s,u,l]);return d.useEffect(()=>{a&&f({currentTarget:s.target},s.pointerType)},[a]),{hoverProps:c,isHovered:o}}const af=d.createContext({});function aD(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":a,labelElementType:o="label"}=e;t=Mt(t);let i=Mt(),s={};r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:o==="label"?t:void 0});let u=zn({id:t,"aria-label":a,"aria-labelledby":n});return{labelProps:s,fieldProps:u}}let zs=new Map,js=!1;try{js=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let fo=!1;try{fo=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const of={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Zs{constructor(t,r={}){this.numberFormatter=oD(t,r),this.options=r}format(t){let r="";if(!js&&this.options.signDisplay!=null?r=iD(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!fo){let{unit:n,unitDisplay:a="short",locale:o}=this.resolvedOptions();if(!n)return r;let i=of[n]?.[a];r+=i[o]||i.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(t),a=this.numberFormatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!js&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!fo&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}}function oD(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),t.style==="unit"&&!fo){let{unit:o,unitDisplay:i="short"}=t;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!of[o]?.[i])throw new Error(`Unsupported unit ${o} with unitDisplay = ${i}`);t={...t,style:"decimal"}}let n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(zs.has(n))return zs.get(n);let a=new Intl.NumberFormat(e,t);return zs.set(n,a),a}function iD(e,t,r){if(t==="auto")return e.format(r);if(t==="never")return e.format(Math.abs(r));{let n=!1;if(t==="always"?n=r>0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let a=e.format(-r),o=e.format(r),i=a.replace(o,"").replace(/\u200e|\u061C/,"");return[...i].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),a.replace(o,"!!!").replace(i,"+").replace("!!!",o)}else return e.format(r)}}const sD=new RegExp("^.*\\(.*\\).*$"),uD=["latn","arab","hanidec","deva","beng","fullwide"];class sf{constructor(t,r={}){this.locale=t,this.options=r}parse(t){return Gs(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,r,n){return Gs(this.locale,this.options,t).isValidPartialNumber(t,r,n)}getNumberingSystem(t){return Gs(this.locale,this.options,t).options.numberingSystem}}const uf=new Map;function Gs(e,t,r){let n=lf(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r)){for(let a of uD)if(a!==n.options.numberingSystem){let o=lf(e+(e.includes("-u-")?"-nu-":"-u-nu-")+a,t);if(o.isValidPartialNumber(r))return o}}return n}function lf(e,t){let r=e+(t?Object.entries(t).sort((a,o)=>a[0]<o[0]?-1:1).join():""),n=uf.get(r);return n||(n=new lD(e,t),uf.set(r,n)),n}class lD{constructor(t,r={}){this.locale=t,r.roundingIncrement!==1&&r.roundingIncrement!=null&&(r.maximumFractionDigits==null&&r.minimumFractionDigits==null?(r.maximumFractionDigits=0,r.minimumFractionDigits=0):r.maximumFractionDigits==null?r.maximumFractionDigits=r.minimumFractionDigits:r.minimumFractionDigits==null&&(r.minimumFractionDigits=r.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,r),this.options=this.formatter.resolvedOptions(),this.symbols=cD(t,this.formatter,this.options,r),this.options.style==="percent"&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}parse(t){let r=this.formatter.resolvedOptions().useGrouping,n=this.sanitize(t);if(!r&&this.symbols.group&&n.includes(this.symbols.group))return NaN;if(this.symbols.group&&(n=n.replaceAll(this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let o=n.indexOf("-");n=n.replace("-",""),n=n.replace("+","");let i=n.indexOf(".");i===-1&&(i=n.length),n=n.replace(".",""),i-2===0?n=`0.${n}`:i-2===-1?n=`0.0${n}`:i-2===-2?n="0.00":n=`${n.slice(0,i-2)}.${n.slice(i-2)}`,o>-1&&(n=`-${n}`)}let a=n?+n:NaN;if(isNaN(a))return NaN;if(this.options.style==="percent"){let o={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new sf(this.locale,o).parse(new Zs(this.locale,o).format(a))}return this.options.currencySign==="accounting"&&sD.test(t)&&(a=-1*a),a}sanitize(t){let r=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(n=>n.unit===t)?this.symbols.noNumeralUnits.find(n=>n.unit===t).value.toString():(t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=lr(t,",",this.symbols.decimal),t=lr(t,"،",this.symbols.decimal)),this.symbols.group&&r&&(t=lr(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&r&&(t=lr(t,"'",this.symbols.group)),this.symbols.group==="'"&&t.includes("’")&&r&&(t=lr(t,"’",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&r&&(t=lr(t," ",this.symbols.group),t=lr(t,/\u00A0/g,this.symbols.group)),t)}isValidPartialNumber(t,r=-1/0,n=1/0){let a=this.formatter.resolvedOptions().useGrouping;return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&r<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&n>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&a&&(t=lr(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}}const cf=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),df=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function cD(e,t,r,n){let a=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand",useGrouping:!0}),o=a.formatToParts(-10000.111),i=a.formatToParts(10000.111),s=df.map(k=>a.formatToParts(k)),u=s.map((k,I)=>{let G=k.find(O=>O.type==="unit");return G&&!k.some(O=>O.type==="integer"||O.type==="fraction")?{unit:G.value,value:df[I]}:null}).filter(k=>!!k),l=o.find(k=>k.type==="minusSign")?.value??"-",c=i.find(k=>k.type==="plusSign")?.value;!c&&(n?.signDisplay==="exceptZero"||n?.signDisplay==="always")&&(c="+");let p=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(k=>k.type==="decimal")?.value,h=o.find(k=>k.type==="group")?.value,g=o.filter(k=>!cf.has(k.type)).map(k=>ff(k.value)),y=s.flatMap(k=>k.filter(I=>!cf.has(I.type)).map(I=>ff(I.value))),_=[...new Set([...g,...y])].sort((k,I)=>I.length-k.length),D=_.length===0?new RegExp("\\p{White_Space}|\\p{Cf}","gu"):new RegExp(`${_.join("|")}|\\p{White_Space}|\\p{Cf}`,"gu"),w=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(9876543210)].reverse(),b=new Map(w.map((k,I)=>[k,I])),C=new RegExp(`[${w.join("")}]`,"g");return{minusSign:l,plusSign:c,decimal:p,group:h,literals:D,numeral:C,numerals:w,index:k=>String(b.get(k)),noNumeralUnits:u}}function lr(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function ff(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qs(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}const dD=d.createContext(null),mf=7e3;let cr=null;function Yn(e,t="assertive",r=mf){cr?cr.announce(e,t,r):(cr=new mD,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?cr.announce(e,t,r):setTimeout(()=>{cr?.isAttached()&&cr?.announce(e,t,r)},100))}function fD(e){cr&&cr.clear(e)}class mD{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(t){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",t),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,r="assertive",n=mf){if(!this.node)return;let a=document.createElement("div");typeof t=="object"?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",t["aria-labelledby"])):a.textContent=t,r==="assertive"?this.assertiveLog?.appendChild(a):this.politeLog?.appendChild(a),t!==""&&setTimeout(()=>{a.remove()},n)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function pD(e,t){let{elementType:r="button",isDisabled:n,onPress:a,onPressStart:o,onPressEnd:i,onPressUp:s,onPressChange:u,preventFocusOnPress:l,allowFocusWhenDisabled:c,onClick:f,href:p,target:h,rel:g,type:y="button"}=e,_;r==="button"?_={type:y,disabled:n,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:_={role:"button",href:r==="a"&&!n?p:void 0,target:r==="a"?h:void 0,type:r==="input"?y:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?g:void 0};let{pressProps:D,isPressed:w}=Ns({onPressStart:o,onPressEnd:i,onPressChange:u,onPress:a,onPressUp:s,onClick:f,isDisabled:n,preventFocusOnPress:l,ref:t}),{focusableProps:b}=ZE(e,t);c&&(b.tabIndex=n?-1:b.tabIndex);let C=Ae(b,D,et(e,{labelable:!0}));return{isPressed:w,buttonProps:Ae(_,C,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}const Qn=d.createContext({}),Ks=qd(function(t,r){[t,r]=jt(t,r,Qn);let n=t,{isPending:a}=n,{buttonProps:o,isPressed:i}=pD(t,r);o=gD(o,a);let{focusProps:s,isFocused:u,isFocusVisible:l}=gn(t),{hoverProps:c,isHovered:f}=Kn({...t,isDisabled:t.isDisabled||a}),p={isHovered:f,isPressed:(n.isPressed||i)&&!a,isFocused:u,isFocusVisible:l,isDisabled:t.isDisabled||!1,isPending:a??!1},h=zt({...t,values:p,defaultClassName:"react-aria-Button"}),g=Mt(o.id),y=Mt(),_=o["aria-labelledby"];a&&(_?_=`${_} ${y}`:o["aria-label"]&&(_=`${g} ${y}`));let D=d.useRef(a);d.useEffect(()=>{let b={"aria-labelledby":_||g};(!D.current&&u&&a||D.current&&u&&!a)&&Yn(b,"assertive"),D.current=a},[a,u,_,g]);let w=et(t,{global:!0});return delete w.onClick,d.createElement(st.button,{...Ae(w,h,o,s,c),type:o.type==="submit"&&a?"button":o.type,id:g,ref:r,"aria-labelledby":_,slot:t.slot||void 0,"aria-disabled":a?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":a||void 0,"data-focus-visible":l||void 0},d.createElement(dD.Provider,{value:{id:y}},h.children))}),hD=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function gD(e,t){if(t){for(const r in e)r.startsWith("on")&&!hD.test(r)&&(e[r]=void 0);e.href=void 0,e.target=void 0}return e}const Ys=d.createContext({}),yD=d.forwardRef(function(t,r){[t,r]=jt(t,r,Ys);let{children:n,level:a=3,className:o,...i}=t,s=st[`h${a}`];return d.createElement(s,{...i,ref:r,className:o??"react-aria-Heading"},n)}),Qs=d.createContext({});var pf={};pf={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var hf={};hf={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var gf={};gf={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var yf={};yf={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var bf={};bf={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var _f={};_f={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var vf={};vf={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var Ef={};Ef={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var Df={};Df={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var Sf={};Sf={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var Cf={};Cf={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var wf={};wf={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var xf={};xf={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var $f={};$f={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var Af={};Af={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var kf={};kf={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var Tf={};Tf={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var Pf={};Pf={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var If={};If={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var Mf={};Mf={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var Ff={};Ff={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var Of={};Of={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var Bf={};Bf={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var Lf={};Lf={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var Rf={};Rf={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var Nf={};Nf={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var Uf={};Uf={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var Hf={};Hf={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var Vf={};Vf={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var zf={};zf={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var jf={};jf={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var Zf={};Zf={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var Gf={};Gf={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var qf={};qf={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var Xn={};Xn={"ar-AE":pf,"bg-BG":hf,"cs-CZ":gf,"da-DK":yf,"de-DE":bf,"el-GR":_f,"en-US":vf,"es-ES":Ef,"et-EE":Df,"fi-FI":Sf,"fr-FR":Cf,"he-IL":wf,"hr-HR":xf,"hu-HU":$f,"it-IT":Af,"ja-JP":kf,"ko-KR":Tf,"lt-LT":Pf,"lv-LV":If,"nb-NO":Mf,"nl-NL":Ff,"pl-PL":Of,"pt-BR":Bf,"pt-PT":Lf,"ro-RO":Rf,"ru-RU":Nf,"sk-SK":Uf,"sl-SI":Hf,"sr-SP":Vf,"sv-SE":zf,"tr-TR":jf,"uk-UA":Zf,"zh-CN":Gf,"zh-TW":qf};function Kf(e,t){let r=d.useRef(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yn(e,t){return e-t*Math.floor(e/t)}const Yf=1721426;function Hr(e,t,r,n){t=Wn(e,t);let a=t-1,o=-2;return r<=2?o=0:dr(t)&&(o=-1),Yf-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*r-362)/12+o+n)}function dr(e){return e%4===0&&(e%100!==0||e%400===0)}function Wn(e,t){return e==="BC"?1-t:t}function mo(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const bD={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class at{fromJulianDay(t){let r=t,n=r-Yf,a=Math.floor(n/146097),o=yn(n,146097),i=Math.floor(o/36524),s=yn(o,36524),u=Math.floor(s/1461),l=yn(s,1461),c=Math.floor(l/365),f=a*400+i*100+u*4+c+(i!==4&&c!==4?1:0),[p,h]=mo(f),g=r-Hr(p,h,1,1),y=2;r<Hr(p,h,3,1)?y=0:dr(h)&&(y=1);let _=Math.floor(((g+y)*12+373)/367),D=r-Hr(p,h,_,1)+1;return new Ne(p,h,_,D)}toJulianDay(t){return Hr(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return bD[dr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return dr(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const _D={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Be(e,t){return t=Me(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vD(e,t){return t=Me(t,e.calendar),e=Vr(e),t=Vr(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function ED(e,t){return t=Me(t,e.calendar),e=eu(e),t=eu(t),e.era===t.era&&e.year===t.year}function DD(e,t){return po(e.calendar,t.calendar)&&Be(e,t)}function po(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Qf(e,t){return Be(e,Ws(t))}const SD={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Xs(e,t,r){let n=e.calendar.toJulianDay(e),a=r?SD[r]:$D(t),o=Math.ceil(n+1-a)%7;return o<0&&(o+=7),o}function Xf(e){return qt(Date.now(),e)}function Ws(e){return ot(Xf(e))}function Wf(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Jf(e,t){return em(e)-em(t)}function em(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Js=null,CD=!1;function ho(){return Js==null&&(Js=new Intl.DateTimeFormat().resolvedOptions().timeZone),Js}function tm(){return CD}function Vr(e){return e.subtract({days:e.day-1})}function go(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function eu(e){return Vr(e.subtract({months:e.month-1}))}function Jn(e,t,r){let n=Xs(e,t,r);return e.subtract({days:n})}function wD(e,t,r){return Jn(e,t,r).add({days:6})}const rm=new Map,tu=new Map;function xD(e){if(Intl.Locale){let r=rm.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&rm.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function $D(e){let t=tu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return tu.set(e,t),t.firstDay}let r=xD(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&_D[r]||0};tu.set(e,t)}return t.firstDay}function AD(e,t,r){let n=e.calendar.getDaysInMonth(e);return Math.ceil((Xs(Vr(e),t,r)+n)/7)}function nm(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function am(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function bn(e){e=Me(e,new at);let t=Wn(e.era,e.year);return om(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function om(e,t,r,n,a,o,i){let s=new Date;return s.setUTCHours(n,a,o,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function ru(e,t){if(t==="UTC")return 0;if(e>0&&t===ho()&&!tm())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:a,hour:o,minute:i,second:s}=sm(e,t);return om(r,n,a,o,i,s,0)-Math.floor(e/1e3)*1e3}const im=new Map;function sm(e,t){let r=im.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),im.set(t,r));let n=r.formatToParts(new Date(e)),a={};for(let o of n)o.type!=="literal"&&(a[o.type]=o.value);return{year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}const um=864e5;function kD(e,t,r,n){return(r===n?[r]:[r,n]).filter(o=>TD(e,t,o))}function TD(e,t,r){let n=sm(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Gt(e,t,r="compatible"){let n=Kt(e);if(t==="UTC")return bn(n);if(t===ho()&&r==="compatible"&&!tm()){n=Me(n,new at);let u=new Date,l=Wn(n.era,n.year);return u.setFullYear(l,n.month-1,n.day),u.setHours(n.hour,n.minute,n.second,n.millisecond),u.getTime()}let a=bn(n),o=ru(a-um,t),i=ru(a+um,t),s=kD(n,t,a-o,a-i);if(s.length===1)return s[0];if(s.length>1)switch(r){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-o,a-i);case"compatible":case"later":return Math.max(a-o,a-i);case"reject":throw new RangeError("No such absolute time found")}}function lm(e,t,r="compatible"){return new Date(Gt(e,t,r))}function qt(e,t){let r=ru(e,t),n=new Date(e+r),a=n.getUTCFullYear(),o=n.getUTCMonth()+1,i=n.getUTCDate(),s=n.getUTCHours(),u=n.getUTCMinutes(),l=n.getUTCSeconds(),c=n.getUTCMilliseconds();return new na(a<1?"BC":"AD",a<1?-a+1:a,o,i,t,r,s,u,l,c)}function ot(e){return new Ne(e.calendar,e.era,e.year,e.month,e.day)}function Kt(e,t){let r=0,n=0,a=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:a,millisecond:o}=t),new ra(e.calendar,e.era,e.year,e.month,e.day,r,n,a,o)}function Me(e,t){if(po(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,zr(n),n}function PD(e,t,r){if(e instanceof na)return e.timeZone===t?e:cm(e,t);let n=Gt(e,t,r);return qt(n,t)}function ID(e){let t=bn(e)-e.offset;return new Date(t)}function cm(e,t){let r=bn(e)-e.offset;return Me(qt(r,t),e.calendar)}function MD(e){return cm(e,ho())}const ea=36e5;function yo(e,t){let r=e.copy(),n="hour"in r?pm(r,t):0;nu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,au(r),dm(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,FD(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let a=r.calendar.getYearsInEra(r);if(r.year>a){let i=r.calendar.isInverseEra?.(r);r.year=a,r.month=i?1:r.calendar.getMonthsInYear(r),r.day=i?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let o=r.calendar.getMonthsInYear(r);return r.month>o&&(r.month=o,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function nu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function au(e){for(;e.month<1;)nu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,nu(e,1)}function FD(e){for(;e.day<1;)e.month--,au(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,au(e)}function dm(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function zr(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),dm(e)}function ou(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function fm(e,t){return yo(e,ou(t))}function iu(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),zr(r),r}function ta(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),mm(r),r}function OD(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=bo(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bo(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bo(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=bo(e.hour,24),t}function mm(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function bo(e,t){let r=e%t;return r<0&&(r+=t),r}function pm(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,OD(e)}function hm(e,t){let r=e.copy();return pm(r,t),r}function BD(e,t){return hm(e,ou(t))}function su(e,t,r,n){let a=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),i=o.indexOf(e.era);if(i<0)throw new Error("Invalid era: "+e.era);i=Yt(i,r,0,o.length-1,n?.round),a.era=o[i],zr(a);break}case"year":a.calendar.isInverseEra?.(a)&&(r=-r),a.year=Yt(e.year,r,-1/0,9999,n?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=Yt(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":a.day=Yt(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),zr(a),a}function uu(e,t,r,n){let a=e.copy();switch(t){case"hour":{let o=e.hour,i=0,s=23;if(n?.hourCycle===12){let u=o>=12;i=u?12:0,s=u?23:11}a.hour=Yt(o,r,i,s,n?.round);break}case"minute":a.minute=Yt(e.minute,r,0,59,n?.round);break;case"second":a.second=Yt(e.second,r,0,59,n?.round);break;case"millisecond":a.millisecond=Yt(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return a}function Yt(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gm(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let a=yo(Kt(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=Gt(a,e.timeZone)}else r=bn(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=qt(r,e.timeZone);return Me(n,e.calendar)}function LD(e,t){return gm(e,ou(t))}function RD(e,t,r,n){switch(t){case"hour":{let a=0,o=23;if(n?.hourCycle===12){let g=e.hour>=12;a=g?12:0,o=g?23:11}let i=Kt(e),s=Me(ta(i,{hour:a}),new at),u=[Gt(s,e.timeZone,"earlier"),Gt(s,e.timeZone,"later")].filter(g=>qt(g,e.timeZone).day===s.day)[0],l=Me(ta(i,{hour:o}),new at),c=[Gt(l,e.timeZone,"earlier"),Gt(l,e.timeZone,"later")].filter(g=>qt(g,e.timeZone).day===l.day).pop(),f=bn(e)-e.offset,p=Math.floor(f/ea),h=f%ea;return f=Yt(p,r,Math.floor(u/ea),Math.floor(c/ea),n?.round)*ea+h,Me(qt(f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return uu(e,t,r,n);case"era":case"year":case"month":case"day":{let a=su(Kt(e),t,r,n),o=Gt(a,e.timeZone);return Me(qt(o,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function ND(e,t,r){let n=Kt(e),a=ta(iu(n,t),t);if(a.compare(n)===0)return e;let o=Gt(a,e.timeZone,r);return Me(qt(o,e.timeZone),e.calendar)}const UD=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,HD=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,ym=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function bm(e){let t=e.match(UD);if(!t)throw ym.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Ne(Ft(t[1],0,9999),Ft(t[2],1,12),1);return r.day=Ft(t[3],1,r.calendar.getDaysInMonth(r)),r}function VD(e){let t=e.match(HD);if(!t)throw ym.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Ft(t[1],-9999,9999),n=r<1?"BC":"AD",a=new ra(n,r<1?-r+1:r,Ft(t[2],1,12),1,t[4]?Ft(t[4],0,23):0,t[5]?Ft(t[5],0,59):0,t[6]?Ft(t[6],0,59):0,t[7]?Ft(t[7],0,1/0)*1e3:0);return a.day=Ft(t[3],0,a.calendar.getDaysInMonth(a)),a}function Ft(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function _m(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function vm(e){let t=Me(e,new at),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Em(e){return`${vm(e)}T${_m(e)}`}function zD(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return a!==0&&(o+=`:${String(a).padStart(2,"0")}`),o}function jD(e){return`${Em(e)}${zD(e.offset)}[${e.timeZone}]`}function lu(e){let t=typeof e[0]=="object"?e.shift():new at,r;if(typeof e[0]=="string")r=e.shift();else{let i=t.getEras();r=i[i.length-1]}let n=e.shift(),a=e.shift(),o=e.shift();return[t,r,n,a,o]}class Ne{#e;constructor(...t){let[r,n,a,o,i]=lu(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=i,zr(this)}copy(){return this.era?new Ne(this.calendar,this.era,this.year,this.month,this.day):new Ne(this.calendar,this.year,this.month,this.day)}add(t){return yo(this,t)}subtract(t){return fm(this,t)}set(t){return iu(this,t)}cycle(t,r,n){return su(this,t,r,n)}toDate(t){return lm(this,t)}toString(){return vm(this)}compare(t){return Wf(this,t)}}class cu{#e;constructor(t=0,r=0,n=0,a=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=a,mm(this)}copy(){return new cu(this.hour,this.minute,this.second,this.millisecond)}add(t){return hm(this,t)}subtract(t){return BD(this,t)}set(t){return ta(this,t)}cycle(t,r,n){return uu(this,t,r,n)}toString(){return _m(this)}compare(t){return Jf(this,t)}}class ra{#e;constructor(...t){let[r,n,a,o,i]=lu(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,zr(this)}copy(){return this.era?new ra(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new ra(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return yo(this,t)}subtract(t){return fm(this,t)}set(t){return iu(ta(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return su(this,t,r,n);default:return uu(this,t,r,n)}}toDate(t,r){return lm(this,t,r)}toString(){return Em(this)}compare(t){let r=Wf(this,t);return r===0?Jf(this,Kt(t)):r}}class na{#e;constructor(...t){let[r,n,a,o,i]=lu(t),s=t.shift(),u=t.shift();this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=i,this.timeZone=s,this.offset=u,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,zr(this)}copy(){return this.era?new na(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new na(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return gm(this,t)}subtract(t){return LD(this,t)}set(t,r){return ND(this,t,r)}cycle(t,r,n){return RD(this,t,r,n)}toDate(){return ID(this)}toString(){return jD(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-PD(t,this.timeZone).toDate().getTime()}}const _n=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],ZD=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_o=[1867,1911,1925,1988,2018],fr=["meiji","taisho","showa","heisei","reiwa"];function Dm(e){const t=_n.findIndex(([r,n,a])=>e.year<r||e.year===r&&e.month<n||e.year===r&&e.month===n&&e.day<a);return t===-1?_n.length-1:t===0?0:t-1}function du(e){let t=_o[fr.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Ne(e.year+t,e.month,e.day)}class GD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=Dm(r);return new Ne(this,fr[n],r.year-_o[n],r.month,r.day)}toJulianDay(t){return super.toJulianDay(du(t))}balanceDate(t){let r=du(t),n=Dm(r);fr[n]!==t.era&&(t.era=fr[n],t.year=r.year-_o[n]),this.constrainDate(t)}constrainDate(t){let r=fr.indexOf(t.era),n=ZD[r];if(n!=null){let[a,o,i]=n,s=a-_o[r];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(o,t.month),t.month===o&&(t.day=Math.min(i,t.day)))}if(t.year===1&&r>=0){let[,a,o]=_n[r];t.month=Math.max(a,t.month),t.month===a&&(t.day=Math.max(o,t.day))}}getEras(){return fr}getYearsInEra(t){let r=fr.indexOf(t.era),n=_n[r],a=_n[r+1];if(a==null)return 9999-n[0]+1;let o=a[0]-n[0];return(t.month<a[1]||t.month===a[1]&&t.day<a[2])&&o++,o}getDaysInMonth(t){return super.getDaysInMonth(du(t))}getMinimumMonthInYear(t){let r=Sm(t);return r?r[1]:1}getMinimumDayInMonth(t){let r=Sm(t);return r&&t.month===r[1]?r[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function Sm(e){if(e.year===1){let t=fr.indexOf(e.era);return _n[t]}}const Cm=-543;class qD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=Wn(r.era,r.year);return new Ne(this,n-Cm,r.month,r.day)}toJulianDay(t){return super.toJulianDay(wm(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(wm(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function wm(e){let[t,r]=mo(e.year+Cm);return new Ne(t,r,e.month,e.day)}const vo=1911;function xm(e){return e.era==="minguo"?e.year+vo:1-e.year+vo}function $m(e){let t=e-vo;return t>0?["minguo",t]:["before_minguo",1-t]}class KD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=Wn(r.era,r.year),[a,o]=$m(n);return new Ne(this,a,o,r.month,r.day)}toJulianDay(t){return super.toJulianDay(Am(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[r,n]=$m(xm(t));t.era=r,t.year=n}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(Am(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-vo}constructor(...t){super(...t),this.identifier="roc"}}function Am(e){let[t,r]=mo(xm(e));return new Ne(t,r,e.month,e.day)}const km=1948320,Tm=[0,31,62,93,124,155,186,216,246,276,306,336];class YD{fromJulianDay(t){let r=t-km,n=1+Math.floor((33*r+3)/12053),a=365*(n-1)+Math.floor((8*n+21)/33),o=r-a,i=o<216?Math.floor(o/31):Math.floor((o-6)/30),s=o-Tm[i]+1;return new Ne(this,n,i+1,s)}toJulianDay(t){let r=km-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return r+=Tm[t.month-1],r+=t.day,r}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||yn(25*t.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const fu=78,Pm=80;class QD extends at{fromJulianDay(t){let r=super.fromJulianDay(t),n=r.year-fu,a=t-Hr(r.era,r.year,1,1),o;a<Pm?(n--,o=dr(r.year-1)?31:30,a+=o+155+90+10):(o=dr(r.year)?31:30,a-=Pm);let i,s;if(a<o)i=1,s=a+1;else{let u=a-o;u<155?(i=Math.floor(u/31)+2,s=u%31+1):(u-=155,i=Math.floor(u/30)+7,s=u%30+1)}return new Ne(this,n,i,s)}toJulianDay(t){let r=t.year+fu,[n,a]=mo(r),o,i;return dr(a)?(o=31,i=Hr(n,a,3,21)):(o=30,i=Hr(n,a,3,22)),t.month===1?i+t.day-1:(i+=o+Math.min(t.month-2,5)*31,t.month>=8&&(i+=(t.month-7)*30),i+=t.day-1,i)}getDaysInMonth(t){return t.month===1&&dr(t.year+fu)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Eo=1948440,Im=1948439,Dt=1300,vn=1600,XD=460322;function Do(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Mm(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),a=Math.min(12,Math.ceil((r-(29+Do(t,n,1,1)))/29.5)+1),o=r-Do(t,n,a,1)+1;return new Ne(e,n,a,o)}function Fm(e){return(14+11*e)%30<11}class mu{fromJulianDay(t){return Mm(this,Eo,t)}toJulianDay(t){return Do(Eo,t.year,t.month,t.day)}getDaysInMonth(t){let r=29+t.month%2;return t.month===12&&Fm(t.year)&&r++,r}getMonthsInYear(){return 12}getDaysInYear(t){return Fm(t.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class WD extends mu{fromJulianDay(t){return Mm(this,Im,t)}toJulianDay(t){return Do(Im,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const JD="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let pu,En;function So(e){return XD+En[e-Dt]}function aa(e,t){let r=e-Dt,n=1<<11-(t-1);return(pu[r]&n)===0?29:30}function Om(e,t){let r=So(e);for(let n=1;n<t;n++)r+=aa(e,n);return r}function Bm(e){return En[e+1-Dt]-En[e-Dt]}class eS extends mu{constructor(){if(super(),this.identifier="islamic-umalqura",pu||(pu=new Uint16Array(Uint8Array.from(atob(JD),t=>t.charCodeAt(0)).buffer)),!En){En=new Uint32Array(vn-Dt+1);let t=0;for(let r=Dt;r<=vn;r++){En[r-Dt]=t;for(let n=1;n<=12;n++)t+=aa(r,n)}}}fromJulianDay(t){let r=t-Eo,n=So(Dt),a=So(vn);if(r<n||r>a)return super.fromJulianDay(t);{let o=Dt-1,i=1,s=1;for(;s>0;){o++,s=r-So(o)+1;let u=Bm(o);if(s===u){i=12;break}else if(s<u){let l=aa(o,i);for(i=1;s>l;)s-=l,i++,l=aa(o,i);break}}return new Ne(this,o,i,r-Om(o,i)+1)}}toJulianDay(t){return t.year<Dt||t.year>vn?super.toJulianDay(t):Eo+Om(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<Dt||t.year>vn?super.getDaysInMonth(t):aa(t.year,t.month)}getDaysInYear(t){return t.year<Dt||t.year>vn?super.getDaysInYear(t):Bm(t.year)}}const Lm=347997,Rm=1080,Nm=24*Rm,tS=29,rS=12*Rm+793,nS=tS*Nm+rS;function jr(e){return yn(e*7+1,19)<7}function Co(e){let t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return yn(3*(n+1),7)<3&&(n+=1),n}function aS(e){let t=Co(e-1),r=Co(e);return Co(e+1)-r===356?2:r-t===382?1:0}function oa(e){return Co(e)+aS(e)}function Um(e){return oa(e+1)-oa(e)}function oS(e){let t=Um(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function wo(e,t){if(t>=6&&!jr(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let r=oS(e);return t===2?r===2?30:29:t===3?r===0?29:30:t===6?jr(e)?30:0:30}class iS{fromJulianDay(t){let r=t-Lm,n=r*Nm/nS,a=Math.floor((19*n+234)/235)+1,o=oa(a),i=Math.floor(r-o);for(;i<1;)a--,o=oa(a),i=Math.floor(r-o);let s=1,u=0;for(;u<i;)u+=wo(a,s),s++;s--,u-=wo(a,s);let l=i-u;return new Ne(this,a,s,l)}toJulianDay(t){let r=oa(t.year);for(let n=1;n<t.month;n++)r+=wo(t.year,n);return r+t.day+Lm}getDaysInMonth(t){return wo(t.year,t.month)}getMonthsInYear(t){return jr(t.year)?13:12}getDaysInYear(t){return Um(t.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,r){r.year!==t.year&&(jr(r.year)&&!jr(t.year)&&r.month>6?t.month--:!jr(r.year)&&jr(t.year)&&r.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const hu=1723856,Hm=1824665,gu=5500;function xo(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function yu(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-xo(e,r,1,1))/30),a=t+1-xo(e,r,n,1);return[r,n,a]}function Vm(e){return Math.floor(e%4/3)}function zm(e,t){return t%13!==0?30:Vm(e)+5}class bu{fromJulianDay(t){let[r,n,a]=yu(hu,t),o="AM";return r<=0&&(o="AA",r+=gu),new Ne(this,o,r,n,a)}toJulianDay(t){let r=t.year;return t.era==="AA"&&(r-=gu),xo(hu,r,t.month,t.day)}getDaysInMonth(t){return zm(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+Vm(t.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class sS extends bu{fromJulianDay(t){let[r,n,a]=yu(hu,t);return r+=gu,new Ne(this,"AA",r,n,a)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class uS extends bu{fromJulianDay(t){let[r,n,a]=yu(Hm,t),o="CE";return r<=0&&(o="BCE",r=1-r),new Ne(this,o,r,n,a)}toJulianDay(t){let r=t.year;return t.era==="BCE"&&(r=1-r),xo(Hm,r,t.month,t.day)}getDaysInMonth(t){let r=t.year;return t.era==="BCE"&&(r=1-r),zm(r,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function jm(e){switch(e){case"buddhist":return new qD;case"ethiopic":return new bu;case"ethioaa":return new sS;case"coptic":return new uS;case"hebrew":return new iS;case"indian":return new QD;case"islamic-civil":return new mu;case"islamic-tbla":return new WD;case"islamic-umalqura":return new eS;case"japanese":return new GD;case"persian":return new YD;case"roc":return new KD;case"gregory":default:return new at}}let _u=new Map;class Qt{constructor(t,r={}){this.formatter=Zm(t,r),this.options=r}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return dS()&&(this.resolvedHourCycle||(this.resolvedHourCycle=fS(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const lS={true:{ja:"h11"},false:{}};function Zm(e,t={}){if(typeof t.hour12=="boolean"&&cS()){t={...t};let a=lS[String(t.hour12)][e.split("-")[0]],o=t.hour12?"h12":"h23";t.hourCycle=a??o,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(_u.has(r))return _u.get(r);let n=new Intl.DateTimeFormat(e,t);return _u.set(r,n),n}let vu=null;function cS(){return vu==null&&(vu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),vu}let Eu=null;function dS(){return Eu==null&&(Eu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Eu}function fS(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=Zm(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}function St(e){e=Kf(e??{},mS);let{locale:t}=Je();return d.useMemo(()=>new Qt(t,e),[t,e])}function mS(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a of r)if(t[a]!==e[a])return!1;return!0}function Gm(e){return e&&e.__esModule?e.default:e}const Du=new WeakMap;function ia(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function pS(e){let t=sr(Gm(Xn),"@react-aria/calendar"),r,n;"highlightedRange"in e?{start:r,end:n}=e.highlightedRange||{}:(r=Array.isArray(e.value)?e.value[0]:e.value??void 0,n=Array.isArray(e.value)?e.value.at(-1):e.value??void 0);let a=St({weekday:"long",month:"long",year:"numeric",day:"numeric",era:ia(r)||ia(n),timeZone:e.timeZone}),{locale:o}=Je(),i=d.useMemo(()=>new Intl.ListFormat(o),[o]),s="anchorDate"in e?e.anchorDate:null;return d.useMemo(()=>{if(!s&&r&&n){if(Be(r,n)){let u=a.format(r.toDate(e.timeZone));return t.format("selectedDateDescription",{date:u})}else if("highlightedRange"in e){let u=Cu(a,t,r,n,e.timeZone);return t.format("selectedRangeDescription",{dateRange:u})}else if(Array.isArray(e.value)){let u=e.value.map(c=>a.format(c.toDate(e.timeZone))),l=i.format(u);return t.format("selectedDateDescription",{date:l})}}return""},[r,n,s,e,t,a,i])}function Su(e,t,r,n){let a=sr(Gm(Xn),"@react-aria/calendar"),o=ia(e)||ia(t),i=St({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:r}),s=St({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:r});return d.useMemo(()=>{if(Be(e,Vr(e))){let u=e,l=t;if(e.calendar.getFormattableMonth&&(u=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(l=t.calendar.getFormattableMonth(t)),Be(t,go(e)))return i.format(u.toDate(r));if(Be(t,go(t)))return n?Cu(i,a,u,l,r):i.formatRange(u.toDate(r),l.toDate(r))}return n?Cu(s,a,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,a,r,n])}function Cu(e,t,r,n,a){let o=e.formatRangeToParts(r.toDate(a),n.toDate(a)),i=-1;for(let l=0;l<o.length;l++){let c=o[l];if(c.source==="shared"&&c.type==="literal")i=l;else if(c.source==="endRange")break}let s="",u="";for(let l=0;l<o.length;l++)l<i?s+=o[l].value:l>i&&(u+=o[l].value);return t.format("dateRange",{startDate:s,endDate:u})}function qm(e,t){const r=d.useRef(!0),n=d.useRef(null);let a=qe(e);d.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),d.useEffect(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((i,s)=>!Object.is(i,o[s])))&&a(),n.current=t},t)}function hS(e){return e&&e.__esModule?e.default:e}function gS(e,t){let r=sr(hS(Xn),"@react-aria/calendar"),n=et(e),a=Su(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),o=Su(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);qm(()=>{t.isFocused||Yn(o)},[o]);let i=pS(t);qm(()=>{i&&Yn(i,"polite",4e3)},[i]);let s=Xa([!!e.errorMessage,e.isInvalid,e.validationState]);Du.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:s,selectedDateDescription:i});let[u,l]=d.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&u&&(l(!1),t.setFocused(!0));let[f,p]=d.useState(!1),h=e.isDisabled||t.isPreviousVisibleRangeInvalid();h&&f&&(p(!1),t.setFocused(!0));let g=zn({id:e.id,"aria-label":[e["aria-label"],o].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:Ae(n,g,{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":r.format("next"),isDisabled:c,onFocusChange:l},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":r.format("previous"),isDisabled:h,onFocusChange:p},errorMessageProps:{id:s},title:a}}function yS(e,t){return gS(e,t)}function bS(e,t){let{startDate:r=t.visibleRange.start,endDate:n=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:o}=Je(),i=y=>{switch(y.key){case"Enter":case" ":y.preventDefault(),t.selectFocusedDate();break;case"PageUp":y.preventDefault(),y.stopPropagation(),t.focusPreviousSection(y.shiftKey);break;case"PageDown":y.preventDefault(),y.stopPropagation(),t.focusNextSection(y.shiftKey);break;case"End":y.preventDefault(),y.stopPropagation(),t.focusSectionEnd();break;case"Home":y.preventDefault(),y.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":y.preventDefault(),y.stopPropagation(),o==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":y.preventDefault(),y.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":y.preventDefault(),y.stopPropagation(),o==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":y.preventDefault(),y.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(y.preventDefault(),t.setAnchorDate(null));break}},s=Su(r,n,t.timeZone,!0),{ariaLabel:u,ariaLabelledBy:l}=Du.get(t),c=zn({"aria-label":[u,s].filter(Boolean).join(", "),"aria-labelledby":l}),f=St({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=Je(),h=d.useMemo(()=>{let y=t.visibleDuration.days&&t.visibleDuration.days<7,_=y?r:Jn(Ws(t.timeZone),p,a),D=y?t.visibleDuration.days:7;return[...new Array(D).keys()].map(w=>{let C=_.add({days:w}).toDate(t.timeZone);return f.format(C)})},[p,t.timeZone,f,a,r,t.visibleDuration.days]),g=t.getWeeksInMonth(r);return{gridProps:Ae(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||t.selectionMode==="multiple"||void 0,onKeyDown:i,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:h,weeksInMonth:g}}function $o(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,a=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&r.overflow!=="hidden"&&(a=!0),a&&t&&(a=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),a}function Ao(e,t){let r=e;for($o(r,t)&&(r=r.parentElement);r&&!$o(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function wu(e,t){let r=[],n=document.scrollingElement||document.documentElement;for(;e&&($o(e,t)&&r.push(e),e!==n);)e=e.parentElement;return r}function xu(e,t,r={}){let{block:n="nearest",inline:a="nearest"}=r;if(e===t)return;let o=e.scrollTop,i=e.scrollLeft,s=t.getBoundingClientRect(),u=e.getBoundingClientRect(),l=window.getComputedStyle(t),c=window.getComputedStyle(e),f=document.scrollingElement||document.documentElement,p=e===f,h=e===f?0:u.top,g=e===f?e.clientHeight:u.bottom,y=e===f?0:u.left,_=e===f?e.clientWidth:u.right,D=parseFloat(l.scrollMarginTop)||0,w=parseFloat(l.scrollMarginBottom)||0,b=parseFloat(l.scrollMarginLeft)||0,C=parseFloat(l.scrollMarginRight)||0,v=parseFloat(c.scrollPaddingTop)||0,k=parseFloat(c.scrollPaddingBottom)||0,I=parseFloat(c.scrollPaddingLeft)||0,G=parseFloat(c.scrollPaddingRight)||0,O=parseFloat(c.borderTopWidth)||0,Z=parseFloat(c.borderBottomWidth)||0,M=parseFloat(c.borderLeftWidth)||0,X=parseFloat(c.borderRightWidth)||0,de=s.top-D,x=s.bottom+w,z=s.left-b,U=s.right+C,P=e===f?0:M+X,K=e===f?0:O+Z,$=e===f?0:e.offsetWidth-e.clientWidth-P,T=e===f?0:e.offsetHeight-e.clientHeight-K,Y=h+(p?0:O)+v,se=g-(p?0:Z)-k-T,te=y+(p?0:M)+I,H=_-(p?0:X)-G;c.direction==="rtl"&&!Hn()?te+=$:H-=$;let Q=de<Y||x>se,A=z<te||U>H;if(Q&&n==="start")o+=de-Y;else if(Q&&n==="center")o+=(de+x)/2-(Y+se)/2;else if(Q&&n==="end")o+=x-se;else if(Q&&n==="nearest"){let S=de-Y,E=x-se;o+=Math.abs(S)<=Math.abs(E)?S:E}if(A&&a==="start")i+=z-te;else if(A&&a==="center")i+=(z+U)/2-(te+H)/2;else if(A&&a==="end")i+=U-H;else if(A&&a==="nearest"){let S=z-te,E=U-H;i+=Math.abs(S)<=Math.abs(E)?S:E}e.scrollTo({left:i,top:o})}function Km(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let{left:o,top:i}=e.getBoundingClientRect(),s=wu(e,!0);for(let c of s)xu(c,e);let{left:u,top:l}=e.getBoundingClientRect();if(Math.abs(o-u)>1||Math.abs(i-l)>1){s=r?wu(r,!0):[];for(let c of s)xu(c,r,{block:"center",inline:"center"});for(let c of wu(e,!0))xu(c,e)}}else{let{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:s,top:u}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-u)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let _S=0;const $u=new Map;function Au(e){let[t,r]=d.useState();return $e(()=>{if(!e)return;let n=$u.get(e);if(n)r(n.element.id);else{let a=`react-aria-description-${_S++}`;r(a);let o=document.createElement("div");o.id=a,o.style.display="none",o.textContent=e,document.body.appendChild(o),n={refCount:0,element:o},$u.set(e,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),$u.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function vS(e){return e&&e.__esModule?e.default:e}function ES(e,t,r){let{date:n,isDisabled:a}=e,{errorMessageId:o,selectedDateDescription:i}=Du.get(t),s=sr(vS(Xn),"@react-aria/calendar"),u=St({weekday:"long",day:"numeric",month:"long",year:"numeric",era:ia(n),timeZone:t.timeZone}),l=t.isCellFocused(n)&&!e.isOutsideMonth;a=a||t.isCellDisabled(n)||!!e.isOutsideMonth;let c=t.isCellUnavailable(n),f=!a&&!c,p=t.isSelected(n)&&f,h=!1;t.isValueInvalid&&("highlightedRange"in t?h=!t.anchorDate&&t.highlightedRange!=null&&n.compare(t.highlightedRange.start)>=0&&n.compare(t.highlightedRange.end)<=0:Array.isArray(t.value)?h=t.value.some(M=>Be(M,n)):t.value&&(h=Be(t.value,n))),h&&!a&&(p=!0),n=Kf(n,DD);let g=d.useMemo(()=>n.toDate(t.timeZone),[n,t.timeZone]),y=Qf(n,t.timeZone),_=d.useMemo(()=>{let M="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Be(n,t.value.start)||Be(n,t.value.end))&&(M=i+", "),M+=u.format(g),y?M=s.format(p?"todayDateSelected":"todayDate",{date:M}):p&&(M=s.format("dateSelected",{date:M})),t.minValue&&Be(n,t.minValue)?M+=", "+s.format("minimumDate"):t.maxValue&&Be(n,t.maxValue)&&(M+=", "+s.format("maximumDate")),M},[u,g,s,p,y,n,t,i]),D="";"anchorDate"in t&&l&&!t.isReadOnly&&f&&(t.anchorDate?D=s.format("finishRangeSelectionPrompt"):D=s.format("startRangeSelectionPrompt"));let w=Au(D),b=d.useRef(!1),C=d.useRef(!1),v=d.useRef(void 0),{pressProps:k,isPressed:I}=Ns({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(M){if(t.isReadOnly){t.setFocusedDate(n),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&(M.pointerType==="mouse"||M.pointerType==="touch")){if(t.highlightedRange&&!h){if(Be(n,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(n),t.setFocused(!0),t.setDragging(!0),C.current=!0;return}else if(Be(n,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(n),t.setFocused(!0),t.setDragging(!0),C.current=!0;return}}let X=()=>{t.setDragging(!0),v.current=void 0,t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0),b.current=!0};M.pointerType==="touch"?v.current=setTimeout(X,200):X()}},onPressEnd(){C.current=!1,b.current=!1,clearTimeout(v.current),v.current=void 0},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0))},onPressUp(M){t.isReadOnly||("anchorDate"in t&&v.current&&(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0)),"anchorDate"in t&&(C.current?t.setAnchorDate(n):t.anchorDate&&!b.current?(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0)):M.pointerType==="keyboard"&&!t.anchorDate?(t.selectDate(n),t.focusNearestAvailableDate(n)):M.pointerType==="virtual"&&(t.selectDate(n),t.setFocusedDate(n),t.setFocused(!0))))}}),G;a||(G=Be(n,t.focusedDate)?0:-1),d.useEffect(()=>{l&&r.current&&(Or(r.current),oo()!=="pointer"&&Ie()===r.current&&Km(r.current,{containingElement:Ao(r.current)}))},[l,r]);let O=St({day:"numeric",timeZone:t.timeZone,calendar:n.calendar.identifier}),Z=d.useMemo(()=>O.formatToParts(g).find(M=>M.type==="day").value,[O,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":p||void 0,"aria-invalid":h||void 0},buttonProps:Ae(k,{onFocus(){a||(t.setFocusedDate(n),t.setFocused(!0))},tabIndex:G,role:"button","aria-disabled":!f||void 0,"aria-label":_,"aria-invalid":h||void 0,"aria-describedby":[h?o:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(M){"highlightDate"in t&&(M.pointerType!=="touch"||t.isDragging)&&f&&t.highlightDate(n)},onPointerDown(M){let X=he(M);X instanceof HTMLElement&&"releasePointerCapture"in X&&("hasPointerCapture"in X?X.hasPointerCapture(M.pointerId)&&X.releasePointerCapture(M.pointerId):X.releasePointerCapture(M.pointerId))},onContextMenu(M){M.preventDefault()}}),isPressed:I,isFocused:l,isSelected:p,isDisabled:a,isUnavailable:c,isOutsideVisibleRange:n.compare(t.visibleRange.start)<0||n.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:Z}}function DS(e,t){let r=St({month:e.format||"short",calendar:t.focusedDate.calendar.identifier,timeZone:t.timeZone}),n=[],a=t.focusedDate.calendar.getMonthsInYear(t.focusedDate);for(let s=1;s<=a;s++){let u=t.focusedDate.set({month:s}),l=u.calendar.getFormattableMonth?u.calendar.getFormattableMonth(u):u;n.push({id:s,date:u,formatted:r.format(l.toDate(t.timeZone))})}let{locale:o}=Je();return{"aria-label":d.useMemo(()=>new Intl.DisplayNames(o,{type:"dateTimeField"}).of("month"),[o]),value:t.focusedDate.month,onChange:s=>{s!=null&&t.setFocusedDate(n[Number(s)-1].date)},items:n}}function SS(e,t){let r=St({year:e.format?.year||"numeric",era:e.format?.era||(t.focusedDate.calendar.identifier==="gregory"&&t.focusedDate.era==="BC"?"short":void 0),calendar:t.focusedDate.calendar.identifier,timeZone:t.timeZone}),n=e.visibleYears||20,a=t.focusedDate.subtract({years:Math.floor(n/2)}),o=t.focusedDate.add({years:Math.ceil(n/2)-1});t.maxValue&&o.compare(t.maxValue)>0&&(o=ot(t.maxValue),a=o.subtract({years:n-1})),t.minValue&&a.compare(t.minValue)<0&&(a=ot(t.minValue),o=a.add({years:n-1}),t.maxValue&&o.compare(t.maxValue)>0&&(o=ot(t.maxValue)));let i=[],s=a,u=0;for(;s.compare(o)<=0;)ED(s,t.focusedDate)&&(u=i.length),i.push({id:i.length,date:s,formatted:r.format(s.toDate(t.timeZone))}),s=s.add({years:1});let{locale:l}=Je();return{"aria-label":d.useMemo(()=>new Intl.DisplayNames(l,{type:"dateTimeField"}).of("year"),[l]),value:u,onChange:f=>{f!=null&&t.setFocusedDate(i[f].date)},items:i}}function ko(e,t,r){return t!=null&&e.compare(t)<0||r!=null&&e.compare(r)>0}function Ym(e,t,r,n,a){let o={};for(let s in t)o[s]=Math.floor(t[s]/2),o[s]>0&&t[s]%2===0&&o[s]--;let i=Zr(e,t,r).subtract(o);return sa(e,i,t,r,n,a)}function Zr(e,t,r,n,a){let o=e;return t.years?o=eu(e):t.months?o=Vr(e):(t.weeks||t.days&&t.days>7)&&(o=Jn(e,r)),sa(e,o,t,r,n,a)}function ku(e,t,r,n,a){let o={...t};o.days?o.days--:o.weeks?o.weeks--:o.months?o.months--:o.years&&o.years--;let i=Zr(e,t,r).subtract(o);return sa(e,i,t,r,n,a)}function sa(e,t,r,n,a,o){if(a&&e.compare(a)>=0){let i=am(t,Zr(ot(a),r,n));i&&(t=i)}if(o&&e.compare(o)<=0){let i=nm(t,ku(ot(o),r,n));i&&(t=i)}return t}function Xt(e,t,r){if(t){let n=am(e,ot(t));n&&(e=n)}if(r){let n=nm(e,ot(r));n&&(e=n)}return e}function CS(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function wS(e,t){return e===t?!0:e.days===t.days&&e.weeks===t.weeks&&e.months===t.months&&e.years===t.years}function xS(e){let t=d.useMemo(()=>new Qt(e.locale),[e.locale]),r=d.useMemo(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:a,visibleDuration:o={months:1},minValue:i,maxValue:s,selectionAlignment:u,isDateUnavailable:l,pageBehavior:c="visible",selectionMode:f="single",firstDayOfWeek:p,weeksInMonth:h}=e,g=d.useMemo(()=>a(r.calendar),[a,r.calendar]),[y,_]=Zn(e.value,e.defaultValue??null,e.onChange),D=d.useMemo(()=>Array.isArray(y)?y.map(H=>Me(ot(H),g)):y?Me(ot(y),g):null,[y,g]),w=d.useMemo(()=>{let H=Array.isArray(y)?y[0]:y;return H&&"timeZone"in H?H.timeZone:r.timeZone},[y,r.timeZone]),b=d.useMemo(()=>e.focusedValue?Xt(Me(ot(e.focusedValue),g),i,s):void 0,[e.focusedValue,g,i,s]),C=d.useMemo(()=>e.defaultFocusedValue?Xt(Me(ot(e.defaultFocusedValue),g),i,s):Xt(D?Array.isArray(D)?D[0]:D:Me(Ws(w),g),i,s),[e.defaultFocusedValue,D,w,g,i,s]),[v,k]=Zn(b,C,e.onFocusChange),I=()=>{switch(u){case"start":return Zr(v,o,n,i,s);case"end":return ku(v,o,n,i,s);case"center":default:return Ym(v,o,n,i,s)}},[G,O]=d.useState(I),[Z,M]=d.useState(e.autoFocus||!1),[X,de]=d.useState(o);wS(o,X)||(de(o),O(I()));let x=d.useMemo(()=>{let H={...o};return H.days?H.days--:H.days=-1,G.add(H)},[G,o]),[z,U]=d.useState(g);if(!po(g,z)){let H=Me(v,g);O(Ym(H,o,n,i,s)),k(H),U(g)}ko(v,i,s)?k(Xt(v,i,s)):v.compare(G)<0?O(ku(v,o,n,i,s)):v.compare(x)>0&&O(Zr(v,o,n,i,s));function P(H){H=Xt(H,i,s),k(H)}function K(H){let Q=Xt(H,i,s),A=CS(Q,G,l);if(!A)return null;let S=Array.isArray(y)?y[0]:y,E=Me(A,S?.calendar||new at);return S&&"hour"in S?S.set(E):E}function $(H){if(!e.isDisabled&&!e.isReadOnly){if(H===null){_(f==="multiple"?[]:null);return}if(Array.isArray(H))_(H.map(K).filter(Boolean));else{let Q=K(H);Q&&_(Q)}}}let T=d.useMemo(()=>D?Array.isArray(D)?D.some(H=>l?.(H)||ko(H,i,s)):l?.(D)||ko(D,i,s):!1,[D,l,i,s]),Y=e.isInvalid||e.validationState==="invalid"||T,se=Y?"invalid":null,te=d.useMemo(()=>c==="visible"?o:Tu(o),[c,o]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:D,setValue:$,selectionMode:f,visibleDuration:o,visibleRange:{start:G,end:x},minValue:i,maxValue:s,focusedDate:v,timeZone:w,validationState:se,isValueInvalid:Y,setFocusedDate(H){P(H)},focusNextDay(){P(v.add({days:1}))},focusPreviousDay(){P(v.subtract({days:1}))},focusNextRow(){o.days?this.focusNextPage():(o.weeks||o.months||o.years)&&P(v.add({weeks:1}))},focusPreviousRow(){o.days?this.focusPreviousPage():(o.weeks||o.months||o.years)&&P(v.subtract({weeks:1}))},focusNextPage(){let H=G.add(te);k(Xt(v.add(te),i,s)),O(Zr(sa(v,H,te,n,i,s),te,n))},focusPreviousPage(){let H=G.subtract(te);k(Xt(v.subtract(te),i,s)),O(Zr(sa(v,H,te,n,i,s),te,n))},focusSectionStart(){o.days?P(G):o.weeks?P(Jn(v,n)):(o.months||o.years)&&P(Vr(v))},focusSectionEnd(){o.days?P(x):o.weeks?P(wD(v,n)):(o.months||o.years)&&P(go(v))},focusNextSection(H){if(!H&&!o.days){P(v.add(Tu(o)));return}o.days?this.focusNextPage():o.weeks?P(v.add({months:1})):(o.months||o.years)&&P(v.add({years:1}))},focusPreviousSection(H){if(!H&&!o.days){P(v.subtract(Tu(o)));return}o.days?this.focusPreviousPage():o.weeks?P(v.subtract({months:1})):(o.months||o.years)&&P(v.subtract({years:1}))},selectFocusedDate(){l&&l(v)||this.selectDate(v)},selectDate(H){if(!(e.isDisabled||e.isReadOnly))if(f==="multiple"&&H!=null){let Q=K(H);if(!Q)return;let A=[];Array.isArray(y)?A=y:y!=null&&(A=[y]);let S=A.findIndex(j=>Be(j,Q)),E=S>=0?A.slice(0,S).concat(A.slice(S+1)):[...A,Q];_(E)}else $(H)},isFocused:Z,setFocused:M,isInvalid(H){return ko(H,i,s)},isSelected(H){return!D||this.isCellDisabled(H)||this.isCellUnavailable(H)?!1:Array.isArray(D)?D.some(Q=>Be(Q,H)):Be(H,D)},isCellFocused(H){return Z&&v&&Be(H,v)},isCellDisabled(H){return e.isDisabled||H.compare(G)<0||H.compare(x)>0||this.isInvalid(H)},isCellUnavailable(H){return e.isDateUnavailable?e.isDateUnavailable(H):!1},isPreviousVisibleRangeInvalid(){let H=G.subtract({days:1});return Be(H,G)||this.isInvalid(H)},isNextVisibleRangeInvalid(){let H=x.add({days:1});return Be(H,x)||this.isInvalid(H)},getDatesInWeek(H,Q=G){let A=Q.add({weeks:H}),S=[],E=o.days&&o.days<7?o.days:7;if(E===7){A=Jn(A,n,p);let j=Xs(A,n,p);for(let q=0;q<j;q++)S.push(null)}for(;S.length<E;){S.push(A);let j=A.add({days:1});if(Be(A,j))break;A=j}for(;S.length<E;)S.push(null);return S},getWeeksInMonth(H=G){let Q=h||AD(H,n,p);return(o.weeks||o.days)&&(Q=o.weeks??0,o.days&&(Q+=Math.ceil(o.days/7))),Q}}}function Tu(e){let t={...e};for(let r in e)t[r]=1;return t}const Qm={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Xm(e={}){let{style:t,isFocusable:r}=e,[n,a]=d.useState(!1),{focusWithinProps:o}=qn({isDisabled:!r,onFocusWithinChange:s=>a(s)}),i=d.useMemo(()=>n?t:t?{...Qm,...t}:Qm,[n]);return{visuallyHiddenProps:{...o,style:i}}}function Pu(e){let{children:t,elementType:r="div",isFocusable:n,style:a,...o}=e,{visuallyHiddenProps:i}=Xm(e);return d.createElement(r,Ae(o,i),t)}const To=d.createContext(null),$S=d.createContext(null),Dn=d.createContext(null),ua=d.createContext(null),AS=d.forwardRef(function(t,r){[t,r]=jt(t,r,To);let{locale:n}=Je(),a=xS({...t,locale:n,createCalendar:t.createCalendar||jm}),{calendarProps:o,prevButtonProps:i,nextButtonProps:s,errorMessageProps:u,title:l}=yS(t,a),c=zt({...t,values:{state:a,isDisabled:t.isDisabled||!1,isInvalid:a.isValueInvalid},defaultClassName:"react-aria-Calendar"}),f=et(t,{global:!0});return d.createElement(st.div,{...Ae(f,c,o),ref:r,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":a.isValueInvalid||void 0},d.createElement(Wa,{values:[[Qn,{slots:{previous:i,next:s}}],[Ys,{"aria-hidden":!0,level:2,children:l}],[Dn,a],[To,t],[Qs,{slots:{errorMessage:u}}]]},d.createElement(Pu,null,d.createElement("h2",null,o["aria-label"])),c.children,d.createElement(Pu,null,d.createElement("button",{"aria-label":s["aria-label"],disabled:s.isDisabled,onClick:()=>a.focusNextPage(),tabIndex:-1}))))}),Po=d.createContext(null),kS=d.forwardRef(function(t,r){let n=d.useContext(Dn),a=d.useContext(ua),o=Ja(To),i=Ja($S),s=n??a,u=s.visibleRange.start;t.offset&&(u=u.add(t.offset));let l=o?.firstDayOfWeek??i?.firstDayOfWeek,{gridProps:c,headerProps:f,weekDays:p,weeksInMonth:h}=bS({startDate:u,endDate:go(u),weekdayStyle:t.weekdayStyle,firstDayOfWeek:l},s),g=et(t,{global:!0});return d.createElement(Po.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:h}},d.createElement(st.table,{render:t.render,...Ae(g,c),ref:r,style:t.style,cellPadding:0,className:t.className??"react-aria-CalendarGrid"},typeof t.children!="function"?t.children:d.createElement(d.Fragment,null,d.createElement(Wm,null,y=>d.createElement(Jm,null,y)),d.createElement(ep,null,t.children))))});function TS(e,t){let{children:r,style:n,className:a}=e,{headerProps:o,weekDays:i}=d.useContext(Po),s=et(e,{global:!0});return d.createElement(st.thead,{render:e.render,...Ae(s,o),ref:t,style:n,className:a??"react-aria-CalendarGridHeader"},d.createElement("tr",null,i.map((u,l)=>d.cloneElement(r(u),{key:l}))))}const Wm=d.forwardRef(TS);function PS(e,t){let{children:r,style:n,className:a}=e,o=et(e,{global:!0});return d.createElement(st.th,{render:e.render,...o,ref:t,style:n,className:a||"react-aria-CalendarHeaderCell"},r)}const Jm=d.forwardRef(PS);function IS(e,t){let{children:r,style:n,className:a}=e,o=d.useContext(Dn),i=d.useContext(ua),s=o??i,{startDate:u,weeksInMonth:l}=d.useContext(Po),c=et(e,{global:!0});return d.createElement(st.tbody,{render:e.render,...c,ref:t,style:n,className:a??"react-aria-CalendarGridBody"},[...new Array(l).keys()].map(f=>d.createElement("tr",{key:f},s.getDatesInWeek(f,u).map((p,h)=>p?d.cloneElement(r(p),{key:h}):d.createElement("td",{key:h})))))}const ep=d.forwardRef(IS),MS=d.forwardRef(function({date:t,...r},n){let a=d.useContext(Dn),o=d.useContext(ua),i=a??o,{startDate:s}=d.useContext(Po)??{startDate:i.visibleRange.start},u=i.visibleDuration.days||i.visibleDuration.weeks?!1:!vD(s,t),l=Qf(t,i.timeZone),c=d.useRef(null),{cellProps:f,buttonProps:p,...h}=ES({date:t,isOutsideMonth:u},i,c),{hoverProps:g,isHovered:y}=Kn({...r,isDisabled:h.isDisabled||h.isUnavailable}),{focusProps:_,isFocusVisible:D}=gn();D&&=h.isFocused;let w=!1,b=!1;"highlightedRange"in i&&i.highlightedRange&&(w=Be(t,i.highlightedRange.start),b=Be(t,i.highlightedRange.end));let C=zt({...r,defaultChildren:h.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:t,isHovered:y,isOutsideMonth:u,isFocusVisible:D,isSelectionStart:w,isSelectionEnd:b,isToday:l,...h}}),v={"data-focused":h.isFocused||void 0,"data-hovered":y||void 0,"data-pressed":h.isPressed||void 0,"data-unavailable":h.isUnavailable||void 0,"data-disabled":h.isDisabled||void 0,"data-focus-visible":D||void 0,"data-outside-visible-range":h.isOutsideVisibleRange||void 0,"data-outside-month":u||void 0,"data-selected":h.isSelected||void 0,"data-selection-start":w||void 0,"data-selection-end":b||void 0,"data-invalid":h.isInvalid||void 0,"data-today":l||void 0},k=et(r,{global:!0});return d.createElement("td",{...f,ref:n},d.createElement(st.div,{...Ae(k,p,_,g,v,C),ref:c}))});function FS(e){let t=d.useContext(Dn),r=d.useContext(ua),a=SS(e,t||r);return e.children(a)}function OS(e){let t=d.useContext(Dn),r=d.useContext(ua),a=DS(e,t||r);return e.children(a)}const BS=d.createContext(null),tp={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},rp={...tp,customError:!0,valid:!1},la={isInvalid:!1,validationDetails:tp,validationErrors:[]},LS=d.createContext({}),Iu="__reactAriaFormValidationState";function np(e){if(e[Iu]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:a,commitValidation:o}=e[Iu];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:a,commitValidation:o}}return RS(e)}function RS(e){let{isInvalid:t,validationState:r,name:n,value:a,builtinValidation:o,validate:i,validationBehavior:s="aria"}=e;r&&(t||=r==="invalid");let u=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:rp}:null,l=d.useMemo(()=>{if(!i||a==null)return null;let Z=NS(i,a);return ap(Z)},[i,a]);o?.validationDetails.valid&&(o=void 0);let c=d.useContext(LS),f=d.useMemo(()=>n?Array.isArray(n)?n.flatMap(Z=>Mu(c[Z])):Mu(c[n]):[],[c,n]),[p,h]=d.useState(c),[g,y]=d.useState(!1);c!==p&&(h(c),y(!1));let _=d.useMemo(()=>ap(g?[]:f),[g,f]),D=d.useRef(la),[w,b]=d.useState(la),C=d.useRef(la),v=()=>{if(!k)return;I(!1);let Z=l||o||D.current;Fu(Z,C.current)||(C.current=Z,b(Z))},[k,I]=d.useState(!1);return d.useEffect(v),{realtimeValidation:u||_||l||o||la,displayValidation:s==="native"?u||_||w:u||_||l||o||w,updateValidation(Z){s==="aria"&&!Fu(w,Z)?b(Z):D.current=Z},resetValidation(){let Z=la;Fu(Z,C.current)||(C.current=Z,b(Z)),s==="native"&&I(!1),y(!0)},commitValidation(){s==="native"&&I(!0),y(!0)}}}function Mu(e){return e?Array.isArray(e)?e:[e]:[]}function NS(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return Mu(r)}return[]}function ap(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:rp}:null}function Fu(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,n)=>r===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([r,n])=>t.validationDetails[r]===n)}const US=d.createContext(null);function op(e){let{description:t,errorMessage:r,isInvalid:n,validationState:a}=e,{labelProps:o,fieldProps:i}=aD(e),s=Xa([!!t,!!r,n,a]),u=Xa([!!t,!!r,n,a]);return i=Ae(i,{"aria-describedby":[s,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:i,descriptionProps:{id:s},errorMessageProps:{id:u}}}function HS(e,t,r){let n=qe(a=>{r&&!a.defaultPrevented&&r(t)});d.useEffect(()=>{let a=e?.current?.form;return a?.addEventListener("reset",n),()=>{a?.removeEventListener("reset",n)}},[e])}function VS(e,t,r){let{validationBehavior:n,focus:a}=e;$e(()=>{if(n==="native"&&r?.current&&"setCustomValidity"in r.current&&!r.current.disabled){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(l),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(jS(r.current))}});let o=d.useRef(!1),i=qe(()=>{o.current||t.resetValidation()}),s=qe(l=>{t.displayValidation.isInvalid||t.commitValidation();let c=r?.current?.form;!l.defaultPrevented&&r&&c&&ZS(c)===r.current&&(a?a():r.current?.focus(),CE("keyboard")),l.preventDefault()}),u=qe(()=>{t.commitValidation()});d.useEffect(()=>{let l=r?.current;if(!l)return;let c=l.form,f=c?.reset;return c&&(c.reset=()=>{o.current=!window.event||window.event.type==="message"&&he(window.event)instanceof MessagePort,f?.call(c),o.current=!1}),l.addEventListener("invalid",s),l.addEventListener("change",u),c?.addEventListener("reset",i),()=>{l.removeEventListener("invalid",s),l.removeEventListener("change",u),c?.removeEventListener("reset",i),c&&(c.reset=f)}},[r,n])}function zS(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function jS(e){return{isInvalid:!e.validity.valid,validationDetails:zS(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function ZS(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}const Io=d.createContext({}),ip=d.forwardRef(function(t,r){[t,r]=jt(t,r,Io);let{isDisabled:n,isInvalid:a,isReadOnly:o,onHoverStart:i,onHoverChange:s,onHoverEnd:u,...l}=t;n??=!!t["aria-disabled"]&&t["aria-disabled"]!=="false",a??=!!t["aria-invalid"]&&t["aria-invalid"]!=="false";let{hoverProps:c,isHovered:f}=Kn({onHoverStart:i,onHoverChange:s,onHoverEnd:u,isDisabled:n}),{isFocused:p,isFocusVisible:h,focusProps:g}=gn({within:!0}),y=zt({...t,values:{isHovered:f,isFocusWithin:p,isFocusVisible:h,isDisabled:n,isInvalid:a},defaultClassName:"react-aria-Group"});return d.createElement(st.div,{...Ae(l,g,c),...y,ref:r,role:t.role??"group",slot:t.slot??void 0,"data-focus-within":p||void 0,"data-hovered":f||void 0,"data-focus-visible":h||void 0,"data-disabled":n||void 0,"data-invalid":a||void 0,"data-readonly":o||void 0},y.children)}),sp=d.createContext({});let GS=e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...a}=e;return a};const qS=qd(function(t,r){[t,r]=jt(t,r,sp);let{hoverProps:n,isHovered:a}=Kn({...t,isDisabled:t.disabled}),{isFocused:o,isFocusVisible:i,focusProps:s}=gn({isTextInput:!0,autoFocus:t.autoFocus}),u=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",l=zt({...t,values:{isHovered:a,isFocused:o,isFocusVisible:i,isDisabled:t.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return d.createElement(st.input,{...Ae(GS(t),s,n),...l,ref:r,"data-focused":o||void 0,"data-disabled":t.disabled||void 0,"data-hovered":a||void 0,"data-focus-visible":i||void 0,"data-invalid":u||void 0})});var up={};up={Empty:"فارغ"};var lp={};lp={Empty:"Изпразни"};var cp={};cp={Empty:"Prázdné"};var dp={};dp={Empty:"Tom"};var fp={};fp={Empty:"Leer"};var mp={};mp={Empty:"Άδειο"};var pp={};pp={Empty:"Empty"};var hp={};hp={Empty:"Vacío"};var gp={};gp={Empty:"Tühjenda"};var yp={};yp={Empty:"Tyhjä"};var bp={};bp={Empty:"Vide"};var _p={};_p={Empty:"ריק"};var vp={};vp={Empty:"Prazno"};var Ep={};Ep={Empty:"Üres"};var Dp={};Dp={Empty:"Vuoto"};var Sp={};Sp={Empty:"空"};var Cp={};Cp={Empty:"비어 있음"};var wp={};wp={Empty:"Tuščias"};var xp={};xp={Empty:"Tukšs"};var $p={};$p={Empty:"Tom"};var Ap={};Ap={Empty:"Leeg"};var kp={};kp={Empty:"Pusty"};var Tp={};Tp={Empty:"Vazio"};var Pp={};Pp={Empty:"Vazio"};var Ip={};Ip={Empty:"Gol"};var Mp={};Mp={Empty:"Не заполнено"};var Fp={};Fp={Empty:"Prázdne"};var Op={};Op={Empty:"Prazen"};var Bp={};Bp={Empty:"Prazno"};var Lp={};Lp={Empty:"Tomt"};var Rp={};Rp={Empty:"Boş"};var Np={};Np={Empty:"Пусто"};var Up={};Up={Empty:"空"};var Hp={};Hp={Empty:"空白"};var Vp={};Vp={"ar-AE":up,"bg-BG":lp,"cs-CZ":cp,"da-DK":dp,"de-DE":fp,"el-GR":mp,"en-US":pp,"es-ES":hp,"et-EE":gp,"fi-FI":yp,"fr-FR":bp,"he-IL":_p,"hr-HR":vp,"hu-HU":Ep,"it-IT":Dp,"ja-JP":Sp,"ko-KR":Cp,"lt-LT":wp,"lv-LV":xp,"nb-NO":$p,"nl-NL":Ap,"pl-PL":kp,"pt-BR":Tp,"pt-PT":Pp,"ro-RO":Ip,"ru-RU":Mp,"sk-SK":Fp,"sl-SI":Op,"sr-SP":Bp,"sv-SE":Lp,"tr-TR":Rp,"uk-UA":Np,"zh-CN":Up,"zh-TW":Hp};function KS(e){return e&&e.__esModule?e.default:e}const zp=()=>{};function YS(e){const t=d.useRef(void 0);let{value:r,textValue:n,minValue:a,maxValue:o,isDisabled:i,isReadOnly:s,isRequired:u,onIncrement:l,onIncrementPage:c,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:g}=e;const y=sr(KS(Vp),"@react-aria/spinbutton");let _=d.useRef(!1);const D=d.useCallback(()=>{clearTimeout(t.current),_.current=!1},[]),w=qe(()=>{D()});d.useEffect(()=>()=>w(),[]);let b=te=>{if(!(te.ctrlKey||te.metaKey||te.shiftKey||te.altKey||s||te.nativeEvent.isComposing))switch(te.key){case"PageUp":if(c){te.preventDefault(),c?.();break}case"ArrowUp":case"Up":l&&(te.preventDefault(),l?.());break;case"PageDown":if(p){te.preventDefault(),p?.();break}case"ArrowDown":case"Down":f&&(te.preventDefault(),f?.());break;case"Home":h&&(te.preventDefault(),h?.());break;case"End":g&&(te.preventDefault(),g?.());break}},C=d.useRef(!1),v=()=>{C.current=!0},k=()=>{C.current=!1},I=n===""?y.format("Empty"):(n||`${r}`).replace("-","−");d.useEffect(()=>{C.current&&(fD("assertive"),Yn(I,"assertive"))},[I]);let G=d.useCallback(()=>{D()},[D]);const O=qe(l??zp),Z=qe(f??zp),M=qe(()=>{(o===void 0||isNaN(o)||r===void 0||isNaN(r)||r<o)&&(O(),X(60))}),X=qe(te=>{w(),_.current=!0,t.current=window.setTimeout(M,te)}),de=qe(()=>{(a===void 0||isNaN(a)||r===void 0||isNaN(r)||r>a)&&(Z(),x(60))}),x=qe(te=>{w(),_.current=!0,t.current=window.setTimeout(de,te)});let z=te=>{te.preventDefault()},{addGlobalListener:U,removeAllGlobalListeners:P}=uo(),K=d.useRef(!1),[$,T]=d.useState(null);d.useEffect(()=>{$==="touch"?X(600):$?X(400):$||w()},[$]);let[Y,se]=d.useState(null);return d.useEffect(()=>{Y==="touch"?x(600):Y?x(400):Y||w()},[Y]),{spinButtonProps:{role:"spinbutton","aria-valuenow":r!==void 0&&!isNaN(r)?r:void 0,"aria-valuetext":I,"aria-valuemin":a,"aria-valuemax":o,"aria-disabled":i||void 0,"aria-readonly":s||void 0,"aria-required":u||void 0,onKeyDown:b,onFocus:v,onBlur:k},incrementButtonProps:{onPressStart:te=>{D(),te.pointerType!=="touch"?(l?.(),T("mouse")):(U(window,"pointercancel",G,{capture:!0}),K.current=!1,T("touch")),U(window,"contextmenu",z)},onPressUp:te=>{D(),te.pointerType==="touch"&&(K.current=!0),P(),T(null)},onPressEnd:te=>{D(),te.pointerType==="touch"&&!_.current&&K.current&&l?.(),K.current=!1,T(null)},onFocus:v,onBlur:k},decrementButtonProps:{onPressStart:te=>{D(),te.pointerType!=="touch"?(f?.(),se("mouse")):(U(window,"pointercancel",G,{capture:!0}),K.current=!1,se("touch"))},onPressUp:te=>{D(),te.pointerType==="touch"&&(K.current=!0),P(),se(null)},onPressEnd:te=>{D(),te.pointerType==="touch"&&!_.current&&K.current&&f?.(),K.current=!1,se(null)},onFocus:v,onBlur:k}}}class QS{constructor(t,r,n,a){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=i=>{if(i.nodeType===Node.ELEMENT_NODE){const s=i.shadowRoot;if(s){const u=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(i);if(this.filter?.acceptNode)return this.filter.acceptNode(i);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=r,this.filter=a??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(t.createTreeWalker(r,n,this._acceptNode));const o=r.shadowRoot;if(o){const i=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(i)}}get currentNode(){return this._currentNode}set currentNode(t){if(!Ce(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=t,a=t;for(this._currentNode=t;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const i=n,s=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});r.push(s),s.currentNode=a,this._currentSetFor.add(s),n=a=i.host}else n=n.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(o),o.currentNode=a,this._currentSetFor.add(o),this._walkerStack=r}get doc(){return this._doc}firstChild(){let t=this.currentNode,r=this.nextNode();return Ce(t,r)?(r&&(this.currentNode=r),r):(this.currentNode=t,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){let n;if(typeof this.filter=="function"?n=this.filter(t):this.filter?.acceptNode&&(n=this.filter.acceptNode(t)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let a=this.nextNode();return a&&(this.currentNode=a),a}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null;return null}const r=t.previousNode();if(r){if(r.shadowRoot){let a;if(typeof this.filter=="function"?a=this.filter(r):this.filter?.acceptNode&&(a=this.filter.acceptNode(r)),a===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let o=this.lastChild();return o&&(this.currentNode=o),o}return r&&(this.currentNode=r),r}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function jp(e,t,r,n){return Zt()?new QS(e,t,r,n):e.createTreeWalker(t,r,n)}const Zp=d.createContext(null),Ou="react-aria-focus-scope-restore";let Fe=null;function XS(e){let{children:t,contain:r,restoreFocus:n,autoFocus:a}=e,o=d.useRef(null),i=d.useRef(null),s=d.useRef([]),{parentNode:u}=d.useContext(Zp)||{},l=d.useMemo(()=>new Uu({scopeRef:s}),[s]);$e(()=>{let p=u||je.root;if(je.getTreeNode(p.scopeRef)&&Fe&&!Mo(Fe,p.scopeRef)){let h=je.getTreeNode(Fe);h&&(p=h)}p.addChild(l),je.addNode(l)},[l,u]),$e(()=>{let p=je.getTreeNode(s);p&&(p.contain=!!r)},[r]),$e(()=>{let p=o.current?.nextSibling,h=[],g=y=>y.stopPropagation();for(;p&&p!==i.current;)h.push(p),p.addEventListener(Ou,g),p=p.nextSibling;return s.current=h,()=>{for(let y of h)y.removeEventListener(Ou,g)}},[t]),aC(s,n,r),tC(s,r),oC(s,n,r),nC(s,a),d.useEffect(()=>{const p=Ie(Se(s.current?s.current[0]:void 0));let h=null;if(Ct(p,s.current)){for(let g of je.traverse())g.scopeRef&&Ct(p,g.scopeRef.current)&&(h=g);h===je.getTreeNode(s)&&(Fe=h.scopeRef)}},[s]),$e(()=>()=>{let p=je.getTreeNode(s)?.parent?.scopeRef??null;(s===Fe||Mo(s,Fe))&&(!p||je.getTreeNode(p))&&(Fe=p),je.removeTreeNode(s)},[s]);let c=d.useMemo(()=>WS(s),[]),f=d.useMemo(()=>({focusManager:c,parentNode:l}),[l,c]);return d.createElement(Zp.Provider,{value:f},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:i}))}function WS(e){return{focusNext(t={}){let r=e.current,{from:n,tabbable:a,wrap:o,accept:i}=t,s=n||Ie(Se(r[0]??void 0)),u=r[0].previousElementSibling,l=Gr(r),c=lt(l,{tabbable:a,accept:i},r);c.currentNode=Ct(s,r)?s:u;let f=c.nextNode();return!f&&o&&(c.currentNode=u,f=c.nextNode()),f&&ut(f,!0),f},focusPrevious(t={}){let r=e.current,{from:n,tabbable:a,wrap:o,accept:i}=t,s=n||Ie(Se(r[0]??void 0)),u=r[r.length-1].nextElementSibling,l=Gr(r),c=lt(l,{tabbable:a,accept:i},r);c.currentNode=Ct(s,r)?s:u;let f=c.previousNode();return!f&&o&&(c.currentNode=u,f=c.previousNode()),f&&ut(f,!0),f},focusFirst(t={}){let r=e.current,{tabbable:n,accept:a}=t,o=Gr(r),i=lt(o,{tabbable:n,accept:a},r);i.currentNode=r[0].previousElementSibling;let s=i.nextNode();return s&&ut(s,!0),s},focusLast(t={}){let r=e.current,{tabbable:n,accept:a}=t,o=Gr(r),i=lt(o,{tabbable:n,accept:a},r);i.currentNode=r[r.length-1].nextElementSibling;let s=i.previousNode();return s&&ut(s,!0),s}}}function Gr(e){return e[0].parentElement}function ca(e){let t=je.getTreeNode(Fe);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function JS(e){if(!e.form)return Array.from(Se(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(n=>!n.form);const t=e.form.elements.namedItem(e.name);let r=nt(e);return t instanceof r.RadioNodeList?Array.from(t).filter(n=>n instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}function eC(e){if(e.checked)return!0;const t=JS(e);return t.length>0&&!t.some(r=>r.checked)}function tC(e,t){let r=d.useRef(void 0),n=d.useRef(void 0);$e(()=>{let a=e.current;if(!t){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const o=Se(a?a[0]:void 0);let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!ca(e)||l.isComposing)return;let c=Ie(o),f=e.current;if(!f||!Ct(c,f))return;let p=Gr(f),h=lt(p,{tabbable:!0},f);if(!c)return;h.currentNode=c;let g=l.shiftKey?h.previousNode():h.nextNode();g||(h.currentNode=l.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=l.shiftKey?h.previousNode():h.nextNode()),l.preventDefault(),g&&(ut(g,!0),g instanceof nt(g).HTMLInputElement&&g.select())},s=l=>{(!Fe||Mo(Fe,e))&&Ct(he(l),e.current)?(Fe=e,r.current=he(l)):ca(e)&&!mr(he(l),e)?r.current?r.current.focus():Fe&&Fe.current&&Bu(Fe.current):ca(e)&&(r.current=he(l))},u=l=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let c=oo(),f=(c==="virtual"||c===null)&&$s()&&$d(),p=Ie(o);if(!f&&p&&ca(e)&&!mr(p,e)){Fe=e;let h=he(l);h&&h.isConnected?(r.current=h,r.current?.focus()):Fe.current&&Bu(Fe.current)}})};return o.addEventListener("keydown",i,!1),o.addEventListener("focusin",s,!1),a?.forEach(l=>l.addEventListener("focusin",s,!1)),a?.forEach(l=>l.addEventListener("focusout",u,!1)),()=>{o.removeEventListener("keydown",i,!1),o.removeEventListener("focusin",s,!1),a?.forEach(l=>l.removeEventListener("focusin",s,!1)),a?.forEach(l=>l.removeEventListener("focusout",u,!1))}},[e,t]),$e(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function Gp(e){return mr(e)}function Ct(e,t){return!e||!t?!1:t.some(r=>Ce(r,e))}function mr(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of je.traverse(je.getTreeNode(t)))if(r&&Ct(e,r.current))return!0;return!1}function rC(e){return mr(e,Fe)}function Mo(e,t){let r=je.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function ut(e,t=!1){if(e!=null&&!t)try{Gn(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function qp(e,t=!0){let r=e[0].previousElementSibling,n=Gr(e),a=lt(n,{tabbable:t},e);a.currentNode=r;let o=a.nextNode();return t&&!o&&(n=Gr(e),a=lt(n,{tabbable:!1},e),a.currentNode=r,o=a.nextNode()),o}function Bu(e,t=!0){ut(qp(e,t))}function nC(e,t){const r=d.useRef(t);d.useEffect(()=>{if(r.current){Fe=e;const n=Se(e.current?e.current[0]:void 0);!Ct(Ie(n),Fe.current)&&e.current&&Bu(e.current)}r.current=!1},[e])}function aC(e,t,r){$e(()=>{if(t||r)return;let n=e.current;const a=Se(n?n[0]:void 0);let o=i=>{let s=he(i);Ct(s,e.current)?Fe=e:Gp(s)||(Fe=null)};return a.addEventListener("focusin",o,!1),n?.forEach(i=>i.addEventListener("focusin",o,!1)),()=>{a.removeEventListener("focusin",o,!1),n?.forEach(i=>i.removeEventListener("focusin",o,!1))}},[e,t,r])}function Kp(e){let t=je.getTreeNode(Fe);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function oC(e,t,r){const n=d.useRef(typeof document<"u"?Ie(Se(e.current?e.current[0]:void 0)):null);$e(()=>{let a=e.current;const o=Se(a?a[0]:void 0);if(!t||r)return;let i=()=>{(!Fe||Mo(Fe,e))&&Ct(Ie(o),e.current)&&(Fe=e)};return o.addEventListener("focusin",i,!1),a?.forEach(s=>s.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),a?.forEach(s=>s.removeEventListener("focusin",i,!1))}},[e,r]),$e(()=>{const a=Se(e.current?e.current[0]:void 0);if(!t)return;let o=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!ca(e)||i.isComposing)return;let s=a.activeElement;if(!mr(s,e)||!Kp(e))return;let u=je.getTreeNode(e);if(!u)return;let l=u.nodeToRestore,c=lt(a.body,{tabbable:!0});c.currentNode=s;let f=i.shiftKey?c.previousNode():c.nextNode();if((!l||!l.isConnected||l===a.body)&&(l=void 0,u.nodeToRestore=void 0),(!f||!mr(f,e))&&l){c.currentNode=l;do f=i.shiftKey?c.previousNode():c.nextNode();while(mr(f,e));i.preventDefault(),i.stopPropagation(),f?ut(f,!0):Gp(l)?ut(l,!0):s.blur()}};return r||a.addEventListener("keydown",o,!0),()=>{r||a.removeEventListener("keydown",o,!0)}},[e,t,r]),$e(()=>{const a=Se(e.current?e.current[0]:void 0);if(!t)return;let o=je.getTreeNode(e);if(o)return o.nodeToRestore=n.current??void 0,()=>{let i=je.getTreeNode(e);if(!i)return;let s=i.nodeToRestore,u=Ie(a);if(t&&s&&(u&&mr(u,e)||u===a.body&&Kp(e))){let l=je.clone();requestAnimationFrame(()=>{if(a.activeElement===a.body){let c=l.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){Yp(c.nodeToRestore);return}c=c.parent}for(c=l.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&je.getTreeNode(c.scopeRef)){let f=qp(c.scopeRef.current,!0);Yp(f);return}c=c.parent}}})}}},[e,t])}function Yp(e){e.dispatchEvent(new CustomEvent(Ou,{bubbles:!0,cancelable:!0}))&&ut(e)}function lt(e,t,r){let n=t?.tabbable?gE:Ed,a=e?.nodeType===Node.ELEMENT_NODE?e:null,o=Se(a),i=jp(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return Ce(t?.from,s)||t?.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!eC(s)||i.currentNode.tagName==="INPUT"&&i.currentNode.type==="radio"&&i.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:n(s)&&(!r||Ct(s,r))&&(!t?.accept||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function Lu(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,u=a||Ie(Se(n)),l=lt(n,{tabbable:o,accept:s});Ce(n,u)&&(l.currentNode=u);let c=l.nextNode();return!c&&i&&(l.currentNode=n,c=l.nextNode()),c&&ut(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,u=a||Ie(Se(n)),l=lt(n,{tabbable:o,accept:s});if(Ce(n,u))l.currentNode=u;else{let f=Ru(l);return f&&ut(f,!0),f??null}let c=l.previousNode();if(!c&&i){l.currentNode=n;let f=Ru(l);if(!f)return null;c=f}return c&&ut(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=r,s=lt(n,{tabbable:a,accept:o}).nextNode();return s&&ut(s,!0),s},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=r,i=lt(n,{tabbable:a,accept:o}),s=Ru(i);return s&&ut(s,!0),s??null}}}function Ru(e){let t,r;do r=e.lastChild(),r&&(t=r);while(r);return t}class Nu{constructor(){this.fastMap=new Map,this.root=new Uu({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,n){let a=this.fastMap.get(r??null);if(!a)return;let o=new Uu({scopeRef:t});a.addChild(o),o.parent=a,this.fastMap.set(t,o),n&&(o.nodeToRestore=n)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t);if(!r)return;let n=r.parent;for(let o of this.traverse())o!==r&&r.nodeToRestore&&o.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&Ct(o.nodeToRestore,r.scopeRef.current)&&(o.nodeToRestore=r.nodeToRestore);let a=r.children;n&&(n.removeChild(r),a.size>0&&a.forEach(o=>n&&n.addChild(o))),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){let t=new Nu;for(let r of this.traverse())t.addTreeNode(r.scopeRef,r.parent?.scopeRef??null,r.nodeToRestore);return t}}class Uu{constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}}let je=new Nu,Hu=new Map;function iC(e){let{locale:t}=Je(),r=t+(e?Object.entries(e).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(Hu.has(r))return Hu.get(r);let n=new Intl.Collator(t,e);return Hu.set(r,n),n}const sC=d.createContext({placement:"bottom"}),uC=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Qp(e){return e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer!==void 0}let da=new WeakMap,ct=[];function lC(e,t){let r=nt(e?.[0]),n=t instanceof r.Element?{root:t}:t,a=n?.root??document.body,o=n?.shouldUseInert&&uC,i=new Set(e),s=new Set,u=_=>o&&_ instanceof r.HTMLElement?_.inert:_.getAttribute("aria-hidden")==="true",l=(_,D)=>{o&&_ instanceof r.HTMLElement?_.inert=D:D?_.setAttribute("aria-hidden","true"):(_.removeAttribute("aria-hidden"),_ instanceof r.HTMLElement&&(_.inert=!1))},c=new Set;if(Zt())for(let _ of e){let D=_;for(;D&&D!==a;){let w=D.getRootNode();"shadowRoot"in w&&c.add(w.shadowRoot),D=w.parentNode}}let f=_=>{for(let C of _.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))i.add(C);let D=C=>{if(s.has(C)||i.has(C)||C.parentElement&&s.has(C.parentElement)&&C.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let v of i)if(Ce(C,v))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},w=jp(Se(_),_,NodeFilter.SHOW_ELEMENT,{acceptNode:D}),b=D(_);if(b===NodeFilter.FILTER_ACCEPT&&p(_),b!==NodeFilter.FILTER_REJECT){let C=w.nextNode();for(;C!=null;)p(C),C=w.nextNode()}},p=_=>{let D=da.get(_)??0;u(_)&&D===0||(D===0&&l(_,!0),s.add(_),da.set(_,D+1))};ct.length&&ct[ct.length-1].disconnect(),f(a);let h=new MutationObserver(_=>{for(let D of _)if(D.type==="childList"){if(D.target.isConnected&&![...i,...s].some(w=>Ce(w,D.target)))for(let w of D.addedNodes)(w instanceof HTMLElement||w instanceof SVGElement)&&Qp(w)?i.add(w):w instanceof Element&&f(w);if(Zt()){for(let w of c)if(!w.isConnected){h.disconnect();break}}}});h.observe(a,{childList:!0,subtree:!0});let g=new Set;if(Zt())for(let _ of c){let D=new MutationObserver(w=>{for(let b of w)if(b.type==="childList"){if(b.target.isConnected&&![...i,...s].some(C=>Ce(C,b.target)))for(let C of b.addedNodes)(C instanceof HTMLElement||C instanceof SVGElement)&&Qp(C)?i.add(C):C instanceof Element&&f(C);if(Zt()){for(let C of c)if(!C.isConnected){h.disconnect();break}}}});D.observe(_,{childList:!0,subtree:!0}),g.add(D)}let y={visibleNodes:i,hiddenNodes:s,observe(){h.observe(a,{childList:!0,subtree:!0})},disconnect(){h.disconnect()}};return ct.push(y),()=>{if(h.disconnect(),Zt())for(let _ of g)_.disconnect();for(let _ of s){let D=da.get(_);D!=null&&(D===1?(l(_,!1),da.delete(_)):da.set(_,D-1))}y===ct[ct.length-1]?(ct.pop(),ct.length&&ct[ct.length-1].observe()):ct.splice(ct.indexOf(y),1)}}function cC(e){let t=ct[ct.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}const wt={top:"top",bottom:"top",left:"left",right:"left"},Fo={top:"bottom",bottom:"top",left:"right",right:"left"},dC={top:"left",left:"top"},Vu={top:"height",left:"width"},Xp={width:"totalWidth",height:"totalHeight"},Oo={};let fC=()=>typeof document<"u"?window.visualViewport:null;function Wp(e,t){let r=0,n=0,a=0,o=0,i=0,s=0,u={},l=(t?.scale??1)>1;if(e.tagName==="BODY"||e.tagName==="HTML"){let c=document.documentElement;a=c.clientWidth,o=c.clientHeight,r=t?.width??a,n=t?.height??o,u.top=c.scrollTop||e.scrollTop,u.left=c.scrollLeft||e.scrollLeft,t&&(i=t.offsetTop,s=t.offsetLeft)}else({width:r,height:n,top:i,left:s}=fa(e,!1)),u.top=e.scrollTop,u.left=e.scrollLeft,a=r,o=n;return xd()&&(e.tagName==="BODY"||e.tagName==="HTML")&&l&&(u.top=0,u.left=0,i=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:a,totalHeight:o,scroll:u,top:i,left:s}}function mC(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function Jp(e,t,r,n,a,o,i){let s=a.scroll[e]??0,u=n[Vu[e]],l=i[e]+n.scroll[wt[e]]+o,c=i[e]+n.scroll[wt[e]]+u-o,f=t-s+n.scroll[wt[e]]+i[e]-n[wt[e]],p=t-s+r+n.scroll[wt[e]]+i[e]-n[wt[e]];return f<l?l-f:p>c?Math.max(c-p,l-f):0}function pC(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function eh(e){if(Oo[e])return Oo[e];let[t,r]=e.split(" "),n=wt[t]||"right",a=dC[n];wt[r]||(r="center");let o=Vu[n],i=Vu[a];return Oo[e]={placement:t,crossPlacement:r,axis:n,crossAxis:a,size:o,crossSize:i},Oo[e]}function zu(e,t,r,n,a,o,i,s,u,l,c){let{placement:f,crossPlacement:p,axis:h,crossAxis:g,size:y,crossSize:_}=n,D={};D[g]=e[g]??0,p==="center"?D[g]+=((e[_]??0)-(r[_]??0))/2:p!==g&&(D[g]+=(e[_]??0)-(r[_]??0)),D[g]+=o;const w=e[g]-r[_]+u+l,b=e[g]+e[_]-u-l;if(D[g]=qs(D[g],w,b),f===h){let C=s?c[y]:c[Xp[y]];D[Fo[h]]=Math.floor(C-e[h]+a)}else D[h]=Math.floor(e[h]+e[y]+a);return D}function hC(e,t,r,n,a,o,i,s,u,l,c){let f=(e.top!=null?e.top:u[Xp.height]-(e.bottom??0)-i)-(u.scroll.top??0),p=l?r.top:0,h={top:Math.max(t.top+p,(c?.offsetTop??t.top)+p),bottom:Math.min(t.top+t.height+p,(c?.offsetTop??0)+(c?.height??0))};return s!=="top"?Math.max(0,h.bottom-f-((a.top??0)+(a.bottom??0)+o)):Math.max(0,f+i-h.top-((a.top??0)+(a.bottom??0)+o))}function th(e,t,r,n,a,o,i,s){let{placement:u,axis:l,size:c}=o;return u===l?Math.max(0,r[l]-(i.scroll[l]??0)-(e[l]+(s?t[l]:0))-(n[l]??0)-n[Fo[l]]-a):Math.max(0,e[c]+e[l]+(s?t[l]:0)-r[l]-r[c]+(i.scroll[l]??0)-(n[l]??0)-n[Fo[l]]-a)}function gC(e,t,r,n,a,o,i,s,u,l,c,f,p,h,g,y,_,D){let w=eh(e),{size:b,crossAxis:C,crossSize:v,placement:k,crossPlacement:I}=w,G=zu(t,s,r,w,c,f,l,p,g,y,u),O=c,Z=th(s,l,t,a,o+c,w,u,_);if(i&&r[b]>Z){let Q=eh(`${Fo[k]} ${I}`),A=zu(t,s,r,Q,c,f,l,p,g,y,u);th(s,l,t,a,o+c,Q,u,_)>Z&&(w=Q,G=A,O=c)}let M="bottom";w.axis==="top"?w.placement==="top"?M="top":w.placement==="bottom"&&(M="bottom"):w.crossAxis==="top"&&(w.crossPlacement==="top"?M="bottom":w.crossPlacement==="bottom"&&(M="top"));let X=Jp(C,G[C],r[v],s,u,o,l);G[C]+=X;let de=hC(G,s,l,p,a,o,r.height,M,u,_,D);h&&h<de&&(de=h),r.height=Math.min(r.height,de),G=zu(t,s,r,w,O,f,l,p,g,y,u),X=Jp(C,G[C],r[v],s,u,o,l),G[C]+=X;let x={},z=t[C]-G[C]-a[wt[C]],U=z+.5*t[v];const P=g/2+y,K=wt[C]==="left"?(a.left??0)+(a.right??0):(a.top??0)+(a.bottom??0),$=r[v]-K-g/2-y,T=t[C]+g/2-(G[C]+a[wt[C]]),Y=t[C]+t[v]-g/2-(G[C]+a[wt[C]]),se=qs(U,T,Y);x[C]=qs(se,P,$),{placement:k,crossPlacement:I}=w,g?z=x[C]:I==="right"?z+=t[v]:I==="center"&&(z+=t[v]/2);let te=k==="left"||k==="top"?r[b]:0,H={x:k==="top"||k==="bottom"?z:te,y:k==="left"||k==="right"?z:te};return{position:G,maxHeight:de,arrowOffsetLeft:x.left,arrowOffsetTop:x.top,placement:k,triggerAnchorPoint:H}}function yC(e){let{placement:t,targetNode:r,overlayNode:n,scrollNode:a,padding:o,shouldFlip:i,boundaryElement:s,offset:u,crossOffset:l,maxHeight:c,arrowSize:f=0,arrowBoundaryOffset:p=0,targetRect:h}=e,g=fC(),y=n instanceof HTMLElement?bC(n):document.documentElement,_=y===document.documentElement;const D=window.getComputedStyle(y).position;let w=!!D&&D!=="static",b=_?fa(r,!1,h):rh(r,y,!1,h);if(!_){let{marginTop:M,marginLeft:X}=window.getComputedStyle(r);b.top+=parseInt(M,10)||0,b.left+=parseInt(X,10)||0}let C=fa(n,!0),v=pC(n);C.width+=(v.left??0)+(v.right??0),C.height+=(v.top??0)+(v.bottom??0);let k=mC(a),I=Wp(s,g),G=Wp(y,g),O;if((s.tagName==="BODY"||s.tagName==="HTML")&&!_){let M=Bo(y,!1);O={top:-(M.top-I.top),left:-(M.left-I.left),width:0,height:0}}else(s.tagName==="BODY"||s.tagName==="HTML")&&_?O={top:0,left:0,width:0,height:0}:O=rh(s,y,!1);let Z=Ce(s,y);return gC(t,b,C,k,v,o,i,I,G,O,u,l,w,c,f,p,Z,g)}function Bo(e,t){let{top:r,left:n,width:a,height:o}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(a=e.offsetWidth,o=e.offsetHeight),{top:r,left:n,width:a,height:o}}function fa(e,t,r){let{top:n,left:a,width:o,height:i}=r||Bo(e,t),{scrollTop:s,scrollLeft:u,clientTop:l,clientLeft:c}=document.documentElement;return{top:n+s-l,left:a+u-c,width:o,height:i}}function rh(e,t,r,n){let a=window.getComputedStyle(e),o;if(a.position==="fixed")o=n||Bo(e,r);else{o=fa(e,r,n);let i=fa(t,r),s=window.getComputedStyle(t);i.top+=(parseInt(s.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(s.borderLeftWidth,10)||0)-t.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(a.marginTop,10)||0,o.left-=parseInt(a.marginLeft,10)||0,o}function bC(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!nh(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!nh(t);)t=t.parentElement;return t||document.documentElement}function nh(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const _C=new WeakMap;function vC(e){let{triggerRef:t,isOpen:r,onClose:n}=e;d.useEffect(()=>{if(!r||n===null)return;let a=o=>{let i=he(o);if(!t.current||i instanceof Node&&!Ce(i,t.current)||i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)return;let s=n||_C.get(t.current);s&&s()};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[r,n,t])}function EC(){return typeof window.ResizeObserver<"u"}function ju(e){const{ref:t,box:r,onResize:n}=e;let a=qe(n);d.useEffect(()=>{let o=t?.current;if(o)if(EC()){const i=new window.ResizeObserver(s=>{s.length&&a()});return i.observe(o,{box:r}),()=>{o&&i.unobserve(o)}}else return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}},[t,r])}let qr=typeof document<"u"?window.visualViewport:null;function DC(e){let{direction:t}=Je(),{arrowSize:r,targetRef:n,overlayRef:a,arrowRef:o,scrollRef:i=a,placement:s="bottom",containerPadding:u=12,shouldFlip:l=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:_,arrowBoundaryOffset:D=0,getTargetRect:w}=e,[b,C]=d.useState(null),v=[h,s,a.current,n.current,o?.current,i.current,u,l,c,f,p,g,t,_,D,r],k=d.useRef(qr?.scale);d.useEffect(()=>{g&&(k.current=qr?.scale)},[g]);let I=d.useCallback(()=>{if(h===!1||!g||!a.current||!n.current||!c||qr?.scale!==k.current)return;let Z=null;if(i.current&&Ds(i.current)){let x=Ie()?.getBoundingClientRect(),z=i.current.getBoundingClientRect();Z={type:"top",offset:(x?.top??0)-z.top},Z.offset>z.height/2&&(Z.type="bottom",Z.offset=(x?.bottom??0)-z.bottom)}let M=a.current;!_&&a.current&&(M.style.top="0px",M.style.bottom="",M.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let X=yC({placement:CC(s,t),overlayNode:a.current,targetNode:n.current,scrollNode:i.current||a.current,padding:u,shouldFlip:l,boundaryElement:c,offset:f,crossOffset:p,maxHeight:_,arrowSize:r??(o?.current?Bo(o.current,!0).width:0),arrowBoundaryOffset:D,targetRect:w?.(n.current)});if(!X.position)return;M.style.top="",M.style.bottom="",M.style.left="",M.style.right="",Object.keys(X.position).forEach(x=>M.style[x]=X.position[x]+"px"),M.style.maxHeight=X.maxHeight!=null?X.maxHeight+"px":"";let de=Ie();if(Z&&de&&i.current){let x=de.getBoundingClientRect(),z=i.current.getBoundingClientRect(),U=x[Z.type]-z[Z.type];i.current.scrollTop+=U-Z.offset}C(X)},v);$e(I,v),SC(I),ju({ref:a,onResize:I}),ju({ref:n,onResize:I});let G=d.useRef(!1);$e(()=>{let Z,M=()=>{G.current=!0,clearTimeout(Z),Z=setTimeout(()=>{G.current=!1},500),I()},X=()=>{G.current&&M()};return qr?.addEventListener("resize",M),qr?.addEventListener("scroll",X),()=>{qr?.removeEventListener("resize",M),qr?.removeEventListener("scroll",X)}},[I]);let O=d.useCallback(()=>{G.current||y?.()},[y,G]);return vC({triggerRef:n,isOpen:g,onClose:y&&O}),{overlayProps:{style:{position:b?"absolute":"fixed",top:b?void 0:0,left:b?void 0:0,zIndex:1e5,...b?.position,maxHeight:b?.maxHeight??"100vh"}},placement:b?.placement??null,triggerAnchorPoint:b?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:b?.arrowOffsetLeft,top:b?.arrowOffsetTop}},updatePosition:I}}function SC(e){$e(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function CC(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}function wC(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:a}=e,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=qe(u=>{r&&ah(u,t)&&(a&&a(u),o.current.isPointerDown=!0)}),s=qe(u=>{r&&r(u)});d.useEffect(()=>{let u=o.current;if(n)return;const l=t.current,c=Se(l);if(typeof PointerEvent<"u"){let f=p=>{u.isPointerDown&&ah(p,t)&&s(p),u.isPointerDown=!1};return c.addEventListener("pointerdown",i,!0),c.addEventListener("click",f,!0),()=>{c.removeEventListener("pointerdown",i,!0),c.removeEventListener("click",f,!0)}}},[t,n])}function ah(e,t){if(e.button>0)return!1;let r=he(e);if(r){const n=r.ownerDocument;if(!n||!Ce(n.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const Ot=[];function xC(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:a,isDismissable:o=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e,u=d.useRef(void 0);d.useEffect(()=>{if(a&&!Ot.includes(t))return Ot.push(t),()=>{let g=Ot.indexOf(t);g>=0&&Ot.splice(g,1)}},[a,t]);let l=()=>{Ot[Ot.length-1]===t&&r&&r()},c=g=>{const y=Ot[Ot.length-1];u.current=y,(!s||s(he(g)))&&y===t&&g.stopPropagation()},f=g=>{(!s||s(he(g)))&&(Ot[Ot.length-1]===t&&g.stopPropagation(),u.current===t&&l()),u.current=void 0},p=g=>{g.key==="Escape"&&!i&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),l())};wC({ref:t,onInteractOutside:o&&a?f:void 0,onInteractOutsideStart:c});let{focusWithinProps:h}=qn({isDisabled:!n,onBlurWithin:g=>{!g.relatedTarget||rC(g.relatedTarget)||(!s||s(g.relatedTarget))&&r?.()}});return{overlayProps:{onKeyDown:p,...h},underlayProps:{}}}const ma=typeof document<"u"&&window.visualViewport;let Lo=0,Zu;function $C(e={}){let{isDisabled:t}=e;$e(()=>{if(!t)return Lo++,Lo===1&&(Hn()?Zu=kC():Zu=AC()),()=>{Lo--,Lo===0&&Zu()}},[t])}function AC(){let e=window.innerWidth-document.documentElement.clientWidth;return Qa(e>0&&("scrollbarGutter"in document.documentElement.style?Ro(document.documentElement,"scrollbarGutter","stable"):Ro(document.documentElement,"paddingRight",`${e}px`)),Ro(document.documentElement,"overflow","hidden"))}function kC(){let e=Ro(document.documentElement,"overflow","hidden"),t,r=!1,n=c=>{let f=he(c);t=$o(f)?f:Ao(f,!0),r=!1;let p=f.ownerDocument.defaultView.getSelection();p&&!p.isCollapsed&&p.containsNode(f,!0)&&(r=!0),c.composedPath().some(h=>h instanceof HTMLInputElement&&h.type==="range")&&(r=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(r=!0)},a=document.createElement("style"),o=Xd();o&&(a.nonce=o),a.textContent=`
31
31
  @layer {
32
32
  * {
33
33
  overscroll-behavior: contain;
34
34
  }
35
- }`.trim(),document.head.prepend(a);let i=c=>{if(!(c.touches.length===2||r)){if(!t||t===document.documentElement||t===document.body){c.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&c.preventDefault()}},s=c=>{let f=he(c),p=c.relatedTarget;p&&Is(p)?(p.focus({preventScroll:!0}),oh(p,Is(f))):p||f.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},u=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(c){let f=Ie(),p=f!=null&&Is(f);u.call(this,{...c,preventScroll:!0}),(!c||!c.preventScroll)&&oh(this,p)};let l=Qa(Gu(document,"touchstart",n,{passive:!1,capture:!0}),Gu(document,"touchmove",i,{passive:!1,capture:!0}),Gu(document,"blur",s,!0));return()=>{e(),l(),a.remove(),HTMLElement.prototype.focus=u}}function Ro(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function Gu(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function oh(e,t){t||!pa?ih(e):pa.addEventListener("resize",()=>ih(e),{once:!0})}function ih(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let n=Ao(r);if(n!==document.documentElement&&n!==document.body&&n!==r){let a=n.getBoundingClientRect(),o=r.getBoundingClientRect();if(o.top<a.top||o.bottom>a.top+r.clientHeight){let i=a.bottom;pa&&(i=Math.min(i,pa.offsetTop+pa.height));let s=o.top-a.top-((i-a.top)/2-o.height/2);n.scrollTo({top:Math.max(0,Math.min(n.scrollHeight-n.clientHeight,n.scrollTop+s)),behavior:"smooth"})}}r=n.parentElement}}function kC(e,t){let{triggerRef:r,popoverRef:n,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...u}=e,l=u.trigger==="SubmenuTrigger",{overlayProps:c,underlayProps:f}=wC({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||l,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},a??n),{overlayProps:p,arrowProps:h,placement:g,triggerAnchorPoint:y}=EC({...u,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:o&&!l?t.close:null});return xC({isDisabled:o||!t.isOpen}),d.useEffect(()=>{if(t.isOpen&&n.current)return o?lC(a?.current??n.current):uC([a?.current??n.current],{shouldUseInert:!0})},[o,t.isOpen,n,a]),{popoverProps:Ae(c,p),arrowProps:h,underlayProps:f,placement:g,triggerAnchorPoint:y}}var sh={};sh={dismiss:"تجاهل"};var uh={};uh={dismiss:"Отхвърляне"};var lh={};lh={dismiss:"Odstranit"};var ch={};ch={dismiss:"Luk"};var dh={};dh={dismiss:"Schließen"};var fh={};fh={dismiss:"Απόρριψη"};var mh={};mh={dismiss:"Dismiss"};var ph={};ph={dismiss:"Descartar"};var hh={};hh={dismiss:"Lõpeta"};var gh={};gh={dismiss:"Hylkää"};var yh={};yh={dismiss:"Rejeter"};var bh={};bh={dismiss:"התעלם"};var _h={};_h={dismiss:"Odbaci"};var vh={};vh={dismiss:"Elutasítás"};var Eh={};Eh={dismiss:"Ignora"};var Dh={};Dh={dismiss:"閉じる"};var Sh={};Sh={dismiss:"무시"};var Ch={};Ch={dismiss:"Atmesti"};var wh={};wh={dismiss:"Nerādīt"};var xh={};xh={dismiss:"Lukk"};var $h={};$h={dismiss:"Negeren"};var Ah={};Ah={dismiss:"Zignoruj"};var kh={};kh={dismiss:"Descartar"};var Th={};Th={dismiss:"Dispensar"};var Ph={};Ph={dismiss:"Revocare"};var Ih={};Ih={dismiss:"Пропустить"};var Mh={};Mh={dismiss:"Zrušiť"};var Fh={};Fh={dismiss:"Opusti"};var Oh={};Oh={dismiss:"Odbaci"};var Bh={};Bh={dismiss:"Avvisa"};var Lh={};Lh={dismiss:"Kapat"};var Rh={};Rh={dismiss:"Скасувати"};var Nh={};Nh={dismiss:"取消"};var Uh={};Uh={dismiss:"關閉"};var Hh={};Hh={"ar-AE":sh,"bg-BG":uh,"cs-CZ":lh,"da-DK":ch,"de-DE":dh,"el-GR":fh,"en-US":mh,"es-ES":ph,"et-EE":hh,"fi-FI":gh,"fr-FR":yh,"he-IL":bh,"hr-HR":_h,"hu-HU":vh,"it-IT":Eh,"ja-JP":Dh,"ko-KR":Sh,"lt-LT":Ch,"lv-LV":wh,"nb-NO":xh,"nl-NL":$h,"pl-PL":Ah,"pt-BR":kh,"pt-PT":Th,"ro-RO":Ph,"ru-RU":Ih,"sk-SK":Mh,"sl-SI":Fh,"sr-SP":Oh,"sv-SE":Bh,"tr-TR":Lh,"uk-UA":Rh,"zh-CN":Nh,"zh-TW":Uh};function TC(e){return e&&e.__esModule?e.default:e}function Vh(e){let{onDismiss:t,...r}=e,n=sr(TC(Hh),"@react-aria/overlays"),a=jn(r,n.format("dismiss")),o=()=>{t&&t()};return d.createElement(Pu,null,d.createElement("button",{...a,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}function PC({children:e}){let t=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(Rs.Provider,{value:t},e)}const IC=d.createContext({});function MC(){return d.useContext(IC)??{}}const zh=d.createContext(null);function jh(e){let t=_s(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[a,o]=d.useState(!1),i=d.useMemo(()=>({contain:a,setContain:o}),[a,o]),{getContainer:s}=MC();if(!e.portalContainer&&s&&(r=s()),!r)return null;let u=e.children;return e.disableFocusManagement||(u=d.createElement(QS,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!n},u)),u=d.createElement(zh.Provider,{value:i},d.createElement(PC,null,u)),Vl.createPortal(u,r)}function FC(){let t=d.useContext(zh)?.setContain;$e(()=>{t?.(!0)},[t])}function Zh(e){let[t,r]=Gn(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const n=d.useCallback(()=>{r(!0)},[r]),a=d.useCallback(()=>{r(!1)},[r]),o=d.useCallback(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:a,toggle:o}}function OC(e,t=!0){let[r,n]=d.useState(!0),a=r&&t;return $e(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let o of e.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[e,a]),Gh(e,a,d.useCallback(()=>n(!1),[])),a}function BC(e,t){let[r,n]=d.useState(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open");break}let a=r==="exiting";return Gh(e,a,d.useCallback(()=>{n(o=>o==="exiting"?"closed":o)},[])),a}function Gh(e,t,r){$e(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){r();return}let n=e.current.getAnimations();if(n.length===0){r();return}let a=!1;return Promise.allSettled(n.map(o=>o.finished)).then(()=>{a||Vl.flushSync(()=>{r()})}),()=>{a=!0}}},[e,t,r])}const qh=d.createContext(null),Kh=d.createContext(null),LC=d.forwardRef(function(t,r){[t,r]=jt(t,r,qh);let n=d.useContext(qu),a=Zh(t),o=t.isOpen!=null||t.defaultOpen!=null||!n?a:n,i=BC(r,o.isOpen)||t.isExiting||!1,s=ZE(),{direction:u}=Je();if(s){let l=t.children;return typeof l=="function"&&(l=l({trigger:t.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!i?null:d.createElement(RC,{...t,triggerRef:t.triggerRef,state:o,popoverRef:r,isExiting:i,dir:u})});function RC({state:e,isExiting:t,UNSTABLE_portalContainer:r,clearContexts:n,...a}){let o=d.useRef(null),i=d.useRef(null),s=d.useContext(Kh),u=s&&a.trigger==="SubmenuTrigger",{popoverProps:l,underlayProps:c,arrowProps:f,placement:p,triggerAnchorPoint:h}=kC({...a,offset:a.offset??8,arrowRef:o,groupRef:u?s:i},e),g=a.popoverRef,y=OC(g,!!p)||a.isEntering||!1,_=zt({...a,defaultClassName:"react-aria-Popover",values:{trigger:a.trigger||null,placement:p,isEntering:y,isExiting:t}}),D=!a.isNonModal||a.trigger==="SubmenuTrigger",[w,b]=d.useState(!1);$e(()=>{g.current&&b(D&&!g.current.querySelector("[role=dialog]"))},[g,D]),d.useEffect(()=>{w&&(a.trigger!=="SubmenuTrigger"||oo()!=="pointer")&&g.current&&!Ds(g.current)&&qn(g.current)},[w,g,a.trigger]);let C=d.useMemo(()=>{let Z=_.children;if(n)for(let M of n)Z=d.createElement(M.Provider,{value:null},Z);return Z},[_.children,n]),[v,k]=d.useState(null),I=d.useCallback(()=>{a.triggerRef.current&&k(a.triggerRef.current.getBoundingClientRect().width+"px")},[a.triggerRef]);$e(I,[I]),ju({ref:_.style?.["--trigger-width"]?void 0:a.triggerRef,onResize:I});let G={...l.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,..._.style,"--trigger-width":_.style?.["--trigger-width"]||v},O=d.createElement(st.div,{...Ae(et(a,{global:!0}),l),..._,role:w?"dialog":void 0,tabIndex:w?-1:void 0,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],ref:g,slot:a.slot||void 0,style:G,dir:a.dir,"data-trigger":a.trigger,"data-placement":p,"data-entering":y||void 0,"data-exiting":t||void 0},!a.isNonModal&&d.createElement(Vh,{onDismiss:e.close}),d.createElement(iC.Provider,{value:{...f,placement:p,ref:o}},C),d.createElement(Vh,{onDismiss:e.close}));return u?d.createElement(jh,{...a,shouldContainFocus:w,isExiting:t,portalContainer:r??s?.current??void 0},O):d.createElement(jh,{...a,shouldContainFocus:w,isExiting:t,portalContainer:r},!a.isNonModal&&e.isOpen&&d.createElement("div",{"data-testid":"underlay",...c,style:{position:"fixed",inset:0}}),d.createElement("div",{ref:i,style:{display:"contents"}},d.createElement(Kh.Provider,{value:i},O)))}function NC(e,t){let{role:r="dialog"}=e,n=Xa();n=e["aria-label"]?void 0:n;let a=d.useRef(!1);return d.useEffect(()=>{if(t.current&&!Ds(t.current)){qn(t.current);let o=setTimeout(()=>{(Ie()===t.current||Ie()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),qn(t.current)),a.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),FC(),d.useRef(!1),d.useEffect(()=>{}),{dialogProps:{...et(e,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||n,onBlur:o=>{a.current&&o.stopPropagation()}},titleProps:{id:n}}}const Yh=d.createContext(null),qu=d.createContext(null),UC=d.forwardRef(function(t,r){let n=t["aria-labelledby"];[t,r]=jt(t,r,Yh);let{dialogProps:a,titleProps:o}=NC({...t,"aria-labelledby":n},r),i=d.useContext(qu);!a["aria-label"]&&!a["aria-labelledby"]&&t["aria-labelledby"]&&(a["aria-labelledby"]=t["aria-labelledby"]);let s=zt({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:i?.close||(()=>{})}}),u=et(t,{global:!0});return d.createElement(st.section,{...Ae(u,s,a),render:t.render,ref:r,slot:t.slot||void 0},d.createElement(Wa,{values:[[Ys,{slots:{[Es]:{},title:{...o,level:2}}}],[Xn,{slots:{[Es]:{},close:{onPress:()=>i?.close()}}}]]},s.children))});function HC(e){let t=oC({usage:"search",...e}),r=d.useCallback((o,i)=>i.length===0?!0:(o=o.normalize("NFC"),i=i.normalize("NFC"),t.compare(o.slice(0,i.length),i)===0),[t]),n=d.useCallback((o,i)=>i.length===0?!0:(o=o.normalize("NFC"),i=i.normalize("NFC"),t.compare(o.slice(-i.length),i)===0),[t]),a=d.useCallback((o,i)=>{if(i.length===0)return!0;o=o.normalize("NFC"),i=i.normalize("NFC");let s=0,u=i.length;for(;s+u<=o.length;s++){let l=o.slice(s,s+u);if(t.compare(i,l)===0)return!0}return!1},[t]);return d.useMemo(()=>({startsWith:r,endsWith:n,contains:a}),[r,n,a])}const VC=["day","month","year"],zC={hour:1,minute:2,second:3};function jC(e,t){let{autoComplete:r,isDisabled:n,name:a}=e,{visuallyHiddenProps:o}=Xm({style:{position:"fixed",top:0,left:0}}),i=60;t.granularity==="second"?i=1:t.granularity==="hour"&&(i=3600);let s="";t.value&&(t.granularity==="day"?s=ot(t.value).toString():s=Kt("timeZone"in t.value?ID(t.value):t.value).toString());let u=t.granularity==="day"?"date":"datetime-local",l=["hour","minute","second"],c=0;return l.includes(t.granularity)&&(c=zC[t.granularity],l=l.slice(0,c)),{containerProps:{...o,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{tabIndex:-1,autoComplete:r,disabled:n,type:u,form:"",name:a,step:i,value:s,onChange:f=>{let p=he(f).value.toString();if(p)try{let h=HD(p);if(t.granularity==="day"&&(h=bm(p)),"setSegment"in t)for(let g in h)VC.includes(g)&&t.setSegment(g,h[g]),l.includes(g)&&t.setSegment(g,h[g]);t.setValue(h)}catch{}}}}}function ZC(e){let{state:t}=e,{containerProps:r,inputProps:n}=jC({...e},t);return d.createElement("div",{...r,"data-testid":"hidden-dateinput-container"},d.createElement("input",n))}var Qh={};Qh={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var Xh={};Xh={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var Wh={};Wh={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var Jh={};Jh={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var e0={};e0={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var t0={};t0={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var r0={};r0={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var n0={};n0={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var a0={};a0={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var o0={};o0={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var i0={};i0={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var s0={};s0={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var u0={};u0={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var l0={};l0={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var c0={};c0={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var d0={};d0={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var f0={};f0={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var m0={};m0={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var p0={};p0={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var h0={};h0={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var g0={};g0={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var y0={};y0={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var b0={};b0={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var _0={};_0={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var v0={};v0={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var E0={};E0={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var D0={};D0={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var S0={};S0={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var C0={};C0={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var w0={};w0={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var x0={};x0={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var $0={};$0={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var A0={};A0={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var k0={};k0={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var No={};No={"ar-AE":Qh,"bg-BG":Xh,"cs-CZ":Wh,"da-DK":Jh,"de-DE":e0,"el-GR":t0,"en-US":r0,"es-ES":n0,"et-EE":a0,"fi-FI":o0,"fr-FR":i0,"he-IL":s0,"hr-HR":u0,"hu-HU":l0,"it-IT":c0,"ja-JP":d0,"ko-KR":f0,"lt-LT":m0,"lv-LV":p0,"nb-NO":h0,"nl-NL":g0,"pl-PL":y0,"pt-BR":b0,"pt-PT":_0,"ro-RO":v0,"ru-RU":E0,"sk-SK":D0,"sl-SI":S0,"sr-SP":C0,"sv-SE":w0,"tr-TR":x0,"uk-UA":$0,"zh-CN":A0,"zh-TW":k0};function T0(e,t,r){let{direction:n}=Je(),a=d.useMemo(()=>Lu(t),[t]),o=u=>{if(Ce(u.currentTarget,he(u))&&(u.altKey&&(u.key==="ArrowDown"||u.key==="ArrowUp")&&"setOpen"in e&&(u.preventDefault(),u.stopPropagation(),e.setOpen(!0)),!r))switch(u.key){case"ArrowLeft":if(u.preventDefault(),u.stopPropagation(),n==="rtl"){if(t.current){let l=he(u),c=P0(t.current,l.getBoundingClientRect().left,-1);c&&c.focus()}}else a.focusPrevious();break;case"ArrowRight":if(u.preventDefault(),u.stopPropagation(),n==="rtl"){if(t.current){let l=he(u),c=P0(t.current,l.getBoundingClientRect().left,1);c&&c.focus()}}else a.focusNext();break}},i=()=>{if(!t.current)return;let u=window.event?he(window.event):null,l=lt(t.current,{tabbable:!0});if(u&&(l.currentNode=u,u=l.previousNode()),!u){let c;do c=l.lastChild(),c&&(u=c);while(c)}for(;u?.hasAttribute("data-placeholder");){let c=l.previousNode();if(c&&c.hasAttribute("data-placeholder"))u=c;else break}u&&u.focus()},{pressProps:s}=Ns({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(u){u.pointerType==="mouse"&&i()},onPress(u){(u.pointerType==="touch"||u.pointerType==="pen")&&i()}});return Ae(s,{onKeyDown:o})}function P0(e,t,r){let n=lt(e,{tabbable:!0}),a=n.nextNode(),o=null,i=1/0;for(;a;){let u=a.getBoundingClientRect().left-t,l=Math.abs(u);Math.sign(u)===r&&l<i&&(o=a,i=l),a=n.nextNode()}return o}function GC(e){return e&&e.__esModule?e.default:e}const I0=new WeakMap,Uo="__reactAriaDateFieldRole",qC="__reactAriaDateFieldFocusManager";function KC(e,t,r){let{isInvalid:n,validationErrors:a,validationDetails:o}=t.displayValidation,{labelProps:i,fieldProps:s,descriptionProps:u,errorMessageProps:l}=op({...e,labelElementType:"span",isInvalid:n,errorMessage:e.errorMessage||a}),c=d.useRef(null),{focusWithinProps:f}=Kn({...e,onFocusWithin(O){c.current=t.value,e.onFocus?.(O)},onBlurWithin:O=>{t.confirmPlaceholder(),t.value!==c.current&&t.commitValidation(),e.onBlur?.(O)},onFocusWithinChange:e.onFocusChange}),p=sr(GC(No),"@react-aria/datepicker"),h=t.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",g=t.maxGranularity==="hour"?"time":"date",y=t.value?p.format(h,{[g]:t.formatValue({month:"long"})}):"",_=Au(y),D=e[Uo]==="presentation"?s["aria-describedby"]:[_["aria-describedby"],s["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[qC],b=d.useMemo(()=>w||Lu(r),[w,r]),C=T0(t,r,e[Uo]==="presentation");I0.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[i.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:D,focusManager:b});let v=d.useRef(e.autoFocus),k;e[Uo]==="presentation"?k={role:"presentation"}:k=Ae(s,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":D}),d.useEffect(()=>{v.current&&b.focusFirst(),v.current=!1},[b]),US(e.inputRef,t.defaultValue,t.setValue),HS({...e,focus(){b.focusFirst()}},t,e.inputRef);let I={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};e.validationBehavior==="native"&&(I.type="text",I.hidden=!0,I.required=e.isRequired,I.onChange=()=>{});let G=et(e);return{labelProps:{...i,onClick:()=>{b.focusFirst()}},fieldProps:Ae(G,k,C,f,{onKeyDown(O){e.onKeyDown&&e.onKeyDown(O)},onKeyUp(O){e.onKeyUp&&e.onKeyUp(O)},style:{unicodeBidi:"isolate"}}),inputProps:I,descriptionProps:u,errorMessageProps:l,isInvalid:n,validationErrors:a,validationDetails:o}}function YC(e){return e&&e.__esModule?e.default:e}function QC(){let{locale:e}=Je(),t=Ud(YC(No),"@react-aria/datepicker");return d.useMemo(()=>{try{return new Intl.DisplayNames(e,{type:"dateTimeField"})}catch{return new XC(e,t)}},[e,t])}class XC{constructor(t,r){this.locale=t,this.dictionary=r}of(t){return this.dictionary.getStringForLocale(t,this.locale)}}function WC(e,t,r){let n=d.useRef(""),{locale:a,direction:o}=Je(),i=QC(),{ariaLabel:s,ariaLabelledBy:u,ariaDescribedBy:l,focusManager:c}=I0.get(t),f=e.isPlaceholder?"":e.text,p=d.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),h=St({month:"long",timeZone:p.timeZone}),g=St({hour:"numeric",hour12:p.hour12,timeZone:p.timeZone});if(e.type==="month"&&!e.isPlaceholder){let T=h.format(t.dateValue);f=T!==f?`${f} – ${T}`:T}else e.type==="hour"&&!e.isPlaceholder&&(f=g.format(t.dateValue));let{spinButtonProps:y}=KS({value:e.value??void 0,textValue:f,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{n.current="",t.increment(e.type)},onDecrement:()=>{n.current="",t.decrement(e.type)},onIncrementPage:()=>{n.current="",t.incrementPage(e.type)},onDecrementPage:()=>{n.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{n.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{n.current="",t.decrementToMin(e.type)}}),_=d.useMemo(()=>new sf(a,{maximumFractionDigits:0}),[a]),D=()=>{if(e.text===e.placeholder&&c.focusPrevious(),_.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let T=e.text.slice(0,-1),Y=_.parse(T);T=Y===0?"":T,T.length===0||Y===0?t.clearSegment(e.type):t.setSegment(e.type,Y),n.current=T}else(e.type==="dayPeriod"||e.type==="era")&&t.clearSegment(e.type)},w=T=>{if(T.key==="a"&&(mn()?T.metaKey:T.ctrlKey)&&T.preventDefault(),!(T.ctrlKey||T.metaKey||T.shiftKey||T.altKey))switch(T.key){case"Backspace":case"Delete":T.preventDefault(),T.stopPropagation(),D();break}},{startsWith:b}=HC({sensitivity:"base"}),C=St({hour:"numeric",hour12:!0}),v=d.useMemo(()=>{let T=new Date;return T.setHours(0),C.formatToParts(T).find(Y=>Y.type==="dayPeriod").value},[C]),k=d.useMemo(()=>{let T=new Date;return T.setHours(12),C.formatToParts(T).find(Y=>Y.type==="dayPeriod").value},[C]),I=St({year:"numeric",era:"narrow",timeZone:"UTC"}),G=d.useMemo(()=>{if(e.type!=="era")return[];let T=Me(new Ne(1,1,1),t.calendar),Y=t.calendar.getEras().map(te=>{let H=T.set({year:1,month:1,day:1,era:te}).toDate("UTC"),A=I.formatToParts(H).find(S=>S.type==="era").value;return{era:te,formatted:A}}),se=JC(Y.map(te=>te.formatted));if(se)for(let te of Y)te.formatted=te.formatted.slice(se);return Y},[I,t.calendar,e.type]),O=T=>{if(t.isDisabled||t.isReadOnly)return;let Y=n.current+T;switch(e.type){case"dayPeriod":if(b(v,T))t.setSegment("dayPeriod",0);else if(b(k,T))t.setSegment("dayPeriod",1);else break;c.focusNext();break;case"era":{let se=G.find(te=>b(te.formatted,T));se&&(t.setSegment("era",se.era),c.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!_.isValidPartialNumber(Y))return;let se=_.parse(Y),te=se;if(e.maxValue!==void 0&&se>e.maxValue&&(te=_.parse(T)),isNaN(se))return;t.setSegment(e.type,te),e.maxValue!==void 0&&(+(se+"0")>e.maxValue||Y.length>=String(e.maxValue).length)?(n.current="",c.focusNext()):n.current=Y;break}}},Z=()=>{n.current="",r.current&&Km(r.current,{containingElement:Ao(r.current)}),window.getSelection()?.collapse(r.current)},M=d.useRef(typeof document<"u"?document:null);Ms(M,"selectionchange",()=>{let T=window.getSelection();T?.anchorNode&&Ce(r.current,T?.anchorNode)&&T.collapse(r.current)});let X=d.useRef("");Ms(r,"beforeinput",T=>{if(r.current)switch(T.preventDefault(),T.inputType){case"deleteContentBackward":case"deleteContentForward":_.isValidPartialNumber(e.text)&&!t.isReadOnly&&D();break;case"insertCompositionText":X.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:T.data!=null&&O(T.data);break}}),Ms(r,"input",T=>{let{inputType:Y,data:se}=T;switch(Y){case"insertCompositionText":r.current&&(r.current.textContent=X.current),se!=null&&(b(v,se)||b(k,se))&&O(se);break}}),$e(()=>{let T=r.current;return()=>{Ie()===T&&(c.focusPrevious()||c.focusNext())}},[r,c]);let de=Vn()||e.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},x=d.useMemo(()=>t.segments.find(T=>T.isEditable),[t.segments]);e!==x&&!t.isInvalid&&(l=void 0);let z=Mt(),U=!t.isDisabled&&!t.isReadOnly&&e.isEditable,P=e.type==="literal"?"":i.of(e.type),K=jn({"aria-label":`${P}${s?`, ${s}`:""}${u?", ":""}`,"aria-labelledby":u});if(e.type==="literal")return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if(o==="rtl"){$.unicodeBidi="embed";let T=p[e.type];(T==="numeric"||T==="2-digit")&&($.direction="ltr")}return{segmentProps:Ae(y,K,{id:z,...de,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:U,suppressContentEditableWarning:U,spellCheck:U?"false":void 0,autoCorrect:U?"off":void 0,[parseInt(d.version,10)>=17?"enterKeyHint":"enterkeyhint"]:U?"next":void 0,inputMode:t.isDisabled||e.type==="dayPeriod"||e.type==="era"||!U?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:w,onFocus:Z,style:$,onPointerDown(T){T.stopPropagation()},onMouseDown(T){T.stopPropagation()}})}}function JC(e){e.sort();let t=e[0],r=e[e.length-1];for(let n=0;n<t.length;n++)if(t[n]!==r[n])return n;return 0}var M0={};M0={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var F0={};F0={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var O0={};O0={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var B0={};B0={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var L0={};L0={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var R0={};R0={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var N0={};N0={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var U0={};U0={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var H0={};H0={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var V0={};V0={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var z0={};z0={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var j0={};j0={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var Z0={};Z0={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var G0={};G0={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var q0={};q0={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var K0={};K0={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var Y0={};Y0={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이후여야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var Q0={};Q0={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var X0={};X0={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var W0={};W0={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var J0={};J0={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var eg={};eg={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var tg={};tg={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var rg={};rg={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var ng={};ng={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var ag={};ag={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var og={};og={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var ig={};ig={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var sg={};sg={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var ug={};ug={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var lg={};lg={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var cg={};cg={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var dg={};dg={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var fg={};fg={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var mg={};mg={"ar-AE":M0,"bg-BG":F0,"cs-CZ":O0,"da-DK":B0,"de-DE":L0,"el-GR":R0,"en-US":N0,"es-ES":U0,"et-EE":H0,"fi-FI":V0,"fr-FR":z0,"he-IL":j0,"hr-HR":Z0,"hu-HU":G0,"it-IT":q0,"ja-JP":K0,"ko-KR":Y0,"lt-LT":Q0,"lv-LV":X0,"nb-NO":W0,"nl-NL":J0,"pl-PL":eg,"pt-BR":tg,"pt-PT":rg,"ro-RO":ng,"ru-RU":ag,"sk-SK":og,"sl-SI":ig,"sr-SP":sg,"sv-SE":ug,"tr-TR":lg,"uk-UA":cg,"zh-CN":dg,"zh-TW":fg};function ew(e){return e&&e.__esModule?e.default:e}const tw=new Nr(ew(mg));function rw(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function pg(e,t,r,n,a){let o=e!=null&&r!=null&&e.compare(r)>0,i=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&n?.(e)||!1,u=o||i||s,l=[];if(u){let c=rw(),f=Nr.getGlobalDictionaryForPackage("@react-stately/datepicker")||tw,p=new Rd(c,f),h=new Qt(c,Sn({},a)),g=h.resolvedOptions().timeZone;i&&t!=null&&l.push(p.format("rangeUnderflow",{minValue:h.format(t.toDate(g))})),o&&r!=null&&l.push(p.format("rangeOverflow",{maxValue:h.format(r.toDate(g))})),s&&l.push(p.format("unavailableDate"))}return{isInvalid:u,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:o,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!u}}}const nw={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},aw={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function Sn(e,t){e={...t.shouldForceLeadingZeros?aw:nw,...e};let n=t.granularity||"minute",a=Object.keys(e),o=a.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=a.indexOf(n);if(i<0&&(i=2),o>i)throw new Error("maxGranularity must be greater than granularity");let s=a.slice(o,i+1).reduce((l,c)=>(l[c]=e[c],l),{});return t.hourCycle!=null&&(s.hour12=t.hourCycle===12),s.timeZone=t.timeZone||"UTC",(n==="hour"||n==="minute"||n==="second")&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&o===0&&(s.era="short"),s}function hg(e){return e&&"hour"in e?e:new cu}function gg(e,t){if(e===null)return null;if(e)return Me(e,t)}function ow(e,t,r,n){if(e)return gg(e,r);let a=Me(Xf(n??ho()).set({hour:0,minute:0,second:0,millisecond:0}),r);return t==="year"||t==="month"||t==="day"?ot(a):n?a:Kt(a)}function yg(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[a,o]=d.useState([n,r]);e&&(a[0]!==n||a[1]!==r)&&o([n,r]),t||(t=e?n:a[0]);let i=e?r:a[1];return[t,i]}const iw=new Nr({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"áááá",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"åååå",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},"sr-Latn":{year:"gggg",month:"mm",day:"dd"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function sw(e,t,r){return e==="era"||e==="dayPeriod"?t:e==="year"||e==="month"||e==="day"?iw.getStringForLocale(e,r):"––"}class Bt{constructor(t,r,n){if(this.era=n?.era??null,this.calendar=t,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=r,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset="offset"in(n??{})?n.offset:null,this.hour!=null){let[a,o]=Cn(this.hour,r);this.dayPeriod=a,this.hour=o}}copy(){let t=new Bt(this.calendar,this.hourCycle);return t.era=this.era,t.year=this.year,t.month=this.month,t.day=this.day,t.hour=this.hour,t.dayPeriod=this.dayPeriod,t.minute=this.minute,t.second=this.second,t.millisecond=this.millisecond,t.offset=this.offset,t}isComplete(t){return t.every(r=>this[r]!=null)}validate(t,r){return r.every(n=>{if((n==="hour"||n==="dayPeriod")&&"hour"in t){let[a,o]=Cn(t.hour,this.hourCycle);return this.dayPeriod===a&&this.hour===o}return this[n]===t[n]})}isCleared(t){return t.every(r=>this[r]===null)}set(t,r,n){let a=this.copy();return a[t]=r,t==="hour"&&a.dayPeriod==null&&"hour"in n&&(a.dayPeriod=Cn(n.hour,this.hourCycle)[0]),t==="year"&&a.era==null&&(a.era=n.era),t!=="second"&&t!=="literal"&&t!=="timeZoneName"&&(a.offset=null),a}clear(t){let r=this.copy();return r[t]=null,t==="year"&&(r.era=null),r.offset=null,r}cycle(t,r,n,a){let o=this.copy();if(o[t]==null&&t!=="dayPeriod"&&t!=="era"){if(t==="hour"&&"hour"in n){let[i,s]=Cn(n.hour,this.hourCycle);o.dayPeriod=i,o.hour=s}else o[t]=n[t];return t==="year"&&o.era==null&&(o.era=n.era),o}switch(t){case"era":{let i=this.calendar.getEras(),s=i.indexOf(o.era);s=Kr(s,r,0,i.length-1),o.era=i[s];break}case"year":{let i=new Ne(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);i=i.cycle(t,r,{round:t==="year"}),o.era=i.era,o.year=i.year;break}case"month":o.month=Kr(o.month??1,r,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=Kr(o.day??1,r,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let i=a.some(s=>["year","month","day"].includes(s));if("timeZone"in n&&(!i||o.year!=null&&o.month!=null&&o.day!=null)){let s=this.toValue(n);s=s.cycle("hour",r,{hourCycle:this.hourCycle==="h12"?12:24,round:!1});let[u,l]=Cn(s.hour,this.hourCycle);o.hour=l,o.dayPeriod=u,o.offset=s.offset}else{let s=o.hour??0,u=this.getSegmentLimits("hour");o.hour=Kr(s,r,u.minValue,u.maxValue),o.dayPeriod==null&&"hour"in n&&(o.dayPeriod=Cn(n.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=Kr(o.dayPeriod??0,r,0,1);break;case"minute":o.minute=Kr(o.minute??0,r,0,59,!0);break;case"second":o.second=Kr(o.second??0,r,0,59,!0);break}return o}toValue(t){if("hour"in t){let r=this.hour;r!=null?r=uw(r,this.dayPeriod??0,this.hourCycle):(this.hourCycle==="h12"||this.hourCycle==="h11")&&(r=this.dayPeriod===1?12:0);let n=t.set({era:this.era??t.era,year:this.year??t.year,month:this.month??t.month,day:this.day??t.day,hour:r??t.hour,minute:this.minute??t.minute,second:this.second??t.second,millisecond:this.millisecond??t.millisecond});return"offset"in n&&this.offset!=null&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}else return t.set({era:this.era??t.era,year:this.year??t.year,month:this.month??t.month,day:this.day??t.day})}getSegmentLimits(t){switch(t){case"era":{let r=this.calendar.getEras();return{value:this.era!=null?r.indexOf(this.era):r.length-1,minValue:0,maxValue:r.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let r=0,n=23;return this.hourCycle==="h12"?(r=1,n=12):this.hourCycle==="h11"&&(r=0,n=11),{value:this.hour,minValue:r,maxValue:n}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function Kr(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function Cn(e,t){let r=e>=12?1:0;switch(t){case"h11":e>=12&&(e-=12);break;case"h12":e===0?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}function uw(e,t,r){switch(r){case"h11":t===1&&(e+=12);break;case"h12":e===12&&(e=0),t===1&&(e+=12);break;case"h24":e-=1;break}return e}const Ku={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},bg={year:5,month:2,day:7,hour:2,minute:15,second:15},lw={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function cw(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:a=!1,isReadOnly:o=!1,isRequired:i=!1,minValue:s,maxValue:u,isDateUnavailable:l}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[f,p]=yg(c,e.granularity),h=p||"UTC";if(c&&!(f in c))throw new Error("Invalid granularity "+f+" for value "+c.toString());let[g,y]=d.useMemo(()=>{let E=new Qt(t,{dateStyle:"short",timeStyle:"short",hour12:e.hourCycle!=null?e.hourCycle===12:void 0}).resolvedOptions();return[r(E.calendar),E.hourCycle]},[t,e.hourCycle,r]),[_,D]=Gn(e.value,e.defaultValue??null,e.onChange),[w]=d.useState(_),b=d.useMemo(()=>gg(_,g)??null,[_,g]),[C,v]=d.useState(()=>new Bt(g,y,b)),k=g.identifier==="gregory"&&C.era==="BC",I=d.useMemo(()=>({granularity:f,maxGranularity:e.maxGranularity??"year",timeZone:p,hideTimeZone:n,hourCycle:e.hourCycle,showEra:k,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,p,n,k]),G=d.useMemo(()=>Sn({},I),[I]),O=d.useMemo(()=>new Qt(t,G),[t,G]),Z=d.useMemo(()=>O.resolvedOptions(),[O]),M=d.useMemo(()=>ow(e.placeholderValue,f,g,p),[e.placeholderValue,f,g,p]),X=d.useMemo(()=>{let S=y==="h11"||y==="h12",E=["era","year","month","day","hour",...S?["dayPeriod"]:[],"minute","second"],j=E.indexOf(e.maxGranularity||"era"),q=E.indexOf(f==="hour"&&S?"dayPeriod":f);return E.slice(j,q+1)},[e.maxGranularity,f,y]),[de,x]=d.useState(b),[z,U]=d.useState(g),[P,K]=d.useState(y);(b!==de||y!==P||!po(g,z))&&(C=new Bt(g,y,b),x(b),U(g),K(y),v(C));let $=S=>{if(!(e.isDisabled||e.isReadOnly))if(S==null||S instanceof Bt&&S.isCleared(X))v(new Bt(g,y,b)),D(null);else if(!(S instanceof Bt))S=Me(S,c?.calendar||new at),v(new Bt(g,y,b)),D(S);else{if(S.isComplete(X)){let E=S.toValue(b??M);if(S.validate(E,X)){let j=Me(E,c?.calendar||new at);if(!_||j.compare(_)!==0){v(new Bt(g,y,b)),D(j);return}}}v(S)}},T=d.useMemo(()=>C.toValue(b??M).toDate(h),[C,h,b,M]),Y=d.useMemo(()=>dw(T,C,O,Z,g,t,f),[T,O,Z,C,g,t,f]),se=(S,E)=>{$(C.cycle(S,E,M,X))},te=d.useMemo(()=>pg(_,s,u,l,I),[_,s,u,l,I]),H=np({...e,value:_,builtinValidation:te}),Q=H.displayValidation.isInvalid,A=e.validationState||(Q?"invalid":null);return{...H,value:b,defaultValue:e.defaultValue??w,dateValue:T,calendar:g,setValue:$,segments:Y,dateFormatter:O,validationState:A,isInvalid:Q,granularity:f,maxGranularity:e.maxGranularity??"year",isDisabled:a,isReadOnly:o,isRequired:i,increment(S){se(S,1)},decrement(S){se(S,-1)},incrementPage(S){se(S,bg[S]||1)},decrementPage(S){se(S,-(bg[S]||1))},incrementToMax(S){let E=S==="hour"&&y==="h12"?11:C.getSegmentLimits(S).maxValue;$(C.set(S,E,M))},decrementToMin(S){let E=S==="hour"&&y==="h12"?12:C.getSegmentLimits(S).minValue;$(C.set(S,E,M))},setSegment(S,E){$(C.set(S,E,M))},confirmPlaceholder(){if(!(e.isDisabled||e.isReadOnly)&&C.isComplete(X)){let S=C.toValue(b??M),E=Me(S,c?.calendar||new at);(!_||E.compare(_)!==0)&&D(E),v(new Bt(g,y,b))}},clearSegment(S){let E=C;S!=="timeZoneName"&&S!=="literal"&&(E=C.clear(S)),$(E)},formatValue(S){if(!b)return"";let E=Sn(S,I);return new Qt(t,E).format(T)},getDateFormatter(S,E){let j={...I,...E},q=Sn({},j);return new Qt(S,q)}}}function dw(e,t,r,n,a,o,i){let s=["hour","minute","second"],u=r.formatToParts(e),l=new Zs(o,{useGrouping:!1}),c=new Zs(o,{useGrouping:!1,minimumIntegerDigits:2});for(let p of u)if(p.type==="year"||p.type==="month"||p.type==="day"||p.type==="hour"){let h=t[p.type]??0;n[p.type]==="2-digit"?p.value=c.format(h):p.value=l.format(h)}let f=[];for(let p of u){let h=lw[p.type]||p.type,g=Ku[h];h==="era"&&a.getEras().length===1&&(g=!1);let y=Ku[h]&&t[p.type]==null,_=Ku[h]?sw(h,p.value,o):null,D={type:h,text:y?_:p.value,...t.getSegmentLimits(h),isPlaceholder:y,placeholder:_,isEditable:g};h==="hour"?(f.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),f.push(D),h===i&&f.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(h)&&h===i?(f.push(D),f.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):f.push(D)}return f}const _g=d.createContext(null),Ho=d.createContext(null),Yu=d.createContext(null),fw=d.forwardRef(function(t,r){let n=d.useContext(Ho),a=d.useContext(Yu);return n||a?d.createElement(vg,{...t,ref:r}):d.createElement(mw,{...t,ref:r})}),mw=d.forwardRef((e,t)=>{let[r,n]=jt({slot:e.slot},t,_g),{locale:a}=Je(),o=cw({...r,locale:a,createCalendar:jm}),i=d.useRef(null),{fieldProps:s,inputProps:u}=KC({...r,inputRef:i},o,n);return d.createElement(Wa,{values:[[Ho,o],[sp,{...u,ref:i}],[Io,{...s,ref:n,isInvalid:o.isInvalid,isDisabled:o.isDisabled}]]},d.createElement(vg,e))}),vg=d.forwardRef((e,t)=>{let{className:r,children:n}=e,a=d.useContext(Ho),o=d.useContext(Yu),i=a??o;return d.createElement(d.Fragment,null,d.createElement(ip,{...e,ref:t,slot:e.slot||void 0,className:r??"react-aria-DateInput",isReadOnly:i.isReadOnly,isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((s,u)=>d.cloneElement(n(s),{key:u}))),d.createElement(GS,{className:""}))}),pw=d.forwardRef(function({segment:t,...r},n){let a=d.useContext(Ho),o=d.useContext(Yu),i=a??o,s=_d(n),{segmentProps:u}=WC(t,i,s),{focusProps:l,isFocused:c,isFocusVisible:f}=gn(),{hoverProps:p,isHovered:h}=Yn({...r,isDisabled:i.isDisabled||t.type==="literal"}),g=zt({...r,values:{...t,isReadOnly:i.isReadOnly,isInvalid:i.isInvalid,isDisabled:i.isDisabled,isHovered:h,isFocused:c,isFocusVisible:f},defaultChildren:t.text,defaultClassName:"react-aria-DateSegment"});return d.createElement(st.span,{...Ae(et(r,{global:!0}),u,l,p),...g,style:u.style,ref:s,"data-placeholder":t.isPlaceholder||void 0,"data-invalid":i.isInvalid||void 0,"data-readonly":i.isReadOnly||void 0,"data-disabled":i.isDisabled||void 0,"data-type":t.type,"data-hovered":h||void 0,"data-focused":c||void 0,"data-focus-visible":f||void 0})});function hw(e){return e&&e.__esModule?e.default:e}function gw(e,t,r){let n=Mt(),a=Mt(),o=Mt(),i=sr(hw(No),"@react-aria/datepicker"),{isInvalid:s,validationErrors:u,validationDetails:l}=t.displayValidation,{labelProps:c,fieldProps:f,descriptionProps:p,errorMessageProps:h}=op({...e,labelElementType:"span",isInvalid:s,errorMessage:e.errorMessage||u}),g=T0(t,r),y=f["aria-labelledby"]||f.id,{locale:_}=Je(),D=t.formatValue(_,{month:"long"}),w=D?i.format("selectedDateDescription",{date:D}):"",b=Au(w),C=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=et(e),k=d.useMemo(()=>Lu(r),[r]),I=d.useRef(!1),{focusWithinProps:G}=Kn({...e,isDisabled:t.isOpen,onBlurWithin:O=>{let Z=document.getElementById(a);Ce(Z,O.relatedTarget)||(I.current=!1,e.onBlur?.(O),e.onFocusChange?.(!1))},onFocusWithin:O=>{I.current||(I.current=!0,e.onFocus?.(O),e.onFocusChange?.(!0))}});return{groupProps:Ae(v,g,f,b,G,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":C,onKeyDown(O){t.isOpen||e.onKeyDown&&e.onKeyDown(O)},onKeyUp(O){t.isOpen||e.onKeyUp&&e.onKeyUp(O)}}),labelProps:{...c,onClick:()=>{k.focusFirst()}},fieldProps:{...f,id:o,[Uo]:"presentation","aria-describedby":C,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[Iu]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:h,buttonProps:{...b,id:n,"aria-haspopup":"dialog","aria-label":i.format("calendar"),"aria-labelledby":`${n} ${y}`,"aria-describedby":C,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${n} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:s,validationErrors:u,validationDetails:l}}function yw(e){let t=Zh(e),[r,n]=Gn(e.value,e.defaultValue||null,e.onChange),[a]=d.useState(r),o=r||e.placeholderValue||null,[i,s]=yg(o,e.granularity),u=r!=null?r.toDate(s??"UTC"):null,l=i==="hour"||i==="minute"||i==="second",c=e.shouldCloseOnSelect??!0,[f,p]=d.useState(null),[h,g]=d.useState(null);if(r&&(f=r,"hour"in r&&(h=r)),o&&!(i in o))throw new Error("Invalid granularity "+i+" for value "+o.toString());let y=r?.calendar.identifier==="gregory"&&r.era==="BC",_=d.useMemo(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:y}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,y]),{minValue:D,maxValue:w,isDateUnavailable:b}=e,C=d.useMemo(()=>pg(r,D,w,b,_),[r,D,w,b,_]),v=np({...e,value:r,builtinValidation:C}),k=v.displayValidation.isInvalid,I=e.validationState||(k?"invalid":null),G=(M,X)=>{n("timeZone"in X?X.set(ot(M)):Kt(M,X)),p(null),g(null),v.commitValidation()},O=M=>{let X=typeof c=="function"?c():c;l?h||X?G(M,h||hg(e.defaultValue||e.placeholderValue)):p(M):(n(M),v.commitValidation()),X&&t.setOpen(!1)},Z=M=>{f&&M?G(f,M):g(M)};return{...v,value:r,defaultValue:e.defaultValue??a,setValue:n,dateValue:f,timeValue:h,setDateValue:O,setTimeValue:Z,granularity:i,hasTime:l,...t,setOpen(M){!M&&!r&&f&&l&&G(f,h||hg(e.defaultValue||e.placeholderValue)),t.setOpen(M)},validationState:I,isInvalid:k,formatValue(M,X){if(!u)return"";let de=Sn(X,_);return new Qt(M,de).format(u)},getDateFormatter(M,X){let de={..._,...X},x=Sn({},de);return new Qt(M,x)}}}const bw=d.createContext(null),_w=d.createContext(null),vw=[Io,Xn,af,Qs],Ew=d.forwardRef(function(t,r){[t,r]=jt(t,r,bw);let{validationBehavior:n}=Ja(NS)||{},a=t.validationBehavior??n??"native",o=yw({...t,validationBehavior:a}),i=d.useRef(null),[s,u]=tE(!t["aria-label"]&&!t["aria-labelledby"]),{groupProps:l,labelProps:c,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:_,...D}=gw({...rE(t),label:u,validationBehavior:a},o,i),{focusProps:w,isFocused:b,isFocusVisible:C}=gn({within:!0}),v=zt({...t,values:{state:o,isFocusWithin:b,isFocusVisible:C,isDisabled:t.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1},defaultClassName:"react-aria-DatePicker"}),k=et(t,{global:!0});return delete k.id,d.createElement(Wa,{values:[[_w,o],[Io,{...l,ref:i,isInvalid:o.isInvalid}],[_g,f],[Xn,{...p,isPressed:o.isOpen}],[af,{...c,ref:s,elementType:"span"}],[To,g],[qu,o],[qh,{trigger:"DatePicker",triggerRef:i,placement:"bottom start",clearContexts:vw}],[Yh,h],[Qs,{slots:{description:y,errorMessage:_}}],[OS,D]]},d.createElement(st.div,{...Ae(k,v,w),ref:r,slot:t.slot||void 0,"data-focus-within":b||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":t.isDisabled||void 0,"data-readonly":t.isReadOnly||void 0,"data-required":t.isRequired||void 0,"data-open":o.isOpen||void 0}),d.createElement(ZC,{autoComplete:t.autoComplete,name:t.name,isDisabled:t.isDisabled,state:o}))});function Qu(e){if(typeof e!="string"||e.trim()==="")return null;try{return bm(e)}catch{return null}}function Dw(e){return{currentTarget:{value:e},target:{value:e}}}function Eg({label:e,value:t,items:r,onChange:n,className:a}){return m.jsx("select",{className:`date-picker-select ${a??""}`,"aria-label":e,value:String(t),onChange:o=>n(Number(o.currentTarget.value)),children:r.map(o=>m.jsx("option",{value:o.id,children:o.formatted},o.id))})}function Sw({id:e,label:t,hint:r,error:n,required:a,className:o,min:i,max:s,disabled:u,onChange:l,onFocus:c,onBlur:f,value:p,autoComplete:h,...g}){const y=d.useRef(null),_=Qu(p),D=Qu(i),w=Qu(s),b=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,C=`${e}-label`,v=e.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),k=["form-field",v?`form-field--${v}`:null,o].filter(Boolean).join(" ");return m.jsxs("div",{className:k,"data-field-id":e,children:[m.jsxs("span",{id:C,className:"form-label form-field__label",children:[t,a&&m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-red-600","aria-hidden":"true",children:[" ","*"]}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),m.jsxs(Ew,{className:"date-picker",value:_,minValue:D??void 0,maxValue:w??void 0,isDisabled:u,isRequired:a,isInvalid:!!n,autoComplete:h,"aria-labelledby":C,"aria-describedby":b,onFocus:I=>c?.(I),onBlur:I=>f?.(I),onChange:I=>l?.(Dw(I?I.toString():"")),children:[m.jsxs(ip,{className:`date-picker-group form-input ${n?"input-error":""}`,"data-input-id":e,"aria-describedby":b,"aria-invalid":!!n,"aria-labelledby":C,onClick:I=>{!u&&!I.target.closest("button")&&y.current?.click()},children:[m.jsx(fw,{className:"date-picker-input",children:I=>m.jsx(pw,{className:"date-picker-segment",segment:I})}),m.jsx(Ks,{ref:y,className:"date-picker-button","aria-label":`Open calendar for ${t}`,type:"button",children:m.jsx("span",{"aria-hidden":"true",children:"▾"})})]}),m.jsx("input",{id:`${e}-value`,type:"hidden",value:p??"",disabled:u,...g,readOnly:!0}),m.jsx(LC,{className:"date-picker-popover",placement:"bottom start",offset:6,shouldFlip:!0,children:m.jsx(UC,{className:"date-picker-dialog",children:m.jsxs($S,{className:"date-picker-calendar",children:[m.jsxs("header",{className:"date-picker-calendar-header",children:[m.jsx(Ks,{className:"date-picker-nav-button",slot:"previous",type:"button",children:"‹"}),m.jsxs("div",{className:"date-picker-selects",children:[m.jsx(FS,{format:"long",children:({"aria-label":I,value:G,items:O,onChange:Z})=>m.jsx(Eg,{label:I,value:G,items:O,onChange:Z,className:"date-picker-select--month"})}),m.jsx(MS,{visibleYears:120,children:({"aria-label":I,value:G,items:O,onChange:Z})=>m.jsx(Eg,{label:I,value:G,items:O,onChange:Z,className:"date-picker-select--year"})}),m.jsx(gD,{className:"sr-only"})]}),m.jsx(Ks,{className:"date-picker-nav-button",slot:"next",type:"button",children:"›"})]}),m.jsxs(AS,{className:"date-picker-grid",children:[m.jsx(Wm,{children:I=>m.jsx(Jm,{className:"date-picker-header-cell",children:I})}),m.jsx(ep,{children:I=>m.jsx(IS,{className:"date-picker-cell",date:I})})]})]})})})]}),r&&m.jsx("p",{id:`${e}-hint`,className:"form-field__hint mt-1 text-sm text-slate-500",children:r}),n&&m.jsx("p",{id:`${e}-error`,className:"form-field__error mt-1 text-sm text-red-600",children:n})]})}function Yr({id:e,label:t,className:r,...n}){return m.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[m.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),m.jsx("span",{className:"checkbox-label",children:t})]})}function Cw({onChoose:e,isSubmitting:t=!1}){const[r,n]=d.useState(!1),a=!r||t;return m.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[m.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),m.jsx(Yr,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:r,onChange:o=>n(o.target.checked),disabled:t,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),m.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[m.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),m.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),m.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 gap-3 mt-6 sm:grid-cols-2",children:[m.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>e(!0),disabled:a,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",a?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[t&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"I Consent"]}),m.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>e(!1),disabled:t,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function ww({name:e,value:t,checked:r,onChange:n,children:a}){return m.jsxs("label",{className:"radio-card",children:[m.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),m.jsx("span",{className:"radio-label",children:a})]})}function xw({legend:e,children:t,className:r,legendClassName:n,required:a}){return m.jsxs("fieldset",{className:r,children:[m.jsxs("legend",{className:`form-label mb-4 ${n||""}`,children:[e,a&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-red-600 ml-1","aria-hidden":"true",children:"*"}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),m.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function $w({id:e,label:t,hint:r,error:n,required:a,className:o,placeholder:i="Select an option",options:s=[],value:u,onValueChange:l,onFocus:c,onBlur:f,disabled:p,...h}){const g=d.useRef(null),y=d.useRef(null),_=d.useRef(null),[D,w]=d.useState(!1),[b,C]=d.useState(""),[v,k]=d.useState(-1),[I,G]=d.useState("bottom"),O=Array.isArray(u)?String(u[0]??""):String(u??""),Z=s.find($=>$.value===O),M=`${e}-listbox`,X=v>=0?`${e}-option-${v}`:void 0,de=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,x=d.useMemo(()=>{const $=b.trim().toLowerCase();return!$||Z?.label===b?s:s.filter(T=>T.label.toLowerCase().includes($)||T.value.toLowerCase().includes($))},[s,b,Z?.label]);d.useEffect(()=>{C(Z?.label??"")},[Z?.label]),d.useEffect(()=>{if(!D)return;const $=T=>{g.current&&!g.current.contains(T.target)&&(w(!1),k(-1),C(Z?.label??""))};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[D,Z?.label]),d.useEffect(()=>{if(!D)return;const $=()=>{const T=y.current;if(!T)return;const Y=T.getBoundingClientRect(),se=window.innerHeight||document.documentElement.clientHeight,te=_.current?.scrollHeight??0,H=Math.min(te>0?te:256,se*.42,256),Q=8,A=se-Y.bottom-Q,S=Y.top-Q;G(A<H&&S>A?"top":"bottom")};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[x.length,D]);const z=()=>{if(p)return;w(!0);const $=x.findIndex(T=>T.value===O);k($>=0?$:-1)},U=$=>{$.disabled||(l?.($.value),C($.label),w(!1),k(-1),y.current?.focus())},P=$=>{if(!p)switch($.key){case"ArrowDown":if($.preventDefault(),!D){z();return}k(T=>Math.min(T+1,x.length-1));break;case"ArrowUp":if($.preventDefault(),!D){z();return}k(T=>T>0?T-1:-1);break;case"Enter":D&&v>=0&&x[v]&&($.preventDefault(),U(x[v]));break;case"Escape":D&&($.preventDefault(),w(!1),k(-1),C(Z?.label??""));break}},K=$=>{f?.($)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("div",{ref:g,className:"combobox-wrapper",children:[m.jsx("input",{ref:y,id:e,className:`form-input combobox-input ${n?"input-error":""}`,value:b,placeholder:i,disabled:p,required:a,role:"combobox","aria-autocomplete":"list","aria-expanded":D&&x.length>0,"aria-controls":D&&x.length>0?M:void 0,"aria-activedescendant":X,"aria-invalid":!!n,"aria-describedby":de,autoComplete:"off",onFocus:$=>{c?.($),z()},onClick:z,onChange:$=>{C($.currentTarget.value),w(!0),k(-1)},onKeyDown:P,onBlur:K,...h,type:"text"}),m.jsx("span",{className:"combobox-caret","aria-hidden":"true"}),D&&m.jsx("div",{ref:_,id:M,className:"combobox-listbox","data-placement":I,role:"listbox",children:x.length>0?x.map(($,T)=>m.jsx("div",{id:`${e}-option-${T}`,className:"combobox-option","data-highlighted":T===v?"true":void 0,"data-selected":$.value===O?"true":void 0,tabIndex:-1,role:"option","aria-selected":$.value===O,"aria-disabled":$.disabled||void 0,onMouseDown:Y=>Y.preventDefault(),onMouseEnter:()=>k(T),onClick:()=>U($),children:$.label},`${$.value}-${T}`)):m.jsx("div",{className:"combobox-empty",role:"status",children:"No matches"})})]})})}function ha({id:e,label:t,hint:r,error:n,required:a,className:o,placeholder:i,options:s,children:u,...l}){const c=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!u;if(!f){const{onChange:p,value:h,defaultValue:g,disabled:y,onFocus:_,onBlur:D,name:w,autoFocus:b}=l,C=h??g??"";return m.jsx($w,{id:e,label:t,hint:r,error:n,required:a,className:o,placeholder:i,options:s,value:C,disabled:y,name:w,autoFocus:b,"aria-required":l["aria-required"],onFocus:_,onBlur:D,onValueChange:v=>{p?.({currentTarget:{value:v},target:{value:v}})}})}return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":c,required:a,...l,children:[i&&m.jsx("option",{value:"",disabled:!0,selected:!("value"in l),children:i}),f?u:s?.map(p=>m.jsx("option",{value:p.value,disabled:p.disabled,children:p.label},p.value))]})})}var Dg={apiKey:""};function Aw(){try{typeof Dg<"u"&&Dg?.apiKey}catch{}return""}function kw(){return new Promise((e,t)=>{if(window.google?.maps?.places){e();return}const r=document.querySelector('script[src*="maps.googleapis.com"]');if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(new Error("Failed to load Google Maps script")));return}const n=Aw();if(!n){t(new Error("Google Maps API key not configured"));return}const a=document.createElement("script");a.src=`https://maps.googleapis.com/maps/api/js?key=${n}&libraries=places`,a.async=!0,a.defer=!0,a.onload=()=>e(),a.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(a)})}function Tw(e){const t={fullAddress:e.formatted_address};return e.address_components&&e.address_components.forEach(r=>{const n=r.types;n.includes("street_number")&&(t.streetNumber=r.long_name),n.includes("route")&&(t.streetName=r.long_name),n.includes("locality")&&(t.city=r.long_name),n.includes("administrative_area_level_1")&&(t.state=r.short_name),n.includes("postal_code")&&(t.zipCode=r.long_name),n.includes("country")&&(t.country=r.short_name)}),t}function Pw({id:e,label:t,hint:r,error:n,required:a,className:o,onChange:i,onPlaceSelect:s,value:u,...l}){const c=d.useRef(null),f=d.useRef(null),p=d.useRef(null),h=d.useRef(null),[g,y]=d.useState(!0),[_,D]=d.useState(u||""),[w,b]=d.useState([]),[C,v]=d.useState(!1),[k,I]=d.useState(-1),G=`${e}-suggestions`,O=k>=0?`${e}-suggestion-${k}`:void 0,Z=d.useRef([]),M=d.useRef(!1),X=d.useRef(-1);d.useEffect(()=>{Z.current=w},[w]),d.useEffect(()=>{M.current=C},[C]),d.useEffect(()=>{X.current=k},[k]),d.useEffect(()=>{u!==void 0&&D(String(u))},[u]);const de=d.useRef(null);d.useEffect(()=>{if(!c.current)return;let P=!0;return kw().then(()=>{!P||!c.current||(f.current=new google.maps.places.AutocompleteService,p.current=new google.maps.places.PlacesService(document.createElement("div")),y(!1))}).catch(K=>{console.error("Error loading Google Maps:",K),y(!1)}),()=>{P=!1,de.current&&clearTimeout(de.current)}},[]);const x=P=>{const K=P.target.value;if(D(K),i?.(K),de.current&&clearTimeout(de.current),K.length<3){b([]),v(!1);return}de.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:K,types:["address"]},($,T)=>{T===google.maps.places.PlacesServiceStatus.OK&&$?(b($),v(!0),I(-1)):(b([]),v(!1))})},300)},z=P=>{if(!M.current||Z.current.length===0){P.key==="Escape"&&(v(!1),M.current=!1);return}switch(P.key){case"ArrowDown":P.preventDefault(),I(K=>{const $=K<Z.current.length-1?K+1:K;return X.current=$,$});break;case"ArrowUp":P.preventDefault(),I(K=>{const $=K>0?K-1:-1;return X.current=$,$});break;case"Enter":P.preventDefault(),X.current>=0&&X.current<Z.current.length&&U(Z.current[X.current]);break;case"Escape":P.preventDefault(),v(!1),M.current=!1;break}};d.useEffect(()=>{const P=K=>{h.current&&!h.current.contains(K.target)&&c.current&&!c.current.contains(K.target)&&(v(!1),M.current=!1)};if(C)return document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P)}},[C]);const U=P=>{p.current&&p.current.getDetails({placeId:P.place_id,fields:["address_components","formatted_address","geometry"]},(K,$)=>{if($===google.maps.places.PlacesServiceStatus.OK&&K){const T=K.formatted_address||"";D(T),v(!1),b([]),M.current=!1;const Y=Tw(K);i?.(T,Y),s?.(K)}})};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("div",{className:"relative",children:[m.jsx("input",{ref:c,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:_,onChange:x,onKeyDown:z,role:"combobox","aria-autocomplete":"list","aria-expanded":C&&w.length>0,"aria-controls":C&&w.length>0?G:void 0,"aria-activedescendant":O,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,autoComplete:"street-address",placeholder:l.placeholder||"Enter an address",disabled:g||l.disabled,...l}),g&&m.jsx("p",{className:"mt-1 text-sm text-slate-500",role:"status","aria-live":"polite",children:"Loading address suggestions..."}),C&&w.length>0&&m.jsx("div",{id:G,ref:h,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:w.map((P,K)=>m.jsxs("div",{id:`${e}-suggestion-${K}`,className:`px-4 py-3 cursor-pointer transition-colors ${K===k?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${K<w.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":K===k,onMouseDown:$=>$.preventDefault(),onClick:()=>U(P),onMouseEnter:()=>I(K),children:[m.jsx("div",{className:"font-medium text-slate-900",children:P.structured_formatting.main_text}),P.structured_formatting.secondary_text&&m.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:P.structured_formatting.secondary_text})]},P.place_id))})]})})}function Xu(e){const t=(r,n)=>r.map((a,o)=>{const i=n.length?n.join("__"):"root",s=a.key??`${i}__q${o}_${String(a.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,l=(a.conditionals??[]).map((c,f)=>{const p=c.conditionalQuestions?t(c.conditionalQuestions,[...n,`${s}__c${f}`]):void 0;return{...c,conditionalQuestions:p}});return{...a,key:s,conditionals:l}});return t(e,[])}function B(e,t,r){function n(s,u){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:u,constr:i,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,u);const l=i.prototype,c=Object.keys(l);for(let f=0;f<c.length;f++){const p=c[f];p in s||(s[p]=l[p].bind(s))}}const a=r?.Parent??Object;class o extends a{}Object.defineProperty(o,"name",{value:e});function i(s){var u;const l=r?.Parent?new o:this;n(l,s),(u=l._zod).deferred??(u.deferred=[]);for(const c of l._zod.deferred)c();return l}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class wn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Sg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Cg={};function Qr(e){return Cg}function wg(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,a])=>t.indexOf(+n)===-1).map(([n,a])=>a)}function Wu(e,t){return typeof t=="bigint"?t.toString():t}function Ju(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function el(e){return e==null}function tl(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Iw(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let a=(n.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(n)){const u=n.match(/\d?e-(\d?)/);u?.[1]&&(a=Number.parseInt(u[1]))}const o=r>a?r:a,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}const xg=Symbol("evaluating");function ke(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==xg)return n===void 0&&(n=xg,n=r()),n},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Xr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function pr(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function $g(e){return JSON.stringify(e)}function Mw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ag="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Fw=Ju(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ga(e){if(Vo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Vo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function kg(e){return ga(e)?{...e}:Array.isArray(e)?[...e]:e}const Ow=new Set(["string","number","symbol"]);function xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hr(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Bw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Lw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Rw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=pr(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Xr(this,"shape",i),i},checks:[]});return hr(e,o)}function Nw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=pr(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Xr(this,"shape",i),i},checks:[]});return hr(e,o)}function Uw(e,t){if(!ga(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=pr(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Xr(this,"shape",o),o}});return hr(e,a)}function Hw(e,t){if(!ga(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=pr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Xr(this,"shape",n),n}});return hr(e,r)}function Vw(e,t){const r=pr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Xr(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return hr(e,r)}function zw(e,t,r){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=pr(t._zod.def,{get shape(){const s=t._zod.def.shape,u={...s};if(r)for(const l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)u[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return Xr(this,"shape",u),u},checks:[]});return hr(t,i)}function jw(e,t,r){const n=pr(t._zod.def,{get shape(){const a=t._zod.def.shape,o={...a};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:a[i]}))}else for(const i in a)o[i]=new e({type:"nonoptional",innerType:a[i]});return Xr(this,"shape",o),o}});return hr(t,n)}function $n(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Tg(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function zo(e){return typeof e=="string"?e:e?.message}function Wr(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const a=zo(e.inst?._zod.def?.error?.(e))??zo(t?.error?.(e))??zo(r.customError?.(e))??zo(r.localeError?.(e))??"Invalid input";n.message=a}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function rl(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ya(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Pg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ig=B("$ZodError",Pg),Mg=B("$ZodError",Pg,{Parent:Error});function Zw(e,t=r=>r.message){const r={},n=[];for(const a of e.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):n.push(t(a));return{formErrors:n,fieldErrors:r}}function Gw(e,t=r=>r.message){const r={_errors:[]},n=a=>{for(const o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(i=>n({issues:i}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let i=r,s=0;for(;s<o.path.length;){const u=o.path[s];s===o.path.length-1?(i[u]=i[u]||{_errors:[]},i[u]._errors.push(t(o))):i[u]=i[u]||{_errors:[]},i=i[u],s++}}};return n(e),r}const nl=e=>(t,r,n,a)=>{const o=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new wn;if(i.issues.length){const s=new(a?.Err??e)(i.issues.map(u=>Wr(u,o,Qr())));throw Ag(s,a?.callee),s}return i.value},al=e=>async(t,r,n,a)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const s=new(a?.Err??e)(i.issues.map(u=>Wr(u,o,Qr())));throw Ag(s,a?.callee),s}return i.value},jo=e=>(t,r,n)=>{const a=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new wn;return o.issues.length?{success:!1,error:new(e??Ig)(o.issues.map(i=>Wr(i,a,Qr())))}:{success:!0,data:o.value}},qw=jo(Mg),Zo=e=>async(t,r,n)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(i=>Wr(i,a,Qr())))}:{success:!0,data:o.value}},Kw=Zo(Mg),Yw=e=>(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return nl(e)(t,r,a)},Qw=e=>(t,r,n)=>nl(e)(t,r,n),Xw=e=>async(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return al(e)(t,r,a)},Ww=e=>async(t,r,n)=>al(e)(t,r,n),Jw=e=>(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return jo(e)(t,r,a)},e2=e=>(t,r,n)=>jo(e)(t,r,n),t2=e=>async(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Zo(e)(t,r,a)},r2=e=>async(t,r,n)=>Zo(e)(t,r,n),n2=/^[cC][^\s-]{8,}$/,a2=/^[0-9a-z]+$/,o2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,i2=/^[0-9a-vA-V]{20}$/,s2=/^[A-Za-z0-9]{27}$/,u2=/^[a-zA-Z0-9_-]{21}$/,l2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,c2=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fg=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,d2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,f2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function m2(){return new RegExp(f2,"u")}const p2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,h2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,g2=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,y2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,b2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Og=/^[A-Za-z0-9_-]*$/,_2=/^\+[1-9]\d{6,14}$/,Bg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",v2=new RegExp(`^${Bg}$`);function Lg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function E2(e){return new RegExp(`^${Lg(e)}$`)}function D2(e){const t=Lg({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Bg}T(?:${n})$`)}const S2=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},C2=/^-?\d+$/,w2=/^-?\d+(?:\.\d+)?$/,x2=/^(?:true|false)$/i,$2=/^[^A-Z]*$/,A2=/^[^a-z]*$/,dt=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Rg={number:"number",bigint:"bigint",object:"date"},Ng=B("$ZodCheckLessThan",(e,t)=>{dt.init(e,t);const r=Rg[typeof t.value];e._zod.onattach.push(n=>{const a=n._zod.bag,o=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ug=B("$ZodCheckGreaterThan",(e,t)=>{dt.init(e,t);const r=Rg[typeof t.value];e._zod.onattach.push(n=>{const a=n._zod.bag,o=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),k2=B("$ZodCheckMultipleOf",(e,t)=>{dt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Iw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),T2=B("$ZodCheckNumberFormat",(e,t)=>{dt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[a,o]=Lw[t.format];e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,s.minimum=a,s.maximum=o,r&&(s.pattern=C2)}),e._zod.check=i=>{const s=i.value;if(r){if(!Number.isInteger(s)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?i.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):i.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<a&&i.issues.push({origin:"number",input:s,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),s>o&&i.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),P2=B("$ZodCheckMaxLength",(e,t)=>{var r;dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const a=n.value;return!el(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{const a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const a=n.value;if(a.length<=t.maximum)return;const i=rl(a);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),I2=B("$ZodCheckMinLength",(e,t)=>{var r;dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const a=n.value;return!el(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{const a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const a=n.value;if(a.length>=t.minimum)return;const i=rl(a);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),M2=B("$ZodCheckLengthEquals",(e,t)=>{var r;dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const a=n.value;return!el(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{const a=n._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=n=>{const a=n.value,o=a.length;if(o===t.length)return;const i=rl(a),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Go=B("$ZodCheckStringFormat",(e,t)=>{var r,n;dt.init(e,t),e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),F2=B("$ZodCheckRegex",(e,t)=>{Go.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),O2=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=$2),Go.init(e,t)}),B2=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=A2),Go.init(e,t)}),L2=B("$ZodCheckIncludes",(e,t)=>{dt.init(e,t);const r=xn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),R2=B("$ZodCheckStartsWith",(e,t)=>{dt.init(e,t);const r=new RegExp(`^${xn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),N2=B("$ZodCheckEndsWith",(e,t)=>{dt.init(e,t);const r=new RegExp(`.*${xn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),U2=B("$ZodCheckOverwrite",(e,t)=>{dt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class H2{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
35
+ }`.trim(),document.head.prepend(a);let i=c=>{if(!(c.touches.length===2||r)){if(!t||t===document.documentElement||t===document.body){c.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&c.preventDefault()}},s=c=>{let f=he(c),p=c.relatedTarget;p&&Is(p)?(p.focus({preventScroll:!0}),oh(p,Is(f))):p||f.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},u=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(c){let f=Ie(),p=f!=null&&Is(f);u.call(this,{...c,preventScroll:!0}),(!c||!c.preventScroll)&&oh(this,p)};let l=Qa(Gu(document,"touchstart",n,{passive:!1,capture:!0}),Gu(document,"touchmove",i,{passive:!1,capture:!0}),Gu(document,"blur",s,!0));return()=>{e(),l(),a.remove(),HTMLElement.prototype.focus=u}}function Ro(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function Gu(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function oh(e,t){t||!ma?ih(e):ma.addEventListener("resize",()=>ih(e),{once:!0})}function ih(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let n=Ao(r);if(n!==document.documentElement&&n!==document.body&&n!==r){let a=n.getBoundingClientRect(),o=r.getBoundingClientRect();if(o.top<a.top||o.bottom>a.top+r.clientHeight){let i=a.bottom;ma&&(i=Math.min(i,ma.offsetTop+ma.height));let s=o.top-a.top-((i-a.top)/2-o.height/2);n.scrollTo({top:Math.max(0,Math.min(n.scrollHeight-n.clientHeight,n.scrollTop+s)),behavior:"smooth"})}}r=n.parentElement}}function TC(e,t){let{triggerRef:r,popoverRef:n,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...u}=e,l=u.trigger==="SubmenuTrigger",{overlayProps:c,underlayProps:f}=xC({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||l,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},a??n),{overlayProps:p,arrowProps:h,placement:g,triggerAnchorPoint:y}=DC({...u,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:o&&!l?t.close:null});return $C({isDisabled:o||!t.isOpen}),d.useEffect(()=>{if(t.isOpen&&n.current)return o?cC(a?.current??n.current):lC([a?.current??n.current],{shouldUseInert:!0})},[o,t.isOpen,n,a]),{popoverProps:Ae(c,p),arrowProps:h,underlayProps:f,placement:g,triggerAnchorPoint:y}}var sh={};sh={dismiss:"تجاهل"};var uh={};uh={dismiss:"Отхвърляне"};var lh={};lh={dismiss:"Odstranit"};var ch={};ch={dismiss:"Luk"};var dh={};dh={dismiss:"Schließen"};var fh={};fh={dismiss:"Απόρριψη"};var mh={};mh={dismiss:"Dismiss"};var ph={};ph={dismiss:"Descartar"};var hh={};hh={dismiss:"Lõpeta"};var gh={};gh={dismiss:"Hylkää"};var yh={};yh={dismiss:"Rejeter"};var bh={};bh={dismiss:"התעלם"};var _h={};_h={dismiss:"Odbaci"};var vh={};vh={dismiss:"Elutasítás"};var Eh={};Eh={dismiss:"Ignora"};var Dh={};Dh={dismiss:"閉じる"};var Sh={};Sh={dismiss:"무시"};var Ch={};Ch={dismiss:"Atmesti"};var wh={};wh={dismiss:"Nerādīt"};var xh={};xh={dismiss:"Lukk"};var $h={};$h={dismiss:"Negeren"};var Ah={};Ah={dismiss:"Zignoruj"};var kh={};kh={dismiss:"Descartar"};var Th={};Th={dismiss:"Dispensar"};var Ph={};Ph={dismiss:"Revocare"};var Ih={};Ih={dismiss:"Пропустить"};var Mh={};Mh={dismiss:"Zrušiť"};var Fh={};Fh={dismiss:"Opusti"};var Oh={};Oh={dismiss:"Odbaci"};var Bh={};Bh={dismiss:"Avvisa"};var Lh={};Lh={dismiss:"Kapat"};var Rh={};Rh={dismiss:"Скасувати"};var Nh={};Nh={dismiss:"取消"};var Uh={};Uh={dismiss:"關閉"};var Hh={};Hh={"ar-AE":sh,"bg-BG":uh,"cs-CZ":lh,"da-DK":ch,"de-DE":dh,"el-GR":fh,"en-US":mh,"es-ES":ph,"et-EE":hh,"fi-FI":gh,"fr-FR":yh,"he-IL":bh,"hr-HR":_h,"hu-HU":vh,"it-IT":Eh,"ja-JP":Dh,"ko-KR":Sh,"lt-LT":Ch,"lv-LV":wh,"nb-NO":xh,"nl-NL":$h,"pl-PL":Ah,"pt-BR":kh,"pt-PT":Th,"ro-RO":Ph,"ru-RU":Ih,"sk-SK":Mh,"sl-SI":Fh,"sr-SP":Oh,"sv-SE":Bh,"tr-TR":Lh,"uk-UA":Rh,"zh-CN":Nh,"zh-TW":Uh};function PC(e){return e&&e.__esModule?e.default:e}function Vh(e){let{onDismiss:t,...r}=e,n=sr(PC(Hh),"@react-aria/overlays"),a=zn(r,n.format("dismiss")),o=()=>{t&&t()};return d.createElement(Pu,null,d.createElement("button",{...a,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}function IC({children:e}){let t=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(Rs.Provider,{value:t},e)}const MC=d.createContext({});function FC(){return d.useContext(MC)??{}}const zh=d.createContext(null);function jh(e){let t=_s(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[a,o]=d.useState(!1),i=d.useMemo(()=>({contain:a,setContain:o}),[a,o]),{getContainer:s}=FC();if(!e.portalContainer&&s&&(r=s()),!r)return null;let u=e.children;return e.disableFocusManagement||(u=d.createElement(XS,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!n},u)),u=d.createElement(zh.Provider,{value:i},d.createElement(IC,null,u)),Vl.createPortal(u,r)}function OC(){let t=d.useContext(zh)?.setContain;$e(()=>{t?.(!0)},[t])}function Zh(e){let[t,r]=Zn(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const n=d.useCallback(()=>{r(!0)},[r]),a=d.useCallback(()=>{r(!1)},[r]),o=d.useCallback(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:a,toggle:o}}function BC(e,t=!0){let[r,n]=d.useState(!0),a=r&&t;return $e(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let o of e.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[e,a]),Gh(e,a,d.useCallback(()=>n(!1),[])),a}function LC(e,t){let[r,n]=d.useState(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open");break}let a=r==="exiting";return Gh(e,a,d.useCallback(()=>{n(o=>o==="exiting"?"closed":o)},[])),a}function Gh(e,t,r){$e(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){r();return}let n=e.current.getAnimations();if(n.length===0){r();return}let a=!1;return Promise.allSettled(n.map(o=>o.finished)).then(()=>{a||Vl.flushSync(()=>{r()})}),()=>{a=!0}}},[e,t,r])}const qh=d.createContext(null),Kh=d.createContext(null),RC=d.forwardRef(function(t,r){[t,r]=jt(t,r,qh);let n=d.useContext(qu),a=Zh(t),o=t.isOpen!=null||t.defaultOpen!=null||!n?a:n,i=LC(r,o.isOpen)||t.isExiting||!1,s=GE(),{direction:u}=Je();if(s){let l=t.children;return typeof l=="function"&&(l=l({trigger:t.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!i?null:d.createElement(NC,{...t,triggerRef:t.triggerRef,state:o,popoverRef:r,isExiting:i,dir:u})});function NC({state:e,isExiting:t,UNSTABLE_portalContainer:r,clearContexts:n,...a}){let o=d.useRef(null),i=d.useRef(null),s=d.useContext(Kh),u=s&&a.trigger==="SubmenuTrigger",{popoverProps:l,underlayProps:c,arrowProps:f,placement:p,triggerAnchorPoint:h}=TC({...a,offset:a.offset??8,arrowRef:o,groupRef:u?s:i},e),g=a.popoverRef,y=BC(g,!!p)||a.isEntering||!1,_=zt({...a,defaultClassName:"react-aria-Popover",values:{trigger:a.trigger||null,placement:p,isEntering:y,isExiting:t}}),D=!a.isNonModal||a.trigger==="SubmenuTrigger",[w,b]=d.useState(!1);$e(()=>{g.current&&b(D&&!g.current.querySelector("[role=dialog]"))},[g,D]),d.useEffect(()=>{w&&(a.trigger!=="SubmenuTrigger"||oo()!=="pointer")&&g.current&&!Ds(g.current)&&Gn(g.current)},[w,g,a.trigger]);let C=d.useMemo(()=>{let Z=_.children;if(n)for(let M of n)Z=d.createElement(M.Provider,{value:null},Z);return Z},[_.children,n]),[v,k]=d.useState(null),I=d.useCallback(()=>{a.triggerRef.current&&k(a.triggerRef.current.getBoundingClientRect().width+"px")},[a.triggerRef]);$e(I,[I]),ju({ref:_.style?.["--trigger-width"]?void 0:a.triggerRef,onResize:I});let G={...l.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,..._.style,"--trigger-width":_.style?.["--trigger-width"]||v},O=d.createElement(st.div,{...Ae(et(a,{global:!0}),l),..._,role:w?"dialog":void 0,tabIndex:w?-1:void 0,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],ref:g,slot:a.slot||void 0,style:G,dir:a.dir,"data-trigger":a.trigger,"data-placement":p,"data-entering":y||void 0,"data-exiting":t||void 0},!a.isNonModal&&d.createElement(Vh,{onDismiss:e.close}),d.createElement(sC.Provider,{value:{...f,placement:p,ref:o}},C),d.createElement(Vh,{onDismiss:e.close}));return u?d.createElement(jh,{...a,shouldContainFocus:w,isExiting:t,portalContainer:r??s?.current??void 0},O):d.createElement(jh,{...a,shouldContainFocus:w,isExiting:t,portalContainer:r},!a.isNonModal&&e.isOpen&&d.createElement("div",{"data-testid":"underlay",...c,style:{position:"fixed",inset:0}}),d.createElement("div",{ref:i,style:{display:"contents"}},d.createElement(Kh.Provider,{value:i},O)))}function UC(e,t){let{role:r="dialog"}=e,n=Xa();n=e["aria-label"]?void 0:n;let a=d.useRef(!1);return d.useEffect(()=>{if(t.current&&!Ds(t.current)){Gn(t.current);let o=setTimeout(()=>{(Ie()===t.current||Ie()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),Gn(t.current)),a.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),OC(),d.useRef(!1),d.useEffect(()=>{}),{dialogProps:{...et(e,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||n,onBlur:o=>{a.current&&o.stopPropagation()}},titleProps:{id:n}}}const Yh=d.createContext(null),qu=d.createContext(null),HC=d.forwardRef(function(t,r){let n=t["aria-labelledby"];[t,r]=jt(t,r,Yh);let{dialogProps:a,titleProps:o}=UC({...t,"aria-labelledby":n},r),i=d.useContext(qu);!a["aria-label"]&&!a["aria-labelledby"]&&t["aria-labelledby"]&&(a["aria-labelledby"]=t["aria-labelledby"]);let s=zt({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:i?.close||(()=>{})}}),u=et(t,{global:!0});return d.createElement(st.section,{...Ae(u,s,a),render:t.render,ref:r,slot:t.slot||void 0},d.createElement(Wa,{values:[[Ys,{slots:{[Es]:{},title:{...o,level:2}}}],[Qn,{slots:{[Es]:{},close:{onPress:()=>i?.close()}}}]]},s.children))});function VC(e){let t=iC({usage:"search",...e}),r=d.useCallback((o,i)=>i.length===0?!0:(o=o.normalize("NFC"),i=i.normalize("NFC"),t.compare(o.slice(0,i.length),i)===0),[t]),n=d.useCallback((o,i)=>i.length===0?!0:(o=o.normalize("NFC"),i=i.normalize("NFC"),t.compare(o.slice(-i.length),i)===0),[t]),a=d.useCallback((o,i)=>{if(i.length===0)return!0;o=o.normalize("NFC"),i=i.normalize("NFC");let s=0,u=i.length;for(;s+u<=o.length;s++){let l=o.slice(s,s+u);if(t.compare(i,l)===0)return!0}return!1},[t]);return d.useMemo(()=>({startsWith:r,endsWith:n,contains:a}),[r,n,a])}const zC=["day","month","year"],jC={hour:1,minute:2,second:3};function ZC(e,t){let{autoComplete:r,isDisabled:n,name:a}=e,{visuallyHiddenProps:o}=Xm({style:{position:"fixed",top:0,left:0}}),i=60;t.granularity==="second"?i=1:t.granularity==="hour"&&(i=3600);let s="";t.value&&(t.granularity==="day"?s=ot(t.value).toString():s=Kt("timeZone"in t.value?MD(t.value):t.value).toString());let u=t.granularity==="day"?"date":"datetime-local",l=["hour","minute","second"],c=0;return l.includes(t.granularity)&&(c=jC[t.granularity],l=l.slice(0,c)),{containerProps:{...o,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{tabIndex:-1,autoComplete:r,disabled:n,type:u,form:"",name:a,step:i,value:s,onChange:f=>{let p=he(f).value.toString();if(p)try{let h=VD(p);if(t.granularity==="day"&&(h=bm(p)),"setSegment"in t)for(let g in h)zC.includes(g)&&t.setSegment(g,h[g]),l.includes(g)&&t.setSegment(g,h[g]);t.setValue(h)}catch{}}}}}function GC(e){let{state:t}=e,{containerProps:r,inputProps:n}=ZC({...e},t);return d.createElement("div",{...r,"data-testid":"hidden-dateinput-container"},d.createElement("input",n))}var Qh={};Qh={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var Xh={};Xh={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var Wh={};Wh={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var Jh={};Jh={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var e0={};e0={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var t0={};t0={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var r0={};r0={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var n0={};n0={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var a0={};a0={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var o0={};o0={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var i0={};i0={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var s0={};s0={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var u0={};u0={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var l0={};l0={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var c0={};c0={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var d0={};d0={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var f0={};f0={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var m0={};m0={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var p0={};p0={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var h0={};h0={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var g0={};g0={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var y0={};y0={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var b0={};b0={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var _0={};_0={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var v0={};v0={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var E0={};E0={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var D0={};D0={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var S0={};S0={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var C0={};C0={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var w0={};w0={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var x0={};x0={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var $0={};$0={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var A0={};A0={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var k0={};k0={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var No={};No={"ar-AE":Qh,"bg-BG":Xh,"cs-CZ":Wh,"da-DK":Jh,"de-DE":e0,"el-GR":t0,"en-US":r0,"es-ES":n0,"et-EE":a0,"fi-FI":o0,"fr-FR":i0,"he-IL":s0,"hr-HR":u0,"hu-HU":l0,"it-IT":c0,"ja-JP":d0,"ko-KR":f0,"lt-LT":m0,"lv-LV":p0,"nb-NO":h0,"nl-NL":g0,"pl-PL":y0,"pt-BR":b0,"pt-PT":_0,"ro-RO":v0,"ru-RU":E0,"sk-SK":D0,"sl-SI":S0,"sr-SP":C0,"sv-SE":w0,"tr-TR":x0,"uk-UA":$0,"zh-CN":A0,"zh-TW":k0};function T0(e,t,r){let{direction:n}=Je(),a=d.useMemo(()=>Lu(t),[t]),o=u=>{if(Ce(u.currentTarget,he(u))&&(u.altKey&&(u.key==="ArrowDown"||u.key==="ArrowUp")&&"setOpen"in e&&(u.preventDefault(),u.stopPropagation(),e.setOpen(!0)),!r))switch(u.key){case"ArrowLeft":if(u.preventDefault(),u.stopPropagation(),n==="rtl"){if(t.current){let l=he(u),c=P0(t.current,l.getBoundingClientRect().left,-1);c&&c.focus()}}else a.focusPrevious();break;case"ArrowRight":if(u.preventDefault(),u.stopPropagation(),n==="rtl"){if(t.current){let l=he(u),c=P0(t.current,l.getBoundingClientRect().left,1);c&&c.focus()}}else a.focusNext();break}},i=()=>{if(!t.current)return;let u=window.event?he(window.event):null,l=lt(t.current,{tabbable:!0});if(u&&(l.currentNode=u,u=l.previousNode()),!u){let c;do c=l.lastChild(),c&&(u=c);while(c)}for(;u?.hasAttribute("data-placeholder");){let c=l.previousNode();if(c&&c.hasAttribute("data-placeholder"))u=c;else break}u&&u.focus()},{pressProps:s}=Ns({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(u){u.pointerType==="mouse"&&i()},onPress(u){(u.pointerType==="touch"||u.pointerType==="pen")&&i()}});return Ae(s,{onKeyDown:o})}function P0(e,t,r){let n=lt(e,{tabbable:!0}),a=n.nextNode(),o=null,i=1/0;for(;a;){let u=a.getBoundingClientRect().left-t,l=Math.abs(u);Math.sign(u)===r&&l<i&&(o=a,i=l),a=n.nextNode()}return o}function qC(e){return e&&e.__esModule?e.default:e}const I0=new WeakMap,Uo="__reactAriaDateFieldRole",KC="__reactAriaDateFieldFocusManager";function YC(e,t,r){let{isInvalid:n,validationErrors:a,validationDetails:o}=t.displayValidation,{labelProps:i,fieldProps:s,descriptionProps:u,errorMessageProps:l}=op({...e,labelElementType:"span",isInvalid:n,errorMessage:e.errorMessage||a}),c=d.useRef(null),{focusWithinProps:f}=qn({...e,onFocusWithin(O){c.current=t.value,e.onFocus?.(O)},onBlurWithin:O=>{t.confirmPlaceholder(),t.value!==c.current&&t.commitValidation(),e.onBlur?.(O)},onFocusWithinChange:e.onFocusChange}),p=sr(qC(No),"@react-aria/datepicker"),h=t.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",g=t.maxGranularity==="hour"?"time":"date",y=t.value?p.format(h,{[g]:t.formatValue({month:"long"})}):"",_=Au(y),D=e[Uo]==="presentation"?s["aria-describedby"]:[_["aria-describedby"],s["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[KC],b=d.useMemo(()=>w||Lu(r),[w,r]),C=T0(t,r,e[Uo]==="presentation");I0.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[i.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:D,focusManager:b});let v=d.useRef(e.autoFocus),k;e[Uo]==="presentation"?k={role:"presentation"}:k=Ae(s,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":D}),d.useEffect(()=>{v.current&&b.focusFirst(),v.current=!1},[b]),HS(e.inputRef,t.defaultValue,t.setValue),VS({...e,focus(){b.focusFirst()}},t,e.inputRef);let I={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};e.validationBehavior==="native"&&(I.type="text",I.hidden=!0,I.required=e.isRequired,I.onChange=()=>{});let G=et(e);return{labelProps:{...i,onClick:()=>{b.focusFirst()}},fieldProps:Ae(G,k,C,f,{onKeyDown(O){e.onKeyDown&&e.onKeyDown(O)},onKeyUp(O){e.onKeyUp&&e.onKeyUp(O)},style:{unicodeBidi:"isolate"}}),inputProps:I,descriptionProps:u,errorMessageProps:l,isInvalid:n,validationErrors:a,validationDetails:o}}function QC(e){return e&&e.__esModule?e.default:e}function XC(){let{locale:e}=Je(),t=Ud(QC(No),"@react-aria/datepicker");return d.useMemo(()=>{try{return new Intl.DisplayNames(e,{type:"dateTimeField"})}catch{return new WC(e,t)}},[e,t])}class WC{constructor(t,r){this.locale=t,this.dictionary=r}of(t){return this.dictionary.getStringForLocale(t,this.locale)}}function JC(e,t,r){let n=d.useRef(""),{locale:a,direction:o}=Je(),i=XC(),{ariaLabel:s,ariaLabelledBy:u,ariaDescribedBy:l,focusManager:c}=I0.get(t),f=e.isPlaceholder?"":e.text,p=d.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),h=St({month:"long",timeZone:p.timeZone}),g=St({hour:"numeric",hour12:p.hour12,timeZone:p.timeZone});if(e.type==="month"&&!e.isPlaceholder){let T=h.format(t.dateValue);f=T!==f?`${f} – ${T}`:T}else e.type==="hour"&&!e.isPlaceholder&&(f=g.format(t.dateValue));let{spinButtonProps:y}=YS({value:e.value??void 0,textValue:f,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{n.current="",t.increment(e.type)},onDecrement:()=>{n.current="",t.decrement(e.type)},onIncrementPage:()=>{n.current="",t.incrementPage(e.type)},onDecrementPage:()=>{n.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{n.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{n.current="",t.decrementToMin(e.type)}}),_=d.useMemo(()=>new sf(a,{maximumFractionDigits:0}),[a]),D=()=>{if(e.text===e.placeholder&&c.focusPrevious(),_.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let T=e.text.slice(0,-1),Y=_.parse(T);T=Y===0?"":T,T.length===0||Y===0?t.clearSegment(e.type):t.setSegment(e.type,Y),n.current=T}else(e.type==="dayPeriod"||e.type==="era")&&t.clearSegment(e.type)},w=T=>{if(T.key==="a"&&(mn()?T.metaKey:T.ctrlKey)&&T.preventDefault(),!(T.ctrlKey||T.metaKey||T.shiftKey||T.altKey))switch(T.key){case"Backspace":case"Delete":T.preventDefault(),T.stopPropagation(),D();break}},{startsWith:b}=VC({sensitivity:"base"}),C=St({hour:"numeric",hour12:!0}),v=d.useMemo(()=>{let T=new Date;return T.setHours(0),C.formatToParts(T).find(Y=>Y.type==="dayPeriod").value},[C]),k=d.useMemo(()=>{let T=new Date;return T.setHours(12),C.formatToParts(T).find(Y=>Y.type==="dayPeriod").value},[C]),I=St({year:"numeric",era:"narrow",timeZone:"UTC"}),G=d.useMemo(()=>{if(e.type!=="era")return[];let T=Me(new Ne(1,1,1),t.calendar),Y=t.calendar.getEras().map(te=>{let H=T.set({year:1,month:1,day:1,era:te}).toDate("UTC"),A=I.formatToParts(H).find(S=>S.type==="era").value;return{era:te,formatted:A}}),se=ew(Y.map(te=>te.formatted));if(se)for(let te of Y)te.formatted=te.formatted.slice(se);return Y},[I,t.calendar,e.type]),O=T=>{if(t.isDisabled||t.isReadOnly)return;let Y=n.current+T;switch(e.type){case"dayPeriod":if(b(v,T))t.setSegment("dayPeriod",0);else if(b(k,T))t.setSegment("dayPeriod",1);else break;c.focusNext();break;case"era":{let se=G.find(te=>b(te.formatted,T));se&&(t.setSegment("era",se.era),c.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!_.isValidPartialNumber(Y))return;let se=_.parse(Y),te=se;if(e.maxValue!==void 0&&se>e.maxValue&&(te=_.parse(T)),isNaN(se))return;t.setSegment(e.type,te),e.maxValue!==void 0&&(+(se+"0")>e.maxValue||Y.length>=String(e.maxValue).length)?(n.current="",c.focusNext()):n.current=Y;break}}},Z=()=>{n.current="",r.current&&Km(r.current,{containingElement:Ao(r.current)}),window.getSelection()?.collapse(r.current)},M=d.useRef(typeof document<"u"?document:null);Ms(M,"selectionchange",()=>{let T=window.getSelection();T?.anchorNode&&Ce(r.current,T?.anchorNode)&&T.collapse(r.current)});let X=d.useRef("");Ms(r,"beforeinput",T=>{if(r.current)switch(T.preventDefault(),T.inputType){case"deleteContentBackward":case"deleteContentForward":_.isValidPartialNumber(e.text)&&!t.isReadOnly&&D();break;case"insertCompositionText":X.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:T.data!=null&&O(T.data);break}}),Ms(r,"input",T=>{let{inputType:Y,data:se}=T;switch(Y){case"insertCompositionText":r.current&&(r.current.textContent=X.current),se!=null&&(b(v,se)||b(k,se))&&O(se);break}}),$e(()=>{let T=r.current;return()=>{Ie()===T&&(c.focusPrevious()||c.focusNext())}},[r,c]);let de=Hn()||e.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},x=d.useMemo(()=>t.segments.find(T=>T.isEditable),[t.segments]);e!==x&&!t.isInvalid&&(l=void 0);let z=Mt(),U=!t.isDisabled&&!t.isReadOnly&&e.isEditable,P=e.type==="literal"?"":i.of(e.type),K=zn({"aria-label":`${P}${s?`, ${s}`:""}${u?", ":""}`,"aria-labelledby":u});if(e.type==="literal")return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if(o==="rtl"){$.unicodeBidi="embed";let T=p[e.type];(T==="numeric"||T==="2-digit")&&($.direction="ltr")}return{segmentProps:Ae(y,K,{id:z,...de,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:U,suppressContentEditableWarning:U,spellCheck:U?"false":void 0,autoCorrect:U?"off":void 0,[parseInt(d.version,10)>=17?"enterKeyHint":"enterkeyhint"]:U?"next":void 0,inputMode:t.isDisabled||e.type==="dayPeriod"||e.type==="era"||!U?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:w,onFocus:Z,style:$,onPointerDown(T){T.stopPropagation()},onMouseDown(T){T.stopPropagation()}})}}function ew(e){e.sort();let t=e[0],r=e[e.length-1];for(let n=0;n<t.length;n++)if(t[n]!==r[n])return n;return 0}var M0={};M0={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var F0={};F0={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var O0={};O0={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var B0={};B0={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var L0={};L0={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var R0={};R0={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var N0={};N0={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var U0={};U0={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var H0={};H0={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var V0={};V0={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var z0={};z0={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var j0={};j0={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var Z0={};Z0={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var G0={};G0={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var q0={};q0={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var K0={};K0={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var Y0={};Y0={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이후여야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var Q0={};Q0={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var X0={};X0={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var W0={};W0={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var J0={};J0={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var eg={};eg={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var tg={};tg={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var rg={};rg={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var ng={};ng={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var ag={};ag={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var og={};og={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var ig={};ig={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var sg={};sg={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var ug={};ug={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var lg={};lg={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var cg={};cg={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var dg={};dg={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var fg={};fg={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var mg={};mg={"ar-AE":M0,"bg-BG":F0,"cs-CZ":O0,"da-DK":B0,"de-DE":L0,"el-GR":R0,"en-US":N0,"es-ES":U0,"et-EE":H0,"fi-FI":V0,"fr-FR":z0,"he-IL":j0,"hr-HR":Z0,"hu-HU":G0,"it-IT":q0,"ja-JP":K0,"ko-KR":Y0,"lt-LT":Q0,"lv-LV":X0,"nb-NO":W0,"nl-NL":J0,"pl-PL":eg,"pt-BR":tg,"pt-PT":rg,"ro-RO":ng,"ru-RU":ag,"sk-SK":og,"sl-SI":ig,"sr-SP":sg,"sv-SE":ug,"tr-TR":lg,"uk-UA":cg,"zh-CN":dg,"zh-TW":fg};function tw(e){return e&&e.__esModule?e.default:e}const rw=new Nr(tw(mg));function nw(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function pg(e,t,r,n,a){let o=e!=null&&r!=null&&e.compare(r)>0,i=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&n?.(e)||!1,u=o||i||s,l=[];if(u){let c=nw(),f=Nr.getGlobalDictionaryForPackage("@react-stately/datepicker")||rw,p=new Rd(c,f),h=new Qt(c,Sn({},a)),g=h.resolvedOptions().timeZone;i&&t!=null&&l.push(p.format("rangeUnderflow",{minValue:h.format(t.toDate(g))})),o&&r!=null&&l.push(p.format("rangeOverflow",{maxValue:h.format(r.toDate(g))})),s&&l.push(p.format("unavailableDate"))}return{isInvalid:u,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:o,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!u}}}const aw={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},ow={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function Sn(e,t){e={...t.shouldForceLeadingZeros?ow:aw,...e};let n=t.granularity||"minute",a=Object.keys(e),o=a.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=a.indexOf(n);if(i<0&&(i=2),o>i)throw new Error("maxGranularity must be greater than granularity");let s=a.slice(o,i+1).reduce((l,c)=>(l[c]=e[c],l),{});return t.hourCycle!=null&&(s.hour12=t.hourCycle===12),s.timeZone=t.timeZone||"UTC",(n==="hour"||n==="minute"||n==="second")&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&o===0&&(s.era="short"),s}function hg(e){return e&&"hour"in e?e:new cu}function gg(e,t){if(e===null)return null;if(e)return Me(e,t)}function iw(e,t,r,n){if(e)return gg(e,r);let a=Me(Xf(n??ho()).set({hour:0,minute:0,second:0,millisecond:0}),r);return t==="year"||t==="month"||t==="day"?ot(a):n?a:Kt(a)}function yg(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[a,o]=d.useState([n,r]);e&&(a[0]!==n||a[1]!==r)&&o([n,r]),t||(t=e?n:a[0]);let i=e?r:a[1];return[t,i]}const sw=new Nr({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"áááá",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"åååå",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},"sr-Latn":{year:"gggg",month:"mm",day:"dd"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function uw(e,t,r){return e==="era"||e==="dayPeriod"?t:e==="year"||e==="month"||e==="day"?sw.getStringForLocale(e,r):"––"}class Bt{constructor(t,r,n){if(this.era=n?.era??null,this.calendar=t,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=r,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset="offset"in(n??{})?n.offset:null,this.hour!=null){let[a,o]=Cn(this.hour,r);this.dayPeriod=a,this.hour=o}}copy(){let t=new Bt(this.calendar,this.hourCycle);return t.era=this.era,t.year=this.year,t.month=this.month,t.day=this.day,t.hour=this.hour,t.dayPeriod=this.dayPeriod,t.minute=this.minute,t.second=this.second,t.millisecond=this.millisecond,t.offset=this.offset,t}isComplete(t){return t.every(r=>this[r]!=null)}validate(t,r){return r.every(n=>{if((n==="hour"||n==="dayPeriod")&&"hour"in t){let[a,o]=Cn(t.hour,this.hourCycle);return this.dayPeriod===a&&this.hour===o}return this[n]===t[n]})}isCleared(t){return t.every(r=>this[r]===null)}set(t,r,n){let a=this.copy();return a[t]=r,t==="hour"&&a.dayPeriod==null&&"hour"in n&&(a.dayPeriod=Cn(n.hour,this.hourCycle)[0]),t==="year"&&a.era==null&&(a.era=n.era),t!=="second"&&t!=="literal"&&t!=="timeZoneName"&&(a.offset=null),a}clear(t){let r=this.copy();return r[t]=null,t==="year"&&(r.era=null),r.offset=null,r}cycle(t,r,n,a){let o=this.copy();if(o[t]==null&&t!=="dayPeriod"&&t!=="era"){if(t==="hour"&&"hour"in n){let[i,s]=Cn(n.hour,this.hourCycle);o.dayPeriod=i,o.hour=s}else o[t]=n[t];return t==="year"&&o.era==null&&(o.era=n.era),o}switch(t){case"era":{let i=this.calendar.getEras(),s=i.indexOf(o.era);s=Kr(s,r,0,i.length-1),o.era=i[s];break}case"year":{let i=new Ne(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);i=i.cycle(t,r,{round:t==="year"}),o.era=i.era,o.year=i.year;break}case"month":o.month=Kr(o.month??1,r,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=Kr(o.day??1,r,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let i=a.some(s=>["year","month","day"].includes(s));if("timeZone"in n&&(!i||o.year!=null&&o.month!=null&&o.day!=null)){let s=this.toValue(n);s=s.cycle("hour",r,{hourCycle:this.hourCycle==="h12"?12:24,round:!1});let[u,l]=Cn(s.hour,this.hourCycle);o.hour=l,o.dayPeriod=u,o.offset=s.offset}else{let s=o.hour??0,u=this.getSegmentLimits("hour");o.hour=Kr(s,r,u.minValue,u.maxValue),o.dayPeriod==null&&"hour"in n&&(o.dayPeriod=Cn(n.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=Kr(o.dayPeriod??0,r,0,1);break;case"minute":o.minute=Kr(o.minute??0,r,0,59,!0);break;case"second":o.second=Kr(o.second??0,r,0,59,!0);break}return o}toValue(t){if("hour"in t){let r=this.hour;r!=null?r=lw(r,this.dayPeriod??0,this.hourCycle):(this.hourCycle==="h12"||this.hourCycle==="h11")&&(r=this.dayPeriod===1?12:0);let n=t.set({era:this.era??t.era,year:this.year??t.year,month:this.month??t.month,day:this.day??t.day,hour:r??t.hour,minute:this.minute??t.minute,second:this.second??t.second,millisecond:this.millisecond??t.millisecond});return"offset"in n&&this.offset!=null&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}else return t.set({era:this.era??t.era,year:this.year??t.year,month:this.month??t.month,day:this.day??t.day})}getSegmentLimits(t){switch(t){case"era":{let r=this.calendar.getEras();return{value:this.era!=null?r.indexOf(this.era):r.length-1,minValue:0,maxValue:r.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let r=0,n=23;return this.hourCycle==="h12"?(r=1,n=12):this.hourCycle==="h11"&&(r=0,n=11),{value:this.hour,minValue:r,maxValue:n}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function Kr(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function Cn(e,t){let r=e>=12?1:0;switch(t){case"h11":e>=12&&(e-=12);break;case"h12":e===0?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}function lw(e,t,r){switch(r){case"h11":t===1&&(e+=12);break;case"h12":e===12&&(e=0),t===1&&(e+=12);break;case"h24":e-=1;break}return e}const Ku={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},bg={year:5,month:2,day:7,hour:2,minute:15,second:15},cw={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function dw(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:a=!1,isReadOnly:o=!1,isRequired:i=!1,minValue:s,maxValue:u,isDateUnavailable:l}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[f,p]=yg(c,e.granularity),h=p||"UTC";if(c&&!(f in c))throw new Error("Invalid granularity "+f+" for value "+c.toString());let[g,y]=d.useMemo(()=>{let E=new Qt(t,{dateStyle:"short",timeStyle:"short",hour12:e.hourCycle!=null?e.hourCycle===12:void 0}).resolvedOptions();return[r(E.calendar),E.hourCycle]},[t,e.hourCycle,r]),[_,D]=Zn(e.value,e.defaultValue??null,e.onChange),[w]=d.useState(_),b=d.useMemo(()=>gg(_,g)??null,[_,g]),[C,v]=d.useState(()=>new Bt(g,y,b)),k=g.identifier==="gregory"&&C.era==="BC",I=d.useMemo(()=>({granularity:f,maxGranularity:e.maxGranularity??"year",timeZone:p,hideTimeZone:n,hourCycle:e.hourCycle,showEra:k,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,p,n,k]),G=d.useMemo(()=>Sn({},I),[I]),O=d.useMemo(()=>new Qt(t,G),[t,G]),Z=d.useMemo(()=>O.resolvedOptions(),[O]),M=d.useMemo(()=>iw(e.placeholderValue,f,g,p),[e.placeholderValue,f,g,p]),X=d.useMemo(()=>{let S=y==="h11"||y==="h12",E=["era","year","month","day","hour",...S?["dayPeriod"]:[],"minute","second"],j=E.indexOf(e.maxGranularity||"era"),q=E.indexOf(f==="hour"&&S?"dayPeriod":f);return E.slice(j,q+1)},[e.maxGranularity,f,y]),[de,x]=d.useState(b),[z,U]=d.useState(g),[P,K]=d.useState(y);(b!==de||y!==P||!po(g,z))&&(C=new Bt(g,y,b),x(b),U(g),K(y),v(C));let $=S=>{if(!(e.isDisabled||e.isReadOnly))if(S==null||S instanceof Bt&&S.isCleared(X))v(new Bt(g,y,b)),D(null);else if(!(S instanceof Bt))S=Me(S,c?.calendar||new at),v(new Bt(g,y,b)),D(S);else{if(S.isComplete(X)){let E=S.toValue(b??M);if(S.validate(E,X)){let j=Me(E,c?.calendar||new at);if(!_||j.compare(_)!==0){v(new Bt(g,y,b)),D(j);return}}}v(S)}},T=d.useMemo(()=>C.toValue(b??M).toDate(h),[C,h,b,M]),Y=d.useMemo(()=>fw(T,C,O,Z,g,t,f),[T,O,Z,C,g,t,f]),se=(S,E)=>{$(C.cycle(S,E,M,X))},te=d.useMemo(()=>pg(_,s,u,l,I),[_,s,u,l,I]),H=np({...e,value:_,builtinValidation:te}),Q=H.displayValidation.isInvalid,A=e.validationState||(Q?"invalid":null);return{...H,value:b,defaultValue:e.defaultValue??w,dateValue:T,calendar:g,setValue:$,segments:Y,dateFormatter:O,validationState:A,isInvalid:Q,granularity:f,maxGranularity:e.maxGranularity??"year",isDisabled:a,isReadOnly:o,isRequired:i,increment(S){se(S,1)},decrement(S){se(S,-1)},incrementPage(S){se(S,bg[S]||1)},decrementPage(S){se(S,-(bg[S]||1))},incrementToMax(S){let E=S==="hour"&&y==="h12"?11:C.getSegmentLimits(S).maxValue;$(C.set(S,E,M))},decrementToMin(S){let E=S==="hour"&&y==="h12"?12:C.getSegmentLimits(S).minValue;$(C.set(S,E,M))},setSegment(S,E){$(C.set(S,E,M))},confirmPlaceholder(){if(!(e.isDisabled||e.isReadOnly)&&C.isComplete(X)){let S=C.toValue(b??M),E=Me(S,c?.calendar||new at);(!_||E.compare(_)!==0)&&D(E),v(new Bt(g,y,b))}},clearSegment(S){let E=C;S!=="timeZoneName"&&S!=="literal"&&(E=C.clear(S)),$(E)},formatValue(S){if(!b)return"";let E=Sn(S,I);return new Qt(t,E).format(T)},getDateFormatter(S,E){let j={...I,...E},q=Sn({},j);return new Qt(S,q)}}}function fw(e,t,r,n,a,o,i){let s=["hour","minute","second"],u=r.formatToParts(e),l=new Zs(o,{useGrouping:!1}),c=new Zs(o,{useGrouping:!1,minimumIntegerDigits:2});for(let p of u)if(p.type==="year"||p.type==="month"||p.type==="day"||p.type==="hour"){let h=t[p.type]??0;n[p.type]==="2-digit"?p.value=c.format(h):p.value=l.format(h)}let f=[];for(let p of u){let h=cw[p.type]||p.type,g=Ku[h];h==="era"&&a.getEras().length===1&&(g=!1);let y=Ku[h]&&t[p.type]==null,_=Ku[h]?uw(h,p.value,o):null,D={type:h,text:y?_:p.value,...t.getSegmentLimits(h),isPlaceholder:y,placeholder:_,isEditable:g};h==="hour"?(f.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),f.push(D),h===i&&f.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(h)&&h===i?(f.push(D),f.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):f.push(D)}return f}const _g=d.createContext(null),Ho=d.createContext(null),Yu=d.createContext(null),mw=d.forwardRef(function(t,r){let n=d.useContext(Ho),a=d.useContext(Yu);return n||a?d.createElement(vg,{...t,ref:r}):d.createElement(pw,{...t,ref:r})}),pw=d.forwardRef((e,t)=>{let[r,n]=jt({slot:e.slot},t,_g),{locale:a}=Je(),o=dw({...r,locale:a,createCalendar:jm}),i=d.useRef(null),{fieldProps:s,inputProps:u}=YC({...r,inputRef:i},o,n);return d.createElement(Wa,{values:[[Ho,o],[sp,{...u,ref:i}],[Io,{...s,ref:n,isInvalid:o.isInvalid,isDisabled:o.isDisabled}]]},d.createElement(vg,e))}),vg=d.forwardRef((e,t)=>{let{className:r,children:n}=e,a=d.useContext(Ho),o=d.useContext(Yu),i=a??o;return d.createElement(d.Fragment,null,d.createElement(ip,{...e,ref:t,slot:e.slot||void 0,className:r??"react-aria-DateInput",isReadOnly:i.isReadOnly,isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((s,u)=>d.cloneElement(n(s),{key:u}))),d.createElement(qS,{className:""}))}),hw=d.forwardRef(function({segment:t,...r},n){let a=d.useContext(Ho),o=d.useContext(Yu),i=a??o,s=_d(n),{segmentProps:u}=JC(t,i,s),{focusProps:l,isFocused:c,isFocusVisible:f}=gn(),{hoverProps:p,isHovered:h}=Kn({...r,isDisabled:i.isDisabled||t.type==="literal"}),g=zt({...r,values:{...t,isReadOnly:i.isReadOnly,isInvalid:i.isInvalid,isDisabled:i.isDisabled,isHovered:h,isFocused:c,isFocusVisible:f},defaultChildren:t.text,defaultClassName:"react-aria-DateSegment"});return d.createElement(st.span,{...Ae(et(r,{global:!0}),u,l,p),...g,style:u.style,ref:s,"data-placeholder":t.isPlaceholder||void 0,"data-invalid":i.isInvalid||void 0,"data-readonly":i.isReadOnly||void 0,"data-disabled":i.isDisabled||void 0,"data-type":t.type,"data-hovered":h||void 0,"data-focused":c||void 0,"data-focus-visible":f||void 0})});function gw(e){return e&&e.__esModule?e.default:e}function yw(e,t,r){let n=Mt(),a=Mt(),o=Mt(),i=sr(gw(No),"@react-aria/datepicker"),{isInvalid:s,validationErrors:u,validationDetails:l}=t.displayValidation,{labelProps:c,fieldProps:f,descriptionProps:p,errorMessageProps:h}=op({...e,labelElementType:"span",isInvalid:s,errorMessage:e.errorMessage||u}),g=T0(t,r),y=f["aria-labelledby"]||f.id,{locale:_}=Je(),D=t.formatValue(_,{month:"long"}),w=D?i.format("selectedDateDescription",{date:D}):"",b=Au(w),C=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=et(e),k=d.useMemo(()=>Lu(r),[r]),I=d.useRef(!1),{focusWithinProps:G}=qn({...e,isDisabled:t.isOpen,onBlurWithin:O=>{let Z=document.getElementById(a);Ce(Z,O.relatedTarget)||(I.current=!1,e.onBlur?.(O),e.onFocusChange?.(!1))},onFocusWithin:O=>{I.current||(I.current=!0,e.onFocus?.(O),e.onFocusChange?.(!0))}});return{groupProps:Ae(v,g,f,b,G,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":C,onKeyDown(O){t.isOpen||e.onKeyDown&&e.onKeyDown(O)},onKeyUp(O){t.isOpen||e.onKeyUp&&e.onKeyUp(O)}}),labelProps:{...c,onClick:()=>{k.focusFirst()}},fieldProps:{...f,id:o,[Uo]:"presentation","aria-describedby":C,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[Iu]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:h,buttonProps:{...b,id:n,"aria-haspopup":"dialog","aria-label":i.format("calendar"),"aria-labelledby":`${n} ${y}`,"aria-describedby":C,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${n} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:s,validationErrors:u,validationDetails:l}}function bw(e){let t=Zh(e),[r,n]=Zn(e.value,e.defaultValue||null,e.onChange),[a]=d.useState(r),o=r||e.placeholderValue||null,[i,s]=yg(o,e.granularity),u=r!=null?r.toDate(s??"UTC"):null,l=i==="hour"||i==="minute"||i==="second",c=e.shouldCloseOnSelect??!0,[f,p]=d.useState(null),[h,g]=d.useState(null);if(r&&(f=r,"hour"in r&&(h=r)),o&&!(i in o))throw new Error("Invalid granularity "+i+" for value "+o.toString());let y=r?.calendar.identifier==="gregory"&&r.era==="BC",_=d.useMemo(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:y}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,y]),{minValue:D,maxValue:w,isDateUnavailable:b}=e,C=d.useMemo(()=>pg(r,D,w,b,_),[r,D,w,b,_]),v=np({...e,value:r,builtinValidation:C}),k=v.displayValidation.isInvalid,I=e.validationState||(k?"invalid":null),G=(M,X)=>{n("timeZone"in X?X.set(ot(M)):Kt(M,X)),p(null),g(null),v.commitValidation()},O=M=>{let X=typeof c=="function"?c():c;l?h||X?G(M,h||hg(e.defaultValue||e.placeholderValue)):p(M):(n(M),v.commitValidation()),X&&t.setOpen(!1)},Z=M=>{f&&M?G(f,M):g(M)};return{...v,value:r,defaultValue:e.defaultValue??a,setValue:n,dateValue:f,timeValue:h,setDateValue:O,setTimeValue:Z,granularity:i,hasTime:l,...t,setOpen(M){!M&&!r&&f&&l&&G(f,h||hg(e.defaultValue||e.placeholderValue)),t.setOpen(M)},validationState:I,isInvalid:k,formatValue(M,X){if(!u)return"";let de=Sn(X,_);return new Qt(M,de).format(u)},getDateFormatter(M,X){let de={..._,...X},x=Sn({},de);return new Qt(M,x)}}}const _w=d.createContext(null),vw=d.createContext(null),Ew=[Io,Qn,af,Qs],Dw=d.forwardRef(function(t,r){[t,r]=jt(t,r,_w);let{validationBehavior:n}=Ja(US)||{},a=t.validationBehavior??n??"native",o=bw({...t,validationBehavior:a}),i=d.useRef(null),[s,u]=rE(!t["aria-label"]&&!t["aria-labelledby"]),{groupProps:l,labelProps:c,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:_,...D}=yw({...nE(t),label:u,validationBehavior:a},o,i),{focusProps:w,isFocused:b,isFocusVisible:C}=gn({within:!0}),v=zt({...t,values:{state:o,isFocusWithin:b,isFocusVisible:C,isDisabled:t.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1},defaultClassName:"react-aria-DatePicker"}),k=et(t,{global:!0});return delete k.id,d.createElement(Wa,{values:[[vw,o],[Io,{...l,ref:i,isInvalid:o.isInvalid}],[_g,f],[Qn,{...p,isPressed:o.isOpen}],[af,{...c,ref:s,elementType:"span"}],[To,g],[qu,o],[qh,{trigger:"DatePicker",triggerRef:i,placement:"bottom start",clearContexts:Ew}],[Yh,h],[Qs,{slots:{description:y,errorMessage:_}}],[BS,D]]},d.createElement(st.div,{...Ae(k,v,w),ref:r,slot:t.slot||void 0,"data-focus-within":b||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":t.isDisabled||void 0,"data-readonly":t.isReadOnly||void 0,"data-required":t.isRequired||void 0,"data-open":o.isOpen||void 0}),d.createElement(GC,{autoComplete:t.autoComplete,name:t.name,isDisabled:t.isDisabled,state:o}))});function Qu(e){if(typeof e!="string"||e.trim()==="")return null;try{return bm(e)}catch{return null}}function Sw(e){return{currentTarget:{value:e},target:{value:e}}}function Eg({label:e,value:t,items:r,onChange:n,className:a}){return m.jsx("select",{className:`date-picker-select ${a??""}`,"aria-label":e,value:String(t),onChange:o=>n(Number(o.currentTarget.value)),children:r.map(o=>m.jsx("option",{value:o.id,children:o.formatted},o.id))})}function Cw({id:e,label:t,hint:r,error:n,required:a,className:o,min:i,max:s,disabled:u,onChange:l,onFocus:c,onBlur:f,value:p,autoComplete:h,...g}){const y=d.useRef(null),_=Qu(p),D=Qu(i),w=Qu(s),b=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,C=`${e}-label`,v=e.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),k=["form-field",v?`form-field--${v}`:null,o].filter(Boolean).join(" ");return m.jsxs("div",{className:k,"data-field-id":e,children:[m.jsxs("span",{id:C,className:"form-label form-field__label",children:[t,a&&m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-red-600","aria-hidden":"true",children:[" ","*"]}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),m.jsxs(Dw,{className:"date-picker",value:_,minValue:D??void 0,maxValue:w??void 0,isDisabled:u,isRequired:a,isInvalid:!!n,autoComplete:h,"aria-labelledby":C,"aria-describedby":b,onFocus:I=>c?.(I),onBlur:I=>f?.(I),onChange:I=>l?.(Sw(I?I.toString():"")),children:[m.jsxs(ip,{className:`date-picker-group form-input ${n?"input-error":""}`,"data-input-id":e,"aria-describedby":b,"aria-invalid":!!n,"aria-labelledby":C,onClick:I=>{!u&&!I.target.closest("button")&&y.current?.click()},children:[m.jsx(mw,{className:"date-picker-input",children:I=>m.jsx(hw,{className:"date-picker-segment",segment:I})}),m.jsx(Ks,{ref:y,className:"date-picker-button","aria-label":`Open calendar for ${t}`,type:"button",children:m.jsx("span",{"aria-hidden":"true",children:"▾"})})]}),m.jsx("input",{id:`${e}-value`,type:"hidden",value:p??"",disabled:u,...g,readOnly:!0}),m.jsx(RC,{className:"date-picker-popover",placement:"bottom start",offset:6,shouldFlip:!0,children:m.jsx(HC,{className:"date-picker-dialog",children:m.jsxs(AS,{className:"date-picker-calendar",children:[m.jsxs("header",{className:"date-picker-calendar-header",children:[m.jsx(Ks,{className:"date-picker-nav-button",slot:"previous",type:"button",children:"‹"}),m.jsxs("div",{className:"date-picker-selects",children:[m.jsx(OS,{format:"long",children:({"aria-label":I,value:G,items:O,onChange:Z})=>m.jsx(Eg,{label:I,value:G,items:O,onChange:Z,className:"date-picker-select--month"})}),m.jsx(FS,{visibleYears:120,children:({"aria-label":I,value:G,items:O,onChange:Z})=>m.jsx(Eg,{label:I,value:G,items:O,onChange:Z,className:"date-picker-select--year"})}),m.jsx(yD,{className:"sr-only"})]}),m.jsx(Ks,{className:"date-picker-nav-button",slot:"next",type:"button",children:"›"})]}),m.jsxs(kS,{className:"date-picker-grid",children:[m.jsx(Wm,{children:I=>m.jsx(Jm,{className:"date-picker-header-cell",children:I})}),m.jsx(ep,{children:I=>m.jsx(MS,{className:"date-picker-cell",date:I})})]})]})})})]}),r&&m.jsx("p",{id:`${e}-hint`,className:"form-field__hint mt-1 text-sm text-slate-500",children:r}),n&&m.jsx("p",{id:`${e}-error`,className:"form-field__error mt-1 text-sm text-red-600",children:n})]})}function Yr({id:e,label:t,className:r,...n}){return m.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[m.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),m.jsx("span",{className:"checkbox-label",children:t})]})}function ww({onChoose:e,isSubmitting:t=!1}){const[r,n]=d.useState(!1),a=!r||t;return m.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[m.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),m.jsx(Yr,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:r,onChange:o=>n(o.target.checked),disabled:t,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),m.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[m.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),m.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),m.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 gap-3 mt-6 sm:grid-cols-2",children:[m.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>e(!0),disabled:a,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",a?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[t&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"I Consent"]}),m.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>e(!1),disabled:t,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function xw({name:e,value:t,checked:r,onChange:n,children:a}){return m.jsxs("label",{className:"radio-card",children:[m.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),m.jsx("span",{className:"radio-label",children:a})]})}function $w({legend:e,children:t,className:r,legendClassName:n,required:a}){return m.jsxs("fieldset",{className:r,children:[m.jsxs("legend",{className:`form-label mb-4 ${n||""}`,children:[e,a&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-red-600 ml-1","aria-hidden":"true",children:"*"}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),m.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function Aw({id:e,label:t,hint:r,error:n,required:a,className:o,placeholder:i="Select an option",options:s=[],value:u,onValueChange:l,onFocus:c,onBlur:f,disabled:p,...h}){const g=d.useRef(null),y=d.useRef(null),_=d.useRef(null),[D,w]=d.useState(!1),[b,C]=d.useState(""),[v,k]=d.useState(-1),[I,G]=d.useState("bottom"),O=Array.isArray(u)?String(u[0]??""):String(u??""),Z=s.find($=>$.value===O),M=`${e}-listbox`,X=v>=0?`${e}-option-${v}`:void 0,de=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,x=d.useMemo(()=>{const $=b.trim().toLowerCase();return!$||Z?.label===b?s:s.filter(T=>T.label.toLowerCase().includes($)||T.value.toLowerCase().includes($))},[s,b,Z?.label]);d.useEffect(()=>{C(Z?.label??"")},[Z?.label]),d.useEffect(()=>{if(!D)return;const $=T=>{g.current&&!g.current.contains(T.target)&&(w(!1),k(-1),C(Z?.label??""))};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[D,Z?.label]),d.useEffect(()=>{if(!D)return;const $=()=>{const T=y.current;if(!T)return;const Y=T.getBoundingClientRect(),se=window.innerHeight||document.documentElement.clientHeight,te=_.current?.scrollHeight??0,H=Math.min(te>0?te:256,se*.42,256),Q=8,A=se-Y.bottom-Q,S=Y.top-Q;G(A<H&&S>A?"top":"bottom")};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[x.length,D]);const z=()=>{if(p)return;w(!0);const $=x.findIndex(T=>T.value===O);k($>=0?$:-1)},U=$=>{$.disabled||(l?.($.value),C($.label),w(!1),k(-1),y.current?.focus())},P=$=>{if(!p)switch($.key){case"ArrowDown":if($.preventDefault(),!D){z();return}k(T=>Math.min(T+1,x.length-1));break;case"ArrowUp":if($.preventDefault(),!D){z();return}k(T=>T>0?T-1:-1);break;case"Enter":D&&v>=0&&x[v]&&($.preventDefault(),U(x[v]));break;case"Escape":D&&($.preventDefault(),w(!1),k(-1),C(Z?.label??""));break}},K=$=>{f?.($)};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("div",{ref:g,className:"combobox-wrapper",children:[m.jsx("input",{ref:y,id:e,className:`form-input combobox-input ${n?"input-error":""}`,value:b,placeholder:i,disabled:p,required:a,role:"combobox","aria-autocomplete":"list","aria-expanded":D&&x.length>0,"aria-controls":D&&x.length>0?M:void 0,"aria-activedescendant":X,"aria-invalid":!!n,"aria-describedby":de,autoComplete:"off",onFocus:$=>{c?.($),z()},onClick:z,onChange:$=>{C($.currentTarget.value),w(!0),k(-1)},onKeyDown:P,onBlur:K,...h,type:"text"}),m.jsx("span",{className:"combobox-caret","aria-hidden":"true"}),D&&m.jsx("div",{ref:_,id:M,className:"combobox-listbox","data-placement":I,role:"listbox",children:x.length>0?x.map(($,T)=>m.jsx("div",{id:`${e}-option-${T}`,className:"combobox-option","data-highlighted":T===v?"true":void 0,"data-selected":$.value===O?"true":void 0,tabIndex:-1,role:"option","aria-selected":$.value===O,"aria-disabled":$.disabled||void 0,onMouseDown:Y=>Y.preventDefault(),onMouseEnter:()=>k(T),onClick:()=>U($),children:$.label},`${$.value}-${T}`)):m.jsx("div",{className:"combobox-empty",role:"status",children:"No matches"})})]})})}function pa({id:e,label:t,hint:r,error:n,required:a,className:o,placeholder:i,options:s,children:u,...l}){const c=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!u;if(!f){const{onChange:p,value:h,defaultValue:g,disabled:y,onFocus:_,onBlur:D,name:w,autoFocus:b}=l,C=h??g??"";return m.jsx(Aw,{id:e,label:t,hint:r,error:n,required:a,className:o,placeholder:i,options:s,value:C,disabled:y,name:w,autoFocus:b,"aria-required":l["aria-required"],onFocus:_,onBlur:D,onValueChange:v=>{p?.({currentTarget:{value:v},target:{value:v}})}})}return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":c,required:a,...l,children:[i&&m.jsx("option",{value:"",disabled:!0,selected:!("value"in l),children:i}),f?u:s?.map(p=>m.jsx("option",{value:p.value,disabled:p.disabled,children:p.label},p.value))]})})}var Dg={apiKey:""};function kw(){try{typeof Dg<"u"&&Dg?.apiKey}catch{}return""}function Tw(){return new Promise((e,t)=>{if(window.google?.maps?.places){e();return}const r=document.querySelector('script[src*="maps.googleapis.com"]');if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(new Error("Failed to load Google Maps script")));return}const n=kw();if(!n){t(new Error("Google Maps API key not configured"));return}const a=document.createElement("script");a.src=`https://maps.googleapis.com/maps/api/js?key=${n}&libraries=places`,a.async=!0,a.defer=!0,a.onload=()=>e(),a.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(a)})}function Pw(e){const t={fullAddress:e.formatted_address};return e.address_components&&e.address_components.forEach(r=>{const n=r.types;n.includes("street_number")&&(t.streetNumber=r.long_name),n.includes("route")&&(t.streetName=r.long_name),n.includes("locality")&&(t.city=r.long_name),n.includes("administrative_area_level_1")&&(t.state=r.short_name),n.includes("postal_code")&&(t.zipCode=r.long_name),n.includes("country")&&(t.country=r.short_name)}),t}function Iw({id:e,label:t,hint:r,error:n,required:a,className:o,onChange:i,onPlaceSelect:s,value:u,...l}){const c=d.useRef(null),f=d.useRef(null),p=d.useRef(null),h=d.useRef(null),[g,y]=d.useState(!0),[_,D]=d.useState(u||""),[w,b]=d.useState([]),[C,v]=d.useState(!1),[k,I]=d.useState(-1),G=`${e}-suggestions`,O=k>=0?`${e}-suggestion-${k}`:void 0,Z=d.useRef([]),M=d.useRef(!1),X=d.useRef(-1);d.useEffect(()=>{Z.current=w},[w]),d.useEffect(()=>{M.current=C},[C]),d.useEffect(()=>{X.current=k},[k]),d.useEffect(()=>{u!==void 0&&D(String(u))},[u]);const de=d.useRef(null);d.useEffect(()=>{if(!c.current)return;let P=!0;return Tw().then(()=>{!P||!c.current||(f.current=new google.maps.places.AutocompleteService,p.current=new google.maps.places.PlacesService(document.createElement("div")),y(!1))}).catch(K=>{console.error("Error loading Google Maps:",K),y(!1)}),()=>{P=!1,de.current&&clearTimeout(de.current)}},[]);const x=P=>{const K=P.target.value;if(D(K),i?.(K),de.current&&clearTimeout(de.current),K.length<3){b([]),v(!1);return}de.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:K,types:["address"]},($,T)=>{T===google.maps.places.PlacesServiceStatus.OK&&$?(b($),v(!0),I(-1)):(b([]),v(!1))})},300)},z=P=>{if(!M.current||Z.current.length===0){P.key==="Escape"&&(v(!1),M.current=!1);return}switch(P.key){case"ArrowDown":P.preventDefault(),I(K=>{const $=K<Z.current.length-1?K+1:K;return X.current=$,$});break;case"ArrowUp":P.preventDefault(),I(K=>{const $=K>0?K-1:-1;return X.current=$,$});break;case"Enter":P.preventDefault(),X.current>=0&&X.current<Z.current.length&&U(Z.current[X.current]);break;case"Escape":P.preventDefault(),v(!1),M.current=!1;break}};d.useEffect(()=>{const P=K=>{h.current&&!h.current.contains(K.target)&&c.current&&!c.current.contains(K.target)&&(v(!1),M.current=!1)};if(C)return document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P)}},[C]);const U=P=>{p.current&&p.current.getDetails({placeId:P.place_id,fields:["address_components","formatted_address","geometry"]},(K,$)=>{if($===google.maps.places.PlacesServiceStatus.OK&&K){const T=K.formatted_address||"";D(T),v(!1),b([]),M.current=!1;const Y=Pw(K);i?.(T,Y),s?.(K)}})};return m.jsx(gt,{id:e,label:t,hint:r,error:n,required:a,className:o,children:m.jsxs("div",{className:"relative",children:[m.jsx("input",{ref:c,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:_,onChange:x,onKeyDown:z,role:"combobox","aria-autocomplete":"list","aria-expanded":C&&w.length>0,"aria-controls":C&&w.length>0?G:void 0,"aria-activedescendant":O,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:a,autoComplete:"street-address",placeholder:l.placeholder||"Enter an address",disabled:g||l.disabled,...l}),g&&m.jsx("p",{className:"mt-1 text-sm text-slate-500",role:"status","aria-live":"polite",children:"Loading address suggestions..."}),C&&w.length>0&&m.jsx("div",{id:G,ref:h,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:w.map((P,K)=>m.jsxs("div",{id:`${e}-suggestion-${K}`,className:`px-4 py-3 cursor-pointer transition-colors ${K===k?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${K<w.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":K===k,onMouseDown:$=>$.preventDefault(),onClick:()=>U(P),onMouseEnter:()=>I(K),children:[m.jsx("div",{className:"font-medium text-slate-900",children:P.structured_formatting.main_text}),P.structured_formatting.secondary_text&&m.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:P.structured_formatting.secondary_text})]},P.place_id))})]})})}function Xu(e){const t=(r,n)=>r.map((a,o)=>{const i=n.length?n.join("__"):"root",s=a.key??`${i}__q${o}_${String(a.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,l=(a.conditionals??[]).map((c,f)=>{const p=c.conditionalQuestions?t(c.conditionalQuestions,[...n,`${s}__c${f}`]):void 0;return{...c,conditionalQuestions:p}});return{...a,key:s,conditionals:l}});return t(e,[])}function B(e,t,r){function n(s,u){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:u,constr:i,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,u);const l=i.prototype,c=Object.keys(l);for(let f=0;f<c.length;f++){const p=c[f];p in s||(s[p]=l[p].bind(s))}}const a=r?.Parent??Object;class o extends a{}Object.defineProperty(o,"name",{value:e});function i(s){var u;const l=r?.Parent?new o:this;n(l,s),(u=l._zod).deferred??(u.deferred=[]);for(const c of l._zod.deferred)c();return l}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class wn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Sg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Cg={};function Qr(e){return Cg}function wg(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,a])=>t.indexOf(+n)===-1).map(([n,a])=>a)}function Wu(e,t){return typeof t=="bigint"?t.toString():t}function Ju(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function el(e){return e==null}function tl(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Mw(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let a=(n.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(n)){const u=n.match(/\d?e-(\d?)/);u?.[1]&&(a=Number.parseInt(u[1]))}const o=r>a?r:a,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}const xg=Symbol("evaluating");function ke(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==xg)return n===void 0&&(n=xg,n=r()),n},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Xr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function pr(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function $g(e){return JSON.stringify(e)}function Fw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ag="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ow=Ju(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ha(e){if(Vo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Vo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function kg(e){return ha(e)?{...e}:Array.isArray(e)?[...e]:e}const Bw=new Set(["string","number","symbol"]);function xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hr(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Lw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Rw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Nw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=pr(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Xr(this,"shape",i),i},checks:[]});return hr(e,o)}function Uw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=pr(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Xr(this,"shape",i),i},checks:[]});return hr(e,o)}function Hw(e,t){if(!ha(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=pr(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Xr(this,"shape",o),o}});return hr(e,a)}function Vw(e,t){if(!ha(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=pr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Xr(this,"shape",n),n}});return hr(e,r)}function zw(e,t){const r=pr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Xr(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return hr(e,r)}function jw(e,t,r){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=pr(t._zod.def,{get shape(){const s=t._zod.def.shape,u={...s};if(r)for(const l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)u[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return Xr(this,"shape",u),u},checks:[]});return hr(t,i)}function Zw(e,t,r){const n=pr(t._zod.def,{get shape(){const a=t._zod.def.shape,o={...a};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:a[i]}))}else for(const i in a)o[i]=new e({type:"nonoptional",innerType:a[i]});return Xr(this,"shape",o),o}});return hr(t,n)}function $n(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Tg(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function zo(e){return typeof e=="string"?e:e?.message}function Wr(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const a=zo(e.inst?._zod.def?.error?.(e))??zo(t?.error?.(e))??zo(r.customError?.(e))??zo(r.localeError?.(e))??"Invalid input";n.message=a}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function rl(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ga(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Pg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ig=B("$ZodError",Pg),Mg=B("$ZodError",Pg,{Parent:Error});function Gw(e,t=r=>r.message){const r={},n=[];for(const a of e.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):n.push(t(a));return{formErrors:n,fieldErrors:r}}function qw(e,t=r=>r.message){const r={_errors:[]},n=a=>{for(const o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(i=>n({issues:i}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let i=r,s=0;for(;s<o.path.length;){const u=o.path[s];s===o.path.length-1?(i[u]=i[u]||{_errors:[]},i[u]._errors.push(t(o))):i[u]=i[u]||{_errors:[]},i=i[u],s++}}};return n(e),r}const nl=e=>(t,r,n,a)=>{const o=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new wn;if(i.issues.length){const s=new(a?.Err??e)(i.issues.map(u=>Wr(u,o,Qr())));throw Ag(s,a?.callee),s}return i.value},al=e=>async(t,r,n,a)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const s=new(a?.Err??e)(i.issues.map(u=>Wr(u,o,Qr())));throw Ag(s,a?.callee),s}return i.value},jo=e=>(t,r,n)=>{const a=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new wn;return o.issues.length?{success:!1,error:new(e??Ig)(o.issues.map(i=>Wr(i,a,Qr())))}:{success:!0,data:o.value}},Kw=jo(Mg),Zo=e=>async(t,r,n)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(i=>Wr(i,a,Qr())))}:{success:!0,data:o.value}},Yw=Zo(Mg),Qw=e=>(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return nl(e)(t,r,a)},Xw=e=>(t,r,n)=>nl(e)(t,r,n),Ww=e=>async(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return al(e)(t,r,a)},Jw=e=>async(t,r,n)=>al(e)(t,r,n),e2=e=>(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return jo(e)(t,r,a)},t2=e=>(t,r,n)=>jo(e)(t,r,n),r2=e=>async(t,r,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Zo(e)(t,r,a)},n2=e=>async(t,r,n)=>Zo(e)(t,r,n),a2=/^[cC][^\s-]{8,}$/,o2=/^[0-9a-z]+$/,i2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,s2=/^[0-9a-vA-V]{20}$/,u2=/^[A-Za-z0-9]{27}$/,l2=/^[a-zA-Z0-9_-]{21}$/,c2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,d2=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fg=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,f2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,m2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function p2(){return new RegExp(m2,"u")}const h2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,g2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,y2=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,b2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Og=/^[A-Za-z0-9_-]*$/,v2=/^\+[1-9]\d{6,14}$/,Bg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",E2=new RegExp(`^${Bg}$`);function Lg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function D2(e){return new RegExp(`^${Lg(e)}$`)}function S2(e){const t=Lg({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Bg}T(?:${n})$`)}const C2=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},w2=/^-?\d+$/,x2=/^-?\d+(?:\.\d+)?$/,$2=/^(?:true|false)$/i,A2=/^[^A-Z]*$/,k2=/^[^a-z]*$/,dt=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Rg={number:"number",bigint:"bigint",object:"date"},Ng=B("$ZodCheckLessThan",(e,t)=>{dt.init(e,t);const r=Rg[typeof t.value];e._zod.onattach.push(n=>{const a=n._zod.bag,o=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ug=B("$ZodCheckGreaterThan",(e,t)=>{dt.init(e,t);const r=Rg[typeof t.value];e._zod.onattach.push(n=>{const a=n._zod.bag,o=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),T2=B("$ZodCheckMultipleOf",(e,t)=>{dt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Mw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),P2=B("$ZodCheckNumberFormat",(e,t)=>{dt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[a,o]=Rw[t.format];e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,s.minimum=a,s.maximum=o,r&&(s.pattern=w2)}),e._zod.check=i=>{const s=i.value;if(r){if(!Number.isInteger(s)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?i.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):i.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<a&&i.issues.push({origin:"number",input:s,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),s>o&&i.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),I2=B("$ZodCheckMaxLength",(e,t)=>{var r;dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const a=n.value;return!el(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{const a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const a=n.value;if(a.length<=t.maximum)return;const i=rl(a);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),M2=B("$ZodCheckMinLength",(e,t)=>{var r;dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const a=n.value;return!el(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{const a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const a=n.value;if(a.length>=t.minimum)return;const i=rl(a);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),F2=B("$ZodCheckLengthEquals",(e,t)=>{var r;dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const a=n.value;return!el(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{const a=n._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=n=>{const a=n.value,o=a.length;if(o===t.length)return;const i=rl(a),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Go=B("$ZodCheckStringFormat",(e,t)=>{var r,n;dt.init(e,t),e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),O2=B("$ZodCheckRegex",(e,t)=>{Go.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),B2=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=A2),Go.init(e,t)}),L2=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=k2),Go.init(e,t)}),R2=B("$ZodCheckIncludes",(e,t)=>{dt.init(e,t);const r=xn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),N2=B("$ZodCheckStartsWith",(e,t)=>{dt.init(e,t);const r=new RegExp(`^${xn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),U2=B("$ZodCheckEndsWith",(e,t)=>{dt.init(e,t);const r=new RegExp(`.*${xn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),H2=B("$ZodCheckOverwrite",(e,t)=>{dt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class V2{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
36
36
  `).filter(i=>i),a=Math.min(...n.map(i=>i.length-i.trimStart().length)),o=n.map(i=>i.slice(a)).map(i=>" ".repeat(this.indent*2)+i);for(const i of o)this.content.push(i)}compile(){const t=Function,r=this?.args,a=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,a.join(`
37
- `))}}const V2={major:4,minor:3,patch:6},Ue=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=V2;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const a of n)for(const o of a._zod.onattach)o(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(i,s,u)=>{let l=$n(i),c;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const p=i.issues.length,h=f._zod.check(i);if(h instanceof Promise&&u?.async===!1)throw new wn;if(c||h instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await h,i.issues.length!==p&&(l||(l=$n(i,p)))});else{if(i.issues.length===p)continue;l||(l=$n(i,p))}}return c?c.then(()=>i):i},o=(i,s,u)=>{if($n(i))return i.aborted=!0,i;const l=a(s,n,u);if(l instanceof Promise){if(u.async===!1)throw new wn;return l.then(c=>e._zod.parse(c,u))}return e._zod.parse(l,u)};e._zod.run=(i,s)=>{if(s.skipChecks)return e._zod.parse(i,s);if(s.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(c=>o(c,i,s)):o(l,i,s)}const u=e._zod.parse(i,s);if(u instanceof Promise){if(s.async===!1)throw new wn;return u.then(l=>a(l,n,s))}return a(u,n,s)}}ke(e,"~standard",()=>({validate:a=>{try{const o=qw(e,a);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Kw(e,a).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),ol=B("$ZodString",(e,t)=>{Ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??S2(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Le=B("$ZodStringFormat",(e,t)=>{Go.init(e,t),ol.init(e,t)}),z2=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=c2),Le.init(e,t)}),j2=B("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Fg(n))}else t.pattern??(t.pattern=Fg());Le.init(e,t)}),Z2=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=d2),Le.init(e,t)}),G2=B("$ZodURL",(e,t)=>{Le.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),a=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=a.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),q2=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=m2()),Le.init(e,t)}),K2=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=u2),Le.init(e,t)}),Y2=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=n2),Le.init(e,t)}),Q2=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=a2),Le.init(e,t)}),X2=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=o2),Le.init(e,t)}),W2=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=i2),Le.init(e,t)}),J2=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=s2),Le.init(e,t)}),e5=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=D2(t)),Le.init(e,t)}),t5=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=v2),Le.init(e,t)}),r5=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=E2(t)),Le.init(e,t)}),n5=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=l2),Le.init(e,t)}),a5=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=p2),Le.init(e,t),e._zod.bag.format="ipv4"}),o5=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=h2),Le.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),i5=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=g2),Le.init(e,t)}),s5=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=y2),Le.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[a,o]=n;if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Hg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const u5=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=b2),Le.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Hg(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function l5(e){if(!Og.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Hg(r)}const c5=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Og),Le.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{l5(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),d5=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=_2),Le.init(e,t)});function f5(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const a=JSON.parse(atob(n));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const m5=B("$ZodJWT",(e,t)=>{Le.init(e,t),e._zod.check=r=>{f5(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Vg=B("$ZodNumber",(e,t)=>{Ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??w2,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;const o=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...o?{received:o}:{}}),r}}),p5=B("$ZodNumberFormat",(e,t)=>{T2.init(e,t),Vg.init(e,t)}),h5=B("$ZodBoolean",(e,t)=>{Ue.init(e,t),e._zod.pattern=x2,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),r}}),g5=B("$ZodUnknown",(e,t)=>{Ue.init(e,t),e._zod.parse=r=>r}),y5=B("$ZodNever",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function zg(e,t,r){e.issues.length&&t.issues.push(...Tg(r,e.issues)),t.value[r]=e.value}const b5=B("$ZodArray",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);const o=[];for(let i=0;i<a.length;i++){const s=a[i],u=t.element._zod.run({value:s,issues:[]},n);u instanceof Promise?o.push(u.then(l=>zg(l,r,i))):zg(u,r,i)}return o.length?Promise.all(o).then(()=>r):r}});function qo(e,t,r,n,a){if(e.issues.length){if(a&&!(r in n))return;t.issues.push(...Tg(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function jg(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Bw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Zg(e,t,r,n,a,o){const i=[],s=a.keySet,u=a.catchall._zod,l=u.def.type,c=u.optout==="optional";for(const f in t){if(s.has(f))continue;if(l==="never"){i.push(f);continue}const p=u.run({value:t[f],issues:[]},n);p instanceof Promise?e.push(p.then(h=>qo(h,r,f,t,c))):qo(p,r,f,t,c)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const _5=B("$ZodObject",(e,t)=>{if(Ue.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...s};return Object.defineProperty(t,"shape",{value:u}),u}})}const n=Ju(()=>jg(t));ke(e._zod,"propValues",()=>{const s=t.shape,u={};for(const l in s){const c=s[l]._zod;if(c.values){u[l]??(u[l]=new Set);for(const f of c.values)u[l].add(f)}}return u});const a=Vo,o=t.catchall;let i;e._zod.parse=(s,u)=>{i??(i=n.value);const l=s.value;if(!a(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};const c=[],f=i.shape;for(const p of i.keys){const h=f[p],g=h._zod.optout==="optional",y=h._zod.run({value:l[p],issues:[]},u);y instanceof Promise?c.push(y.then(_=>qo(_,s,p,l,g))):qo(y,s,p,l,g)}return o?Zg(c,l,s,u,n.value,e):c.length?Promise.all(c).then(()=>s):s}}),v5=B("$ZodObjectJIT",(e,t)=>{_5.init(e,t);const r=e._zod.parse,n=Ju(()=>jg(t)),a=p=>{const h=new H2(["shape","payload","ctx"]),g=n.value,y=b=>{const C=$g(b);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};h.write("const input = payload.value;");const _=Object.create(null);let D=0;for(const b of g.keys)_[b]=`key_${D++}`;h.write("const newResult = {};");for(const b of g.keys){const C=_[b],v=$g(b),I=p[b]?._zod?.optout==="optional";h.write(`const ${C} = ${y(b)};`),I?h.write(`
37
+ `))}}const z2={major:4,minor:3,patch:6},Ue=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=z2;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const a of n)for(const o of a._zod.onattach)o(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(i,s,u)=>{let l=$n(i),c;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const p=i.issues.length,h=f._zod.check(i);if(h instanceof Promise&&u?.async===!1)throw new wn;if(c||h instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await h,i.issues.length!==p&&(l||(l=$n(i,p)))});else{if(i.issues.length===p)continue;l||(l=$n(i,p))}}return c?c.then(()=>i):i},o=(i,s,u)=>{if($n(i))return i.aborted=!0,i;const l=a(s,n,u);if(l instanceof Promise){if(u.async===!1)throw new wn;return l.then(c=>e._zod.parse(c,u))}return e._zod.parse(l,u)};e._zod.run=(i,s)=>{if(s.skipChecks)return e._zod.parse(i,s);if(s.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(c=>o(c,i,s)):o(l,i,s)}const u=e._zod.parse(i,s);if(u instanceof Promise){if(s.async===!1)throw new wn;return u.then(l=>a(l,n,s))}return a(u,n,s)}}ke(e,"~standard",()=>({validate:a=>{try{const o=Kw(e,a);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Yw(e,a).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),ol=B("$ZodString",(e,t)=>{Ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??C2(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Le=B("$ZodStringFormat",(e,t)=>{Go.init(e,t),ol.init(e,t)}),j2=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=d2),Le.init(e,t)}),Z2=B("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Fg(n))}else t.pattern??(t.pattern=Fg());Le.init(e,t)}),G2=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=f2),Le.init(e,t)}),q2=B("$ZodURL",(e,t)=>{Le.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),a=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=a.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),K2=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=p2()),Le.init(e,t)}),Y2=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=l2),Le.init(e,t)}),Q2=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=a2),Le.init(e,t)}),X2=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=o2),Le.init(e,t)}),W2=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=i2),Le.init(e,t)}),J2=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=s2),Le.init(e,t)}),e5=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=u2),Le.init(e,t)}),t5=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=S2(t)),Le.init(e,t)}),r5=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=E2),Le.init(e,t)}),n5=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=D2(t)),Le.init(e,t)}),a5=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=c2),Le.init(e,t)}),o5=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=h2),Le.init(e,t),e._zod.bag.format="ipv4"}),i5=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=g2),Le.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),s5=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=y2),Le.init(e,t)}),u5=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=b2),Le.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[a,o]=n;if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Hg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const l5=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=_2),Le.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Hg(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function c5(e){if(!Og.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Hg(r)}const d5=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Og),Le.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{c5(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),f5=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=v2),Le.init(e,t)});function m5(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const a=JSON.parse(atob(n));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const p5=B("$ZodJWT",(e,t)=>{Le.init(e,t),e._zod.check=r=>{m5(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Vg=B("$ZodNumber",(e,t)=>{Ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??x2,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;const o=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...o?{received:o}:{}}),r}}),h5=B("$ZodNumberFormat",(e,t)=>{P2.init(e,t),Vg.init(e,t)}),g5=B("$ZodBoolean",(e,t)=>{Ue.init(e,t),e._zod.pattern=$2,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),r}}),y5=B("$ZodUnknown",(e,t)=>{Ue.init(e,t),e._zod.parse=r=>r}),b5=B("$ZodNever",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function zg(e,t,r){e.issues.length&&t.issues.push(...Tg(r,e.issues)),t.value[r]=e.value}const _5=B("$ZodArray",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);const o=[];for(let i=0;i<a.length;i++){const s=a[i],u=t.element._zod.run({value:s,issues:[]},n);u instanceof Promise?o.push(u.then(l=>zg(l,r,i))):zg(u,r,i)}return o.length?Promise.all(o).then(()=>r):r}});function qo(e,t,r,n,a){if(e.issues.length){if(a&&!(r in n))return;t.issues.push(...Tg(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function jg(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Lw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Zg(e,t,r,n,a,o){const i=[],s=a.keySet,u=a.catchall._zod,l=u.def.type,c=u.optout==="optional";for(const f in t){if(s.has(f))continue;if(l==="never"){i.push(f);continue}const p=u.run({value:t[f],issues:[]},n);p instanceof Promise?e.push(p.then(h=>qo(h,r,f,t,c))):qo(p,r,f,t,c)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const v5=B("$ZodObject",(e,t)=>{if(Ue.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...s};return Object.defineProperty(t,"shape",{value:u}),u}})}const n=Ju(()=>jg(t));ke(e._zod,"propValues",()=>{const s=t.shape,u={};for(const l in s){const c=s[l]._zod;if(c.values){u[l]??(u[l]=new Set);for(const f of c.values)u[l].add(f)}}return u});const a=Vo,o=t.catchall;let i;e._zod.parse=(s,u)=>{i??(i=n.value);const l=s.value;if(!a(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};const c=[],f=i.shape;for(const p of i.keys){const h=f[p],g=h._zod.optout==="optional",y=h._zod.run({value:l[p],issues:[]},u);y instanceof Promise?c.push(y.then(_=>qo(_,s,p,l,g))):qo(y,s,p,l,g)}return o?Zg(c,l,s,u,n.value,e):c.length?Promise.all(c).then(()=>s):s}}),E5=B("$ZodObjectJIT",(e,t)=>{v5.init(e,t);const r=e._zod.parse,n=Ju(()=>jg(t)),a=p=>{const h=new V2(["shape","payload","ctx"]),g=n.value,y=b=>{const C=$g(b);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};h.write("const input = payload.value;");const _=Object.create(null);let D=0;for(const b of g.keys)_[b]=`key_${D++}`;h.write("const newResult = {};");for(const b of g.keys){const C=_[b],v=$g(b),I=p[b]?._zod?.optout==="optional";h.write(`const ${C} = ${y(b)};`),I?h.write(`
38
38
  if (${C}.issues.length) {
39
39
  if (${v} in input) {
40
40
  payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
@@ -68,10 +68,10 @@ Url: ${ja(e)}`),!0)}function U4(e,t){return e.type||!t||!t.length?!1:j4(e).some(
68
68
  newResult[${v}] = ${C}.value;
69
69
  }
70
70
 
71
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const w=h.compile();return(b,C)=>w(p,b,C)};let o;const i=Vo,s=!Cg.jitless,l=s&&Fw.value,c=t.catchall;let f;e._zod.parse=(p,h)=>{f??(f=n.value);const g=p.value;return i(g)?s&&l&&h?.async===!1&&h.jitless!==!0?(o||(o=a(t.shape)),p=o(p,h),c?Zg([],g,p,h,f,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function Gg(e,t,r,n){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const a=e.filter(o=>!$n(o));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>Wr(i,n,Qr())))}),t)}const E5=B("$ZodUnion",(e,t)=>{Ue.init(e,t),ke(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),ke(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),ke(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),ke(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${a.map(o=>tl(o.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(a,o)=>{if(r)return n(a,o);let i=!1;const s=[];for(const u of t.options){const l=u._zod.run({value:a.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(u=>Gg(u,a,e,o)):Gg(s,a,e,o)}}),D5=B("$ZodIntersection",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>{const a=r.value,o=t.left._zod.run({value:a,issues:[]},n),i=t.right._zod.run({value:a,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([u,l])=>qg(r,u,l)):qg(r,o,i)}});function il(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ga(e)&&ga(t)){const r=Object.keys(t),n=Object.keys(e).filter(o=>r.indexOf(o)!==-1),a={...e,...t};for(const o of n){const i=il(e[o],t[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};a[o]=i.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const a=e[n],o=t[n],i=il(a,o);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function qg(e,t,r){const n=new Map;let a;for(const s of t.issues)if(s.code==="unrecognized_keys"){a??(a=s);for(const u of s.keys)n.has(u)||n.set(u,{}),n.get(u).l=!0}else e.issues.push(s);for(const s of r.issues)if(s.code==="unrecognized_keys")for(const u of s.keys)n.has(u)||n.set(u,{}),n.get(u).r=!0;else e.issues.push(s);const o=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&a&&e.issues.push({...a,keys:o}),$n(e))return e;const i=il(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const S5=B("$ZodEnum",(e,t)=>{Ue.init(e,t);const r=wg(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(a=>Ow.has(typeof a)).map(a=>typeof a=="string"?xn(a):a.toString()).join("|")})$`),e._zod.parse=(a,o)=>{const i=a.value;return n.has(i)||a.issues.push({code:"invalid_value",values:r,input:i,inst:e}),a}}),C5=B("$ZodLiteral",(e,t)=>{if(Ue.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?xn(n):n?xn(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,a)=>{const o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),w5=B("$ZodTransform",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sg(e.constructor.name);const a=t.transform(r.value,r);if(n.async)return(a instanceof Promise?a:Promise.resolve(a)).then(i=>(r.value=i,r));if(a instanceof Promise)throw new wn;return r.value=a,r}});function Kg(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Yg=B("$ZodOptional",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ke(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${tl(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>Kg(o,r.value)):Kg(a,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),x5=B("$ZodExactOptional",(e,t)=>{Yg.init(e,t),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),$5=B("$ZodNullable",(e,t)=>{Ue.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${tl(r.source)}|null)$`):void 0}),ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),A5=B("$ZodDefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>Qg(o,t)):Qg(a,t)}});function Qg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const k5=B("$ZodPrefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),T5=B("$ZodNonOptional",(e,t)=>{Ue.init(e,t),ke(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>Xg(o,e)):Xg(a,e)}});function Xg(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const P5=B("$ZodCatch",(e,t)=>{Ue.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Wr(i,n,Qr()))},input:r.value}),r.issues=[]),r)):(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(o=>Wr(o,n,Qr()))},input:r.value}),r.issues=[]),r)}}),I5=B("$ZodPipe",(e,t)=>{Ue.init(e,t),ke(e._zod,"values",()=>t.in._zod.values),ke(e._zod,"optin",()=>t.in._zod.optin),ke(e._zod,"optout",()=>t.out._zod.optout),ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(i=>Ko(i,t.in,n)):Ko(o,t.in,n)}const a=t.in._zod.run(r,n);return a instanceof Promise?a.then(o=>Ko(o,t.out,n)):Ko(a,t.out,n)}});function Ko(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const M5=B("$ZodReadonly",(e,t)=>{Ue.init(e,t),ke(e._zod,"propValues",()=>t.innerType._zod.propValues),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"optin",()=>t.innerType?._zod?.optin),ke(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(Wg):Wg(a)}});function Wg(e){return e.value=Object.freeze(e.value),e}const F5=B("$ZodCustom",(e,t)=>{dt.init(e,t),Ue.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,a=t.fn(n);if(a instanceof Promise)return a.then(o=>Jg(o,r,n,e));Jg(a,r,n,e)}});function Jg(e,t,r,n){if(!e){const a={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(a.params=n._zod.def.params),t.issues.push(ya(a))}}var ey;class O5{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const a={...n,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function B5(){return new O5}(ey=globalThis).__zod_globalRegistry??(ey.__zod_globalRegistry=B5());const ba=globalThis.__zod_globalRegistry;function L5(e,t){return new e({type:"string",...me(t)})}function R5(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(t)})}function ty(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(t)})}function N5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(t)})}function U5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(t)})}function H5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(t)})}function V5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(t)})}function z5(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(t)})}function j5(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(t)})}function Z5(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(t)})}function G5(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(t)})}function q5(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(t)})}function K5(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(t)})}function Y5(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(t)})}function Q5(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(t)})}function X5(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(t)})}function W5(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(t)})}function J5(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(t)})}function ex(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(t)})}function tx(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(t)})}function rx(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(t)})}function nx(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(t)})}function ax(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(t)})}function ox(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(t)})}function ix(e,t){return new e({type:"string",format:"date",check:"string_format",...me(t)})}function sx(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(t)})}function ux(e,t){return new e({type:"string",format:"duration",check:"string_format",...me(t)})}function lx(e,t){return new e({type:"number",coerce:!0,checks:[],...me(t)})}function cx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(t)})}function dx(e,t){return new e({type:"boolean",...me(t)})}function fx(e){return new e({type:"unknown"})}function mx(e,t){return new e({type:"never",...me(t)})}function ry(e,t){return new Ng({check:"less_than",...me(t),value:e,inclusive:!1})}function sl(e,t){return new Ng({check:"less_than",...me(t),value:e,inclusive:!0})}function ny(e,t){return new Ug({check:"greater_than",...me(t),value:e,inclusive:!1})}function ul(e,t){return new Ug({check:"greater_than",...me(t),value:e,inclusive:!0})}function ay(e,t){return new k2({check:"multiple_of",...me(t),value:e})}function oy(e,t){return new P2({check:"max_length",...me(t),maximum:e})}function Yo(e,t){return new I2({check:"min_length",...me(t),minimum:e})}function iy(e,t){return new M2({check:"length_equals",...me(t),length:e})}function px(e,t){return new F2({check:"string_format",format:"regex",...me(t),pattern:e})}function hx(e){return new O2({check:"string_format",format:"lowercase",...me(e)})}function gx(e){return new B2({check:"string_format",format:"uppercase",...me(e)})}function yx(e,t){return new L2({check:"string_format",format:"includes",...me(t),includes:e})}function bx(e,t){return new R2({check:"string_format",format:"starts_with",...me(t),prefix:e})}function _x(e,t){return new N2({check:"string_format",format:"ends_with",...me(t),suffix:e})}function An(e){return new U2({check:"overwrite",tx:e})}function vx(e){return An(t=>t.normalize(e))}function Ex(){return An(e=>e.trim())}function Dx(){return An(e=>e.toLowerCase())}function Sx(){return An(e=>e.toUpperCase())}function Cx(){return An(e=>Mw(e))}function wx(e,t,r){return new e({type:"array",element:t,...me(r)})}function xx(e,t,r){return new e({type:"custom",check:"custom",fn:t,...me(r)})}function $x(e){const t=Ax(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(ya(n,r.value,t._zod.def));else{const a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),r.issues.push(ya(a))}},e(r.value,r)));return t}function Ax(e,t){const r=new dt({check:"custom",...me(t)});return r._zod.check=e,r}function sy(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ba,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qe(e,t,r={path:[],schemaPath:[]}){var n;const a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);const s=e._zod.toJSONSchema?.();if(s)i.schema=s;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,c);else{const p=i.schema,h=t.processors[a.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);h(e,t,p,c)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Qe(f,t,c),t.seen.get(f).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(i.schema,u),t.io==="input"&&it(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function uy(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const i of e.seen.entries()){const s=e.metadataRegistry.get(i[0])?.id;if(s){const u=n.get(s);if(u&&u!==i[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,i[0])}}const a=i=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,p=e.external.uri??(g=>g);if(f)return{ref:p(f)};const h=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=h,{defId:h,ref:`${p("__shared")}#/${s}/${h}`}}if(i[1]===r)return{ref:"#"};const l=`#/${s}/`,c=i[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},o=i=>{if(i[1].schema.$ref)return;const s=i[1],{ref:u,defId:l}=a(i);s.def={...s.schema},l&&(s.defId=l);const c=s.schema;for(const f in c)delete c[f];c.$ref=u};if(e.cycles==="throw")for(const i of e.seen.entries()){const s=i[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
71
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");const w=h.compile();return(b,C)=>w(p,b,C)};let o;const i=Vo,s=!Cg.jitless,l=s&&Ow.value,c=t.catchall;let f;e._zod.parse=(p,h)=>{f??(f=n.value);const g=p.value;return i(g)?s&&l&&h?.async===!1&&h.jitless!==!0?(o||(o=a(t.shape)),p=o(p,h),c?Zg([],g,p,h,f,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function Gg(e,t,r,n){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const a=e.filter(o=>!$n(o));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>Wr(i,n,Qr())))}),t)}const D5=B("$ZodUnion",(e,t)=>{Ue.init(e,t),ke(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),ke(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),ke(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),ke(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${a.map(o=>tl(o.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(a,o)=>{if(r)return n(a,o);let i=!1;const s=[];for(const u of t.options){const l=u._zod.run({value:a.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(u=>Gg(u,a,e,o)):Gg(s,a,e,o)}}),S5=B("$ZodIntersection",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>{const a=r.value,o=t.left._zod.run({value:a,issues:[]},n),i=t.right._zod.run({value:a,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([u,l])=>qg(r,u,l)):qg(r,o,i)}});function il(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ha(e)&&ha(t)){const r=Object.keys(t),n=Object.keys(e).filter(o=>r.indexOf(o)!==-1),a={...e,...t};for(const o of n){const i=il(e[o],t[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};a[o]=i.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const a=e[n],o=t[n],i=il(a,o);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function qg(e,t,r){const n=new Map;let a;for(const s of t.issues)if(s.code==="unrecognized_keys"){a??(a=s);for(const u of s.keys)n.has(u)||n.set(u,{}),n.get(u).l=!0}else e.issues.push(s);for(const s of r.issues)if(s.code==="unrecognized_keys")for(const u of s.keys)n.has(u)||n.set(u,{}),n.get(u).r=!0;else e.issues.push(s);const o=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&a&&e.issues.push({...a,keys:o}),$n(e))return e;const i=il(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const C5=B("$ZodEnum",(e,t)=>{Ue.init(e,t);const r=wg(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(a=>Bw.has(typeof a)).map(a=>typeof a=="string"?xn(a):a.toString()).join("|")})$`),e._zod.parse=(a,o)=>{const i=a.value;return n.has(i)||a.issues.push({code:"invalid_value",values:r,input:i,inst:e}),a}}),w5=B("$ZodLiteral",(e,t)=>{if(Ue.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?xn(n):n?xn(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,a)=>{const o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),x5=B("$ZodTransform",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sg(e.constructor.name);const a=t.transform(r.value,r);if(n.async)return(a instanceof Promise?a:Promise.resolve(a)).then(i=>(r.value=i,r));if(a instanceof Promise)throw new wn;return r.value=a,r}});function Kg(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Yg=B("$ZodOptional",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ke(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${tl(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>Kg(o,r.value)):Kg(a,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),$5=B("$ZodExactOptional",(e,t)=>{Yg.init(e,t),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),A5=B("$ZodNullable",(e,t)=>{Ue.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${tl(r.source)}|null)$`):void 0}),ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),k5=B("$ZodDefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>Qg(o,t)):Qg(a,t)}});function Qg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const T5=B("$ZodPrefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),P5=B("$ZodNonOptional",(e,t)=>{Ue.init(e,t),ke(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>Xg(o,e)):Xg(a,e)}});function Xg(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const I5=B("$ZodCatch",(e,t)=>{Ue.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Wr(i,n,Qr()))},input:r.value}),r.issues=[]),r)):(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(o=>Wr(o,n,Qr()))},input:r.value}),r.issues=[]),r)}}),M5=B("$ZodPipe",(e,t)=>{Ue.init(e,t),ke(e._zod,"values",()=>t.in._zod.values),ke(e._zod,"optin",()=>t.in._zod.optin),ke(e._zod,"optout",()=>t.out._zod.optout),ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(i=>Ko(i,t.in,n)):Ko(o,t.in,n)}const a=t.in._zod.run(r,n);return a instanceof Promise?a.then(o=>Ko(o,t.out,n)):Ko(a,t.out,n)}});function Ko(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const F5=B("$ZodReadonly",(e,t)=>{Ue.init(e,t),ke(e._zod,"propValues",()=>t.innerType._zod.propValues),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"optin",()=>t.innerType?._zod?.optin),ke(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(Wg):Wg(a)}});function Wg(e){return e.value=Object.freeze(e.value),e}const O5=B("$ZodCustom",(e,t)=>{dt.init(e,t),Ue.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,a=t.fn(n);if(a instanceof Promise)return a.then(o=>Jg(o,r,n,e));Jg(a,r,n,e)}});function Jg(e,t,r,n){if(!e){const a={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(a.params=n._zod.def.params),t.issues.push(ga(a))}}var ey;class B5{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const a={...n,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function L5(){return new B5}(ey=globalThis).__zod_globalRegistry??(ey.__zod_globalRegistry=L5());const ya=globalThis.__zod_globalRegistry;function R5(e,t){return new e({type:"string",...me(t)})}function N5(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(t)})}function ty(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(t)})}function U5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(t)})}function H5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(t)})}function V5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(t)})}function z5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(t)})}function j5(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(t)})}function Z5(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(t)})}function G5(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(t)})}function q5(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(t)})}function K5(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(t)})}function Y5(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(t)})}function Q5(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(t)})}function X5(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(t)})}function W5(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(t)})}function J5(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(t)})}function ex(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(t)})}function tx(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(t)})}function rx(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(t)})}function nx(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(t)})}function ax(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(t)})}function ox(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(t)})}function ix(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(t)})}function sx(e,t){return new e({type:"string",format:"date",check:"string_format",...me(t)})}function ux(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(t)})}function lx(e,t){return new e({type:"string",format:"duration",check:"string_format",...me(t)})}function cx(e,t){return new e({type:"number",coerce:!0,checks:[],...me(t)})}function dx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(t)})}function fx(e,t){return new e({type:"boolean",...me(t)})}function mx(e){return new e({type:"unknown"})}function px(e,t){return new e({type:"never",...me(t)})}function ry(e,t){return new Ng({check:"less_than",...me(t),value:e,inclusive:!1})}function sl(e,t){return new Ng({check:"less_than",...me(t),value:e,inclusive:!0})}function ny(e,t){return new Ug({check:"greater_than",...me(t),value:e,inclusive:!1})}function ul(e,t){return new Ug({check:"greater_than",...me(t),value:e,inclusive:!0})}function ay(e,t){return new T2({check:"multiple_of",...me(t),value:e})}function oy(e,t){return new I2({check:"max_length",...me(t),maximum:e})}function Yo(e,t){return new M2({check:"min_length",...me(t),minimum:e})}function iy(e,t){return new F2({check:"length_equals",...me(t),length:e})}function hx(e,t){return new O2({check:"string_format",format:"regex",...me(t),pattern:e})}function gx(e){return new B2({check:"string_format",format:"lowercase",...me(e)})}function yx(e){return new L2({check:"string_format",format:"uppercase",...me(e)})}function bx(e,t){return new R2({check:"string_format",format:"includes",...me(t),includes:e})}function _x(e,t){return new N2({check:"string_format",format:"starts_with",...me(t),prefix:e})}function vx(e,t){return new U2({check:"string_format",format:"ends_with",...me(t),suffix:e})}function An(e){return new H2({check:"overwrite",tx:e})}function Ex(e){return An(t=>t.normalize(e))}function Dx(){return An(e=>e.trim())}function Sx(){return An(e=>e.toLowerCase())}function Cx(){return An(e=>e.toUpperCase())}function wx(){return An(e=>Fw(e))}function xx(e,t,r){return new e({type:"array",element:t,...me(r)})}function $x(e,t,r){return new e({type:"custom",check:"custom",fn:t,...me(r)})}function Ax(e){const t=kx(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(ga(n,r.value,t._zod.def));else{const a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),r.issues.push(ga(a))}},e(r.value,r)));return t}function kx(e,t){const r=new dt({check:"custom",...me(t)});return r._zod.check=e,r}function sy(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ya,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qe(e,t,r={path:[],schemaPath:[]}){var n;const a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);const s=e._zod.toJSONSchema?.();if(s)i.schema=s;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,c);else{const p=i.schema,h=t.processors[a.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);h(e,t,p,c)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Qe(f,t,c),t.seen.get(f).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(i.schema,u),t.io==="input"&&it(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function uy(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const i of e.seen.entries()){const s=e.metadataRegistry.get(i[0])?.id;if(s){const u=n.get(s);if(u&&u!==i[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,i[0])}}const a=i=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,p=e.external.uri??(g=>g);if(f)return{ref:p(f)};const h=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=h,{defId:h,ref:`${p("__shared")}#/${s}/${h}`}}if(i[1]===r)return{ref:"#"};const l=`#/${s}/`,c=i[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},o=i=>{if(i[1].schema.$ref)return;const s=i[1],{ref:u,defId:l}=a(i);s.def={...s.schema},l&&(s.defId=l);const c=s.schema;for(const f in c)delete c[f];c.$ref=u};if(e.cycles==="throw")for(const i of e.seen.entries()){const s=i[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
72
72
 
73
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const s=i[1];if(t===i[0]){o(i);continue}if(e.external){const l=e.external.registry.get(i[0])?.id;if(t!==i[0]&&l){o(i);continue}}if(e.metadataRegistry.get(i[0])?.id){o(i);continue}if(s.cycle){o(i);continue}if(s.count>1&&e.reused==="ref"){o(i);continue}}}function ly(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=i=>{const s=e.seen.get(i);if(s.ref===null)return;const u=s.def??s.schema,l={...u},c=s.ref;if(s.ref=null,c){n(c);const p=e.seen.get(c),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),i._zod.parent===c)for(const y in u)y==="$ref"||y==="allOf"||y in l||delete u[y];if(h.$ref&&p.def)for(const y in u)y==="$ref"||y==="allOf"||y in p.def&&JSON.stringify(u[y])===JSON.stringify(p.def[y])&&delete u[y]}const f=i._zod.parent;if(f&&f!==c){n(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:i,jsonSchema:u,path:s.path??[]})};for(const i of[...e.seen.entries()].reverse())n(i[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(i)}Object.assign(a,r.def??r.schema);const o=e.external?.defs??{};for(const i of e.seen.entries()){const s=i[1];s.def&&s.defId&&(o[s.defId]=s.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?a.$defs=o:a.definitions=o);try{const i=JSON.parse(JSON.stringify(a));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Qo(t,"input",e.processors),output:Qo(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function it(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return it(n.element,r);if(n.type==="set")return it(n.valueType,r);if(n.type==="lazy")return it(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return it(n.innerType,r);if(n.type==="intersection")return it(n.left,r)||it(n.right,r);if(n.type==="record"||n.type==="map")return it(n.keyType,r)||it(n.valueType,r);if(n.type==="pipe")return it(n.in,r)||it(n.out,r);if(n.type==="object"){for(const a in n.shape)if(it(n.shape[a],r))return!0;return!1}if(n.type==="union"){for(const a of n.options)if(it(a,r))return!0;return!1}if(n.type==="tuple"){for(const a of n.items)if(it(a,r))return!0;return!!(n.rest&&it(n.rest,r))}return!1}const kx=(e,t={})=>r=>{const n=sy({...r,processors:t});return Qe(e,n),uy(n,e),ly(n,e)},Qo=(e,t,r={})=>n=>{const{libraryOptions:a,target:o}=n??{},i=sy({...a??{},target:o,io:t,processors:r});return Qe(e,i),uy(i,e),ly(i,e)},Tx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Px=(e,t,r,n)=>{const a=r;a.type="string";const{minimum:o,maximum:i,format:s,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof i=="number"&&(a.maxLength=i),s&&(a.format=Tx[s]??s,a.format===""&&delete a.format,s==="time"&&delete a.format),l&&(a.contentEncoding=l),u&&u.size>0){const c=[...u];c.length===1?a.pattern=c[0].source:c.length>1&&(a.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},Ix=(e,t,r,n)=>{const a=r,{minimum:o,maximum:i,format:s,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:c}=e._zod.bag;typeof s=="string"&&s.includes("int")?a.type="integer":a.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=c,a.exclusiveMinimum=!0):a.exclusiveMinimum=c),typeof o=="number"&&(a.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete a.minimum:delete a.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=l,a.exclusiveMaximum=!0):a.exclusiveMaximum=l),typeof i=="number"&&(a.maximum=i,typeof l=="number"&&t.target!=="draft-04"&&(l<=i?delete a.maximum:delete a.exclusiveMaximum)),typeof u=="number"&&(a.multipleOf=u)},Mx=(e,t,r,n)=>{r.type="boolean"},Fx=(e,t,r,n)=>{r.not={}},Ox=(e,t,r,n)=>{},Bx=(e,t,r,n)=>{const a=e._zod.def,o=wg(a.entries);o.every(i=>typeof i=="number")&&(r.type="number"),o.every(i=>typeof i=="string")&&(r.type="string"),r.enum=o},Lx=(e,t,r,n)=>{const a=e._zod.def,o=[];for(const i of a.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(i))}else o.push(i);if(o.length!==0)if(o.length===1){const i=o[0];r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[i]:r.const=i}else o.every(i=>typeof i=="number")&&(r.type="number"),o.every(i=>typeof i=="string")&&(r.type="string"),o.every(i=>typeof i=="boolean")&&(r.type="boolean"),o.every(i=>i===null)&&(r.type="null"),r.enum=o},Rx=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Nx=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ux=(e,t,r,n)=>{const a=r,o=e._zod.def,{minimum:i,maximum:s}=e._zod.bag;typeof i=="number"&&(a.minItems=i),typeof s=="number"&&(a.maxItems=s),a.type="array",a.items=Qe(o.element,t,{...n,path:[...n.path,"items"]})},Hx=(e,t,r,n)=>{const a=r,o=e._zod.def;a.type="object",a.properties={};const i=o.shape;for(const l in i)a.properties[l]=Qe(i[l],t,{...n,path:[...n.path,"properties",l]});const s=new Set(Object.keys(i)),u=new Set([...s].filter(l=>{const c=o.shape[l]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));u.size>0&&(a.required=Array.from(u)),o.catchall?._zod.def.type==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=Qe(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},Vx=(e,t,r,n)=>{const a=e._zod.def,o=a.inclusive===!1,i=a.options.map((s,u)=>Qe(s,t,{...n,path:[...n.path,o?"oneOf":"anyOf",u]}));o?r.oneOf=i:r.anyOf=i},zx=(e,t,r,n)=>{const a=e._zod.def,o=Qe(a.left,t,{...n,path:[...n.path,"allOf",0]}),i=Qe(a.right,t,{...n,path:[...n.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,u=[...s(o)?o.allOf:[o],...s(i)?i.allOf:[i]];r.allOf=u},jx=(e,t,r,n)=>{const a=e._zod.def,o=Qe(a.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=a.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Zx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType},Gx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType,r.default=JSON.parse(JSON.stringify(a.defaultValue))},qx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},Kx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType;let i;try{i=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},Yx=(e,t,r,n)=>{const a=e._zod.def,o=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;Qe(o,t,n);const i=t.seen.get(e);i.ref=o},Qx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType,r.readOnly=!0},cy=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType},Xx=B("ZodISODateTime",(e,t)=>{e5.init(e,t),Re.init(e,t)});function Wx(e){return ox(Xx,e)}const Jx=B("ZodISODate",(e,t)=>{t5.init(e,t),Re.init(e,t)});function e$(e){return ix(Jx,e)}const t$=B("ZodISOTime",(e,t)=>{r5.init(e,t),Re.init(e,t)});function r$(e){return sx(t$,e)}const n$=B("ZodISODuration",(e,t)=>{n5.init(e,t),Re.init(e,t)});function a$(e){return ux(n$,e)}const xt=B("ZodError",(e,t)=>{Ig.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Gw(e,r)},flatten:{value:r=>Zw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Wu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Wu,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),o$=nl(xt),i$=al(xt),s$=jo(xt),u$=Zo(xt),l$=Yw(xt),c$=Qw(xt),d$=Xw(xt),f$=Ww(xt),m$=Jw(xt),p$=e2(xt),h$=t2(xt),g$=r2(xt),He=B("ZodType",(e,t)=>(Ue.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qo(e,"input"),output:Qo(e,"output")}}),e.toJSONSchema=kx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(pr(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>hr(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>o$(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>s$(e,r,n),e.parseAsync=async(r,n)=>i$(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>u$(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>l$(e,r,n),e.decode=(r,n)=>c$(e,r,n),e.encodeAsync=async(r,n)=>d$(e,r,n),e.decodeAsync=async(r,n)=>f$(e,r,n),e.safeEncode=(r,n)=>m$(e,r,n),e.safeDecode=(r,n)=>p$(e,r,n),e.safeEncodeAsync=async(r,n)=>h$(e,r,n),e.safeDecodeAsync=async(r,n)=>g$(e,r,n),e.refine=(r,n)=>e.check(f6(r,n)),e.superRefine=r=>e.check(m6(r)),e.overwrite=r=>e.check(An(r)),e.optional=()=>by(e),e.exactOptional=()=>J$(e),e.nullable=()=>_y(e),e.nullish=()=>by(_y(e)),e.nonoptional=r=>o6(e,r),e.array=()=>V$(e),e.or=r=>gy([e,r]),e.and=r=>q$(e,r),e.transform=r=>Ey(e,X$(r)),e.default=r=>r6(e,r),e.prefault=r=>a6(e,r),e.catch=r=>s6(e,r),e.pipe=r=>Ey(e,r),e.readonly=()=>c6(e),e.describe=r=>{const n=e.clone();return ba.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return ba.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ba.get(e);const n=e.clone();return ba.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),dy=B("_ZodString",(e,t)=>{ol.init(e,t),He.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Px(e,n,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(px(...n)),e.includes=(...n)=>e.check(yx(...n)),e.startsWith=(...n)=>e.check(bx(...n)),e.endsWith=(...n)=>e.check(_x(...n)),e.min=(...n)=>e.check(Yo(...n)),e.max=(...n)=>e.check(oy(...n)),e.length=(...n)=>e.check(iy(...n)),e.nonempty=(...n)=>e.check(Yo(1,...n)),e.lowercase=n=>e.check(hx(n)),e.uppercase=n=>e.check(gx(n)),e.trim=()=>e.check(Ex()),e.normalize=(...n)=>e.check(vx(...n)),e.toLowerCase=()=>e.check(Dx()),e.toUpperCase=()=>e.check(Sx()),e.slugify=()=>e.check(Cx())}),y$=B("ZodString",(e,t)=>{ol.init(e,t),dy.init(e,t),e.email=r=>e.check(R5(b$,r)),e.url=r=>e.check(z5(_$,r)),e.jwt=r=>e.check(ax(F$,r)),e.emoji=r=>e.check(j5(v$,r)),e.guid=r=>e.check(ty(fy,r)),e.uuid=r=>e.check(N5(Xo,r)),e.uuidv4=r=>e.check(U5(Xo,r)),e.uuidv6=r=>e.check(H5(Xo,r)),e.uuidv7=r=>e.check(V5(Xo,r)),e.nanoid=r=>e.check(Z5(E$,r)),e.guid=r=>e.check(ty(fy,r)),e.cuid=r=>e.check(G5(D$,r)),e.cuid2=r=>e.check(q5(S$,r)),e.ulid=r=>e.check(K5(C$,r)),e.base64=r=>e.check(tx(P$,r)),e.base64url=r=>e.check(rx(I$,r)),e.xid=r=>e.check(Y5(w$,r)),e.ksuid=r=>e.check(Q5(x$,r)),e.ipv4=r=>e.check(X5($$,r)),e.ipv6=r=>e.check(W5(A$,r)),e.cidrv4=r=>e.check(J5(k$,r)),e.cidrv6=r=>e.check(ex(T$,r)),e.e164=r=>e.check(nx(M$,r)),e.datetime=r=>e.check(Wx(r)),e.date=r=>e.check(e$(r)),e.time=r=>e.check(r$(r)),e.duration=r=>e.check(a$(r))});function gr(e){return L5(y$,e)}const Re=B("ZodStringFormat",(e,t)=>{Le.init(e,t),dy.init(e,t)}),b$=B("ZodEmail",(e,t)=>{Z2.init(e,t),Re.init(e,t)}),fy=B("ZodGUID",(e,t)=>{z2.init(e,t),Re.init(e,t)}),Xo=B("ZodUUID",(e,t)=>{j2.init(e,t),Re.init(e,t)}),_$=B("ZodURL",(e,t)=>{G2.init(e,t),Re.init(e,t)}),v$=B("ZodEmoji",(e,t)=>{q2.init(e,t),Re.init(e,t)}),E$=B("ZodNanoID",(e,t)=>{K2.init(e,t),Re.init(e,t)}),D$=B("ZodCUID",(e,t)=>{Y2.init(e,t),Re.init(e,t)}),S$=B("ZodCUID2",(e,t)=>{Q2.init(e,t),Re.init(e,t)}),C$=B("ZodULID",(e,t)=>{X2.init(e,t),Re.init(e,t)}),w$=B("ZodXID",(e,t)=>{W2.init(e,t),Re.init(e,t)}),x$=B("ZodKSUID",(e,t)=>{J2.init(e,t),Re.init(e,t)}),$$=B("ZodIPv4",(e,t)=>{a5.init(e,t),Re.init(e,t)}),A$=B("ZodIPv6",(e,t)=>{o5.init(e,t),Re.init(e,t)}),k$=B("ZodCIDRv4",(e,t)=>{i5.init(e,t),Re.init(e,t)}),T$=B("ZodCIDRv6",(e,t)=>{s5.init(e,t),Re.init(e,t)}),P$=B("ZodBase64",(e,t)=>{u5.init(e,t),Re.init(e,t)}),I$=B("ZodBase64URL",(e,t)=>{c5.init(e,t),Re.init(e,t)}),M$=B("ZodE164",(e,t)=>{d5.init(e,t),Re.init(e,t)}),F$=B("ZodJWT",(e,t)=>{m5.init(e,t),Re.init(e,t)}),my=B("ZodNumber",(e,t)=>{Vg.init(e,t),He.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Ix(e,n,a),e.gt=(n,a)=>e.check(ny(n,a)),e.gte=(n,a)=>e.check(ul(n,a)),e.min=(n,a)=>e.check(ul(n,a)),e.lt=(n,a)=>e.check(ry(n,a)),e.lte=(n,a)=>e.check(sl(n,a)),e.max=(n,a)=>e.check(sl(n,a)),e.int=n=>e.check(py(n)),e.safe=n=>e.check(py(n)),e.positive=n=>e.check(ny(0,n)),e.nonnegative=n=>e.check(ul(0,n)),e.negative=n=>e.check(ry(0,n)),e.nonpositive=n=>e.check(sl(0,n)),e.multipleOf=(n,a)=>e.check(ay(n,a)),e.step=(n,a)=>e.check(ay(n,a)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),O$=B("ZodNumberFormat",(e,t)=>{p5.init(e,t),my.init(e,t)});function py(e){return cx(O$,e)}const B$=B("ZodBoolean",(e,t)=>{h5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Mx(e,r,n)});function L$(e){return dx(B$,e)}const R$=B("ZodUnknown",(e,t)=>{g5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Ox()});function hy(){return fx(R$)}const N$=B("ZodNever",(e,t)=>{y5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Fx(e,r,n)});function U$(e){return mx(N$,e)}const H$=B("ZodArray",(e,t)=>{b5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Ux(e,r,n,a),e.element=t.element,e.min=(r,n)=>e.check(Yo(r,n)),e.nonempty=r=>e.check(Yo(1,r)),e.max=(r,n)=>e.check(oy(r,n)),e.length=(r,n)=>e.check(iy(r,n)),e.unwrap=()=>e.element});function V$(e,t){return wx(H$,e,t)}const z$=B("ZodObject",(e,t)=>{v5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Hx(e,r,n,a),ke(e,"shape",()=>t.shape),e.keyof=()=>kn(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:hy()}),e.loose=()=>e.clone({...e._zod.def,catchall:hy()}),e.strict=()=>e.clone({...e._zod.def,catchall:U$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Uw(e,r),e.safeExtend=r=>Hw(e,r),e.merge=r=>Vw(e,r),e.pick=r=>Rw(e,r),e.omit=r=>Nw(e,r),e.partial=(...r)=>zw(yy,e,r[0]),e.required=(...r)=>jw(vy,e,r[0])});function j$(e,t){const r={type:"object",shape:e??{},...me(t)};return new z$(r)}const Z$=B("ZodUnion",(e,t)=>{E5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Vx(e,r,n,a),e.options=t.options});function gy(e,t){return new Z$({type:"union",options:e,...me(t)})}const G$=B("ZodIntersection",(e,t)=>{D5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>zx(e,r,n,a)});function q$(e,t){return new G$({type:"intersection",left:e,right:t})}const ll=B("ZodEnum",(e,t)=>{S5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Bx(e,n,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,a)=>{const o={};for(const i of n)if(r.has(i))o[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ll({...t,checks:[],...me(a),entries:o})},e.exclude=(n,a)=>{const o={...t.entries};for(const i of n)if(r.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new ll({...t,checks:[],...me(a),entries:o})}});function kn(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ll({type:"enum",entries:r,...me(t)})}const K$=B("ZodLiteral",(e,t)=>{C5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Lx(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Y$(e,t){return new K$({type:"literal",values:Array.isArray(e)?e:[e],...me(t)})}const Q$=B("ZodTransform",(e,t)=>{w5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Nx(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sg(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ya(o,r.value,t));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(ya(i))}};const a=t.transform(r.value,r);return a instanceof Promise?a.then(o=>(r.value=o,r)):(r.value=a,r)}});function X$(e){return new Q$({type:"transform",transform:e})}const yy=B("ZodOptional",(e,t)=>{Yg.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>cy(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function by(e){return new yy({type:"optional",innerType:e})}const W$=B("ZodExactOptional",(e,t)=>{x5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>cy(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function J$(e){return new W$({type:"optional",innerType:e})}const e6=B("ZodNullable",(e,t)=>{$5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>jx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function _y(e){return new e6({type:"nullable",innerType:e})}const t6=B("ZodDefault",(e,t)=>{A5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Gx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function r6(e,t){return new t6({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():kg(t)}})}const n6=B("ZodPrefault",(e,t)=>{k5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>qx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function a6(e,t){return new n6({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():kg(t)}})}const vy=B("ZodNonOptional",(e,t)=>{T5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Zx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function o6(e,t){return new vy({type:"nonoptional",innerType:e,...me(t)})}const i6=B("ZodCatch",(e,t)=>{P5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Kx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function s6(e,t){return new i6({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const u6=B("ZodPipe",(e,t)=>{I5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Yx(e,r,n,a),e.in=t.in,e.out=t.out});function Ey(e,t){return new u6({type:"pipe",in:e,out:t})}const l6=B("ZodReadonly",(e,t)=>{M5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Qx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function c6(e){return new l6({type:"readonly",innerType:e})}const d6=B("ZodCustom",(e,t)=>{F5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Rx(e,r)});function f6(e,t={}){return xx(d6,e,t)}function m6(e){return $x(e)}const cl={custom:"custom"};function Ze(e){return lx(my,e)}const p6=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],h6=new Set([...p6,"is_corporation"]);j$({additional_pip:kn(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:kn(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:kn(["Primary","Secondary"]),extended_medical:kn(["cov1000","cov10000"]),policy_pip_deductible:kn(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:L$().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:cl.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const g6=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),y6=new Set(["HomePolicy","BundlePolicy"]),b6=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function Wo(e){if(typeof e!="string"||!e.trim())return!1;const t=e.trim().toLowerCase();return t==="nj"||t==="n.j."||t==="n.j"||t==="new jersey"}function Dy(e){return e?Wo(e.state??e.State):!1}function Jo(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!Dy(r):h6.has(e)?!Dy(r):e==="household_size"?!(t&&g6.has(t)):e==="number_of_mortgagees"?!(t&&y6.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&b6.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:_6.has(e)}const _6=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),Sy=new Date().getUTCFullYear(),ei=gr().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Cy=gy([Y$(""),gr().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),v6=(e,t,r)=>Ze({error:`${e} must be a number.`}).min(t,`${e} must be between ${t.toLocaleString("en-US")} and ${r.toLocaleString("en-US")}.`).max(r,`${e} must be between ${t.toLocaleString("en-US")} and ${r.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`),Tn=(e,t)=>Ze({error:`${e} must be a number.`}).min(0,`${e} must be between 0 and ${t.toLocaleString("en-US")}.`).max(t,`${e} must be between 0 and ${t.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`),ti=(e,t=1600)=>Ze({error:`${e} must be a valid 4-digit year.`}).int(`${e} must be a whole number.`).min(t,`${e} should be between ${t} and the current year.`).max(Sy,`${e} cannot be in the future.`),ri=e=>Ze({error:`${e} must be a number.`}).int(`${e} must be a whole number.`).min(0,`${e} must be between 0 and 99.`).max(99,`${e} must be between 0 and 99.`),_a=(e,t,r=0)=>{const n=Math.pow(10,t)-1,a=n.toLocaleString("en-US"),o=r.toLocaleString("en-US");return Ze({error:`${e} must be a number.`}).min(r,`${e}: Value must be between ${o} and ${a}.`).max(n,`${e}: Value must be between ${o} and ${a}.`).int(`${e} must be a whole number.`)},E6={email:gr().trim().min(1,"Required").email("Please enter a valid email address."),phone:gr().trim().min(1,"Required").refine(e=>{let t=e.replace(/\D/g,"");return t.length===11&&t.startsWith("1")&&(t=t.slice(1)),t.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:gr().trim().refine(e=>e===""||/^\d{3}-\d{2}-\d{4}$/.test(e),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:gr().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:ei,last_name:ei,middle_name:Cy,co_applicant_first_name:ei,co_applicant_last_name:ei,co_applicant_middle_name:Cy,year_built:ti("Year built",1800),year_roof_updated:Ze({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:ti("Heating update year"),plumbing_update_year:ti("Plumbing update year"),electrical_update_year:ti("Electrical update year"),total_area_sq_ft:v6("Square footage",1,999999),sale_price_cents:Ze({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:ri("Number of years with your prior carrier"),home_continuous_coverage_years:ri("How long you have had continuous home coverage"),household_size:Ze({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:Ze({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),number_of_parking_spaces:Ze({error:"Number of covered parking spaces must be a number."}).int("Number of covered parking spaces must be a whole number.").min(1,"Number of covered parking spaces must be between 1 and 3.").max(3,"Number of covered parking spaces must be between 1 and 3."),dwelling_replacement_cost:_a("Replacement cost",9,1),other_structures_coverage:_a("Other structures",9),personal_property_coverage:_a("Personal property",9),loss_of_use_coverage:_a("Loss of use coverage",9),years_at_address:Ze({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:Ze({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:Ze({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:Ze({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:Ze({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(e=>e>=1&&e<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:Ze({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:Ze({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:_a("Amount paid",7),license_number:gr().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:gr().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:cl.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:cl.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:Ze({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:Ze({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:Tn("Modifications value",9999999),cost_new_value_cents:Tn("Cost new value",9999999),stated_value_amount_cents:Tn("Stated Value Amount",9999999),property_damage_amount_paid_cents:Tn("Property damage amount paid",9999999),personal_injury_amount_paid_cents:Tn("Personal injury amount paid",9999999),auto_current_annual_premium_cents:Tn("Current annual premium",9999999),auto_prior_years:ri("Years with prior auto carrier"),auto_prior_months:Ze({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:ri("Years with continuous auto coverage")};function ze(e){return new Date(`${e}T00:00:00Z`)}function Xe(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function yr(e,t){let r=t.getUTCFullYear()-e.getUTCFullYear();const n=t.getUTCMonth()-e.getUTCMonth();return(n<0||n===0&&t.getUTCDate()<e.getUTCDate())&&r--,r}function wy(e){const t=/^cov(\d+)to(\d+)$/.exec(e);if(t)return{perPerson:Number(t[1]),perOccurrence:Number(t[2])};const r=/^cov(\d+)CSL$/.exec(e);return r?{perPerson:Number(r[1]),perOccurrence:Number(r[1])}:null}const xy=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!Wo(e.state))return;const t=e.social_security_number;return(typeof t=="string"?t.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:e=>{const t=e.date_of_birth;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":yr(r,Xe())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:e=>{const t=e.co_applicant_date_of_birth;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":yr(r,Xe())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:e=>{const t=Number(e.year_roof_updated),r=Number(e.year_built);if(isNaN(t))return;const n=isNaN(r)?1e3:r;if(t<n||t>Sy)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:e=>{const t=e.move_in_date,r=e.year_built;if(!t||r==null)return;const n=ze(String(t));if(isNaN(n.getTime()))return;const a=Number(r);if(!isNaN(a))return n.getUTCFullYear()<a?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:e=>{const t=e.date_first_licensed;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:e=>{const t=e.date_first_licensed,r=e.date_of_birth;if(!t||typeof t!="string"||!r||typeof r!="string")return;const n=ze(r),a=ze(t);if(isNaN(n.getTime())||isNaN(a.getTime()))return;if(a<n)return"Date licensed cannot be before driver date of birth.";const o=new Date(Date.UTC(n.getUTCFullYear()+16,n.getUTCMonth(),n.getUTCDate()));return a<o?"Driver must be at least 16 years old at the date first licensed.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:e=>{const t=e.occurred_at;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:e=>{const t=e.accident_prevention_course_date;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:e=>{const t=e.effective_date;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe(),a=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+3,n.getUTCDate()));if(r<n)return"Insurance start date cannot be in the past.";if(r>a)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:e=>{const t=e.years_at_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:e=>{const t=e.years_at_prior_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:e=>{const t=e.home_prior_years,r=e.home_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),a=Number(r);if(!(isNaN(n)||isNaN(a)))return n>a?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:e=>{const t=e.home_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.home_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:e=>{const t=e.move_in_date;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:e=>{const t=e.date_of_incident;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe();return r>n?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:e=>{const t=e.home_prior_expiration_date;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe(),a=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),o=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<a||r>o)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:e=>{const t=e.purchase_date;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:e=>{const t=e.purchase_date,r=e.year;if(!t||typeof t!="string"||r==null)return;const n=ze(t);if(isNaN(n.getTime()))return;const a=Number(r);if(!isNaN(a))return n.getUTCFullYear()<a?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:e=>{const t=e.auto_prior_expiration_date;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe(),a=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),o=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<a||r>o)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:e=>{const t=e.auto_prior_years,r=e.auto_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),a=Number(r);if(!(isNaN(n)||isNaN(a)))return n>a?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:e=>{const t=e.auto_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.auto_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:e=>{const t=e.vehicle_coll_deductible,r=e.vehicle_comp_deductible;if(!(!t||typeof t!="string"||!r||typeof r!="string")&&r==="NoCoverage"&&t!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:e=>{const t=e.policy_um,r=e.policy_bi;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="Reject"||r==="Dontknow")return;const n=u=>u.endsWith("CSL"),a=n(t),o=n(r);if(a&&!o)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const i=wy(t),s=wy(r);if(!(!i||!s)&&(i.perPerson>s.perPerson||i.perOccurrence>s.perOccurrence))return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:e=>{const t=e.policy_umpd,r=e.policy_pd;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="NoCoverage"||r==="Dontknow")return;const n=i=>{if(!i.startsWith("cov"))return null;const s=parseInt(i.replace("cov",""),10);return isNaN(s)?null:s},a=n(t),o=n(r);if(a!=null&&o!=null&&a>o)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:e=>{const t=e.custom_equipment_value_cents,r=e.stated_value_amount_cents;if(t==null||r==null)return;const n=Number(t),a=Number(r);if(!(isNaN(n)||isNaN(a))&&a>0&&n>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function dl(e,t){const r=E6[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function $y(e){if(/\s/.test(e))return!1;const t=e.trim();return t.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(t)}function D6(e,t){const r={};for(const n of xy){if(t?.has(n.targetKey))continue;const a=n.validate(e);a&&(r[n.targetKey]=a)}return r}function ni(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function br(e,t){return e.key??`${ni(e.question)}-${t}`}function Lt(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function va(e,t){const r={};e.forEach((i,s)=>{const u=br(i,s),l=t[u];if(i.required&&Lt(l,i.inputType)){r[u]="Required";return}if(!Lt(l,i.inputType)){const c=dl(u,l);if(c){r[u]=c;return}}});const n={...t};e.forEach((i,s)=>{const u=br(i,s);u in n||(n[u]="")});const a=new Set(Object.keys(r).filter(i=>r[i])),o=D6(n,a);for(const[i,s]of Object.entries(o))r[i]=s;return r}function S6(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const C6={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},w6={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},x6={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},$6={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},A6={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},k6={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},T6={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},P6={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},I6={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},M6={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},F6={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},O6={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},B6={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},fl={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},L6=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],R6=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],ml={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},N6=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],Ay={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},U6=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],H6=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],ky={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},V6={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},z6={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},j6={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},Z6={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},G6={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},q6={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},K6={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},Y6={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},Q6={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},X6={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},W6={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},J6={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},eA={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},tA={AboveGround:"Above Ground",BelowGround:"Below Ground"},rA={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},nA={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},aA={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},oA={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},iA={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},sA={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},uA={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},lA={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},Ty={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Py={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},Iy={Female:"Female",Male:"Male"},My={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},cA={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},dA={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},fA={Primary:"Primary",Secondary:"Secondary"},mA={cov1000:"$1,000",cov10000:"$10,000"},pA={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},hA={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},gA={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},yA={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},Fy=gA,Oy=yA;function pl(e,t){if(typeof e!="string")return e;const r=e.trim();if(!r)return e;if(t[r])return r;const n=r.toLowerCase();return Object.keys(t).find(o=>o.toLowerCase()===n||t[o]?.toLowerCase()===n)??e}function ai(e){return pl(e,My)}function By(e){return pl(e,ky)}function Ly(e){return pl(e,Oy)}function bA(e){return e.trim().toLowerCase()}function Ry(e){if(typeof e!="string")return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const r=Number(t[1]),n=Number(t[2]),a=Number(t[3]);if(!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(a)||n<1||n>12||a<1||a>31)return null;const o=new Date(Date.UTC(r,n-1,a));return o.getUTCFullYear()!==r||o.getUTCMonth()!==n-1||o.getUTCDate()!==a?null:o.getTime()}function Pn(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=Ry(e[t.expirationDateKey]),n=Ry(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const _A=new Set(["HomePolicy","BundlePolicy"]);function oi(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!_A.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function hl(e){let t=null,r=null,n=null;const a=new Set,o=new Set,i=u=>{const l=String(u.key??""),c=bA(String(u.question??""));!t&&(l==="auto_prior_carrier_name"||l==="home_prior_carrier_name"||c.includes("current auto insurance company"))&&(t=l),!r&&(l==="effective_date"||c.includes("when do you need your insurance to begin"))&&(r=l),!n&&(l==="auto_prior_expiration_date"||l==="home_prior_expiration_date"||c.includes("when does the current policy expire"))&&(n=l),(l==="auto_reason_for_no_insurance"||c.includes("reason you are not currently insured")||c.includes("reason for lapse in coverage"))&&a.add(l),(l==="auto_prior_years"||l==="auto_prior_months"||l==="auto_continuous_coverage_years"||l==="auto_prior_expiration_date"||l==="auto_current_annual_premium_cents"||l==="auto_prior_liability_limit")&&o.add(l)};e.forEach(i);const s=u=>{u.forEach(l=>{(l.conditionals??[]).forEach(c=>{const f=c.conditionalQuestions??[];f.forEach(i),s(f)})})};return s(e),{currentCarrierKey:t,effectiveDateKey:r,expirationDateKey:n,noInsuranceReasonKeys:a,hideWhenNoPriorInsuranceKeys:o}}function Ea(e,t){return t.currentCarrierKey==="home_prior_carrier_name"&&e.home_prior_carrier_name==="NoPriorInsurance"&&e.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(t.currentCarrierKey?e[t.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!t.effectiveDateKey||!t.expirationDateKey||t.expirationDateKey==="home_prior_expiration_date"&&Pn(e,t)?!1:Pn(e,t)}function ii(e,t,r){const n=String(e.key??"");if(r.noInsuranceReasonKeys.has(n)&&r.currentCarrierKey==="home_prior_carrier_name"&&t.home_prior_carrier_name==="NoPriorInsurance"&&t.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const o=(r.currentCarrierKey?t[r.currentCarrierKey]:void 0)==="NoPriorInsurance";return o&&r.hideWhenNoPriorInsuranceKeys.has(n)?!1:!r.noInsuranceReasonKeys.has(n)||o?!0:Ea(t,r)}function si(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const Ny=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],gl="credify_quote_id",yl="credify_auth_token";function Uy(e){try{localStorage.setItem(gl,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function ui(){try{return localStorage.getItem(gl)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function Hy(){try{localStorage.removeItem(gl)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function vA(e){try{localStorage.setItem(yl,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function EA(){try{return localStorage.getItem(yl)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function Vy(){try{localStorage.removeItem(yl)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function DA(){Hy(),Vy()}const SA="credify-insurance-widget",CA="1.0",zy=25,jy=64*1024,wA=`
74
- …[truncated]`;let Zy=!1,Gy=null,qy="",Ky=zy,bl=jy,Da=[];function xA(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function $A(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function Yy(e){if(!e)return[];const t=[];if(Array.isArray(e))for(const[r,n]of e)t.push({name:r,value:String(n)});else if(typeof e.forEach=="function")e.forEach((r,n)=>t.push({name:n,value:r}));else for(const[r,n]of Object.entries(e))t.push({name:r,value:String(n)});return t}function AA(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function kA(e,t){const r=t?.body;return typeof r!="string"||r.length===0?void 0:{mimeType:e.find(a=>a.name.toLowerCase()==="content-type")?.value??"application/json",text:r}}function TA(e){const t=e.length;return t<=bl?{text:e,size:t}:{text:e.slice(0,bl)+wA,size:t}}function PA(e){Da.push(e),Da.length>Ky&&Da.shift()}function IA(e){if(Zy)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;qy=e.baseUrl,Ky=e.maxEntries??zy,bl=e.maxBodyBytes??jy,Gy=window.fetch.bind(window);const t=Gy;return window.fetch=async(r,n)=>{let a;try{a=xA(r)}catch{return t(r,n)}if(!a.startsWith(qy))return t(r,n);const o=Yy(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),i={startedDateTime:new Date().toISOString(),time:-1,request:{method:$A(r,n),url:a,httpVersion:"HTTP/1.1",headers:o,queryString:AA(a),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:kA(o,n)},response:MA(),cache:{},timings:{send:0,wait:-1,receive:0}};PA(i);const s=typeof performance<"u"?performance.now():0;let u;try{u=await t(r,n)}catch(c){const f=(typeof performance<"u"?performance.now():0)-s;throw i.time=Math.round(f),i.timings.wait=Math.round(f),i.response._error=c instanceof Error?c.message:String(c),c}const l=(typeof performance<"u"?performance.now():0)-s;i.time=Math.round(l),i.timings.wait=Math.round(l),i.response.status=u.status,i.response.statusText=u.statusText,i.response.headers=Yy(u.headers),i.response.content.mimeType=typeof u.headers?.get=="function"&&u.headers.get("content-type")||"";try{u.clone().text().then(f=>{const{text:p,size:h}=TA(f);i.response.content.text=p,i.response.content.size=h,i.response.bodySize=h}).catch(()=>{})}catch{}return u},Zy=!0,!0}function MA(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function FA(){return{log:{version:"1.2",creator:{name:SA,version:CA},entries:Da.map(e=>({...e}))}}}function OA(){return Da.length}const BA=[/ssn/i,/social.?security/i,/(driver.?licen[cs]e|^dln$|^dl$)/i,/(date.?of.?birth|^dob$)/i,/^vin$/i,/(sms.?code|^otp$|^code$|verification.?code)/i,/phone/i,/^email$/i,/(first.?name|last.?name|full.?name)/i,/(^address$|street|^zip$|postal)/i,/(jwt|^token$|authorization|^auth$|api.?key|secret|password|credential)/i,/cookie/i],LA=[/\b\d{3}-?\d{2}-?\d{4}\b/g,/\b[A-HJ-NPR-Z0-9]{17}\b/g,/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,/\bsk_[A-Za-z0-9]{16,}\b/g,/\bBearer\s+[A-Za-z0-9._-]+/gi],_r="[REDACTED]",RA=8;function li(e){for(const t of BA)if(t.test(e))return!0;return!1}function vr(e){let t=e;for(const r of LA)t=t.replace(r,_r);return t}function Er(e,t=0,r=new WeakSet){if(t>RA)return _r;if(e==null)return e;if(typeof e=="string")return vr(e);if(typeof e!="object")return e;if(r.has(e))return _r;if(r.add(e),Array.isArray(e))return e.map(o=>Er(o,t+1,r));const n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)return e;const a={};for(const[o,i]of Object.entries(e)){if(li(o)){a[o]=_r;continue}a[o]=Er(i,t+1,r)}return a}function Qy(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=Er(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=_r),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))li(r)&&(t[r]=_r)}if(e.extra&&(e.extra=Er(e.extra)),e.contexts&&(e.contexts=Er(e.contexts)),e.tags&&(e.tags=Er(e.tags)),e.user){const{id:t,email:r,username:n}=e.user;e.user={...typeof t=="string"?{id:t}:{},...typeof r=="string"?{email:r}:{},...typeof n=="string"?{username:n}:{}}}if(Array.isArray(e.breadcrumbs))for(const t of e.breadcrumbs)t.data!==void 0&&(t.data=Er(t.data)),typeof t.message=="string"&&(t.message=vr(t.message));return typeof e.message=="string"&&(e.message=vr(e.message)),e}function Xy(e){for(const t of e)t.value=li(t.name)?_r:vr(t.value)}function Wy(e){try{return JSON.stringify(Er(JSON.parse(e)))}catch{return vr(e)}}function NA(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){Xy(r.request.headers),Xy(r.response.headers);for(const n of r.request.queryString)n.value=li(n.name)?_r:vr(n.value);r.request.postData?.text&&(r.request.postData.text=Wy(r.request.postData.text)),r.response.content.text&&(r.response.content.text=Wy(r.response.content.text)),r.request.url=vr(r.request.url),r.response._error&&(r.response._error=vr(r.response._error))}return t}function In(e,t={}){try{Gi(r=>{r.setTag("failure_type","quote"),t.stage&&r.setTag("stage",t.stage),t.quoteId&&r.setTag("quote_id",t.quoteId),t.phase&&r.setTag("phase",t.phase),t.endpoint&&r.setTag("endpoint",t.endpoint),typeof t.statusCode=="number"&&r.setTag("status_code",String(t.statusCode));try{OA()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(NA(FA())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");za(n)})}catch{}}const Ve="https://api.getcredify.com";let Mn=null;const UA=6e4,Jy=new Map;function HA(e){try{return new URL(e).pathname}catch{return e}}function eb(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const o=HA(t),i=`${o}:${r}`,s=Date.now(),u=Jy.get(i);u&&s-u<UA||(Jy.set(i,s),In(e,{phase:"api_request",endpoint:o,statusCode:r}))}function ci(e){Mn=e,vA(e)}function Wt(){return Mn}function di(){const e=EA();e&&(Mn=e)}function tb(){Mn=null,Vy()}async function Ke(e,t){const r={"Content-Type":"application/json"};Mn&&(r.Authorization=`Bearer ${Mn}`);let n;try{n=await fetch(e,{method:"POST",headers:r,body:JSON.stringify(t)})}catch(a){const o=a instanceof Error?a:new Error(String(a));throw eb(o,e,0),a}if(!n.ok){let a=`Request failed with status ${n.status}`,o;try{const s=await n.json();a=s.error||a,typeof s.retryAfterSeconds=="number"&&(o=s.retryAfterSeconds)}catch{a=n.statusText||a}if(o===void 0){const s=Number(n.headers?.get("Retry-After"));Number.isFinite(s)&&s>0&&(o=s)}const i=new Error(a);throw i.statusCode=n.status,i.retryAfterSeconds=o,eb(i,e,n.status),i}return n}async function Sa(e){try{return await e.json()}catch{return{}}}async function VA(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await Ke(`${Ve}/get-questions-by-stage`,r)).json()}async function fi(e){const t=e?{quoteId:e}:{};return await(await Ke(`${Ve}/get-stages-for-quote`,t)).json()}async function zA(e,t=!1){const r=t?{postal_code:e,is_test:!0}:{postal_code:e},a=await(await Ke(`${Ve}/create-quote`,r)).json();if(!a||typeof a!="object"||!a.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(a)}`);return a}async function rb(e,t){return await(await Ke(`${Ve}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function Dr(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const a=await Ke(`${Ve}/update-quote`,n),o=await Sa(a);return!o||typeof o!="object"||!("status"in o)||o.status==null?{status:"success"}:o}async function _l(e,t){return await(await Ke(`${Ve}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function jA(e){return await(await Ke(`${Ve}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function nb(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await Ke(`${Ve}/is-supported-state`,r)).json()}async function vl(e){const t=e?{quoteId:e}:{};return await(await Ke(`${Ve}/get-rates`,t)).json()}async function ab(e){const t=e?{quoteId:e}:{};return await(await Ke(`${Ve}/get-quote`,t)).json()}async function ob(e){return(await Ke(`${Ve}/get-vehicle-options`,e)).json()}async function ZA(e){return(await Ke(`${Ve}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function GA(e){const t=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"vehiclePrefillSuggestions"}),r=await Sa(t);return{suggestions:Array.isArray(r.suggestions)?r.suggestions:[]}}async function qA(e,t){const r=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"applyVehiclePrefill",selectedIds:t}),n=await Sa(r);return{items:Array.isArray(n.items)?n.items:[]}}async function KA(e){await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"dismissVehiclePrefill"})}async function YA(e){const t=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"driverPrefillSuggestions"}),r=await Sa(t);return{suggestions:Array.isArray(r.suggestions)?r.suggestions:[]}}async function QA(e,t){const r=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"applyDriverPrefill",selectedIds:t}),n=await Sa(r);return{items:Array.isArray(n.items)?n.items:[]}}async function XA(e){await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"dismissDriverPrefill"})}async function WA(e,t){const n=await(await Ke(`${Ve}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const El=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Dl(e){return ni(String(e??"")).replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function JA(e){const t=Dl(e??"unknown-stage");return["form-area",`form-area--${t}`,`formArea-${t}`].join(" ")}function Sl(e,t,r){const n=Dl(t??"unknown-stage"),a=Dl(e);return["form-section","form-question",`form-section--${a}`,`form-question--${a}`,`formQuestion-${n}_${a}`,r&&r.length>0?"form-question--scoped":null].filter(Boolean).join(" ")}const ek={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},ib={auto_prior_carrier_name:C6,auto_prior_liability_limit:A6,auto_reason_for_no_insurance:k6,residence_type:w6,home_prior_carrier_name:x6,policy_bi:T6,policy_um:P6,policy_pd:I6,policy_mp:M6,policy_umpd:F6,policy_pip:O6,policy_auto_death_indemnity:B6,vehicle_comp_deductible:fl,vehicle_coll_deductible:fl,vehicle_towing_and_labor:ml,vehicle_transportation_expense:Ay,education_level:ky,industry:My,occupation:Oy,usage:$6,architectural_style:V6,dwelling_type:z6,occupancy_type:j6,construction_quality:Z6,construction_type:G6,foundation_type:q6,located_over_water:K6,number_of_stories:Y6,exterior_wall_type:Q6,roof_material_type:X6,roof_shape:W6,roof_updated_type:J6,heating_type:eA,oil_tank_location:tA,basement_type:rA,plumbing_type:nA,personal_liability:aA,dwelling_medical_payments:oA,all_perils_deductible:iA,windstorm_deductible:sA,distance_from_fire_hydrant_ft:uA,distance_from_fire_station_miles:lA,employment_industry:Ty,marital_status:Py,gender:Iy,co_applicant_employment_industry:Ty,co_applicant_marital_status:Py,co_applicant_gender:Iy,description:cA,tort_threshold:dA,pip_coverage_type:fA,extended_medical:mA,additional_pip:pA,policy_pip_deductible:hA},sb=["OTHER / NOT LISTED"],ub=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],tk=["Other"];function yt(e){const t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}function lb(e){const t=e.replace(/\D+/g,"");if(t!=="")return S6(t)}function rk(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const nk={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:9,loss_of_use_coverage:9,amount_paid_cents:7,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,number_of_parking_spaces:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},cb=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),ak=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),mi={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},ok={license_number:20};function ik(e){const t=new Date,r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));if(e==="effective_date"){const n=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+3,r.getUTCDate()));return{min:yt(r),max:yt(n)}}if(e==="home_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),a=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:yt(n),max:yt(a)}}if(e==="date_of_incident")return{max:yt(r)};if(e==="move_in_date")return{max:yt(r)};if(e==="purchase_date")return{max:yt(r)};if(e==="date_of_birth")return{max:yt(r)};if(e==="date_first_licensed")return{max:yt(r)};if(e==="occurred_at")return{max:yt(r)};if(e==="accident_prevention_course_date")return{max:yt(r)};if(e==="auto_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),a=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:yt(n),max:yt(a)}}return{}}const sk=new Set(["Disabled","Retired","Unemployed","Other"]);function Cl(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const a=We(t,r,"industry"),o=We(t,r,"employment_industry"),i=String(a??o??"").trim();return!sk.has(i)}function wl(e,t,r,n){return Jo(e,n,r)}function pi(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function db(e,t){return pi(e)?"Yes":t}function fb(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function mb(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function pb(e,t){const r=fb(e),n=fb(t);if(r!=null&&n!=null)return r-n;const a=mb(e),o=mb(t);return a!=null&&o!=null?a-o:e==null||t==null?null:String(e).localeCompare(String(t))}function uk(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function Ca(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=pb(e,r);return n!=null&&n<0}case"greaterThan":{const n=pb(e,r);return n!=null&&n>0}case"contains":return uk(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}function wa(e,t){return t.reduce((r,n)=>r?.[n],e)}function $t(e,t,r){if(t.length===0)return e;const[n,...a]=t;if(a.length===0){if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=r,l}return{...e,[n]:r}}const o=e?.[n],i=typeof a[0]=="number"?Array.isArray(o)?o:[]:o&&typeof o=="object"?o:{},s=$t(i,a,r);if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=s,l}return{...e,[n]:s}}function We(e,t,r){return wa(e,[...t??[],r])}function tt(e,t,r,n){return $t(e,[...t??[],r],n)}function lk(e,t){return e?.length?`${e.join("-")}-${t}`:t}const ck="__items",hi=e=>`${e}${ck}`;function ft(e){return e==null?"":typeof e=="string"?e:String(e)}function hb(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function dk(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function gb({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:a,quoteId:o,widgetStageKey:i,validationAttempt:s=0,invalidValueKeys:u,fetchVehicleOptions:l}){const c=d.useMemo(()=>l??(A=>ob({quoteId:o,...A})),[l,o]),f=d.useMemo(()=>Xu(e),[e]),p=d.useMemo(()=>hl(f),[f]),h=d.useMemo(()=>i==="BundlePolicy"?!0:f.some(A=>String(A.key)==="home_prior_carrier_name")&&f.some(A=>String(A.key)==="driver_vehicle_assignments"),[i,f]),g=d.useMemo(()=>{const A={};return t&&Object.assign(A,t),A},[t]),[y,_]=d.useState(g);d.useEffect(()=>{_(g)},[g]);const[D,w]=d.useState({}),b=d.useMemo(()=>({...D,...r??y}),[D,r,y]);d.useEffect(()=>{r&&w(A=>({...A,...r}))},[r]);const[C,v]=d.useState({}),k=d.useRef(new Map),I=d.useRef(new Set),[,G]=d.useState({}),[O,Z]=d.useState({}),M=d.useRef(!1);d.useEffect(()=>{!o||M.current||!f.some(S=>S.key==="year"||S.key==="make"||S.key==="model"||S.key==="body_style")||(M.current=!0,c({}).catch(()=>{}))},[o,f,c]);const[X,de]=d.useState({}),[x,z]=d.useState({}),U=d.useCallback(async(A,S)=>{if(!o||!$y(S))return;const E=A?A.join("-"):"_root";de(j=>({...j,[E]:!0})),z(j=>({...j,[E]:null}));try{const j=await ZA({quoteId:o,vin:S});if(j.error){z(ae=>({...ae,[E]:j.error}));return}let q=b;j.year&&(q=tt(q,A,"year",String(j.year))),j.make&&(q=tt(q,A,"make",j.make)),j.model&&(q=tt(q,A,"model",j.model)),j.bodyStyle&&(q=tt(q,A,"body_style",j.bodyStyle)),r&&n?n(q):_(q),w(q),k.current.clear(),I.current.clear(),G({})}catch{z(j=>({...j,[E]:"VIN lookup failed — please enter vehicle details manually"}))}finally{de(j=>({...j,[E]:!1}))}},[o,b,r,n]),P=d.useCallback(A=>{const S=`${A.year}|${A.make??""}|${A.model??""}`,E=A.model?"bodyStyles":A.make?"models":"makes",j=k.current.get(S);return j?j[E]??[]:void 0},[]),K=d.useCallback((A,S)=>{if(!o)return;const E=`${S.year}|${S.make??""}|${S.model??""}`,j=S.model?"bodyStyles":S.make?"models":"makes",q=`${A}:${j}`;k.current.has(E)||I.current.has(E)||(I.current.add(E),Z(ae=>({...ae,[q]:!0})),c(S).then(ae=>{k.current.set(E,ae),G(V=>({...V,[q]:ae[j]??[]}))}).catch(()=>{k.current.set(E,{}),G(ae=>({...ae,[q]:[]}))}).finally(()=>{I.current.delete(E),Z(ae=>({...ae,[q]:!1}))}))},[o,c]);function $(A,S,E){const j=b,q=A?wa(b,A)??{}:j;return A?{state:j.state,...q,[S]:E}:{...q,[S]:E}}function T(A,S){const E=xy.filter(q=>q.targetKey===A||q.dependsOn.includes(A)),j={[A]:void 0};for(const q of E){const ae=q.validate(S);q.targetKey in j?ae!==void 0&&(j[q.targetKey]=ae):j[q.targetKey]=ae}v(q=>({...q,...j}))}const Y=(A,S,E)=>{const j=We(b,E,A);if(Lt(j,S)){C[A]&&v(ae=>({...ae,[A]:void 0}));return}const q=dl(A,j);if(q){v(ae=>({...ae,[A]:q}));return}T(A,$(E,A,j))};d.useEffect(()=>{let A=b,S=!1;f.forEach(E=>{if(!pi(E))return;const j=String(E.key);We(A,void 0,j)!=="Yes"&&(A=tt(A,void 0,j,"Yes"),S=!0)}),S&&(r&&n?n(A):_(A),w(A))},[f,b,r,n]);function se(A,S){const E=A.key;if((E==="relationship_to_insured"||E==="is_registered_owner")&&S){const N=S[S.length-1];if(typeof N=="number"&&N===0)return null}if((E==="purchase_date"||E==="cost_new_value_cents")&&S)return null;if(E==="custom_equipment_value_cents"&&S){const N=We(b,S,"vehicle_has_modifications");if(N!=="Yes"&&N!==!0)return null}const j=E==="auto_reason_for_no_insurance"&&p.currentCarrierKey?b[p.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":A.question,q=A.hint,ae=We(b,S,E),V=si(A,p)?Ea(b,p):E==="social_security_number"&&Wo(b.state??b.State)?!0:A.required,ue=C[E],ve=N=>{let ne=tt(b,S,E,N);if(A.inputType==="radio"&&A.conditionals){const L=A.conditionals??[];for(const J of L){const W=We(b,S,E),ie=Ca(W,J.conditionalType,J.conditionalValue),oe=Ca(N,J.conditionalType,J.conditionalValue);if(ie&&!oe&&J.conditionalQuestionsAllowMultiple){const ce=J.conditionalQuestions??[];if(ce.length>0){const F=hi(E);ne=$t(ne,[...S??[],F],[]);const R=(re,ee)=>{re.forEach(le=>{(le.conditionals??[]).forEach(pe=>{if(pe.conditionalQuestionsAllowMultiple){const _e=hi(le.key);ne=$t(ne,[...ee,_e],[])}const De=pe.conditionalQuestions??[];De.length>0&&R(De,ee)})})};R(ce,[...S??[],F])}}}}r&&n?n(ne):_(ne),w(ne)};if(E==="vehicle_policy_selections"){const N=b.vehicles__items??[],ne=b.drivers__items??[];if(N.length===0)return m.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},E);const L=b.driver_vehicle_assignments??{},J=ne.length>1,W=_e=>Object.entries(_e).map(([be,Pe])=>({value:be,label:Pe})),ie=Wo(b.state??b.State),oe=(_e,be)=>Object.fromEntries(_e.filter(Pe=>Pe in be).map(Pe=>[Pe,be[Pe]])),F=W(oe(ie?L6:R6,fl)),R=ie?oe(N6,ml):ml,re=W(R),le=W(oe(ie?U6:H6,Ay)),fe=(_e,be,Pe)=>{const Ye=$t(b,["vehicles__items",_e,be],Pe);r&&n?n(Ye):_(Ye),w(Ye)},pe=(_e,be,Pe)=>{const Ye={...L},bt=`v${_e}`;Ye[bt]={...Ye[bt]??{}},Ye[bt][`d${be}`]=Pe;const Oe=$t(b,["driver_vehicle_assignments"],Ye);r&&n?n(Oe):_(Oe),w(Oe)},De=_e=>{if(!J)return null;const be=L[`v${_e}`];if(!be)return null;const Pe=ne.map((Oe,Rt)=>be[`d${Rt}`]??0),Ye=Pe.filter(Oe=>Oe>0);if(Ye.length>=2&&Ye.every(Oe=>Oe===Ye[0])&&Ye[0]===50)return`Assignments for Vehicle ${_e+1} cannot be 50 percent for both Drivers.`;const bt=Pe.reduce((Oe,Rt)=>Oe+Rt,0);return bt>0&&bt!==100?`Driver percentages for this vehicle must add up to 100% (currently ${bt}%).`:null};return m.jsx("div",{children:N.map((_e,be)=>{const Pe=[_e.year,_e.make,_e.model].filter(Boolean).join(" ")||`Vehicle ${be+1}`,Ye=De(be),bt=Oe=>typeof _e[Oe]=="string"?_e[Oe]:"";return m.jsxs("fieldset",{style:{border:`1px solid ${Ye?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[m.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:Pe}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[m.jsx(ha,{id:`veh-${be}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:F,value:bt("vehicle_comp_deductible"),onChange:Oe=>fe(be,"vehicle_comp_deductible",Oe.currentTarget.value)}),m.jsx(ha,{id:`veh-${be}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:F,value:bt("vehicle_coll_deductible"),onChange:Oe=>fe(be,"vehicle_coll_deductible",Oe.currentTarget.value)}),m.jsx(ha,{id:`veh-${be}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:re,value:bt("vehicle_towing_and_labor"),onChange:Oe=>fe(be,"vehicle_towing_and_labor",Oe.currentTarget.value)}),m.jsx(ha,{id:`veh-${be}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:le,value:bt("vehicle_transportation_expense"),onChange:Oe=>fe(be,"vehicle_transportation_expense",Oe.currentTarget.value)})]}),J&&m.jsxs("div",{style:{marginTop:"16px"},children:[m.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),m.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:ne.map((Oe,Rt)=>{const Nl=[Oe.first_name,Oe.last_name].filter(Boolean).join(" ")||`Driver ${Rt+1}`,Pt=L[`v${be}`]?.[`d${Rt}`];return m.jsx("div",{style:{flex:"0 0 140px"},children:m.jsx(hs,{id:`assignment-v${be}-d${Rt}`,label:`${Nl} %`,value:Pt??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Aa=>{const Cr=Aa.currentTarget.value.replace(/\D+/g,"");pe(be,Rt,Cr===""?0:Math.min(100,parseInt(Cr,10)))}})},`${be}-${Rt}`)})}),Ye&&m.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:Ye})]})]},be)})},E)}if(E==="driver_vehicle_assignments"){const N=b.vehicles__items??[],ne=b.drivers__items??[];if(h&&ne.length<=1)return null;if(N.length===0||ne.length===0)return m.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},E);const L=b.driver_vehicle_assignments??{},J=(ie,oe,ce)=>{const F={...L},R=`v${ie}`;F[R]={...F[R]??{}},F[R][`d${oe}`]=ce,ve(F)},W=ie=>{if(ne.length<2)return null;const oe=L[`v${ie}`];if(!oe)return null;const ce=ne.map((re,ee)=>oe[`d${ee}`]??0),F=ce.filter(re=>re>0);if(F.length>=2&&F.every(re=>re===F[0])&&F[0]===50)return`Assignments for Vehicle ${ie+1} cannot be 50 percent for both Drivers.`;const R=ce.reduce((re,ee)=>re+ee,0);return R>0&&R!==100?`Driver percentages for this vehicle must add up to 100% (currently ${R}%).`:null};return m.jsxs("div",{children:[m.jsx("h4",{style:{marginBottom:"12px"},children:j}),N.map((ie,oe)=>{const ce=[ie.year,ie.make,ie.model].filter(Boolean).join(" ")||`Vehicle ${oe+1}`,F=W(oe);return m.jsxs("fieldset",{style:{border:`1px solid ${F?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[m.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:ce}),m.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:ne.map((R,re)=>{const ee=[R.first_name,R.last_name].filter(Boolean).join(" ")||`Driver ${re+1}`,le=L[`v${oe}`]?.[`d${re}`];return m.jsx("div",{style:{flex:"0 0 140px"},children:m.jsx(hs,{id:`assignment-v${oe}-d${re}`,label:`${ee} %`,value:le??"",min:0,max:100,step:1,inputMode:"numeric",onChange:fe=>{const pe=fe.currentTarget.value.replace(/\D+/g,"");J(oe,re,pe===""?0:Math.min(100,parseInt(pe,10)))}})},`${oe}-${re}`)})}),F&&m.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:F})]},oe)})]},E)}switch(A.inputType){case"text":{if(E==="vin"&&o){const N=S?S.join("-"):"_root",ne=X[N]??!1,L=x[N]??null,J=[q?`${E}-hint`:null,ue?`${E}-error`:null,L?`${E}-vin-error`:null].filter(Boolean).join(" ");return m.jsxs("div",{children:[m.jsx(gt,{id:E,label:j,hint:q,error:ue,required:V,children:m.jsxs("div",{className:"flex items-end gap-2",children:[m.jsx("div",{className:"flex-1 min-w-0",children:m.jsx("input",{id:E,className:`form-input ${ue?"input-error":""}`,"aria-invalid":!!ue,"aria-describedby":J||void 0,"aria-required":V||void 0,required:V,value:ft(ae),maxLength:17,onChange:W=>ve(W.currentTarget.value),onBlur:()=>Y(E,"text",S),autoComplete:mi[E],type:"text"})}),m.jsx("button",{type:"button",disabled:ne||!$y(ft(ae)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>U(S,ft(ae)),children:ne?"Looking up...":"Verify VIN"})]})}),L&&m.jsx("p",{id:`${E}-vin-error`,className:"text-sm text-red-600 mt-1",children:L})]},E)}if(E==="sms_code"){const N=ft(ae);return m.jsx(Ya,{id:E,label:j,hint:q,value:N,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:ne=>{const L=ne.currentTarget.value.replace(/\D+/g,"").slice(0,6);ve(L)},onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue,autoComplete:mi[E]},E)}if(E==="license_number")return m.jsx(Ya,{id:E,label:j,hint:q,value:ft(ae),onChange:N=>ve(N.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue,autoComplete:"off",maxLength:20},E);if(E==="social_security_number"){const N=We(b,S,"ssn_display"),ne=typeof N=="string"?N:"",L=ne?`${ne}. Re-enter to update.${q?` ${q}`:""}`:q;return m.jsx(R1,{id:E,label:j,hint:L,value:ft(ae),onChange:J=>ve(J.currentTarget.value),onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue},E)}return m.jsx(Ya,{id:E,label:j,hint:q,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue,autoComplete:mi[E],maxLength:ok[E]},E)}case"email":return m.jsx(N1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"email",S),"aria-required":V||void 0,error:ue},E);case"password":return m.jsx(H1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"password",S),"aria-required":V||void 0,error:ue},E);case"tel":return m.jsxs(m.Fragment,{children:[m.jsx(pd,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"tel",S),"aria-required":V||void 0,error:ue},E),E==="phone"&&m.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[m.jsx("p",{children:"Enter your mobile number to continue to your quotes. If you choose to pursue a quote, you'll verify this number with a 6-digit text — we won't text you now."}),m.jsx("p",{children:"Message & data rates may apply. One message per request."}),m.jsxs("p",{children:["See our"," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return m.jsx(U1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"url",S),"aria-required":V||void 0,error:ue},E);case"number":{const N=nk[E];return cb.has(E)||ak.has(E)?m.jsx(L1,{id:E,label:j,hint:q,value:hb(ae),isCurrency:cb.has(E),maxDigits:N,onChange:ne=>ve(lb(ne.currentTarget.value)),onBlur:()=>Y(E,"number",S),required:V,"aria-required":V||void 0,error:ue},E):m.jsx(hs,{id:E,label:j,hint:q,value:hb(ae),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:ne=>{if(rk(ne.key)){ne.preventDefault();return}N!==void 0&&/^\d$/.test(ne.key)&&String(ne.currentTarget.value).replace(/\D/g,"").length>=N&&ne.preventDefault()},onChange:ne=>{let L=ne.currentTarget.value;N!==void 0&&(L=L.slice(0,N)),ve(lb(L))},onBlur:()=>Y(E,"number",S),required:V,"aria-required":V||void 0,error:ue},E)}case"textarea":return m.jsx(V1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"textarea",S),"aria-required":V||void 0,error:ue,rows:4},E);case"date":{const{min:N,max:ne}=ik(E);return m.jsx(Sw,{id:E,label:j,hint:q,value:ft(ae),min:N,max:ne,onChange:L=>{const J=L.currentTarget.value;ve(J),!Lt(J,"date")&&!dl(E,J)&&T(E,$(S,E,J))},onBlur:()=>Y(E,"date",S),"aria-required":V||void 0,error:ue,autoComplete:mi[E]},E)}case"checkbox":{if(A.options){const N=Array.isArray(ae)?ae:[],ne=`${E}-error`;return m.jsxs("fieldset",{className:"space-y-2","aria-describedby":ue?ne:void 0,children:[m.jsxs("legend",{className:"form-label",children:[j,V&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-red-600 ml-1","aria-hidden":"true",children:"*"}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),m.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:A.options.map(L=>{const J=`${E}-${ni(L)}`,W=N.includes(L);return m.jsx(Yr,{id:J,label:L,checked:W,onChange:ie=>{const oe=new Set(N);ie.currentTarget.checked?oe.add(L):oe.delete(L),ve(Array.from(oe))},"aria-required":V||void 0,"aria-describedby":ue?ne:void 0},J)})}),ue&&m.jsx("p",{id:ne,className:"mt-1 text-sm text-red-600",children:ue})]},E)}return m.jsx(Yr,{id:E,label:V?`${j} *`:j,checked:!!ae,onChange:N=>ve(N.currentTarget.checked),"aria-required":V||void 0},E)}case"radio":{if(pi(A))return null;const N=A.options??[],ne=S&&S.length>0?`${E}__${S.join("__")}`:E;return m.jsx(xw,{legend:j,required:V,children:N.map(L=>m.jsx(ww,{name:ne,value:L,checked:ae===L,onChange:()=>{ve(L),T(E,$(S,E,L))},children:ib[E]?.[L]??L},`${E}-${ni(L)}`))},E)}case"select":{let N=A.options??[];E==="quote_vehicle_id"&&(N=r?.vehicles__items?.map(ce=>ce.vin)??[]);let ne=!1,L,J,W;if(E==="year"||E==="make"||E==="model"||E==="body_style"){const ce=S?S.join("-"):"_root";X[ce]&&(ne=!0,L="Looking up VIN...")}if(!ne&&(E==="make"||E==="model"||E==="body_style")){const ce=S?S.join("-"):"_root";W=ce;const F=We(b,S,"year"),R=typeof F=="number"?F:Number(F);if(E==="make"){const re=`${ce}:makes`;if(!R||!Number.isFinite(R))ne=!0,L="Select a year first";else{J={year:R};const ee=P(J);ee&&ee.length>0?N=ee:O[re]?(L="Loading makes...",N=[...Ny]):N=[...Ny]}typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}else if(E==="model"){const re=`${ce}:models`,ee=String(We(b,S,"make")??"");if(!ee)ne=!0,L="Select a make first";else if(R&&Number.isFinite(R)){J={year:R,make:ee};const le=P(J);le&&le.length>0?N=le:O[re]?(L="Loading models...",N=[...sb]):N=[...sb]}typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}else{const re=`${ce}:bodyStyles`,ee=String(We(b,S,"make")??""),le=String(We(b,S,"model")??"");if(!le)ne=!0,L="Select a model first";else if(R&&Number.isFinite(R)&&ee){J={year:R,make:ee,model:le};const fe=P(J);fe&&fe.length>0?N=fe:O[re]?(L="Loading body styles...",N=[...ub]):N=[...ub]}typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}}if(E==="occupation"||E==="co_applicant_occupation"){const ce=E==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,F=ce?void 0:We(b,S,"industry"),R=We(b,S,ce??"employment_industry"),ee=String(ai(F??R)??"").trim();N=[...Fy[ee]??tk],typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}const ie=lk(S,E),oe=u?.has([...S??[],E].join("."))??!1;return m.jsx(ha,{id:ie,label:L?`${j} — ${L}`:j,required:V,"aria-required":V||void 0,error:ue,disabled:ne,value:oe?"":dk(ae),onChange:ce=>{const F=ce.currentTarget.value;if(E!=="year"&&E!=="make"&&E!=="model"&&E!=="industry"&&E!=="employment_industry"&&E!=="co_applicant_employment_industry"){ve(F),T(E,$(S,E,F));return}let R=tt(b,S,E,F);if(E==="year")R=tt(R,S,"make",""),R=tt(R,S,"model",""),R=tt(R,S,"body_style","");else if(E==="make")R=tt(R,S,"model",""),R=tt(R,S,"body_style","");else if(E==="model")R=tt(R,S,"body_style","");else if(E==="industry"||E==="employment_industry")R=tt(R,S,"occupation","");else if(E==="co_applicant_employment_industry"){const ee=String(ai(F)??"").trim(),le=Fy[ee]??[],fe=le.find(pe=>pe===ee)??le[0]??"";R=tt(R,S,"co_applicant_occupation",fe??"")}r&&n?n(R):_(R),w(R);const re=S?wa(R,S)??{}:R;T(E,{...re,[E]:F})},placeholder:L??"Select an option",onFocus:J&&W?()=>K(W,J):void 0,options:N.map(ce=>({value:ce,label:ib[E]?.[ce]??ek[ce]??ce}))},ie)}case"address":return m.jsx(Pw,{id:E,label:j,value:ft(ae),onChange:(N,ne)=>{let L=tt(b,S,E,N);const J=ne?.state??(typeof N=="string"?N.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(J){const W=S?[...S,"state"]:["state"];L=$t(L,W,J)}if(!S){const W=ne?.zipCode??(typeof N=="string"?N.match(/,\s*[A-Z]{2}\s+(\d{5})(?:-\d{4})?\b/)?.[1]:void 0);W&&(L=$t(L,["postal_code"],W))}r&&n?n(L):_(L),w(L)},onBlur:()=>Y(E,"address",S),required:V,"aria-required":V||void 0,error:ue},E);default:return null}}function te(A,S){const E=A.some(q=>String(q.key)==="years_at_address"),j=A.find(q=>String(q.key)==="months_at_address");return A.map((q,ae)=>{const V=String(q.key);if(V==="months_at_address"&&E||!ii(q,b,p)||!Cl(q,b,S)||!oi(q,b,i))return null;if(wl(V,q,b,i)){const W=p.currentCarrierKey?b[p.currentCarrierKey]:void 0;if(!(W&&W!=="NoPriorInsurance"&&Pn(b,p)&&El.has(V)))return null}const ue=se(q,S),ve=V==="years_at_address"&&j?se(j,S):null,N=q.conditionals??[];if(!N.length)return i==="BundlePolicy"&&V==="policy_bi"?m.jsxs("div",{className:Sl(V,i,S),"data-question-key":V,children:[m.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),ue]},`wrap-${V}-${ae}`):m.jsxs("div",{className:Sl(V,i,S),"data-question-key":V,children:[ue,ve]},`wrap-${V}-${ae}`);const ne=db(q,We(b,S,V)),L=N.filter(W=>Ca(ne,W.conditionalType,W.conditionalValue)),J=L.length>1&&!L.some(W=>W.conditionalQuestionsAllowMultiple)?L.slice(0,1):L;return m.jsxs("div",{className:Sl(V,i,S),"data-question-key":V,children:[ue,ve,J.map((W,ie)=>{const oe=W.conditionalQuestions??[];if(!oe.length)return null;if(!W.conditionalQuestionsAllowMultiple)return m.jsx("div",{className:"mt-3",children:te(oe,S)},`branch-${V}-${ie}`);const ce=hi(V),F=wa(b,[...S??[],ce])??[],R=Math.max(1,F.length||1),re=()=>{const fe=$t(b,[...S??[],ce,F.length],{});r&&n?n(fe):_(fe),w(fe)},ee=()=>{const fe=F.slice(0,Math.max(0,F.length-1)),pe=$t(b,[...S??[],ce],fe);r&&n?n(pe):_(pe),w(pe)},le=`${V}__c${ie}`;return m.jsxs("div",{className:"mt-3",children:[m.jsxs("div",{className:"repeatable-controls flex items-center justify-between mb-2 gap-2",children:[m.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),m.jsxs("div",{className:"repeatable-actions space-x-2",children:[m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:re,children:"Add another"}),R>1&&m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ee,children:"Remove last"})]})]}),Array.from({length:R}).map((fe,pe)=>{const De=[...S??[],ce,pe],_e=`${le}__i${pe}`,be=F[pe]??{},Pe=V==="drivers",Oe=Pe?`Driver #${pe+1}`:V==="vehicles"?`Vehicle #${pe+1}`:V==="home_losses"||V==="losses"?`Loss #${pe+1}`:`Entry #${pe+1}`,Nl=Pe&&typeof be.ssn_display=="string"&&be.ssn_display?` — ${be.ssn_display}`:"";return m.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[m.jsxs("div",{className:"text-sm font-semibold mb-2",children:[Oe,Nl]}),oe.map(Pt=>{const Aa=String(Pt.key);if(!ii(Pt,b,p)||!Cl(Pt,b,De)||!oi(Pt,b,i))return null;if(wl(Aa,Pt,b,i)){const Cr=p.currentCarrierKey?b[p.currentCarrierKey]:void 0;if(!(Cr&&Cr!=="NoPriorInsurance"&&Pn(b,p)&&El.has(Aa)))return null}return m.jsxs("div",{className:"mt-3",children:[se(Pt,De),(()=>{const Cr=Pt.conditionals??[];if(!Cr.length)return null;const y_=We(b,De,Pt.key),$i=Cr.filter(rn=>Ca(y_,rn.conditionalType,rn.conditionalValue));return($i.length>1&&!$i.some(rn=>rn.conditionalQuestionsAllowMultiple)?$i.slice(0,1):$i).map((rn,Ul)=>{const Hl=rn.conditionalQuestions??[];if(!Hl.length)return null;if(!rn.conditionalQuestionsAllowMultiple)return m.jsx("div",{className:"mt-3",children:te(Hl,De)},`nested-${_e}-${Ul}`);const Ai=hi(Pt.key),ki=wa(b,[...De,Ai])??[],b_=Math.max(1,ki.length||1),LP=()=>{const Bn=$t(b,[...De,Ai,ki.length],{});r&&n?n(Bn):_(Bn),w(Bn)},RP=()=>{const Bn=ki.slice(0,Math.max(0,ki.length-1)),nn=$t(b,[...De,Ai],Bn);r&&n?n(nn):_(nn),w(nn)};return m.jsxs("div",{className:"mt-3",children:[m.jsxs("div",{className:"repeatable-controls flex items-center justify-between mb-2 gap-2",children:[m.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),m.jsxs("div",{className:"repeatable-actions space-x-2",children:[m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:LP,children:"Add another"}),b_>1&&m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:RP,children:"Remove last"})]})]}),Array.from({length:b_}).map((Bn,nn)=>{const NP=[...De,Ai,nn];return m.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[m.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",nn+1]}),te(Hl,NP)]},`nested-item-${_e}-${Ul}-${nn}`)})]},`nested-repeat-${_e}-${Ul}`)})})()]},`${_e}-${Aa}`)})]},`group-${_e}`)})]},`branch-${V}-${ie}`)})]},`wrap-${V}-${ae}`)})}const H=d.useMemo(()=>{const A=[],S=(E,j)=>{E.forEach(q=>{if(!ii(q,b,p)||!Cl(q,b,j)||!oi(q,b,i))return;const ae=String(q.key);if(wl(ae,q,b,i)){const ne=p.currentCarrierKey?b[p.currentCarrierKey]:void 0;if(!(ne&&ne!=="NoPriorInsurance"&&Pn(b,p)&&El.has(ae)))return}pi(q)||A.push(q);const V=q.conditionals??[];if(!V.length)return;const ue=db(q,We(b,j,ae)),ve=V.filter(ne=>Ca(ue,ne.conditionalType,ne.conditionalValue));(ve.length>1&&!ve.some(ne=>ne.conditionalQuestionsAllowMultiple)?ve.slice(0,1):ve).forEach(ne=>{const L=ne.conditionalQuestions??[];L.length&&(ne.conditionalQuestionsAllowMultiple||S(L,j))})})};return S(f),A},[f,b,p,i]);d.useEffect(()=>{if(s<=0)return;const A=Ea(b,p),S=H.map(E=>si(E,p)?{...E,required:A}:E);v(va(S,b))},[s,H,b,p]);function Q(A){A.preventDefault();const S=Ea(b,p),E=H.map(q=>si(q,p)?{...q,required:S}:q),j=va(E,b);if(v(j),Object.keys(j).length>0){const q=H.findIndex(ae=>j[ae.key]);q>=0&&document.getElementById(H[q].key)?.focus();return}a(b)}return m.jsx("form",{className:JA(i),"data-form-area":i??"unknown-stage",onSubmit:Q,noValidate:!0,children:te(f)})}function yb({title:e,description:t,applyLabel:r,dismissLabel:n,alreadyOnApplicationNote:a,suggestions:o,isApplying:i,onApply:s,onDismiss:u}){const[l,c]=d.useState(new Set),f=o.length>0&&o.every(y=>l.has(y.id)),p=d.useMemo(()=>o.some(y=>y.alreadyOnApplication),[o]),h=y=>{c(_=>{const D=new Set(_);return D.has(y)?D.delete(y):D.add(y),D})},g=()=>{c(f?new Set:new Set(o.map(y=>y.id)))};return m.jsxs("div",{className:"prefill-suggestions-modal fixed inset-0 z-[10000] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"prefill-suggestions-title",children:[m.jsx("div",{className:"backdrop","aria-hidden":"true"}),m.jsxs("div",{className:"modal-panel bg-white relative w-full max-w-lg max-h-[85vh] overflow-y-auto",role:"document",children:[m.jsxs("div",{className:"text-center mb-6",children:[m.jsx("h2",{id:"prefill-suggestions-title",className:"h1-title",children:e}),m.jsx("p",{className:"text-sm text-slate-600 mt-3",children:t})]}),m.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-left mb-4",children:[o.map(y=>m.jsx(Yr,{id:`prefill-suggestion-${y.id}`,label:y.alreadyOnApplication?`${y.label} *`:y.label,checked:l.has(y.id),disabled:i,onChange:()=>h(y.id)},y.id)),o.length>1&&m.jsx(Yr,{id:"prefill-suggestion-select-all",label:"Select All",checked:f,disabled:i,onChange:g})]}),p&&m.jsx("p",{className:"text-xs text-slate-500 mb-4 text-left",children:a??"* This entry is already on the application; selecting it will fill in available data that does not exist on the application."}),m.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mt-6",children:[m.jsx("button",{type:"button","data-widget-ctrl":"prefill-dismiss",onClick:u,disabled:i,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:n}),m.jsxs("button",{type:"button","data-widget-ctrl":"prefill-apply",onClick:()=>s(Array.from(l)),disabled:l.size===0||i,className:["form-wizard-next-btn","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",l.size===0||i?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[i&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]})]})]})]})}const fk="https://getcredify.com/privacy-policy";function mk(){return m.jsx("a",{href:fk,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function bb(){return m.jsxs(m.Fragment,{children:["See our ",m.jsx(mk,{})," for how we use your information."]})}const pk=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),hk=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function gk(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function Fn(e){return`stage-footer-hint stage-footer-hint--${gk(e)}`}function _b({stageKey:e}){return e?e==="Zip"?m.jsx("p",{className:Fn(e),"data-stage-key":e,children:"No credit card required."}):e==="Email"?m.jsxs("div",{className:Fn(e),"data-stage-key":e,children:[m.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),m.jsx("p",{children:m.jsx(bb,{})})]}):hk.has(e)?m.jsx("p",{className:Fn(e),"data-stage-key":e,children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):e==="Ssn"?m.jsx("p",{className:Fn(e),"data-stage-key":e,children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):e==="SMSVerification"?m.jsx("p",{className:Fn(e),"data-stage-key":e,children:"You'll receive a text from Credify shortly."}):pk.has(e)?m.jsx("p",{className:Fn(e),"data-stage-key":e,children:m.jsx(bb,{})}):null:null}function vb(e){const t=new Map,r=new Map,n=a=>{let o=t.get(a);return o||(o=e(a).then(i=>(r.set(a,i.suggestions),i.suggestions)).catch(i=>{throw t.delete(a),i}),t.set(a,o)),o};return{fetch:n,peek:a=>r.get(a),prefetch:a=>{n(a).catch(()=>{})},reset:()=>{t.clear(),r.clear()}}}const xl=vb(GA),$l=vb(YA),yk=xl.fetch,bk=xl.peek,_k=xl.prefetch,vk=$l.fetch,Ek=$l.peek,Dk=$l.prefetch,Sk=["vin","year","make","model"];function Ck(e){if(!e||typeof e!="object")return!0;const t=e;return Sk.every(r=>{const n=t[r];return n==null||String(n).trim()===""})}function wk(e,t){if(t.length===0)return e;const r=e.vehicles__items??[],n=r.filter(i=>!Ck(i)),a=new Set(n.map(i=>String(i.vin??"").trim().toUpperCase()).filter(i=>i!=="")),o=t.filter(i=>{const s=String(i.vin??"").trim().toUpperCase();return s===""||!a.has(s)});return o.length===0&&n.length===r.length?e:{...e,vehicles:"Yes",vehicles__items:[...n,...o]}}const xk=["first_name","last_name","date_of_birth"];function Eb(e){if(!e||typeof e!="object")return!0;const t=e;return xk.every(r=>{const n=t[r];return n==null||String(n).trim()===""})}function Db(e){return`${String(e.first_name??"").trim()} ${String(e.last_name??"").trim()}`.trim().toUpperCase()}function $k(e,t){if(t.length===0)return e;const r=e.drivers__items??[],n=r.filter(i=>!Eb(i)),a=new Set(n.map(Db).filter(i=>i!=="")),o=t.filter(i=>{const s=Db(i);return s===""||!a.has(s)});return o.length===0&&n.length===r.length?e:{...e,drivers:"Yes",drivers__items:[...n,...o]}}function Ak(e){return(e.drivers__items??[]).some(r=>!Eb(r))}const On={};function kk(e){let t=On[e];return t||(t=new Set,On[e]=t),t}function Sb(e,t){kk(e).add(t)}function Cb(e,t){On[e]?.delete(t)}function Sr(e,...t){const r=On[e];if(!r||r.size===0)return;const n=t[0],a={quoteId:ui(),timestamp:Date.now()};for(const o of[...r])try{o(n,a)}catch(i){za(i,{tags:{source:"widget-event-listener",event:e}})}}function Tk(){for(const e of Object.keys(On))delete On[e]}function Pk(){Sr("widgetOpened")}function Ik(){Sr("widgetClosed")}function Mk(e){Sr("stageViewed",e)}function wb(e){Sr("stageCompleted",e)}function Fk(){Sr("flowCompleted")}function Ok(e){Sr("ratesViewed",e)}function Bk(){Sr("ratesBack")}function xa(e){Sr("submissionFailed",e)}const xb=new Set(["Disabled","Retired","Unemployed","Other"]);function Lk(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,a=t.employment_industry,o=String(n??a??"").trim();return!xb.has(o)}function Rk(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,a=t.employment_industry,o=String(n??a??"").trim();return!xb.has(o)}function $b(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function Al(e,t){return $b(e)?"Yes":t}function Ab(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function kb(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function Tb(e,t){const r=Ab(e),n=Ab(t);if(r!=null&&n!=null)return r-n;const a=kb(e),o=kb(t);return a!=null&&o!=null?a-o:e==null||t==null?null:String(e).localeCompare(String(t))}function Nk(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function kl(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Tb(e,r);return n!=null&&n<0}case"greaterThan":{const n=Tb(e,r);return n!=null&&n>0}case"contains":return Nk(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}const Uk=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Hk(e){return String(e??"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function gi(e,t,r){const n=Xu([...e]),a=hl(n),o=[],i=s=>{s.forEach(u=>{if(!ii(u,t,a)||!Lk(u,t)||!oi(u,t,r))return;const l=String(u.key);if(Jo(l,r,t)){const g=a.currentCarrierKey?t[a.currentCarrierKey]:void 0;if(!(g&&g!=="NoPriorInsurance"&&Pn(t,a)&&Uk.has(l)))return}$b(u)||o.push(u);const c=Al(u,t[l]),f=u.conditionals??[];if(!f.length)return;const p=f.filter(g=>kl(c,g.conditionalType,g.conditionalValue));(p.length>1&&!p.some(g=>g.conditionalQuestionsAllowMultiple)?p.slice(0,1):p).forEach(g=>{const y=g.conditionalQuestions??[];y.length&&(g.conditionalQuestionsAllowMultiple||i(y))})})};return i(n),o}const Pb="__items",yi=e=>`${e}${Pb}`;function Vk(e,t){if(e.key==="relationship_to_insured"||e.key==="is_registered_owner"){const r=t[t.length-1];return typeof r=="number"&&r===0}return!1}function bi(e,t,r,n=[],a=void 0,o=t){for(const i of e){const s=String(i.key),u=Al(i,t[s]),l=i.conditionals??[];if(!l.length)continue;const c=l.filter(p=>kl(u,p.conditionalType,p.conditionalValue)),f=c.length>1&&!c.some(p=>p.conditionalQuestionsAllowMultiple)?c.slice(0,1):c;for(const p of f){const h=p.conditionalQuestions??[];if(!h.length)continue;if(!p.conditionalQuestionsAllowMultiple){bi(h,t,r,n,a,o);continue}if(Jo(s,a,o))continue;const g=t[yi(s)]??[];if(g.length===0){r.push({groupKey:s,index:-1,fieldKey:"",fieldLabel:"",message:"At least one entry is required"});continue}for(const[y,_]of g.entries()){const D=[...n,yi(s),y],w=gi(h,_,a).filter(k=>!(Vk(k,D)||!Rk(k,_))),b={state:o.state,..._},C=va(w,b),v=new Map(w.map((k,I)=>[br(k,I),k.question??""]));for(const[k,I]of Object.entries(C))I&&r.push({groupKey:s,index:y,fieldKey:k,fieldLabel:v.get(k)??k,message:I});bi(h,_,r,D,a,o)}}}}function zk(e,t,r){const n=[];return bi(e,t,n,[],r,t),n}function jk(e,t,r){const n=[];return bi(e,t,n,[],r,t),n.length>0}function Tl(e,t,r,n){for(const a of e){const o=String(a.key),i=Al(a,t[o]),s=a.conditionals??[];if(!s.length)continue;const u=s.filter(c=>kl(i,c.conditionalType,c.conditionalValue)),l=u.length>1&&!u.some(c=>c.conditionalQuestionsAllowMultiple)?u.slice(0,1):u;for(const c of l){const f=c.conditionalQuestions??[];if(!f.length)continue;if(!c.conditionalQuestionsAllowMultiple){Tl(f,t,r,n);continue}if(Jo(o,r,t))continue;const p=t[yi(o)]??[];for(const[h,g]of p.entries())typeof g!="object"||g===null||(n(gi(f,g,r),g,{groupKey:o,index:h}),Tl(f,g,r,n))}}}function Ib(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(Lt(r.vehicle_comp_deductible,"select")||Lt(r.vehicle_coll_deductible,"select")||Lt(r.vehicle_towing_and_labor,"select")||Lt(r.vehicle_transportation_expense,"select"))return!0;return!1}function Mb({targetStage:e,stageKey:t,quoteId:r,fetchSuggestions:n,peekSuggestions:a,applySelection:o,dismissSelection:i,mergeItems:s,setAllValues:u,shouldSkip:l}){const[c,f]=d.useState(null),[p,h]=d.useState(!1),[g,y]=d.useState(!1),_=d.useRef(new Set);return d.useEffect(()=>{if(t!==e||!r||_.current.has(r))return;if(l?.()){_.current.add(r);return}const b=a(r);if(b!==void 0){b.length>0?f(b):_.current.add(r);return}let C=!1;return y(!0),n(r).then(v=>{v.length===0&&_.current.add(r),!C&&v.length>0&&f(v)}).catch(()=>{_.current.add(r)}).finally(()=>{C||y(!1)}),()=>{C=!0,y(!1)}},[t,r,e]),{suggestions:c,isApplying:p,isPending:g,handleApply:async b=>{if(r){h(!0);try{const{items:C}=await o(r,b);C.length>0&&u(v=>s(v,C))}catch{}finally{_.current.add(r),h(!1),f(null)}}},handleDismiss:()=>{r&&(_.current.add(r),i(r).catch(()=>{})),f(null)}}}function Zk({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:a,quoteId:o,nonTerminalStageKeys:i}){const[s,u]=d.useState(a??0),[l,c]=d.useState(n??{}),[f,p]=d.useState({}),[h,g]=d.useState(!1),[y,_]=d.useState(!1),[D,w]=d.useState(null),[b,C]=d.useState(0),[v,k]=d.useState([]),[I,G]=d.useState(a??0),O=d.useRef({}),Z=d.useRef([]),M=d.useRef(null),X=d.useRef(e),de=Array.isArray(e)&&e.length>0,x=de?Math.min(s,e.length-1):0,z=de?e[x]:null,U=z?.key??null,P=d.useRef(l);P.current=l;const K=Mb({targetStage:"Vehicle",stageKey:U,quoteId:o,fetchSuggestions:yk,peekSuggestions:bk,applySelection:qA,dismissSelection:KA,mergeItems:wk,setAllValues:c}),$=Mb({targetStage:"Driver",stageKey:U,quoteId:o,fetchSuggestions:vk,peekSuggestions:Ek,applySelection:QA,dismissSelection:XA,mergeItems:$k,setAllValues:c,shouldSkip:()=>Ak(P.current)}),T=U==="Vehicle"&&K.isPending||U==="Driver"&&$.isPending;d.useEffect(()=>{a!==void 0&&(u(a),G(V=>Math.max(V,a)))},[a]),X.current=e;const Y=d.useMemo(()=>{const V=x>=e.length-1;return V&&U&&i?.has(U)?!1:!!(V||e.slice(x+1).every(ve=>ve.key==="AutoPolicy")&&(l.drivers__items??[]).length<=1)},[x,e,l,U,i]);d.useEffect(()=>{de&&s>=e.length&&u(e.length-1)},[s,e.length,de]),d.useEffect(()=>{C(0),k([])},[U]),d.useEffect(()=>{const V=Z.current[x];V&&V.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[x]),d.useEffect(()=>{n!==void 0&&c(n)},[n]),d.useEffect(()=>{if(!z||!U){g(!1),w(null);return}if(f[U]){g(!1),w(null);return}let V=!1;return g(!0),w(null),Promise.resolve(z.loadQuestions()).then(ue=>{if(!V){if(!Array.isArray(ue))throw new Error(`loadQuestions("${U}") did not return an array`);p(ve=>({...ve,[U]:ue}))}}).catch(ue=>{V||w(`Failed to load stage "${z?.title??""}": ${ue?.message??"Unknown error"}`)}).finally(()=>{V||g(!1)}),()=>{V=!0}},[z,U,f]);const se=U?f[U]:void 0,te=d.useMemo(()=>hl(Xu(se??[])),[se]);d.useEffect(()=>{z&&U&&se&&Mk({stageKey:U,stageTitle:z.title??U,stepIndex:s+1,totalSteps:e.length})},[U,s,e.length,z,se]);const H=d.useMemo(()=>{if(!se)return{};const V={};(N=>{const ne=[],L=J=>{J.forEach((W,ie)=>{const oe=br(W,ie);ne.push(oe);const ce=yi(oe);ne.push(ce),(W.conditionals??[]).forEach(R=>{const re=R.conditionalQuestions??[];re.length>0&&L(re)})})};return L(N),ne})(se).forEach(N=>{N in l&&(V[N]=l[N])});for(const N of["state","State","address","product"])N in l&&(V[N]=l[N]);for(const[N,ne]of Object.entries(l))N.endsWith(Pb)&&!(N in V)&&(V[N]=ne);return V},[se,l]),Q=V=>{c(ue=>({...ue,...V}))},A=()=>{u(V=>V>0?V-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},S=V=>{V<0||V>=e.length||V>I||V===x||(u(V),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"}))},E=async()=>{if(!se||!z||h||D||y||T)return;const V=gi(se,H,U??void 0),ue=Ea(l,te),ve=V.map(ee=>si(ee,te)?{...ee,required:ue}:ee),N=va(ve,H),ne=new Set(ve.map((ee,le)=>br(ee,le))),L=Object.entries(N).some(([ee,le])=>le&&ne.has(ee)),J=jk(se,l,U??void 0),ie=V.some(ee=>String(ee.key??"")==="vehicle_policy_selections")?Ib(l):!1,oe=l.driver_vehicle_assignments,ce=l.drivers__items??[];let F=!1;if(oe&&ce.length>=2){const ee=l.vehicles__items??[];for(let le=0;le<ee.length;le++){const fe=oe[`v${le}`];if(!fe)continue;const pe=ce.map((be,Pe)=>fe[`d${Pe}`]??0),De=pe.filter(be=>be>0);if(De.length>=2&&De.every(be=>be===50)){F=!0;break}const _e=pe.reduce((be,Pe)=>be+Pe,0);if(_e>0&&_e!==100){F=!0;break}}}if(L||J||ie||F){const ee=new Map(ve.map((pe,De)=>[br(pe,De),pe])),fe=[...Object.entries(N).filter(([pe,De])=>!!De&&ne.has(pe)).map(([pe,De])=>{const _e=De,be=ee.get(pe)?.question;return _e==="Required"&&be?`${be} is required`:_e}),J?"Complete all required repeated entries before continuing.":null,ie?"Complete the vehicle policy selections before continuing.":null,F?"Driver usage percentages must be valid before continuing.":null].filter(pe=>!!pe);C(pe=>pe+1),k(fe.length>0?fe:["Review the highlighted fields before continuing."]),window.setTimeout(()=>{M.current?.focus()},0);return}k([]);const R=JSON.stringify(H);if(!Y&&x<I&&O.current[U??""]===R){u(ee=>Math.min(ee+1,e.length-1)),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"});return}_(!0);try{const ee=Y,le=ee?await r(l,U??""):await t(H,U??""),{success:fe,error:pe}=le;if(!fe){w(pe??"An error occurred");return}if(!ee){const De=le.latestStages??X.current,_e=De.findIndex(Pe=>Pe.key===U),be=_e>=0?Math.min(_e+1,De.length-1):Math.min(s+1,De.length-1);O.current[U??""]=R,G(Pe=>Math.max(Pe,be)),u(be)}}finally{_(!1)}},j=d.useMemo(()=>!!(!se||h||D||y||T),[se,h,D,y,T]),q=e.length>0?(x+1)/e.length*100:0,ae=Hk(U??"unknown-stage");return de?m.jsxs("div",{className:`form-wizard-shell form-wizard-shell--${ae}`,"data-stage-key":U??void 0,children:[U==="Vehicle"&&K.suggestions&&K.suggestions.length>0&&m.jsx(yb,{title:"Select your vehicles",description:"We found the vehicles below at your address. Select the ones you'd like to add to your quote, or add them manually.",applyLabel:"Add selected vehicles",dismissLabel:"Add manually",alreadyOnApplicationNote:"* This vehicle is already on the application; selecting it will fill in available data that does not exist on the application.",suggestions:K.suggestions,isApplying:K.isApplying,onApply:K.handleApply,onDismiss:K.handleDismiss}),U==="Driver"&&$.suggestions&&$.suggestions.length>0&&m.jsx(yb,{title:"Additional drivers",description:"We found the drivers below at your address. Select the ones you'd like to add to your quote, or add them manually.",applyLabel:"Add selected drivers",dismissLabel:"Add manually",alreadyOnApplicationNote:"* This driver is already on the application; selecting them will fill in available data that does not exist on the application.",suggestions:$.suggestions,isApplying:$.isApplying,onApply:$.handleApply,onDismiss:$.handleDismiss}),m.jsx("div",{className:`form-wizard-steps-header form-wizard-steps-header--${ae}`,children:m.jsx("div",{className:"form-wizard-steps-scroll",children:m.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},tabIndex:0,"aria-label":"Quote steps",children:e.flatMap((V,ue)=>[m.jsx("li",{ref:ve=>{Z.current[ue]=ve},className:"flex-shrink-0",children:m.jsx("button",{type:"button",className:"form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap","data-step-state":ue<x?"complete":ue===x?"current":"upcoming",onClick:()=>S(ue),disabled:ue>I,"aria-current":ue===x?"step":void 0,"aria-label":`${V.title}, step ${ue+1} of ${e.length}${ue>I?", not available yet":""}`,children:V.title})},V.key??`stage-${ue}`),...ue<e.length-1?[m.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0","aria-hidden":"true",children:"›"},`arrow-${V.key??ue}`)]:[]])})})}),m.jsxs("div",{className:`form-wizard-card form-wizard-card--${ae}`,style:{"--form-wizard-progress":`${q}%`},children:[m.jsxs("div",{className:`form-wizard-content form-wizard-content--${ae}`,children:[h&&m.jsx("div",{className:"text-slate-500",role:"status","aria-live":"polite",children:"Loading…"}),T&&m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",role:"status","aria-live":"polite",children:[m.jsxs("svg",{className:"animate-spin h-8 w-8 text-blue-600 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),m.jsx("div",{className:"text-text-primary font-semibold",children:U==="Driver"?"Looking up additional drivers at your address…":"Looking up vehicles at your address…"}),m.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"This can take a few moments."})]}),!T&&v.length>0&&m.jsxs("div",{ref:M,className:"mb-4 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",role:"alert",tabIndex:-1,children:[m.jsx("p",{className:"font-semibold",children:"Please fix the following before continuing:"}),m.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:v.map((V,ue)=>m.jsx("li",{children:V},`${V}-${ue}`))})]}),z&&!T&&m.jsx(gb,{questions:se??[],controlledValues:H,onChangeValues:Q,onSubmit:()=>E(),quoteId:o,widgetStageKey:U??void 0,validationAttempt:b},z.key),!h&&D&&m.jsxs("div",{className:"text-red-600 text-sm -mt-4",role:"alert",children:[m.jsx("div",{children:D}),z&&m.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{p(V=>{if(!U)return V;const ue={...V};return delete ue[U],ue})},children:"Retry"})]}),m.jsx(_b,{stageKey:U})]}),m.jsxs("div",{className:x>0?"form-wizard-actions grid grid-cols-2 gap-3":"form-wizard-actions",children:[x>0&&m.jsx("button",{type:"button",onClick:A,disabled:h,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),m.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:E,disabled:j,className:["form-wizard-next-btn",x>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",j?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[y&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Y?"Finish":"Next"]})]})]})]}):m.jsx("div",{className:"text-slate-600",children:"Loading..."})}const Fb={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},Ob=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function Gk(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function Bb(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function Jr(e){if(!e)return e;const t=Fb[e];return t?t.name:Bb(e)}function qk(e){const t=new Set,r=[];return e.forEach((n,a)=>{const i=Fb[n]??{name:Bb(n),abbr:Gk(n),color:Ob[a%Ob.length]};t.has(i.name)||(t.add(i.name),r.push(i))}),r}function Kk(e,t){if(!e)return[];const r=[];return(t==="Auto"||t==="Bundle")&&Array.isArray(e.PersonalAuto)&&r.push(...e.PersonalAuto),(t==="Home"||t==="Bundle")&&Array.isArray(e.PersonalHome)&&r.push(...e.PersonalHome),qk(r)}const Yk="https://getcredify.com/privacy-policy";function Qk({acknowledged:e,onChange:t,disabled:r=!1}){return m.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:m.jsx(Yr,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:m.jsxs(m.Fragment,{children:["I acknowledge I have received Credify’s"," ",m.jsx("a",{href:Yk,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function Xk({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:a,onCancel:o,onProceed:i,isProcessing:s,hasError:u}){const l=!n||s;return m.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[m.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),m.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&m.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),m.jsx("p",{className:"font-semibold text-slate-900",children:e}),m.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,m.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),m.jsx("div",{className:"mt-4",children:m.jsx(Qk,{acknowledged:n,onChange:a,disabled:s})}),u&&m.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),m.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[m.jsx("button",{type:"button","data-testid":"bind-confirmation-cancel",onClick:o,disabled:s,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),m.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:i,disabled:l,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",l?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[s&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),s?"Processing…":"Proceed"]})]})]})}const Lb=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function Rb(e){const t=Number.isFinite(e.term_months)&&e.term_months>0?e.term_months:1;return e.monthly_premium_cents!=null?e.monthly_premium_cents:Math.round((e.premium_cents||0)/t)}const _i={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},vi=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function Wk(e){if(e.length===0)return[];const t=(n,a)=>Jr(n.carrier_name).localeCompare(Jr(a.carrier_name));if(!e.some(n=>n.lob))return[{lob:null,title:"Not Quoted",rates:[...e].sort(t)}];const r=new Map;for(const n of e){const a=n.lob||"_other",o=r.get(a);o?o.push(n):r.set(a,[n])}return[...r.entries()].sort(([n],[a])=>{const o=vi.indexOf(n),i=vi.indexOf(a);return(o===-1?999:o)-(i===-1?999:i)}).map(([n,a])=>({lob:n,title:_i[n]??n,rates:[...a].sort(t)}))}const Jt={admitted:{tab:"rates-tab-admitted",panel:"rates-panel-admitted"},non_admitted:{tab:"rates-tab-non-admitted",panel:"rates-panel-non-admitted"},not_quoted:{tab:"rates-tab-not-quoted",panel:"rates-panel-not-quoted"}};function Nb({onBack:e}){const t=()=>{Bk(),e?.()};return m.jsx("button",{type:"button",onClick:t,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function Jk({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:a=!0,className:o}){const i=Rb(e)/100,s=Lb.format(i),u=t==="loading",l=t==="success",c=!!n||u||l,f=!!(e.effective_date&&e.policy_end_date),p=e.lob?_i[e.lob]||e.lob:null,h=(e.coverages??[]).filter(g=>!!g&&typeof g.label=="string"&&g.label.trim()!==""&&typeof g.value=="string"&&g.value.trim()!=="");return m.jsxs("div",{className:`flex h-full w-full flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md${o?` ${o}`:""}`,children:[a&&p&&m.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:p}),m.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?m.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:Jr(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:Jr(e.carrier_name).charAt(0).toUpperCase()}),m.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:Jr(e.carrier_name)})]}),m.jsx("div",{className:"mb-2",children:m.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[s,m.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&m.jsx("div",{className:"mb-2",children:m.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&m.jsx("div",{className:"mb-4",children:m.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),h.length>0&&m.jsx("div",{className:"mb-2 border-t border-slate-200 pt-3",children:m.jsx("dl",{children:h.map((g,y)=>m.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-1",children:[m.jsx("dt",{className:"text-xs text-slate-600",children:g.label}),m.jsx("dd",{className:"text-right text-xs font-semibold text-slate-900",children:g.value})]},`${g.label}-${y}`))})}),m.jsxs("div",{className:"mt-auto pt-4",children:[m.jsx("button",{type:"button",onClick:r,disabled:c,className:`rates-bind-btn w-full cursor-pointer rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 disabled:cursor-not-allowed ${l?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:u?"Requesting…":l?"Requested":"Request Bind"}),t==="error"&&m.jsx("p",{className:"mt-2 text-xs text-red-600",role:"alert",children:"Something went wrong. Please try again."}),t==="success"&&m.jsx("p",{className:"mt-2 text-xs text-emerald-600",role:"status","aria-live":"polite",children:"We received your bind request."})]})]})}function eT({item:e}){const t=Jr(e.carrier_name),r=(e.decline_reasons??[]).filter(Boolean);return m.jsxs("div",{className:"flex w-full gap-4 rounded-xl border border-slate-200 bg-white p-4 shadow-sm",children:[m.jsx("div",{className:"shrink-0",children:e.carrier_logo_base64?m.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:t,className:"h-10 w-auto max-w-[7rem] object-contain"}):m.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:t.charAt(0).toUpperCase()})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-2",children:m.jsx("h4",{className:"break-words font-semibold text-slate-900",children:t})}),r.length>0?m.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-slate-600",children:r.map((n,a)=>m.jsx("li",{children:n},a))}):m.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"This carrier did not return a quote."})]})]})}function tT({rates:e,onBack:t,isBundleFlow:r=!1,quoteId:n,initialPhone:a="",requirePursueVerification:o=!1,onSubScreenChange:i}){const s=d.useMemo(()=>Array.isArray(e)?e:[],[e]),u=s.length>0,[l,c]=d.useState({}),[f,p]=d.useState("admitted"),[h,g]=d.useState(!1),[y,_]=d.useState(null),[D,w]=d.useState(!1),[b,C]=d.useState(null),[v,k]=d.useState(!1),[I,G]=d.useState(a),[O,Z]=d.useState(""),[M,X]=d.useState("phone"),[de,x]=d.useState("idle"),[z,U]=d.useState(null),P=!!(b||y);d.useEffect(()=>{i?.(P)},[P,i]),d.useEffect(()=>()=>i?.(!1),[i]);const K=d.useMemo(()=>s.some(F=>F.lob==="PersonalAuto"),[s]),$=d.useMemo(()=>s.some(F=>F.lob==="PersonalHome"),[s]),T=d.useMemo(()=>{if(!r)return[];const F=[];return K&&F.push("PersonalAuto"),$&&F.push("PersonalHome"),F},[r,K,$]),Y=d.useMemo(()=>{const F=new Set;for(const R of s){const re=R.lob??null;re&&l[R.quote_rate_id]==="success"&&F.add(re)}return F},[s,l]),se=d.useMemo(()=>Object.values(l).some(F=>F==="success"),[l]),te=d.useMemo(()=>h?!0:!r||T.length===0?se:T.every(F=>Y.has(F)),[h,r,se,T,Y]),H=d.useMemo(()=>u?s.filter(F=>(F.admitted_status??"admitted")==="admitted"):[],[s,u]),Q=d.useMemo(()=>u?s.filter(F=>F.admitted_status==="non_admitted"):[],[s,u]),A=d.useMemo(()=>u?s.filter(F=>F.admitted_status==="not_quoted"):[],[s,u]),S=H.length,E=Q.length,j=A.length,q=S+E>0,ae=q||j>0,V=d.useMemo(()=>Wk(A),[A]);d.useEffect(()=>{ae&&f==="admitted"&&S===0&&(E>0?p("non_admitted"):j>0&&p("not_quoted"))},[f,S,E,j,ae]);const ue=d.useMemo(()=>q?f==="admitted"?H:f==="non_admitted"?Q:[]:[],[q,f,H,Q]),ve=F=>{if(F.key!=="ArrowLeft"&&F.key!=="ArrowRight"&&F.key!=="Home"&&F.key!=="End")return;F.preventDefault();const R=F.key==="Home"?"admitted":F.key==="End"||f==="admitted"?"non_admitted":"admitted";p(R),window.setTimeout(()=>document.getElementById(Jt[R].tab)?.focus(),0)};d.useEffect(()=>{di()},[]),d.useEffect(()=>{!te||h||(DA(),tb(),g(!0))},[te,h]);const N=d.useMemo(()=>{if(ue.length===0)return[];if(!ue.some(ee=>ee.lob))return[{lob:null,title:"Rates",rates:[...ue].sort((le,fe)=>{const pe=Number.isFinite(le.term_months)&&le.term_months>0?le.term_months:1,De=Number.isFinite(fe.term_months)&&fe.term_months>0?fe.term_months:1,_e=le.monthly_premium_cents??Math.round((le.premium_cents||0)/pe),be=fe.monthly_premium_cents??Math.round((fe.premium_cents||0)/De);return _e-be})}];const R=new Map;for(const ee of ue){const le=ee.lob||"_other",fe=R.get(le);fe?fe.push(ee):R.set(le,[ee])}return[...R.entries()].sort(([ee],[le])=>{const fe=vi.indexOf(ee),pe=vi.indexOf(le);return(fe===-1?999:fe)-(pe===-1?999:pe)}).map(([ee,le])=>({lob:ee,title:_i[ee]??ee,rates:[...le].sort((fe,pe)=>{const De=Number.isFinite(fe.term_months)&&fe.term_months>0?fe.term_months:1,_e=Number.isFinite(pe.term_months)&&pe.term_months>0?pe.term_months:1,be=fe.monthly_premium_cents??Math.round((fe.premium_cents||0)/De),Pe=pe.monthly_premium_cents??Math.round((pe.premium_cents||0)/_e);return be-Pe})}))},[ue]),ne=d.useMemo(()=>{if(!r)return[];const F=s.some(ee=>ee.lob==="PersonalAuto"),R=s.some(ee=>ee.lob==="PersonalHome"),re=[];return F||re.push("Sorry, no rates found for Personal Auto."),R||re.push("Sorry, no rates found for Homeowners."),re},[r,s]);if(!ae)return m.jsxs("section",{className:"mt-8",children:[m.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),m.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&m.jsx(Nb,{onBack:t})]});const L=F=>{if(c(R=>({...R,[F.quote_rate_id]:"idle"})),w(!1),di(),!v&&(o||!Wt())){G(a),Z(""),X("phone"),x("idle"),U(null),C({cardKey:F.quote_rate_id,rate:F});return}_({cardKey:F.quote_rate_id,rate:F})},J=()=>{_(null),w(!1)},W=()=>{C(null),U(null),x("idle")},ie=async()=>{if(!b||!n)return;const F=I.trim();if(!F){U("Please enter your phone number.");return}x("sending"),U(null);try{await rb(n,F),X("code"),x("sent")}catch(R){const re=R;if(x("idle"),re?.message==="sms_rate_limited"){const ee=re.retryAfterSeconds??60;X("code"),U(`We just sent a code to that number. You can request another in ${ee} second${ee===1?"":"s"}.`);return}U("We could not send a code to that number. Please check it and try again.")}},oe=async()=>{if(!b||!n)return;const F=O.trim();if(!F){U("Please enter the code we texted you.");return}x("verifying"),U(null);try{const{isVerified:R,token:re,code:ee}=await _l(n,F);if(!R||!re){x("sent"),U(ee==="OTP_EXPIRED"?"That code has expired. Request a new one and try again.":"That code was incorrect. Please try again.");return}ci(re);const le=b;k(!0),C(null),x("idle"),_(le)}catch(R){const re=R;if(x("sent"),re?.message==="too_many_attempts"){U("Too many incorrect attempts. Request a new code to try again.");return}U("Something went wrong verifying your code. Please try again.")}},ce=async()=>{if(!y||!D)return;const F=y.cardKey;c(R=>({...R,[F]:"loading"}));try{if(di(),!Wt())throw new Error("Authentication required. Please verify your phone number first.");if(!((await WA(F,!0))?.success!==!1))throw new Error("Request failed");c(le=>({...le,[F]:"success"})),_(null),w(!1)}catch{c(R=>({...R,[F]:"error"}))}};if(b){const F=de==="sending"||de==="verifying",R=["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",F?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),re="credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed";return m.jsx("section",{className:"mt-8",children:M==="phone"?m.jsxs(m.Fragment,{children:[m.jsx(pd,{id:"phone",label:"What is your phone number?",value:I,onChange:ee=>G(ee.currentTarget.value),error:z??void 0}),m.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[m.jsx("p",{children:"We'll text you a 6-digit code to confirm your number. This is just to confirm your number, not a sales call."}),m.jsx("p",{children:"Message & data rates may apply. One message per request."}),m.jsxs("p",{children:["See our"," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]}),m.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[m.jsx("button",{type:"button",onClick:W,className:re,children:"Back to rates"}),m.jsx("button",{type:"button",onClick:ie,disabled:F,className:R,children:de==="sending"?"Sending…":"Send code"})]})]}):m.jsxs(m.Fragment,{children:[m.jsx(Ya,{id:"sms_code",label:"Please enter the code we sent to your phone number.",value:O,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,autoComplete:"one-time-code",onChange:ee=>Z(ee.currentTarget.value.replace(/\D+/g,"").slice(0,6)),error:z??void 0}),m.jsx(_b,{stageKey:"SMSVerification"}),m.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[m.jsx("button",{type:"button",onClick:()=>{X("phone"),U(null)},className:re,children:"Change number"}),m.jsx("button",{type:"button",onClick:oe,disabled:F,className:R,children:de==="verifying"?"Verifying…":"Verify & continue"})]})]})})}if(y){const F=y.rate.lob?_i[y.rate.lob]||y.rate.lob:null;return m.jsx("section",{className:"mt-8",children:m.jsx(Xk,{carrierName:Jr(y.rate.carrier_name),formattedPremium:Lb.format(Rb(y.rate)/100),lobLabel:F,acknowledged:D,onAcknowledgeChange:w,onCancel:J,onProceed:ce,isProcessing:l[y.cardKey]==="loading",hasError:l[y.cardKey]==="error"})})}return m.jsxs("section",{className:"mt-8",children:[m.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),ne.length>0&&m.jsx("div",{className:"mt-3 space-y-1",children:ne.map(F=>m.jsx("p",{className:"text-sm text-slate-600",children:F},F))}),m.jsx("div",{className:"mt-4 border-b border-slate-200",children:m.jsxs("div",{className:"flex items-center gap-6",role:"tablist","aria-label":"Rate market type",children:[m.jsxs("button",{id:Jt.admitted.tab,type:"button",role:"tab","aria-selected":f==="admitted","aria-controls":Jt.admitted.panel,onClick:()=>p("admitted"),onKeyDown:ve,className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${f==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",S,")"]}),m.jsxs("button",{id:Jt.non_admitted.tab,type:"button",role:"tab","aria-selected":f==="non_admitted","aria-controls":Jt.non_admitted.panel,onClick:()=>p("non_admitted"),onKeyDown:ve,className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${f==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",E,")"]}),j>0&&m.jsxs("button",{id:Jt.not_quoted.tab,type:"button",role:"tab","aria-selected":f==="not_quoted","aria-controls":Jt.not_quoted.panel,onClick:()=>p("not_quoted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${f==="not_quoted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Not Quoted (",j,")"]})]})}),m.jsx("div",{id:Jt[f].panel,role:"tabpanel","aria-labelledby":Jt[f].tab,tabIndex:0,children:f==="not_quoted"?V.map(F=>m.jsxs("div",{className:"mt-6",children:[F.lob!=null&&m.jsx("h4",{className:"mb-3 text-center text-base font-semibold text-slate-800",children:F.title}),m.jsx("div",{className:"space-y-3",children:F.rates.map(R=>m.jsx(eT,{item:R},R.quote_rate_id))})]},F.lob??"all")):m.jsxs(m.Fragment,{children:[ue.length===0&&m.jsx("p",{className:"mt-4 text-sm text-slate-500",children:f==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),ue.length>0&&N.map(F=>m.jsxs("div",{className:"mt-6",children:[m.jsx("h4",{className:"mb-3 text-center text-base font-semibold text-slate-800",children:F.title}),m.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:F.rates.map(R=>m.jsx("div",{className:"w-full min-w-0 sm:w-[calc(50%-0.5rem)] lg:w-[calc(33.333%-0.667rem)] xl:w-[calc(25%-0.75rem)]",children:m.jsx(Jk,{rate:R,showLobLabel:F.lob==null,status:l[R.quote_rate_id]??"idle",disabled:te||(r?!!(R.lob&&T.includes(R.lob)&&Y.has(R.lob)):se),onRequestBind:()=>L(R)})},R.quote_rate_id))})]},F.lob??"all"))]})}),t&&m.jsx(Nb,{onBack:t})]})}function rT({stageKey:e,title:t,questions:r,values:n,onChangeValues:a,review:o,quoteId:i,fetchVehicleOptions:s}){const u=d.useMemo(()=>new Set(Object.keys(o.errorsByKey)),[o.errorsByKey]);return m.jsxs("section",{id:`review-section-${e}`,"data-testid":`review-section-${e}`,className:`review-section rounded-lg border p-4 ${o.hasIssues?"border-amber-300 bg-amber-50/40":"border-slate-200"}`,children:[m.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[m.jsx("h3",{className:"text-base font-semibold text-text-primary",children:t}),o.hasIssues?m.jsxs("span",{"data-testid":`review-section-${e}-badge`,className:"shrink-0 rounded-full bg-amber-100 border border-amber-300 text-amber-800 text-xs font-semibold px-2.5 py-1",children:[o.issues.length," ",o.issues.length===1?"field needs":"fields need"," attention"]}):m.jsx("svg",{"data-testid":`review-section-${e}-ok`,className:"h-5 w-5 shrink-0 text-emerald-600",viewBox:"0 0 20 20",fill:"currentColor",role:"img","aria-label":"Section complete",children:m.jsx("path",{fillRule:"evenodd",d:"M16.704 5.29a1 1 0 010 1.415l-7.5 7.5a1 1 0 01-1.415 0l-3.5-3.5a1 1 0 011.415-1.415l2.792 2.793 6.793-6.793a1 1 0 011.415 0z",clipRule:"evenodd"})})]}),o.hasIssues&&m.jsx("ul",{className:"mb-3 list-disc list-inside space-y-0.5 text-sm text-amber-800","data-testid":`review-section-${e}-issues`,children:o.issues.map(l=>m.jsxs("li",{children:[l.label,": ",l.message]},l.key))}),m.jsx(gb,{questions:r,controlledValues:n,onChangeValues:a,onSubmit:()=>{},quoteId:i,widgetStageKey:e,invalidValueKeys:u,fetchVehicleOptions:s})]})}const Ub=new Set(["make","model","body_style","occupation","co_applicant_occupation","quote_vehicle_id"]),Hb={vehicles:"Vehicle",drivers:"Driver",driver_accidents:"Accident",driver_violations:"Violation",losses:"Loss",home_losses:"Loss"};function Vb(e){const t=e.options;return Array.isArray(t)?t.map(r=>r&&typeof r=="object"&&"value"in r?String(r.value):String(r)):[]}const nT=new Set(["SMSVerification","CanopyConnect","Phone"]);function aT({stageKey:e,questions:t,values:r}){const n=gi(t,r,e),a=va(n,r),o=new Map(n.map((l,c)=>[br(l,c),l])),i={},s=[];for(const[l,c]of Object.entries(a))!c||!o.has(l)||(i[l]=c,s.push({key:l,label:o.get(l)?.question??l,message:c}));n.forEach((l,c)=>{const f=br(l,c);if(i[f]||l.inputType!=="select"&&l.inputType!=="radio"||Ub.has(String(l.key??"")))return;const p=Vb(l);if(p.length===0)return;const h=r[f];Lt(h,l.inputType)||p.includes(String(h))||(i[f]="Not a valid option",s.push({key:f,label:l.question??f,message:"Choose a valid option from the list"}))}),Tl(t,r,e,(l,c,f)=>{l.forEach(p=>{if(p.inputType!=="select"&&p.inputType!=="radio")return;const h=String(p.key??"");if(!h||Ub.has(h))return;const g=Vb(p);if(g.length===0)return;const y=c[h];if(!Lt(y,p.inputType)&&!g.includes(String(y))){const _=Hb[f.groupKey]??f.groupKey,D=`${f.groupKey}__items.${f.index}.${h}`;i[D]="Not a valid option",s.push({key:D,label:`${_} ${f.index+1} — ${p.question??h}`,message:"Choose a valid option from the list"})}})});for(const l of zk(t,r,e)){const c=Hb[l.groupKey]??l.groupKey;if(l.index<0){s.push({key:`${l.groupKey}__missing`,label:c,message:"Add at least one entry"});continue}const f=`${l.groupKey}__items.${l.index}.${l.fieldKey}`;if(i[f])continue;i[f]=l.message;const p=l.fieldLabel?`${c} ${l.index+1} — ${l.fieldLabel}`:`${c} ${l.index+1}`;s.push({key:f,label:p,message:l.message})}if(n.some(l=>String(l.key??"")==="vehicle_policy_selections")&&Ib(r)&&s.push({key:"__vehicle_policy",label:"Vehicle coverage selections",message:"Coverage selections are incomplete"}),lT(r,n)&&s.push({key:"__dva",label:"Driver usage",message:"Driver usage percentages must total 100% (50/50 is not allowed)"}),n.some(l=>l.inputType==="address"&&String(l.key??"")==="address")){const l=uT(r);l&&s.push(l)}return{stageKey:e,errorsByKey:i,issues:s,hasIssues:s.length>0}}async function oT(e,t){const r=e.vehicles__items??[];if(!Array.isArray(r)||r.length===0)return[];const n=[];for(const[a,o]of r.entries()){if(typeof o!="object"||o===null)continue;const i=Number(o.year),s=typeof o.make=="string"?o.make.trim():"",u=typeof o.model=="string"?o.model.trim():"",l=typeof o.body_style=="string"?o.body_style.trim():"";if(!(!Number.isFinite(i)||!i||!s))try{const{makes:c}=await t({year:i});if(Array.isArray(c)&&c.length>0&&!c.includes(s)){n.push({key:`vehicles__items.${a}.make`,label:`Vehicle ${a+1} — Make`,message:`"${s}" isn't available for ${i} — choose the make from the list`});continue}if(!u)continue;const{models:f}=await t({year:i,make:s});if(Array.isArray(f)&&f.length>0&&!f.includes(u)){n.push({key:`vehicles__items.${a}.model`,label:`Vehicle ${a+1} — Model`,message:`"${u}" isn't a listed model for the ${i} ${s} — choose the model from the list`});continue}if(!l)continue;const{bodyStyles:p}=await t({year:i,make:s,model:u});Array.isArray(p)&&p.length>0&&!p.includes(l)&&n.push({key:`vehicles__items.${a}.body_style`,label:`Vehicle ${a+1} — Body style`,message:"Choose the body style from the list"})}catch{}}return n}const iT=/^[A-Z]{2}$/,sT=/^\d{5}(-\d{4})?$/;function uT(e){if(!(typeof e.address=="string"?e.address.trim():""))return null;const r=typeof e.state=="string"?e.state.trim().toUpperCase():"",n=e.postal_code==null?"":String(e.postal_code).trim();return iT.test(r)&&sT.test(n)?null:{key:"__address",label:"Property address",message:"Select your address from the dropdown suggestions so we can verify the state and ZIP code"}}function lT(e,t){if(!t.some(o=>String(o.key??"")==="driver_vehicle_assignments"||String(o.key??"")==="vehicle_policy_selections"))return!1;const r=e.driver_vehicle_assignments,n=e.drivers__items??[];if(!r||n.length<2)return!1;const a=e.vehicles__items??[];for(let o=0;o<a.length;o++){const i=r[`v${o}`];if(!i)continue;const s=n.map((c,f)=>i[`d${f}`]??0),u=s.filter(c=>c>0);if(u.length>=2&&u.every(c=>c===50))return!0;const l=s.reduce((c,f)=>c+f,0);if(l>0&&l!==100)return!0}return!1}function en(e){const t={},r=l=>{if(typeof l=="string"){if(l==="Yes")return!0;if(l==="No")return!1}return l},n=Object.keys(e).filter(l=>!l.includes("__items")),a=new Set,o=new Set;for(const[l,c]of Object.entries(e))if(l.endsWith("__items")&&Array.isArray(c)){const f=l.replace("__items","");o.add(f),n.includes(f)&&c.forEach(p=>{typeof p=="object"&&p!==null&&Object.keys(p).forEach(h=>{a.add(h)})})}for(const[l,c]of Object.entries(e))if(l.endsWith("__items")){const f=l.replace("__items","");if(n.includes(f)){const h=Array.isArray(c)?c.map(g=>en(g)):c;t[f]=h}}else if(!l.includes("__items")){if(o.has(l))continue;a.has(l)||(t[l]=r(c))}const i=t.auto_prior_carrier_name;if(typeof i=="string"&&i.trim()!==""){const l=i==="NoPriorInsurance";t.auto_has_prior_insurance=!l,l&&(delete t.auto_prior_years,delete t.auto_prior_months,delete t.auto_prior_expiration_date,delete t.auto_prior_liability_limit,delete t.auto_continuous_coverage_years,delete t.auto_cancelled_declined_refused_to_renew,delete t.auto_current_annual_premium_cents)}const s=t.home_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const l=s==="NoPriorInsurance";t.home_has_prior_insurance=!l,l&&(delete t.home_prior_years,delete t.home_continuous_coverage_years,delete t.home_prior_expiration_date,delete t.property_insurance_cancelled)}Array.isArray(t.drivers)&&(t.drivers=t.drivers.map(l=>{if(!l||typeof l!="object")return l;const c={...l};return c.industry=ai(c.industry),c.education_level=By(c.education_level),c.occupation=Ly(c.occupation),c}));const u=21474836;if("sale_price_cents"in t){const l=t.sale_price_cents;if(typeof l=="number"&&Number.isFinite(l)){const c=Math.trunc(l);if(c>=1){const f=Math.min(c,u);t.sale_price_cents=f*100}}}return Array.isArray(t.home_losses)&&(t.home_losses=t.home_losses.map(l=>{if(!l||typeof l!="object")return l;const c=l,f=c.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return c;const p=Math.trunc(f),h=Math.min(Math.max(p,0),u);return{...c,amount_paid_cents:h*100}})),t}const cT={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",PR:"Puerto Rico"};function zb(e){const t=e?.trim().toUpperCase();if(!t)return"your state";const r=cT[t];return r?`${r} (${t})`:"your state"}const dT=1500,fT=800;function mT(e){const t=e.vehicles__items??[];return Array.isArray(t)?t.map(r=>[r?.year,r?.make,r?.model,r?.body_style].map(n=>String(n??"")).join("|")).join(";"):""}function pT({stages:e,initialValues:t,quoteId:r,isSubmitting:n,onConfirmed:a}){const o=d.useMemo(()=>e.filter(Q=>!nT.has(String(Q.key))),[e]),[i,s]=d.useState(t),[u,l]=d.useState({}),[c,f]=d.useState(null),[p,h]=d.useState(!0),[g,y]=d.useState(0),[_,D]=d.useState(!1),[w,b]=d.useState(null),[C,v]=d.useState(!1);d.useEffect(()=>{let Q=!1;return h(!0),f(null),Promise.all(o.map(async A=>{const S=await A.loadQuestions();return[String(A.key),[...S]]})).then(A=>{Q||l(Object.fromEntries(A))}).catch(A=>{Q||f(A instanceof Error?A.message:"Failed to load your review")}).finally(()=>{Q||h(!1)}),()=>{Q=!0}},[o,g]);const k=d.useRef(null),I=d.useRef(!0);d.useEffect(()=>{if(I.current){I.current=!1;return}return k.current&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>{Dr(en(i),!1).catch(Q=>{console.warn("Review autosave failed (will retry on next edit / submit)",Q)})},dT),()=>{k.current&&window.clearTimeout(k.current)}},[i]);const G=d.useCallback(Q=>{s(A=>({...A,...Q}))},[]),O=d.useMemo(()=>{for(const[Q,A]of Object.entries(u))if(A.some(S=>String(S.key??"")==="vehicles"))return Q;return null},[u]),[Z,M]=d.useState([]),[X,de]=d.useState(!1),x=d.useRef(0),z=mT(i),U=d.useRef(new Map),P=d.useRef(Promise.resolve()),K=d.useCallback(Q=>{const A=`${Q.year??""}|${Q.make??""}|${Q.model??""}`,S=U.current,E=S.get(A);if(E)return E;const j=P.current.catch(()=>{}).then(()=>ob({quoteId:r,...Q}));P.current=j.catch(()=>{});const q=j.catch(ae=>{throw S.delete(A),ae});return S.set(A,q),q},[r]);d.useEffect(()=>{if(!O||!z){M([]),de(!1);return}const Q=++x.current;de(!0);const A=window.setTimeout(()=>{oT(i,K).then(S=>{x.current===Q&&M(S)}).finally(()=>{x.current===Q&&de(!1)})},fT);return()=>window.clearTimeout(A)},[O,z,r,K]);const $=d.useMemo(()=>{const Q={};for(const A of o){const S=String(A.key),E=u[S];E&&(Q[S]=aT({stageKey:S,questions:E,values:i}))}if(O&&Q[O]&&Z.length>0){const A=Q[O];Q[O]={...A,errorsByKey:{...A.errorsByKey,...Object.fromEntries(Z.map(S=>[S.key,S.message]))},issues:[...A.issues,...Z],hasIssues:!0}}return Q},[o,u,i,O,Z]),T=d.useMemo(()=>Object.values($).reduce((Q,A)=>Q+A.issues.length,0),[$]),Y=n||C,se=!p&&!c&&T===0&&_&&!Y&&!X,te=d.useCallback(()=>{const Q=o.find(A=>$[String(A.key)]?.hasIssues);Q&&document.getElementById(`review-section-${String(Q.key)}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[o,$]),H=d.useCallback(async()=>{if(se){b(null),v(!0);try{const Q=typeof i.state=="string"?i.state:"";if(Q){const{isSupported:A}=await nb(Q);if(!A){b(`Sorry, Credify Corporation doesn't currently offer insurance in ${zb(Q)}. We're expanding our coverage and hope to serve your state soon.`);return}}await a(i)}catch{b("Oops, something went wrong. Please try again later.")}finally{v(!1)}}},[se,i,a]);return p?m.jsx("div",{className:"flex items-center justify-center py-12","data-testid":"review-loading",children:m.jsx("div",{className:"text-slate-600",children:"Loading your details..."})}):c?m.jsxs("div",{className:"text-red-600 text-sm","data-testid":"review-load-error",children:[m.jsx("div",{children:c}),m.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>y(Q=>Q+1),children:"Retry"})]}):m.jsxs("div",{className:"space-y-6","data-testid":"review-screen",children:[m.jsxs("div",{className:"text-center",children:[m.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:"Review your information"}),m.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Here's what we collected during your conversation. Please review each section, fix anything we got wrong, and fill in anything missing — then confirm below to see your quotes."})]}),T>0&&m.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm text-amber-800",role:"status","data-testid":"review-issue-summary",children:[m.jsxs("span",{children:[T," ",T===1?"field needs":"fields need"," your attention before you can continue."]}),m.jsx("button",{type:"button",onClick:te,className:"shrink-0 font-bold underline text-amber-800 hover:text-amber-900",children:"Show me"})]}),o.map(Q=>{const A=String(Q.key),S=u[A],E=$[A];return!S||!E?null:m.jsx(rT,{stageKey:A,title:Q.title,questions:S,values:i,onChangeValues:G,review:E,quoteId:r,fetchVehicleOptions:K},A)}),m.jsxs("div",{className:"rounded-lg border border-slate-200 p-4 space-y-4","data-testid":"review-consent-block",children:[m.jsx(Yr,{id:"review-terms-checkbox","data-testid":"review-terms-checkbox",checked:_,onChange:Q=>D(Q.target.checked),disabled:n,label:"I have reviewed my information and confirm it is accurate, and I agree to the Terms of Service and Privacy Policy."}),m.jsxs("p",{className:"text-sm text-slate-600",children:["Credify Corporation – Texas #3309669."," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),w&&m.jsx("div",{className:"text-red-600 text-sm",role:"alert","data-testid":"review-submit-error",children:w}),m.jsxs("button",{type:"button","data-testid":"review-submit","data-widget-ctrl":"review-submit",onClick:H,disabled:!se,className:["form-wizard-next-btn w-full","h-12 rounded-full text-white font-bold transition","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",se?"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40":"bg-gray-300"].join(" "),children:[Y&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Confirm & See My Quotes"]})]})}const Pl=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],jb={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Zb={Auto:6e4,Home:9e4,Bundle:12e4};function hT({progress:e,color:t,size:r=80}){const n=(r-10)/2,a=2*Math.PI*n,o=a-e/100*a;return m.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},"aria-hidden":"true",children:[m.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),m.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:t,strokeWidth:6,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:o,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function gT({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:a}){const o=jb[r]??jb.Auto,i=Zb[r]??Zb.Auto,s=e.length>0?Math.floor(i/e.length):t,[u,l]=d.useState(0),[c,f]=d.useState(0),[p,h]=d.useState(0),[g,y]=d.useState(0),[_,D]=d.useState(!0),w=d.useRef(n),b=d.useRef(a),C=d.useRef(u),v=d.useRef(e.length),k=d.useRef(!1),I=d.useRef(!1);d.useEffect(()=>{w.current=n,n&&e.length===0&&!k.current&&(k.current=!0,b.current?.())},[n,e.length]),d.useEffect(()=>{b.current=a},[a]),d.useEffect(()=>{C.current=u},[u]),d.useEffect(()=>{v.current=e.length,e.length>0&&(I.current=!1,l(0),f(0),h(0),y(0),D(!0))},[e.length]),d.useEffect(()=>{if(e.length===0){w.current&&!k.current&&(k.current=!0,b.current?.());return}I.current=!1;const M=100,X=100/(s/M),de=setInterval(()=>{h(x=>{if(I.current||k.current)return x;const z=x+X;return z<100?z:(I.current=!0,setTimeout(()=>{if(w.current){if(k.current)return;k.current=!0,b.current?.();return}const P=C.current===v.current-1;D(!1),setTimeout(()=>{P?(l(0),f(K=>K+1)):l(K=>K+1),h(0),y(0),D(!0)},300)},400),100)})},M);return()=>clearInterval(de)},[u,s,e.length]),d.useEffect(()=>{if(e.length===0)return;const M=Math.floor(s/Pl.length),X=setInterval(()=>y(de=>Math.min(de+1,Pl.length-1)),M);return()=>clearInterval(X)},[u,s,e.length]);const G=e.length===0,O=G?null:e[Math.min(u,e.length-1)],Z=c>0;return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
73
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const s=i[1];if(t===i[0]){o(i);continue}if(e.external){const l=e.external.registry.get(i[0])?.id;if(t!==i[0]&&l){o(i);continue}}if(e.metadataRegistry.get(i[0])?.id){o(i);continue}if(s.cycle){o(i);continue}if(s.count>1&&e.reused==="ref"){o(i);continue}}}function ly(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=i=>{const s=e.seen.get(i);if(s.ref===null)return;const u=s.def??s.schema,l={...u},c=s.ref;if(s.ref=null,c){n(c);const p=e.seen.get(c),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),i._zod.parent===c)for(const y in u)y==="$ref"||y==="allOf"||y in l||delete u[y];if(h.$ref&&p.def)for(const y in u)y==="$ref"||y==="allOf"||y in p.def&&JSON.stringify(u[y])===JSON.stringify(p.def[y])&&delete u[y]}const f=i._zod.parent;if(f&&f!==c){n(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:i,jsonSchema:u,path:s.path??[]})};for(const i of[...e.seen.entries()].reverse())n(i[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(i)}Object.assign(a,r.def??r.schema);const o=e.external?.defs??{};for(const i of e.seen.entries()){const s=i[1];s.def&&s.defId&&(o[s.defId]=s.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?a.$defs=o:a.definitions=o);try{const i=JSON.parse(JSON.stringify(a));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Qo(t,"input",e.processors),output:Qo(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function it(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return it(n.element,r);if(n.type==="set")return it(n.valueType,r);if(n.type==="lazy")return it(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return it(n.innerType,r);if(n.type==="intersection")return it(n.left,r)||it(n.right,r);if(n.type==="record"||n.type==="map")return it(n.keyType,r)||it(n.valueType,r);if(n.type==="pipe")return it(n.in,r)||it(n.out,r);if(n.type==="object"){for(const a in n.shape)if(it(n.shape[a],r))return!0;return!1}if(n.type==="union"){for(const a of n.options)if(it(a,r))return!0;return!1}if(n.type==="tuple"){for(const a of n.items)if(it(a,r))return!0;return!!(n.rest&&it(n.rest,r))}return!1}const Tx=(e,t={})=>r=>{const n=sy({...r,processors:t});return Qe(e,n),uy(n,e),ly(n,e)},Qo=(e,t,r={})=>n=>{const{libraryOptions:a,target:o}=n??{},i=sy({...a??{},target:o,io:t,processors:r});return Qe(e,i),uy(i,e),ly(i,e)},Px={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ix=(e,t,r,n)=>{const a=r;a.type="string";const{minimum:o,maximum:i,format:s,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof i=="number"&&(a.maxLength=i),s&&(a.format=Px[s]??s,a.format===""&&delete a.format,s==="time"&&delete a.format),l&&(a.contentEncoding=l),u&&u.size>0){const c=[...u];c.length===1?a.pattern=c[0].source:c.length>1&&(a.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},Mx=(e,t,r,n)=>{const a=r,{minimum:o,maximum:i,format:s,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:c}=e._zod.bag;typeof s=="string"&&s.includes("int")?a.type="integer":a.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=c,a.exclusiveMinimum=!0):a.exclusiveMinimum=c),typeof o=="number"&&(a.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete a.minimum:delete a.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=l,a.exclusiveMaximum=!0):a.exclusiveMaximum=l),typeof i=="number"&&(a.maximum=i,typeof l=="number"&&t.target!=="draft-04"&&(l<=i?delete a.maximum:delete a.exclusiveMaximum)),typeof u=="number"&&(a.multipleOf=u)},Fx=(e,t,r,n)=>{r.type="boolean"},Ox=(e,t,r,n)=>{r.not={}},Bx=(e,t,r,n)=>{},Lx=(e,t,r,n)=>{const a=e._zod.def,o=wg(a.entries);o.every(i=>typeof i=="number")&&(r.type="number"),o.every(i=>typeof i=="string")&&(r.type="string"),r.enum=o},Rx=(e,t,r,n)=>{const a=e._zod.def,o=[];for(const i of a.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(i))}else o.push(i);if(o.length!==0)if(o.length===1){const i=o[0];r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[i]:r.const=i}else o.every(i=>typeof i=="number")&&(r.type="number"),o.every(i=>typeof i=="string")&&(r.type="string"),o.every(i=>typeof i=="boolean")&&(r.type="boolean"),o.every(i=>i===null)&&(r.type="null"),r.enum=o},Nx=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ux=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Hx=(e,t,r,n)=>{const a=r,o=e._zod.def,{minimum:i,maximum:s}=e._zod.bag;typeof i=="number"&&(a.minItems=i),typeof s=="number"&&(a.maxItems=s),a.type="array",a.items=Qe(o.element,t,{...n,path:[...n.path,"items"]})},Vx=(e,t,r,n)=>{const a=r,o=e._zod.def;a.type="object",a.properties={};const i=o.shape;for(const l in i)a.properties[l]=Qe(i[l],t,{...n,path:[...n.path,"properties",l]});const s=new Set(Object.keys(i)),u=new Set([...s].filter(l=>{const c=o.shape[l]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));u.size>0&&(a.required=Array.from(u)),o.catchall?._zod.def.type==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=Qe(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},zx=(e,t,r,n)=>{const a=e._zod.def,o=a.inclusive===!1,i=a.options.map((s,u)=>Qe(s,t,{...n,path:[...n.path,o?"oneOf":"anyOf",u]}));o?r.oneOf=i:r.anyOf=i},jx=(e,t,r,n)=>{const a=e._zod.def,o=Qe(a.left,t,{...n,path:[...n.path,"allOf",0]}),i=Qe(a.right,t,{...n,path:[...n.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,u=[...s(o)?o.allOf:[o],...s(i)?i.allOf:[i]];r.allOf=u},Zx=(e,t,r,n)=>{const a=e._zod.def,o=Qe(a.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=a.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Gx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType},qx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType,r.default=JSON.parse(JSON.stringify(a.defaultValue))},Kx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},Yx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType;let i;try{i=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},Qx=(e,t,r,n)=>{const a=e._zod.def,o=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;Qe(o,t,n);const i=t.seen.get(e);i.ref=o},Xx=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType,r.readOnly=!0},cy=(e,t,r,n)=>{const a=e._zod.def;Qe(a.innerType,t,n);const o=t.seen.get(e);o.ref=a.innerType},Wx=B("ZodISODateTime",(e,t)=>{t5.init(e,t),Re.init(e,t)});function Jx(e){return ix(Wx,e)}const e$=B("ZodISODate",(e,t)=>{r5.init(e,t),Re.init(e,t)});function t$(e){return sx(e$,e)}const r$=B("ZodISOTime",(e,t)=>{n5.init(e,t),Re.init(e,t)});function n$(e){return ux(r$,e)}const a$=B("ZodISODuration",(e,t)=>{a5.init(e,t),Re.init(e,t)});function o$(e){return lx(a$,e)}const xt=B("ZodError",(e,t)=>{Ig.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>qw(e,r)},flatten:{value:r=>Gw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Wu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Wu,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),i$=nl(xt),s$=al(xt),u$=jo(xt),l$=Zo(xt),c$=Qw(xt),d$=Xw(xt),f$=Ww(xt),m$=Jw(xt),p$=e2(xt),h$=t2(xt),g$=r2(xt),y$=n2(xt),He=B("ZodType",(e,t)=>(Ue.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qo(e,"input"),output:Qo(e,"output")}}),e.toJSONSchema=Tx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(pr(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>hr(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>i$(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>u$(e,r,n),e.parseAsync=async(r,n)=>s$(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>l$(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>c$(e,r,n),e.decode=(r,n)=>d$(e,r,n),e.encodeAsync=async(r,n)=>f$(e,r,n),e.decodeAsync=async(r,n)=>m$(e,r,n),e.safeEncode=(r,n)=>p$(e,r,n),e.safeDecode=(r,n)=>h$(e,r,n),e.safeEncodeAsync=async(r,n)=>g$(e,r,n),e.safeDecodeAsync=async(r,n)=>y$(e,r,n),e.refine=(r,n)=>e.check(m6(r,n)),e.superRefine=r=>e.check(p6(r)),e.overwrite=r=>e.check(An(r)),e.optional=()=>by(e),e.exactOptional=()=>e6(e),e.nullable=()=>_y(e),e.nullish=()=>by(_y(e)),e.nonoptional=r=>i6(e,r),e.array=()=>z$(e),e.or=r=>gy([e,r]),e.and=r=>K$(e,r),e.transform=r=>Ey(e,W$(r)),e.default=r=>n6(e,r),e.prefault=r=>o6(e,r),e.catch=r=>u6(e,r),e.pipe=r=>Ey(e,r),e.readonly=()=>d6(e),e.describe=r=>{const n=e.clone();return ya.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return ya.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ya.get(e);const n=e.clone();return ya.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),dy=B("_ZodString",(e,t)=>{ol.init(e,t),He.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Ix(e,n,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(hx(...n)),e.includes=(...n)=>e.check(bx(...n)),e.startsWith=(...n)=>e.check(_x(...n)),e.endsWith=(...n)=>e.check(vx(...n)),e.min=(...n)=>e.check(Yo(...n)),e.max=(...n)=>e.check(oy(...n)),e.length=(...n)=>e.check(iy(...n)),e.nonempty=(...n)=>e.check(Yo(1,...n)),e.lowercase=n=>e.check(gx(n)),e.uppercase=n=>e.check(yx(n)),e.trim=()=>e.check(Dx()),e.normalize=(...n)=>e.check(Ex(...n)),e.toLowerCase=()=>e.check(Sx()),e.toUpperCase=()=>e.check(Cx()),e.slugify=()=>e.check(wx())}),b$=B("ZodString",(e,t)=>{ol.init(e,t),dy.init(e,t),e.email=r=>e.check(N5(_$,r)),e.url=r=>e.check(j5(v$,r)),e.jwt=r=>e.check(ox(O$,r)),e.emoji=r=>e.check(Z5(E$,r)),e.guid=r=>e.check(ty(fy,r)),e.uuid=r=>e.check(U5(Xo,r)),e.uuidv4=r=>e.check(H5(Xo,r)),e.uuidv6=r=>e.check(V5(Xo,r)),e.uuidv7=r=>e.check(z5(Xo,r)),e.nanoid=r=>e.check(G5(D$,r)),e.guid=r=>e.check(ty(fy,r)),e.cuid=r=>e.check(q5(S$,r)),e.cuid2=r=>e.check(K5(C$,r)),e.ulid=r=>e.check(Y5(w$,r)),e.base64=r=>e.check(rx(I$,r)),e.base64url=r=>e.check(nx(M$,r)),e.xid=r=>e.check(Q5(x$,r)),e.ksuid=r=>e.check(X5($$,r)),e.ipv4=r=>e.check(W5(A$,r)),e.ipv6=r=>e.check(J5(k$,r)),e.cidrv4=r=>e.check(ex(T$,r)),e.cidrv6=r=>e.check(tx(P$,r)),e.e164=r=>e.check(ax(F$,r)),e.datetime=r=>e.check(Jx(r)),e.date=r=>e.check(t$(r)),e.time=r=>e.check(n$(r)),e.duration=r=>e.check(o$(r))});function gr(e){return R5(b$,e)}const Re=B("ZodStringFormat",(e,t)=>{Le.init(e,t),dy.init(e,t)}),_$=B("ZodEmail",(e,t)=>{G2.init(e,t),Re.init(e,t)}),fy=B("ZodGUID",(e,t)=>{j2.init(e,t),Re.init(e,t)}),Xo=B("ZodUUID",(e,t)=>{Z2.init(e,t),Re.init(e,t)}),v$=B("ZodURL",(e,t)=>{q2.init(e,t),Re.init(e,t)}),E$=B("ZodEmoji",(e,t)=>{K2.init(e,t),Re.init(e,t)}),D$=B("ZodNanoID",(e,t)=>{Y2.init(e,t),Re.init(e,t)}),S$=B("ZodCUID",(e,t)=>{Q2.init(e,t),Re.init(e,t)}),C$=B("ZodCUID2",(e,t)=>{X2.init(e,t),Re.init(e,t)}),w$=B("ZodULID",(e,t)=>{W2.init(e,t),Re.init(e,t)}),x$=B("ZodXID",(e,t)=>{J2.init(e,t),Re.init(e,t)}),$$=B("ZodKSUID",(e,t)=>{e5.init(e,t),Re.init(e,t)}),A$=B("ZodIPv4",(e,t)=>{o5.init(e,t),Re.init(e,t)}),k$=B("ZodIPv6",(e,t)=>{i5.init(e,t),Re.init(e,t)}),T$=B("ZodCIDRv4",(e,t)=>{s5.init(e,t),Re.init(e,t)}),P$=B("ZodCIDRv6",(e,t)=>{u5.init(e,t),Re.init(e,t)}),I$=B("ZodBase64",(e,t)=>{l5.init(e,t),Re.init(e,t)}),M$=B("ZodBase64URL",(e,t)=>{d5.init(e,t),Re.init(e,t)}),F$=B("ZodE164",(e,t)=>{f5.init(e,t),Re.init(e,t)}),O$=B("ZodJWT",(e,t)=>{p5.init(e,t),Re.init(e,t)}),my=B("ZodNumber",(e,t)=>{Vg.init(e,t),He.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Mx(e,n,a),e.gt=(n,a)=>e.check(ny(n,a)),e.gte=(n,a)=>e.check(ul(n,a)),e.min=(n,a)=>e.check(ul(n,a)),e.lt=(n,a)=>e.check(ry(n,a)),e.lte=(n,a)=>e.check(sl(n,a)),e.max=(n,a)=>e.check(sl(n,a)),e.int=n=>e.check(py(n)),e.safe=n=>e.check(py(n)),e.positive=n=>e.check(ny(0,n)),e.nonnegative=n=>e.check(ul(0,n)),e.negative=n=>e.check(ry(0,n)),e.nonpositive=n=>e.check(sl(0,n)),e.multipleOf=(n,a)=>e.check(ay(n,a)),e.step=(n,a)=>e.check(ay(n,a)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),B$=B("ZodNumberFormat",(e,t)=>{h5.init(e,t),my.init(e,t)});function py(e){return dx(B$,e)}const L$=B("ZodBoolean",(e,t)=>{g5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Fx(e,r,n)});function R$(e){return fx(L$,e)}const N$=B("ZodUnknown",(e,t)=>{y5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Bx()});function hy(){return mx(N$)}const U$=B("ZodNever",(e,t)=>{b5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Ox(e,r,n)});function H$(e){return px(U$,e)}const V$=B("ZodArray",(e,t)=>{_5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Hx(e,r,n,a),e.element=t.element,e.min=(r,n)=>e.check(Yo(r,n)),e.nonempty=r=>e.check(Yo(1,r)),e.max=(r,n)=>e.check(oy(r,n)),e.length=(r,n)=>e.check(iy(r,n)),e.unwrap=()=>e.element});function z$(e,t){return xx(V$,e,t)}const j$=B("ZodObject",(e,t)=>{E5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Vx(e,r,n,a),ke(e,"shape",()=>t.shape),e.keyof=()=>kn(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:hy()}),e.loose=()=>e.clone({...e._zod.def,catchall:hy()}),e.strict=()=>e.clone({...e._zod.def,catchall:H$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Hw(e,r),e.safeExtend=r=>Vw(e,r),e.merge=r=>zw(e,r),e.pick=r=>Nw(e,r),e.omit=r=>Uw(e,r),e.partial=(...r)=>jw(yy,e,r[0]),e.required=(...r)=>Zw(vy,e,r[0])});function Z$(e,t){const r={type:"object",shape:e??{},...me(t)};return new j$(r)}const G$=B("ZodUnion",(e,t)=>{D5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>zx(e,r,n,a),e.options=t.options});function gy(e,t){return new G$({type:"union",options:e,...me(t)})}const q$=B("ZodIntersection",(e,t)=>{S5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>jx(e,r,n,a)});function K$(e,t){return new q$({type:"intersection",left:e,right:t})}const ll=B("ZodEnum",(e,t)=>{C5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Lx(e,n,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,a)=>{const o={};for(const i of n)if(r.has(i))o[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ll({...t,checks:[],...me(a),entries:o})},e.exclude=(n,a)=>{const o={...t.entries};for(const i of n)if(r.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new ll({...t,checks:[],...me(a),entries:o})}});function kn(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ll({type:"enum",entries:r,...me(t)})}const Y$=B("ZodLiteral",(e,t)=>{w5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Rx(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Q$(e,t){return new Y$({type:"literal",values:Array.isArray(e)?e:[e],...me(t)})}const X$=B("ZodTransform",(e,t)=>{x5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Ux(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sg(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ga(o,r.value,t));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(ga(i))}};const a=t.transform(r.value,r);return a instanceof Promise?a.then(o=>(r.value=o,r)):(r.value=a,r)}});function W$(e){return new X$({type:"transform",transform:e})}const yy=B("ZodOptional",(e,t)=>{Yg.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>cy(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function by(e){return new yy({type:"optional",innerType:e})}const J$=B("ZodExactOptional",(e,t)=>{$5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>cy(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function e6(e){return new J$({type:"optional",innerType:e})}const t6=B("ZodNullable",(e,t)=>{A5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Zx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function _y(e){return new t6({type:"nullable",innerType:e})}const r6=B("ZodDefault",(e,t)=>{k5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>qx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function n6(e,t){return new r6({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():kg(t)}})}const a6=B("ZodPrefault",(e,t)=>{T5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Kx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function o6(e,t){return new a6({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():kg(t)}})}const vy=B("ZodNonOptional",(e,t)=>{P5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Gx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function i6(e,t){return new vy({type:"nonoptional",innerType:e,...me(t)})}const s6=B("ZodCatch",(e,t)=>{I5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Yx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function u6(e,t){return new s6({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const l6=B("ZodPipe",(e,t)=>{M5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Qx(e,r,n,a),e.in=t.in,e.out=t.out});function Ey(e,t){return new l6({type:"pipe",in:e,out:t})}const c6=B("ZodReadonly",(e,t)=>{F5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Xx(e,r,n,a),e.unwrap=()=>e._zod.def.innerType});function d6(e){return new c6({type:"readonly",innerType:e})}const f6=B("ZodCustom",(e,t)=>{O5.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,n,a)=>Nx(e,r)});function m6(e,t={}){return $x(f6,e,t)}function p6(e){return Ax(e)}const cl={custom:"custom"};function Ze(e){return cx(my,e)}const h6=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],g6=new Set([...h6,"is_corporation"]);Z$({additional_pip:kn(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:kn(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:kn(["Primary","Secondary"]),extended_medical:kn(["cov1000","cov10000"]),policy_pip_deductible:kn(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:R$().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:cl.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const y6=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),b6=new Set(["HomePolicy","BundlePolicy"]),_6=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function Wo(e){if(typeof e!="string"||!e.trim())return!1;const t=e.trim().toLowerCase();return t==="nj"||t==="n.j."||t==="n.j"||t==="new jersey"}function Dy(e){return e?Wo(e.state??e.State):!1}function Jo(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!Dy(r):g6.has(e)?!Dy(r):e==="household_size"?!(t&&y6.has(t)):e==="number_of_mortgagees"?!(t&&b6.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&_6.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:v6.has(e)}const v6=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),Sy=new Date().getUTCFullYear(),ei=gr().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Cy=gy([Q$(""),gr().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),E6=(e,t,r)=>Ze({error:`${e} must be a number.`}).min(t,`${e} must be between ${t.toLocaleString("en-US")} and ${r.toLocaleString("en-US")}.`).max(r,`${e} must be between ${t.toLocaleString("en-US")} and ${r.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`),Tn=(e,t)=>Ze({error:`${e} must be a number.`}).min(0,`${e} must be between 0 and ${t.toLocaleString("en-US")}.`).max(t,`${e} must be between 0 and ${t.toLocaleString("en-US")}.`).int(`${e} must be a whole number.`),ti=(e,t=1600)=>Ze({error:`${e} must be a valid 4-digit year.`}).int(`${e} must be a whole number.`).min(t,`${e} should be between ${t} and the current year.`).max(Sy,`${e} cannot be in the future.`),ri=e=>Ze({error:`${e} must be a number.`}).int(`${e} must be a whole number.`).min(0,`${e} must be between 0 and 99.`).max(99,`${e} must be between 0 and 99.`),ba=(e,t,r=0)=>{const n=Math.pow(10,t)-1,a=n.toLocaleString("en-US"),o=r.toLocaleString("en-US");return Ze({error:`${e} must be a number.`}).min(r,`${e}: Value must be between ${o} and ${a}.`).max(n,`${e}: Value must be between ${o} and ${a}.`).int(`${e} must be a whole number.`)},D6={email:gr().trim().min(1,"Required").email("Please enter a valid email address."),phone:gr().trim().min(1,"Required").refine(e=>{let t=e.replace(/\D/g,"");return t.length===11&&t.startsWith("1")&&(t=t.slice(1)),t.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:gr().trim().refine(e=>e===""||/^\d{3}-\d{2}-\d{4}$/.test(e),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:gr().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:ei,last_name:ei,middle_name:Cy,co_applicant_first_name:ei,co_applicant_last_name:ei,co_applicant_middle_name:Cy,year_built:ti("Year built",1800),year_roof_updated:Ze({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:ti("Heating update year"),plumbing_update_year:ti("Plumbing update year"),electrical_update_year:ti("Electrical update year"),total_area_sq_ft:E6("Square footage",1,999999),sale_price_cents:Ze({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:ri("Number of years with your prior carrier"),home_continuous_coverage_years:ri("How long you have had continuous home coverage"),household_size:Ze({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:Ze({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),number_of_parking_spaces:Ze({error:"Number of covered parking spaces must be a number."}).int("Number of covered parking spaces must be a whole number.").min(1,"Number of covered parking spaces must be between 1 and 3.").max(3,"Number of covered parking spaces must be between 1 and 3."),dwelling_replacement_cost:ba("Replacement cost",9,1),other_structures_coverage:ba("Other structures",9),personal_property_coverage:ba("Personal property",9),loss_of_use_coverage:ba("Loss of use coverage",9),years_at_address:Ze({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:Ze({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:Ze({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:Ze({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:Ze({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(e=>e>=1&&e<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:Ze({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:Ze({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:ba("Amount paid",7),license_number:gr().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:gr().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:cl.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:cl.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:Ze({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:Ze({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:Tn("Modifications value",9999999),cost_new_value_cents:Tn("Cost new value",9999999),stated_value_amount_cents:Tn("Stated Value Amount",9999999),property_damage_amount_paid_cents:Tn("Property damage amount paid",9999999),personal_injury_amount_paid_cents:Tn("Personal injury amount paid",9999999),auto_current_annual_premium_cents:Tn("Current annual premium",9999999),auto_prior_years:ri("Years with prior auto carrier"),auto_prior_months:Ze({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:ri("Years with continuous auto coverage")};function ze(e){return new Date(`${e}T00:00:00Z`)}function Xe(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function yr(e,t){let r=t.getUTCFullYear()-e.getUTCFullYear();const n=t.getUTCMonth()-e.getUTCMonth();return(n<0||n===0&&t.getUTCDate()<e.getUTCDate())&&r--,r}function wy(e){const t=/^cov(\d+)to(\d+)$/.exec(e);if(t)return{perPerson:Number(t[1]),perOccurrence:Number(t[2])};const r=/^cov(\d+)CSL$/.exec(e);return r?{perPerson:Number(r[1]),perOccurrence:Number(r[1])}:null}const xy=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!Wo(e.state))return;const t=e.social_security_number;return(typeof t=="string"?t.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:e=>{const t=e.date_of_birth;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":yr(r,Xe())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:e=>{const t=e.co_applicant_date_of_birth;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":yr(r,Xe())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:e=>{const t=Number(e.year_roof_updated),r=Number(e.year_built);if(isNaN(t))return;const n=isNaN(r)?1e3:r;if(t<n||t>Sy)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:e=>{const t=e.move_in_date,r=e.year_built;if(!t||r==null)return;const n=ze(String(t));if(isNaN(n.getTime()))return;const a=Number(r);if(!isNaN(a))return n.getUTCFullYear()<a?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:e=>{const t=e.date_first_licensed;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:e=>{const t=e.date_first_licensed,r=e.date_of_birth;if(!t||typeof t!="string"||!r||typeof r!="string")return;const n=ze(r),a=ze(t);if(isNaN(n.getTime())||isNaN(a.getTime()))return;if(a<n)return"Date licensed cannot be before driver date of birth.";const o=new Date(Date.UTC(n.getUTCFullYear()+16,n.getUTCMonth(),n.getUTCDate()));return a<o?"Driver must be at least 16 years old at the date first licensed.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:e=>{const t=e.occurred_at;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:e=>{const t=e.accident_prevention_course_date;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:e=>{const t=e.effective_date;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe(),a=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+3,n.getUTCDate()));if(r<n)return"Insurance start date cannot be in the past.";if(r>a)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:e=>{const t=e.years_at_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:e=>{const t=e.years_at_prior_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:e=>{const t=e.home_prior_years,r=e.home_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),a=Number(r);if(!(isNaN(n)||isNaN(a)))return n>a?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:e=>{const t=e.home_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.home_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:e=>{const t=e.move_in_date;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:e=>{const t=e.date_of_incident;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe();return r>n?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:e=>{const t=e.home_prior_expiration_date;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe(),a=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),o=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<a||r>o)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:e=>{const t=e.purchase_date;if(!t||typeof t!="string")return;const r=ze(t);return isNaN(r.getTime())?"Invalid date.":r>Xe()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:e=>{const t=e.purchase_date,r=e.year;if(!t||typeof t!="string"||r==null)return;const n=ze(t);if(isNaN(n.getTime()))return;const a=Number(r);if(!isNaN(a))return n.getUTCFullYear()<a?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:e=>{const t=e.auto_prior_expiration_date;if(!t||typeof t!="string")return;const r=ze(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Xe(),a=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),o=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<a||r>o)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:e=>{const t=e.auto_prior_years,r=e.auto_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),a=Number(r);if(!(isNaN(n)||isNaN(a)))return n>a?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:e=>{const t=e.auto_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.auto_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const a=ze(r);if(isNaN(a.getTime()))return;const o=yr(a,Xe());return n>o?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:e=>{const t=e.vehicle_coll_deductible,r=e.vehicle_comp_deductible;if(!(!t||typeof t!="string"||!r||typeof r!="string")&&r==="NoCoverage"&&t!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:e=>{const t=e.policy_um,r=e.policy_bi;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="Reject"||r==="Dontknow")return;const n=u=>u.endsWith("CSL"),a=n(t),o=n(r);if(a&&!o)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const i=wy(t),s=wy(r);if(!(!i||!s)&&(i.perPerson>s.perPerson||i.perOccurrence>s.perOccurrence))return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:e=>{const t=e.policy_umpd,r=e.policy_pd;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="NoCoverage"||r==="Dontknow")return;const n=i=>{if(!i.startsWith("cov"))return null;const s=parseInt(i.replace("cov",""),10);return isNaN(s)?null:s},a=n(t),o=n(r);if(a!=null&&o!=null&&a>o)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:e=>{const t=e.custom_equipment_value_cents,r=e.stated_value_amount_cents;if(t==null||r==null)return;const n=Number(t),a=Number(r);if(!(isNaN(n)||isNaN(a))&&a>0&&n>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function dl(e,t){const r=D6[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function $y(e){if(/\s/.test(e))return!1;const t=e.trim();return t.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(t)}function S6(e,t){const r={};for(const n of xy){if(t?.has(n.targetKey))continue;const a=n.validate(e);a&&(r[n.targetKey]=a)}return r}function ni(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function br(e,t){return e.key??`${ni(e.question)}-${t}`}function Lt(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function _a(e,t){const r={};e.forEach((i,s)=>{const u=br(i,s),l=t[u];if(i.required&&Lt(l,i.inputType)){r[u]="Required";return}if(!Lt(l,i.inputType)){const c=dl(u,l);if(c){r[u]=c;return}}});const n={...t};e.forEach((i,s)=>{const u=br(i,s);u in n||(n[u]="")});const a=new Set(Object.keys(r).filter(i=>r[i])),o=S6(n,a);for(const[i,s]of Object.entries(o))r[i]=s;return r}function C6(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const w6={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},x6={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},$6={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},A6={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},k6={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},T6={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},P6={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},I6={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},M6={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},F6={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},O6={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},B6={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},L6={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},fl={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},R6=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],N6=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],ml={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},U6=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],Ay={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},H6=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],V6=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],ky={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},z6={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},j6={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},Z6={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},G6={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},q6={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},K6={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},Y6={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},Q6={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},X6={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},W6={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},J6={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},eA={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},tA={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},rA={AboveGround:"Above Ground",BelowGround:"Below Ground"},nA={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},aA={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},oA={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},iA={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},sA={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},uA={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},lA={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},cA={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},Ty={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Py={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},Iy={Female:"Female",Male:"Male"},My={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},dA={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},fA={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},mA={Primary:"Primary",Secondary:"Secondary"},pA={cov1000:"$1,000",cov10000:"$10,000"},hA={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},gA={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},yA={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},bA={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},Fy=yA,Oy=bA;function pl(e,t){if(typeof e!="string")return e;const r=e.trim();if(!r)return e;if(t[r])return r;const n=r.toLowerCase();return Object.keys(t).find(o=>o.toLowerCase()===n||t[o]?.toLowerCase()===n)??e}function ai(e){return pl(e,My)}function By(e){return pl(e,ky)}function Ly(e){return pl(e,Oy)}function _A(e){return e.trim().toLowerCase()}function Ry(e){if(typeof e!="string")return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const r=Number(t[1]),n=Number(t[2]),a=Number(t[3]);if(!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(a)||n<1||n>12||a<1||a>31)return null;const o=new Date(Date.UTC(r,n-1,a));return o.getUTCFullYear()!==r||o.getUTCMonth()!==n-1||o.getUTCDate()!==a?null:o.getTime()}function va(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=Ry(e[t.expirationDateKey]),n=Ry(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const vA=new Set(["HomePolicy","BundlePolicy"]);function oi(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!vA.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function hl(e){let t=null,r=null,n=null,a=null;const o=new Set,i=new Set,s=l=>{const c=String(l.key??""),f=_A(String(l.question??""));!t&&(c==="auto_prior_carrier_name"||c==="home_prior_carrier_name"||f.includes("current auto insurance company"))&&(t=c),!r&&(c==="auto_prior_carrier_name"||f.includes("current auto insurance company"))&&(r=c),!n&&(c==="effective_date"||f.includes("when do you need your insurance to begin"))&&(n=c),!a&&(c==="auto_prior_expiration_date"||c==="home_prior_expiration_date"||f.includes("when does the current policy expire"))&&(a=c),(c==="auto_reason_for_no_insurance"||f.includes("reason you are not currently insured")||f.includes("reason for lapse in coverage"))&&o.add(c),(c==="auto_prior_years"||c==="auto_prior_months"||c==="auto_continuous_coverage_years"||c==="auto_prior_expiration_date"||c==="auto_current_annual_premium_cents"||c==="auto_prior_liability_limit")&&i.add(c)};e.forEach(s);const u=l=>{l.forEach(c=>{(c.conditionals??[]).forEach(f=>{const p=f.conditionalQuestions??[];p.forEach(s),u(p)})})};return u(e),{currentCarrierKey:t,autoCarrierKey:r,effectiveDateKey:n,expirationDateKey:a,noInsuranceReasonKeys:o,hideWhenNoPriorInsuranceKeys:i}}function Ny(e,t){return!!t.autoCarrierKey&&e[t.autoCarrierKey]==="NoPriorInsurance"}function Ea(e,t){return Ny(e,t)?!0:t.currentCarrierKey==="home_prior_carrier_name"&&e.home_prior_carrier_name==="NoPriorInsurance"&&e.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(t.currentCarrierKey?e[t.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!t.effectiveDateKey||!t.expirationDateKey?!1:va(e,t)}function ii(e,t,r){const n=String(e.key??"");if(r.noInsuranceReasonKeys.has(n)&&r.currentCarrierKey==="home_prior_carrier_name"&&t.home_prior_carrier_name==="NoPriorInsurance"&&t.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const o=(r.currentCarrierKey?t[r.currentCarrierKey]:void 0)==="NoPriorInsurance";return o&&r.hideWhenNoPriorInsuranceKeys.has(n)?!1:!r.noInsuranceReasonKeys.has(n)||o?!0:Ea(t,r)}function si(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const Uy=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],gl="credify_quote_id",yl="credify_auth_token";function Hy(e){try{localStorage.setItem(gl,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function ui(){try{return localStorage.getItem(gl)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function Vy(){try{localStorage.removeItem(gl)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function EA(e){try{localStorage.setItem(yl,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function DA(){try{return localStorage.getItem(yl)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function zy(){try{localStorage.removeItem(yl)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function SA(){Vy(),zy()}const CA="credify-insurance-widget",wA="1.0",jy=25,Zy=64*1024,xA=`
74
+ …[truncated]`;let Gy=!1,qy=null,Ky="",Yy=jy,bl=Zy,Da=[];function $A(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function AA(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function Qy(e){if(!e)return[];const t=[];if(Array.isArray(e))for(const[r,n]of e)t.push({name:r,value:String(n)});else if(typeof e.forEach=="function")e.forEach((r,n)=>t.push({name:n,value:r}));else for(const[r,n]of Object.entries(e))t.push({name:r,value:String(n)});return t}function kA(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function TA(e,t){const r=t?.body;return typeof r!="string"||r.length===0?void 0:{mimeType:e.find(a=>a.name.toLowerCase()==="content-type")?.value??"application/json",text:r}}function PA(e){const t=e.length;return t<=bl?{text:e,size:t}:{text:e.slice(0,bl)+xA,size:t}}function IA(e){Da.push(e),Da.length>Yy&&Da.shift()}function MA(e){if(Gy)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;Ky=e.baseUrl,Yy=e.maxEntries??jy,bl=e.maxBodyBytes??Zy,qy=window.fetch.bind(window);const t=qy;return window.fetch=async(r,n)=>{let a;try{a=$A(r)}catch{return t(r,n)}if(!a.startsWith(Ky))return t(r,n);const o=Qy(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),i={startedDateTime:new Date().toISOString(),time:-1,request:{method:AA(r,n),url:a,httpVersion:"HTTP/1.1",headers:o,queryString:kA(a),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:TA(o,n)},response:FA(),cache:{},timings:{send:0,wait:-1,receive:0}};IA(i);const s=typeof performance<"u"?performance.now():0;let u;try{u=await t(r,n)}catch(c){const f=(typeof performance<"u"?performance.now():0)-s;throw i.time=Math.round(f),i.timings.wait=Math.round(f),i.response._error=c instanceof Error?c.message:String(c),c}const l=(typeof performance<"u"?performance.now():0)-s;i.time=Math.round(l),i.timings.wait=Math.round(l),i.response.status=u.status,i.response.statusText=u.statusText,i.response.headers=Qy(u.headers),i.response.content.mimeType=typeof u.headers?.get=="function"&&u.headers.get("content-type")||"";try{u.clone().text().then(f=>{const{text:p,size:h}=PA(f);i.response.content.text=p,i.response.content.size=h,i.response.bodySize=h}).catch(()=>{})}catch{}return u},Gy=!0,!0}function FA(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function OA(){return{log:{version:"1.2",creator:{name:CA,version:wA},entries:Da.map(e=>({...e}))}}}function BA(){return Da.length}const LA=[/ssn/i,/social.?security/i,/(driver.?licen[cs]e|^dln$|^dl$)/i,/(date.?of.?birth|^dob$)/i,/^vin$/i,/(sms.?code|^otp$|^code$|verification.?code)/i,/phone/i,/^email$/i,/(first.?name|last.?name|full.?name)/i,/(^address$|street|^zip$|postal)/i,/(jwt|^token$|authorization|^auth$|api.?key|secret|password|credential)/i,/cookie/i],RA=[/\b\d{3}-?\d{2}-?\d{4}\b/g,/\b[A-HJ-NPR-Z0-9]{17}\b/g,/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,/\bsk_[A-Za-z0-9]{16,}\b/g,/\bBearer\s+[A-Za-z0-9._-]+/gi],_r="[REDACTED]",NA=8;function li(e){for(const t of LA)if(t.test(e))return!0;return!1}function vr(e){let t=e;for(const r of RA)t=t.replace(r,_r);return t}function Er(e,t=0,r=new WeakSet){if(t>NA)return _r;if(e==null)return e;if(typeof e=="string")return vr(e);if(typeof e!="object")return e;if(r.has(e))return _r;if(r.add(e),Array.isArray(e))return e.map(o=>Er(o,t+1,r));const n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)return e;const a={};for(const[o,i]of Object.entries(e)){if(li(o)){a[o]=_r;continue}a[o]=Er(i,t+1,r)}return a}function Xy(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=Er(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=_r),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))li(r)&&(t[r]=_r)}if(e.extra&&(e.extra=Er(e.extra)),e.contexts&&(e.contexts=Er(e.contexts)),e.tags&&(e.tags=Er(e.tags)),e.user){const{id:t,email:r,username:n}=e.user;e.user={...typeof t=="string"?{id:t}:{},...typeof r=="string"?{email:r}:{},...typeof n=="string"?{username:n}:{}}}if(Array.isArray(e.breadcrumbs))for(const t of e.breadcrumbs)t.data!==void 0&&(t.data=Er(t.data)),typeof t.message=="string"&&(t.message=vr(t.message));return typeof e.message=="string"&&(e.message=vr(e.message)),e}function Wy(e){for(const t of e)t.value=li(t.name)?_r:vr(t.value)}function Jy(e){try{return JSON.stringify(Er(JSON.parse(e)))}catch{return vr(e)}}function UA(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){Wy(r.request.headers),Wy(r.response.headers);for(const n of r.request.queryString)n.value=li(n.name)?_r:vr(n.value);r.request.postData?.text&&(r.request.postData.text=Jy(r.request.postData.text)),r.response.content.text&&(r.response.content.text=Jy(r.response.content.text)),r.request.url=vr(r.request.url),r.response._error&&(r.response._error=vr(r.response._error))}return t}function Pn(e,t={}){try{Gi(r=>{r.setTag("failure_type","quote"),t.stage&&r.setTag("stage",t.stage),t.quoteId&&r.setTag("quote_id",t.quoteId),t.phase&&r.setTag("phase",t.phase),t.endpoint&&r.setTag("endpoint",t.endpoint),typeof t.statusCode=="number"&&r.setTag("status_code",String(t.statusCode));try{BA()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(UA(OA())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");za(n)})}catch{}}const Ve="https://api.getcredify.com";let In=null;const HA=6e4,eb=new Map;function VA(e){try{return new URL(e).pathname}catch{return e}}function tb(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const o=VA(t),i=`${o}:${r}`,s=Date.now(),u=eb.get(i);u&&s-u<HA||(eb.set(i,s),Pn(e,{phase:"api_request",endpoint:o,statusCode:r}))}function ci(e){In=e,EA(e)}function Wt(){return In}function di(){const e=DA();e&&(In=e)}function rb(){In=null,zy()}async function Ke(e,t){const r={"Content-Type":"application/json"};In&&(r.Authorization=`Bearer ${In}`);let n;try{n=await fetch(e,{method:"POST",headers:r,body:JSON.stringify(t)})}catch(a){const o=a instanceof Error?a:new Error(String(a));throw tb(o,e,0),a}if(!n.ok){let a=`Request failed with status ${n.status}`,o;try{const s=await n.json();a=s.error||a,typeof s.retryAfterSeconds=="number"&&(o=s.retryAfterSeconds)}catch{a=n.statusText||a}if(o===void 0){const s=Number(n.headers?.get("Retry-After"));Number.isFinite(s)&&s>0&&(o=s)}const i=new Error(a);throw i.statusCode=n.status,i.retryAfterSeconds=o,tb(i,e,n.status),i}return n}async function Sa(e){try{return await e.json()}catch{return{}}}async function zA(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await Ke(`${Ve}/get-questions-by-stage`,r)).json()}async function fi(e){const t=e?{quoteId:e}:{};return await(await Ke(`${Ve}/get-stages-for-quote`,t)).json()}async function jA(e,t=!1){const r=t?{postal_code:e,is_test:!0}:{postal_code:e},a=await(await Ke(`${Ve}/create-quote`,r)).json();if(!a||typeof a!="object"||!a.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(a)}`);return a}async function nb(e,t){return await(await Ke(`${Ve}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function Dr(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const a=await Ke(`${Ve}/update-quote`,n),o=await Sa(a);return!o||typeof o!="object"||!("status"in o)||o.status==null?{status:"success"}:o}async function _l(e,t){return await(await Ke(`${Ve}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function ZA(e){return await(await Ke(`${Ve}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function ab(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await Ke(`${Ve}/is-supported-state`,r)).json()}async function vl(e){const t=e?{quoteId:e}:{};return await(await Ke(`${Ve}/get-rates`,t)).json()}async function ob(e){const t=e?{quoteId:e}:{};return await(await Ke(`${Ve}/get-quote`,t)).json()}async function ib(e){return(await Ke(`${Ve}/get-vehicle-options`,e)).json()}async function GA(e){return(await Ke(`${Ve}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function qA(e){const t=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"vehiclePrefillSuggestions"}),r=await Sa(t);return{suggestions:Array.isArray(r.suggestions)?r.suggestions:[]}}async function KA(e,t){const r=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"applyVehiclePrefill",selectedIds:t}),n=await Sa(r);return{items:Array.isArray(n.items)?n.items:[]}}async function YA(e){await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"dismissVehiclePrefill"})}async function QA(e){const t=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"driverPrefillSuggestions"}),r=await Sa(t);return{suggestions:Array.isArray(r.suggestions)?r.suggestions:[]}}async function XA(e,t){const r=await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"applyDriverPrefill",selectedIds:t}),n=await Sa(r);return{items:Array.isArray(n.items)?n.items:[]}}async function WA(e){await Ke(`${Ve}/get-vehicle-options`,{quoteId:e,action:"dismissDriverPrefill"})}async function JA(e,t){const n=await(await Ke(`${Ve}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const El=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Dl(e){return ni(String(e??"")).replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function ek(e){const t=Dl(e??"unknown-stage");return["form-area",`form-area--${t}`,`formArea-${t}`].join(" ")}function Sl(e,t,r){const n=Dl(t??"unknown-stage"),a=Dl(e);return["form-section","form-question",`form-section--${a}`,`form-question--${a}`,`formQuestion-${n}_${a}`,r&&r.length>0?"form-question--scoped":null].filter(Boolean).join(" ")}const tk={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},sb={auto_prior_carrier_name:w6,auto_prior_liability_limit:k6,auto_reason_for_no_insurance:T6,residence_type:x6,home_prior_carrier_name:$6,policy_bi:P6,policy_um:I6,policy_pd:M6,policy_mp:F6,policy_umpd:O6,policy_pip:B6,policy_auto_death_indemnity:L6,vehicle_comp_deductible:fl,vehicle_coll_deductible:fl,vehicle_towing_and_labor:ml,vehicle_transportation_expense:Ay,education_level:ky,industry:My,occupation:Oy,usage:A6,architectural_style:z6,dwelling_type:j6,occupancy_type:Z6,construction_quality:G6,construction_type:q6,foundation_type:K6,located_over_water:Y6,number_of_stories:Q6,exterior_wall_type:X6,roof_material_type:W6,roof_shape:J6,roof_updated_type:eA,heating_type:tA,oil_tank_location:rA,basement_type:nA,plumbing_type:aA,personal_liability:oA,dwelling_medical_payments:iA,all_perils_deductible:sA,windstorm_deductible:uA,distance_from_fire_hydrant_ft:lA,distance_from_fire_station_miles:cA,employment_industry:Ty,marital_status:Py,gender:Iy,co_applicant_employment_industry:Ty,co_applicant_marital_status:Py,co_applicant_gender:Iy,description:dA,tort_threshold:fA,pip_coverage_type:mA,extended_medical:pA,additional_pip:hA,policy_pip_deductible:gA},ub=["OTHER / NOT LISTED"],lb=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],rk=["Other"];function yt(e){const t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}function cb(e){const t=e.replace(/\D+/g,"");if(t!=="")return C6(t)}function nk(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const ak={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:9,loss_of_use_coverage:9,amount_paid_cents:7,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,number_of_parking_spaces:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},db=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),ok=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),mi={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},ik={license_number:20};function sk(e){const t=new Date,r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));if(e==="effective_date"){const n=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+3,r.getUTCDate()));return{min:yt(r),max:yt(n)}}if(e==="home_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),a=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:yt(n),max:yt(a)}}if(e==="date_of_incident")return{max:yt(r)};if(e==="move_in_date")return{max:yt(r)};if(e==="purchase_date")return{max:yt(r)};if(e==="date_of_birth")return{max:yt(r)};if(e==="date_first_licensed")return{max:yt(r)};if(e==="occurred_at")return{max:yt(r)};if(e==="accident_prevention_course_date")return{max:yt(r)};if(e==="auto_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),a=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:yt(n),max:yt(a)}}return{}}const uk=new Set(["Disabled","Retired","Unemployed","Other"]);function Cl(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const a=We(t,r,"industry"),o=We(t,r,"employment_industry"),i=String(a??o??"").trim();return!uk.has(i)}function wl(e,t,r,n){return Jo(e,n,r)}function pi(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function fb(e,t){return pi(e)?"Yes":t}function mb(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function pb(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function hb(e,t){const r=mb(e),n=mb(t);if(r!=null&&n!=null)return r-n;const a=pb(e),o=pb(t);return a!=null&&o!=null?a-o:e==null||t==null?null:String(e).localeCompare(String(t))}function lk(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function Ca(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=hb(e,r);return n!=null&&n<0}case"greaterThan":{const n=hb(e,r);return n!=null&&n>0}case"contains":return lk(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}function wa(e,t){return t.reduce((r,n)=>r?.[n],e)}function $t(e,t,r){if(t.length===0)return e;const[n,...a]=t;if(a.length===0){if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=r,l}return{...e,[n]:r}}const o=e?.[n],i=typeof a[0]=="number"?Array.isArray(o)?o:[]:o&&typeof o=="object"?o:{},s=$t(i,a,r);if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=s,l}return{...e,[n]:s}}function We(e,t,r){return wa(e,[...t??[],r])}function tt(e,t,r,n){return $t(e,[...t??[],r],n)}function ck(e,t){return e?.length?`${e.join("-")}-${t}`:t}const dk="__items",hi=e=>`${e}${dk}`;function ft(e){return e==null?"":typeof e=="string"?e:String(e)}function gb(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function fk(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function yb({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:a,quoteId:o,widgetStageKey:i,validationAttempt:s=0,invalidValueKeys:u,fetchVehicleOptions:l}){const c=d.useMemo(()=>l??(A=>ib({quoteId:o,...A})),[l,o]),f=d.useMemo(()=>Xu(e),[e]),p=d.useMemo(()=>hl(f),[f]),h=d.useMemo(()=>i==="BundlePolicy"?!0:f.some(A=>String(A.key)==="home_prior_carrier_name")&&f.some(A=>String(A.key)==="driver_vehicle_assignments"),[i,f]),g=d.useMemo(()=>{const A={};return t&&Object.assign(A,t),A},[t]),[y,_]=d.useState(g);d.useEffect(()=>{_(g)},[g]);const[D,w]=d.useState({}),b=d.useMemo(()=>({...D,...r??y}),[D,r,y]);d.useEffect(()=>{r&&w(A=>({...A,...r}))},[r]);const[C,v]=d.useState({}),k=d.useRef(new Map),I=d.useRef(new Set),[,G]=d.useState({}),[O,Z]=d.useState({}),M=d.useRef(!1);d.useEffect(()=>{!o||M.current||!f.some(S=>S.key==="year"||S.key==="make"||S.key==="model"||S.key==="body_style")||(M.current=!0,c({}).catch(()=>{}))},[o,f,c]);const[X,de]=d.useState({}),[x,z]=d.useState({}),U=d.useCallback(async(A,S)=>{if(!o||!$y(S))return;const E=A?A.join("-"):"_root";de(j=>({...j,[E]:!0})),z(j=>({...j,[E]:null}));try{const j=await GA({quoteId:o,vin:S});if(j.error){z(ae=>({...ae,[E]:j.error}));return}let q=b;j.year&&(q=tt(q,A,"year",String(j.year))),j.make&&(q=tt(q,A,"make",j.make)),j.model&&(q=tt(q,A,"model",j.model)),j.bodyStyle&&(q=tt(q,A,"body_style",j.bodyStyle)),r&&n?n(q):_(q),w(q),k.current.clear(),I.current.clear(),G({})}catch{z(j=>({...j,[E]:"VIN lookup failed — please enter vehicle details manually"}))}finally{de(j=>({...j,[E]:!1}))}},[o,b,r,n]),P=d.useCallback(A=>{const S=`${A.year}|${A.make??""}|${A.model??""}`,E=A.model?"bodyStyles":A.make?"models":"makes",j=k.current.get(S);return j?j[E]??[]:void 0},[]),K=d.useCallback((A,S)=>{if(!o)return;const E=`${S.year}|${S.make??""}|${S.model??""}`,j=S.model?"bodyStyles":S.make?"models":"makes",q=`${A}:${j}`;k.current.has(E)||I.current.has(E)||(I.current.add(E),Z(ae=>({...ae,[q]:!0})),c(S).then(ae=>{k.current.set(E,ae),G(V=>({...V,[q]:ae[j]??[]}))}).catch(()=>{k.current.set(E,{}),G(ae=>({...ae,[q]:[]}))}).finally(()=>{I.current.delete(E),Z(ae=>({...ae,[q]:!1}))}))},[o,c]);function $(A,S,E){const j=b,q=A?wa(b,A)??{}:j;return A?{state:j.state,...q,[S]:E}:{...q,[S]:E}}function T(A,S){const E=xy.filter(q=>q.targetKey===A||q.dependsOn.includes(A)),j={[A]:void 0};for(const q of E){const ae=q.validate(S);q.targetKey in j?ae!==void 0&&(j[q.targetKey]=ae):j[q.targetKey]=ae}v(q=>({...q,...j}))}const Y=(A,S,E)=>{const j=We(b,E,A);if(Lt(j,S)){C[A]&&v(ae=>({...ae,[A]:void 0}));return}const q=dl(A,j);if(q){v(ae=>({...ae,[A]:q}));return}T(A,$(E,A,j))};d.useEffect(()=>{let A=b,S=!1;f.forEach(E=>{if(!pi(E))return;const j=String(E.key);We(A,void 0,j)!=="Yes"&&(A=tt(A,void 0,j,"Yes"),S=!0)}),S&&(r&&n?n(A):_(A),w(A))},[f,b,r,n]);function se(A,S){const E=A.key;if((E==="relationship_to_insured"||E==="is_registered_owner")&&S){const N=S[S.length-1];if(typeof N=="number"&&N===0)return null}if((E==="purchase_date"||E==="cost_new_value_cents")&&S)return null;if(E==="custom_equipment_value_cents"&&S){const N=We(b,S,"vehicle_has_modifications");if(N!=="Yes"&&N!==!0)return null}const j=E==="auto_reason_for_no_insurance"&&(p.currentCarrierKey||p.autoCarrierKey)?Ny(b,p)||p.currentCarrierKey&&b[p.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":A.question,q=A.hint,ae=We(b,S,E),V=si(A,p)?Ea(b,p):E==="social_security_number"&&Wo(b.state??b.State)?!0:A.required,ue=C[E],ve=N=>{let ne=tt(b,S,E,N);if(A.inputType==="radio"&&A.conditionals){const L=A.conditionals??[];for(const J of L){const W=We(b,S,E),ie=Ca(W,J.conditionalType,J.conditionalValue),oe=Ca(N,J.conditionalType,J.conditionalValue);if(ie&&!oe&&J.conditionalQuestionsAllowMultiple){const ce=J.conditionalQuestions??[];if(ce.length>0){const F=hi(E);ne=$t(ne,[...S??[],F],[]);const R=(re,ee)=>{re.forEach(le=>{(le.conditionals??[]).forEach(pe=>{if(pe.conditionalQuestionsAllowMultiple){const _e=hi(le.key);ne=$t(ne,[...ee,_e],[])}const De=pe.conditionalQuestions??[];De.length>0&&R(De,ee)})})};R(ce,[...S??[],F])}}}}r&&n?n(ne):_(ne),w(ne)};if(E==="vehicle_policy_selections"){const N=b.vehicles__items??[],ne=b.drivers__items??[];if(N.length===0)return m.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},E);const L=b.driver_vehicle_assignments??{},J=ne.length>1,W=_e=>Object.entries(_e).map(([be,Pe])=>({value:be,label:Pe})),ie=Wo(b.state??b.State),oe=(_e,be)=>Object.fromEntries(_e.filter(Pe=>Pe in be).map(Pe=>[Pe,be[Pe]])),F=W(oe(ie?R6:N6,fl)),R=ie?oe(U6,ml):ml,re=W(R),le=W(oe(ie?H6:V6,Ay)),fe=(_e,be,Pe)=>{const Ye=$t(b,["vehicles__items",_e,be],Pe);r&&n?n(Ye):_(Ye),w(Ye)},pe=(_e,be,Pe)=>{const Ye={...L},bt=`v${_e}`;Ye[bt]={...Ye[bt]??{}},Ye[bt][`d${be}`]=Pe;const Oe=$t(b,["driver_vehicle_assignments"],Ye);r&&n?n(Oe):_(Oe),w(Oe)},De=_e=>{if(!J)return null;const be=L[`v${_e}`];if(!be)return null;const Pe=ne.map((Oe,Rt)=>be[`d${Rt}`]??0),Ye=Pe.filter(Oe=>Oe>0);if(Ye.length>=2&&Ye.every(Oe=>Oe===Ye[0])&&Ye[0]===50)return`Assignments for Vehicle ${_e+1} cannot be 50 percent for both Drivers.`;const bt=Pe.reduce((Oe,Rt)=>Oe+Rt,0);return bt>0&&bt!==100?`Driver percentages for this vehicle must add up to 100% (currently ${bt}%).`:null};return m.jsx("div",{children:N.map((_e,be)=>{const Pe=[_e.year,_e.make,_e.model].filter(Boolean).join(" ")||`Vehicle ${be+1}`,Ye=De(be),bt=Oe=>typeof _e[Oe]=="string"?_e[Oe]:"";return m.jsxs("fieldset",{style:{border:`1px solid ${Ye?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[m.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:Pe}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[m.jsx(pa,{id:`veh-${be}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:F,value:bt("vehicle_comp_deductible"),onChange:Oe=>fe(be,"vehicle_comp_deductible",Oe.currentTarget.value)}),m.jsx(pa,{id:`veh-${be}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:F,value:bt("vehicle_coll_deductible"),onChange:Oe=>fe(be,"vehicle_coll_deductible",Oe.currentTarget.value)}),m.jsx(pa,{id:`veh-${be}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:re,value:bt("vehicle_towing_and_labor"),onChange:Oe=>fe(be,"vehicle_towing_and_labor",Oe.currentTarget.value)}),m.jsx(pa,{id:`veh-${be}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:le,value:bt("vehicle_transportation_expense"),onChange:Oe=>fe(be,"vehicle_transportation_expense",Oe.currentTarget.value)})]}),J&&m.jsxs("div",{style:{marginTop:"16px"},children:[m.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),m.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:ne.map((Oe,Rt)=>{const Nl=[Oe.first_name,Oe.last_name].filter(Boolean).join(" ")||`Driver ${Rt+1}`,Pt=L[`v${be}`]?.[`d${Rt}`];return m.jsx("div",{style:{flex:"0 0 140px"},children:m.jsx(hs,{id:`assignment-v${be}-d${Rt}`,label:`${Nl} %`,value:Pt??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Aa=>{const Cr=Aa.currentTarget.value.replace(/\D+/g,"");pe(be,Rt,Cr===""?0:Math.min(100,parseInt(Cr,10)))}})},`${be}-${Rt}`)})}),Ye&&m.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:Ye})]})]},be)})},E)}if(E==="driver_vehicle_assignments"){const N=b.vehicles__items??[],ne=b.drivers__items??[];if(h&&ne.length<=1)return null;if(N.length===0||ne.length===0)return m.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},E);const L=b.driver_vehicle_assignments??{},J=(ie,oe,ce)=>{const F={...L},R=`v${ie}`;F[R]={...F[R]??{}},F[R][`d${oe}`]=ce,ve(F)},W=ie=>{if(ne.length<2)return null;const oe=L[`v${ie}`];if(!oe)return null;const ce=ne.map((re,ee)=>oe[`d${ee}`]??0),F=ce.filter(re=>re>0);if(F.length>=2&&F.every(re=>re===F[0])&&F[0]===50)return`Assignments for Vehicle ${ie+1} cannot be 50 percent for both Drivers.`;const R=ce.reduce((re,ee)=>re+ee,0);return R>0&&R!==100?`Driver percentages for this vehicle must add up to 100% (currently ${R}%).`:null};return m.jsxs("div",{children:[m.jsx("h4",{style:{marginBottom:"12px"},children:j}),N.map((ie,oe)=>{const ce=[ie.year,ie.make,ie.model].filter(Boolean).join(" ")||`Vehicle ${oe+1}`,F=W(oe);return m.jsxs("fieldset",{style:{border:`1px solid ${F?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[m.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:ce}),m.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:ne.map((R,re)=>{const ee=[R.first_name,R.last_name].filter(Boolean).join(" ")||`Driver ${re+1}`,le=L[`v${oe}`]?.[`d${re}`];return m.jsx("div",{style:{flex:"0 0 140px"},children:m.jsx(hs,{id:`assignment-v${oe}-d${re}`,label:`${ee} %`,value:le??"",min:0,max:100,step:1,inputMode:"numeric",onChange:fe=>{const pe=fe.currentTarget.value.replace(/\D+/g,"");J(oe,re,pe===""?0:Math.min(100,parseInt(pe,10)))}})},`${oe}-${re}`)})}),F&&m.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:F})]},oe)})]},E)}switch(A.inputType){case"text":{if(E==="vin"&&o){const N=S?S.join("-"):"_root",ne=X[N]??!1,L=x[N]??null,J=[q?`${E}-hint`:null,ue?`${E}-error`:null,L?`${E}-vin-error`:null].filter(Boolean).join(" ");return m.jsxs("div",{children:[m.jsx(gt,{id:E,label:j,hint:q,error:ue,required:V,children:m.jsxs("div",{className:"flex items-end gap-2",children:[m.jsx("div",{className:"flex-1 min-w-0",children:m.jsx("input",{id:E,className:`form-input ${ue?"input-error":""}`,"aria-invalid":!!ue,"aria-describedby":J||void 0,"aria-required":V||void 0,required:V,value:ft(ae),maxLength:17,onChange:W=>ve(W.currentTarget.value),onBlur:()=>Y(E,"text",S),autoComplete:mi[E],type:"text"})}),m.jsx("button",{type:"button",disabled:ne||!$y(ft(ae)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>U(S,ft(ae)),children:ne?"Looking up...":"Verify VIN"})]})}),L&&m.jsx("p",{id:`${E}-vin-error`,className:"text-sm text-red-600 mt-1",children:L})]},E)}if(E==="sms_code"){const N=ft(ae);return m.jsx(Ya,{id:E,label:j,hint:q,value:N,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:ne=>{const L=ne.currentTarget.value.replace(/\D+/g,"").slice(0,6);ve(L)},onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue,autoComplete:mi[E]},E)}if(E==="license_number")return m.jsx(Ya,{id:E,label:j,hint:q,value:ft(ae),onChange:N=>ve(N.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue,autoComplete:"off",maxLength:20},E);if(E==="social_security_number"){const N=We(b,S,"ssn_display"),ne=typeof N=="string"?N:"",L=ne?`${ne}. Re-enter to update.${q?` ${q}`:""}`:q;return m.jsx(N1,{id:E,label:j,hint:L,value:ft(ae),onChange:J=>ve(J.currentTarget.value),onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue},E)}return m.jsx(Ya,{id:E,label:j,hint:q,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"text",S),"aria-required":V||void 0,error:ue,autoComplete:mi[E],maxLength:ik[E]},E)}case"email":return m.jsx(U1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"email",S),"aria-required":V||void 0,error:ue},E);case"password":return m.jsx(V1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"password",S),"aria-required":V||void 0,error:ue},E);case"tel":return m.jsxs(m.Fragment,{children:[m.jsx(pd,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"tel",S),"aria-required":V||void 0,error:ue},E),E==="phone"&&m.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[m.jsx("p",{children:"Enter your mobile number to continue to your quotes. If you choose to pursue a quote, you'll verify this number with a 6-digit text — we won't text you now."}),m.jsx("p",{children:"Message & data rates may apply. One message per request."}),m.jsxs("p",{children:["See our"," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return m.jsx(H1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"url",S),"aria-required":V||void 0,error:ue},E);case"number":{const N=ak[E];return db.has(E)||ok.has(E)?m.jsx(R1,{id:E,label:j,hint:q,value:gb(ae),isCurrency:db.has(E),maxDigits:N,onChange:ne=>ve(cb(ne.currentTarget.value)),onBlur:()=>Y(E,"number",S),required:V,"aria-required":V||void 0,error:ue},E):m.jsx(hs,{id:E,label:j,hint:q,value:gb(ae),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:ne=>{if(nk(ne.key)){ne.preventDefault();return}N!==void 0&&/^\d$/.test(ne.key)&&String(ne.currentTarget.value).replace(/\D/g,"").length>=N&&ne.preventDefault()},onChange:ne=>{let L=ne.currentTarget.value;N!==void 0&&(L=L.slice(0,N)),ve(cb(L))},onBlur:()=>Y(E,"number",S),required:V,"aria-required":V||void 0,error:ue},E)}case"textarea":return m.jsx(z1,{id:E,label:j,value:ft(ae),onChange:N=>ve(N.currentTarget.value),onBlur:()=>Y(E,"textarea",S),"aria-required":V||void 0,error:ue,rows:4},E);case"date":{const{min:N,max:ne}=sk(E);return m.jsx(Cw,{id:E,label:j,hint:q,value:ft(ae),min:N,max:ne,onChange:L=>{const J=L.currentTarget.value;ve(J),!Lt(J,"date")&&!dl(E,J)&&T(E,$(S,E,J))},onBlur:()=>Y(E,"date",S),"aria-required":V||void 0,error:ue,autoComplete:mi[E]},E)}case"checkbox":{if(A.options){const N=Array.isArray(ae)?ae:[],ne=`${E}-error`;return m.jsxs("fieldset",{className:"space-y-2","aria-describedby":ue?ne:void 0,children:[m.jsxs("legend",{className:"form-label",children:[j,V&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-red-600 ml-1","aria-hidden":"true",children:"*"}),m.jsx("span",{className:"sr-only",children:" required"})]})]}),m.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:A.options.map(L=>{const J=`${E}-${ni(L)}`,W=N.includes(L);return m.jsx(Yr,{id:J,label:L,checked:W,onChange:ie=>{const oe=new Set(N);ie.currentTarget.checked?oe.add(L):oe.delete(L),ve(Array.from(oe))},"aria-required":V||void 0,"aria-describedby":ue?ne:void 0},J)})}),ue&&m.jsx("p",{id:ne,className:"mt-1 text-sm text-red-600",children:ue})]},E)}return m.jsx(Yr,{id:E,label:V?`${j} *`:j,checked:!!ae,onChange:N=>ve(N.currentTarget.checked),"aria-required":V||void 0},E)}case"radio":{if(pi(A))return null;const N=A.options??[],ne=S&&S.length>0?`${E}__${S.join("__")}`:E;return m.jsx($w,{legend:j,required:V,children:N.map(L=>m.jsx(xw,{name:ne,value:L,checked:ae===L,onChange:()=>{ve(L),T(E,$(S,E,L))},children:sb[E]?.[L]??L},`${E}-${ni(L)}`))},E)}case"select":{let N=A.options??[];E==="quote_vehicle_id"&&(N=r?.vehicles__items?.map(ce=>ce.vin)??[]);let ne=!1,L,J,W;if(E==="year"||E==="make"||E==="model"||E==="body_style"){const ce=S?S.join("-"):"_root";X[ce]&&(ne=!0,L="Looking up VIN...")}if(!ne&&(E==="make"||E==="model"||E==="body_style")){const ce=S?S.join("-"):"_root";W=ce;const F=We(b,S,"year"),R=typeof F=="number"?F:Number(F);if(E==="make"){const re=`${ce}:makes`;if(!R||!Number.isFinite(R))ne=!0,L="Select a year first";else{J={year:R};const ee=P(J);ee&&ee.length>0?N=ee:O[re]?(L="Loading makes...",N=[...Uy]):N=[...Uy]}typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}else if(E==="model"){const re=`${ce}:models`,ee=String(We(b,S,"make")??"");if(!ee)ne=!0,L="Select a make first";else if(R&&Number.isFinite(R)){J={year:R,make:ee};const le=P(J);le&&le.length>0?N=le:O[re]?(L="Loading models...",N=[...ub]):N=[...ub]}typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}else{const re=`${ce}:bodyStyles`,ee=String(We(b,S,"make")??""),le=String(We(b,S,"model")??"");if(!le)ne=!0,L="Select a model first";else if(R&&Number.isFinite(R)&&ee){J={year:R,make:ee,model:le};const fe=P(J);fe&&fe.length>0?N=fe:O[re]?(L="Loading body styles...",N=[...lb]):N=[...lb]}typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}}if(E==="occupation"||E==="co_applicant_occupation"){const ce=E==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,F=ce?void 0:We(b,S,"industry"),R=We(b,S,ce??"employment_industry"),ee=String(ai(F??R)??"").trim();N=[...Fy[ee]??rk],typeof ae=="string"&&ae&&!N.includes(ae)&&(N=[ae,...N])}const ie=ck(S,E),oe=u?.has([...S??[],E].join("."))??!1;return m.jsx(pa,{id:ie,label:L?`${j} — ${L}`:j,required:V,"aria-required":V||void 0,error:ue,disabled:ne,value:oe?"":fk(ae),onChange:ce=>{const F=ce.currentTarget.value;if(E!=="year"&&E!=="make"&&E!=="model"&&E!=="industry"&&E!=="employment_industry"&&E!=="co_applicant_employment_industry"){ve(F),T(E,$(S,E,F));return}let R=tt(b,S,E,F);if(E==="year")R=tt(R,S,"make",""),R=tt(R,S,"model",""),R=tt(R,S,"body_style","");else if(E==="make")R=tt(R,S,"model",""),R=tt(R,S,"body_style","");else if(E==="model")R=tt(R,S,"body_style","");else if(E==="industry"||E==="employment_industry")R=tt(R,S,"occupation","");else if(E==="co_applicant_employment_industry"){const ee=String(ai(F)??"").trim(),le=Fy[ee]??[],fe=le.find(pe=>pe===ee)??le[0]??"";R=tt(R,S,"co_applicant_occupation",fe??"")}r&&n?n(R):_(R),w(R);const re=S?wa(R,S)??{}:R;T(E,{...re,[E]:F})},placeholder:L??"Select an option",onFocus:J&&W?()=>K(W,J):void 0,options:N.map(ce=>({value:ce,label:sb[E]?.[ce]??tk[ce]??ce}))},ie)}case"address":return m.jsx(Iw,{id:E,label:j,value:ft(ae),onChange:(N,ne)=>{let L=tt(b,S,E,N);const J=ne?.state??(typeof N=="string"?N.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(J){const W=S?[...S,"state"]:["state"];L=$t(L,W,J)}if(!S){const W=ne?.zipCode??(typeof N=="string"?N.match(/,\s*[A-Z]{2}\s+(\d{5})(?:-\d{4})?\b/)?.[1]:void 0);W&&(L=$t(L,["postal_code"],W))}r&&n?n(L):_(L),w(L)},onBlur:()=>Y(E,"address",S),required:V,"aria-required":V||void 0,error:ue},E);default:return null}}function te(A,S){const E=A.some(q=>String(q.key)==="years_at_address"),j=A.find(q=>String(q.key)==="months_at_address");return A.map((q,ae)=>{const V=String(q.key);if(V==="months_at_address"&&E||!ii(q,b,p)||!Cl(q,b,S)||!oi(q,b,i))return null;if(wl(V,q,b,i)){const W=p.currentCarrierKey?b[p.currentCarrierKey]:void 0;if(!(W&&W!=="NoPriorInsurance"&&va(b,p)&&El.has(V)))return null}const ue=se(q,S),ve=V==="years_at_address"&&j?se(j,S):null,N=q.conditionals??[];if(!N.length)return i==="BundlePolicy"&&V==="policy_bi"?m.jsxs("div",{className:Sl(V,i,S),"data-question-key":V,children:[m.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),ue]},`wrap-${V}-${ae}`):m.jsxs("div",{className:Sl(V,i,S),"data-question-key":V,children:[ue,ve]},`wrap-${V}-${ae}`);const ne=fb(q,We(b,S,V)),L=N.filter(W=>Ca(ne,W.conditionalType,W.conditionalValue)),J=L.length>1&&!L.some(W=>W.conditionalQuestionsAllowMultiple)?L.slice(0,1):L;return m.jsxs("div",{className:Sl(V,i,S),"data-question-key":V,children:[ue,ve,J.map((W,ie)=>{const oe=W.conditionalQuestions??[];if(!oe.length)return null;if(!W.conditionalQuestionsAllowMultiple)return m.jsx("div",{className:"mt-3",children:te(oe,S)},`branch-${V}-${ie}`);const ce=hi(V),F=wa(b,[...S??[],ce])??[],R=Math.max(1,F.length||1),re=()=>{const fe=$t(b,[...S??[],ce,F.length],{});r&&n?n(fe):_(fe),w(fe)},ee=()=>{const fe=F.slice(0,Math.max(0,F.length-1)),pe=$t(b,[...S??[],ce],fe);r&&n?n(pe):_(pe),w(pe)},le=`${V}__c${ie}`;return m.jsxs("div",{className:"mt-3",children:[m.jsxs("div",{className:"repeatable-controls flex items-center justify-between mb-2 gap-2",children:[m.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),m.jsxs("div",{className:"repeatable-actions space-x-2",children:[m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:re,children:"Add another"}),R>1&&m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ee,children:"Remove last"})]})]}),Array.from({length:R}).map((fe,pe)=>{const De=[...S??[],ce,pe],_e=`${le}__i${pe}`,be=F[pe]??{},Pe=V==="drivers",Oe=Pe?`Driver #${pe+1}`:V==="vehicles"?`Vehicle #${pe+1}`:V==="home_losses"||V==="losses"?`Loss #${pe+1}`:`Entry #${pe+1}`,Nl=Pe&&typeof be.ssn_display=="string"&&be.ssn_display?` — ${be.ssn_display}`:"";return m.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[m.jsxs("div",{className:"text-sm font-semibold mb-2",children:[Oe,Nl]}),oe.map(Pt=>{const Aa=String(Pt.key);if(!ii(Pt,b,p)||!Cl(Pt,b,De)||!oi(Pt,b,i))return null;if(wl(Aa,Pt,b,i)){const Cr=p.currentCarrierKey?b[p.currentCarrierKey]:void 0;if(!(Cr&&Cr!=="NoPriorInsurance"&&va(b,p)&&El.has(Aa)))return null}return m.jsxs("div",{className:"mt-3",children:[se(Pt,De),(()=>{const Cr=Pt.conditionals??[];if(!Cr.length)return null;const b_=We(b,De,Pt.key),$i=Cr.filter(rn=>Ca(b_,rn.conditionalType,rn.conditionalValue));return($i.length>1&&!$i.some(rn=>rn.conditionalQuestionsAllowMultiple)?$i.slice(0,1):$i).map((rn,Ul)=>{const Hl=rn.conditionalQuestions??[];if(!Hl.length)return null;if(!rn.conditionalQuestionsAllowMultiple)return m.jsx("div",{className:"mt-3",children:te(Hl,De)},`nested-${_e}-${Ul}`);const Ai=hi(Pt.key),ki=wa(b,[...De,Ai])??[],__=Math.max(1,ki.length||1),RP=()=>{const On=$t(b,[...De,Ai,ki.length],{});r&&n?n(On):_(On),w(On)},NP=()=>{const On=ki.slice(0,Math.max(0,ki.length-1)),nn=$t(b,[...De,Ai],On);r&&n?n(nn):_(nn),w(nn)};return m.jsxs("div",{className:"mt-3",children:[m.jsxs("div",{className:"repeatable-controls flex items-center justify-between mb-2 gap-2",children:[m.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),m.jsxs("div",{className:"repeatable-actions space-x-2",children:[m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:RP,children:"Add another"}),__>1&&m.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:NP,children:"Remove last"})]})]}),Array.from({length:__}).map((On,nn)=>{const UP=[...De,Ai,nn];return m.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[m.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",nn+1]}),te(Hl,UP)]},`nested-item-${_e}-${Ul}-${nn}`)})]},`nested-repeat-${_e}-${Ul}`)})})()]},`${_e}-${Aa}`)})]},`group-${_e}`)})]},`branch-${V}-${ie}`)})]},`wrap-${V}-${ae}`)})}const H=d.useMemo(()=>{const A=[],S=(E,j)=>{E.forEach(q=>{if(!ii(q,b,p)||!Cl(q,b,j)||!oi(q,b,i))return;const ae=String(q.key);if(wl(ae,q,b,i)){const ne=p.currentCarrierKey?b[p.currentCarrierKey]:void 0;if(!(ne&&ne!=="NoPriorInsurance"&&va(b,p)&&El.has(ae)))return}pi(q)||A.push(q);const V=q.conditionals??[];if(!V.length)return;const ue=fb(q,We(b,j,ae)),ve=V.filter(ne=>Ca(ue,ne.conditionalType,ne.conditionalValue));(ve.length>1&&!ve.some(ne=>ne.conditionalQuestionsAllowMultiple)?ve.slice(0,1):ve).forEach(ne=>{const L=ne.conditionalQuestions??[];L.length&&(ne.conditionalQuestionsAllowMultiple||S(L,j))})})};return S(f),A},[f,b,p,i]);d.useEffect(()=>{if(s<=0)return;const A=Ea(b,p),S=H.map(E=>si(E,p)?{...E,required:A}:E);v(_a(S,b))},[s,H,b,p]);function Q(A){A.preventDefault();const S=Ea(b,p),E=H.map(q=>si(q,p)?{...q,required:S}:q),j=_a(E,b);if(v(j),Object.keys(j).length>0){const q=H.findIndex(ae=>j[ae.key]);q>=0&&document.getElementById(H[q].key)?.focus();return}a(b)}return m.jsx("form",{className:ek(i),"data-form-area":i??"unknown-stage",onSubmit:Q,noValidate:!0,children:te(f)})}function bb({title:e,description:t,applyLabel:r,dismissLabel:n,alreadyOnApplicationNote:a,suggestions:o,isApplying:i,onApply:s,onDismiss:u}){const[l,c]=d.useState(new Set),f=o.length>0&&o.every(y=>l.has(y.id)),p=d.useMemo(()=>o.some(y=>y.alreadyOnApplication),[o]),h=y=>{c(_=>{const D=new Set(_);return D.has(y)?D.delete(y):D.add(y),D})},g=()=>{c(f?new Set:new Set(o.map(y=>y.id)))};return m.jsxs("div",{className:"prefill-suggestions-modal fixed inset-0 z-[10000] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"prefill-suggestions-title",children:[m.jsx("div",{className:"backdrop","aria-hidden":"true"}),m.jsxs("div",{className:"modal-panel bg-white relative w-full max-w-lg max-h-[85vh] overflow-y-auto",role:"document",children:[m.jsxs("div",{className:"text-center mb-6",children:[m.jsx("h2",{id:"prefill-suggestions-title",className:"h1-title",children:e}),m.jsx("p",{className:"text-sm text-slate-600 mt-3",children:t})]}),m.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-left mb-4",children:[o.map(y=>m.jsx(Yr,{id:`prefill-suggestion-${y.id}`,label:y.alreadyOnApplication?`${y.label} *`:y.label,checked:l.has(y.id),disabled:i,onChange:()=>h(y.id)},y.id)),o.length>1&&m.jsx(Yr,{id:"prefill-suggestion-select-all",label:"Select All",checked:f,disabled:i,onChange:g})]}),p&&m.jsx("p",{className:"text-xs text-slate-500 mb-4 text-left",children:a??"* This entry is already on the application; selecting it will fill in available data that does not exist on the application."}),m.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mt-6",children:[m.jsx("button",{type:"button","data-widget-ctrl":"prefill-dismiss",onClick:u,disabled:i,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:n}),m.jsxs("button",{type:"button","data-widget-ctrl":"prefill-apply",onClick:()=>s(Array.from(l)),disabled:l.size===0||i,className:["form-wizard-next-btn","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",l.size===0||i?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[i&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]})]})]})]})}const mk="https://getcredify.com/privacy-policy";function pk(){return m.jsx("a",{href:mk,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function _b(){return m.jsxs(m.Fragment,{children:["See our ",m.jsx(pk,{})," for how we use your information."]})}const hk=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),gk=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function yk(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function Mn(e){return`stage-footer-hint stage-footer-hint--${yk(e)}`}function vb({stageKey:e}){return e?e==="Zip"?m.jsx("p",{className:Mn(e),"data-stage-key":e,children:"No credit card required."}):e==="Email"?m.jsxs("div",{className:Mn(e),"data-stage-key":e,children:[m.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),m.jsx("p",{children:m.jsx(_b,{})})]}):gk.has(e)?m.jsx("p",{className:Mn(e),"data-stage-key":e,children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):e==="Ssn"?m.jsx("p",{className:Mn(e),"data-stage-key":e,children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):e==="SMSVerification"?m.jsx("p",{className:Mn(e),"data-stage-key":e,children:"You'll receive a text from Credify shortly."}):hk.has(e)?m.jsx("p",{className:Mn(e),"data-stage-key":e,children:m.jsx(_b,{})}):null:null}function Eb(e){const t=new Map,r=new Map,n=a=>{let o=t.get(a);return o||(o=e(a).then(i=>(r.set(a,i.suggestions),i.suggestions)).catch(i=>{throw t.delete(a),i}),t.set(a,o)),o};return{fetch:n,peek:a=>r.get(a),prefetch:a=>{n(a).catch(()=>{})},reset:()=>{t.clear(),r.clear()}}}const xl=Eb(qA),$l=Eb(QA),bk=xl.fetch,_k=xl.peek,vk=xl.prefetch,Ek=$l.fetch,Dk=$l.peek,Sk=$l.prefetch,Ck=["vin","year","make","model"];function wk(e){if(!e||typeof e!="object")return!0;const t=e;return Ck.every(r=>{const n=t[r];return n==null||String(n).trim()===""})}function xk(e,t){if(t.length===0)return e;const r=e.vehicles__items??[],n=r.filter(i=>!wk(i)),a=new Set(n.map(i=>String(i.vin??"").trim().toUpperCase()).filter(i=>i!=="")),o=t.filter(i=>{const s=String(i.vin??"").trim().toUpperCase();return s===""||!a.has(s)});return o.length===0&&n.length===r.length?e:{...e,vehicles:"Yes",vehicles__items:[...n,...o]}}const $k=["first_name","last_name","date_of_birth"];function Db(e){if(!e||typeof e!="object")return!0;const t=e;return $k.every(r=>{const n=t[r];return n==null||String(n).trim()===""})}function Sb(e){return`${String(e.first_name??"").trim()} ${String(e.last_name??"").trim()}`.trim().toUpperCase()}function Ak(e,t){if(t.length===0)return e;const r=e.drivers__items??[],n=r.filter(i=>!Db(i)),a=new Set(n.map(Sb).filter(i=>i!=="")),o=t.filter(i=>{const s=Sb(i);return s===""||!a.has(s)});return o.length===0&&n.length===r.length?e:{...e,drivers:"Yes",drivers__items:[...n,...o]}}function kk(e){return(e.drivers__items??[]).some(r=>!Db(r))}const Fn={};function Tk(e){let t=Fn[e];return t||(t=new Set,Fn[e]=t),t}function Cb(e,t){Tk(e).add(t)}function wb(e,t){Fn[e]?.delete(t)}function Sr(e,...t){const r=Fn[e];if(!r||r.size===0)return;const n=t[0],a={quoteId:ui(),timestamp:Date.now()};for(const o of[...r])try{o(n,a)}catch(i){za(i,{tags:{source:"widget-event-listener",event:e}})}}function Pk(){for(const e of Object.keys(Fn))delete Fn[e]}function Ik(){Sr("widgetOpened")}function Mk(){Sr("widgetClosed")}function Fk(e){Sr("stageViewed",e)}function xb(e){Sr("stageCompleted",e)}function Ok(){Sr("flowCompleted")}function Bk(e){Sr("ratesViewed",e)}function Lk(){Sr("ratesBack")}function xa(e){Sr("submissionFailed",e)}const $b=new Set(["Disabled","Retired","Unemployed","Other"]);function Rk(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,a=t.employment_industry,o=String(n??a??"").trim();return!$b.has(o)}function Nk(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,a=t.employment_industry,o=String(n??a??"").trim();return!$b.has(o)}function Ab(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function Al(e,t){return Ab(e)?"Yes":t}function kb(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Tb(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function Pb(e,t){const r=kb(e),n=kb(t);if(r!=null&&n!=null)return r-n;const a=Tb(e),o=Tb(t);return a!=null&&o!=null?a-o:e==null||t==null?null:String(e).localeCompare(String(t))}function Uk(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function kl(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Pb(e,r);return n!=null&&n<0}case"greaterThan":{const n=Pb(e,r);return n!=null&&n>0}case"contains":return Uk(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}const Hk=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Vk(e){return String(e??"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function gi(e,t,r){const n=Xu([...e]),a=hl(n),o=[],i=s=>{s.forEach(u=>{if(!ii(u,t,a)||!Rk(u,t)||!oi(u,t,r))return;const l=String(u.key);if(Jo(l,r,t)){const g=a.currentCarrierKey?t[a.currentCarrierKey]:void 0;if(!(g&&g!=="NoPriorInsurance"&&va(t,a)&&Hk.has(l)))return}Ab(u)||o.push(u);const c=Al(u,t[l]),f=u.conditionals??[];if(!f.length)return;const p=f.filter(g=>kl(c,g.conditionalType,g.conditionalValue));(p.length>1&&!p.some(g=>g.conditionalQuestionsAllowMultiple)?p.slice(0,1):p).forEach(g=>{const y=g.conditionalQuestions??[];y.length&&(g.conditionalQuestionsAllowMultiple||i(y))})})};return i(n),o}const Ib="__items",yi=e=>`${e}${Ib}`;function zk(e,t){if(e.key==="relationship_to_insured"||e.key==="is_registered_owner"){const r=t[t.length-1];return typeof r=="number"&&r===0}return!1}function bi(e,t,r,n=[],a=void 0,o=t){for(const i of e){const s=String(i.key),u=Al(i,t[s]),l=i.conditionals??[];if(!l.length)continue;const c=l.filter(p=>kl(u,p.conditionalType,p.conditionalValue)),f=c.length>1&&!c.some(p=>p.conditionalQuestionsAllowMultiple)?c.slice(0,1):c;for(const p of f){const h=p.conditionalQuestions??[];if(!h.length)continue;if(!p.conditionalQuestionsAllowMultiple){bi(h,t,r,n,a,o);continue}if(Jo(s,a,o))continue;const g=t[yi(s)]??[];if(g.length===0){r.push({groupKey:s,index:-1,fieldKey:"",fieldLabel:"",message:"At least one entry is required"});continue}for(const[y,_]of g.entries()){const D=[...n,yi(s),y],w=gi(h,_,a).filter(k=>!(zk(k,D)||!Nk(k,_))),b={state:o.state,..._},C=_a(w,b),v=new Map(w.map((k,I)=>[br(k,I),k.question??""]));for(const[k,I]of Object.entries(C))I&&r.push({groupKey:s,index:y,fieldKey:k,fieldLabel:v.get(k)??k,message:I});bi(h,_,r,D,a,o)}}}}function jk(e,t,r){const n=[];return bi(e,t,n,[],r,t),n}function Zk(e,t,r){const n=[];return bi(e,t,n,[],r,t),n.length>0}function Tl(e,t,r,n){for(const a of e){const o=String(a.key),i=Al(a,t[o]),s=a.conditionals??[];if(!s.length)continue;const u=s.filter(c=>kl(i,c.conditionalType,c.conditionalValue)),l=u.length>1&&!u.some(c=>c.conditionalQuestionsAllowMultiple)?u.slice(0,1):u;for(const c of l){const f=c.conditionalQuestions??[];if(!f.length)continue;if(!c.conditionalQuestionsAllowMultiple){Tl(f,t,r,n);continue}if(Jo(o,r,t))continue;const p=t[yi(o)]??[];for(const[h,g]of p.entries())typeof g!="object"||g===null||(n(gi(f,g,r),g,{groupKey:o,index:h}),Tl(f,g,r,n))}}}function Mb(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(Lt(r.vehicle_comp_deductible,"select")||Lt(r.vehicle_coll_deductible,"select")||Lt(r.vehicle_towing_and_labor,"select")||Lt(r.vehicle_transportation_expense,"select"))return!0;return!1}function Fb({targetStage:e,stageKey:t,quoteId:r,fetchSuggestions:n,peekSuggestions:a,applySelection:o,dismissSelection:i,mergeItems:s,setAllValues:u,shouldSkip:l}){const[c,f]=d.useState(null),[p,h]=d.useState(!1),[g,y]=d.useState(!1),_=d.useRef(new Set);return d.useEffect(()=>{if(t!==e||!r||_.current.has(r))return;if(l?.()){_.current.add(r);return}const b=a(r);if(b!==void 0){b.length>0?f(b):_.current.add(r);return}let C=!1;return y(!0),n(r).then(v=>{v.length===0&&_.current.add(r),!C&&v.length>0&&f(v)}).catch(()=>{_.current.add(r)}).finally(()=>{C||y(!1)}),()=>{C=!0,y(!1)}},[t,r,e]),{suggestions:c,isApplying:p,isPending:g,handleApply:async b=>{if(r){h(!0);try{const{items:C}=await o(r,b);C.length>0&&u(v=>s(v,C))}catch{}finally{_.current.add(r),h(!1),f(null)}}},handleDismiss:()=>{r&&(_.current.add(r),i(r).catch(()=>{})),f(null)}}}function Gk({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:a,quoteId:o,nonTerminalStageKeys:i}){const[s,u]=d.useState(a??0),[l,c]=d.useState(n??{}),[f,p]=d.useState({}),[h,g]=d.useState(!1),[y,_]=d.useState(!1),[D,w]=d.useState(null),[b,C]=d.useState(0),[v,k]=d.useState([]),[I,G]=d.useState(a??0),O=d.useRef({}),Z=d.useRef([]),M=d.useRef(null),X=d.useRef(e),de=Array.isArray(e)&&e.length>0,x=de?Math.min(s,e.length-1):0,z=de?e[x]:null,U=z?.key??null,P=d.useRef(l);P.current=l;const K=Fb({targetStage:"Vehicle",stageKey:U,quoteId:o,fetchSuggestions:bk,peekSuggestions:_k,applySelection:KA,dismissSelection:YA,mergeItems:xk,setAllValues:c}),$=Fb({targetStage:"Driver",stageKey:U,quoteId:o,fetchSuggestions:Ek,peekSuggestions:Dk,applySelection:XA,dismissSelection:WA,mergeItems:Ak,setAllValues:c,shouldSkip:()=>kk(P.current)}),T=U==="Vehicle"&&K.isPending||U==="Driver"&&$.isPending;d.useEffect(()=>{a!==void 0&&(u(a),G(V=>Math.max(V,a)))},[a]),X.current=e;const Y=d.useMemo(()=>{const V=x>=e.length-1;return V&&U&&i?.has(U)?!1:!!(V||e.slice(x+1).every(ve=>ve.key==="AutoPolicy")&&(l.drivers__items??[]).length<=1)},[x,e,l,U,i]);d.useEffect(()=>{de&&s>=e.length&&u(e.length-1)},[s,e.length,de]),d.useEffect(()=>{C(0),k([])},[U]),d.useEffect(()=>{const V=Z.current[x];V&&V.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[x]),d.useEffect(()=>{n!==void 0&&c(n)},[n]),d.useEffect(()=>{if(!z||!U){g(!1),w(null);return}if(f[U]){g(!1),w(null);return}let V=!1;return g(!0),w(null),Promise.resolve(z.loadQuestions()).then(ue=>{if(!V){if(!Array.isArray(ue))throw new Error(`loadQuestions("${U}") did not return an array`);p(ve=>({...ve,[U]:ue}))}}).catch(ue=>{V||w(`Failed to load stage "${z?.title??""}": ${ue?.message??"Unknown error"}`)}).finally(()=>{V||g(!1)}),()=>{V=!0}},[z,U,f]);const se=U?f[U]:void 0,te=d.useMemo(()=>hl(Xu(se??[])),[se]);d.useEffect(()=>{z&&U&&se&&Fk({stageKey:U,stageTitle:z.title??U,stepIndex:s+1,totalSteps:e.length})},[U,s,e.length,z,se]);const H=d.useMemo(()=>{if(!se)return{};const V={};(N=>{const ne=[],L=J=>{J.forEach((W,ie)=>{const oe=br(W,ie);ne.push(oe);const ce=yi(oe);ne.push(ce),(W.conditionals??[]).forEach(R=>{const re=R.conditionalQuestions??[];re.length>0&&L(re)})})};return L(N),ne})(se).forEach(N=>{N in l&&(V[N]=l[N])});for(const N of["state","State","address","product"])N in l&&(V[N]=l[N]);for(const[N,ne]of Object.entries(l))N.endsWith(Ib)&&!(N in V)&&(V[N]=ne);return V},[se,l]),Q=V=>{c(ue=>({...ue,...V}))},A=()=>{u(V=>V>0?V-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},S=V=>{V<0||V>=e.length||V>I||V===x||(u(V),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"}))},E=async()=>{if(!se||!z||h||D||y||T)return;const V=gi(se,H,U??void 0),ue=Ea(l,te),ve=V.map(ee=>si(ee,te)?{...ee,required:ue}:ee),N=_a(ve,H),ne=new Set(ve.map((ee,le)=>br(ee,le))),L=Object.entries(N).some(([ee,le])=>le&&ne.has(ee)),J=Zk(se,l,U??void 0),ie=V.some(ee=>String(ee.key??"")==="vehicle_policy_selections")?Mb(l):!1,oe=l.driver_vehicle_assignments,ce=l.drivers__items??[];let F=!1;if(oe&&ce.length>=2){const ee=l.vehicles__items??[];for(let le=0;le<ee.length;le++){const fe=oe[`v${le}`];if(!fe)continue;const pe=ce.map((be,Pe)=>fe[`d${Pe}`]??0),De=pe.filter(be=>be>0);if(De.length>=2&&De.every(be=>be===50)){F=!0;break}const _e=pe.reduce((be,Pe)=>be+Pe,0);if(_e>0&&_e!==100){F=!0;break}}}if(L||J||ie||F){const ee=new Map(ve.map((pe,De)=>[br(pe,De),pe])),fe=[...Object.entries(N).filter(([pe,De])=>!!De&&ne.has(pe)).map(([pe,De])=>{const _e=De,be=ee.get(pe)?.question;return _e==="Required"&&be?`${be} is required`:_e}),J?"Complete all required repeated entries before continuing.":null,ie?"Complete the vehicle policy selections before continuing.":null,F?"Driver usage percentages must be valid before continuing.":null].filter(pe=>!!pe);C(pe=>pe+1),k(fe.length>0?fe:["Review the highlighted fields before continuing."]),window.setTimeout(()=>{M.current?.focus()},0);return}k([]);const R=JSON.stringify(H);if(!Y&&x<I&&O.current[U??""]===R){u(ee=>Math.min(ee+1,e.length-1)),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"});return}_(!0);try{const ee=Y,le=ee?await r(l,U??""):await t(H,U??""),{success:fe,error:pe}=le;if(!fe){w(pe??"An error occurred");return}if(!ee){const De=le.latestStages??X.current,_e=De.findIndex(Pe=>Pe.key===U),be=_e>=0?Math.min(_e+1,De.length-1):Math.min(s+1,De.length-1);O.current[U??""]=R,G(Pe=>Math.max(Pe,be)),u(be)}}finally{_(!1)}},j=d.useMemo(()=>!!(!se||h||D||y||T),[se,h,D,y,T]),q=e.length>0?(x+1)/e.length*100:0,ae=Vk(U??"unknown-stage");return de?m.jsxs("div",{className:`form-wizard-shell form-wizard-shell--${ae}`,"data-stage-key":U??void 0,children:[U==="Vehicle"&&K.suggestions&&K.suggestions.length>0&&m.jsx(bb,{title:"Select your vehicles",description:"We found the vehicles below at your address. Select the ones you'd like to add to your quote, or add them manually.",applyLabel:"Add selected vehicles",dismissLabel:"Add manually",alreadyOnApplicationNote:"* This vehicle is already on the application; selecting it will fill in available data that does not exist on the application.",suggestions:K.suggestions,isApplying:K.isApplying,onApply:K.handleApply,onDismiss:K.handleDismiss}),U==="Driver"&&$.suggestions&&$.suggestions.length>0&&m.jsx(bb,{title:"Additional drivers",description:"We found the drivers below at your address. Select the ones you'd like to add to your quote, or add them manually.",applyLabel:"Add selected drivers",dismissLabel:"Add manually",alreadyOnApplicationNote:"* This driver is already on the application; selecting them will fill in available data that does not exist on the application.",suggestions:$.suggestions,isApplying:$.isApplying,onApply:$.handleApply,onDismiss:$.handleDismiss}),m.jsx("div",{className:`form-wizard-steps-header form-wizard-steps-header--${ae}`,children:m.jsx("div",{className:"form-wizard-steps-scroll",children:m.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},tabIndex:0,"aria-label":"Quote steps",children:e.flatMap((V,ue)=>[m.jsx("li",{ref:ve=>{Z.current[ue]=ve},className:"flex-shrink-0",children:m.jsx("button",{type:"button",className:"form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap","data-step-state":ue<x?"complete":ue===x?"current":"upcoming",onClick:()=>S(ue),disabled:ue>I,"aria-current":ue===x?"step":void 0,"aria-label":`${V.title}, step ${ue+1} of ${e.length}${ue>I?", not available yet":""}`,children:V.title})},V.key??`stage-${ue}`),...ue<e.length-1?[m.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0","aria-hidden":"true",children:"›"},`arrow-${V.key??ue}`)]:[]])})})}),m.jsxs("div",{className:`form-wizard-card form-wizard-card--${ae}`,style:{"--form-wizard-progress":`${q}%`},children:[m.jsxs("div",{className:`form-wizard-content form-wizard-content--${ae}`,children:[h&&m.jsx("div",{className:"text-slate-500",role:"status","aria-live":"polite",children:"Loading…"}),T&&m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",role:"status","aria-live":"polite",children:[m.jsxs("svg",{className:"animate-spin h-8 w-8 text-blue-600 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),m.jsx("div",{className:"text-text-primary font-semibold",children:U==="Driver"?"Looking up additional drivers at your address…":"Looking up vehicles at your address…"}),m.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"This can take a few moments."})]}),!T&&v.length>0&&m.jsxs("div",{ref:M,className:"mb-4 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",role:"alert",tabIndex:-1,children:[m.jsx("p",{className:"font-semibold",children:"Please fix the following before continuing:"}),m.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:v.map((V,ue)=>m.jsx("li",{children:V},`${V}-${ue}`))})]}),z&&!T&&m.jsx(yb,{questions:se??[],controlledValues:H,onChangeValues:Q,onSubmit:()=>E(),quoteId:o,widgetStageKey:U??void 0,validationAttempt:b},z.key),!h&&D&&m.jsxs("div",{className:"text-red-600 text-sm -mt-4",role:"alert",children:[m.jsx("div",{children:D}),z&&m.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{p(V=>{if(!U)return V;const ue={...V};return delete ue[U],ue})},children:"Retry"})]}),m.jsx(vb,{stageKey:U})]}),m.jsxs("div",{className:x>0?"form-wizard-actions grid grid-cols-2 gap-3":"form-wizard-actions",children:[x>0&&m.jsx("button",{type:"button",onClick:A,disabled:h,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),m.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:E,disabled:j,className:["form-wizard-next-btn",x>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",j?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[y&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Y?"Finish":"Next"]})]})]})]}):m.jsx("div",{className:"text-slate-600",children:"Loading..."})}const Ob={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},Bb=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function qk(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function Lb(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function Jr(e){if(!e)return e;const t=Ob[e];return t?t.name:Lb(e)}function Kk(e){const t=new Set,r=[];return e.forEach((n,a)=>{const i=Ob[n]??{name:Lb(n),abbr:qk(n),color:Bb[a%Bb.length]};t.has(i.name)||(t.add(i.name),r.push(i))}),r}function Yk(e,t){if(!e)return[];const r=[];return(t==="Auto"||t==="Bundle")&&Array.isArray(e.PersonalAuto)&&r.push(...e.PersonalAuto),(t==="Home"||t==="Bundle")&&Array.isArray(e.PersonalHome)&&r.push(...e.PersonalHome),Kk(r)}const Qk="https://getcredify.com/privacy-policy";function Xk({acknowledged:e,onChange:t,disabled:r=!1}){return m.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:m.jsx(Yr,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:m.jsxs(m.Fragment,{children:["I acknowledge I have received Credify’s"," ",m.jsx("a",{href:Qk,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function Wk({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:a,onCancel:o,onProceed:i,isProcessing:s,hasError:u}){const l=!n||s;return m.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[m.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),m.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&m.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),m.jsx("p",{className:"font-semibold text-slate-900",children:e}),m.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,m.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),m.jsx("div",{className:"mt-4",children:m.jsx(Xk,{acknowledged:n,onChange:a,disabled:s})}),u&&m.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),m.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[m.jsx("button",{type:"button","data-testid":"bind-confirmation-cancel",onClick:o,disabled:s,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),m.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:i,disabled:l,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",l?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[s&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),s?"Processing…":"Proceed"]})]})]})}const Rb=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function Nb(e){const t=Number.isFinite(e.term_months)&&e.term_months>0?e.term_months:1;return e.monthly_premium_cents!=null?e.monthly_premium_cents:Math.round((e.premium_cents||0)/t)}const _i={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},vi=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function Jk(e){if(e.length===0)return[];const t=(n,a)=>Jr(n.carrier_name).localeCompare(Jr(a.carrier_name));if(!e.some(n=>n.lob))return[{lob:null,title:"Not Quoted",rates:[...e].sort(t)}];const r=new Map;for(const n of e){const a=n.lob||"_other",o=r.get(a);o?o.push(n):r.set(a,[n])}return[...r.entries()].sort(([n],[a])=>{const o=vi.indexOf(n),i=vi.indexOf(a);return(o===-1?999:o)-(i===-1?999:i)}).map(([n,a])=>({lob:n,title:_i[n]??n,rates:[...a].sort(t)}))}const Jt={admitted:{tab:"rates-tab-admitted",panel:"rates-panel-admitted"},non_admitted:{tab:"rates-tab-non-admitted",panel:"rates-panel-non-admitted"},not_quoted:{tab:"rates-tab-not-quoted",panel:"rates-panel-not-quoted"}};function Ub({onBack:e}){const t=()=>{Lk(),e?.()};return m.jsx("button",{type:"button",onClick:t,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function eT({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:a=!0,className:o}){const i=Nb(e)/100,s=Rb.format(i),u=t==="loading",l=t==="success",c=!!n||u||l,f=!!(e.effective_date&&e.policy_end_date),p=e.lob?_i[e.lob]||e.lob:null,h=(e.coverages??[]).filter(g=>!!g&&typeof g.label=="string"&&g.label.trim()!==""&&typeof g.value=="string"&&g.value.trim()!=="");return m.jsxs("div",{className:`flex h-full w-full flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md${o?` ${o}`:""}`,children:[a&&p&&m.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:p}),m.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?m.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:Jr(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:Jr(e.carrier_name).charAt(0).toUpperCase()}),m.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:Jr(e.carrier_name)})]}),m.jsx("div",{className:"mb-2",children:m.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[s,m.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&m.jsx("div",{className:"mb-2",children:m.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&m.jsx("div",{className:"mb-4",children:m.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),h.length>0&&m.jsx("div",{className:"mb-2 border-t border-slate-200 pt-3",children:m.jsx("dl",{children:h.map((g,y)=>m.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-1",children:[m.jsx("dt",{className:"text-xs text-slate-600",children:g.label}),m.jsx("dd",{className:"text-right text-xs font-semibold text-slate-900",children:g.value})]},`${g.label}-${y}`))})}),m.jsxs("div",{className:"mt-auto pt-4",children:[m.jsx("button",{type:"button",onClick:r,disabled:c,className:`rates-bind-btn w-full cursor-pointer rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 disabled:cursor-not-allowed ${l?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:u?"Requesting…":l?"Requested":"Request Bind"}),t==="error"&&m.jsx("p",{className:"mt-2 text-xs text-red-600",role:"alert",children:"Something went wrong. Please try again."}),t==="success"&&m.jsx("p",{className:"mt-2 text-xs text-emerald-600",role:"status","aria-live":"polite",children:"We received your bind request."})]})]})}function tT({item:e}){const t=Jr(e.carrier_name),r=(e.decline_reasons??[]).filter(Boolean);return m.jsxs("div",{className:"flex w-full gap-4 rounded-xl border border-slate-200 bg-white p-4 shadow-sm",children:[m.jsx("div",{className:"shrink-0",children:e.carrier_logo_base64?m.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:t,className:"h-10 w-auto max-w-[7rem] object-contain"}):m.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:t.charAt(0).toUpperCase()})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-2",children:m.jsx("h4",{className:"break-words font-semibold text-slate-900",children:t})}),r.length>0?m.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-slate-600",children:r.map((n,a)=>m.jsx("li",{children:n},a))}):m.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"This carrier did not return a quote."})]})]})}function rT({rates:e,onBack:t,isBundleFlow:r=!1,quoteId:n,initialPhone:a="",requirePursueVerification:o=!1,onSubScreenChange:i}){const s=d.useMemo(()=>Array.isArray(e)?e:[],[e]),u=s.length>0,[l,c]=d.useState({}),[f,p]=d.useState("admitted"),[h,g]=d.useState(!1),[y,_]=d.useState(null),[D,w]=d.useState(!1),[b,C]=d.useState(null),[v,k]=d.useState(!1),[I,G]=d.useState(a),[O,Z]=d.useState(""),[M,X]=d.useState("phone"),[de,x]=d.useState("idle"),[z,U]=d.useState(null),P=!!(b||y);d.useEffect(()=>{i?.(P)},[P,i]),d.useEffect(()=>()=>i?.(!1),[i]);const K=d.useMemo(()=>s.some(F=>F.lob==="PersonalAuto"),[s]),$=d.useMemo(()=>s.some(F=>F.lob==="PersonalHome"),[s]),T=d.useMemo(()=>{if(!r)return[];const F=[];return K&&F.push("PersonalAuto"),$&&F.push("PersonalHome"),F},[r,K,$]),Y=d.useMemo(()=>{const F=new Set;for(const R of s){const re=R.lob??null;re&&l[R.quote_rate_id]==="success"&&F.add(re)}return F},[s,l]),se=d.useMemo(()=>Object.values(l).some(F=>F==="success"),[l]),te=d.useMemo(()=>h?!0:!r||T.length===0?se:T.every(F=>Y.has(F)),[h,r,se,T,Y]),H=d.useMemo(()=>u?s.filter(F=>(F.admitted_status??"admitted")==="admitted"):[],[s,u]),Q=d.useMemo(()=>u?s.filter(F=>F.admitted_status==="non_admitted"):[],[s,u]),A=d.useMemo(()=>u?s.filter(F=>F.admitted_status==="not_quoted"):[],[s,u]),S=H.length,E=Q.length,j=A.length,q=S+E>0,ae=q||j>0,V=d.useMemo(()=>Jk(A),[A]);d.useEffect(()=>{ae&&f==="admitted"&&S===0&&(E>0?p("non_admitted"):j>0&&p("not_quoted"))},[f,S,E,j,ae]);const ue=d.useMemo(()=>q?f==="admitted"?H:f==="non_admitted"?Q:[]:[],[q,f,H,Q]),ve=F=>{if(F.key!=="ArrowLeft"&&F.key!=="ArrowRight"&&F.key!=="Home"&&F.key!=="End")return;F.preventDefault();const R=F.key==="Home"?"admitted":F.key==="End"||f==="admitted"?"non_admitted":"admitted";p(R),window.setTimeout(()=>document.getElementById(Jt[R].tab)?.focus(),0)};d.useEffect(()=>{di()},[]),d.useEffect(()=>{!te||h||(SA(),rb(),g(!0))},[te,h]);const N=d.useMemo(()=>{if(ue.length===0)return[];if(!ue.some(ee=>ee.lob))return[{lob:null,title:"Rates",rates:[...ue].sort((le,fe)=>{const pe=Number.isFinite(le.term_months)&&le.term_months>0?le.term_months:1,De=Number.isFinite(fe.term_months)&&fe.term_months>0?fe.term_months:1,_e=le.monthly_premium_cents??Math.round((le.premium_cents||0)/pe),be=fe.monthly_premium_cents??Math.round((fe.premium_cents||0)/De);return _e-be})}];const R=new Map;for(const ee of ue){const le=ee.lob||"_other",fe=R.get(le);fe?fe.push(ee):R.set(le,[ee])}return[...R.entries()].sort(([ee],[le])=>{const fe=vi.indexOf(ee),pe=vi.indexOf(le);return(fe===-1?999:fe)-(pe===-1?999:pe)}).map(([ee,le])=>({lob:ee,title:_i[ee]??ee,rates:[...le].sort((fe,pe)=>{const De=Number.isFinite(fe.term_months)&&fe.term_months>0?fe.term_months:1,_e=Number.isFinite(pe.term_months)&&pe.term_months>0?pe.term_months:1,be=fe.monthly_premium_cents??Math.round((fe.premium_cents||0)/De),Pe=pe.monthly_premium_cents??Math.round((pe.premium_cents||0)/_e);return be-Pe})}))},[ue]),ne=d.useMemo(()=>{if(!r)return[];const F=s.some(ee=>ee.lob==="PersonalAuto"),R=s.some(ee=>ee.lob==="PersonalHome"),re=[];return F||re.push("Sorry, no rates found for Personal Auto."),R||re.push("Sorry, no rates found for Homeowners."),re},[r,s]);if(!ae)return m.jsxs("section",{className:"mt-8",children:[m.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),m.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&m.jsx(Ub,{onBack:t})]});const L=F=>{if(c(R=>({...R,[F.quote_rate_id]:"idle"})),w(!1),di(),!v&&(o||!Wt())){G(a),Z(""),X("phone"),x("idle"),U(null),C({cardKey:F.quote_rate_id,rate:F});return}_({cardKey:F.quote_rate_id,rate:F})},J=()=>{_(null),w(!1)},W=()=>{C(null),U(null),x("idle")},ie=async()=>{if(!b||!n)return;const F=I.trim();if(!F){U("Please enter your phone number.");return}x("sending"),U(null);try{await nb(n,F),X("code"),x("sent")}catch(R){const re=R;if(x("idle"),re?.message==="sms_rate_limited"){const ee=re.retryAfterSeconds??60;X("code"),U(`We just sent a code to that number. You can request another in ${ee} second${ee===1?"":"s"}.`);return}U("We could not send a code to that number. Please check it and try again.")}},oe=async()=>{if(!b||!n)return;const F=O.trim();if(!F){U("Please enter the code we texted you.");return}x("verifying"),U(null);try{const{isVerified:R,token:re,code:ee}=await _l(n,F);if(!R||!re){x("sent"),U(ee==="OTP_EXPIRED"?"That code has expired. Request a new one and try again.":"That code was incorrect. Please try again.");return}ci(re);const le=b;k(!0),C(null),x("idle"),_(le)}catch(R){const re=R;if(x("sent"),re?.message==="too_many_attempts"){U("Too many incorrect attempts. Request a new code to try again.");return}U("Something went wrong verifying your code. Please try again.")}},ce=async()=>{if(!y||!D)return;const F=y.cardKey;c(R=>({...R,[F]:"loading"}));try{if(di(),!Wt())throw new Error("Authentication required. Please verify your phone number first.");if(!((await JA(F,!0))?.success!==!1))throw new Error("Request failed");c(le=>({...le,[F]:"success"})),_(null),w(!1)}catch{c(R=>({...R,[F]:"error"}))}};if(b){const F=de==="sending"||de==="verifying",R=["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",F?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),re="credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed";return m.jsx("section",{className:"mt-8",children:M==="phone"?m.jsxs(m.Fragment,{children:[m.jsx(pd,{id:"phone",label:"What is your phone number?",value:I,onChange:ee=>G(ee.currentTarget.value),error:z??void 0}),m.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[m.jsx("p",{children:"We'll text you a 6-digit code to confirm your number. This is just to confirm your number, not a sales call."}),m.jsx("p",{children:"Message & data rates may apply. One message per request."}),m.jsxs("p",{children:["See our"," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]}),m.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[m.jsx("button",{type:"button",onClick:W,className:re,children:"Back to rates"}),m.jsx("button",{type:"button",onClick:ie,disabled:F,className:R,children:de==="sending"?"Sending…":"Send code"})]})]}):m.jsxs(m.Fragment,{children:[m.jsx(Ya,{id:"sms_code",label:"Please enter the code we sent to your phone number.",value:O,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,autoComplete:"one-time-code",onChange:ee=>Z(ee.currentTarget.value.replace(/\D+/g,"").slice(0,6)),error:z??void 0}),m.jsx(vb,{stageKey:"SMSVerification"}),m.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[m.jsx("button",{type:"button",onClick:()=>{X("phone"),U(null)},className:re,children:"Change number"}),m.jsx("button",{type:"button",onClick:oe,disabled:F,className:R,children:de==="verifying"?"Verifying…":"Verify & continue"})]})]})})}if(y){const F=y.rate.lob?_i[y.rate.lob]||y.rate.lob:null;return m.jsx("section",{className:"mt-8",children:m.jsx(Wk,{carrierName:Jr(y.rate.carrier_name),formattedPremium:Rb.format(Nb(y.rate)/100),lobLabel:F,acknowledged:D,onAcknowledgeChange:w,onCancel:J,onProceed:ce,isProcessing:l[y.cardKey]==="loading",hasError:l[y.cardKey]==="error"})})}return m.jsxs("section",{className:"mt-8",children:[m.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),ne.length>0&&m.jsx("div",{className:"mt-3 space-y-1",children:ne.map(F=>m.jsx("p",{className:"text-sm text-slate-600",children:F},F))}),m.jsx("div",{className:"mt-4 border-b border-slate-200",children:m.jsxs("div",{className:"flex items-center gap-6",role:"tablist","aria-label":"Rate market type",children:[m.jsxs("button",{id:Jt.admitted.tab,type:"button",role:"tab","aria-selected":f==="admitted","aria-controls":Jt.admitted.panel,onClick:()=>p("admitted"),onKeyDown:ve,className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${f==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",S,")"]}),m.jsxs("button",{id:Jt.non_admitted.tab,type:"button",role:"tab","aria-selected":f==="non_admitted","aria-controls":Jt.non_admitted.panel,onClick:()=>p("non_admitted"),onKeyDown:ve,className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${f==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",E,")"]}),j>0&&m.jsxs("button",{id:Jt.not_quoted.tab,type:"button",role:"tab","aria-selected":f==="not_quoted","aria-controls":Jt.not_quoted.panel,onClick:()=>p("not_quoted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${f==="not_quoted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Not Quoted (",j,")"]})]})}),m.jsx("div",{id:Jt[f].panel,role:"tabpanel","aria-labelledby":Jt[f].tab,tabIndex:0,children:f==="not_quoted"?V.map(F=>m.jsxs("div",{className:"mt-6",children:[F.lob!=null&&m.jsx("h4",{className:"mb-3 text-center text-base font-semibold text-slate-800",children:F.title}),m.jsx("div",{className:"space-y-3",children:F.rates.map(R=>m.jsx(tT,{item:R},R.quote_rate_id))})]},F.lob??"all")):m.jsxs(m.Fragment,{children:[ue.length===0&&m.jsx("p",{className:"mt-4 text-sm text-slate-500",children:f==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),ue.length>0&&N.map(F=>m.jsxs("div",{className:"mt-6",children:[m.jsx("h4",{className:"mb-3 text-center text-base font-semibold text-slate-800",children:F.title}),m.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:F.rates.map(R=>m.jsx("div",{className:"w-full min-w-0 sm:w-[calc(50%-0.5rem)] lg:w-[calc(33.333%-0.667rem)] xl:w-[calc(25%-0.75rem)]",children:m.jsx(eT,{rate:R,showLobLabel:F.lob==null,status:l[R.quote_rate_id]??"idle",disabled:te||(r?!!(R.lob&&T.includes(R.lob)&&Y.has(R.lob)):se),onRequestBind:()=>L(R)})},R.quote_rate_id))})]},F.lob??"all"))]})}),t&&m.jsx(Ub,{onBack:t})]})}function nT({stageKey:e,title:t,questions:r,values:n,onChangeValues:a,review:o,quoteId:i,fetchVehicleOptions:s}){const u=d.useMemo(()=>new Set(Object.keys(o.errorsByKey)),[o.errorsByKey]);return m.jsxs("section",{id:`review-section-${e}`,"data-testid":`review-section-${e}`,className:`review-section rounded-lg border p-4 ${o.hasIssues?"border-amber-300 bg-amber-50/40":"border-slate-200"}`,children:[m.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[m.jsx("h3",{className:"text-base font-semibold text-text-primary",children:t}),o.hasIssues?m.jsxs("span",{"data-testid":`review-section-${e}-badge`,className:"shrink-0 rounded-full bg-amber-100 border border-amber-300 text-amber-800 text-xs font-semibold px-2.5 py-1",children:[o.issues.length," ",o.issues.length===1?"field needs":"fields need"," attention"]}):m.jsx("svg",{"data-testid":`review-section-${e}-ok`,className:"h-5 w-5 shrink-0 text-emerald-600",viewBox:"0 0 20 20",fill:"currentColor",role:"img","aria-label":"Section complete",children:m.jsx("path",{fillRule:"evenodd",d:"M16.704 5.29a1 1 0 010 1.415l-7.5 7.5a1 1 0 01-1.415 0l-3.5-3.5a1 1 0 011.415-1.415l2.792 2.793 6.793-6.793a1 1 0 011.415 0z",clipRule:"evenodd"})})]}),o.hasIssues&&m.jsx("ul",{className:"mb-3 list-disc list-inside space-y-0.5 text-sm text-amber-800","data-testid":`review-section-${e}-issues`,children:o.issues.map(l=>m.jsxs("li",{children:[l.label,": ",l.message]},l.key))}),m.jsx(yb,{questions:r,controlledValues:n,onChangeValues:a,onSubmit:()=>{},quoteId:i,widgetStageKey:e,invalidValueKeys:u,fetchVehicleOptions:s})]})}const Hb=new Set(["make","model","body_style","occupation","co_applicant_occupation","quote_vehicle_id"]),Vb={vehicles:"Vehicle",drivers:"Driver",driver_accidents:"Accident",driver_violations:"Violation",losses:"Loss",home_losses:"Loss"};function zb(e){const t=e.options;return Array.isArray(t)?t.map(r=>r&&typeof r=="object"&&"value"in r?String(r.value):String(r)):[]}const aT=new Set(["SMSVerification","CanopyConnect","Phone"]);function oT({stageKey:e,questions:t,values:r}){const n=gi(t,r,e),a=_a(n,r),o=new Map(n.map((l,c)=>[br(l,c),l])),i={},s=[];for(const[l,c]of Object.entries(a))!c||!o.has(l)||(i[l]=c,s.push({key:l,label:o.get(l)?.question??l,message:c}));n.forEach((l,c)=>{const f=br(l,c);if(i[f]||l.inputType!=="select"&&l.inputType!=="radio"||Hb.has(String(l.key??"")))return;const p=zb(l);if(p.length===0)return;const h=r[f];Lt(h,l.inputType)||p.includes(String(h))||(i[f]="Not a valid option",s.push({key:f,label:l.question??f,message:"Choose a valid option from the list"}))}),Tl(t,r,e,(l,c,f)=>{l.forEach(p=>{if(p.inputType!=="select"&&p.inputType!=="radio")return;const h=String(p.key??"");if(!h||Hb.has(h))return;const g=zb(p);if(g.length===0)return;const y=c[h];if(!Lt(y,p.inputType)&&!g.includes(String(y))){const _=Vb[f.groupKey]??f.groupKey,D=`${f.groupKey}__items.${f.index}.${h}`;i[D]="Not a valid option",s.push({key:D,label:`${_} ${f.index+1} — ${p.question??h}`,message:"Choose a valid option from the list"})}})});for(const l of jk(t,r,e)){const c=Vb[l.groupKey]??l.groupKey;if(l.index<0){s.push({key:`${l.groupKey}__missing`,label:c,message:"Add at least one entry"});continue}const f=`${l.groupKey}__items.${l.index}.${l.fieldKey}`;if(i[f])continue;i[f]=l.message;const p=l.fieldLabel?`${c} ${l.index+1} — ${l.fieldLabel}`:`${c} ${l.index+1}`;s.push({key:f,label:p,message:l.message})}if(n.some(l=>String(l.key??"")==="vehicle_policy_selections")&&Mb(r)&&s.push({key:"__vehicle_policy",label:"Vehicle coverage selections",message:"Coverage selections are incomplete"}),cT(r,n)&&s.push({key:"__dva",label:"Driver usage",message:"Driver usage percentages must total 100% (50/50 is not allowed)"}),n.some(l=>l.inputType==="address"&&String(l.key??"")==="address")){const l=lT(r);l&&s.push(l)}return{stageKey:e,errorsByKey:i,issues:s,hasIssues:s.length>0}}async function iT(e,t){const r=e.vehicles__items??[];if(!Array.isArray(r)||r.length===0)return[];const n=[];for(const[a,o]of r.entries()){if(typeof o!="object"||o===null)continue;const i=Number(o.year),s=typeof o.make=="string"?o.make.trim():"",u=typeof o.model=="string"?o.model.trim():"",l=typeof o.body_style=="string"?o.body_style.trim():"";if(!(!Number.isFinite(i)||!i||!s))try{const{makes:c}=await t({year:i});if(Array.isArray(c)&&c.length>0&&!c.includes(s)){n.push({key:`vehicles__items.${a}.make`,label:`Vehicle ${a+1} — Make`,message:`"${s}" isn't available for ${i} — choose the make from the list`});continue}if(!u)continue;const{models:f}=await t({year:i,make:s});if(Array.isArray(f)&&f.length>0&&!f.includes(u)){n.push({key:`vehicles__items.${a}.model`,label:`Vehicle ${a+1} — Model`,message:`"${u}" isn't a listed model for the ${i} ${s} — choose the model from the list`});continue}if(!l)continue;const{bodyStyles:p}=await t({year:i,make:s,model:u});Array.isArray(p)&&p.length>0&&!p.includes(l)&&n.push({key:`vehicles__items.${a}.body_style`,label:`Vehicle ${a+1} — Body style`,message:"Choose the body style from the list"})}catch{}}return n}const sT=/^[A-Z]{2}$/,uT=/^\d{5}(-\d{4})?$/;function lT(e){if(!(typeof e.address=="string"?e.address.trim():""))return null;const r=typeof e.state=="string"?e.state.trim().toUpperCase():"",n=e.postal_code==null?"":String(e.postal_code).trim();return sT.test(r)&&uT.test(n)?null:{key:"__address",label:"Property address",message:"Select your address from the dropdown suggestions so we can verify the state and ZIP code"}}function cT(e,t){if(!t.some(o=>String(o.key??"")==="driver_vehicle_assignments"||String(o.key??"")==="vehicle_policy_selections"))return!1;const r=e.driver_vehicle_assignments,n=e.drivers__items??[];if(!r||n.length<2)return!1;const a=e.vehicles__items??[];for(let o=0;o<a.length;o++){const i=r[`v${o}`];if(!i)continue;const s=n.map((c,f)=>i[`d${f}`]??0),u=s.filter(c=>c>0);if(u.length>=2&&u.every(c=>c===50))return!0;const l=s.reduce((c,f)=>c+f,0);if(l>0&&l!==100)return!0}return!1}function en(e){const t={},r=l=>{if(typeof l=="string"){if(l==="Yes")return!0;if(l==="No")return!1}return l},n=Object.keys(e).filter(l=>!l.includes("__items")),a=new Set,o=new Set;for(const[l,c]of Object.entries(e))if(l.endsWith("__items")&&Array.isArray(c)){const f=l.replace("__items","");o.add(f),n.includes(f)&&c.forEach(p=>{typeof p=="object"&&p!==null&&Object.keys(p).forEach(h=>{a.add(h)})})}for(const[l,c]of Object.entries(e))if(l.endsWith("__items")){const f=l.replace("__items","");if(n.includes(f)){const h=Array.isArray(c)?c.map(g=>en(g)):c;t[f]=h}}else if(!l.includes("__items")){if(o.has(l))continue;a.has(l)||(t[l]=r(c))}const i=t.auto_prior_carrier_name;if(typeof i=="string"&&i.trim()!==""){const l=i==="NoPriorInsurance";t.auto_has_prior_insurance=!l,l&&(delete t.auto_prior_years,delete t.auto_prior_months,delete t.auto_prior_expiration_date,delete t.auto_prior_liability_limit,delete t.auto_continuous_coverage_years,delete t.auto_cancelled_declined_refused_to_renew,delete t.auto_current_annual_premium_cents)}const s=t.home_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const l=s==="NoPriorInsurance";t.home_has_prior_insurance=!l,l&&(delete t.home_prior_years,delete t.home_continuous_coverage_years,delete t.home_prior_expiration_date,delete t.property_insurance_cancelled)}Array.isArray(t.drivers)&&(t.drivers=t.drivers.map(l=>{if(!l||typeof l!="object")return l;const c={...l};return c.industry=ai(c.industry),c.education_level=By(c.education_level),c.occupation=Ly(c.occupation),c}));const u=21474836;if("sale_price_cents"in t){const l=t.sale_price_cents;if(typeof l=="number"&&Number.isFinite(l)){const c=Math.trunc(l);if(c>=1){const f=Math.min(c,u);t.sale_price_cents=f*100}}}return Array.isArray(t.home_losses)&&(t.home_losses=t.home_losses.map(l=>{if(!l||typeof l!="object")return l;const c=l,f=c.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return c;const p=Math.trunc(f),h=Math.min(Math.max(p,0),u);return{...c,amount_paid_cents:h*100}})),t}const dT={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",PR:"Puerto Rico"};function jb(e){const t=e?.trim().toUpperCase();if(!t)return"your state";const r=dT[t];return r?`${r} (${t})`:"your state"}const fT=1500,mT=800;function pT(e){const t=e.vehicles__items??[];return Array.isArray(t)?t.map(r=>[r?.year,r?.make,r?.model,r?.body_style].map(n=>String(n??"")).join("|")).join(";"):""}function hT({stages:e,initialValues:t,quoteId:r,isSubmitting:n,onConfirmed:a}){const o=d.useMemo(()=>e.filter(Q=>!aT.has(String(Q.key))),[e]),[i,s]=d.useState(t),[u,l]=d.useState({}),[c,f]=d.useState(null),[p,h]=d.useState(!0),[g,y]=d.useState(0),[_,D]=d.useState(!1),[w,b]=d.useState(null),[C,v]=d.useState(!1);d.useEffect(()=>{let Q=!1;return h(!0),f(null),Promise.all(o.map(async A=>{const S=await A.loadQuestions();return[String(A.key),[...S]]})).then(A=>{Q||l(Object.fromEntries(A))}).catch(A=>{Q||f(A instanceof Error?A.message:"Failed to load your review")}).finally(()=>{Q||h(!1)}),()=>{Q=!0}},[o,g]);const k=d.useRef(null),I=d.useRef(!0);d.useEffect(()=>{if(I.current){I.current=!1;return}return k.current&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>{Dr(en(i),!1).catch(Q=>{console.warn("Review autosave failed (will retry on next edit / submit)",Q)})},fT),()=>{k.current&&window.clearTimeout(k.current)}},[i]);const G=d.useCallback(Q=>{s(A=>({...A,...Q}))},[]),O=d.useMemo(()=>{for(const[Q,A]of Object.entries(u))if(A.some(S=>String(S.key??"")==="vehicles"))return Q;return null},[u]),[Z,M]=d.useState([]),[X,de]=d.useState(!1),x=d.useRef(0),z=pT(i),U=d.useRef(new Map),P=d.useRef(Promise.resolve()),K=d.useCallback(Q=>{const A=`${Q.year??""}|${Q.make??""}|${Q.model??""}`,S=U.current,E=S.get(A);if(E)return E;const j=P.current.catch(()=>{}).then(()=>ib({quoteId:r,...Q}));P.current=j.catch(()=>{});const q=j.catch(ae=>{throw S.delete(A),ae});return S.set(A,q),q},[r]);d.useEffect(()=>{if(!O||!z){M([]),de(!1);return}const Q=++x.current;de(!0);const A=window.setTimeout(()=>{iT(i,K).then(S=>{x.current===Q&&M(S)}).finally(()=>{x.current===Q&&de(!1)})},mT);return()=>window.clearTimeout(A)},[O,z,r,K]);const $=d.useMemo(()=>{const Q={};for(const A of o){const S=String(A.key),E=u[S];E&&(Q[S]=oT({stageKey:S,questions:E,values:i}))}if(O&&Q[O]&&Z.length>0){const A=Q[O];Q[O]={...A,errorsByKey:{...A.errorsByKey,...Object.fromEntries(Z.map(S=>[S.key,S.message]))},issues:[...A.issues,...Z],hasIssues:!0}}return Q},[o,u,i,O,Z]),T=d.useMemo(()=>Object.values($).reduce((Q,A)=>Q+A.issues.length,0),[$]),Y=n||C,se=!p&&!c&&T===0&&_&&!Y&&!X,te=d.useCallback(()=>{const Q=o.find(A=>$[String(A.key)]?.hasIssues);Q&&document.getElementById(`review-section-${String(Q.key)}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[o,$]),H=d.useCallback(async()=>{if(se){b(null),v(!0);try{const Q=typeof i.state=="string"?i.state:"";if(Q){const{isSupported:A}=await ab(Q);if(!A){b(`Sorry, Credify Corporation doesn't currently offer insurance in ${jb(Q)}. We're expanding our coverage and hope to serve your state soon.`);return}}await a(i)}catch{b("Oops, something went wrong. Please try again later.")}finally{v(!1)}}},[se,i,a]);return p?m.jsx("div",{className:"flex items-center justify-center py-12","data-testid":"review-loading",children:m.jsx("div",{className:"text-slate-600",children:"Loading your details..."})}):c?m.jsxs("div",{className:"text-red-600 text-sm","data-testid":"review-load-error",children:[m.jsx("div",{children:c}),m.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>y(Q=>Q+1),children:"Retry"})]}):m.jsxs("div",{className:"space-y-6","data-testid":"review-screen",children:[m.jsxs("div",{className:"text-center",children:[m.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:"Review your information"}),m.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Here's what we collected during your conversation. Please review each section, fix anything we got wrong, and fill in anything missing — then confirm below to see your quotes."})]}),T>0&&m.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm text-amber-800",role:"status","data-testid":"review-issue-summary",children:[m.jsxs("span",{children:[T," ",T===1?"field needs":"fields need"," your attention before you can continue."]}),m.jsx("button",{type:"button",onClick:te,className:"shrink-0 font-bold underline text-amber-800 hover:text-amber-900",children:"Show me"})]}),o.map(Q=>{const A=String(Q.key),S=u[A],E=$[A];return!S||!E?null:m.jsx(nT,{stageKey:A,title:Q.title,questions:S,values:i,onChangeValues:G,review:E,quoteId:r,fetchVehicleOptions:K},A)}),m.jsxs("div",{className:"rounded-lg border border-slate-200 p-4 space-y-4","data-testid":"review-consent-block",children:[m.jsx(Yr,{id:"review-terms-checkbox","data-testid":"review-terms-checkbox",checked:_,onChange:Q=>D(Q.target.checked),disabled:n,label:"I have reviewed my information and confirm it is accurate, and I agree to the Terms of Service and Privacy Policy."}),m.jsxs("p",{className:"text-sm text-slate-600",children:["Credify Corporation – Texas #3309669."," ",m.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",m.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),w&&m.jsx("div",{className:"text-red-600 text-sm",role:"alert","data-testid":"review-submit-error",children:w}),m.jsxs("button",{type:"button","data-testid":"review-submit","data-widget-ctrl":"review-submit",onClick:H,disabled:!se,className:["form-wizard-next-btn w-full","h-12 rounded-full text-white font-bold transition","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",se?"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40":"bg-gray-300"].join(" "),children:[Y&&m.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Confirm & See My Quotes"]})]})}const Pl=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],Zb={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Gb={Auto:6e4,Home:9e4,Bundle:12e4};function gT({progress:e,color:t,size:r=80}){const n=(r-10)/2,a=2*Math.PI*n,o=a-e/100*a;return m.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},"aria-hidden":"true",children:[m.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),m.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:t,strokeWidth:6,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:o,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function yT({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:a}){const o=Zb[r]??Zb.Auto,i=Gb[r]??Gb.Auto,s=e.length>0?Math.floor(i/e.length):t,[u,l]=d.useState(0),[c,f]=d.useState(0),[p,h]=d.useState(0),[g,y]=d.useState(0),[_,D]=d.useState(!0),w=d.useRef(n),b=d.useRef(a),C=d.useRef(u),v=d.useRef(e.length),k=d.useRef(!1),I=d.useRef(!1);d.useEffect(()=>{w.current=n,n&&e.length===0&&!k.current&&(k.current=!0,b.current?.())},[n,e.length]),d.useEffect(()=>{b.current=a},[a]),d.useEffect(()=>{C.current=u},[u]),d.useEffect(()=>{v.current=e.length,e.length>0&&(I.current=!1,l(0),f(0),h(0),y(0),D(!0))},[e.length]),d.useEffect(()=>{if(e.length===0){w.current&&!k.current&&(k.current=!0,b.current?.());return}I.current=!1;const M=100,X=100/(s/M),de=setInterval(()=>{h(x=>{if(I.current||k.current)return x;const z=x+X;return z<100?z:(I.current=!0,setTimeout(()=>{if(w.current){if(k.current)return;k.current=!0,b.current?.();return}const P=C.current===v.current-1;D(!1),setTimeout(()=>{P?(l(0),f(K=>K+1)):l(K=>K+1),h(0),y(0),D(!0)},300)},400),100)})},M);return()=>clearInterval(de)},[u,s,e.length]),d.useEffect(()=>{if(e.length===0)return;const M=Math.floor(s/Pl.length),X=setInterval(()=>y(de=>Math.min(de+1,Pl.length-1)),M);return()=>clearInterval(X)},[u,s,e.length]);const G=e.length===0,O=G?null:e[Math.min(u,e.length-1)],Z=c>0;return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
75
75
  @keyframes providerPulse {
76
76
  0%, 100% { transform: scale(1); }
77
77
  50% { transform: scale(1.05); }
@@ -113,5 +113,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
113
113
  transition-duration: 0.001ms !important;
114
114
  }
115
115
  }
116
- `}),m.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:m.jsxs("div",{style:{width:"100%",maxWidth:560},children:[m.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[m.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:o.accent+"12",border:`1px solid ${o.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[m.jsx("span",{style:{fontSize:14},"aria-hidden":"true",children:o.icon}),m.jsx("span",{style:{fontSize:12,fontWeight:700,color:o.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:o.label})]}),m.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:G?"Connecting to top carriers":"Fetching your best rates"}),m.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:G?"Identifying the carriers eligible for your quote...":Z?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),m.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:G?m.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(M=>m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[m.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${M*.12}s`}}),m.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${M*.12}s`}})]},`skeleton-${M}`))}):O?m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[m.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:O.color+"18",border:`2px solid ${O.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:O.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[O.abbr,m.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${O.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"},"aria-hidden":"true"})]}),m.jsx("span",{style:{fontSize:13,fontWeight:600,color:O.color,letterSpacing:"0.04em"},children:O.name})]}):null}),m.jsxs("div",{className:`iq-card-fade ${_?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[m.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:G||!O?m.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[m.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),m.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),m.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{position:"relative",flexShrink:0},children:[m.jsx(hT,{progress:p,color:O.color,size:80}),m.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:m.jsxs("span",{style:{fontSize:14,fontWeight:700,color:O.color},"aria-hidden":"true",children:[Math.round(p),"%"]})})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:Z?"Still checking":"Now checking"}),m.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:O.name}),m.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},role:"status","aria-live":"polite",children:Pl[g]},`${u}-${g}`)]})]})}),m.jsxs("div",{children:[m.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:G?"Initializing":"Gathering quotes"}),m.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:m.jsx("div",{style:{height:"100%",width:"35%",background:o.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"},"aria-hidden":"true"})})]})]})]})})]})}function Gb({onGoBack:e}){return m.jsxs("section",{className:"mt-4",role:"alert","aria-labelledby":"submission-error-title",children:[m.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[m.jsx("h3",{id:"submission-error-title",className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),m.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),m.jsx("div",{className:"mt-5",children:m.jsx("button",{type:"button",onClick:e,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}var Il={intercomAppId:"",cobrowseLicense:""};function yT(){try{return typeof Il<"u"&&Il?Il:{}}catch{return{}}}function bT(e){const t=yT(),r=e?.intercomAppId??t.intercomAppId,n=e?.cobrowseLicense??t.cobrowseLicense;return{enabled:(e?.enabled??!0)&&!!(r||n),intercomAppId:r||void 0,cobrowseLicense:n||void 0,proactiveOnError:e?.proactiveOnError??!0}}const Ml=new Map;function qb(e){if(typeof document>"u")return Promise.reject(new Error("loadScript called without a document"));const t=Ml.get(e);if(t)return t;const r=new Promise((n,a)=>{const o=document.createElement("script");o.src=e,o.async=!0,o.onload=()=>n(),o.onerror=()=>{Ml.delete(e),a(new Error(`Failed to load script: ${e}`))},document.head.appendChild(o)});return Ml.set(e,r),r}let Fl=!1;function _T(){if(typeof window.Intercom=="function")return window.Intercom;const e=function(...t){e.c?.(t)};return e.q=[],e.c=t=>{e.q.push(t)},window.Intercom=e,e}function vT(e){const t={app_id:e,hide_default_launcher:!0},r=ui();return r&&(t.quote_id=r),t}function Kb(e){if(typeof window>"u")return;_T();const t=vT(e);if(window.intercomSettings=t,Fl){window.Intercom("update",t);return}window.Intercom("boot",t),Fl=!0,qb(`https://widget.intercom.io/widget/${e}`).catch(()=>{})}function ET(){typeof window?.Intercom=="function"&&window.Intercom("show")}function DT(e){typeof window?.Intercom=="function"&&window.Intercom("showNewMessage",e)}function ST(e){typeof window?.Intercom=="function"&&window.Intercom("update",e)}function CT(){if(typeof window?.Intercom=="function")try{window.Intercom("shutdown")}catch{}Fl=!1}const wT="https://js.cobrowse.io/CobrowseIO.js";let Ol=!1;async function xT(e){await qb(wT);const t=window.CobrowseIO;if(!t)return null;if(!Ol){t.license=e,t.redactedViews=["input","select","textarea","[data-credify-redact]"],t.customData={quote_id:ui()??void 0,device_name:"Credify Insurance Widget"},t.confirmSession=()=>Promise.resolve(typeof window<"u"?window.confirm("Allow a Credify support agent to view your screen?"):!1);try{await t.client?.()}catch{}t.start?.(),Ol=!0}return t}async function $T(e){if(typeof window>"u")return null;try{const t=await xT(e);return t?.createSessionCode?await t.createSessionCode():null}catch{return null}}function AT(){try{window.CobrowseIO?.stop?.()}catch{}Ol=!1}const kT="Hi! It looks like something went wrong submitting your quote. We're here to help — tell us what you were trying to do and we'll jump in.";let At=null,Ei=null,Bl=!1;function TT(e){Xb();const t=bT(e);if(At=t,!!t.enabled&&t.proactiveOnError&&t.intercomAppId){const r=n=>{Bl||(Bl=!0,Kb(t.intercomAppId),ST({last_quote_error:n?.reason??"unknown"}),DT(kT))};Sb("submissionFailed",r),Ei=r}}function Yb(){!At?.enabled||!At.intercomAppId||(Kb(At.intercomAppId),ET())}function Qb(){return!At?.enabled||!At.cobrowseLicense?Promise.resolve(null):$T(At.cobrowseLicense)}function PT(){return!!(At?.enabled&&At.intercomAppId)}function IT(){return!!(At?.enabled&&At.cobrowseLicense)}function Xb(){Ei&&(Cb("submissionFailed",Ei),Ei=null),CT(),AT(),Bl=!1,At=null}const MT="Chat with our support team in real time — we'll help you finish your quote.",FT="Share your screen with a support agent so they can see what you see and guide you in real time. We'll generate a secure code — share it with your agent to begin. Your personal information stays hidden.",Wb="inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 disabled:opacity-60",Jb="pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 w-60 -translate-x-1/2 rounded-lg bg-slate-800 px-3 py-2 text-center text-xs leading-snug text-white shadow-lg transition-opacity duration-150";function OT(){const e=PT(),t=IT(),[r,n]=d.useState(null),[a,o]=d.useState(!1),[i,s]=d.useState(!1),[u,l]=d.useState(null),c=d.useCallback(async()=>{o(!0),s(!1);try{const f=await Qb();f?n(f):s(!0)}finally{o(!1)}},[]);return!e&&!t?null:m.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-sm text-slate-500",children:[m.jsx("span",{className:"font-medium",children:"Need help?"}),m.jsxs("div",{className:"inline-flex items-center gap-1",children:[e&&m.jsxs("span",{className:"relative inline-flex",onMouseEnter:()=>l("chat"),onMouseLeave:()=>l(null),children:[m.jsx("button",{type:"button",onClick:Yb,onFocus:()=>l("chat"),onBlur:()=>l(null),onKeyDown:f=>{f.key==="Escape"&&(f.stopPropagation(),l(null))},"aria-label":"Chat with support","aria-describedby":"credify-chat-tooltip",className:Wb,children:m.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:m.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 9 9 0 0 1-3.8-.8L3 21l1.3-4.2A8.38 8.38 0 0 1 3.5 11.5 8.5 8.5 0 0 1 12 3a8.38 8.38 0 0 1 9 8.5Z",strokeLinejoin:"round"})})}),m.jsx("span",{id:"credify-chat-tooltip",role:"tooltip",className:`${Jb} ${u==="chat"?"opacity-100":"opacity-0"}`,children:MT})]}),e&&t&&m.jsx("span",{className:"mx-1 h-6 w-px bg-slate-200","aria-hidden":"true"}),t&&m.jsxs("span",{className:"relative inline-flex",onMouseEnter:()=>l("screen"),onMouseLeave:()=>l(null),children:[m.jsx("button",{type:"button",onClick:c,disabled:a,onFocus:()=>l("screen"),onBlur:()=>l(null),onKeyDown:f=>{f.key==="Escape"&&(f.stopPropagation(),l(null))},"aria-label":"Share your screen with an agent","aria-describedby":"credify-cobrowse-tooltip",className:Wb,children:a?m.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600","aria-hidden":"true"}):m.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[m.jsx("rect",{x:"2.5",y:"4",width:"19",height:"13",rx:"2"}),m.jsx("path",{d:"M8 21h8M12 17v4",strokeLinecap:"round"}),m.jsx("path",{d:"M12 13V8m0 0-2 2m2-2 2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),m.jsx("span",{id:"credify-cobrowse-tooltip",role:"tooltip",className:`${Jb} ${u==="screen"?"opacity-100":"opacity-0"}`,children:FT})]})]}),r&&m.jsxs("span",{children:["Read this code to your agent: ",m.jsx("strong",{className:"tracking-widest text-text-primary",children:r})]}),i&&m.jsx("span",{className:"text-red-600",children:"Couldn't start screen sharing. Please try chat instead."})]})}const e_="credify_rt";let Di=null;function BT(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(e_);if(!t)return;Di=t,e.searchParams.delete(e_),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function LT(){return Di!==null}function RT(){const e=Di;return Di=null,e}const t_="credify_test",r_="credify_test_mode";let Si=!1;function NT(e){return e===""||/^(1|true|yes)$/i.test(e.trim())}function UT(){try{if(typeof window>"u")return;window.sessionStorage?.getItem(r_)==="1"&&(Si=!0);const e=new URL(window.location.href),t=e.searchParams.get(t_);if(t!==null){Si=NT(t);try{window.sessionStorage?.setItem(r_,Si?"1":"0")}catch{}e.searchParams.delete(t_),window.history.replaceState(window.history.state,"",e.toString())}}catch(e){console.error("Failed to capture test mode from URL:",e)}}function HT(){return Si}function ye(e){if(e===!0)return"Yes";if(e===!1)return"No"}function mt(e){if(e)try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?void 0:t.toISOString().split("T")[0]}catch{return}}function VT(e){const t=e,r={};t.phone&&(r.phone=t.phone),t.first_name&&(r.first_name=t.first_name),t.last_name&&(r.last_name=t.last_name),t.email&&(r.email=t.email),t.date_of_birth&&(r.date_of_birth=mt(t.date_of_birth)),t.product&&(r.product=t.product),t.state&&(r.state=t.state),t.postal_code&&(r.postal_code=t.postal_code);const n=[];t.line_1&&n.push(t.line_1),t.line_2&&n.push(t.line_2),t.city&&n.push(t.city),t.state&&n.push(t.state),t.postal_code&&n.push(t.postal_code),n.length>0&&(r.address=n.join(", ")),typeof t.ssn_display=="string"&&(r.ssn_display=t.ssn_display),t.years_at_address!==null&&t.years_at_address!==void 0&&(r.years_at_address=t.years_at_address),t.months_at_address!==null&&t.months_at_address!==void 0&&(r.months_at_address=t.months_at_address),t.move_in_date&&(r.move_in_date=mt(t.move_in_date));const a=[];t.prior_line_1&&a.push(t.prior_line_1),t.prior_line_2&&a.push(t.prior_line_2),t.prior_city&&a.push(t.prior_city),t.prior_state&&a.push(t.prior_state),t.prior_postal_code&&a.push(t.prior_postal_code),a.length>0&&(r.prior_address=a.join(", ")),t.years_at_prior_address!==null&&t.years_at_prior_address!==void 0&&(r.years_at_prior_address=t.years_at_prior_address),t.is_mailing_address_different!==null&&t.is_mailing_address_different!==void 0&&(r.is_mailing_address_different=ye(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=mt(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=ye(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=mt(t.auto_prior_expiration_date)),t.auto_prior_carrier_name&&(r.auto_prior_carrier_name=t.auto_prior_carrier_name),t.auto_prior_liability_limit&&(r.auto_prior_liability_limit=t.auto_prior_liability_limit),t.auto_reason_for_no_insurance&&(r.auto_reason_for_no_insurance=t.auto_reason_for_no_insurance),t.auto_prior_years!==null&&t.auto_prior_years!==void 0&&(r.auto_prior_years=t.auto_prior_years),t.auto_prior_months!==null&&t.auto_prior_months!==void 0&&(r.auto_prior_months=t.auto_prior_months),t.auto_continuous_coverage_years!==null&&t.auto_continuous_coverage_years!==void 0&&(r.auto_continuous_coverage_years=t.auto_continuous_coverage_years),t.auto_cancelled_declined_refused_to_renew!==null&&t.auto_cancelled_declined_refused_to_renew!==void 0&&(r.auto_cancelled_declined_refused_to_renew=ye(t.auto_cancelled_declined_refused_to_renew)),t.auto_current_annual_premium_cents!==null&&t.auto_current_annual_premium_cents!==void 0&&(r.auto_current_annual_premium_cents=t.auto_current_annual_premium_cents),t.policy_bi&&(r.policy_bi=t.policy_bi),t.policy_um&&(r.policy_um=t.policy_um),t.policy_pd&&(r.policy_pd=t.policy_pd),t.policy_mp&&(r.policy_mp=t.policy_mp),t.policy_umpd&&(r.policy_umpd=t.policy_umpd),t.policy_pip&&(r.policy_pip=t.policy_pip),t.policy_auto_death_indemnity&&(r.policy_auto_death_indemnity=t.policy_auto_death_indemnity),t.driver_vehicle_assignments&&(r.driver_vehicle_assignments=t.driver_vehicle_assignments),t.home_has_prior_insurance!==null&&t.home_has_prior_insurance!==void 0&&(r.home_has_prior_insurance=ye(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=mt(t.home_prior_expiration_date)),t.home_prior_carrier_name&&(r.home_prior_carrier_name=t.home_prior_carrier_name),t.home_prior_years!==null&&t.home_prior_years!==void 0&&(r.home_prior_years=t.home_prior_years),t.home_continuous_coverage_years!==null&&t.home_continuous_coverage_years!==void 0&&(r.home_continuous_coverage_years=t.home_continuous_coverage_years),t.property_insurance_cancelled!==null&&t.property_insurance_cancelled!==void 0&&(r.property_insurance_cancelled=ye(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=ye(t.lapse_in_coverage)),t.year_built!==null&&t.year_built!==void 0&&(r.year_built=t.year_built),t.number_of_units!==null&&t.number_of_units!==void 0&&(r.number_of_units=t.number_of_units),t.number_of_stories!==null&&t.number_of_stories!==void 0&&(r.number_of_stories=t.number_of_stories),t.number_of_beds!==null&&t.number_of_beds!==void 0&&(r.number_of_beds=t.number_of_beds),t.number_of_full_baths!==null&&t.number_of_full_baths!==void 0&&(r.number_of_full_baths=t.number_of_full_baths),t.number_of_partial_baths!==null&&t.number_of_partial_baths!==void 0&&(r.number_of_partial_baths=t.number_of_partial_baths),t.under_construction!==null&&t.under_construction!==void 0&&(r.under_construction=ye(t.under_construction)),t.distance_from_fire_hydrant_ft&&(r.distance_from_fire_hydrant_ft=t.distance_from_fire_hydrant_ft),t.distance_from_fire_station_miles&&(r.distance_from_fire_station_miles=t.distance_from_fire_station_miles),t.architectural_style&&(r.architectural_style=t.architectural_style),t.dwelling_type&&(r.dwelling_type=t.dwelling_type),t.construction_quality&&(r.construction_quality=t.construction_quality),t.located_over_water!==null&&t.located_over_water!==void 0&&(r.located_over_water=t.located_over_water),t.construction_type&&(r.construction_type=t.construction_type),t.exterior_wall_type&&(r.exterior_wall_type=t.exterior_wall_type),t.foundation_type&&(r.foundation_type=t.foundation_type),t.roof_material_type&&(r.roof_material_type=t.roof_material_type),t.roof_shape&&(r.roof_shape=t.roof_shape),t.roof_updated_type&&(r.roof_updated_type=t.roof_updated_type),t.year_roof_updated!==null&&t.year_roof_updated!==void 0&&(r.year_roof_updated=t.year_roof_updated),t.mit_credit_form!==null&&t.mit_credit_form!==void 0&&(r.mit_credit_form=ye(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=ye(t.storm_shutters)),t.heating_type&&(r.heating_type=t.heating_type),t.oil_tank_location&&(r.oil_tank_location=t.oil_tank_location),t.heating_fuel_type&&(r.heating_fuel_type=t.heating_fuel_type),t.number_of_fireplaces!==null&&t.number_of_fireplaces!==void 0&&(r.number_of_fireplaces=t.number_of_fireplaces),t.basement_type&&(r.basement_type=t.basement_type),t.parking_type&&(r.parking_type=t.parking_type),t.garage_type&&(r.garage_type=t.garage_type),t.number_of_parking_spaces!==null&&t.number_of_parking_spaces!==void 0&&(r.number_of_parking_spaces=t.number_of_parking_spaces),t.plumbing_type&&(r.plumbing_type=t.plumbing_type),t.pool_type&&(r.pool_type=t.pool_type),t.total_area_sq_ft!==null&&t.total_area_sq_ft!==void 0&&(r.total_area_sq_ft=t.total_area_sq_ft),t.parcel_area_sq_ft!==null&&t.parcel_area_sq_ft!==void 0&&(r.parcel_area_sq_ft=t.parcel_area_sq_ft),t.residence_type&&(r.residence_type=t.residence_type),t.usage_type&&(r.usage_type=t.usage_type),t.household_size!==null&&t.household_size!==void 0&&(r.household_size=t.household_size),t.number_of_mortgagees!==null&&t.number_of_mortgagees!==void 0&&(r.number_of_mortgagees=t.number_of_mortgagees),t.has_dog!==null&&t.has_dog!==void 0&&(r.has_dog=ye(t.has_dog)),t.dog_breed_type&&(r.dog_breed_type=t.dog_breed_type),t.number_of_dogs!==null&&t.number_of_dogs!==void 0&&(r.number_of_dogs=t.number_of_dogs),t.has_vicious_animals!==null&&t.has_vicious_animals!==void 0&&(r.has_vicious_animals=ye(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=ye(t.has_business_on_premises)),t.business_class&&(r.business_class=t.business_class),t.occupancy_type&&(r.occupancy_type=t.occupancy_type),t.short_term_rental!==null&&t.short_term_rental!==void 0&&(r.short_term_rental=ye(t.short_term_rental)),t.sale_price_cents!==null&&t.sale_price_cents!==void 0&&(r.sale_price_cents=Math.round(Number(t.sale_price_cents)/100)),t.number_of_families!==null&&t.number_of_families!==void 0&&(r.number_of_families=t.number_of_families),t.number_of_units_in_firewall!==null&&t.number_of_units_in_firewall!==void 0&&(r.number_of_units_in_firewall=t.number_of_units_in_firewall),t.heating_update_yn!==null&&t.heating_update_yn!==void 0&&(r.heating_update_yn=ye(t.heating_update_yn)),t.heating_update_type&&(r.heating_update_type=t.heating_update_type),t.heating_update_year!==null&&t.heating_update_year!==void 0&&(r.heating_update_year=t.heating_update_year),t.plumbing_update_yn!==null&&t.plumbing_update_yn!==void 0&&(r.plumbing_update_yn=ye(t.plumbing_update_yn)),t.plumbing_update_type&&(r.plumbing_update_type=t.plumbing_update_type),t.plumbing_update_year!==null&&t.plumbing_update_year!==void 0&&(r.plumbing_update_year=t.plumbing_update_year),t.electrical_update_yn!==null&&t.electrical_update_yn!==void 0&&(r.electrical_update_yn=ye(t.electrical_update_yn)),t.electrical_update_type&&(r.electrical_update_type=t.electrical_update_type),t.electrical_update_year!==null&&t.electrical_update_year!==void 0&&(r.electrical_update_year=t.electrical_update_year),t.electric_circuit_breaker!==null&&t.electric_circuit_breaker!==void 0&&(r.electric_circuit_breaker=ye(t.electric_circuit_breaker)),t.dwelling_replacement_cost!==null&&t.dwelling_replacement_cost!==void 0&&(r.dwelling_replacement_cost=t.dwelling_replacement_cost),t.other_structures_coverage!==null&&t.other_structures_coverage!==void 0&&(r.other_structures_coverage=t.other_structures_coverage),t.personal_property_coverage!==null&&t.personal_property_coverage!==void 0&&(r.personal_property_coverage=t.personal_property_coverage),t.loss_of_use_coverage!==null&&t.loss_of_use_coverage!==void 0&&(r.loss_of_use_coverage=t.loss_of_use_coverage),t.personal_liability&&(r.personal_liability=t.personal_liability),t.dwelling_medical_payments&&(r.dwelling_medical_payments=t.dwelling_medical_payments),t.all_perils_deductible&&(r.all_perils_deductible=t.all_perils_deductible),t.windstorm_deductible&&(r.windstorm_deductible=t.windstorm_deductible),t.has_garage!==null&&t.has_garage!==void 0&&(r.has_garage=ye(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=ye(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=ye(t.has_trampoline)),t.gender&&(r.gender=t.gender),t.marital_status&&(r.marital_status=t.marital_status),t.employment_industry&&(r.employment_industry=t.employment_industry),t.occupation&&(r.occupation=t.occupation),t.has_co_applicant!==null&&t.has_co_applicant!==void 0&&(r.has_co_applicant=ye(t.has_co_applicant)),t.co_applicant_first_name&&(r.co_applicant_first_name=t.co_applicant_first_name),t.co_applicant_middle_name&&(r.co_applicant_middle_name=t.co_applicant_middle_name),t.co_applicant_last_name&&(r.co_applicant_last_name=t.co_applicant_last_name),t.co_applicant_gender&&(r.co_applicant_gender=t.co_applicant_gender),t.co_applicant_marital_status&&(r.co_applicant_marital_status=t.co_applicant_marital_status),t.co_applicant_relationship&&(r.co_applicant_relationship=t.co_applicant_relationship),t.co_applicant_date_of_birth&&(r.co_applicant_date_of_birth=mt(t.co_applicant_date_of_birth)),t.co_applicant_employment_industry&&(r.co_applicant_employment_industry=t.co_applicant_employment_industry),t.co_applicant_occupation&&(r.co_applicant_occupation=t.co_applicant_occupation),t.retiree_discount!==null&&t.retiree_discount!==void 0&&(r.retiree_discount=ye(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=ye(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=ye(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=ye(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=ye(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=ye(t.fire_detection_system)),t.fire_detection_system_type&&(r.fire_detection_system_type=t.fire_detection_system_type),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=ye(t.burglar_alarm_system)),t.burglar_alarm_system_type&&(r.burglar_alarm_system_type=t.burglar_alarm_system_type),t.smoke_detectors!==null&&t.smoke_detectors!==void 0&&(r.smoke_detectors=ye(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=ye(t.sprinkler_system)),t.sprinkler_system_type&&(r.sprinkler_system_type=t.sprinkler_system_type),t.gas_leakage_detector!==null&&t.gas_leakage_detector!==void 0&&(r.gas_leakage_detector=ye(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=ye(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=ye(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=ye(t.order_credit_authorized)),t.has_health_insurance_auto_accident!==null&&t.has_health_insurance_auto_accident!==void 0&&(r.has_health_insurance_auto_accident=ye(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=ye(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=ye(t.named_insured_foreclosure_repo_bankruptcy)),t.named_insured_convicted_insurance_fraud!==null&&t.named_insured_convicted_insurance_fraud!==void 0&&(r.named_insured_convicted_insurance_fraud=ye(t.named_insured_convicted_insurance_fraud));const o={};if(t.vehicles)for(const i of t.vehicles)i.quote_vehicle_id&&i.vin&&(o[i.quote_vehicle_id]=i.vin);return t.drivers&&t.drivers.length>0?(r.drivers="Yes",r.drivers__items=t.drivers.map(i=>{const s=i,u={};s.first_name&&(u.first_name=s.first_name),s.middle_name&&(u.middle_name=s.middle_name),s.last_name&&(u.last_name=s.last_name),s.date_of_birth&&(u.date_of_birth=mt(s.date_of_birth)),s.gender&&(u.gender=s.gender),s.marital_status&&(u.marital_status=s.marital_status),s.relationship_to_insured&&(u.relationship_to_insured=s.relationship_to_insured),s.is_registered_owner!==null&&s.is_registered_owner!==void 0&&(u.is_registered_owner=s.is_registered_owner?"Yes":"No"),s.license_state&&(u.license_state=s.license_state),s.license_status&&(u.license_status=s.license_status),s.license_number&&(u.license_number=s.license_number),s.date_first_licensed&&(u.date_first_licensed=mt(s.date_first_licensed)),s.education_level&&(u.education_level=By(s.education_level)),s.occupation&&(u.occupation=Ly(s.occupation)),s.industry&&(u.industry=ai(s.industry)),s.employment_status&&(u.employment_status=s.employment_status),s.last_5_years_license_suspended_or_revoked!==null&&s.last_5_years_license_suspended_or_revoked!==void 0&&(u.last_5_years_license_suspended_or_revoked=ye(s.last_5_years_license_suspended_or_revoked)),s.accident_prevention_course!==null&&s.accident_prevention_course!==void 0&&(u.accident_prevention_course=ye(s.accident_prevention_course)),s.accident_prevention_course_date&&(u.accident_prevention_course_date=mt(s.accident_prevention_course_date)),s.sr22!==null&&s.sr22!==void 0&&(u.sr22=ye(s.sr22));const l=s.ssn_display;typeof l=="string"&&(u.ssn_display=l);const c=s.driver_violations;c&&c.length>0&&(u.driver_violations="Yes",u.driver_violations__items=c.map(h=>{const g={};return h.code&&(g.code=h.code),h.occurred_at&&(g.occurred_at=mt(h.occurred_at)),g}));const f=s.driver_accidents;f&&f.length>0&&(u.driver_accidents="Yes",u.driver_accidents__items=f.map(h=>{const g={};return h.occurred_at&&(g.occurred_at=mt(h.occurred_at)),h.description&&(g.description=h.description),h.quote_vehicle_id&&(g.quote_vehicle_id=o[h.quote_vehicle_id]??h.quote_vehicle_id),h.property_damage_amount_paid_cents!==null&&h.property_damage_amount_paid_cents!==void 0&&(g.property_damage_amount_paid_cents=h.property_damage_amount_paid_cents),h.personal_injury_amount_paid_cents!==null&&h.personal_injury_amount_paid_cents!==void 0&&(g.personal_injury_amount_paid_cents=h.personal_injury_amount_paid_cents),g}));const p=s.losses;return p&&p.length>0&&(u.losses="Yes",u.losses__items=p.map(h=>{const g={};return h.description&&(g.description=h.description),h.date_of_incident&&(g.date_of_incident=mt(h.date_of_incident)),h.amount_paid_cents!==null&&h.amount_paid_cents!==void 0&&(g.amount_paid_cents=h.amount_paid_cents),h.quote_vehicle_id&&(g.quote_vehicle_id=o[h.quote_vehicle_id]??h.quote_vehicle_id),g})),u})):r.drivers="No",t.vehicles&&t.vehicles.length>0?(r.vehicles="Yes",r.vehicles__items=t.vehicles.map(i=>{const s=i,u={};s.vin&&(u.vin=s.vin),s.year!==null&&s.year!==void 0&&(u.year=String(s.year)),s.make&&(u.make=s.make),s.model&&(u.model=s.model),s.body_style&&(u.body_style=s.body_style),s.ownership_type&&(u.ownership_type=s.ownership_type),s.usage&&(u.usage=s.usage),s.annual_mileage!==null&&s.annual_mileage!==void 0&&(u.annual_mileage=s.annual_mileage),s.miles_to_work!==null&&s.miles_to_work!==void 0&&(u.miles_to_work=s.miles_to_work),s.percent_to_work!==null&&s.percent_to_work!==void 0&&(u.percent_to_work=s.percent_to_work);const l=[];return s.garaging_address_line_1&&l.push(s.garaging_address_line_1),s.garaging_address_line_2&&l.push(s.garaging_address_line_2),s.garaging_address_city&&l.push(s.garaging_address_city),s.garaging_address_state&&l.push(s.garaging_address_state),s.garaging_address_postal_code&&l.push(s.garaging_address_postal_code),l.length>0&&(u.garaging_address=l.join(", ")),s.new_when_purchased!==null&&s.new_when_purchased!==void 0&&(u.new_when_purchased=ye(s.new_when_purchased)),s.purchase_date&&(u.purchase_date=mt(s.purchase_date)),s.anti_theft_type&&(u.anti_theft_type=s.anti_theft_type),s.passive_restraint_type&&(u.passive_restraint_type=s.passive_restraint_type),s.anti_lock_brakes!==null&&s.anti_lock_brakes!==void 0&&(u.anti_lock_brakes=ye(s.anti_lock_brakes)),s.daytime_running_lights!==null&&s.daytime_running_lights!==void 0&&(u.daytime_running_lights=ye(s.daytime_running_lights)),s.custom_equipment_value_cents!==null&&s.custom_equipment_value_cents!==void 0&&(u.custom_equipment_value_cents=s.custom_equipment_value_cents),s.cost_new_value_cents!==null&&s.cost_new_value_cents!==void 0&&(u.cost_new_value_cents=s.cost_new_value_cents),s.stated_value_amount_cents!==null&&s.stated_value_amount_cents!==void 0&&(u.stated_value_amount_cents=s.stated_value_amount_cents),s.vehicle_has_modifications!==null&&s.vehicle_has_modifications!==void 0&&(u.vehicle_has_modifications=ye(s.vehicle_has_modifications)),s.vehicle_garaged_at_residence!==null&&s.vehicle_garaged_at_residence!==void 0&&(u.vehicle_garaged_at_residence=ye(s.vehicle_garaged_at_residence)),s.vehicle_comp_deductible&&(u.vehicle_comp_deductible=s.vehicle_comp_deductible),s.vehicle_coll_deductible&&(u.vehicle_coll_deductible=s.vehicle_coll_deductible),s.vehicle_towing_and_labor&&(u.vehicle_towing_and_labor=s.vehicle_towing_and_labor),s.vehicle_transportation_expense&&(u.vehicle_transportation_expense=s.vehicle_transportation_expense),s.vehicle_full_glass!==null&&s.vehicle_full_glass!==void 0&&(u.vehicle_full_glass=ye(s.vehicle_full_glass)),s.vehicle_loan_lease!==null&&s.vehicle_loan_lease!==void 0&&(u.vehicle_loan_lease=ye(s.vehicle_loan_lease)),s.coverages&&s.coverages.length>0&&(u.coverages__items=s.coverages.map(c=>{const f={};return c.type&&(f.type=c.type),c.per_person_limit_cents!==null&&c.per_person_limit_cents!==void 0&&(f.per_person_limit_cents=c.per_person_limit_cents),c.per_incident_limit_cents!==null&&c.per_incident_limit_cents!==void 0&&(f.per_incident_limit_cents=c.per_incident_limit_cents),c.per_incident_limit_percent!==null&&c.per_incident_limit_percent!==void 0&&(f.per_incident_limit_percent=c.per_incident_limit_percent),c.per_day_limit_cents!==null&&c.per_day_limit_cents!==void 0&&(f.per_day_limit_cents=c.per_day_limit_cents),c.deductible_cents!==null&&c.deductible_cents!==void 0&&(f.deductible_cents=c.deductible_cents),c.is_declined!==null&&c.is_declined!==void 0&&(f.is_declined=ye(c.is_declined)),f})),s.vehicle_lienholders&&s.vehicle_lienholders.length>0&&(u.vehicle_lienholders__items=s.vehicle_lienholders.map(c=>{const f={};return c.name&&(f.name=c.name),c.type&&(f.type=c.type),c.line_1&&(f.line_1=c.line_1),c.line_2&&(f.line_2=c.line_2),c.city&&(f.city=c.city),c.state&&(f.state=c.state),c.postal_code&&(f.postal_code=c.postal_code),c.phone&&(f.phone=c.phone),c.fax&&(f.fax=c.fax),f})),u})):r.vehicles="No",t.losses&&t.losses.length>0?(r.home_losses="Yes",r.home_losses__items=t.losses.map(i=>{const s={};return i.description&&(s.description=i.description),i.date_of_incident&&(s.date_of_incident=mt(i.date_of_incident)),i.amount_paid_cents!==null&&i.amount_paid_cents!==void 0&&(s.amount_paid_cents=Math.round(Number(i.amount_paid_cents)/100)),s})):r.home_losses="No",r}const zT={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};function jT(e){return zT[e]||e}const n_=new Set(["Zip","Product","Driver","Vehicle"]);function ZT(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function a_(e,t){const r=ZT(t),n=e.filter(o=>o.key!=="AutoPolicy"),a=n.length>0?n:e;return a}function GT(e,t){const r=e.findIndex(a=>a.key===t);return r<0?t:e[r+1]?.key??t}function o_(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function i_(e){return o_(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const qT={Auto:45e3,Home:5e4,Bundle:1e5},s_=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function KT(e,t){if(e!=="AutoCurrentCarrier")return t;const r=t.some(o=>String(o.key)==="auto_cancelled_declined_refused_to_renew"),n=t.some(o=>String(o.key)==="vehicle_policy_selections"),a=[...t];return r||a.push({question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0}),n||a.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),a}function YT(e,t){if(e!=="Vehicle")return t;const r=n=>n.map(a=>{const o=a.conditionals?.map(i=>{const s=i.conditionalQuestions??[];return s.length?{...i,conditionalQuestions:r(s)}:i});return String(a.key)!=="vin"?o?{...a,conditionals:o}:a:{...a,required:!1,...o?{conditionals:o}:{}}});return r(t)}function QT({isOpen:e,onClose:t}){const[r,n]=d.useState([]),[a,o]=d.useState(null),i=d.useRef(null);d.useEffect(()=>{i.current=a},[a]);const[s,u]=d.useState(null),[l,c]=d.useState(!1),[f,p]=d.useState(!1),[h,g]=d.useState(!1),[y,_]=d.useState(!1),[D,w]=d.useState([]),b=d.useRef(null),[C,v]=d.useState(null),[k,I]=d.useState(void 0),[G,O]=d.useState(!1),[Z,M]=d.useState(null),[X,de]=d.useState(null),[x,z]=d.useState(!1),[U,P]=d.useState(!1),[K,$]=d.useState(!1),T=d.useRef(!1),Y=d.useRef(null),se=d.useRef(null),te=d.useRef(null),H=d.useRef(null),[Q,A]=d.useState(!1);d.useEffect(()=>{if(!h||y)return;const L=i_(r);let J=!1;const W=[];let ie=0,oe=0;const ce=66,F=3,R=5e3;let re=!1;const ee=async()=>{if(J)return;ie++;try{const{quote:fe}=await ab(a??void 0);if(J)return;if(oe=0,!re){const De=fe?.appetites??null,_e=Kk(De,L);_e.length>0&&(w(_e),re=!0)}const pe=fe?.rates_status??null;if(pe==="completed"){const{rates:De}=await vl(a??void 0);if(J)return;b.current=De,_(!0);return}if(pe==="no_rates"){b.current=[],_(!0);return}if(pe==="failed"){In(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:i.current??void 0,phase:"rates_status_failed"}),xa({reason:"submission"}),M({message:"submission_failed"}),g(!1);return}}catch(fe){if(oe++,console.warn("Provider polling: getQuote failed",{attempt:ie,consecutiveFailures:oe,error:fe}),oe>=F){fe?.__sentryReported||In(fe,{quoteId:i.current??void 0,phase:"rates_polling",message:`Quote failed: ${F} consecutive get-quote poll failures`}),xa({reason:"network"}),M({message:"submission_failed"}),g(!1);return}}if(J)return;if(ie>=ce){In(new Error(`Quote failed: rate-generation timed out after ${ce} polls`),{quoteId:i.current??void 0,phase:"rates_polling_timeout"}),xa({reason:"timeout"}),M({message:"submission_failed"}),g(!1);return}const le=window.setTimeout(ee,R);W.push(le)};return ee(),()=>{J=!0,W.forEach(le=>window.clearTimeout(le))}},[h,y,r,a]);function S(L){return L.map(W=>({key:W,title:jT(W),loadQuestions:async()=>{const ie=await VA(W,i.current??void 0);let oe=KT(W,ie.questions);return oe=YT(W,oe),oe}}))}d.useEffect(()=>{const L=async()=>{try{const J=RT();if(J)try{const{token:ie,quoteId:oe}=await jA(J);ie&&oe&&(ci(ie),Uy(oe))}catch(ie){ie.statusCode===401&&P(!0)}const W=ui();if(di(),W){O(!0),o(W);try{const ie=Wt(),oe=await ab(ie?void 0:W);if(!oe||!oe.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:ce}=oe,{stages:F}=await fi(W),R=S(F);n(R);let re;try{re=VT(ce),v(re)}catch(_e){throw new Error(`Failed to transform quote data: ${_e instanceof Error?_e.message:"Unknown error"}`)}const ee=a_(R,re);n(ee);const le=ce?.review_status??null;if(p(le!=null),le==="pending_review"&&Wt()){$(!0);return}const fe=ce?.rates_status??null,pe=Wt()!=null;if(pe||le===null){if(fe==="completed")try{const{rates:_e}=await vl(pe?void 0:W);u(_e);return}catch(_e){console.warn("Failed to fetch completed rates on resume",_e)}else if(fe==="no_rates"){u([]);return}else if(fe==="processing"){w([]),_(!1),b.current=null,g(!0);return}}I(0)}catch(ie){const oe=ie;if(oe.statusCode===404)Hy(),o(null);else if(oe.statusCode===401){tb();try{const{stages:ce}=await fi(W),F=S(ce);n(F);const R=F.findIndex(re=>re.key==="SMSVerification");I(R>=0?R:F.length-1)}catch{}}}finally{O(!1)}}else{const{stages:ie}=await fi();n(S(ie))}}catch{O(!1)}};e&&!T.current&&(T.current=!0,L())},[e]),d.useEffect(()=>{if(!e)return;const{overflow:L}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=L}},[e]),d.useEffect(()=>{if(!e)return;H.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const L=window.setTimeout(()=>{const J=Y.current;if(!J)return;(J.querySelector(s_)??J).focus()},0);return()=>{window.clearTimeout(L);const J=H.current;H.current=null,J&&document.contains(J)&&J.focus()}},[e]);const E=d.useCallback(L=>{if(L.key==="Escape"){Q?(L.preventDefault(),A(!1)):(L.preventDefault(),A(!0));return}if(L.key!=="Tab")return;const J=Q?se.current:Y.current;if(!J)return;const W=Array.from(J.querySelectorAll(s_)).filter(F=>!F.hasAttribute("disabled")&&F.getAttribute("aria-hidden")!=="true");if(W.length===0){L.preventDefault(),J.focus();return}const ie=W[0],oe=W[W.length-1],ce=document.activeElement;L.shiftKey&&ce===ie?(L.preventDefault(),oe.focus()):!L.shiftKey&&ce===oe&&(L.preventDefault(),ie.focus())},[Q]);d.useEffect(()=>{if(e)return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[e,E]),d.useEffect(()=>{if(!Q)return;const L=window.setTimeout(()=>{te.current?.focus()},0);return()=>window.clearTimeout(L)},[Q]),d.useEffect(()=>{e||(v(null),I(void 0),O(!1),g(!1),de(null),z(!1),A(!1))},[e]),d.useEffect(()=>{e&&Pk()},[e]),d.useEffect(()=>{s&&Array.isArray(s)&&Ok({rateCount:s.length})},[s]);const j=d.useCallback(()=>{M(null),I(Math.max(0,r.length-1))},[r.length]),q=d.useCallback(async(L,J)=>{try{w([]),_(!1),b.current=null,g(!0);let W;try{W=await Dr(L,!0,a??void 0)}catch(ce){throw g(!1),ce}if(W.status==="submission_failed"){In(new Error(`Quote failed at submission: ${W.message}`),{quoteId:a??void 0,phase:J}),g(!1),_(!1),b.current=null,xa({reason:"submission"}),M({message:W.message});return}if(W.status==="success")try{const{rates:ce}=await vl(a??void 0);b.current=ce,_(!0)}catch(ce){throw g(!1),ce}const ie=r.length,oe=r[ie-1];wb({stageKey:oe?.key??"unknown",stageTitle:oe?.title??"unknown",stepIndex:ie,totalSteps:ie}),Fk()}catch(W){W?.__sentryReported||In(W,{quoteId:a??void 0,phase:J}),g(!1),xa({reason:"submission"}),M({message:"Oops, something went wrong. Please try again later."})}},[a,r]),ae=d.useCallback(async L=>{if(!(!X||!a||x)){z(!0);try{const W={...en(X.allValues),communications_consent:L};de(null),await q(W,"consent_submit")}finally{z(!1)}}},[X,a,x,q]),V=d.useCallback(async L=>{if(!(!a||x)){z(!0);try{v(L);const J={...en(L),customer_review_confirmed:!0};await q(J,"review_submit")}finally{z(!1)}}},[a,x,q]);if(!e)return null;const ue=()=>{A(!0)},ve=()=>{A(!1)},N=()=>{Ik(),t()},ne=!!(!Z&&s&&a&&!l);return m.jsxs("div",{ref:Y,className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",tabIndex:-1,children:[m.jsx("div",{className:"backdrop","aria-hidden":"true"}),m.jsxs("div",{className:`modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${ne?"max-w-6xl":"max-w-2xl"}`,role:"document",children:[m.jsx("h2",{id:"insurance-modal-title",className:"sr-only",children:"Credify insurance quote widget"}),m.jsx("button",{onClick:ue,className:"modal-close-btn absolute top-4 right-4","aria-label":"Close quote form",type:"button",children:m.jsx("span",{"aria-hidden":"true",children:"×"})}),!h&&!Z&&m.jsx("div",{className:"widget-modal-header text-center",children:m.jsx("h2",{className:"h1-title",children:"Let's shop multiple leading carriers for you"})}),m.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[U&&m.jsxs("div",{className:"mb-4 flex items-start justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-800",role:"alert",children:[m.jsx("span",{children:"This resume link has expired or is no longer valid. For your security, emailed links only work for a limited time — you can continue your quote below."}),m.jsx("button",{type:"button",onClick:()=>P(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),Z&&m.jsx(Gb,{onGoBack:j}),!Z&&h&&(()=>{const L=i_(r);return m.jsx(gT,{providers:D,totalTime:qT[L],flow:L,isComplete:y,onComplete:()=>{g(!1),_(!1),w([]),b.current&&(u(b.current),b.current=null)}})})(),!Z&&!h&&X&&m.jsx(Cw,{onChoose:ae,isSubmitting:x}),!Z&&!s&&!h&&!X&&m.jsx(m.Fragment,{children:G||r.length===0?m.jsx("div",{className:"flex items-center justify-center py-12",children:m.jsx("div",{className:"text-slate-600",children:"Loading..."})}):K&&a?m.jsx(pT,{stages:r,initialValues:C??{},quoteId:a,isSubmitting:x,onConfirmed:V}):m.jsx(Zk,{stages:r,initialValues:C??void 0,initialActive:k,quoteId:a??void 0,nonTerminalStageKeys:n_,onStageComplete:async(L,J)=>{try{const W=en(L);let ie=a,oe=r;const ce=oe.findIndex(re=>re.key===J),F=oe[ce],R=GT(oe,J);if(ie)if(J==="Phone"){const re=W.phone;if(!re)throw new Error("Phone number is required.");const ee=Wt();await Dr({...W,current_stage:R,suppress_verification_sms:!0},!1,ee?void 0:ie),await rb(ie,re)}else if(J==="SMSVerification"){const{isVerified:re,token:ee}=await _l(ie,W.sms_code);if(!re)throw new Error("Invalid SMS code");ee&&ci(ee),await Dr({current_stage:R},!1)}else if(J==="Product"){const re=Wt(),{isSupported:ee}=await nb(W.state,re?void 0:ie??void 0);if(await Dr({...W,current_stage:ee?R:J},!1,re?void 0:ie),!ee){const le=zb(W.state);throw new Error(`Sorry, Credify Corporation doesn't currently offer insurance in ${le}. We're expanding our coverage and hope to serve your state soon.`)}}else{const re=Wt();await Dr({...W,current_stage:R},!1,re?void 0:ie||void 0)}else{const re=W.postal_code??"";if(!re)throw new Error("ZIP code is required to start a quote.");const le=(await zA(re,HT()))?.quoteId;if(!le||typeof le!="string"||le.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${le}`);ie=le,o(le),Uy(le),await Dr({...W,current_stage:R},!1,le)}if(J==="Name"&&ie){const re=String(L.product??"");(re==="Auto"||re==="Both")&&_k(ie)}if(J==="Vehicle"&&ie&&Dk(ie),n_.has(J))try{const{stages:re}=await fi(ie||void 0);oe=S(re),oe=a_(oe,L),n(oe)}catch(re){console.warn("Unable to refresh stages after flow-shaping step",re)}return wb({stageKey:J,stageTitle:F?.title??J,stepIndex:ce+1,totalSteps:oe.length}),{success:!0,latestStages:oe}}catch(W){return{success:!1,error:W instanceof Error?W.message:"An error occurred"}}},onComplete:async(L,J)=>{if(!a)return{success:!1,error:"Oops, something went wrong. Please try again later."};v(L);try{if(J==="Phone"){const W=en(L);if(!W.phone)return{success:!1,error:"Phone number is required."};const oe=Wt();return await Dr({...W,suppress_verification_sms:!0},!1,oe?void 0:a),de({allValues:L}),{success:!0}}if(J==="SMSVerification"){const W=en(L),{isVerified:ie,token:oe,code:ce}=await _l(a,W.sms_code);return ie?(oe&&ci(oe),de({allValues:L}),{success:!0}):{success:!1,error:ce==="OTP_EXPIRED"?"That code has expired. Request a new one.":"Invalid SMS code"}}return de({allValues:L}),{success:!0}}catch{const ie="Oops, something went wrong. Please try again later.";return M({message:ie}),{success:!1,error:ie}}}})})," ",!Z&&s&&a&&m.jsx(tT,{rates:s,onBack:()=>u(null),isBundleFlow:o_(r),quoteId:a,initialPhone:C?.phone??"",requirePursueVerification:f,onSubScreenChange:c})]}),m.jsxs("div",{className:"widget-legal-footer space-y-1.5",children:[m.jsx(OT,{}),m.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})]}),Q&&m.jsx("div",{className:"close-confirm-backdrop",role:"presentation",children:m.jsxs("div",{ref:se,className:"close-confirm-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":"close-confirm-title","aria-describedby":"close-confirm-description",tabIndex:-1,children:[m.jsx("h3",{id:"close-confirm-title",children:"Close quote form?"}),m.jsx("p",{id:"close-confirm-description",children:"Your answers in this session will be lost if you close this window."}),m.jsxs("div",{className:"close-confirm-actions",children:[m.jsx("button",{ref:te,type:"button",className:"btn-outline",onClick:ve,children:"Keep editing"}),m.jsx("button",{type:"button",className:"btn-primary close-confirm-danger",onClick:N,children:"Close form"})]})]})})]})]})}function XT({onClose:e}){return m.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[m.jsx("div",{className:"backdrop","aria-hidden":"true"}),m.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:m.jsx(Gb,{onGoBack:e})})]})}function WT({isOpen:e}){const t=()=>wi.close();return m.jsx(ps,{fallback:m.jsx(XT,{onClose:t}),children:m.jsx(QT,{isOpen:e,onClose:t})})}var Ll={dsn:"",environment:"production",release:"7f8f8c84bf8de64d5f693b906961e1fcd1ad0b4f"};function JT(){try{return typeof Ll<"u"&&Ll?Ll:{}}catch{return{}}}let u_=!1;function eP(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function tP(e={}){if(u_)return!0;if(typeof window>"u")return!1;const t=JT(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(IA({baseUrl:Ve}),k1({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??eP(t.tracesSampleRate,.1),tracePropagationTargets:[Ve],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>Qy(n),beforeBreadcrumb:n=>n&&(Qy({breadcrumbs:[n]}),n)}),u_=!0,$1("replayIntegration").then(n=>{try{y4(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[Ve],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}var l_={key:""};const rP="mock";function nP(){try{typeof l_<"u"&&l_?.key;return}catch{return}}function aP(){const e=nP();if(!e||typeof window>"u"||!window.location)return!1;try{return new URLSearchParams(window.location.search).get(rP)===e}catch{return!1}}const oP=new Set(["/create-quote","/get-stages-for-quote","/get-questions-by-stage","/update-quote","/verify-quote","/is-supported-state","/get-rates","/get-quote","/get-vehicle-options","/request-bind"]);let c_=!1;function iP(e){try{if(typeof e=="string")return new URL(e,window.location.href).pathname;if(e instanceof URL)return e.pathname;if(e instanceof Request)return new URL(e.url,window.location.href).pathname}catch{return null}return null}async function sP(e,t){try{if(t?.body&&typeof t.body=="string")return JSON.parse(t.body);if(e instanceof Request){const r=await e.clone().text();return r?JSON.parse(r):{}}}catch{return{}}return{}}function d_(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}function uP(){try{if(typeof document>"u"||document.getElementById("credify-mock-badge"))return;const e=()=>{const t=document.createElement("div");t.id="credify-mock-badge",t.textContent="MOCK MODE",t.setAttribute("aria-hidden","true"),t.style.cssText=["position:fixed","bottom:12px","left:12px","z-index:2147483647","background:#b91c1c","color:#fff","font:600 11px/1 system-ui,sans-serif","letter-spacing:0.08em","padding:6px 10px","border-radius:9999px","box-shadow:0 1px 4px rgba(0,0,0,0.3)","pointer-events:none","user-select:none"].join(";"),document.body.appendChild(t)};document.body?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}catch{}}function lP(){if(c_||typeof window>"u"||typeof window.fetch!="function"||!aP())return;c_=!0;const e=window.fetch.bind(window),t=Promise.resolve().then(()=>BP);window.fetch=async(r,n)=>{const a=iP(r);if(!a||!oP.has(a))return e(r,n);const o=await sP(r,n),{handleMockRequest:i}=await t;await new Promise(s=>window.setTimeout(s,120));try{return d_(i(a,o))}catch(s){return d_({error:s instanceof Error?s.message:"Mock handler error"},404)}},uP(),typeof console<"u"&&console.info("[Credify] Mock mode active — all API calls are served from in-memory fixtures.")}lP();let er=null,tn=null,Ci=!1;function cP(){er||(er=document.createElement("div"),er.id="insurance-widget-root",document.documentElement.appendChild(er)),!tn&&er&&(tn=__.createRoot(er))}function Rl(){cP(),tn&&tn.render(d.createElement(WT,{isOpen:Ci}))}function dP(){tn&&er&&(tn.unmount(),er.remove()),tn=null,er=null,Xb(),Tk()}const wi={init:e=>{tP(e?.sentry),TT(e?.support),BT(),UT(),Ci=!!e?.autoOpen||LT(),Rl()},open:()=>{Ci=!0,Rl()},close:()=>{Ci=!1,Rl()},destroy:dP,on:Sb,off:Cb,support:{openChat:Yb,startScreenShare:Qb}};typeof window<"u"&&(window.CredifyInsuranceWidget=wi);const fP=["Zip","Email","Product"],mP={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone"]};function pP(e){return e==="Auto"||e==="Home"||e==="Bundle"?mP[e]:fP}const f_=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],m_=["25/50","50/100","100/300","250/500"],hP=Array.from({length:35},(e,t)=>String(2024-t)),gP=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],yP=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],bP=[{question:"Do you want to quote auto, home, or both?",inputType:"select",options:["Auto","Home","Bundle"],key:"product",required:!0},{question:"What is your property address?",inputType:"address",key:"address",required:!0}],_P=[{question:"What is your first name?",inputType:"text",key:"first_name",required:!0},{question:"What is your last name?",inputType:"text",key:"last_name",required:!0},{question:"What is your date of birth?",inputType:"date",key:"date_of_birth",required:!0}],vP=[{question:"Add Vehicles",inputType:"radio",options:["Yes"],key:"vehicles",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"Vehicle Identification Number (VIN)",inputType:"text",key:"vin",required:!1},{question:"Year",inputType:"select",options:hP,key:"year",required:!0},{question:"Make",inputType:"select",options:[],key:"make",required:!0},{question:"Model",inputType:"select",options:[],key:"model",required:!0},{question:"Body style",inputType:"select",options:[],key:"body_style",required:!0},{question:"Vehicle ownership type",inputType:"select",options:["Owned","Leased","Lien"],key:"ownership_type",required:!0},{question:"What is the primary use of this vehicle?",inputType:"select",options:["Pleasure","To_FromWork","To_FromSchool","Business","Farming"],key:"usage",required:!0},{question:"Annual mileage driven",inputType:"number",key:"annual_mileage",required:!0}]}]}],EP=[{question:"Add Drivers",inputType:"radio",options:["Yes"],key:"drivers",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"First Name",inputType:"text",key:"first_name",required:!0},{question:"Middle Name Initial",inputType:"text",key:"middle_name",required:!1},{question:"Last Name",inputType:"text",key:"last_name",required:!0},{question:"Date of Birth",inputType:"date",key:"date_of_birth",required:!0},{question:"Gender",inputType:"select",options:["Male","Female"],key:"gender",required:!0},{question:"What is the relationship to Driver #1?",inputType:"select",options:["Spouse","Parent","Child","Domestic Partner","Relative","Employee","Other"],key:"relationship_to_insured",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed"],key:"marital_status",required:!0}]}]}],p_=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Type of residence",inputType:"select",options:["Single Family Dwelling","Condo","Apartment","Townhouse","Mobile Home"],key:"residence_type",required:!0},{question:"Please select your current auto insurance company",inputType:"select",options:f_,key:"auto_prior_carrier_name",required:!0,conditionals:[{conditionalType:"notEquals",conditionalValue:"NoPriorInsurance",conditionalQuestions:[{question:"Years with prior personal auto carrier",inputType:"number",key:"auto_prior_years",required:!0},{question:"Months with prior personal auto carrier",inputType:"number",key:"auto_prior_months",required:!0},{question:"When does the current policy expire?",inputType:"date",key:"auto_prior_expiration_date",required:!0},{question:"What is your current or most recent Bodily Injury Limit?",inputType:"select",options:m_,key:"auto_prior_liability_limit",required:!0}]}]},{question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0},{question:"Bodily Injury liability",inputType:"select",options:m_,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],DP=[{question:"Year built",inputType:"number",key:"year_built",required:!0},{question:"Total living area (sq ft)",inputType:"number",key:"total_area_sq_ft",required:!0},{question:"Dwelling type",inputType:"select",options:["Single Family","Condo","Townhouse","Multi-Family"],key:"dwelling_type",required:!0},{question:"Construction type",inputType:"select",options:["Frame","Masonry","Masonry Veneer","Fire Resistive"],key:"construction_type",required:!0},{question:"Roof material",inputType:"select",options:["Asphalt Shingle","Metal","Tile","Wood Shake","Slate"],key:"roof_material_type",required:!0},{question:"Number of stories",inputType:"select",options:["1","1.5","2","2.5","3"],key:"number_of_stories",required:!0}],h_=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Do you currently have a Homeowners policy?",inputType:"radio",options:["Yes","No"],key:"home_has_prior_insurance",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestions:[{question:"Which carrier currently insures the home?",inputType:"select",options:f_,key:"home_prior_carrier_name",required:!0}]}]},{question:"Personal liability limit",inputType:"select",options:["100000","300000","500000","1000000"],key:"home_personal_liability",required:!0},{question:"All-perils deductible",inputType:"select",options:["500","1000","2500","5000"],key:"home_all_perils_deductible",required:!0}],SP=[...h_,...p_],CP={Zip:gP,Email:yP,Product:bP,Name:_P,Vehicle:vP,Driver:EP,AutoCurrentCarrier:p_,Home:DP,HomePolicy:h_,BundlePolicy:SP,Demographics:[{question:"Gender",inputType:"radio",options:["Male","Female"],key:"gender",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed","Domestic Partner"],key:"marital_status",required:!0},{question:"Employment industry",inputType:"select",options:["Technology","Healthcare","Education","Finance","Retail","Construction","Other"],key:"employment_industry",required:!0},{question:"How many occupants live in the household?",inputType:"number",key:"household_size",required:!0},{question:"Do you authorize us to check your credit?",inputType:"radio",options:["Yes","No"],key:"order_credit_authorized",required:!0}],Ssn:[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],Phone:[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],SMSVerification:[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}]};function wP(e){return CP[e]??[]}const xP=[{quote_rate_id:"mock-rate-1",carrier_name:"Progressive",carrier_logo_base64:null,carrier_quote_id:"MOCK-PRG-001",premium_cents:142800,monthly_premium_cents:11900,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-2",carrier_name:"Nationwide",carrier_logo_base64:null,carrier_quote_id:"MOCK-NW-002",premium_cents:156e3,monthly_premium_cents:13e3,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-3",carrier_name:"Liberty Mutual",carrier_logo_base64:null,carrier_quote_id:"MOCK-LM-003",premium_cents:173400,monthly_premium_cents:14450,term_months:12,lob:"auto",admitted_status:"non_admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-nq-1",carrier_name:"Travelers",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Upfront Underwriting",decline_reasons:["Consumer didn’t grant permission to review credit score."]},{quote_rate_id:"mock-nq-2",carrier_name:"NationalGeneral",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.","Monoline quoting is not allowed."]},{quote_rate_id:"mock-nq-3",carrier_name:"Allstate",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["This carrier will not quote if the credit disclosure is not accepted by the insured."]}],$P=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],AP={Toyota:["Camry","Corolla","RAV4","Highlander","Tacoma"],Honda:["Civic","Accord","CR-V","Pilot","Odyssey"],Ford:["F-150","Escape","Explorer","Mustang","Bronco"],Chevrolet:["Silverado","Equinox","Malibu","Tahoe","Camaro"],Tesla:["Model 3","Model Y","Model S","Model X"],Subaru:["Outback","Forester","Crosstrek","Impreza"]},kP=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function TP(e){return e.make&&e.model?{ready:!0,bodyStyles:kP}:e.make?{ready:!0,models:AP[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:$P}}function PP(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const xi="mock-quote-0001",g_="mock-jwt-token";let $a={quote_id:xi};function IP(e={}){$a={quote_id:xi,...e}}function MP(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:g_,quoteId:xi}:{isVerified:!0,token:g_}}function FP(e){return e.action==="vinDecode"?PP():TP({year:typeof e.year=="number"?e.year:void 0,make:typeof e.make=="string"?e.make:void 0,model:typeof e.model=="string"?e.model:void 0})}function OP(e,t){switch(e){case"/create-quote":return IP({postal_code:t.postal_code}),{quoteId:xi};case"/get-stages-for-quote":return{stages:pP($a.product)};case"/get-questions-by-stage":return{questions:wP(t.stage)};case"/update-quote":{const r={...t.payload??{}};return delete r.current_stage,$a={...$a,...r},{status:"success"}}case"/verify-quote":return MP(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:xP};case"/get-quote":return{quote:$a};case"/get-vehicle-options":return FP(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}const BP=Object.freeze(Object.defineProperty({__proto__:null,handleMockRequest:OP},Symbol.toStringTag,{value:"Module"}));pt.CredifyInsuranceWidget=wi,pt.default=wi,Object.defineProperties(pt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
116
+ `}),m.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:m.jsxs("div",{style:{width:"100%",maxWidth:560},children:[m.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[m.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:o.accent+"12",border:`1px solid ${o.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[m.jsx("span",{style:{fontSize:14},"aria-hidden":"true",children:o.icon}),m.jsx("span",{style:{fontSize:12,fontWeight:700,color:o.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:o.label})]}),m.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:G?"Connecting to top carriers":"Fetching your best rates"}),m.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:G?"Identifying the carriers eligible for your quote...":Z?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),m.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:G?m.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(M=>m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[m.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${M*.12}s`}}),m.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${M*.12}s`}})]},`skeleton-${M}`))}):O?m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[m.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:O.color+"18",border:`2px solid ${O.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:O.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[O.abbr,m.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${O.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"},"aria-hidden":"true"})]}),m.jsx("span",{style:{fontSize:13,fontWeight:600,color:O.color,letterSpacing:"0.04em"},children:O.name})]}):null}),m.jsxs("div",{className:`iq-card-fade ${_?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[m.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:G||!O?m.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[m.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),m.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),m.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{position:"relative",flexShrink:0},children:[m.jsx(gT,{progress:p,color:O.color,size:80}),m.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:m.jsxs("span",{style:{fontSize:14,fontWeight:700,color:O.color},"aria-hidden":"true",children:[Math.round(p),"%"]})})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:Z?"Still checking":"Now checking"}),m.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:O.name}),m.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},role:"status","aria-live":"polite",children:Pl[g]},`${u}-${g}`)]})]})}),m.jsxs("div",{children:[m.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:G?"Initializing":"Gathering quotes"}),m.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:m.jsx("div",{style:{height:"100%",width:"35%",background:o.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"},"aria-hidden":"true"})})]})]})]})})]})}function qb({onGoBack:e}){return m.jsxs("section",{className:"mt-4",role:"alert","aria-labelledby":"submission-error-title",children:[m.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[m.jsx("h3",{id:"submission-error-title",className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),m.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),m.jsx("div",{className:"mt-5",children:m.jsx("button",{type:"button",onClick:e,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}var Il={intercomAppId:"",cobrowseLicense:""};function bT(){try{return typeof Il<"u"&&Il?Il:{}}catch{return{}}}function _T(e){const t=bT(),r=e?.intercomAppId??t.intercomAppId,n=e?.cobrowseLicense??t.cobrowseLicense;return{enabled:(e?.enabled??!0)&&!!(r||n),intercomAppId:r||void 0,cobrowseLicense:n||void 0,proactiveOnError:e?.proactiveOnError??!0}}const Ml=new Map;function Kb(e){if(typeof document>"u")return Promise.reject(new Error("loadScript called without a document"));const t=Ml.get(e);if(t)return t;const r=new Promise((n,a)=>{const o=document.createElement("script");o.src=e,o.async=!0,o.onload=()=>n(),o.onerror=()=>{Ml.delete(e),a(new Error(`Failed to load script: ${e}`))},document.head.appendChild(o)});return Ml.set(e,r),r}let Fl=!1;function vT(){if(typeof window.Intercom=="function")return window.Intercom;const e=function(...t){e.c?.(t)};return e.q=[],e.c=t=>{e.q.push(t)},window.Intercom=e,e}function ET(e){const t={app_id:e,hide_default_launcher:!0},r=ui();return r&&(t.quote_id=r),t}function Yb(e){if(typeof window>"u")return;vT();const t=ET(e);if(window.intercomSettings=t,Fl){window.Intercom("update",t);return}window.Intercom("boot",t),Fl=!0,Kb(`https://widget.intercom.io/widget/${e}`).catch(()=>{})}function DT(){typeof window?.Intercom=="function"&&window.Intercom("show")}function ST(e){typeof window?.Intercom=="function"&&window.Intercom("showNewMessage",e)}function CT(e){typeof window?.Intercom=="function"&&window.Intercom("update",e)}function wT(){if(typeof window?.Intercom=="function")try{window.Intercom("shutdown")}catch{}Fl=!1}const xT="https://js.cobrowse.io/CobrowseIO.js";let Ol=!1;async function $T(e){await Kb(xT);const t=window.CobrowseIO;if(!t)return null;if(!Ol){t.license=e,t.redactedViews=["input","select","textarea","[data-credify-redact]"],t.customData={quote_id:ui()??void 0,device_name:"Credify Insurance Widget"},t.confirmSession=()=>Promise.resolve(typeof window<"u"?window.confirm("Allow a Credify support agent to view your screen?"):!1);try{await t.client?.()}catch{}t.start?.(),Ol=!0}return t}async function AT(e){if(typeof window>"u")return null;try{const t=await $T(e);return t?.createSessionCode?await t.createSessionCode():null}catch{return null}}function kT(){try{window.CobrowseIO?.stop?.()}catch{}Ol=!1}const TT="Hi! It looks like something went wrong submitting your quote. We're here to help — tell us what you were trying to do and we'll jump in.";let At=null,Ei=null,Bl=!1;function PT(e){Wb();const t=_T(e);if(At=t,!!t.enabled&&t.proactiveOnError&&t.intercomAppId){const r=n=>{Bl||(Bl=!0,Yb(t.intercomAppId),CT({last_quote_error:n?.reason??"unknown"}),ST(TT))};Cb("submissionFailed",r),Ei=r}}function Qb(){!At?.enabled||!At.intercomAppId||(Yb(At.intercomAppId),DT())}function Xb(){return!At?.enabled||!At.cobrowseLicense?Promise.resolve(null):AT(At.cobrowseLicense)}function IT(){return!!(At?.enabled&&At.intercomAppId)}function MT(){return!!(At?.enabled&&At.cobrowseLicense)}function Wb(){Ei&&(wb("submissionFailed",Ei),Ei=null),wT(),kT(),Bl=!1,At=null}const FT="Chat with our support team in real time — we'll help you finish your quote.",OT="Share your screen with a support agent so they can see what you see and guide you in real time. We'll generate a secure code — share it with your agent to begin. Your personal information stays hidden.",Jb="inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 disabled:opacity-60",e_="pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 w-60 -translate-x-1/2 rounded-lg bg-slate-800 px-3 py-2 text-center text-xs leading-snug text-white shadow-lg transition-opacity duration-150";function BT(){const e=IT(),t=MT(),[r,n]=d.useState(null),[a,o]=d.useState(!1),[i,s]=d.useState(!1),[u,l]=d.useState(null),c=d.useCallback(async()=>{o(!0),s(!1);try{const f=await Xb();f?n(f):s(!0)}finally{o(!1)}},[]);return!e&&!t?null:m.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-sm text-slate-500",children:[m.jsx("span",{className:"font-medium",children:"Need help?"}),m.jsxs("div",{className:"inline-flex items-center gap-1",children:[e&&m.jsxs("span",{className:"relative inline-flex",onMouseEnter:()=>l("chat"),onMouseLeave:()=>l(null),children:[m.jsx("button",{type:"button",onClick:Qb,onFocus:()=>l("chat"),onBlur:()=>l(null),onKeyDown:f=>{f.key==="Escape"&&(f.stopPropagation(),l(null))},"aria-label":"Chat with support","aria-describedby":"credify-chat-tooltip",className:Jb,children:m.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:m.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 9 9 0 0 1-3.8-.8L3 21l1.3-4.2A8.38 8.38 0 0 1 3.5 11.5 8.5 8.5 0 0 1 12 3a8.38 8.38 0 0 1 9 8.5Z",strokeLinejoin:"round"})})}),m.jsx("span",{id:"credify-chat-tooltip",role:"tooltip",className:`${e_} ${u==="chat"?"opacity-100":"opacity-0"}`,children:FT})]}),e&&t&&m.jsx("span",{className:"mx-1 h-6 w-px bg-slate-200","aria-hidden":"true"}),t&&m.jsxs("span",{className:"relative inline-flex",onMouseEnter:()=>l("screen"),onMouseLeave:()=>l(null),children:[m.jsx("button",{type:"button",onClick:c,disabled:a,onFocus:()=>l("screen"),onBlur:()=>l(null),onKeyDown:f=>{f.key==="Escape"&&(f.stopPropagation(),l(null))},"aria-label":"Share your screen with an agent","aria-describedby":"credify-cobrowse-tooltip",className:Jb,children:a?m.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600","aria-hidden":"true"}):m.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[m.jsx("rect",{x:"2.5",y:"4",width:"19",height:"13",rx:"2"}),m.jsx("path",{d:"M8 21h8M12 17v4",strokeLinecap:"round"}),m.jsx("path",{d:"M12 13V8m0 0-2 2m2-2 2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),m.jsx("span",{id:"credify-cobrowse-tooltip",role:"tooltip",className:`${e_} ${u==="screen"?"opacity-100":"opacity-0"}`,children:OT})]})]}),r&&m.jsxs("span",{children:["Read this code to your agent: ",m.jsx("strong",{className:"tracking-widest text-text-primary",children:r})]}),i&&m.jsx("span",{className:"text-red-600",children:"Couldn't start screen sharing. Please try chat instead."})]})}const t_="credify_rt";let Di=null;function LT(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(t_);if(!t)return;Di=t,e.searchParams.delete(t_),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function RT(){return Di!==null}function NT(){const e=Di;return Di=null,e}const r_="credify_test",n_="credify_test_mode";let Si=!1;function UT(e){return e===""||/^(1|true|yes)$/i.test(e.trim())}function HT(){try{if(typeof window>"u")return;window.sessionStorage?.getItem(n_)==="1"&&(Si=!0);const e=new URL(window.location.href),t=e.searchParams.get(r_);if(t!==null){Si=UT(t);try{window.sessionStorage?.setItem(n_,Si?"1":"0")}catch{}e.searchParams.delete(r_),window.history.replaceState(window.history.state,"",e.toString())}}catch(e){console.error("Failed to capture test mode from URL:",e)}}function VT(){return Si}function ye(e){if(e===!0)return"Yes";if(e===!1)return"No"}function mt(e){if(e)try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?void 0:t.toISOString().split("T")[0]}catch{return}}function zT(e){const t=e,r={};t.phone&&(r.phone=t.phone),t.first_name&&(r.first_name=t.first_name),t.last_name&&(r.last_name=t.last_name),t.email&&(r.email=t.email),t.date_of_birth&&(r.date_of_birth=mt(t.date_of_birth)),t.product&&(r.product=t.product),t.state&&(r.state=t.state),t.postal_code&&(r.postal_code=t.postal_code);const n=[];t.line_1&&n.push(t.line_1),t.line_2&&n.push(t.line_2),t.city&&n.push(t.city),t.state&&n.push(t.state),t.postal_code&&n.push(t.postal_code),n.length>0&&(r.address=n.join(", ")),typeof t.ssn_display=="string"&&(r.ssn_display=t.ssn_display),t.years_at_address!==null&&t.years_at_address!==void 0&&(r.years_at_address=t.years_at_address),t.months_at_address!==null&&t.months_at_address!==void 0&&(r.months_at_address=t.months_at_address),t.move_in_date&&(r.move_in_date=mt(t.move_in_date));const a=[];t.prior_line_1&&a.push(t.prior_line_1),t.prior_line_2&&a.push(t.prior_line_2),t.prior_city&&a.push(t.prior_city),t.prior_state&&a.push(t.prior_state),t.prior_postal_code&&a.push(t.prior_postal_code),a.length>0&&(r.prior_address=a.join(", ")),t.years_at_prior_address!==null&&t.years_at_prior_address!==void 0&&(r.years_at_prior_address=t.years_at_prior_address),t.is_mailing_address_different!==null&&t.is_mailing_address_different!==void 0&&(r.is_mailing_address_different=ye(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=mt(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=ye(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=mt(t.auto_prior_expiration_date)),t.auto_prior_carrier_name&&(r.auto_prior_carrier_name=t.auto_prior_carrier_name),t.auto_prior_liability_limit&&(r.auto_prior_liability_limit=t.auto_prior_liability_limit),t.auto_reason_for_no_insurance&&(r.auto_reason_for_no_insurance=t.auto_reason_for_no_insurance),t.auto_prior_years!==null&&t.auto_prior_years!==void 0&&(r.auto_prior_years=t.auto_prior_years),t.auto_prior_months!==null&&t.auto_prior_months!==void 0&&(r.auto_prior_months=t.auto_prior_months),t.auto_continuous_coverage_years!==null&&t.auto_continuous_coverage_years!==void 0&&(r.auto_continuous_coverage_years=t.auto_continuous_coverage_years),t.auto_cancelled_declined_refused_to_renew!==null&&t.auto_cancelled_declined_refused_to_renew!==void 0&&(r.auto_cancelled_declined_refused_to_renew=ye(t.auto_cancelled_declined_refused_to_renew)),t.auto_current_annual_premium_cents!==null&&t.auto_current_annual_premium_cents!==void 0&&(r.auto_current_annual_premium_cents=t.auto_current_annual_premium_cents),t.policy_bi&&(r.policy_bi=t.policy_bi),t.policy_um&&(r.policy_um=t.policy_um),t.policy_pd&&(r.policy_pd=t.policy_pd),t.policy_mp&&(r.policy_mp=t.policy_mp),t.policy_umpd&&(r.policy_umpd=t.policy_umpd),t.policy_pip&&(r.policy_pip=t.policy_pip),t.policy_auto_death_indemnity&&(r.policy_auto_death_indemnity=t.policy_auto_death_indemnity),t.driver_vehicle_assignments&&(r.driver_vehicle_assignments=t.driver_vehicle_assignments),t.home_has_prior_insurance!==null&&t.home_has_prior_insurance!==void 0&&(r.home_has_prior_insurance=ye(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=mt(t.home_prior_expiration_date)),t.home_prior_carrier_name&&(r.home_prior_carrier_name=t.home_prior_carrier_name),t.home_prior_years!==null&&t.home_prior_years!==void 0&&(r.home_prior_years=t.home_prior_years),t.home_continuous_coverage_years!==null&&t.home_continuous_coverage_years!==void 0&&(r.home_continuous_coverage_years=t.home_continuous_coverage_years),t.property_insurance_cancelled!==null&&t.property_insurance_cancelled!==void 0&&(r.property_insurance_cancelled=ye(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=ye(t.lapse_in_coverage)),t.year_built!==null&&t.year_built!==void 0&&(r.year_built=t.year_built),t.number_of_units!==null&&t.number_of_units!==void 0&&(r.number_of_units=t.number_of_units),t.number_of_stories!==null&&t.number_of_stories!==void 0&&(r.number_of_stories=t.number_of_stories),t.number_of_beds!==null&&t.number_of_beds!==void 0&&(r.number_of_beds=t.number_of_beds),t.number_of_full_baths!==null&&t.number_of_full_baths!==void 0&&(r.number_of_full_baths=t.number_of_full_baths),t.number_of_partial_baths!==null&&t.number_of_partial_baths!==void 0&&(r.number_of_partial_baths=t.number_of_partial_baths),t.under_construction!==null&&t.under_construction!==void 0&&(r.under_construction=ye(t.under_construction)),t.distance_from_fire_hydrant_ft&&(r.distance_from_fire_hydrant_ft=t.distance_from_fire_hydrant_ft),t.distance_from_fire_station_miles&&(r.distance_from_fire_station_miles=t.distance_from_fire_station_miles),t.architectural_style&&(r.architectural_style=t.architectural_style),t.dwelling_type&&(r.dwelling_type=t.dwelling_type),t.construction_quality&&(r.construction_quality=t.construction_quality),t.located_over_water!==null&&t.located_over_water!==void 0&&(r.located_over_water=t.located_over_water),t.construction_type&&(r.construction_type=t.construction_type),t.exterior_wall_type&&(r.exterior_wall_type=t.exterior_wall_type),t.foundation_type&&(r.foundation_type=t.foundation_type),t.roof_material_type&&(r.roof_material_type=t.roof_material_type),t.roof_shape&&(r.roof_shape=t.roof_shape),t.roof_updated_type&&(r.roof_updated_type=t.roof_updated_type),t.year_roof_updated!==null&&t.year_roof_updated!==void 0&&(r.year_roof_updated=t.year_roof_updated),t.mit_credit_form!==null&&t.mit_credit_form!==void 0&&(r.mit_credit_form=ye(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=ye(t.storm_shutters)),t.heating_type&&(r.heating_type=t.heating_type),t.oil_tank_location&&(r.oil_tank_location=t.oil_tank_location),t.heating_fuel_type&&(r.heating_fuel_type=t.heating_fuel_type),t.number_of_fireplaces!==null&&t.number_of_fireplaces!==void 0&&(r.number_of_fireplaces=t.number_of_fireplaces),t.basement_type&&(r.basement_type=t.basement_type),t.parking_type&&(r.parking_type=t.parking_type),t.garage_type&&(r.garage_type=t.garage_type),t.number_of_parking_spaces!==null&&t.number_of_parking_spaces!==void 0&&(r.number_of_parking_spaces=t.number_of_parking_spaces),t.plumbing_type&&(r.plumbing_type=t.plumbing_type),t.pool_type&&(r.pool_type=t.pool_type),t.total_area_sq_ft!==null&&t.total_area_sq_ft!==void 0&&(r.total_area_sq_ft=t.total_area_sq_ft),t.parcel_area_sq_ft!==null&&t.parcel_area_sq_ft!==void 0&&(r.parcel_area_sq_ft=t.parcel_area_sq_ft),t.residence_type&&(r.residence_type=t.residence_type),t.usage_type&&(r.usage_type=t.usage_type),t.household_size!==null&&t.household_size!==void 0&&(r.household_size=t.household_size),t.number_of_mortgagees!==null&&t.number_of_mortgagees!==void 0&&(r.number_of_mortgagees=t.number_of_mortgagees),t.has_dog!==null&&t.has_dog!==void 0&&(r.has_dog=ye(t.has_dog)),t.dog_breed_type&&(r.dog_breed_type=t.dog_breed_type),t.number_of_dogs!==null&&t.number_of_dogs!==void 0&&(r.number_of_dogs=t.number_of_dogs),t.has_vicious_animals!==null&&t.has_vicious_animals!==void 0&&(r.has_vicious_animals=ye(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=ye(t.has_business_on_premises)),t.business_class&&(r.business_class=t.business_class),t.occupancy_type&&(r.occupancy_type=t.occupancy_type),t.short_term_rental!==null&&t.short_term_rental!==void 0&&(r.short_term_rental=ye(t.short_term_rental)),t.sale_price_cents!==null&&t.sale_price_cents!==void 0&&(r.sale_price_cents=Math.round(Number(t.sale_price_cents)/100)),t.number_of_families!==null&&t.number_of_families!==void 0&&(r.number_of_families=t.number_of_families),t.number_of_units_in_firewall!==null&&t.number_of_units_in_firewall!==void 0&&(r.number_of_units_in_firewall=t.number_of_units_in_firewall),t.heating_update_yn!==null&&t.heating_update_yn!==void 0&&(r.heating_update_yn=ye(t.heating_update_yn)),t.heating_update_type&&(r.heating_update_type=t.heating_update_type),t.heating_update_year!==null&&t.heating_update_year!==void 0&&(r.heating_update_year=t.heating_update_year),t.plumbing_update_yn!==null&&t.plumbing_update_yn!==void 0&&(r.plumbing_update_yn=ye(t.plumbing_update_yn)),t.plumbing_update_type&&(r.plumbing_update_type=t.plumbing_update_type),t.plumbing_update_year!==null&&t.plumbing_update_year!==void 0&&(r.plumbing_update_year=t.plumbing_update_year),t.electrical_update_yn!==null&&t.electrical_update_yn!==void 0&&(r.electrical_update_yn=ye(t.electrical_update_yn)),t.electrical_update_type&&(r.electrical_update_type=t.electrical_update_type),t.electrical_update_year!==null&&t.electrical_update_year!==void 0&&(r.electrical_update_year=t.electrical_update_year),t.electric_circuit_breaker!==null&&t.electric_circuit_breaker!==void 0&&(r.electric_circuit_breaker=ye(t.electric_circuit_breaker)),t.dwelling_replacement_cost!==null&&t.dwelling_replacement_cost!==void 0&&(r.dwelling_replacement_cost=t.dwelling_replacement_cost),t.other_structures_coverage!==null&&t.other_structures_coverage!==void 0&&(r.other_structures_coverage=t.other_structures_coverage),t.personal_property_coverage!==null&&t.personal_property_coverage!==void 0&&(r.personal_property_coverage=t.personal_property_coverage),t.loss_of_use_coverage!==null&&t.loss_of_use_coverage!==void 0&&(r.loss_of_use_coverage=t.loss_of_use_coverage),t.personal_liability&&(r.personal_liability=t.personal_liability),t.dwelling_medical_payments&&(r.dwelling_medical_payments=t.dwelling_medical_payments),t.all_perils_deductible&&(r.all_perils_deductible=t.all_perils_deductible),t.windstorm_deductible&&(r.windstorm_deductible=t.windstorm_deductible),t.has_garage!==null&&t.has_garage!==void 0&&(r.has_garage=ye(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=ye(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=ye(t.has_trampoline)),t.gender&&(r.gender=t.gender),t.marital_status&&(r.marital_status=t.marital_status),t.employment_industry&&(r.employment_industry=t.employment_industry),t.occupation&&(r.occupation=t.occupation),t.has_co_applicant!==null&&t.has_co_applicant!==void 0&&(r.has_co_applicant=ye(t.has_co_applicant)),t.co_applicant_first_name&&(r.co_applicant_first_name=t.co_applicant_first_name),t.co_applicant_middle_name&&(r.co_applicant_middle_name=t.co_applicant_middle_name),t.co_applicant_last_name&&(r.co_applicant_last_name=t.co_applicant_last_name),t.co_applicant_gender&&(r.co_applicant_gender=t.co_applicant_gender),t.co_applicant_marital_status&&(r.co_applicant_marital_status=t.co_applicant_marital_status),t.co_applicant_relationship&&(r.co_applicant_relationship=t.co_applicant_relationship),t.co_applicant_date_of_birth&&(r.co_applicant_date_of_birth=mt(t.co_applicant_date_of_birth)),t.co_applicant_employment_industry&&(r.co_applicant_employment_industry=t.co_applicant_employment_industry),t.co_applicant_occupation&&(r.co_applicant_occupation=t.co_applicant_occupation),t.retiree_discount!==null&&t.retiree_discount!==void 0&&(r.retiree_discount=ye(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=ye(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=ye(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=ye(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=ye(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=ye(t.fire_detection_system)),t.fire_detection_system_type&&(r.fire_detection_system_type=t.fire_detection_system_type),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=ye(t.burglar_alarm_system)),t.burglar_alarm_system_type&&(r.burglar_alarm_system_type=t.burglar_alarm_system_type),t.smoke_detectors!==null&&t.smoke_detectors!==void 0&&(r.smoke_detectors=ye(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=ye(t.sprinkler_system)),t.sprinkler_system_type&&(r.sprinkler_system_type=t.sprinkler_system_type),t.gas_leakage_detector!==null&&t.gas_leakage_detector!==void 0&&(r.gas_leakage_detector=ye(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=ye(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=ye(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=ye(t.order_credit_authorized)),t.has_health_insurance_auto_accident!==null&&t.has_health_insurance_auto_accident!==void 0&&(r.has_health_insurance_auto_accident=ye(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=ye(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=ye(t.named_insured_foreclosure_repo_bankruptcy)),t.named_insured_convicted_insurance_fraud!==null&&t.named_insured_convicted_insurance_fraud!==void 0&&(r.named_insured_convicted_insurance_fraud=ye(t.named_insured_convicted_insurance_fraud));const o={};if(t.vehicles)for(const i of t.vehicles)i.quote_vehicle_id&&i.vin&&(o[i.quote_vehicle_id]=i.vin);return t.drivers&&t.drivers.length>0?(r.drivers="Yes",r.drivers__items=t.drivers.map(i=>{const s=i,u={};s.first_name&&(u.first_name=s.first_name),s.middle_name&&(u.middle_name=s.middle_name),s.last_name&&(u.last_name=s.last_name),s.date_of_birth&&(u.date_of_birth=mt(s.date_of_birth)),s.gender&&(u.gender=s.gender),s.marital_status&&(u.marital_status=s.marital_status),s.relationship_to_insured&&(u.relationship_to_insured=s.relationship_to_insured),s.is_registered_owner!==null&&s.is_registered_owner!==void 0&&(u.is_registered_owner=s.is_registered_owner?"Yes":"No"),s.license_state&&(u.license_state=s.license_state),s.license_status&&(u.license_status=s.license_status),s.license_number&&(u.license_number=s.license_number),s.date_first_licensed&&(u.date_first_licensed=mt(s.date_first_licensed)),s.education_level&&(u.education_level=By(s.education_level)),s.occupation&&(u.occupation=Ly(s.occupation)),s.industry&&(u.industry=ai(s.industry)),s.employment_status&&(u.employment_status=s.employment_status),s.last_5_years_license_suspended_or_revoked!==null&&s.last_5_years_license_suspended_or_revoked!==void 0&&(u.last_5_years_license_suspended_or_revoked=ye(s.last_5_years_license_suspended_or_revoked)),s.accident_prevention_course!==null&&s.accident_prevention_course!==void 0&&(u.accident_prevention_course=ye(s.accident_prevention_course)),s.accident_prevention_course_date&&(u.accident_prevention_course_date=mt(s.accident_prevention_course_date)),s.sr22!==null&&s.sr22!==void 0&&(u.sr22=ye(s.sr22));const l=s.ssn_display;typeof l=="string"&&(u.ssn_display=l);const c=s.driver_violations;c&&c.length>0&&(u.driver_violations="Yes",u.driver_violations__items=c.map(h=>{const g={};return h.code&&(g.code=h.code),h.occurred_at&&(g.occurred_at=mt(h.occurred_at)),g}));const f=s.driver_accidents;f&&f.length>0&&(u.driver_accidents="Yes",u.driver_accidents__items=f.map(h=>{const g={};return h.occurred_at&&(g.occurred_at=mt(h.occurred_at)),h.description&&(g.description=h.description),h.quote_vehicle_id&&(g.quote_vehicle_id=o[h.quote_vehicle_id]??h.quote_vehicle_id),h.property_damage_amount_paid_cents!==null&&h.property_damage_amount_paid_cents!==void 0&&(g.property_damage_amount_paid_cents=h.property_damage_amount_paid_cents),h.personal_injury_amount_paid_cents!==null&&h.personal_injury_amount_paid_cents!==void 0&&(g.personal_injury_amount_paid_cents=h.personal_injury_amount_paid_cents),g}));const p=s.losses;return p&&p.length>0&&(u.losses="Yes",u.losses__items=p.map(h=>{const g={};return h.description&&(g.description=h.description),h.date_of_incident&&(g.date_of_incident=mt(h.date_of_incident)),h.amount_paid_cents!==null&&h.amount_paid_cents!==void 0&&(g.amount_paid_cents=h.amount_paid_cents),h.quote_vehicle_id&&(g.quote_vehicle_id=o[h.quote_vehicle_id]??h.quote_vehicle_id),g})),u})):r.drivers="No",t.vehicles&&t.vehicles.length>0?(r.vehicles="Yes",r.vehicles__items=t.vehicles.map(i=>{const s=i,u={};s.vin&&(u.vin=s.vin),s.year!==null&&s.year!==void 0&&(u.year=String(s.year)),s.make&&(u.make=s.make),s.model&&(u.model=s.model),s.body_style&&(u.body_style=s.body_style),s.ownership_type&&(u.ownership_type=s.ownership_type),s.usage&&(u.usage=s.usage),s.annual_mileage!==null&&s.annual_mileage!==void 0&&(u.annual_mileage=s.annual_mileage),s.miles_to_work!==null&&s.miles_to_work!==void 0&&(u.miles_to_work=s.miles_to_work),s.percent_to_work!==null&&s.percent_to_work!==void 0&&(u.percent_to_work=s.percent_to_work);const l=[];return s.garaging_address_line_1&&l.push(s.garaging_address_line_1),s.garaging_address_line_2&&l.push(s.garaging_address_line_2),s.garaging_address_city&&l.push(s.garaging_address_city),s.garaging_address_state&&l.push(s.garaging_address_state),s.garaging_address_postal_code&&l.push(s.garaging_address_postal_code),l.length>0&&(u.garaging_address=l.join(", ")),s.new_when_purchased!==null&&s.new_when_purchased!==void 0&&(u.new_when_purchased=ye(s.new_when_purchased)),s.purchase_date&&(u.purchase_date=mt(s.purchase_date)),s.anti_theft_type&&(u.anti_theft_type=s.anti_theft_type),s.passive_restraint_type&&(u.passive_restraint_type=s.passive_restraint_type),s.anti_lock_brakes!==null&&s.anti_lock_brakes!==void 0&&(u.anti_lock_brakes=ye(s.anti_lock_brakes)),s.daytime_running_lights!==null&&s.daytime_running_lights!==void 0&&(u.daytime_running_lights=ye(s.daytime_running_lights)),s.custom_equipment_value_cents!==null&&s.custom_equipment_value_cents!==void 0&&(u.custom_equipment_value_cents=s.custom_equipment_value_cents),s.cost_new_value_cents!==null&&s.cost_new_value_cents!==void 0&&(u.cost_new_value_cents=s.cost_new_value_cents),s.stated_value_amount_cents!==null&&s.stated_value_amount_cents!==void 0&&(u.stated_value_amount_cents=s.stated_value_amount_cents),s.vehicle_has_modifications!==null&&s.vehicle_has_modifications!==void 0&&(u.vehicle_has_modifications=ye(s.vehicle_has_modifications)),s.vehicle_garaged_at_residence!==null&&s.vehicle_garaged_at_residence!==void 0&&(u.vehicle_garaged_at_residence=ye(s.vehicle_garaged_at_residence)),s.vehicle_comp_deductible&&(u.vehicle_comp_deductible=s.vehicle_comp_deductible),s.vehicle_coll_deductible&&(u.vehicle_coll_deductible=s.vehicle_coll_deductible),s.vehicle_towing_and_labor&&(u.vehicle_towing_and_labor=s.vehicle_towing_and_labor),s.vehicle_transportation_expense&&(u.vehicle_transportation_expense=s.vehicle_transportation_expense),s.vehicle_full_glass!==null&&s.vehicle_full_glass!==void 0&&(u.vehicle_full_glass=ye(s.vehicle_full_glass)),s.vehicle_loan_lease!==null&&s.vehicle_loan_lease!==void 0&&(u.vehicle_loan_lease=ye(s.vehicle_loan_lease)),s.coverages&&s.coverages.length>0&&(u.coverages__items=s.coverages.map(c=>{const f={};return c.type&&(f.type=c.type),c.per_person_limit_cents!==null&&c.per_person_limit_cents!==void 0&&(f.per_person_limit_cents=c.per_person_limit_cents),c.per_incident_limit_cents!==null&&c.per_incident_limit_cents!==void 0&&(f.per_incident_limit_cents=c.per_incident_limit_cents),c.per_incident_limit_percent!==null&&c.per_incident_limit_percent!==void 0&&(f.per_incident_limit_percent=c.per_incident_limit_percent),c.per_day_limit_cents!==null&&c.per_day_limit_cents!==void 0&&(f.per_day_limit_cents=c.per_day_limit_cents),c.deductible_cents!==null&&c.deductible_cents!==void 0&&(f.deductible_cents=c.deductible_cents),c.is_declined!==null&&c.is_declined!==void 0&&(f.is_declined=ye(c.is_declined)),f})),s.vehicle_lienholders&&s.vehicle_lienholders.length>0&&(u.vehicle_lienholders__items=s.vehicle_lienholders.map(c=>{const f={};return c.name&&(f.name=c.name),c.type&&(f.type=c.type),c.line_1&&(f.line_1=c.line_1),c.line_2&&(f.line_2=c.line_2),c.city&&(f.city=c.city),c.state&&(f.state=c.state),c.postal_code&&(f.postal_code=c.postal_code),c.phone&&(f.phone=c.phone),c.fax&&(f.fax=c.fax),f})),u})):r.vehicles="No",t.losses&&t.losses.length>0?(r.home_losses="Yes",r.home_losses__items=t.losses.map(i=>{const s={};return i.description&&(s.description=i.description),i.date_of_incident&&(s.date_of_incident=mt(i.date_of_incident)),i.amount_paid_cents!==null&&i.amount_paid_cents!==void 0&&(s.amount_paid_cents=Math.round(Number(i.amount_paid_cents)/100)),s})):r.home_losses="No",r}const jT={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};function ZT(e){return jT[e]||e}const a_=new Set(["Zip","Product","Driver","Vehicle"]);function GT(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function o_(e,t){const r=GT(t),n=e.filter(o=>o.key!=="AutoPolicy"),a=n.length>0?n:e;return a}function qT(e,t){const r=e.findIndex(a=>a.key===t);return r<0?t:e[r+1]?.key??t}function i_(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function s_(e){return i_(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const KT={Auto:45e3,Home:5e4,Bundle:1e5},u_=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function YT(e,t){if(e!=="AutoCurrentCarrier")return t;const r=t.some(o=>String(o.key)==="auto_cancelled_declined_refused_to_renew"),n=t.some(o=>String(o.key)==="vehicle_policy_selections"),a=[...t];return r||a.push({question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0}),n||a.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),a}function QT(e,t){if(e!=="Vehicle")return t;const r=n=>n.map(a=>{const o=a.conditionals?.map(i=>{const s=i.conditionalQuestions??[];return s.length?{...i,conditionalQuestions:r(s)}:i});return String(a.key)!=="vin"?o?{...a,conditionals:o}:a:{...a,required:!1,...o?{conditionals:o}:{}}});return r(t)}function XT({isOpen:e,onClose:t}){const[r,n]=d.useState([]),[a,o]=d.useState(null),i=d.useRef(null);d.useEffect(()=>{i.current=a},[a]);const[s,u]=d.useState(null),[l,c]=d.useState(!1),[f,p]=d.useState(!1),[h,g]=d.useState(!1),[y,_]=d.useState(!1),[D,w]=d.useState([]),b=d.useRef(null),[C,v]=d.useState(null),[k,I]=d.useState(void 0),[G,O]=d.useState(!1),[Z,M]=d.useState(null),[X,de]=d.useState(null),[x,z]=d.useState(!1),[U,P]=d.useState(!1),[K,$]=d.useState(!1),T=d.useRef(!1),Y=d.useRef(null),se=d.useRef(null),te=d.useRef(null),H=d.useRef(null),[Q,A]=d.useState(!1);d.useEffect(()=>{if(!h||y)return;const L=s_(r);let J=!1;const W=[];let ie=0,oe=0;const ce=66,F=3,R=5e3;let re=!1;const ee=async()=>{if(J)return;ie++;try{const{quote:fe}=await ob(a??void 0);if(J)return;if(oe=0,!re){const De=fe?.appetites??null,_e=Yk(De,L);_e.length>0&&(w(_e),re=!0)}const pe=fe?.rates_status??null;if(pe==="completed"){const{rates:De}=await vl(a??void 0);if(J)return;b.current=De,_(!0);return}if(pe==="no_rates"){b.current=[],_(!0);return}if(pe==="failed"){Pn(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:i.current??void 0,phase:"rates_status_failed"}),xa({reason:"submission"}),M({message:"submission_failed"}),g(!1);return}}catch(fe){if(oe++,console.warn("Provider polling: getQuote failed",{attempt:ie,consecutiveFailures:oe,error:fe}),oe>=F){fe?.__sentryReported||Pn(fe,{quoteId:i.current??void 0,phase:"rates_polling",message:`Quote failed: ${F} consecutive get-quote poll failures`}),xa({reason:"network"}),M({message:"submission_failed"}),g(!1);return}}if(J)return;if(ie>=ce){Pn(new Error(`Quote failed: rate-generation timed out after ${ce} polls`),{quoteId:i.current??void 0,phase:"rates_polling_timeout"}),xa({reason:"timeout"}),M({message:"submission_failed"}),g(!1);return}const le=window.setTimeout(ee,R);W.push(le)};return ee(),()=>{J=!0,W.forEach(le=>window.clearTimeout(le))}},[h,y,r,a]);function S(L){return L.map(W=>({key:W,title:ZT(W),loadQuestions:async()=>{const ie=await zA(W,i.current??void 0);let oe=YT(W,ie.questions);return oe=QT(W,oe),oe}}))}d.useEffect(()=>{const L=async()=>{try{const J=NT();if(J)try{const{token:ie,quoteId:oe}=await ZA(J);ie&&oe&&(ci(ie),Hy(oe))}catch(ie){ie.statusCode===401&&P(!0)}const W=ui();if(di(),W){O(!0),o(W);try{const ie=Wt(),oe=await ob(ie?void 0:W);if(!oe||!oe.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:ce}=oe,{stages:F}=await fi(W),R=S(F);n(R);let re;try{re=zT(ce),v(re)}catch(_e){throw new Error(`Failed to transform quote data: ${_e instanceof Error?_e.message:"Unknown error"}`)}const ee=o_(R,re);n(ee);const le=ce?.review_status??null;if(p(le!=null),le==="pending_review"&&Wt()){$(!0);return}const fe=ce?.rates_status??null,pe=Wt()!=null;if(pe||le===null){if(fe==="completed")try{const{rates:_e}=await vl(pe?void 0:W);u(_e);return}catch(_e){console.warn("Failed to fetch completed rates on resume",_e)}else if(fe==="no_rates"){u([]);return}else if(fe==="processing"){w([]),_(!1),b.current=null,g(!0);return}}I(0)}catch(ie){const oe=ie;if(oe.statusCode===404)Vy(),o(null);else if(oe.statusCode===401){rb();try{const{stages:ce}=await fi(W),F=S(ce);n(F);const R=F.findIndex(re=>re.key==="SMSVerification");I(R>=0?R:F.length-1)}catch{}}}finally{O(!1)}}else{const{stages:ie}=await fi();n(S(ie))}}catch{O(!1)}};e&&!T.current&&(T.current=!0,L())},[e]),d.useEffect(()=>{if(!e)return;const{overflow:L}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=L}},[e]),d.useEffect(()=>{if(!e)return;H.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const L=window.setTimeout(()=>{const J=Y.current;if(!J)return;(J.querySelector(u_)??J).focus()},0);return()=>{window.clearTimeout(L);const J=H.current;H.current=null,J&&document.contains(J)&&J.focus()}},[e]);const E=d.useCallback(L=>{if(L.key==="Escape"){Q?(L.preventDefault(),A(!1)):(L.preventDefault(),A(!0));return}if(L.key!=="Tab")return;const J=Q?se.current:Y.current;if(!J)return;const W=Array.from(J.querySelectorAll(u_)).filter(F=>!F.hasAttribute("disabled")&&F.getAttribute("aria-hidden")!=="true");if(W.length===0){L.preventDefault(),J.focus();return}const ie=W[0],oe=W[W.length-1],ce=document.activeElement;L.shiftKey&&ce===ie?(L.preventDefault(),oe.focus()):!L.shiftKey&&ce===oe&&(L.preventDefault(),ie.focus())},[Q]);d.useEffect(()=>{if(e)return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[e,E]),d.useEffect(()=>{if(!Q)return;const L=window.setTimeout(()=>{te.current?.focus()},0);return()=>window.clearTimeout(L)},[Q]),d.useEffect(()=>{e||(v(null),I(void 0),O(!1),g(!1),de(null),z(!1),A(!1))},[e]),d.useEffect(()=>{e&&Ik()},[e]),d.useEffect(()=>{s&&Array.isArray(s)&&Bk({rateCount:s.length})},[s]);const j=d.useCallback(()=>{M(null),I(Math.max(0,r.length-1))},[r.length]),q=d.useCallback(async(L,J)=>{try{w([]),_(!1),b.current=null,g(!0);let W;try{W=await Dr(L,!0,a??void 0)}catch(ce){throw g(!1),ce}if(W.status==="submission_failed"){Pn(new Error(`Quote failed at submission: ${W.message}`),{quoteId:a??void 0,phase:J}),g(!1),_(!1),b.current=null,xa({reason:"submission"}),M({message:W.message});return}if(W.status==="success")try{const{rates:ce}=await vl(a??void 0);b.current=ce,_(!0)}catch(ce){throw g(!1),ce}const ie=r.length,oe=r[ie-1];xb({stageKey:oe?.key??"unknown",stageTitle:oe?.title??"unknown",stepIndex:ie,totalSteps:ie}),Ok()}catch(W){W?.__sentryReported||Pn(W,{quoteId:a??void 0,phase:J}),g(!1),xa({reason:"submission"}),M({message:"Oops, something went wrong. Please try again later."})}},[a,r]),ae=d.useCallback(async L=>{if(!(!X||!a||x)){z(!0);try{const W={...en(X.allValues),communications_consent:L};de(null),await q(W,"consent_submit")}finally{z(!1)}}},[X,a,x,q]),V=d.useCallback(async L=>{if(!(!a||x)){z(!0);try{v(L);const J={...en(L),customer_review_confirmed:!0};await q(J,"review_submit")}finally{z(!1)}}},[a,x,q]);if(!e)return null;const ue=()=>{A(!0)},ve=()=>{A(!1)},N=()=>{Mk(),t()},ne=!!(!Z&&s&&a&&!l);return m.jsxs("div",{ref:Y,className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",tabIndex:-1,children:[m.jsx("div",{className:"backdrop","aria-hidden":"true"}),m.jsxs("div",{className:`modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${ne?"max-w-6xl":"max-w-2xl"}`,role:"document",children:[m.jsx("h2",{id:"insurance-modal-title",className:"sr-only",children:"Credify insurance quote widget"}),m.jsx("button",{onClick:ue,className:"modal-close-btn absolute top-4 right-4","aria-label":"Close quote form",type:"button",children:m.jsx("span",{"aria-hidden":"true",children:"×"})}),!h&&!Z&&m.jsx("div",{className:"widget-modal-header text-center",children:m.jsx("h2",{className:"h1-title",children:"Let's shop multiple leading carriers for you"})}),m.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[U&&m.jsxs("div",{className:"mb-4 flex items-start justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-800",role:"alert",children:[m.jsx("span",{children:"This resume link has expired or is no longer valid. For your security, emailed links only work for a limited time — you can continue your quote below."}),m.jsx("button",{type:"button",onClick:()=>P(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),Z&&m.jsx(qb,{onGoBack:j}),!Z&&h&&(()=>{const L=s_(r);return m.jsx(yT,{providers:D,totalTime:KT[L],flow:L,isComplete:y,onComplete:()=>{g(!1),_(!1),w([]),b.current&&(u(b.current),b.current=null)}})})(),!Z&&!h&&X&&m.jsx(ww,{onChoose:ae,isSubmitting:x}),!Z&&!s&&!h&&!X&&m.jsx(m.Fragment,{children:G||r.length===0?m.jsx("div",{className:"flex items-center justify-center py-12",children:m.jsx("div",{className:"text-slate-600",children:"Loading..."})}):K&&a?m.jsx(hT,{stages:r,initialValues:C??{},quoteId:a,isSubmitting:x,onConfirmed:V}):m.jsx(Gk,{stages:r,initialValues:C??void 0,initialActive:k,quoteId:a??void 0,nonTerminalStageKeys:a_,onStageComplete:async(L,J)=>{try{const W=en(L);let ie=a,oe=r;const ce=oe.findIndex(re=>re.key===J),F=oe[ce],R=qT(oe,J);if(ie)if(J==="Phone"){const re=W.phone;if(!re)throw new Error("Phone number is required.");const ee=Wt();await Dr({...W,current_stage:R,suppress_verification_sms:!0},!1,ee?void 0:ie),await nb(ie,re)}else if(J==="SMSVerification"){const{isVerified:re,token:ee}=await _l(ie,W.sms_code);if(!re)throw new Error("Invalid SMS code");ee&&ci(ee),await Dr({current_stage:R},!1)}else if(J==="Product"){const re=Wt(),{isSupported:ee}=await ab(W.state,re?void 0:ie??void 0);if(await Dr({...W,current_stage:ee?R:J},!1,re?void 0:ie),!ee){const le=jb(W.state);throw new Error(`Sorry, Credify Corporation doesn't currently offer insurance in ${le}. We're expanding our coverage and hope to serve your state soon.`)}}else{const re=Wt();await Dr({...W,current_stage:R},!1,re?void 0:ie||void 0)}else{const re=W.postal_code??"";if(!re)throw new Error("ZIP code is required to start a quote.");const le=(await jA(re,VT()))?.quoteId;if(!le||typeof le!="string"||le.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${le}`);ie=le,o(le),Hy(le),await Dr({...W,current_stage:R},!1,le)}if(J==="Name"&&ie){const re=String(L.product??"");(re==="Auto"||re==="Both")&&vk(ie)}if(J==="Vehicle"&&ie&&Sk(ie),a_.has(J))try{const{stages:re}=await fi(ie||void 0);oe=S(re),oe=o_(oe,L),n(oe)}catch(re){console.warn("Unable to refresh stages after flow-shaping step",re)}return xb({stageKey:J,stageTitle:F?.title??J,stepIndex:ce+1,totalSteps:oe.length}),{success:!0,latestStages:oe}}catch(W){return{success:!1,error:W instanceof Error?W.message:"An error occurred"}}},onComplete:async(L,J)=>{if(!a)return{success:!1,error:"Oops, something went wrong. Please try again later."};v(L);try{if(J==="Phone"){const W=en(L);if(!W.phone)return{success:!1,error:"Phone number is required."};const oe=Wt();return await Dr({...W,suppress_verification_sms:!0},!1,oe?void 0:a),de({allValues:L}),{success:!0}}if(J==="SMSVerification"){const W=en(L),{isVerified:ie,token:oe,code:ce}=await _l(a,W.sms_code);return ie?(oe&&ci(oe),de({allValues:L}),{success:!0}):{success:!1,error:ce==="OTP_EXPIRED"?"That code has expired. Request a new one.":"Invalid SMS code"}}return de({allValues:L}),{success:!0}}catch{const ie="Oops, something went wrong. Please try again later.";return M({message:ie}),{success:!1,error:ie}}}})})," ",!Z&&s&&a&&m.jsx(rT,{rates:s,onBack:()=>u(null),isBundleFlow:i_(r),quoteId:a,initialPhone:C?.phone??"",requirePursueVerification:f,onSubScreenChange:c})]}),m.jsxs("div",{className:"widget-legal-footer space-y-1.5",children:[m.jsx(BT,{}),m.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})]}),Q&&m.jsx("div",{className:"close-confirm-backdrop",role:"presentation",children:m.jsxs("div",{ref:se,className:"close-confirm-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":"close-confirm-title","aria-describedby":"close-confirm-description",tabIndex:-1,children:[m.jsx("h3",{id:"close-confirm-title",children:"Close quote form?"}),m.jsx("p",{id:"close-confirm-description",children:"Your answers in this session will be lost if you close this window."}),m.jsxs("div",{className:"close-confirm-actions",children:[m.jsx("button",{ref:te,type:"button",className:"btn-outline",onClick:ve,children:"Keep editing"}),m.jsx("button",{type:"button",className:"btn-primary close-confirm-danger",onClick:N,children:"Close form"})]})]})})]})]})}function WT({onClose:e}){return m.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[m.jsx("div",{className:"backdrop","aria-hidden":"true"}),m.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:m.jsx(qb,{onGoBack:e})})]})}function JT({isOpen:e}){const t=()=>wi.close();return m.jsx(ps,{fallback:m.jsx(WT,{onClose:t}),children:m.jsx(XT,{isOpen:e,onClose:t})})}var Ll={dsn:"",environment:"production",release:"abcaeb25b7b9741ef000420e8ed66d260aac3c28"};function eP(){try{return typeof Ll<"u"&&Ll?Ll:{}}catch{return{}}}let l_=!1;function tP(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function rP(e={}){if(l_)return!0;if(typeof window>"u")return!1;const t=eP(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(MA({baseUrl:Ve}),T1({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??tP(t.tracesSampleRate,.1),tracePropagationTargets:[Ve],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>Xy(n),beforeBreadcrumb:n=>n&&(Xy({breadcrumbs:[n]}),n)}),l_=!0,A1("replayIntegration").then(n=>{try{b4(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[Ve],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}var c_={key:""};const nP="mock";function aP(){try{typeof c_<"u"&&c_?.key;return}catch{return}}function oP(){const e=aP();if(!e||typeof window>"u"||!window.location)return!1;try{return new URLSearchParams(window.location.search).get(nP)===e}catch{return!1}}const iP=new Set(["/create-quote","/get-stages-for-quote","/get-questions-by-stage","/update-quote","/verify-quote","/is-supported-state","/get-rates","/get-quote","/get-vehicle-options","/request-bind"]);let d_=!1;function sP(e){try{if(typeof e=="string")return new URL(e,window.location.href).pathname;if(e instanceof URL)return e.pathname;if(e instanceof Request)return new URL(e.url,window.location.href).pathname}catch{return null}return null}async function uP(e,t){try{if(t?.body&&typeof t.body=="string")return JSON.parse(t.body);if(e instanceof Request){const r=await e.clone().text();return r?JSON.parse(r):{}}}catch{return{}}return{}}function f_(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}function lP(){try{if(typeof document>"u"||document.getElementById("credify-mock-badge"))return;const e=()=>{const t=document.createElement("div");t.id="credify-mock-badge",t.textContent="MOCK MODE",t.setAttribute("aria-hidden","true"),t.style.cssText=["position:fixed","bottom:12px","left:12px","z-index:2147483647","background:#b91c1c","color:#fff","font:600 11px/1 system-ui,sans-serif","letter-spacing:0.08em","padding:6px 10px","border-radius:9999px","box-shadow:0 1px 4px rgba(0,0,0,0.3)","pointer-events:none","user-select:none"].join(";"),document.body.appendChild(t)};document.body?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}catch{}}function cP(){if(d_||typeof window>"u"||typeof window.fetch!="function"||!oP())return;d_=!0;const e=window.fetch.bind(window),t=Promise.resolve().then(()=>LP);window.fetch=async(r,n)=>{const a=sP(r);if(!a||!iP.has(a))return e(r,n);const o=await uP(r,n),{handleMockRequest:i}=await t;await new Promise(s=>window.setTimeout(s,120));try{return f_(i(a,o))}catch(s){return f_({error:s instanceof Error?s.message:"Mock handler error"},404)}},lP(),typeof console<"u"&&console.info("[Credify] Mock mode active — all API calls are served from in-memory fixtures.")}cP();let er=null,tn=null,Ci=!1;function dP(){er||(er=document.createElement("div"),er.id="insurance-widget-root",document.documentElement.appendChild(er)),!tn&&er&&(tn=v_.createRoot(er))}function Rl(){dP(),tn&&tn.render(d.createElement(JT,{isOpen:Ci}))}function fP(){tn&&er&&(tn.unmount(),er.remove()),tn=null,er=null,Wb(),Pk()}const wi={init:e=>{rP(e?.sentry),PT(e?.support),LT(),HT(),Ci=!!e?.autoOpen||RT(),Rl()},open:()=>{Ci=!0,Rl()},close:()=>{Ci=!1,Rl()},destroy:fP,on:Cb,off:wb,support:{openChat:Qb,startScreenShare:Xb}};typeof window<"u"&&(window.CredifyInsuranceWidget=wi);const mP=["Zip","Email","Product"],pP={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone"]};function hP(e){return e==="Auto"||e==="Home"||e==="Bundle"?pP[e]:mP}const m_=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],p_=["25/50","50/100","100/300","250/500"],gP=Array.from({length:35},(e,t)=>String(2024-t)),yP=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],bP=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],_P=[{question:"Do you want to quote auto, home, or both?",inputType:"select",options:["Auto","Home","Bundle"],key:"product",required:!0},{question:"What is your property address?",inputType:"address",key:"address",required:!0}],vP=[{question:"What is your first name?",inputType:"text",key:"first_name",required:!0},{question:"What is your last name?",inputType:"text",key:"last_name",required:!0},{question:"What is your date of birth?",inputType:"date",key:"date_of_birth",required:!0}],EP=[{question:"Add Vehicles",inputType:"radio",options:["Yes"],key:"vehicles",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"Vehicle Identification Number (VIN)",inputType:"text",key:"vin",required:!1},{question:"Year",inputType:"select",options:gP,key:"year",required:!0},{question:"Make",inputType:"select",options:[],key:"make",required:!0},{question:"Model",inputType:"select",options:[],key:"model",required:!0},{question:"Body style",inputType:"select",options:[],key:"body_style",required:!0},{question:"Vehicle ownership type",inputType:"select",options:["Owned","Leased","Lien"],key:"ownership_type",required:!0},{question:"What is the primary use of this vehicle?",inputType:"select",options:["Pleasure","To_FromWork","To_FromSchool","Business","Farming"],key:"usage",required:!0},{question:"Annual mileage driven",inputType:"number",key:"annual_mileage",required:!0}]}]}],DP=[{question:"Add Drivers",inputType:"radio",options:["Yes"],key:"drivers",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"First Name",inputType:"text",key:"first_name",required:!0},{question:"Middle Name Initial",inputType:"text",key:"middle_name",required:!1},{question:"Last Name",inputType:"text",key:"last_name",required:!0},{question:"Date of Birth",inputType:"date",key:"date_of_birth",required:!0},{question:"Gender",inputType:"select",options:["Male","Female"],key:"gender",required:!0},{question:"What is the relationship to Driver #1?",inputType:"select",options:["Spouse","Parent","Child","Domestic Partner","Relative","Employee","Other"],key:"relationship_to_insured",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed"],key:"marital_status",required:!0}]}]}],h_=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Type of residence",inputType:"select",options:["Single Family Dwelling","Condo","Apartment","Townhouse","Mobile Home"],key:"residence_type",required:!0},{question:"Please select your current auto insurance company",inputType:"select",options:m_,key:"auto_prior_carrier_name",required:!0,conditionals:[{conditionalType:"notEquals",conditionalValue:"NoPriorInsurance",conditionalQuestions:[{question:"Years with prior personal auto carrier",inputType:"number",key:"auto_prior_years",required:!0},{question:"Months with prior personal auto carrier",inputType:"number",key:"auto_prior_months",required:!0},{question:"When does the current policy expire?",inputType:"date",key:"auto_prior_expiration_date",required:!0},{question:"What is your current or most recent Bodily Injury Limit?",inputType:"select",options:p_,key:"auto_prior_liability_limit",required:!0}]}]},{question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0},{question:"Bodily Injury liability",inputType:"select",options:p_,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],SP=[{question:"Year built",inputType:"number",key:"year_built",required:!0},{question:"Total living area (sq ft)",inputType:"number",key:"total_area_sq_ft",required:!0},{question:"Dwelling type",inputType:"select",options:["Single Family","Condo","Townhouse","Multi-Family"],key:"dwelling_type",required:!0},{question:"Construction type",inputType:"select",options:["Frame","Masonry","Masonry Veneer","Fire Resistive"],key:"construction_type",required:!0},{question:"Roof material",inputType:"select",options:["Asphalt Shingle","Metal","Tile","Wood Shake","Slate"],key:"roof_material_type",required:!0},{question:"Number of stories",inputType:"select",options:["1","1.5","2","2.5","3"],key:"number_of_stories",required:!0}],g_=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Do you currently have a Homeowners policy?",inputType:"radio",options:["Yes","No"],key:"home_has_prior_insurance",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestions:[{question:"Which carrier currently insures the home?",inputType:"select",options:m_,key:"home_prior_carrier_name",required:!0}]}]},{question:"Personal liability limit",inputType:"select",options:["100000","300000","500000","1000000"],key:"home_personal_liability",required:!0},{question:"All-perils deductible",inputType:"select",options:["500","1000","2500","5000"],key:"home_all_perils_deductible",required:!0}],CP=[...g_,...h_],wP={Zip:yP,Email:bP,Product:_P,Name:vP,Vehicle:EP,Driver:DP,AutoCurrentCarrier:h_,Home:SP,HomePolicy:g_,BundlePolicy:CP,Demographics:[{question:"Gender",inputType:"radio",options:["Male","Female"],key:"gender",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed","Domestic Partner"],key:"marital_status",required:!0},{question:"Employment industry",inputType:"select",options:["Technology","Healthcare","Education","Finance","Retail","Construction","Other"],key:"employment_industry",required:!0},{question:"How many occupants live in the household?",inputType:"number",key:"household_size",required:!0},{question:"Do you authorize us to check your credit?",inputType:"radio",options:["Yes","No"],key:"order_credit_authorized",required:!0}],Ssn:[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],Phone:[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],SMSVerification:[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}]};function xP(e){return wP[e]??[]}const $P=[{quote_rate_id:"mock-rate-1",carrier_name:"Progressive",carrier_logo_base64:null,carrier_quote_id:"MOCK-PRG-001",premium_cents:142800,monthly_premium_cents:11900,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-2",carrier_name:"Nationwide",carrier_logo_base64:null,carrier_quote_id:"MOCK-NW-002",premium_cents:156e3,monthly_premium_cents:13e3,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-3",carrier_name:"Liberty Mutual",carrier_logo_base64:null,carrier_quote_id:"MOCK-LM-003",premium_cents:173400,monthly_premium_cents:14450,term_months:12,lob:"auto",admitted_status:"non_admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-nq-1",carrier_name:"Travelers",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Upfront Underwriting",decline_reasons:["Consumer didn’t grant permission to review credit score."]},{quote_rate_id:"mock-nq-2",carrier_name:"NationalGeneral",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.","Monoline quoting is not allowed."]},{quote_rate_id:"mock-nq-3",carrier_name:"Allstate",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["This carrier will not quote if the credit disclosure is not accepted by the insured."]}],AP=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],kP={Toyota:["Camry","Corolla","RAV4","Highlander","Tacoma"],Honda:["Civic","Accord","CR-V","Pilot","Odyssey"],Ford:["F-150","Escape","Explorer","Mustang","Bronco"],Chevrolet:["Silverado","Equinox","Malibu","Tahoe","Camaro"],Tesla:["Model 3","Model Y","Model S","Model X"],Subaru:["Outback","Forester","Crosstrek","Impreza"]},TP=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function PP(e){return e.make&&e.model?{ready:!0,bodyStyles:TP}:e.make?{ready:!0,models:kP[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:AP}}function IP(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const xi="mock-quote-0001",y_="mock-jwt-token";let $a={quote_id:xi};function MP(e={}){$a={quote_id:xi,...e}}function FP(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:y_,quoteId:xi}:{isVerified:!0,token:y_}}function OP(e){return e.action==="vinDecode"?IP():PP({year:typeof e.year=="number"?e.year:void 0,make:typeof e.make=="string"?e.make:void 0,model:typeof e.model=="string"?e.model:void 0})}function BP(e,t){switch(e){case"/create-quote":return MP({postal_code:t.postal_code}),{quoteId:xi};case"/get-stages-for-quote":return{stages:hP($a.product)};case"/get-questions-by-stage":return{questions:xP(t.stage)};case"/update-quote":{const r={...t.payload??{}};return delete r.current_stage,$a={...$a,...r},{status:"success"}}case"/verify-quote":return FP(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:$P};case"/get-quote":return{quote:$a};case"/get-vehicle-options":return OP(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}const LP=Object.freeze(Object.defineProperty({__proto__:null,handleMockRequest:BP},Symbol.toStringTag,{value:"Module"}));pt.CredifyInsuranceWidget=wi,pt.default=wi,Object.defineProperties(pt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
117
117
  //# sourceMappingURL=index.umd.js.map