youverify-liveness-web 1.0.5 → 1.0.6

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.js CHANGED
@@ -2320,7 +2320,7 @@ const xa = "_root_1duny_1", Ma = "_modal_1duny_10", Pa = "_container_1duny_13",
2320
2320
  children: t
2321
2321
  }
2322
2322
  );
2323
- }, Ia = () => /* @__PURE__ */ h(we, { children: /* @__PURE__ */ h("path", { d: "M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z" }) }), Wo = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h(
2323
+ }, Ia = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h("path", { d: "M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z" }) }), Wo = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h(
2324
2324
  "path",
2325
2325
  {
2326
2326
  fillRule: "evenodd",
@@ -2896,10 +2896,7 @@ function ml() {
2896
2896
  }
2897
2897
  const vr = "colorScheme";
2898
2898
  function jo() {
2899
- const { namespace: e } = fe(), t = () => {
2900
- const o = localStorage.getItem(vr);
2901
- return !o && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : o;
2902
- }, n = (o = null) => {
2899
+ const { namespace: e } = fe(), t = () => localStorage.getItem(vr), n = (o = null) => {
2903
2900
  o && localStorage.setItem(vr, o);
2904
2901
  const i = `${e}-color-scheme`, s = document.documentElement;
2905
2902
  o && o === "dark" ? s == null || s.setAttribute(i, "dark") : s == null || s.removeAttribute(i);
@@ -4103,7 +4100,7 @@ function pc(e) {
4103
4100
  }
4104
4101
  }, f = (m) => {
4105
4102
  try {
4106
- s.current = new window.Module.FaceRecoEngineAdapter(), c(m);
4103
+ o("light"), s.current = new window.Module.FaceRecoEngineAdapter(), c(m);
4107
4104
  } catch (v) {
4108
4105
  r(`Could not start liveness test: ${v.message}`), l();
4109
4106
  }
@@ -4629,7 +4626,7 @@ class wc {
4629
4626
  this.presentation = n, this.props = t, t.tasks && (this.tasks = t.tasks), n === "page" && this.start();
4630
4627
  }
4631
4628
  validateOptions() {
4632
- if (!this.tasks)
4629
+ if (!this.tasks || this.tasks.length === 0)
4633
4630
  throw new Error("Tasks cannot be empty");
4634
4631
  if (this.props.user && !this.props.user.firstName)
4635
4632
  throw new Error("First Name is required when User object is supplied");
@@ -1,5 +1,5 @@
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=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.yvlw-absolute{position:absolute}.yvlw-m-0{margin:0}.yvlw-mx-auto{margin-left:auto;margin-right:auto}.yvlw-mb-12{margin-bottom:3rem}.yvlw-mt-12{margin-top:3rem}.yvlw-mt-3{margin-top:.75rem}.yvlw-flex{display:flex}.yvlw-hidden{display:none}.yvlw-h-10{height:2.5rem}.yvlw-h-20{height:5rem}.yvlw-h-4{height:1rem}.yvlw-h-5{height:1.25rem}.yvlw-h-6{height:1.5rem}.yvlw-h-7{height:1.75rem}.yvlw-h-full{height:100%}.yvlw-w-10{width:2.5rem}.yvlw-w-4{width:1rem}.yvlw-w-5{width:1.25rem}.yvlw-w-7{width:1.75rem}.yvlw-w-full{width:100%}.yvlw-flex-1{flex:1 1 0%}.yvlw--translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw--translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-flex-col{flex-direction:column}.yvlw-items-center{align-items:center}.yvlw-justify-center{justify-content:center}.yvlw-gap-1{gap:.25rem}.yvlw-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.yvlw-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.yvlw-rounded{border-radius:.25rem}.yvlw-border{border-width:1px}.yvlw-border-t{border-top-width:1px}.yvlw-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.yvlw-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.yvlw-bg-black\\/20{background-color:#0003}.yvlw-p-0{padding:0}.yvlw-px-3{padding-left:.75rem;padding-right:.75rem}.yvlw-px-4{padding-left:1rem;padding-right:1rem}.yvlw-py-2{padding-top:.5rem;padding-bottom:.5rem}.yvlw-pb-6{padding-bottom:1.5rem}.yvlw-pt-4{padding-top:1rem}.yvlw-text-center{text-align:center}.yvlw-text-sm{font-size:.875rem;line-height:1.25rem}.yvlw-text-xs{font-size:.75rem;line-height:1rem}.yvlw-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.yvlw-opacity-0{opacity:0}.yvlw-opacity-100{opacity:1}.yvlw-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.yvlw-duration-200{transition-duration:.2s}.yvlw-duration-300{transition-duration:.3s}.yvlw-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.subtext{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.subtext:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.divider{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.divider:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\\:yvlw-block:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){display:block}.dark\\:yvlw-hidden:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){display:none}.dark\\:yvlw-border-gray-700:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\\:yvlw-border-gray-800:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}._root_1duny_1{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:DM Sans,sans-serif;position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;min-height:100vh;min-height:-webkit-fill-available;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1)}._root_1duny_1[data-closed]{opacity:0}._root_1duny_1._modal_1duny_10{background-color:#0000004d}@media (min-width: 768px){._root_1duny_1._modal_1duny_10{padding:1rem}._root_1duny_1._modal_1duny_10 ._container_1duny_13{border-radius:.75rem}}._root_1duny_1._modal_1duny_10 ._container_1duny_13{max-width:1500px;max-height:700px}@media (min-width: 768px){._root_1duny_1._page_1duny_18{padding:0}}._root_1duny_1 ._close_1duny_21{position:absolute;top:.5rem;left:.5rem;display:flex;align-items:center;justify-content:center;z-index:20;height:1.5rem;width:1.5rem;border-radius:9999px;background-color:#00000080}._root_1duny_1 ._close_1duny_21 svg{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}._root_1duny_1 ._close_1duny_21 svg:hover{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}._root_1duny_1 ._container_1duny_13{height:100%;width:100%;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}._root_1duny_1 ._container_1duny_13:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_1h6qm_1 *,._root_1h6qm_1 :before,._root_1h6qm_1 :after{box-sizing:border-box;border-width:0;border-style:solid}._root_1h6qm_1 :before,._root_1h6qm_1 :after{--tw-content: ""}._root_1h6qm_1 html,._root_1h6qm_1 :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";-webkit-tap-highlight-color:transparent}._root_1h6qm_1 body{margin:0;line-height:inherit}._root_1h6qm_1 hr{height:0;color:inherit;border-top-width:1px}._root_1h6qm_1 abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}._root_1h6qm_1 h1,._root_1h6qm_1 h2,._root_1h6qm_1 h3,._root_1h6qm_1 h4,._root_1h6qm_1 h5,._root_1h6qm_1 h6{font-size:inherit;font-weight:inherit}._root_1h6qm_1 a{color:inherit;text-decoration:inherit}._root_1h6qm_1 b,._root_1h6qm_1 strong{font-weight:bolder}._root_1h6qm_1 code,._root_1h6qm_1 kbd,._root_1h6qm_1 samp,._root_1h6qm_1 pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}._root_1h6qm_1 small{font-size:80%}._root_1h6qm_1 sub,._root_1h6qm_1 sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}._root_1h6qm_1 sub{bottom:-.25em}._root_1h6qm_1 sup{top:-.5em}._root_1h6qm_1 table{text-indent:0;border-color:inherit;border-collapse:collapse}._root_1h6qm_1 button,._root_1h6qm_1 input,._root_1h6qm_1 optgroup,._root_1h6qm_1 select,._root_1h6qm_1 textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}._root_1h6qm_1 button,._root_1h6qm_1 select{text-transform:none}._root_1h6qm_1 button,._root_1h6qm_1 input:where([type=button]),._root_1h6qm_1 input:where([type=reset]),._root_1h6qm_1 input:where([type=submit]){-moz-appearance:button;appearance:button;-webkit-appearance:button;background-color:transparent;background-image:none}._root_1h6qm_1 :-moz-focusring{outline:auto}._root_1h6qm_1 :-moz-ui-invalid{box-shadow:none}._root_1h6qm_1 progress{vertical-align:baseline}._root_1h6qm_1 ::-webkit-inner-spin-button,._root_1h6qm_1 ::-webkit-outer-spin-button{height:auto}._root_1h6qm_1 [type=search]{-moz-appearance:textfield;appearance:textfield;-webkit-appearance:textfield;outline-offset:-2px}._root_1h6qm_1 ::-webkit-search-decoration{-webkit-appearance:none}._root_1h6qm_1 ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}._root_1h6qm_1 summary{display:list-item}._root_1h6qm_1 blockquote,._root_1h6qm_1 dl,._root_1h6qm_1 dd,._root_1h6qm_1 h1,._root_1h6qm_1 h2,._root_1h6qm_1 h3,._root_1h6qm_1 h4,._root_1h6qm_1 h5,._root_1h6qm_1 h6,._root_1h6qm_1 hr,._root_1h6qm_1 figure,._root_1h6qm_1 p,._root_1h6qm_1 pre{margin:0}._root_1h6qm_1 fieldset{margin:0;padding:0}._root_1h6qm_1 legend{padding:0}._root_1h6qm_1 ol,._root_1h6qm_1 ul,._root_1h6qm_1 menu{list-style:none;margin:0;padding:0}._root_1h6qm_1 dialog{padding:0}._root_1h6qm_1 textarea{resize:vertical}._root_1h6qm_1 input::-moz-placeholder,._root_1h6qm_1 textarea::-moz-placeholder{opacity:1;color:#9ca3af}._root_1h6qm_1 input::placeholder,._root_1h6qm_1 textarea::placeholder{opacity:1;color:#9ca3af}._root_1h6qm_1 button,._root_1h6qm_1 [role=button]{cursor:pointer}._root_1h6qm_1 :disabled{cursor:default}._root_1h6qm_1 img,._root_1h6qm_1 svg,._root_1h6qm_1 video,._root_1h6qm_1 canvas,._root_1h6qm_1 audio,._root_1h6qm_1 iframe,._root_1h6qm_1 embed,._root_1h6qm_1 object{display:block}._root_1h6qm_1 [hidden]{display:none}._root_vqy7d_1{height:100%}._root_vqy7d_1 ._container_vqy7d_4{display:flex;height:100%}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7{display:none;width:20%;flex-direction:column;justify-content:space-between}@media (min-width: 1280px){._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7{display:flex}}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7{padding-top:.75rem;padding-bottom:.75rem}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11{padding-left:1.5rem;padding-right:1.5rem}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol{position:relative;margin:0;list-style-type:none;padding:0}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li{counter-increment:item;margin-bottom:24px;position:relative;font-size:.875rem;line-height:1.25rem;display:flex;align-items:center}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:before{width:28px;height:28px;border-radius:9999px;border-width:2px;--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:before{margin-right:1rem;display:flex;align-items:center;justify-content:center;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:before{content:counter(item);flex-shrink:0}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._active_vqy7d_32{font-weight:500}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._active_vqy7d_32:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._active_vqy7d_32:before{background-color:var(--branding-color);border-style:none;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._completed_vqy7d_39{font-weight:500;text-decoration-line:line-through}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._completed_vqy7d_39:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._completed_vqy7d_39:before{background-color:var(--branding-color);border-style:none;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:after{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):after{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:after{top:28px;bottom:-24px;left:14px;content:"";position:absolute;width:1px}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:last-child:after{content:none}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 footer{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62{display:none;width:20%}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62{padding-top:.75rem;padding-bottom:.75rem}@media (min-width: 1280px){._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62{display:block}}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65{display:flex;align-items:center;gap:.5rem;padding:1rem 1.5rem}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 ._avatar_vqy7d_68{height:2.5rem;width:2.5rem;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 ._avatar_vqy7d_68:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 ._avatar_vqy7d_68{display:flex;align-items:center;justify-content:center;font-size:1.125rem;line-height:1.75rem;font-weight:500}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 h4{margin-bottom:-.25rem;text-overflow:ellipsis;font-weight:600;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 h4:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 p{margin-top:0;margin-bottom:0;font-size:.75rem;line-height:1rem}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 footer>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 footer{padding-left:1.5rem;padding-right:1.5rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81{flex:1 1 0%}@media (min-width: 768px){._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81{padding-top:1rem;padding-bottom:1rem}}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._content_vqy7d_84{margin-left:auto;margin-right:auto;height:100%;width:100%;overflow:hidden;border-radius:1rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._content_vqy7d_84:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._content_vqy7d_84{max-width:500px}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._completed_vqy7d_39{display:flex;height:100%;width:100%;align-items:center;justify-content:center}._root_lryhb_1 ._container_lryhb_1{display:flex;align-items:center;justify-content:space-between}._root_lryhb_1 ._container_lryhb_1 ._brand_lryhb_6{display:flex;align-items:center;gap:7px;font-weight:600}._root_bcsvc_1{position:relative;height:100%;width:100%}._root_bcsvc_1 video{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;transform:scaleX(-1)}._container_mcmsr_1{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(255,255,255,0) 100%)}._container_mcmsr_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(0,0,0,0) 100%)}._container_mcmsr_1{z-index:1}._container_mcmsr_1:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(255,255,255,.5) 101px)}._container_mcmsr_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(0,0,0,.8) 101px)}._container_mcmsr_1:before{transition:opacity .3s linear}._container_mcmsr_1._focused_mcmsr_12:before{opacity:1}._container_mcmsr_1 ._progress_mcmsr_15{position:relative;height:280px;width:280px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid gray}._container_mcmsr_1 ._progress_mcmsr_15 div{position:absolute;height:3px;transform-origin:50%;border-radius:2px;width:5px;background-color:gray;transition-property:background-color,transform,width;transition-duration:.3s;transition-timing-function:ease-in-out}._container_mcmsr_1 ._progress_mcmsr_15 div._completed_mcmsr_36{width:20px;background-color:#07da63}._container_mcmsr_1 ._marker_mcmsr_40{position:relative;width:280px;height:280px}._container_mcmsr_1 ._marker_mcmsr_40>div{position:absolute;height:1.75rem;width:1.75rem;border-width:2px;--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._container_mcmsr_1 ._marker_mcmsr_40>div:first-child{top:-.25rem;left:-.25rem;border-top-left-radius:50%;border-bottom-width:0px;border-right-width:0px}._container_mcmsr_1 ._marker_mcmsr_40>div:nth-child(2){top:-.25rem;right:-.25rem;border-top-right-radius:50%;border-bottom-width:0px;border-left-width:0px}._container_mcmsr_1 ._marker_mcmsr_40>div:nth-child(3){bottom:-.25rem;left:-.25rem;border-bottom-left-radius:50%;border-top-width:0px;border-right-width:0px}._container_mcmsr_1 ._marker_mcmsr_40>div:last-child{bottom:-.25rem;right:-.25rem;border-bottom-right-radius:50%;border-top-width:0px;border-left-width:0px}._root_5hgaj_1{height:100%;text-align:center}._root_5hgaj_1 ._container_5hgaj_4{position:relative;height:100%}._root_5hgaj_1 ._container_5hgaj_4 ._progress_5hgaj_7{background-color:var(--branding-color);position:absolute;top:0;left:0;height:4px;border-radius:.5rem;z-index:2}._root_5hgaj_1 ._container_5hgaj_4 ._intro_5hgaj_12{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem 1rem}._root_5hgaj_1 ._container_5hgaj_4 ._content_5hgaj_15{height:70%;width:100%}._root_5hgaj_1 ._container_5hgaj_4 ._branding_5hgaj_18{position:absolute;left:0;right:0;bottom:1.5rem;text-align:center;font-size:.75rem;line-height:1rem;font-weight:500;display:flex;align-items:center;justify-content:center}._root_5hgaj_1 ._container_5hgaj_4 ._branding_5hgaj_18>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}._root_5hgaj_1 ._container_5hgaj_4 ._instructionsContainer_5hgaj_22{border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}._root_5hgaj_1 ._container_5hgaj_4 ._instructionsContainer_5hgaj_22:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}._root_5hgaj_1 ._container_5hgaj_4 ._instructions_5hgaj_22{margin-left:auto;margin-right:auto;padding:1rem 1rem 1.5rem;text-align:center;max-width:400px}._root_5hgaj_1 ._container_5hgaj_4 h2{margin-top:.5rem;margin-bottom:.5rem;font-size:1.5rem;line-height:2rem;font-weight:900}._root_5hgaj_1 ._container_5hgaj_4 h2:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}._root_5hgaj_1 ._container_5hgaj_4 p{font-size:.875rem;line-height:1.25rem;font-weight:300;max-width:400px}._root_5hgaj_1 ._container_5hgaj_4 button{color:var(--branding-color);border-color:var(--branding-color);border-radius:9999px;border-width:2px;padding:.5rem 2rem;font-weight:500}._root_5hgaj_1 ._container_5hgaj_4 button:hover{background-color:var(--branding-color);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_h5elg_1{text-align:center;display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem .75rem}._root_h5elg_1 h2{margin-top:.5rem;margin-bottom:.5rem;font-size:1.5rem;line-height:2rem;font-weight:900}._root_h5elg_1 h2:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}._root_h5elg_1 p{font-size:.875rem;line-height:1.25rem;font-weight:300;max-width:400px}._root_h5elg_1 button{color:var(--branding-color);border-color:var(--branding-color);border-radius:9999px;border-width:2px;padding:.5rem 2rem;font-weight:500}._root_h5elg_1 button:hover{background-color:var(--branding-color);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_h5elg_1 button:hover ._spinner_h5elg_22{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity));border-left-color:transparent}._container_1vep2_1{height:100%;width:100%;border-radius:50%;border-width:2px;border-color:var(--branding-color);border-left-color:transparent;animation:_spin_1vep2_1 .7s linear infinite}._container_1vep2_1._md_1vep2_7{height:1rem;width:1rem}._container_1vep2_1._lg_1vep2_10{height:1.75rem;width:1.75rem}@keyframes _spin_1vep2_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._root_thujo_1{position:absolute;top:0;right:0;bottom:0;left:0}._root_thujo_1 ._sticker_thujo_4{position:absolute}._root_thujo_1 ._sticker_thujo_4._no_thujo_7{top:2.5rem;left:1.5rem;border-width:4px;--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity));padding:.5rem 1rem;--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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);stroke:#fff;font-size:2.25rem;line-height:2.5rem;font-weight:900;letter-spacing:.1em;--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity));transform:rotate(335deg)}._root_thujo_1 ._sticker_thujo_4._yes_thujo_12{top:2.5rem;right:1.5rem;border-width:4px;--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity));padding:.5rem 1rem;--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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);stroke:#fff;font-size:2.25rem;line-height:2.5rem;font-weight:900;letter-spacing:.1em;--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity));transform:rotate(45deg)}._container_1ej18_1{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(255,255,255,0) 100%)}._container_1ej18_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(0,0,0,0) 100%)}._container_1ej18_1{z-index:1}._container_1ej18_1:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(255,255,255,.5) 101px)}._container_1ej18_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(0,0,0,.8) 101px)}._container_1ej18_1:before{transition:opacity .3s linear}._container_1ej18_1 ._progress_1ej18_12{position:relative;height:240px;width:240px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid gray}._container_1ej18_1 ._progress_1ej18_12 div{position:absolute;height:3px;transform-origin:50%;border-radius:2px;width:5px;background-color:gray;transition-property:background-color,transform,width;transition-duration:.3s;transition-timing-function:ease-in-out}._container_1ej18_1 ._progress_1ej18_12 div._completed_1ej18_33{width:20px;background-color:#07da63}._container_1ej18_1 ._marker_1ej18_37{position:relative;width:240px;height:240px}._container_1ej18_1 ._marker_1ej18_37>div{position:absolute;height:1.75rem;width:1.75rem;border-width:4px;--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._container_1ej18_1 ._marker_1ej18_37>div:first-child{top:-.25rem;left:-.25rem;border-top-left-radius:50%;border-bottom-width:0px;border-right-width:0px}._container_1ej18_1 ._marker_1ej18_37>div:nth-child(2){top:-.25rem;right:-.25rem;border-top-right-radius:50%;border-bottom-width:0px;border-left-width:0px}._container_1ej18_1 ._marker_1ej18_37>div:nth-child(3){bottom:-.25rem;left:-.25rem;border-bottom-left-radius:50%;border-top-width:0px;border-right-width:0px}._container_1ej18_1 ._marker_1ej18_37>div:last-child{bottom:-.25rem;right:-.25rem;border-bottom-right-radius:50%;border-top-width:0px;border-left-width:0px}')),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(me,I){typeof exports=="object"&&typeof module<"u"?module.exports=I():typeof define=="function"&&define.amd?define(I):(me=typeof globalThis<"u"?globalThis:me||self,me.YouverifyLiveness=I())})(this,function(){"use strict";var me,I,In,Fe,Dn,On,Ht,Wt,Ut,zt,Hn,Ye={},Wn=[],Ko=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,dt=Array.isArray;function ve(e,t){for(var n in t)e[n]=t[n];return e}function Un(e){var t=e.parentNode;t&&t.removeChild(e)}function le(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ge(e,s,r,o,null)}function Ge(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++In,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(i),i}function Vt(){return{current:null}}function j(e){return e.children}function ue(e,t){this.props=e,this.context=t}function xe(e,t){if(t==null)return e.__?xe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?xe(e):null}function zn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return zn(e)}}function jt(e){(!e.__d&&(e.__d=!0)&&Fe.push(e)&&!ft.__r++||Dn!==I.debounceRendering)&&((Dn=I.debounceRendering)||On)(ft)}function ft(){var e,t,n,r,o,i,s,a;for(Fe.sort(Ht);e=Fe.shift();)e.__d&&(t=Fe.length,r=void 0,i=(o=(n=e).__v).__e,s=[],a=[],n.__P&&((r=ve({},o)).__v=o.__v+1,I.vnode&&I.vnode(r),Bt(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[i]:null,s,i??xe(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Yn(s,r,a),r.__e!=i&&zn(r)),Fe.length>t&&Fe.sort(Ht));ft.__r=0}function Vn(e,t,n,r,o,i,s,a,c,u,d){var l,f,p,_,y,v=r&&r.__k||Wn,m=t.length;for(n.__d=c,Xo(n,t,v),c=n.__d,l=0;l<m;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?Ye:v[p.__i]||Ye,p.__i=l,Bt(e,p,f,o,i,s,a,c,u,d),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&qt(f.ref,null,p),d.push(p.ref,p.__c||_,p)),y==null&&_!=null&&(y=_),65536&p.__u||f.__k===p.__k?c=jn(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:_&&(c=_.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=y}function Xo(e,t,n){var r,o,i,s,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)s=r+l,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ge(null,o,null,null,null):dt(o)?Ge(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ge(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Zo(o,n,s,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a==s-1?l=a-s:a==s+1?l++:a>s?d>c-s?l+=a-s:l--:a<s&&l++,a!==r+l&&(o.__u|=65536))):(i=n[s])&&i.key==null&&i.__e&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i,!1),n[s]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i))}function jn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=jn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xe(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function _e(e,t){return t=t||[],e==null||typeof e=="boolean"||(dt(e)?e.some(function(n){_e(n,t)}):t.push(e)),t}function Zo(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type&&!(131072&c.__u))return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function Bn(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ko.test(t)?n:n+"px"}function pt(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Bn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Bn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Wt,e.addEventListener(t,i?zt:Ut,i)):e.removeEventListener(t,i?zt:Ut,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function qn(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Wt++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function Bt(e,t,n,r,o,i,s,a,c,u){var d,l,f,p,_,y,v,m,g,$,T,S,M,A,W,F,b=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=I.__b)&&d(t);e:if(typeof b=="function")try{if(m=t.props,g="prototype"in b&&b.prototype.render,$=(d=b.contextType)&&r[d.__c],T=d?$?$.props.value:d.__:r,n.__c?v=(l=t.__c=n.__c).__=l.__E:(g?t.__c=l=new b(m,T):(t.__c=l=new ue(m,T),l.constructor=b,l.render=Qo),$&&$.sub(l),l.props=m,l.state||(l.state={}),l.context=T,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&b.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ve({},l.__s)),ve(l.__s,b.getDerivedStateFromProps(m,l.__s))),p=l.props,_=l.state,l.__v=t,f)g&&b.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&b.getDerivedStateFromProps==null&&m!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(m,T),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(m,l.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=m,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(R){R&&(R.__=t)}),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(m,l.__s,T),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,_,y)})}if(l.context=T,l.props=m,l.__P=e,l.__e=!1,M=I.__r,A=0,g){for(l.state=l.__s,l.__d=!1,M&&M(t),d=l.render(l.props,l.state,l.context),W=0;W<l._sb.length;W++)l.__h.push(l._sb[W]);l._sb=[]}else do l.__d=!1,M&&M(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++A<25);l.state=l.__s,l.getChildContext!=null&&(r=ve(ve({},r),l.getChildContext())),g&&!f&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(p,_)),Vn(e,dt(F=d!=null&&d.type===j&&d.key==null?d.props.children:d)?F:[F],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),v&&(l.__E=l.__=null)}catch(R){if(t.__v=null,c||i!=null){for(t.__u|=c?160:32;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;I.__e(R,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Jo(n.__e,t,n,r,o,i,s,c,u);(d=I.diffed)&&d(t)}function Yn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)qt(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){I.__e(i,o.__v)}})}function Jo(e,t,n,r,o,i,s,a,c){var u,d,l,f,p,_,y,v=n.props,m=t.props,g=t.type;if(g==="svg"?o="http://www.w3.org/2000/svg":g==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!g&&(g?p.localName===g:p.nodeType===3)){e=p,i[u]=null;break}}if(e==null){if(g===null)return document.createTextNode(m);e=document.createElementNS(o,g,m.is&&m),i=null,a=!1}if(g===null)v===m||a&&e.data===m||(e.data=m);else{if(i=i&&me.call(e.childNodes),v=n.props||Ye,!a&&i!=null)for(v={},u=0;u<e.attributes.length;u++)v[(p=e.attributes[u]).name]=p.value;for(u in v)if(p=v[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=p;else if(u!=="key"&&!(u in m)){if(u=="value"&&"defaultValue"in m||u=="checked"&&"defaultChecked"in m)continue;pt(e,u,null,p,o)}}for(u in m)p=m[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?_=p:u=="checked"?y=p:u==="key"||a&&typeof p!="function"||v[u]===p||pt(e,u,p,v[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),Vn(e,dt(f)?f:[f],t,n,r,g==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&xe(n,0),a,c),i!=null)for(u=i.length;u--;)i[u]!=null&&Un(i[u]);a||(u="value",_!==void 0&&(_!==e[u]||g==="progress"&&!_||g==="option"&&_!==v[u])&&pt(e,u,_,v[u],o),u="checked",y!==void 0&&y!==e[u]&&pt(e,u,y,v[u],o))}return e}function qt(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){I.__e(o,n)}}function Yt(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){I.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Yt(r[o],t,n||typeof e.type!="function");n||e.__e==null||Un(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function Qo(e,t,n){return this.constructor(e,n)}function We(e,t,n){var r,o,i,s;I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Bt(t,e=(!r&&n||t).__k=le(j,null,[e]),o||Ye,Ye,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?me.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Yn(i,e,s)}function Gn(e,t){We(e,t,Gn)}function ei(e,t,n){var r,o,i,s,a=ve({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?me.call(arguments,2):n),Ge(e.type,a,r||e.key,o||e.ref,null)}function ie(e,t){var n={__c:t="__cC"+Hn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,jt(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}me=Wn.slice,I={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},In=0,ue.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ve({},this.state),typeof e=="function"&&(e=e(ve({},n),this.props)),e&&ve(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),jt(this))},ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),jt(this))},ue.prototype.render=j,Fe=[],On=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ht=function(e,t){return e.__v.__b-t.__v.__b},ft.__r=0,Wt=0,Ut=qn(!1),zt=qn(!0),Hn=0;var ti=0;function h(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ti,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return I.vnode&&I.vnode(u),u}var ye,B,Gt,Kn,Ue=0,Xn=[],K=I,Zn=K.__b,Jn=K.__r,Qn=K.diffed,er=K.__c,tr=K.unmount,nr=K.__;function Me(e,t){K.__h&&K.__h(B,e,Ue||t),Ue=0;var n=B.__H||(B.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function x(e){return Ue=1,Ke(or,e)}function Ke(e,t,n){var r=Me(ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):or(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=B,!B.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};B.u=!0;var i=B.shouldComponentUpdate,s=B.componentWillUpdate;B.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},B.shouldComponentUpdate=o}return r.__N||r.__}function H(e,t){var n=Me(ye++,3);!K.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__H.__h.push(n))}function Pe(e,t){var n=Me(ye++,4);!K.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__h.push(n))}function w(e){return Ue=5,z(function(){return{current:e}},[])}function Kt(e,t,n){Ue=6,Pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function z(e,t){var n=Me(ye++,7);return Jt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function U(e,t){return Ue=8,z(function(){return e},t)}function te(e){var t=B.context[e.__c],n=Me(ye++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(B)),t.props.value):e.__}function Xt(e,t){K.useDebugValue&&K.useDebugValue(t?t(e):e)}function ni(e){var t=Me(ye++,10),n=x();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Ee(){var e=Me(ye++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ri(){for(var e;e=Xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ht),e.__H.__h.forEach(Zt),e.__H.__h=[]}catch(t){e.__H.__h=[],K.__e(t,e.__v)}}K.__b=function(e){B=null,Zn&&Zn(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nr&&nr(e,t)},K.__r=function(e){Jn&&Jn(e),ye=0;var t=(B=e.__c).__H;t&&(Gt===B?(t.__h=[],B.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(ht),t.__h.forEach(Zt),t.__h=[],ye=0)),Gt=B},K.diffed=function(e){Qn&&Qn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xn.push(t)!==1&&Kn===K.requestAnimationFrame||((Kn=K.requestAnimationFrame)||oi)(ri)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Gt=B=null},K.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ht),n.__h=n.__h.filter(function(r){return!r.__||Zt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],K.__e(r,n.__v)}}),er&&er(e,t)},K.unmount=function(e){tr&&tr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ht(r)}catch(o){t=o}}),n.__H=void 0,t&&K.__e(t,n.__v))};var rr=typeof requestAnimationFrame=="function";function oi(e){var t,n=function(){clearTimeout(r),rr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);rr&&(t=requestAnimationFrame(n))}function ht(e){var t=B,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),B=t}function Zt(e){var t=B;e.__c=e.__(),B=t}function Jt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function or(e,t){return typeof t=="function"?t(e):t}function ir(e,t){for(var n in t)e[n]=t[n];return e}function Qt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function mt(e,t){this.props=e,this.context=t}function sr(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:Qt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,le(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(mt.prototype=new ue).isPureReactComponent=!0,mt.prototype.shouldComponentUpdate=function(e,t){return Qt(this.props,e)||Qt(this.state,t)};var ar=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ar&&ar(e)};var ii=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function en(e){function t(n){var r=ir({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=ii,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var cr=function(e,t){return e==null?null:_e(_e(e).map(t))},lr={map:cr,forEach:cr,count:function(e){return e?_e(e).length:0},only:function(e){var t=_e(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:_e},si=I.__e;I.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}si(e,t,n,r)};var ur=I.unmount;function dr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ir({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return dr(r,t,n)})),e}function fr(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return fr(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Xe(){this.__u=0,this.t=null,this.__b=null}function pr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hr(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return le(n,i)}return o.displayName="Lazy",o.__f=!0,o}function ze(){this.u=null,this.o=null}I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ur&&ur(e)},(Xe.prototype=new ue).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=pr(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=fr(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Xe.prototype.componentWillUnmount=function(){this.t=[]},Xe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=dr(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&le(j,null,e.fallback);return o&&(o.__u&=-33),[le(j,null,t.__a?null:e.children),o]};var mr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ai(e){return this.getChildContext=function(){return e.context},e.children}function ci(e){var t=this,n=e.i;t.componentWillUnmount=function(){We(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),We(le(ai,{context:t.context},e.__v),t.l)}function vt(e,t){var n=le(ci,{__v:e,i:t});return n.containerInfo=t,n}(ze.prototype=new ue).__a=function(e){var t=this,n=pr(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),mr(t,e,r)):o()};n?n(i):i()}},ze.prototype.render=function(e){this.u=null,this.o=new Map;var t=_e(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){mr(e,n,t)})};var vr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,li=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ui=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,di=/[A-Z0-9]/g,fi=typeof document<"u",pi=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function _r(e,t,n){return t.__k==null&&(t.textContent=""),We(e,t),typeof n=="function"&&n(),e?e.__c:null}function yr(e,t,n){return Gn(e,t),typeof n=="function"&&n(),e?e.__c:null}ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gr=I.event;function hi(){}function mi(){return this.cancelBubble}function vi(){return this.defaultPrevented}I.event=function(e){return gr&&(e=gr(e)),e.persist=hi,e.isPropagationStopped=mi,e.isDefaultPrevented=vi,e.nativeEvent=e};var tn,_i={enumerable:!1,configurable:!0,get:function(){return this.class}},wr=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||fi&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||pi(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":ui.test(i)?i=a:r.indexOf("-")===-1&&li.test(i)?i=i.replace(di,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=_e(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=_e(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",_i)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=vr,wr&&wr(e)};var br=I.__r;I.__r=function(e){br&&br(e),tn=e.__c};var Er=I.diffed;I.diffed=function(e){Er&&Er(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),tn=null};var $r={ReactCurrentDispatcher:{current:{readContext:function(e){return tn.__n[e.__c].props.value},useCallback:U,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:z,useReducer:Ke,useRef:w,useState:x,useSyncExternalStore:_t,useTransition:sn}}},yi="17.0.2";function Tr(e){return le.bind(null,e)}function Ve(e){return!!e&&e.$$typeof===vr}function kr(e){return Ve(e)&&e.type===j}function Sr(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function nn(e){return Ve(e)?ei.apply(null,arguments):e}function Cr(e){return!!e.__k&&(We(null,e),!0)}function Fr(e){return e&&(e.base||e.nodeType===1&&e)||null}var xr=function(e,t){return e(t)},Mr=function(e,t){return e(t)},Pr=j;function rn(e){e()}function on(e){return e}function sn(){return[!1,rn]}var an=Pe,Nr=Ve;function _t(e,t){var n=t(),r=x({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Pe(function(){o.__=n,o.v=t,cn(o)&&i({h:o})},[e,n,t]),H(function(){return cn(o)&&i({h:o}),e(function(){cn(o)&&i({h:o})})},[e]),n}function cn(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var N={useState:x,useId:Ee,useReducer:Ke,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:an,useTransition:sn,useDeferredValue:on,useSyncExternalStore:_t,startTransition:rn,useRef:w,useImperativeHandle:Kt,useMemo:z,useCallback:U,useContext:te,useDebugValue:Xt,version:"17.0.2",Children:lr,render:_r,hydrate:yr,unmountComponentAtNode:Cr,createPortal:vt,createElement:le,createContext:ie,createFactory:Tr,cloneElement:nn,createRef:Vt,Fragment:j,isValidElement:Ve,isElement:Nr,isFragment:kr,isMemo:Sr,findDOMNode:Fr,Component:ue,PureComponent:mt,memo:sr,forwardRef:en,flushSync:Mr,unstable_batchedUpdates:xr,StrictMode:Pr,Suspense:Xe,SuspenseList:ze,lazy:hr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r};const Lr=Object.freeze(Object.defineProperty({__proto__:null,Children:lr,Component:ue,Fragment:j,PureComponent:mt,StrictMode:Pr,Suspense:Xe,SuspenseList:ze,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r,cloneElement:nn,createContext:ie,createElement:le,createFactory:Tr,createPortal:vt,createRef:Vt,default:N,findDOMNode:Fr,flushSync:Mr,forwardRef:en,hydrate:yr,isElement:Nr,isFragment:kr,isMemo:Sr,isValidElement:Ve,lazy:hr,memo:sr,render:_r,startTransition:rn,unmountComponentAtNode:Cr,unstable_batchedUpdates:xr,useCallback:U,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useErrorBoundary:ni,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:z,useReducer:Ke,useRef:w,useState:x,useSyncExternalStore:_t,useTransition:sn,version:yi},Symbol.toStringTag,{value:"Module"})),Ar=typeof document<"u"?N.useLayoutEffect:()=>{};function gi(e){const t=w(null);return Ar(()=>{t.current=e},[e]),U((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Ze=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Ne=e=>e&&"window"in e&&e.window===e?e:Ze(e).defaultView||window;function wi(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function bi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ei(){return bi(/^Mac/i)}function $i(){return wi(/Android/i)}function Ti(e){return e.mozInputSource===0&&e.isTrusted?!0:$i()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class ki{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Rr(e){let t=w({isFocused:!1,observer:null});Ar(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=gi(r=>{e==null||e(r)});return U(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{t.current.isFocused=!1,o.disabled&&n(new ki("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Si(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=U(c=>{if(c.target===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),s=Rr(i),a=U(c=>{const u=Ze(c.target);c.target===c.currentTarget&&u.activeElement===c.target&&(n&&n(c),o&&o(!0),s(c))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let Je=null,ln=new Set,Qe=new Map,Le=!1,un=!1;const Ci={Tab:!0,Escape:!0};function dn(e,t){for(let n of ln)n(e,t)}function Fi(e){return!(e.metaKey||!Ei()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function yt(e){Le=!0,Fi(e)&&(Je="keyboard",dn("keyboard",e))}function ce(e){Je="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Le=!0,dn("pointer",e))}function Ir(e){Ti(e)&&(Le=!0,Je="virtual")}function Dr(e){e.target===window||e.target===document||(!Le&&!un&&(Je="virtual",dn("virtual",e)),Le=!1,un=!1)}function Or(){Le=!1,un=!0}function fn(e){if(typeof window>"u"||Qe.get(Ne(e)))return;const t=Ne(e),n=Ze(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Le=!0,r.apply(this,arguments)},n.addEventListener("keydown",yt,!0),n.addEventListener("keyup",yt,!0),n.addEventListener("click",Ir,!0),t.addEventListener("focus",Dr,!0),t.addEventListener("blur",Or,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ce,!0),n.addEventListener("pointermove",ce,!0),n.addEventListener("pointerup",ce,!0)):(n.addEventListener("mousedown",ce,!0),n.addEventListener("mousemove",ce,!0),n.addEventListener("mouseup",ce,!0)),t.addEventListener("beforeunload",()=>{Hr(e)},{once:!0}),Qe.set(t,{focus:r})}const Hr=(e,t)=>{const n=Ne(e),r=Ze(e);t&&r.removeEventListener("DOMContentLoaded",t),Qe.has(n)&&(n.HTMLElement.prototype.focus=Qe.get(n).focus,r.removeEventListener("keydown",yt,!0),r.removeEventListener("keyup",yt,!0),r.removeEventListener("click",Ir,!0),n.removeEventListener("focus",Dr,!0),n.removeEventListener("blur",Or,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ce,!0),r.removeEventListener("pointermove",ce,!0),r.removeEventListener("pointerup",ce,!0)):(r.removeEventListener("mousedown",ce,!0),r.removeEventListener("mousemove",ce,!0),r.removeEventListener("mouseup",ce,!0)),Qe.delete(n))};function xi(e){const t=Ze(e);let n;return t.readyState!=="loading"?fn(e):(n=()=>{fn(e)},t.addEventListener("DOMContentLoaded",n)),()=>Hr(e,n)}typeof document<"u"&&xi();function Wr(){return Je!=="pointer"}const Mi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Pi(e,t,n){var r;const o=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Ne(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof o&&!Mi.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof i||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof a&&!Ci[n.key])}function Ni(e,t,n){fn(),H(()=>{let r=(o,i)=>{Pi(!!(n!=null&&n.isTextInput),o,i)&&e(Wr())};return ln.add(r),()=>{ln.delete(r)}},t)}function Li(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=w({isFocusWithin:!1}),s=U(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(u),o&&o(!1))},[n,o,i]),a=Rr(s),c=U(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[r,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:s}}}let gt=!1,pn=0;function hn(){gt=!0,setTimeout(()=>{gt=!1},50)}function Ur(e){e.pointerType==="touch"&&hn()}function Ai(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ur):document.addEventListener("touchend",hn),pn++,()=>{pn--,!(pn>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ur):document.removeEventListener("touchend",hn))}}function Ri(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=x(!1),a=w({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;H(Ai,[]);let{hoverProps:c,triggerHoverEnd:u}=z(()=>{let d=(p,_)=>{if(a.pointerType=_,o||_==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let y=p.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:_}),n&&n(!0),s(!0)},l=(p,_)=>{if(a.pointerType="",a.target=null,_==="touch"||!a.isHovered)return;a.isHovered=!1;let y=p.currentTarget;r&&r({type:"hoverend",target:y,pointerType:_}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=p=>{gt&&p.pointerType==="mouse"||d(p,p.pointerType)},f.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&l(p,p.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!gt&&d(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&l(p,"mouse")}),{hoverProps:f,triggerHoverEnd:l}},[t,n,r,o,a]);return H(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:c,isHovered:i}}function Ii(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=w({isFocused:!1,isFocusVisible:t||Wr()}),[i,s]=x(!1),[a,c]=x(()=>o.current.isFocused&&o.current.isFocusVisible),u=U(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=U(p=>{o.current.isFocused=p,s(p),u()},[u]);Ni(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:l}=Si({isDisabled:r,onFocusChange:d}),{focusWithinProps:f}=Li({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?f:l}}var Di=Object.defineProperty,Oi=(e,t,n)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mn=(e,t,n)=>(Oi(e,typeof t!="symbol"?t+"":t,n),n);let Hi=class{constructor(){mn(this,"current",this.detect()),mn(this,"handoffState","pending"),mn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ae=new Hi;function wt(e){return Ae.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function bt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $e(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return bt(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=$e();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Et(){let[e]=x($e);return H(()=>()=>e.dispose(),[e]),e}let ne=(e,t)=>{Ae.isServer?H(e,t):Pe(e,t)};function Re(e){let t=w(e);return ne(()=>{t.current=e},[e]),t}let G=function(e){let t=Re(e);return N.useCallback((...n)=>t.current(...n),[t])};function Wi(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Ui(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function zi({disabled:e=!1}={}){let t=w(null),[n,r]=x(!1),o=Et(),i=G(()=>{t.current=null,r(!1),o.dispose()}),s=G(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let c=wt(a.currentTarget);o.addEventListener(c,"pointerup",i,!1),o.addEventListener(c,"pointermove",u=>{if(t.current){let d=Wi(u);r(Ui(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(c,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let Vi=ie(void 0);function zr(){return te(Vi)}function vn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Te(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Te),r}var $t=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($t||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function se({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??ji;let c=Vr(t,e);if(i)return Tt(c,n,r,s,a);let u=o??0;if(u&2){let{static:d=!1,...l}=c;if(d)return Tt(l,n,r,s,a)}if(u&1){let{unmount:d=!0,...l}=c;return Te(d?0:1,{0(){return null},1(){return Tt({...l,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return Tt(c,n,r,s,a)}function Tt(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...c}=_n(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let l={};if(t){let f=!1,p=[];for(let[_,y]of Object.entries(t))typeof y=="boolean"&&(f=!0),y===!0&&p.push(_.replace(/([A-Z])/g,v=>`-${v.toLowerCase()}`));if(f){l["data-headlessui-state"]=p.join(" ");for(let _ of p)l[`data-${_}`]=""}}if(i===j&&(Object.keys(Ie(c)).length>0||Object.keys(Ie(l)).length>0))if(!Ve(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Ie(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ie(c)).concat(Object.keys(Ie(l))).map(f=>` - ${f}`).join(`
2
+ (function(ve,I){typeof exports=="object"&&typeof module<"u"?module.exports=I():typeof define=="function"&&define.amd?define(I):(ve=typeof globalThis<"u"?globalThis:ve||self,ve.YouverifyLiveness=I())})(this,function(){"use strict";var ve,I,In,Fe,Dn,On,Ht,Wt,Ut,zt,Hn,Ye={},Wn=[],Ko=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,dt=Array.isArray;function me(e,t){for(var n in t)e[n]=t[n];return e}function Un(e){var t=e.parentNode;t&&t.removeChild(e)}function le(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ve.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ge(e,s,r,o,null)}function Ge(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++In,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(i),i}function Vt(){return{current:null}}function j(e){return e.children}function ue(e,t){this.props=e,this.context=t}function xe(e,t){if(t==null)return e.__?xe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?xe(e):null}function zn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return zn(e)}}function jt(e){(!e.__d&&(e.__d=!0)&&Fe.push(e)&&!ft.__r++||Dn!==I.debounceRendering)&&((Dn=I.debounceRendering)||On)(ft)}function ft(){var e,t,n,r,o,i,s,a;for(Fe.sort(Ht);e=Fe.shift();)e.__d&&(t=Fe.length,r=void 0,i=(o=(n=e).__v).__e,s=[],a=[],n.__P&&((r=me({},o)).__v=o.__v+1,I.vnode&&I.vnode(r),Bt(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[i]:null,s,i??xe(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Yn(s,r,a),r.__e!=i&&zn(r)),Fe.length>t&&Fe.sort(Ht));ft.__r=0}function Vn(e,t,n,r,o,i,s,a,c,u,d){var l,f,p,_,y,m=r&&r.__k||Wn,v=t.length;for(n.__d=c,Xo(n,t,m),c=n.__d,l=0;l<v;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?Ye:m[p.__i]||Ye,p.__i=l,Bt(e,p,f,o,i,s,a,c,u,d),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&qt(f.ref,null,p),d.push(p.ref,p.__c||_,p)),y==null&&_!=null&&(y=_),65536&p.__u||f.__k===p.__k?c=jn(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:_&&(c=_.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=y}function Xo(e,t,n){var r,o,i,s,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)s=r+l,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ge(null,o,null,null,null):dt(o)?Ge(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ge(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Zo(o,n,s,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a==s-1?l=a-s:a==s+1?l++:a>s?d>c-s?l+=a-s:l--:a<s&&l++,a!==r+l&&(o.__u|=65536))):(i=n[s])&&i.key==null&&i.__e&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i,!1),n[s]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i))}function jn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=jn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xe(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function _e(e,t){return t=t||[],e==null||typeof e=="boolean"||(dt(e)?e.some(function(n){_e(n,t)}):t.push(e)),t}function Zo(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type&&!(131072&c.__u))return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function Bn(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ko.test(t)?n:n+"px"}function pt(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Bn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Bn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Wt,e.addEventListener(t,i?zt:Ut,i)):e.removeEventListener(t,i?zt:Ut,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function qn(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Wt++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function Bt(e,t,n,r,o,i,s,a,c,u){var d,l,f,p,_,y,m,v,g,$,T,S,M,A,W,F,b=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=I.__b)&&d(t);e:if(typeof b=="function")try{if(v=t.props,g="prototype"in b&&b.prototype.render,$=(d=b.contextType)&&r[d.__c],T=d?$?$.props.value:d.__:r,n.__c?m=(l=t.__c=n.__c).__=l.__E:(g?t.__c=l=new b(v,T):(t.__c=l=new ue(v,T),l.constructor=b,l.render=Qo),$&&$.sub(l),l.props=v,l.state||(l.state={}),l.context=T,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&b.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=me({},l.__s)),me(l.__s,b.getDerivedStateFromProps(v,l.__s))),p=l.props,_=l.state,l.__v=t,f)g&&b.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&b.getDerivedStateFromProps==null&&v!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(v,T),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(v,l.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=v,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(R){R&&(R.__=t)}),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(v,l.__s,T),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,_,y)})}if(l.context=T,l.props=v,l.__P=e,l.__e=!1,M=I.__r,A=0,g){for(l.state=l.__s,l.__d=!1,M&&M(t),d=l.render(l.props,l.state,l.context),W=0;W<l._sb.length;W++)l.__h.push(l._sb[W]);l._sb=[]}else do l.__d=!1,M&&M(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++A<25);l.state=l.__s,l.getChildContext!=null&&(r=me(me({},r),l.getChildContext())),g&&!f&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(p,_)),Vn(e,dt(F=d!=null&&d.type===j&&d.key==null?d.props.children:d)?F:[F],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),m&&(l.__E=l.__=null)}catch(R){if(t.__v=null,c||i!=null){for(t.__u|=c?160:32;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;I.__e(R,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Jo(n.__e,t,n,r,o,i,s,c,u);(d=I.diffed)&&d(t)}function Yn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)qt(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){I.__e(i,o.__v)}})}function Jo(e,t,n,r,o,i,s,a,c){var u,d,l,f,p,_,y,m=n.props,v=t.props,g=t.type;if(g==="svg"?o="http://www.w3.org/2000/svg":g==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!g&&(g?p.localName===g:p.nodeType===3)){e=p,i[u]=null;break}}if(e==null){if(g===null)return document.createTextNode(v);e=document.createElementNS(o,g,v.is&&v),i=null,a=!1}if(g===null)m===v||a&&e.data===v||(e.data=v);else{if(i=i&&ve.call(e.childNodes),m=n.props||Ye,!a&&i!=null)for(m={},u=0;u<e.attributes.length;u++)m[(p=e.attributes[u]).name]=p.value;for(u in m)if(p=m[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=p;else if(u!=="key"&&!(u in v)){if(u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v)continue;pt(e,u,null,p,o)}}for(u in v)p=v[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?_=p:u=="checked"?y=p:u==="key"||a&&typeof p!="function"||m[u]===p||pt(e,u,p,m[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),Vn(e,dt(f)?f:[f],t,n,r,g==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&xe(n,0),a,c),i!=null)for(u=i.length;u--;)i[u]!=null&&Un(i[u]);a||(u="value",_!==void 0&&(_!==e[u]||g==="progress"&&!_||g==="option"&&_!==m[u])&&pt(e,u,_,m[u],o),u="checked",y!==void 0&&y!==e[u]&&pt(e,u,y,m[u],o))}return e}function qt(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){I.__e(o,n)}}function Yt(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){I.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Yt(r[o],t,n||typeof e.type!="function");n||e.__e==null||Un(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function Qo(e,t,n){return this.constructor(e,n)}function We(e,t,n){var r,o,i,s;I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Bt(t,e=(!r&&n||t).__k=le(j,null,[e]),o||Ye,Ye,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ve.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Yn(i,e,s)}function Gn(e,t){We(e,t,Gn)}function ei(e,t,n){var r,o,i,s,a=me({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?ve.call(arguments,2):n),Ge(e.type,a,r||e.key,o||e.ref,null)}function ie(e,t){var n={__c:t="__cC"+Hn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,jt(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ve=Wn.slice,I={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},In=0,ue.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=me({},this.state),typeof e=="function"&&(e=e(me({},n),this.props)),e&&me(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),jt(this))},ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),jt(this))},ue.prototype.render=j,Fe=[],On=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ht=function(e,t){return e.__v.__b-t.__v.__b},ft.__r=0,Wt=0,Ut=qn(!1),zt=qn(!0),Hn=0;var ti=0;function h(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ti,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return I.vnode&&I.vnode(u),u}var ye,B,Gt,Kn,Ue=0,Xn=[],K=I,Zn=K.__b,Jn=K.__r,Qn=K.diffed,er=K.__c,tr=K.unmount,nr=K.__;function Me(e,t){K.__h&&K.__h(B,e,Ue||t),Ue=0;var n=B.__H||(B.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function x(e){return Ue=1,Ke(or,e)}function Ke(e,t,n){var r=Me(ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):or(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=B,!B.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};B.u=!0;var i=B.shouldComponentUpdate,s=B.componentWillUpdate;B.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},B.shouldComponentUpdate=o}return r.__N||r.__}function H(e,t){var n=Me(ye++,3);!K.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__H.__h.push(n))}function Pe(e,t){var n=Me(ye++,4);!K.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__h.push(n))}function w(e){return Ue=5,z(function(){return{current:e}},[])}function Kt(e,t,n){Ue=6,Pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function z(e,t){var n=Me(ye++,7);return Jt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function U(e,t){return Ue=8,z(function(){return e},t)}function te(e){var t=B.context[e.__c],n=Me(ye++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(B)),t.props.value):e.__}function Xt(e,t){K.useDebugValue&&K.useDebugValue(t?t(e):e)}function ni(e){var t=Me(ye++,10),n=x();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Ee(){var e=Me(ye++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ri(){for(var e;e=Xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ht),e.__H.__h.forEach(Zt),e.__H.__h=[]}catch(t){e.__H.__h=[],K.__e(t,e.__v)}}K.__b=function(e){B=null,Zn&&Zn(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nr&&nr(e,t)},K.__r=function(e){Jn&&Jn(e),ye=0;var t=(B=e.__c).__H;t&&(Gt===B?(t.__h=[],B.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(ht),t.__h.forEach(Zt),t.__h=[],ye=0)),Gt=B},K.diffed=function(e){Qn&&Qn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xn.push(t)!==1&&Kn===K.requestAnimationFrame||((Kn=K.requestAnimationFrame)||oi)(ri)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Gt=B=null},K.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ht),n.__h=n.__h.filter(function(r){return!r.__||Zt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],K.__e(r,n.__v)}}),er&&er(e,t)},K.unmount=function(e){tr&&tr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ht(r)}catch(o){t=o}}),n.__H=void 0,t&&K.__e(t,n.__v))};var rr=typeof requestAnimationFrame=="function";function oi(e){var t,n=function(){clearTimeout(r),rr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);rr&&(t=requestAnimationFrame(n))}function ht(e){var t=B,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),B=t}function Zt(e){var t=B;e.__c=e.__(),B=t}function Jt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function or(e,t){return typeof t=="function"?t(e):t}function ir(e,t){for(var n in t)e[n]=t[n];return e}function Qt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function vt(e,t){this.props=e,this.context=t}function sr(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:Qt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,le(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(vt.prototype=new ue).isPureReactComponent=!0,vt.prototype.shouldComponentUpdate=function(e,t){return Qt(this.props,e)||Qt(this.state,t)};var ar=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ar&&ar(e)};var ii=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function en(e){function t(n){var r=ir({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=ii,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var cr=function(e,t){return e==null?null:_e(_e(e).map(t))},lr={map:cr,forEach:cr,count:function(e){return e?_e(e).length:0},only:function(e){var t=_e(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:_e},si=I.__e;I.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}si(e,t,n,r)};var ur=I.unmount;function dr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ir({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return dr(r,t,n)})),e}function fr(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return fr(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Xe(){this.__u=0,this.t=null,this.__b=null}function pr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hr(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return le(n,i)}return o.displayName="Lazy",o.__f=!0,o}function ze(){this.u=null,this.o=null}I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ur&&ur(e)},(Xe.prototype=new ue).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=pr(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=fr(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Xe.prototype.componentWillUnmount=function(){this.t=[]},Xe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=dr(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&le(j,null,e.fallback);return o&&(o.__u&=-33),[le(j,null,t.__a?null:e.children),o]};var vr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ai(e){return this.getChildContext=function(){return e.context},e.children}function ci(e){var t=this,n=e.i;t.componentWillUnmount=function(){We(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),We(le(ai,{context:t.context},e.__v),t.l)}function mt(e,t){var n=le(ci,{__v:e,i:t});return n.containerInfo=t,n}(ze.prototype=new ue).__a=function(e){var t=this,n=pr(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),vr(t,e,r)):o()};n?n(i):i()}},ze.prototype.render=function(e){this.u=null,this.o=new Map;var t=_e(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){vr(e,n,t)})};var mr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,li=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ui=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,di=/[A-Z0-9]/g,fi=typeof document<"u",pi=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function _r(e,t,n){return t.__k==null&&(t.textContent=""),We(e,t),typeof n=="function"&&n(),e?e.__c:null}function yr(e,t,n){return Gn(e,t),typeof n=="function"&&n(),e?e.__c:null}ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gr=I.event;function hi(){}function vi(){return this.cancelBubble}function mi(){return this.defaultPrevented}I.event=function(e){return gr&&(e=gr(e)),e.persist=hi,e.isPropagationStopped=vi,e.isDefaultPrevented=mi,e.nativeEvent=e};var tn,_i={enumerable:!1,configurable:!0,get:function(){return this.class}},wr=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||fi&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||pi(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":ui.test(i)?i=a:r.indexOf("-")===-1&&li.test(i)?i=i.replace(di,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=_e(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=_e(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",_i)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=mr,wr&&wr(e)};var br=I.__r;I.__r=function(e){br&&br(e),tn=e.__c};var Er=I.diffed;I.diffed=function(e){Er&&Er(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),tn=null};var $r={ReactCurrentDispatcher:{current:{readContext:function(e){return tn.__n[e.__c].props.value},useCallback:U,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:z,useReducer:Ke,useRef:w,useState:x,useSyncExternalStore:_t,useTransition:sn}}},yi="17.0.2";function Tr(e){return le.bind(null,e)}function Ve(e){return!!e&&e.$$typeof===mr}function kr(e){return Ve(e)&&e.type===j}function Sr(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function nn(e){return Ve(e)?ei.apply(null,arguments):e}function Cr(e){return!!e.__k&&(We(null,e),!0)}function Fr(e){return e&&(e.base||e.nodeType===1&&e)||null}var xr=function(e,t){return e(t)},Mr=function(e,t){return e(t)},Pr=j;function rn(e){e()}function on(e){return e}function sn(){return[!1,rn]}var an=Pe,Nr=Ve;function _t(e,t){var n=t(),r=x({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Pe(function(){o.__=n,o.v=t,cn(o)&&i({h:o})},[e,n,t]),H(function(){return cn(o)&&i({h:o}),e(function(){cn(o)&&i({h:o})})},[e]),n}function cn(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var N={useState:x,useId:Ee,useReducer:Ke,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:an,useTransition:sn,useDeferredValue:on,useSyncExternalStore:_t,startTransition:rn,useRef:w,useImperativeHandle:Kt,useMemo:z,useCallback:U,useContext:te,useDebugValue:Xt,version:"17.0.2",Children:lr,render:_r,hydrate:yr,unmountComponentAtNode:Cr,createPortal:mt,createElement:le,createContext:ie,createFactory:Tr,cloneElement:nn,createRef:Vt,Fragment:j,isValidElement:Ve,isElement:Nr,isFragment:kr,isMemo:Sr,findDOMNode:Fr,Component:ue,PureComponent:vt,memo:sr,forwardRef:en,flushSync:Mr,unstable_batchedUpdates:xr,StrictMode:Pr,Suspense:Xe,SuspenseList:ze,lazy:hr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r};const Lr=Object.freeze(Object.defineProperty({__proto__:null,Children:lr,Component:ue,Fragment:j,PureComponent:vt,StrictMode:Pr,Suspense:Xe,SuspenseList:ze,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r,cloneElement:nn,createContext:ie,createElement:le,createFactory:Tr,createPortal:mt,createRef:Vt,default:N,findDOMNode:Fr,flushSync:Mr,forwardRef:en,hydrate:yr,isElement:Nr,isFragment:kr,isMemo:Sr,isValidElement:Ve,lazy:hr,memo:sr,render:_r,startTransition:rn,unmountComponentAtNode:Cr,unstable_batchedUpdates:xr,useCallback:U,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useErrorBoundary:ni,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:z,useReducer:Ke,useRef:w,useState:x,useSyncExternalStore:_t,useTransition:sn,version:yi},Symbol.toStringTag,{value:"Module"})),Ar=typeof document<"u"?N.useLayoutEffect:()=>{};function gi(e){const t=w(null);return Ar(()=>{t.current=e},[e]),U((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Ze=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Ne=e=>e&&"window"in e&&e.window===e?e:Ze(e).defaultView||window;function wi(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function bi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ei(){return bi(/^Mac/i)}function $i(){return wi(/Android/i)}function Ti(e){return e.mozInputSource===0&&e.isTrusted?!0:$i()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class ki{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Rr(e){let t=w({isFocused:!1,observer:null});Ar(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=gi(r=>{e==null||e(r)});return U(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{t.current.isFocused=!1,o.disabled&&n(new ki("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Si(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=U(c=>{if(c.target===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),s=Rr(i),a=U(c=>{const u=Ze(c.target);c.target===c.currentTarget&&u.activeElement===c.target&&(n&&n(c),o&&o(!0),s(c))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let Je=null,ln=new Set,Qe=new Map,Le=!1,un=!1;const Ci={Tab:!0,Escape:!0};function dn(e,t){for(let n of ln)n(e,t)}function Fi(e){return!(e.metaKey||!Ei()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function yt(e){Le=!0,Fi(e)&&(Je="keyboard",dn("keyboard",e))}function ce(e){Je="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Le=!0,dn("pointer",e))}function Ir(e){Ti(e)&&(Le=!0,Je="virtual")}function Dr(e){e.target===window||e.target===document||(!Le&&!un&&(Je="virtual",dn("virtual",e)),Le=!1,un=!1)}function Or(){Le=!1,un=!0}function fn(e){if(typeof window>"u"||Qe.get(Ne(e)))return;const t=Ne(e),n=Ze(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Le=!0,r.apply(this,arguments)},n.addEventListener("keydown",yt,!0),n.addEventListener("keyup",yt,!0),n.addEventListener("click",Ir,!0),t.addEventListener("focus",Dr,!0),t.addEventListener("blur",Or,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ce,!0),n.addEventListener("pointermove",ce,!0),n.addEventListener("pointerup",ce,!0)):(n.addEventListener("mousedown",ce,!0),n.addEventListener("mousemove",ce,!0),n.addEventListener("mouseup",ce,!0)),t.addEventListener("beforeunload",()=>{Hr(e)},{once:!0}),Qe.set(t,{focus:r})}const Hr=(e,t)=>{const n=Ne(e),r=Ze(e);t&&r.removeEventListener("DOMContentLoaded",t),Qe.has(n)&&(n.HTMLElement.prototype.focus=Qe.get(n).focus,r.removeEventListener("keydown",yt,!0),r.removeEventListener("keyup",yt,!0),r.removeEventListener("click",Ir,!0),n.removeEventListener("focus",Dr,!0),n.removeEventListener("blur",Or,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ce,!0),r.removeEventListener("pointermove",ce,!0),r.removeEventListener("pointerup",ce,!0)):(r.removeEventListener("mousedown",ce,!0),r.removeEventListener("mousemove",ce,!0),r.removeEventListener("mouseup",ce,!0)),Qe.delete(n))};function xi(e){const t=Ze(e);let n;return t.readyState!=="loading"?fn(e):(n=()=>{fn(e)},t.addEventListener("DOMContentLoaded",n)),()=>Hr(e,n)}typeof document<"u"&&xi();function Wr(){return Je!=="pointer"}const Mi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Pi(e,t,n){var r;const o=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Ne(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof o&&!Mi.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof i||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof a&&!Ci[n.key])}function Ni(e,t,n){fn(),H(()=>{let r=(o,i)=>{Pi(!!(n!=null&&n.isTextInput),o,i)&&e(Wr())};return ln.add(r),()=>{ln.delete(r)}},t)}function Li(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=w({isFocusWithin:!1}),s=U(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(u),o&&o(!1))},[n,o,i]),a=Rr(s),c=U(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[r,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:s}}}let gt=!1,pn=0;function hn(){gt=!0,setTimeout(()=>{gt=!1},50)}function Ur(e){e.pointerType==="touch"&&hn()}function Ai(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ur):document.addEventListener("touchend",hn),pn++,()=>{pn--,!(pn>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ur):document.removeEventListener("touchend",hn))}}function Ri(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=x(!1),a=w({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;H(Ai,[]);let{hoverProps:c,triggerHoverEnd:u}=z(()=>{let d=(p,_)=>{if(a.pointerType=_,o||_==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let y=p.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:_}),n&&n(!0),s(!0)},l=(p,_)=>{if(a.pointerType="",a.target=null,_==="touch"||!a.isHovered)return;a.isHovered=!1;let y=p.currentTarget;r&&r({type:"hoverend",target:y,pointerType:_}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=p=>{gt&&p.pointerType==="mouse"||d(p,p.pointerType)},f.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&l(p,p.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!gt&&d(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&l(p,"mouse")}),{hoverProps:f,triggerHoverEnd:l}},[t,n,r,o,a]);return H(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:c,isHovered:i}}function Ii(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=w({isFocused:!1,isFocusVisible:t||Wr()}),[i,s]=x(!1),[a,c]=x(()=>o.current.isFocused&&o.current.isFocusVisible),u=U(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=U(p=>{o.current.isFocused=p,s(p),u()},[u]);Ni(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:l}=Si({isDisabled:r,onFocusChange:d}),{focusWithinProps:f}=Li({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?f:l}}var Di=Object.defineProperty,Oi=(e,t,n)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vn=(e,t,n)=>(Oi(e,typeof t!="symbol"?t+"":t,n),n);let Hi=class{constructor(){vn(this,"current",this.detect()),vn(this,"handoffState","pending"),vn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ae=new Hi;function wt(e){return Ae.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function bt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $e(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return bt(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=$e();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Et(){let[e]=x($e);return H(()=>()=>e.dispose(),[e]),e}let ne=(e,t)=>{Ae.isServer?H(e,t):Pe(e,t)};function Re(e){let t=w(e);return ne(()=>{t.current=e},[e]),t}let G=function(e){let t=Re(e);return N.useCallback((...n)=>t.current(...n),[t])};function Wi(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Ui(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function zi({disabled:e=!1}={}){let t=w(null),[n,r]=x(!1),o=Et(),i=G(()=>{t.current=null,r(!1),o.dispose()}),s=G(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let c=wt(a.currentTarget);o.addEventListener(c,"pointerup",i,!1),o.addEventListener(c,"pointermove",u=>{if(t.current){let d=Wi(u);r(Ui(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(c,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let Vi=ie(void 0);function zr(){return te(Vi)}function mn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Te(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Te),r}var $t=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($t||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function se({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??ji;let c=Vr(t,e);if(i)return Tt(c,n,r,s,a);let u=o??0;if(u&2){let{static:d=!1,...l}=c;if(d)return Tt(l,n,r,s,a)}if(u&1){let{unmount:d=!0,...l}=c;return Te(d?0:1,{0(){return null},1(){return Tt({...l,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return Tt(c,n,r,s,a)}function Tt(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...c}=_n(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let l={};if(t){let f=!1,p=[];for(let[_,y]of Object.entries(t))typeof y=="boolean"&&(f=!0),y===!0&&p.push(_.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(f){l["data-headlessui-state"]=p.join(" ");for(let _ of p)l[`data-${_}`]=""}}if(i===j&&(Object.keys(Ie(c)).length>0||Object.keys(Ie(l)).length>0))if(!Ve(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Ie(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ie(c)).concat(Object.keys(Ie(l))).map(f=>` - ${f}`).join(`
3
3
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
4
4
  `)].join(`
5
- `))}else{let f=d.props,p=f==null?void 0:f.className,_=typeof p=="function"?(...m)=>vn(p(...m),c.className):vn(p,c.className),y=_?{className:_}:{},v=Vr(d.props,Ie(_n(c,["ref"])));for(let m in l)m in v&&delete l[m];return nn(d,Object.assign({},v,l,u,{ref:o(d.ref,u.ref)},y))}return le(i,Object.assign({},_n(c,["ref"]),i!==j&&u,i!==j&&l),d)}function ji(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Vr(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function Bi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function re(e){var t;return Object.assign(en(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ie(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _n(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let qi="button";function Yi(e,t){var n;let r=zr(),{disabled:o=r||!1,autoFocus:i=!1,...s}=e,{isFocusVisible:a,focusProps:c}=Ii({autoFocus:i}),{isHovered:u,hoverProps:d}=Ri({isDisabled:o}),{pressed:l,pressProps:f}=zi({disabled:o}),p=Bi({ref:t,type:(n=s.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},c,d,f),_=z(()=>({disabled:o,hover:u,focus:a,active:l,autofocus:i}),[o,u,a,l,i]);return se({ourProps:p,theirProps:s,slot:_,defaultTag:qi,name:"Button"})}let Gi=re(Yi),Ki="div";var kt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kt||{});function Xi(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return se({ourProps:i,theirProps:o,slot:{},defaultTag:Ki,name:"Hidden"})}let yn=re(Xi),Zi=ie(null);function Ji({children:e}){let t=te(Zi);if(!t)return N.createElement(N.Fragment,null,e);let{target:n}=t;return n?vt(N.createElement(N.Fragment,null,e),n):null}let jr=Symbol();function Qi(e,t=!0){return Object.assign(e,{[jr]:t})}function pe(...e){let t=w(e);H(()=>{t.current=e},[e]);let n=G(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[jr]))?void 0:n}let gn=ie(null);gn.displayName="DescriptionContext";function Br(){let e=te(gn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Br),t}return e}function es(){let[e,t]=x([]);return[e.length>0?e.join(" "):void 0,z(()=>function(n){let r=G(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),c=a.indexOf(i);return c!==-1&&a.splice(c,1),a}))),o=z(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return N.createElement(gn.Provider,{value:o},n.children)},[t])]}let ts="p";function ns(e,t){let n=Ee(),r=zr(),{id:o=`headlessui-description-${n}`,...i}=e,s=Br(),a=pe(t);ne(()=>s.register(o),[o,s.register]);let c=r||!1,u=z(()=>({...s.slot,disabled:c}),[s.slot,c]),d={ref:a,...s.props,id:o};return se({ourProps:d,theirProps:i,slot:u,defaultTag:ts,name:s.name||"Description"})}let rs=re(ns),os=Object.assign(rs,{});var qr=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qr||{});let is=ie(()=>{});function ss({value:e,children:t}){return N.createElement(is.Provider,{value:e},t)}let as=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Yr(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(a=>a()))}}}function Gr(e){return _t(e.subscribe,e.getSnapshot,e.getSnapshot)}let cs=new as(()=>Yr(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function je(e,t){let n=cs.get(t),r=Ee(),o=Gr(n);if(ne(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let i=o.indexOf(r),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let wn=new Map,et=new Map;function Kr(e){var t;let n=(t=et.get(e))!=null?t:0;return et.set(e,n+1),n!==0?()=>Xr(e):(wn.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Xr(e))}function Xr(e){var t;let n=(t=et.get(e))!=null?t:1;if(n===1?et.delete(e):et.set(e,n-1),n!==1)return;let r=wn.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,wn.delete(e))}function ls(e,{allowed:t,disallowed:n}={}){let r=je(e,"inert-others");ne(()=>{var o,i;if(!r)return;let s=$e();for(let c of(o=n==null?void 0:n())!=null?o:[])c&&s.add(Kr(c));let a=(i=t==null?void 0:t())!=null?i:[];for(let c of a){if(!c)continue;let u=wt(c);if(!u)continue;let d=c.parentElement;for(;d&&d!==u.body;){for(let l of d.children)a.some(f=>l.contains(f))||s.add(Kr(l));d=d.parentElement}}return s.dispose},[r,t,n])}function Zr(e,t,n){let r=Re(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});H(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=$e();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let bn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),us=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ge=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ge||{}),En=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(En||{}),ds=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ds||{});function fs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(bn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function ps(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(us)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Jr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Jr||{});function hs(e,t=0){var n;return e===((n=wt(e))==null?void 0:n.body)?!1:Te(t,{0(){return e.matches(bn)},1(){let r=e;for(;r!==null;){if(r.matches(bn))return!0;r=r.parentElement}return!1}})}var ms=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ms||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function we(e){e==null||e.focus({preventScroll:!0})}let vs=["textarea","input"].join(",");function _s(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,vs))!=null?n:!1}function ys(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function tt(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?ys(e):e:t&64?ps(e):fs(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(_=>_!=null&&"current"in _?(_==null?void 0:_.current)===p:_===p))),r=r??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},d=0,l=s.length,f;do{if(d>=l||d+l<=0)return 0;let p=c+d;if(t&16)p=(p+l)%l;else{if(p<0)return 3;if(p>=l)return 1}f=s[p],f==null||f.focus(u),d+=a}while(f!==i.activeElement);return t&6&&_s(f)&&f.select(),2}function Qr(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gs(){return/Android/gi.test(window.navigator.userAgent)}function ws(){return Qr()||gs()}function nt(e,t,n,r){let o=Re(n);H(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function eo(e,t,n,r){let o=Re(n);H(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const to=30;function bs(e,t,n){let r=je(e,"outside-click"),o=Re(n),i=U(function(c,u){if(c.defaultPrevented)return;let d=u(c);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let l=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of l){if(f===null)continue;let p=f instanceof HTMLElement?f:f.current;if(p!=null&&p.contains(d)||c.composed&&c.composedPath().includes(p))return}return!hs(d,Jr.Loose)&&d.tabIndex!==-1&&c.preventDefault(),o.current(c,d)},[o]),s=w(null);nt(r,"pointerdown",c=>{var u,d;s.current=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target},!0),nt(r,"mousedown",c=>{var u,d;s.current=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target},!0),nt(r,"click",c=>{ws()||s.current&&(i(c,()=>s.current),s.current=null)},!0);let a=w({x:0,y:0});nt(r,"touchstart",c=>{a.current.x=c.touches[0].clientX,a.current.y=c.touches[0].clientY},!0),nt(r,"touchend",c=>{let u={x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=to||Math.abs(u.y-a.current.y)>=to))return i(c,()=>c.target instanceof HTMLElement?c.target:null)},!0),eo(r,"blur",c=>i(c,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rt(...e){return z(()=>wt(...e),[...e])}function no(e,t,n,r){let o=Re(n);H(()=>{e=e??window;function i(s){o.current(s)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function Es(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function $s(){return Qr()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=$e();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let c=a.target.closest("a");if(!c)return;let{hash:u}=new URL(c.href),d=e.querySelector(u);d&&!r(d)&&(s=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let c=a.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let c=(a=window.scrollY)!=null?a:window.pageYOffset;i!==c&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ts(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ks(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let De=Yr(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:$e(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:ks(n)},o=[$s(),Es(),Ts()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});De.subscribe(()=>{let e=De.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&De.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&De.dispatch("TEARDOWN",n)}});function Ss(e,t,n=()=>({containers:[]})){let r=Gr(De),o=t?r.get(t):void 0,i=o?o.count>0:!1;return ne(()=>{if(!(!t||!e))return De.dispatch("PUSH",t,n),()=>De.dispatch("POP",t,n)},[e,t]),i}function Cs(e,t,n=()=>[document.body]){let r=je(e,"scroll-lock");Ss(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Fs(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function xs(e=0){let[t,n]=x(e),r=U(c=>n(c),[t]),o=U(c=>n(u=>u|c),[t]),i=U(c=>(t&c)===c,[t]),s=U(c=>n(u=>u&~c),[n]),a=U(c=>n(u=>u^c),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ms=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ms||{});function Ps(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Ns(e,t,n,r){let[o,i]=x(n),{hasFlag:s,addFlag:a,removeFlag:c}=xs(e&&o?3:0),u=w(!1),d=w(!1),l=Et();return ne(function f(){var p;if(!e)return;n&&i(!0);let _=t.current;return _?((p=r==null?void 0:r.start)==null||p.call(r,n),Ls(_,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),c(4)):(a(4),c(2)))},run(){d.current?n?(c(3),a(4)):(c(4),a(3)):n?c(1):a(1)},done(){var y;d.current&&typeof _.getAnimations=="function"&&_.getAnimations().length>0||(u.current=!1,c(7),n||i(!1),(y=r==null?void 0:r.end)==null||y.call(r,n))}})):n?(a(3),l.nextFrame(()=>f())):void 0},[e,n,t,l]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Ls(e,{prepare:t,run:n,done:r,inFlight:o}){let i=$e();return Rs(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{i.add(As(e,r)),n()}),i.dispose}function As(e,t){let n=Fs(t),r=$e();if(!e)return r.dispose;let{transitionDuration:o,transitionDelay:i}=getComputedStyle(e),[s,a]=[o,i].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(l=>l.includes("ms")?parseFloat(l):parseFloat(l)*1e3).sort((l,f)=>f-l);return d}),c=s+a;if(c!==0){let u=r.group(d=>{let l=d.setTimeout(()=>{n(),d.dispose()},c);d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&(l(),d.addEventListener(e,"transitioncancel",p=>{p.target===p.currentTarget&&(n(),u())}))})});r.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function Rs(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function $n(e,t){let n=w([]),r=G(e);H(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}let St=ie(null);St.displayName="OpenClosedContext";var de=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(de||{});function Ct(){return te(St)}function Is({value:e,children:t}){return N.createElement(St.Provider,{value:e},t)}function Ds({children:e}){return N.createElement(St.Provider,{value:null},e)}function Os(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Se=[];Os(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Se[0]!==t.target&&(Se.unshift(t.target),Se=Se.filter(n=>n!=null&&n.isConnected),Se.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ro(e){let t=G(e),n=w(!1);H(()=>(n.current=!1,()=>{n.current=!0,bt(()=>{n.current&&t()})}),[t])}function Hs(){let e=typeof document>"u";return"useSyncExternalStore"in Lr?(t=>t.useSyncExternalStore)(Lr)(()=>()=>{},()=>!1,()=>!e):!1}function ot(){let e=Hs(),[t,n]=x(Ae.isHandoffComplete);return t&&Ae.isHandoffComplete===!1&&n(!1),H(()=>{t!==!0&&n(!0)},[t]),H(()=>Ae.handoff(),[]),e?!1:t}let oo=ie(!1);function Ws(){return te(oo)}function io(e){return N.createElement(oo.Provider,{value:e.force},e.children)}function Us(e){let t=Ws(),n=te(ao),r=rt(e),[o,i]=x(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Ae.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let c=r.createElement("div");return c.setAttribute("id","headlessui-portal-root"),r.body.appendChild(c)});return H(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),H(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let so=j,zs=re(function(e,t){let n=e,r=w(null),o=pe(Qi(d=>{r.current=d}),t),i=rt(r),s=Us(r),[a]=x(()=>{var d;return Ae.isServer?null:(d=i==null?void 0:i.createElement("div"))!=null?d:null}),c=te(Tn),u=ot();return ne(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),ne(()=>{if(a&&c)return c.register(a)},[c,a]),ro(()=>{var d;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((d=s.parentElement)==null||d.removeChild(s)))}),u?!s||!a?null:vt(se({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:so,name:"Portal"}),a):null});function Vs(e,t){let n=pe(t),{enabled:r=!0,...o}=e;return r?N.createElement(zs,{...o,ref:n}):se({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:so,name:"Portal"})}let js=j,ao=ie(null);function Bs(e,t){let{target:n,...r}=e,o={ref:pe(t)};return N.createElement(ao.Provider,{value:n},se({ourProps:o,theirProps:r,defaultTag:js,name:"Popover.Group"}))}let Tn=ie(null);function qs(){let e=te(Tn),t=w([]),n=G(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=G(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=z(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,z(()=>function({children:i}){return N.createElement(Tn.Provider,{value:o},i)},[o])]}let Ys=re(Vs),co=re(Bs),Gs=Object.assign(Ys,{Group:co});function Ks(e,t=typeof document<"u"?document.defaultView:null,n){let r=je(e,"escape");no(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===qr.Escape&&n(o))})}function Xs(){var e;let[t]=x(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=x((e=t==null?void 0:t.matches)!=null?e:!1);return ne(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function Zs({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=w((r=n==null?void 0:n.current)!=null?r:null),i=rt(o),s=G(()=>{var a,c,u;let d=[];for(let l of e)l!==null&&(l instanceof HTMLElement?d.push(l):"current"in l&&l.current instanceof HTMLElement&&d.push(l.current));if(t!=null&&t.current)for(let l of t.current)d.push(l);for(let l of(a=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(o.current)||l.contains((u=(c=o.current)==null?void 0:c.getRootNode())==null?void 0:u.host)||d.some(f=>l.contains(f))||d.push(l));return d});return{resolveContainers:s,contains:G(a=>s().some(c=>c.contains(a))),mainTreeNodeRef:o,MainTreeNode:z(()=>function(){return n!=null?null:N.createElement(yn,{features:kt.Hidden,ref:o})},[o,n])}}function kn(){let e=w(!1);return ne(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var it=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(it||{});function Js(){let e=w(0);return eo(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function lo(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Qs="div";var Oe=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Oe||{});function ea(e,t){let n=w(null),r=pe(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...c}=e;ot()||(a=0);let u=rt(n);oa(a,{ownerDocument:u});let d=ia(a,{ownerDocument:u,container:n,initialFocus:o,initialFocusFallback:i});sa(a,{ownerDocument:u,container:n,containers:s,previousActiveElement:d});let l=Js(),f=G(m=>{let g=n.current;g&&($=>$())(()=>{Te(l.current,{[it.Forwards]:()=>{tt(g,ge.First,{skipElements:[m.relatedTarget,i]})},[it.Backwards]:()=>{tt(g,ge.Last,{skipElements:[m.relatedTarget,i]})}})})}),p=je(!!(a&2),"focus-trap#tab-lock"),_=Et(),y=w(!1),v={ref:r,onKeyDown(m){m.key=="Tab"&&(y.current=!0,_.requestAnimationFrame(()=>{y.current=!1}))},onBlur(m){if(!(a&4))return;let g=lo(s);n.current instanceof HTMLElement&&g.add(n.current);let $=m.relatedTarget;$ instanceof HTMLElement&&$.dataset.headlessuiFocusGuard!=="true"&&(uo(g,$)||(y.current?tt(n.current,Te(l.current,{[it.Forwards]:()=>ge.Next,[it.Backwards]:()=>ge.Previous})|ge.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&we(m.target)))}};return N.createElement(N.Fragment,null,p&&N.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}),se({ourProps:v,theirProps:c,defaultTag:Qs,name:"FocusTrap"}),p&&N.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}))}let ta=re(ea),na=Object.assign(ta,{features:Oe});function ra(e=!0){let t=w(Se.slice());return $n(([n],[r])=>{r===!0&&n===!1&&bt(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Se.slice())},[e,Se,t]),G(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function oa(e,{ownerDocument:t}){let n=!!(e&8),r=ra(n);$n(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&we(r())},[n]),ro(()=>{n&&we(r())})}function ia(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=w(null),s=je(!!(e&1),"focus-trap#initial-focus"),a=kn();return $n(()=>{if(e===0)return;if(!s){o!=null&&o.current&&we(o.current);return}let c=n.current;c&&bt(()=>{if(!a.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){i.current=u;return}}else if(c.contains(u)){i.current=u;return}if(r!=null&&r.current)we(r.current);else{if(e&16){if(tt(c,ge.First|ge.AutoFocus)!==En.Error)return}else if(tt(c,ge.First)!==En.Error)return;if(o!=null&&o.current&&(we(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,s,e]),i}function sa(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=kn(),s=!!(e&4);no(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!i.current)return;let c=lo(r);n.current instanceof HTMLElement&&c.add(n.current);let u=o.current;if(!u)return;let d=a.target;d&&d instanceof HTMLElement?uo(c,d)?(o.current=d,we(d)):(a.preventDefault(),a.stopPropagation(),we(u)):we(o.current)},!0)}function uo(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function fo(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:ho)!==j||N.Children.count(e.children)===1}let Ft=ie(null);Ft.displayName="TransitionContext";var aa=(e=>(e.Visible="visible",e.Hidden="hidden",e))(aa||{});function ca(){let e=te(Ft);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function la(){let e=te(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=ie(null);xt.displayName="NestingContext";function Mt(e){return"children"in e?Mt(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function po(e,t){let n=Re(e),r=w([]),o=kn(),i=Et(),s=G((p,_=ke.Hidden)=>{let y=r.current.findIndex(({el:v})=>v===p);y!==-1&&(Te(_,{[ke.Unmount](){r.current.splice(y,1)},[ke.Hidden](){r.current[y].state="hidden"}}),i.microTask(()=>{var v;!Mt(r)&&o.current&&((v=n.current)==null||v.call(n))}))}),a=G(p=>{let _=r.current.find(({el:y})=>y===p);return _?_.state!=="visible"&&(_.state="visible"):r.current.push({el:p,state:"visible"}),()=>s(p,ke.Unmount)}),c=w([]),u=w(Promise.resolve()),d=w({enter:[],leave:[]}),l=G((p,_,y)=>{c.current.splice(0),t&&(t.chains.current[_]=t.chains.current[_].filter(([v])=>v!==p)),t==null||t.chains.current[_].push([p,new Promise(v=>{c.current.push(v)})]),t==null||t.chains.current[_].push([p,new Promise(v=>{Promise.all(d.current[_].map(([m,g])=>g)).then(()=>v())})]),_==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(_)):y(_)}),f=G((p,_,y)=>{Promise.all(d.current[_].splice(0).map(([v,m])=>m)).then(()=>{var v;(v=c.current.shift())==null||v()}).then(()=>y(_))});return z(()=>({children:r,register:a,unregister:s,onStart:l,onStop:f,wait:u,chains:d}),[a,s,r,l,f,d,u])}let ho=j,mo=$t.RenderStrategy;function ua(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:c,enter:u,enterFrom:d,enterTo:l,entered:f,leave:p,leaveFrom:_,leaveTo:y,...v}=e,m=w(null),g=fo(e),$=pe(...g?[m,t]:t===null?[]:[t]),T=(n=v.unmount)==null||n?ke.Unmount:ke.Hidden,{show:S,appear:M,initial:A}=ca(),[W,F]=x(S?"visible":"hidden"),b=la(),{register:R,unregister:q}=b;ne(()=>R(m),[R,m]),ne(()=>{if(T===ke.Hidden&&m.current){if(S&&W!=="visible"){F("visible");return}return Te(W,{hidden:()=>q(m),visible:()=>R(m)})}},[W,m,R,q,S,T]);let D=ot();ne(()=>{if(g&&D&&W==="visible"&&m.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,W,D,g]);let Y=A&&!M,Q=M&&S&&A,X=w(!1),k=po(()=>{X.current||(F("hidden"),q(m))},b),C=G(Z=>{X.current=!0;let J=Z?"enter":"leave";k.onStart(m,J,ee=>{ee==="enter"?i==null||i():ee==="leave"&&(a==null||a())})}),L=G(Z=>{let J=Z?"enter":"leave";X.current=!1,k.onStop(m,J,ee=>{ee==="enter"?s==null||s():ee==="leave"&&(c==null||c())}),J==="leave"&&!Mt(k)&&(F("hidden"),q(m))});H(()=>{g&&o||(C(S),L(S))},[S,g,o]);let P=!(!o||!g||!D||Y),[,E]=Ns(P,m,S,{start:C,end:L}),O=Ie({ref:$,className:((r=vn(v.className,Q&&u,Q&&d,E.enter&&u,E.enter&&E.closed&&d,E.enter&&!E.closed&&l,E.leave&&p,E.leave&&!E.closed&&_,E.leave&&E.closed&&y,!E.transition&&S&&f))==null?void 0:r.trim())||void 0,...Ps(E)}),V=0;return W==="visible"&&(V|=de.Open),W==="hidden"&&(V|=de.Closed),E.enter&&(V|=de.Opening),E.leave&&(V|=de.Closing),N.createElement(xt.Provider,{value:k},N.createElement(Is,{value:V},se({ourProps:O,theirProps:v,defaultTag:ho,features:mo,visible:W==="visible",name:"Transition.Child"})))}function da(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=w(null),a=fo(e),c=pe(...a?[s,t]:t===null?[]:[t]);ot();let u=Ct();if(n===void 0&&u!==null&&(n=(u&de.Open)===de.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,l]=x(n?"visible":"hidden"),f=po(()=>{n||l("hidden")}),[p,_]=x(!0),y=w([n]);ne(()=>{p!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),_(!1))},[y,n]);let v=z(()=>({show:n,appear:r,initial:p}),[n,r,p]);Zr(n,s,()=>l("hidden")),ne(()=>{n?l("visible"):!Mt(f)&&s.current!==null&&l("hidden")},[n,f]);let m={unmount:o},g=G(()=>{var T;p&&_(!1),(T=e.beforeEnter)==null||T.call(e)}),$=G(()=>{var T;p&&_(!1),(T=e.beforeLeave)==null||T.call(e)});return N.createElement(xt.Provider,{value:f},N.createElement(Ft.Provider,{value:v},se({ourProps:{...m,as:j,children:N.createElement(vo,{ref:c,...m,...i,beforeEnter:g,beforeLeave:$})},theirProps:{},defaultTag:j,features:mo,visible:d==="visible",name:"Transition"})))}function fa(e,t){let n=te(Ft)!==null,r=Ct()!==null;return N.createElement(N.Fragment,null,!n&&r?N.createElement(Sn,{ref:t,...e}):N.createElement(vo,{ref:t,...e}))}let Sn=re(da),vo=re(ua),Cn=re(fa),he=Object.assign(Sn,{Child:Cn,Root:Sn});var pa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(pa||{}),ha=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ha||{});let ma={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Fn=ie(null);Fn.displayName="DialogContext";function Pt(e){let t=te(Fn);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pt),n}return t}function va(e,t){return Te(t.type,ma,e,t)}let _o=re(function(e,t){let n=Ee(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:c=!0,__demoMode:u=!1,...d}=e,l=w(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(l.current||(l.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=Ct();o===void 0&&f!==null&&(o=(f&de.Open)===de.Open);let p=w(null),_=pe(p,t),y=rt(p),v=o?0:1,[m,g]=Ke(va,{titleId:null,descriptionId:null,panelRef:Vt()}),$=G(()=>i(!1)),T=G(P=>g({type:0,id:P})),S=ot()?v===0:!1,[M,A]=qs(),W={get current(){var P;return(P=m.panelRef.current)!=null?P:p.current}},{resolveContainers:F,mainTreeNodeRef:b,MainTreeNode:R}=Zs({portals:M,defaultContainers:[W]}),q=f!==null?(f&de.Closing)===de.Closing:!1;ls(u||q?!1:S,{allowed:G(()=>{var P,E;return[(E=(P=p.current)==null?void 0:P.closest("[data-headlessui-portal]"))!=null?E:null]}),disallowed:G(()=>{var P,E;return[(E=(P=b.current)==null?void 0:P.closest("body > *:not(#headlessui-portal-root)"))!=null?E:null]})}),bs(S,F,P=>{P.preventDefault(),$()}),Ks(S,y==null?void 0:y.defaultView,P=>{P.preventDefault(),P.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Cs(u||q?!1:S,y,F),Zr(S,p,$);let[D,Y]=es(),Q=z(()=>[{dialogState:v,close:$,setTitleId:T},m],[v,m,$,T]),X=z(()=>({open:v===0}),[v]),k={ref:_,id:r,role:a,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":m.titleId,"aria-describedby":D},C=!Xs(),L=Oe.None;return S&&!u&&(L|=Oe.RestoreFocus,L|=Oe.TabLock,c&&(L|=Oe.AutoFocus),C&&(L|=Oe.InitialFocus)),N.createElement(Ds,null,N.createElement(io,{force:!0},N.createElement(Gs,null,N.createElement(Fn.Provider,{value:Q},N.createElement(co,{target:p},N.createElement(io,{force:!1},N.createElement(Y,{slot:X},N.createElement(A,null,N.createElement(na,{initialFocus:s,initialFocusFallback:p,containers:F,features:L},N.createElement(ss,{value:$},se({ourProps:k,theirProps:d,slot:X,defaultTag:_a,features:ya,visible:v===0,name:"Dialog"})))))))))),N.createElement(Ji,null,N.createElement(R,null)))}),_a="div",ya=$t.RenderStrategy|$t.Static;function ga(e,t){let{transition:n=!1,open:r,...o}=e,i=Ct(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?N.createElement(he,{show:r,transition:n,unmount:o.unmount},N.createElement(_o,{ref:t,...o})):N.createElement(_o,{ref:t,open:r,...o})}let wa="div";function ba(e,t){let n=Ee(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s},a]=Pt("Dialog.Panel"),c=pe(t,a.panelRef),u=z(()=>({open:s===0}),[s]),d=G(l=>{l.stopPropagation()});return N.createElement(o?Cn:j,null,se({ourProps:{ref:c,id:r,onClick:d},theirProps:i,slot:u,defaultTag:wa,name:"Dialog.Panel"}))}let Ea="div";function $a(e,t){let{transition:n=!1,...r}=e,[{dialogState:o}]=Pt("Dialog.Backdrop"),i=z(()=>({open:o===0}),[o]);return N.createElement(n?Cn:j,null,se({ourProps:{ref:t,"aria-hidden":!0},theirProps:r,slot:i,defaultTag:Ea,name:"Dialog.Backdrop"}))}let Ta="h2";function ka(e,t){let n=Ee(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=Pt("Dialog.Title"),a=pe(t);H(()=>(s(r),()=>s(null)),[r,s]);let c=z(()=>({open:i===0}),[i]);return se({ourProps:{ref:a,id:r},theirProps:o,slot:c,defaultTag:Ta,name:"Dialog.Title"})}let Sa=re(ga),yo=re(ba);re($a);let Ca=re(ka),Fa=Object.assign(Sa,{Panel:yo,Title:Ca,Description:os});const Nt={root:"_root_1duny_1",modal:"_modal_1duny_10",container:"_container_1duny_13",page:"_page_1duny_18",close:"_close_1duny_21"},xa={root:"_root_1h6qm_1"},be=e=>{const{children:t,size:n="md",fill:r="currentColor",stroke:o,strokeWidth:i,className:s="",viewBox:a="0 0 20 20"}=e,c=z(()=>{switch(n){case"sm":return"yvlw-w-4 yvlw-h-4";case"lg":return"yvlw-w-7 yvlw-h-7";case"xl":return"yvlw-w-10 yvlw-h-10";case"custom":return"";default:return"yvlw-w-5 yvlw-h-5"}},[n]);return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:a,fill:r,stroke:o,strokeWidth:i,className:`${c} ${s}`,children:t})},Ma=()=>h(be,{children:h("path",{d:"M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z"})}),go=e=>h(be,{...e,children:h("path",{fillRule:"evenodd",d:"M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z",clipRule:"evenodd"})}),Pa=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"})]}),Na=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),wo=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),La=e=>h(be,{...e,children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v2c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-2c0-2.66-5.33-4-8-4zm6 5H6v-.99c.2-.72 3.3-2.01 6-2.01s5.8 1.29 6 2v1z"})]}),Aa=e=>h(be,{...e,children:h("path",{d:"M18,10l-1.77-2.03l0.25-2.69l-2.63-0.6l-1.37-2.32L10,3.43L7.53,2.36L6.15,4.68L3.53,5.28l0.25,2.69L2,10l1.77,2.03 l-0.25,2.69l2.63,0.6l1.37,2.32L10,16.56l2.47,1.07l1.37-2.32l2.63-0.6l-0.25-2.69L18,10z M13.18,8.47l-4.24,4.24 c-0.2,0.2-0.51,0.2-0.71,0L6.82,11.3c-0.2-0.2-0.2-0.51,0-0.71s0.51-0.2,0.71,0l1.06,1.06l3.89-3.89c0.2-0.2,0.51-0.2,0.71,0 S13.38,8.28,13.18,8.47z"})}),bo=e=>h(be,{...e,viewBox:"0 0 24 24",children:h("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Ra=e=>h(be,{...e,children:h("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})});class Ce{static loadVision(){return import("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12")}static async loadDetector(){try{const{FaceLandmarker:t,FilesetResolver:n}=await Ce.loadVision(),r=await n.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12/wasm");return await t.createFromOptions(r,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},outputFaceBlendshapes:!0,runningMode:"IMAGE",numFaces:1})}catch(t){return Promise.reject(t)}}static denormalizeKeypoints(t,n,r){return t.map(o=>({x:o.x*n,y:o.y*r,z:o.z}))}static getBoundingBox(t,n,r){const o={width:n*.6,height:r*.8,x:0,y:0};o.x=(n-o.width)/2,o.y=(r-o.height)/2;let i=1/0,s=-1/0,a=1/0,c=-1/0;t.forEach(d=>{i=Math.min(i,d.x),s=Math.max(s,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y)});const u={xMin:i,xMax:s,yMin:a,yMax:c};return u.xMin<o.x||u.xMax>o.x+o.width||u.yMin<o.y||u.yMax>o.y+o.height?{box:{xMin:i,xMax:s,yMin:a,yMax:c,width:s-i,height:c-a},inBox:!1}:{box:{xMin:i,xMax:s,yMin:a,yMax:c,width:s-i,height:c-a},inBox:!0}}static async detectFaces(t,n){var r;try{const{width:o,height:i}=n,{faceLandmarks:s,faceBlendshapes:a}=await t.detect(n);if(s.length===0)return{faces:[],blendShapes:[],inBox:!1};const c=Ce.denormalizeKeypoints(s[0],o,i),{box:u,inBox:d}=Ce.getBoundingBox(c,o,i);return{faces:[{keypoints:c,box:u}],blendShapes:((r=a==null?void 0:a[0])==null?void 0:r.categories)??[],inBox:d}}catch(o){return Promise.reject(o)}}}const Ia=(e,t)=>{let n;return typeof OffscreenCanvas<"u"?n=new OffscreenCanvas(e,t):(n=document.createElement("canvas"),n.width=e,n.height=t),n},xn=(e,t,n,r,o)=>{let i=0,s=0,a=t,c=n;const d=Ia(t,n).getContext("2d",o);return d.drawImage(e,0,0),d.getImageData(i,s,a,c)},Da=e=>new Promise(t=>{const n=document.createElement("canvas");let{width:r}=e,{height:o}=e;e instanceof HTMLVideoElement&&(r=e.videoWidth,o=e.videoHeight),n.width=r,n.height=o,n.getContext("2d").drawImage(e,0,0),n.toBlob(s=>t(s))});function Oa(e){const{width:t,height:n,data:r}=e;let o=0,i=0;const s=[0,-1,0,-1,4,-1,0,-1,0];for(let d=1;d<n-1;d++)for(let l=1;l<t-1;l++){let f=0,p=0,_=0,y=0;for(let m=-1;m<=1;m++)for(let g=-1;g<=1;g++){const $=((d+m)*t+(l+g))*4,T=s[y++];f+=r[$]*T,p+=r[$+1]*T,_+=r[$+2]*T}const v=.299*f+.587*p+.114*_;o+=v,i+=v*v}const a=(t-2)*(n-2);if(a===0)return 0;const c=o/a;return i/a-c*c}function Ha(){if(MediaRecorder.isTypeSupported("video/webm; codecs=vp9"))return{mimeType:"video/webm; codecs=vp9",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/webm"))return{mimeType:"video/webm",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/mp4"))return{mimeType:"video/mp4",videoBitsPerSecond:25e4}}function Eo(e={}){const{onRecord:t=()=>{},onStop:n=()=>{}}=e,r=w([]),o=w(null),i=w(null),s=U(f=>{r.current.push(f)},[]),a=U(async f=>{if(o.current)return;let p=null;f instanceof ImageData?p=await new Promise(_=>{const y=document.createElement("canvas");y.width=f.width,y.height=f.height;const v=y.getContext("2d");v?(v.putImageData(f,0,0),y.toBlob(m=>{_(m)},"image/jpeg",.95)):_(null)}):p=await Da(f),p&&(o.current=p)},[]),c=U(()=>{o.current=null},[]),u=U(f=>{f.data.size>0&&t(f.data)},[]),d=U(()=>{!i.current||i.current.state==="inactive"||(i.current.stop(),i.current.stream.getTracks().forEach(f=>f.stop()),n())},[]),l=U(f=>{i.current||(i.current=new MediaRecorder(f,Ha()),i.current.ondataavailable=u,i.current.onstop=d,i.current.start(1e3))},[]);return{saveStream:s,savePhoto:a,start:l,stop:d,savedStreams:r,savedPhoto:o,clearSavedPhoto:c}}const Wa="https://cdn.svc.youverify.co",Ua="61d880f1e8e15aaf24558f1a",za=(e,t,n,r)=>{if(t)if(!n)r==null||r({faceImage:"",passed:!1,error:{key:"FORCE_DEV_URL_ERROR",message:"publicKey is required when forceDevUrl is true"}});else if(n!==Ua)r==null||r({faceImage:"",passed:!1,error:{key:"FORCE_DEV_URL_ERROR",message:"Invalid publicKey for forceDevUrl, access denied"}});else return"https://identity.dev.svc.youverify.co";return e?"https://identity.staging.svc.youverify.co":"https://identity.svc.youverify.co"};function Va(e,t,n,r){const o=za(e,t,n,r);return{postData:async c=>{const{faceImage:u,publicKey:d,passed:l,metadata:f,video:p,sessionId:_}=c,y=new FormData;y.append("files",u),y.append("files",p);const v=await fetch(`${Wa}/v1/uploads/media`,{method:"POST",headers:{},body:y});if(!v.ok)throw v;const m=(await v.json()).data,g={sessionId:_,components:["liveness"],faceImage:m[0].cachedLocation,livenessClip:m[1].cachedLocation,passed:l,metadata:f};d&&(g.publicMerchantID=d);const $=await fetch(`${o}/v1/sdk/identity/liveness/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)});if(!$.ok)throw $;return(await $.json()).data},fetchSessionToken:async()=>{throw new Error("fetchSessionToken is deprecated. Provide sessionToken from your backend.")},validateSessionId:async c=>{const u=await fetch(`${o}/v1/sdk/session/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:c})}),d=await u.json().catch(()=>({}));if(!u.ok){const l=(d==null?void 0:d.message)||"Session validation failed";throw new Error(l)}return!0}}}const ja=360,Ba="#125766",qa="https://cdn.youverify.co/1721901834404-q2nxqyng5klm918b3BDVU.jpg",$o="https://cdn.youverify.co",st={js:{default:"1731681780468-ttgfiK6Sl1GKegUe-wm4v.js",simd:"1731681609027-RTOweJqdl8Tt39aAdyie9.js"},wasm:{default:"1731681817302-aVNwDW6DP2MsDNTbiav_V.wasm",simd:"1731681739675-nvF1En4g5rAW4daq5g5DH.wasm"}},Ya=[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11],To={spoofing:{key:"GLARE_DETECTION_ERROR",message:"We detected a screen recording or photo during your liveness."},"no face":{key:"LIVENESS_FACE_NOT_FOUND",message:"We could not detect a face in your test."},lighting:{key:"LIGHTING_ERROR",message:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face."}},Ga={"complete-the-circle":{Icon:Pa,name:"Complete The Circle ⭕️",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"},"yes-or-no":{Icon:Na,name:"Yes or No ❓",description:"First position your face in the camera. Then tilt your head to the left to answer No and to the right to answer Yes"},motions:{Icon:wo,name:"Motions 💫",description:"First position your face in the camera frame, then follow the instructions"},blink:{Icon:wo,name:"Blink 💫",description:"First position your face in the camera frame, then follow the instructions"},"facial-expressions":{Icon:go,name:"Facial Expressions 🤪",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"}},ko=ie({tasks:[],namespace:"",user:void 0,currentTaskIndex:0,completedCount:0,nextTask:()=>{},completed:!1,onRequestClose:()=>{},faceDetector:null,saveStream:()=>{},savePhoto:()=>{},clearSavedPhoto:()=>{},onComplete:()=>Promise.resolve(),onFailure:()=>{},imageCaptured:!1,setImageCaptured:()=>{},sandboxEnvironment:!0,isMobileAppWebView:!1});let So,Co=!1;function Ka(e){const{publicKey:t,tasks:n,children:r,namespace:o,user:i,branding:s,onRequestClose:a,onSuccess:c=()=>{},onFailure:u=()=>{},metadata:d,presentation:l,sandboxEnvironment:f=!0,isMobileAppWebView:p=!1,sessionId:_,sessionToken:y,forceDevUrl:v}=e,[m,g]=x(0),[$,T]=x(0),[S,M]=x(null),[A,W]=x(!1),{saveStream:F,savePhoto:b,savedPhoto:R,clearSavedPhoto:q,savedStreams:D}=Eo(),{postData:Y,validateSessionId:Q}=Va(f,v,t,u),X=z(()=>$===n.length,[n,$]),k=()=>{T(E=>E+1),g(E=>E+1)},C=E=>{const O=new Image;O.crossOrigin="Anonymous",O.src=qa,O.onload=()=>{const V=xn(O,O.width,O.height);Ce.detectFaces(E,V)}},L=async()=>{if(!R.current){u({faceImage:"",passed:!1,metadata:d,error:{key:"image_capture_failed",message:"No face image captured. Image capture failed. Please try again."}}),a();return}try{const E=await Y({faceImage:R.current,video:new Blob(D.current,{type:"video/mp4"}),publicKey:t,passed:!0,metadata:d,sessionId:_});c(E),a()}catch{u({faceImage:"",passed:!1,metadata:d,error:{key:"API_ERROR",message:"Failed to process liveness check. Please try again."}}),a()}},P=async()=>{try{if(!_)throw new Error("sessionId is required. Provide it from your backend.");if(!y)throw new Error("sessionToken is required. Provide it from your backend.");await Q(_)}catch(O){const V=O instanceof Error?O.message:"Invalid or expired sessionId";u({faceImage:"",passed:!1,metadata:d,error:{key:"invalid_or_expired_session",message:V}});return}const E=await Ce.loadDetector();So=E,C(E),M(E)};return H(()=>{if(Co){M(So);return}P(),Co=!0},[]),h(ko.Provider,{value:{tasks:n,namespace:o,user:i,currentTaskIndex:m,completed:X,completedCount:$,nextTask:k,branding:{name:(s==null?void 0:s.name)??"Youverify",color:(s==null?void 0:s.color)??void 0,logo:(s==null?void 0:s.logo)??"/yv_logo.svg",logoAlt:(s==null?void 0:s.logoAlt)??`${(s==null?void 0:s.name)??"Youverify"} logo`,hideLogoOnMobile:(s==null?void 0:s.hideLogoOnMobile)??!0,showPoweredBy:(s==null?void 0:s.showPoweredBy)??!0,poweredByText:(s==null?void 0:s.poweredByText)??"Powered by Youverify",poweredByLogo:(s==null?void 0:s.poweredByLogo)??"/yv_logo.svg"},onRequestClose:a,faceDetector:S,saveStream:F,savePhoto:b,clearSavedPhoto:q,onComplete:L,onFailure:u,presentation:l,imageCaptured:A,setImageCaptured:W,sandboxEnvironment:f,publicKey:t,isMobileAppWebView:p,sessionId:_,sessionToken:y},children:r})}function fe(){return te(ko)}const oe={root:"_root_vqy7d_1",container:"_container_vqy7d_4",lhs:"_lhs_vqy7d_7",info:"_info_vqy7d_11",active:"_active_vqy7d_32",completed:"_completed_vqy7d_39",rhs:"_rhs_vqy7d_62",profile:"_profile_vqy7d_65",avatar:"_avatar_vqy7d_68",main:"_main_vqy7d_81",content:"_content_vqy7d_84"},Mn={root:"_root_lryhb_1",container:"_container_lryhb_1",brand:"_brand_lryhb_6"};function Xa(){const{branding:e,isMobileAppWebView:t,onRequestClose:n,presentation:r}=fe();return h("div",{className:Mn.root,children:h("div",{className:Mn.container,children:[h("div",{className:Mn.brand,children:(e==null?void 0:e.logo)&&!(e.hideLogoOnMobile&&t)&&h("img",{className:"yvlw-h-10",src:e.logo,alt:e.logoAlt||"Logo"})}),(t||r==="page")&&h("button",{type:"button",className:"yvlw-text-sm yvlw-rounded yvlw-px-3 yvlw-py-2 yvlw-border yvlw-border-gray-300 dark:yvlw-border-gray-700",onClick:()=>n(),children:"Close"})]})})}const Fo="colorScheme";function xo(){const{namespace:e}=fe(),t=()=>{const o=localStorage.getItem(Fo);return!o&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":o},n=(o=null)=>{o&&localStorage.setItem(Fo,o);const i=`${e}-color-scheme`,s=document.documentElement;o&&o==="dark"?s==null||s.setAttribute(i,"dark"):s==null||s.removeAttribute(i)};return{setColorScheme:n,toggleColorScheme:()=>{const o=t();return n(o==="dark"?"light":"dark")},getColorScheme:t}}const Za={root:"_root_bcsvc_1"};function Ja(){if(!(window.screen.width>=900))return 10/9}function at(e){const{children:t,onStream:n=()=>{},onRecord:r=()=>{}}=e,o=w(null),i=w(0),s=w(null),{start:a,stop:c}=Eo({onRecord:r}),u=async()=>{try{const f=await navigator.mediaDevices.getUserMedia({video:{aspectRatio:{exact:Ja()}}});s.current=f,a(f),o.current&&(o.current.srcObject=f)}catch{}},d=()=>{s.current&&(s.current.getTracks().forEach(f=>f.stop()),s.current=null,c(),o.current&&(o.current.srcObject=null))},l=()=>{n(o),i.current=requestAnimationFrame(l)};return H(()=>{const f=o.current;if(!f)return;const p=()=>{i.current=requestAnimationFrame(l)};return u(),f.addEventListener("canplay",p),()=>{f.removeEventListener("canplay",p),cancelAnimationFrame(i.current),d()}},[]),h("div",{className:Za.root,children:[h("video",{ref:o,autoPlay:!0,loop:!0,playsInline:!0}),t]})}const ct={container:"_container_mcmsr_1",focused:"_focused_mcmsr_12",progress:"_progress_mcmsr_15",completed:"_completed_mcmsr_36",marker:"_marker_mcmsr_40"},Mo=360,Qa=50;function ec(e){const{visitedSections:t,sectionsCount:n,faceDetected:r,divisions:o=Qa}=e,i=z(()=>{const s=[ct.container];return r&&s.push(ct.focused),s.join(" ")},[r]);return h("div",{className:i,children:[h(he,{as:"div",show:r,leave:"yvlw-transition yvlw-linear yvlw-duration-300",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-125 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-300",enterFrom:"yvlw-scale-125 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:ct.progress,children:Array.from(Array(o).keys()).map(s=>{const a=s*Mo/o,c=Math.ceil((a+1)*n/Mo),u=t.includes(c),d=u?s-(c-1)*(o/n):0,l=[];u&&l.push(ct.completed);const f=u?"translateX(158px)":"translateX(150px)";return h("div",{className:l.join(" "),style:{transform:`rotate(${a}deg) ${f}`,transitionDelay:`${d*20}ms`}},`key-${s}`)})})}),h(he,{as:"div",show:!r,leave:"yvlw-transition yvlw-linear yvlw-duration-200",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-75 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-200",enterFrom:"yvlw-scale-75 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:ct.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})]})}function Po(){return{checkZoomLevel:(r,o)=>{const{box:i}=r,{width:s,height:a}=i,c=s*a,u=o**2,d=c/u;if(d>.9)throw new Error("Move face farther from camera");if(d<.05)throw new Error("Move face closer to camera")},checkFacialFeatures:(r,o)=>{},checkInFrame:(r,o)=>{const{offsetX:i,offsetY:s}=o,{box:a}=r;if(!(a.xMin-i>=o.x&&a.yMin-s>=o.y&&a.xMax-i<=o.x+o.width&&a.yMax-s<=o.y+o.height))throw new Error("Position head in frame")}}}function Lt(e={}){const{validations:t=["zoom"],frameSize:n,onFace:r=()=>{},onError:o=()=>{}}=e,{faceDetector:i}=fe(),{checkFacialFeatures:s,checkZoomLevel:a,checkInFrame:c}=Po(),u=w(null),d=f=>{var p;try{if(f.length===0)throw new Error("Detecting face...");if(f.length>1)throw new Error("A maximum of 1 face is allowed");const _=u.current,y=(p=u.current)==null?void 0:p.parentElement;if(!_||!y)return;const v=f[0];for(const m of t)switch(m){case"zoom":a(v,Math.min(y.clientHeight,y.clientWidth));break;case"features":s(v,Math.min(y.clientHeight,y.clientWidth));break;case"in-frame":if(!n)throw new Error("Frame size is required to check if face is in frame");const g=n+200;c(v,{x:(y.clientWidth-g)/2,y:(y.clientHeight-g)/2,width:g,height:g,offsetX:(_.videoWidth-y.clientWidth)/2,offsetY:(_.videoHeight-y.clientHeight)/2});break;default:break}r(v)}catch(_){const{message:y}=_;o(y)}};return{detectFaces:async f=>{if(!i)return;const{ref:p}=f;u.current=p.current;const _=u.current;if(!_)throw new Error("No Video Source detected");const{videoWidth:y,videoHeight:v}=_;if(y===0||v===0)return;const m=xn(_,y,v),g=await Ce.detectFaces(i,m);d(g.faces)}}}const ae={root:"_root_5hgaj_1",container:"_container_5hgaj_4",progress:"_progress_5hgaj_7",intro:"_intro_5hgaj_12",content:"_content_5hgaj_15",branding:"_branding_5hgaj_18",instructionsContainer:"_instructionsContainer_5hgaj_22",instructions:"_instructions_5hgaj_22"},No={root:"_root_h5elg_1",spinner:"_spinner_h5elg_22"},Lo={container:"_container_1vep2_1",spin:"_spin_1vep2_1",md:"_md_1vep2_7",lg:"_lg_1vep2_10"};function Ao(e){const{size:t="md",message:n,className:r=""}=e;return h("span",{className:`${Lo.container} ${Lo[t]} ${r}`,children:n})}function At(e){const{Icon:t,description:n,title:r,actionText:o="Okay, got it",onActionClick:i=()=>{},loading:s=!1,children:a,hideButton:c=!1}=e;return h("div",{className:No.root,children:[h(t,{size:"custom",className:"yvlw-h-20 yvlw-mx-auto yvlw-mb-12"}),h("h2",{children:r}),h("p",{className:"subtext",children:n}),!c&&h("div",{className:"yvlw-mt-12",children:h(Gi,{onClick:()=>i(),className:"yvlw-flex yvlw-items-center yvlw-space-x-3",disabled:s,children:[h("span",{className:"yvlw-flex-1 yvlw-flex yvlw-items-center yvlw-space-x-1 yvlw-justify-center",children:o}),s&&h(Ao,{className:No.spinner})]})}),a]})}const Ro="yvlw-absolute yvlw-w-full yvlw-h-full",Io="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300",Do="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300";function Rt(e){const{children:t,instruction:n,completed:r,failed:o,onStart:i=()=>{},onReset:s=()=>{}}=e,[a,c]=x(!1),{completedCount:u,tasks:d,nextTask:l,branding:f,isMobileAppWebView:p}=fe(),_=z(()=>u*100/d.length,[u,d.length]);return H(()=>{!r&&!o&&(async()=>{await i(),c(!0)})()},[]),H(()=>{r&&(()=>{l()})()},[r]),h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:[h("div",{style:{width:`${_}%`},className:ae.progress}),h(he,{as:"div",show:a&&!r&&!o,enter:Io,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Ro,children:[h("div",{className:`${ae.content}`,children:t}),h("div",{className:ae.instructionsContainer,children:[h("div",{className:ae.instructions,children:[h("h2",{children:n.title}),h("p",{className:"subtext",children:n.description})]}),h("div",{className:ae.branding,children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})})]})]}),h(he,{show:o,as:"div",enter:Io,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Ro,children:h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:"Could not confirm liveness on this task. Click on the button below to go again",onActionClick:s,actionText:"Try Again"})})})]})})}function It(e={}){const{timeout:t,onTimeout:n=()=>{}}=e,[r,o]=x(!1),i=w(null),s=U(()=>{t&&i.current&&clearTimeout(i.current)},[]),a=U(()=>{t&&(i.current=setTimeout(()=>{o(!0),n()},t))},[]),c=U(()=>{o(!1),a()},[]);return H(()=>s,[]),{timedOut:r,reset:c,start:a,stop:s}}const tc=1,Pn=8,Oo="Place face in frame";function nc(e){const{difficulty:t,timeout:n}=e,{saveStream:r}=fe(),[o,i]=x([]),[s,a]=x(Oo),[c,u]=x(!1),[d,l]=x(!1),f=w(new Set),p=w(!1),_=w(null),{reset:y,start:v,stop:m,timedOut:g}=It({timeout:n}),$=()=>{i([]),a(Oo),u(!1),l(!1),f.current=new Set,p.current=!1,_.current=null,y()},T=b=>{const R=b*Pn,q=Math.ceil((R+1)/ja);f.current.has(q)||(f.current.add(q),i(Array.from(f.current))),f.current.size>=Pn&&(m(),setTimeout(()=>{l(!0)},1e3))},S=(b,R)=>{let D=Math.atan2(R,b)*(180/Math.PI);return D<0&&(D+=360),D},M=U(()=>{if(f.current.size===0)return 25;switch(t){case"easy":return 5;case"hard":return 15;default:return 10}},[]),A=b=>{const{keypoints:R,box:q}=b,D={x:q.width*.5,y:q.height*.5},Y=R[tc],Q={y:Y.y-q.yMin,x:Y.x-q.xMin},X=D.x-Q.x,k=Q.y-D.y,C=M();return Math.abs(X)<C&&Math.abs(k)<C?null:S(X,k)},{detectFaces:W}=Lt({frameSize:280,validations:["zoom","in-frame"],onFace:b=>{u(!0),a("Slowly move head around to complete circle");const R=A(b);R&&T(R)},onError:b=>{a(b),i([]),f.current.clear(),_.current=null,p.current=!1}});return h(j,{children:h(Rt,{instruction:{title:s,description:c?void 0:"Always ensure face is in frame"},name:"complete-the-circle",completed:d,failed:g,onReset:$,onStart:v,children:h(at,{onStream:b=>{try{if(!b.current||d)return;const{videoWidth:R}=b.current;W({ref:b,frameSize:R})}catch{}},onRecord:r,children:h(ec,{faceDetected:c,sectionsCount:Pn,visitedSections:o})})})})}const Nn={root:"_root_thujo_1",sticker:"_sticker_thujo_4",no:"_no_thujo_7",yes:"_yes_thujo_12"};function rc(e){const{show:t,stickers:n}=e;return h(j,{children:t&&h("div",{className:Nn.root,children:n.map(r=>h("div",{className:`${Nn.sticker} ${Nn[r]}`,children:r.toUpperCase()},`sticker-${r}`))})})}const oc={question:"Are you alive?",errorMessage:"You have to be alive to proceed though",answer:!0},ic="Wrong answer. Try again",Ho="Keep face in camera";function sc(e){const{difficulty:t,questions:n=[oc],timeout:r}=e,[o,i]=x(Ho),[s,a]=x(!1),[c,u]=x(!1),{saveStream:d}=fe(),l=w("inactive"),f=w(0),p=w(!1),_=w(null),y=w(null),v=w(null),m=()=>{_.current&&clearTimeout(_.current),y.current&&clearTimeout(y.current)},{reset:g,start:$,stop:T,timedOut:S}=It({timeout:r,onTimeout:m}),M=()=>{i(Ho),a(!1),u(!1),l.current="inactive",f.current=0,p.current=!1,g()},A=D=>{const{keypoints:Y}=D,Q=Y[1],X=Y[9],k=Q.x-X.x,C=Q.y-X.y;return 90-Math.atan2(C,k)*(180/Math.PI)},W=D=>{l.current="inactive",i(n[D].question),_.current=setTimeout(()=>{l.current="active"},2e3)},F=z(()=>{switch(t){case"easy":return 2;case"hard":return 6;default:return 4}},[]),b=D=>{try{if(l.current="inactive",Math.abs(D)<F)throw new Error("Tilt head further to answer");const Y=D>0,Q=n[f.current].answer;if(Y===Q)f.current+=1,f.current===n.length?(u(!0),T()):W(f.current);else throw new Error(n[f.current].errorMessage||ic)}catch(Y){i(Y.message),y.current=setTimeout(()=>{W(f.current)},2e3)}},{detectFaces:R}=Lt({onFace:D=>{if(p.current||(a(!0),p.current=!0,W(f.current)),l.current==="inactive")return;const Y=A(D);b(Y)},onError:D=>{i(D)}}),q=D=>{try{if(!D.current||c)return;v.current=D.current;const{videoWidth:Y}=D.current;R({ref:D,frameSize:Y})}catch{}};return H(()=>m,[]),h(Rt,{instruction:{title:o,description:s?"":"Move head left for No and right for Yes"},name:"yes-or-no",failed:S,onReset:M,onStart:$,completed:c,children:h(at,{onStream:q,onRecord:d,children:h(rc,{show:s,stickers:["yes","no"]})})})}function ac(e={}){const{onChange:t=()=>{}}=e,n=!!window.DeviceOrientationEvent,r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma})};return H(()=>(window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r)}),[]),{canUse:n}}function Be(e,t){return Math.sqrt(e**2+t**2)}function cc(e){const t=e.slice();for(let n=t.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}const He=(e,t)=>{for(const[n,r]of Object.entries(e))if(r===t)return n;return null},lc=e=>{const t=Object.keys(To);for(const n of t)if(new RegExp(`\\b${n}\\b`,"i").test(e))return To[n];return{key:"VALIDATION_ERROR",message:"We detected an error during your test. Please TRY AGAIN"}};function uc(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(null),s=w(!0),a=w(null),c=w(null),u=w(0),d=w(!1),l=z(()=>{switch(o){case"easy":return 6;case"hard":return 10;default:return 8}},[]),f=()=>{if(u.current<t){const v=t-u.current;let m=`Nod head ${v} `;v<t&&(m+="more "),m+=v>1?"times":"time",n(m);return}d.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)},{canUse:p}=ac({onChange:v=>{c.current=v}});return{evaluate:v=>{if(!p){n("Cannot perform task. Transfer to mobile device to complete");return}if(!c.current||!c.current.beta){n("Cannot perform task. Transfer to mobile device to complete");return}if(c.current.beta<60||c.current.beta>100){n("Keep phone in upright position to continue");return}if(d.current)return;const{keypoints:m}=v,g=Be(m[6].x-m[8].x,m[6].y-m[8].y),T=Be(m[2].x-m[1].x,m[2].y-m[1].y)/g*10;if(T>l){if(i.current||!s.current)return;i.current=T,s.current=!1,a.current=setTimeout(()=>{i.current=null},3e3)}else i.current&&i.current-T>l/2&&(u.current+=1,i.current=null,a.current&&clearTimeout(a.current)),s.current=!0;f()},reset:()=>{i.current=null,s.current=!0,a.current=null,c.current=null,u.current=0,d.current=!1}}}function dc(e){const{onMessage:t,onComplete:n,difficulty:r}=e,o=w(!1),i=z(()=>{switch(r){case"easy":return 80;case"hard":return 120;default:return 100}},[]);return{evaluate:c=>{if(o.current)return;const{keypoints:u}=c,d=Be(u[6].x-u[8].x,u[6].y-u[8].y);if(Be(u[14].x-u[13].x,u[14].y-u[13].y)/d*100>i){o.current=!0,t("Awesome!"),setTimeout(()=>{n()},500);return}t("Open your mouth wide")},reset:()=>{o.current=!1}}}function Wo(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(!0),s=w(!1),a=w(null),c=w(0),u=z(()=>{switch(o){case"easy":return{closed:20,open:30};case"hard":return{closed:10,open:30};default:return{closed:15,open:30}}},[]),d=y=>{i.current&&(y>=u.closed||(i.current=!1,a.current=Date.now()))},l=y=>{if(!i.current&&!(y<u.open)&&(i.current=!0,a.current)){const v=Date.now(),m=a.current;(v-m)/1e3<=2&&(c.current+=1)}},f=()=>{if(c.current<t){const y=t-c.current;let v=`Blink right eye ${y} `;y<t&&(v+="more "),v+=y>1?"times":"time",n(v);return}s.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)};return{evaluate:y=>{if(s.current)return;const{keypoints:v}=y,m=Be(v[6].x-v[8].x,v[6].y-v[8].y),$=Be(v[145].x-v[159].x,v[145].y-v[159].y)/m*100;d($),l($),f()},reset:()=>{i.current=!0,s.current=!1,a.current=null,c.current=0}}}var Uo=(e=>(e.open_mouth="open_mouth",e.blink="blink",e))(Uo||{});const zo=cc(Object.keys(Uo)),Vo="Keep face in camera";function fc(e){const{difficulty:t,maxBlinks:n=3,maxNods:r=3,timeout:o}=e,i=w(0),[s,a]=x(Vo),[c,u]=x(!1),[d,l]=x(null),f=w(!1),{saveStream:p}=fe(),{reset:_,start:y,stop:v,timedOut:m}=It({timeout:o}),g=()=>{if(i.current===zo.length-1){u(!0),v();return}i.current+=1},$=uc({total:Math.floor(Math.random()*r+1),difficulty:t,onMessage:b=>a(b),onComplete:g}),T=dc({difficulty:t,onMessage:b=>a(b),onComplete:g}),S=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:b=>a(b),onComplete:g}),{detectFaces:M}=Lt({onFace:b=>{switch(f.current||(f.current=!0),zo[i.current]){case"open_mouth":T.evaluate(b);break;case"blink":S.evaluate(b);break}},onError:b=>{a(b)}}),A=()=>{i.current=0,a(Vo),u(!1),f.current=!1,S.reset(),$.reset(),T.reset(),_()},W=async b=>{try{if(!b.current||c)return;const{videoWidth:R}=b.current;await M({ref:b,frameSize:R,throttleInterval:500})}catch{}},F=async()=>{};return h(Rt,{instruction:{title:s,description:"Follow the directives as instructed"},name:"motions",failed:m,onReset:A,completed:c,onStart:async()=>{await F(),y()},children:d?h(j,{}):h(at,{onStream:W,onRecord:p})})}const jo="Keep face in camera";function pc(e){const{difficulty:t,maxBlinks:n=3,timeout:r}=e,[o,i]=x(jo),[s,a]=x(!1),[c,u]=x(null),d=w(!1),{saveStream:l}=fe(),{reset:f,start:p,stop:_,timedOut:y}=It({timeout:r}),v=()=>{a(!0),_()},m=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:M=>i(M),onComplete:v}),{detectFaces:g}=Lt({onFace:M=>{d.current||(d.current=!0),m.evaluate(M)},onError:M=>{i(M)}}),$=()=>{i(jo),a(!1),d.current=!1,m.reset(),f()},T=async M=>{try{if(!M.current||s)return;const{videoWidth:A}=M.current;await g({ref:M,frameSize:A})}catch{}},S=async()=>{};return h(Rt,{instruction:{title:o,description:"Follow the directives as instructed"},name:"blink",failed:y,onReset:$,completed:s,onStart:async()=>{await S(),p()},children:c?h(j,{}):h(at,{onStream:T,onRecord:l})})}const Ln={LEFT_EYE:[36,37,38,39,40,41],RIGHT_EYE:[42,43,44,45,46,47],MOUTH:[48,49,50,51,52,53,54,55,56,57,58,59]},Dt=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),Bo=e=>{if(e.length!==6)return 0;const t=Dt(e[1],e[5]),n=Dt(e[2],e[4]),r=Dt(e[0],e[3]);return(t+n)/(2*r)},hc=e=>{if(e.length<12)return 0;const t=e[9],n=e[3];return Dt(t,n)},mc=(e,t,n,r)=>{var l,f,p;let o=!0,i=!0;if(!r){const v=Ln.LEFT_EYE.map(A=>e[A]),m=Ln.RIGHT_EYE.map(A=>e[A]),g=Ln.MOUTH.map(A=>e[A]),$=Bo(v),T=Bo(m),S=hc(g);o=($+T)/2>1,i=S<73.24,o||t("Please look at the camera!"),i||t("Please close your mouth!")}const s=.5,a=.12,c=((l=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkLeft"))==null?void 0:l.score)??0,u=((f=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkRight"))==null?void 0:f.score)??0,d=((p=r==null?void 0:r.find(_=>_.categoryName==="jawOpen"))==null?void 0:p.score)??0;return o=c<s&&u<s,o||t("Please look at the camera!"),i=d<a,i||t("Please close your mouth!"),{eyesOpen:o,mouthClosed:i}};function vc(e={}){const{validations:t=["zoom","in-frame"],frameSize:n,onFace:r=()=>{},onError:o=()=>{},onMessage:i=()=>{},livenessTimeout:s}=e,{faceDetector:a,savePhoto:c}=fe(),{checkFacialFeatures:u,checkZoomLevel:d,checkInFrame:l}=Po(),f=w(null),p=w(null),_=w(!1),y=w(null),v=w(!1),m=w([]),g=U(()=>{p.current&&clearTimeout(p.current),y.current&&clearTimeout(y.current),m.current.forEach(clearTimeout),v.current=!1,_.current=!0},[]),$=w(null),T=w(null),S=w([]),M=10,A=7.5,W=2,F=w({sharpness:0,data:null}),b=(k,C)=>{const L=k.getContext("2d");if(!L||C.width===0||C.height===0||!L||C.width===0||C.height===0)return!1;const P=L.getImageData(C.xMin,C.yMin,C.width,C.height),{data:E}=P;let O=0,V=0;for(let J=0;J<E.length;J+=4).299*E[J]+.587*E[J+1]+.114*E[J+2]>250&&V++;const Z=E.length/4;return O=V/Z,O>.01},R=(k,C,L,P)=>{const E=C.current,O=E==null?void 0:E.parentElement;if(!(!E||!O))for(const V of P)switch(V){case"zoom":d(k,Math.min(O.clientHeight,O.clientWidth));break;case"features":u(k,Math.min(O.clientHeight,O.clientWidth));break;case"in-frame":let Z=L;Z||(Z=Math.min(O.clientHeight,O.clientWidth)*.7);const J=Z+200;l(k,{x:(O.clientWidth-J)/2,y:(O.clientHeight-J)/2,width:J,height:J,offsetX:(E.videoWidth-O.clientWidth)/2,offsetY:(E.videoHeight-O.clientHeight)/2});break}},q=k=>{const C=[33,133,159,362,263,386],L=.5;for(const P of C){const E=k[P];if(!E||E.score&&E.score<L)return!1}return!0},D=(k,C)=>{const L=k.getContext("2d");if(!L||C.width===0||C.height===0)return!1;const P=L.getImageData(C.xMin,C.yMin,C.width,C.height),{data:E}=P;let O=0;for(let Z=0;Z<E.length;Z+=4){const J=E[Z],ee=E[Z+1],qe=E[Z+2],Ot=.299*J+.587*ee+.114*qe;O+=Ot}return O/(E.length/4)<60},Y=k=>{const C={x:k.box.xMin+(k.box.width??0)/2,y:k.box.yMin+(k.box.height??0)/2};if(S.current.push(C),S.current.length>M&&S.current.shift(),S.current.length<M)return!1;let L=0,P=0,E=0;for(let ee=1;ee<S.current.length;ee++){const qe=S.current[ee-1],Ot=S.current[ee],ut=Ot.x-qe.x,Yo=Ot.y-qe.y,Go=Math.sqrt(ut*ut+Yo*Yo);Go>=2&&(L+=Go,ee>1&&Math.sign(ut)!==Math.sign(E)&&Math.abs(ut)>3&&P++,E=ut)}const V=L/(M-1)>A,Z=P>=W,J=V||Z;return J&&i("🚨 Head shake detected!"),J},Q=(k,C,L,P)=>{try{if(k.length===0||k.length>1){p.current&&(clearTimeout(p.current),p.current=null),i(k.length>1?"Please ensure only one face is visible":"Detecting face...");return}const E=k[0];let O="",V=!0;try{R(E,f,n,t)}catch(ee){O=ee.message,V=!1}Y(E)&&(O="Please hold your head steady",V=!1),P||(O="Center your face in the frame",V=!1),q(E.keypoints)||(O="Please ensure your eyes are clearly visible. Remove glasses if necessary.",V=!1);const{eyesOpen:Z,mouthClosed:J}=mc(E.keypoints,i,!1,L);if(Z?J||(O="Please close your mouth",V=!1):(p.current&&(clearTimeout(p.current),p.current=null),V=!1),!V){p.current&&(clearTimeout(p.current),p.current=null,m.current.forEach(clearTimeout)),i(O),r(E,!1,L,!1);return}if(!p.current){if(D($.current,E.box)){i("Too dark – move to a well-lit area");return}if(b($.current,E.box)){i("Too much glare. Please avoid direct light on your face.");return}i("Hold still..."),F.current={sharpness:0,data:null},m.current.forEach(clearTimeout);const ee=setTimeout(()=>i("Almost there..."),400),qe=setTimeout(()=>i("Detecting liveness..."),700);m.current=[ee,qe],p.current=setTimeout(()=>{F.current.data?(c(F.current.data),r(E,!0,L,!0)):o("Could not capture a clear photo. Please try again.")},1e3)}if(p.current){const ee=Oa(C);ee>F.current.sharpness&&(F.current={sharpness:ee,data:C})}}catch(E){o(E.message),k.length>0&&r(k[0],!1,L,!1)}};return{detectFaces:async k=>{if(!a)return;f.current=k.ref.current;const C=f.current;if(!C||C.videoWidth===0)return;$.current||($.current=document.createElement("canvas"),T.current=$.current.getContext("2d",{willReadFrequently:!0}));const L=$.current,P=T.current;if(!L||!P)return;L.width=C.videoWidth,L.height=C.videoHeight,P.drawImage(C,0,0,L.width,L.height);const E=P.getImageData(0,0,L.width,L.height);!v.current&&C.readyState>=2&&!_.current&&(v.current=!0,y.current=setTimeout(()=>{o("Liveness check TIMED OUT. Please try again."),g()},s));const{faces:O,blendShapes:V,inBox:Z}=await Ce.detectFaces(a,E);Q(O,E,V,Z)},cleanup:g}}const An={container:"_container_1ej18_1",progress:"_progress_1ej18_12",completed:"_completed_1ej18_33",marker:"_marker_1ej18_37"};function _c(e){const{faceDetected:t}=e,n=z(()=>{const r=[An.container];return t&&r.push(An.focused),r.join(" ")},[t]);return h("div",{className:n,children:h(he,{as:"div",className:"yvlw-absolute",children:h("div",{className:An.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})})}const Rn={EnvironmentNotSupported:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face.",SpoofFace:"We detected a spoofing attempt",FaceTrackingFailed:"We could not detect your face",ExcessiveFaceBrightnessDetected:"We detected excessive light during the test, please wipe any oil or sweat that might cause a reflection on your face."},yc={None:"Processing...",LookAtCamera:"Look at camera.",FaceNotCentered:"Center your face in the camera.",MoveCloser:"Too far away! Move in closer.",ContinueToMoveCloser:"Continue to move closer.",MoveBack:"Too close! Move farther away.",TooMuchMovement:"Too much movement.",AttentionNotNeeded:"Finalizing check...",LookInFront:"Look in front.",TimedOut:"Timed out.",IncreaseBrightnessToMax:"Increase your screen brightness to maximum.",Tip1Title:"Tip 1:",Tip2Title:"Tip 2:",Tip3Title:"Tip 3:",Tip1:"Center your face in the preview. Make sure your eyes and mouth are visible, remove any obstructions like headphones.",Tip2:"You may be asked to smile.",Tip3:"You may be asked to turn your nose towards the green color.",Continue:"Continue"};function gc(e){const{onComplete:t=()=>{},onMessage:n=()=>{},onError:r=()=>{}}=e,{setColorScheme:o,getColorScheme:i}=xo(),s=w(null),a=w(!1),c=()=>{s.current&&(s.current.callAttemptEnd(),s.current.delete(),s.current=null)},u=U(()=>{c()},[]),d=()=>{s.current&&c(),s.current=null,a.current=!1},l=v=>{var A,W;const m=v.split(".");let g=!1;s.current.setToken(v);let $="",T="",S,M=0;if(m.length===3){const F=JSON.parse(atob(m[1]));if(F.face){const b=JSON.parse(F.face),R=/^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;if(b.endpoint&&(R.test(b.endpoint)||b.endpoint==="https://virginia.api.cognitive.microsoft.us")){s.current.setEndpoint(b.endpoint);const D=JSON.parse(F["allowed-paths"]);if(D){const Y=(A=D.find(P=>P.path.toLocaleLowerCase().endsWith("/session/start")))==null?void 0:A.path;s.current.setSessionStartPath(Y);const Q=(W=D.find(P=>P.path.toLocaleLowerCase().endsWith("/session/attempt/end")))==null?void 0:W.path;s.current.setAttemptEndPath(Q);const X=D.find(P=>P.path.endsWith("/detectLiveness/singleModal"));X&&({path:$,quota:M}=X,s.current.setLivenessPath($));const k=D.find(P=>P.path.endsWith("/detectLivenessWithVerify/singleModal"));k&&({path:T,quota:M}=k,s.current.setLivenessWithVerifyPath(T));const C=new Set(D.map(P=>{var E;return(E=P.path)==null?void 0:E.split("/")[1]}));if(C.size===1&&(X||k)){const P=C.values().next().value;s.current.setApiVersion(P),g=!0,S=b.clientClaims.livenessOperationMode}}}}s.current.setOperationQuota(M),s.current.setOperationMode(window.Module.LivenessOperationMode[S]),F.sid&&s.current.setSid(F.sid),F["azure-resource-id"]&&s.current.setResourceId(F["azure-resource-id"])}if(g)s.current.initialize();else{const F={livenessError:He(window.Module.LivenessFailureReason,window.Module.LivenessFailureReason.InvalidToken),recognitionError:He(window.Module.RecognitionFailureReason,window.Module.RecognitionFailureReason.None)};r(F.livenessError?Rn[F.livenessError]||F.livenessError:"Something went wrong"),u()}},f=v=>{try{s.current=new window.Module.FaceRecoEngineAdapter,l(v)}catch(m){r(`Could not start liveness test: ${m.message}`),c()}},p=v=>{const{isActionValid:m,isFeedbackValid:g,feedback:$}=v;if(m)switch(v.action){case window.Module.ActionRequiredFromApplication.BrightenDisplay:o("light");break;case window.Module.ActionRequiredFromApplication.DarkenDisplay:o("dark");break;case window.Module.ActionRequiredFromApplication.StopCamera:break}if(!a.current&&g){const T=He(window.Module.FeedbackForFace,$);n(T&&(yc[T]||""))}if($===window.Module.FeedbackForFace.AttentionNotNeeded){a.current=!0;const T=i();o(T)}},_=v=>{var S,M;const{livenessResult:m,recognitionResult:g}=v,$=((S=m.failureReason)==null?void 0:S.value)!==0||((M=g.failureReason)==null?void 0:M.value)!==0,T=new Set(["EnvironmentNotSupported","ExcessiveFaceBrightnessDetected","FaceEyeRegionNotVisible"]);if($){const A={livenessError:He(window.Module.LivenessFailureReason,m.failureReason),recognitionError:He(window.Module.RecognitionFailureReason,g.failureReason)};A.livenessError&&T.has(A.livenessError)?t():r(A.livenessError?Rn[A.livenessError]||A.livenessError:"Something went wrong")}else{const A={livenessStatus:He(window.Module.LivenessStatus,m.status),recognitionResult:{status:He(window.Module.RecognitionStatus,g.status),matchConfidence:g.confidence},resultId:m.resultId,digest:m.digest};A.livenessStatus==="RealFace"?t():A.livenessStatus==="SpoofFace"?r(Rn[A.livenessStatus]):r("Could not validate request")}u()};return{start:f,analyze:p,processFrame:v=>{let m=!1;if(a.current)m=s.current.generatePayloadAndResult();else{const{videoWidth:g,videoHeight:$}=v,T=xn(v,g,$,void 0,{willReadFrequently:!0}),S=window.Module._malloc(T.data.byteLength);try{window.Module.HEAPU8.set(T.data,S);const M=s.current.processFrame(g,$,T.data.byteLength,S);M.terminate?m=!0:M.isValid&&p(M)}finally{window.Module._free(S)}}m&&_(s.current.getFaceAnalyzerResult())},reset:d,destroy:u}}const qo="Detecting face...";function wc({onImageCaptured:e,fetchAzureSessionToken:t,loadAzureSdk:n,onError:r,onReset:o,onFailure:i}){const[s,a]=x(qo),[c,u]=x(!1),d=w("findingFace"),l=w(null),f=w(),p=w(!1),[_,y]=x(0),v=w(!1),[m,g]=x(!1);H(()=>{y(Math.min(window.innerWidth,window.innerHeight)*.6)},[]),H(()=>{n(),t()},[]);const $=gc({onMessage:F=>{d.current==="analyzingLiveness"&&a(F)},onComplete:()=>{d.current="done",e(!0)},onError:F=>{const b=lc(F);a(b.message),d.current="done",u(!0),r&&r(F),i({faceImage:"",passed:!1,metadata:{},error:b})}}),T=()=>{v.current=!1,a(qo),d.current="findingFace",l.current=null,$.reset(),f.current&&cancelAnimationFrame(f.current),u(!1),o()},{detectFaces:S,cleanup:M}=vc({validations:["zoom","features"],frameSize:_,livenessTimeout:1e4,onFace:async(F,b,R)=>{p.current=b,b&&d.current==="findingFace"&&!v.current&&R&&(v.current=!0,g(!0))},onPhotoSaved:()=>{},onMessage:F=>{d.current==="findingFace"&&a(F)},onError:F=>{a(F),u(!0),r&&r(F)}});H(()=>()=>{M()},[]);const A=()=>{!l.current||l.current.paused||l.current.ended||(d.current==="findingFace"?S({ref:l}):d.current==="analyzingLiveness"&&$.processFrame(l.current),d.current!=="done"&&(f.current=requestAnimationFrame(A)))};H(()=>{(async()=>{if(m){g(!1),M();try{await n();const b=await t();if(b)$.start(b),d.current="analyzingLiveness";else throw new Error("Session token could not be retrieved.")}catch(b){const R=b instanceof Error?b.message:"Failed to start liveness check.";r&&r(R),i({faceImage:"",passed:!1,metadata:{},error:{key:"session_token_error",message:R}}),u(!0)}}})()},[m]);const W=F=>{F.current&&(l.current=F.current,A())};return H(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[]),h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col yvlw-items-center yvlw-justify-center",children:c?h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:s,onActionClick:T,actionText:"Try Again"})}):h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col",children:[h("div",{children:h(at,{onStream:W,children:h(j,{children:[h(_c,{faceDetected:p.current}),d.current==="analyzingLiveness"&&h("div",{className:"yvlw-bg-black/20 yvlw-z-5"})]})})}),h("div",{className:"yvlw-border-t dark:yvlw-border-gray-800 yvlw-border-gray-200",children:h("div",{className:"yvlw-text-center yvlw-mx-auto yvlw-pt-4 yvlw-pb-6 yvlw-px-4",children:[h("div",{className:ae.instructions,children:[h("h2",{children:s}),h("p",{className:"subtext",children:"Position your face in the camera frame and hold still."})]}),h("div",{className:ae.branding})]})})]})})})})}const bc=()=>{if(window.isAzureSdkLoading)return window.azureSdkLoadPromise;window.isAzureSdkLoading=!0;const e=new Promise((t,n)=>{let r=st.js.simd;try{WebAssembly.validate(new Uint8Array(Ya))||(r=st.js.default)}catch{r=st.js.simd}window.Module=window.Module||{},window.Module.onRuntimeInitialized=()=>{t()},Object.assign(window.Module,{locateFile(i,s){if(i.includes("AzureAIVisionFace")&&i.endsWith(".wasm")){const a=i.includes("SIMD")?st.wasm.simd:st.wasm.default;return`${$o}/${a}`}return`${s}${i}`}});const o=document.createElement("script");o.src=`${$o}/${r}`,o.async=!0,o.onerror=()=>{n(new Error("Network error: Failed to load SDK script."))},document.head.appendChild(o)});return window.azureSdkLoadPromise=e,e};let lt=null;function Ec(){var X;const{toggleColorScheme:e,getColorScheme:t,setColorScheme:n}=xo(),{user:r,tasks:o,currentTaskIndex:i,completed:s,onComplete:a,onFailure:c,faceDetector:u,presentation:d,clearSavedPhoto:l,branding:f,isMobileAppWebView:p}=fe(),[_,y]=x(!1),[v,m]=x(!1),[g,$]=x(null),[T,S]=x(!1),[M,A]=x(!1),[W,F]=x(0),[b,R]=x(null);H(()=>{const k=t();n(k)},[]),H(()=>{s&&!T&&b===null&&R(5)},[s,T,b]);const q=U(async()=>{try{y(!0),$(null),await a(),lt=null,d==="page"&&S(!0)}catch(k){$(k.message)}finally{y(!1)}},[a,d]);H(()=>{if(b===null||T)return;if(b===0){q();return}const k=setTimeout(()=>{R(C=>(C??1)-1)},1e3);return()=>{clearTimeout(k)}},[b,T]);const{sessionToken:D}=fe(),Y=async()=>(!D&&!lt&&(lt=Promise.reject(new Error("sessionToken not provided. Generate a sessionToken on your backend and pass it to the SDK."))),D??lt),Q=U(k=>k===i?oe.active:i>k?oe.completed:"subtext",[i]);return h("div",{className:oe.root,children:h("div",{className:oe.container,children:[h("div",{className:`${oe.lhs} divider`,children:[h("div",{className:oe.info,children:[h(Xa,{}),h("div",{children:h("p",{className:"yvlw-text-xs yvlw-m-0 yvlw-p-0 subtext",children:"You have been given this set of tasks to complete. They are pretty easy to do but we will be guiding you every step of the way."})}),h("ol",{children:[o.map((k,C)=>h("li",{className:Q(C),children:Ga[k.id].name},`task-${C}`)),h("li",{className:s?oe.active:"",children:"Complete! 🎉"})]})]}),h("footer",{className:"divider",children:[h("div",{children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})}),h("div",{onClick:()=>e(),role:"button",children:[h("div",{className:"dark:yvlw-hidden",children:h(go,{})}),h("div",{className:"yvlw-hidden dark:yvlw-block",children:h(Ma,{})})]})]})]}),h("div",{className:oe.main,children:h("div",{className:oe.content,children:[h(he,{show:!v,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:u?h(At,{Icon:La,title:"Liveness Check",description:"To ensure the security of your identity, we conduct a liveness check to verify that you are a real person actively engaging with the process. Please ensure to stay in a well lit area.",actionText:"Start Liveness Test",onActionClick:()=>m(!0)}):h(Ao,{size:"lg"})})}),h(he,{show:v&&!M,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(wc,{fetchAzureSessionToken:Y,loadAzureSdk:bc,onImageCaptured:k=>{$(null),k&&A(!0)},onError:k=>$(k),onReset:()=>{lt=null,A(!1),F(k=>k+1),l()},onFailure:c},W)})}),o.map((k,C)=>{let L;switch(k.id){case"complete-the-circle":L=h(nc,{...k});break;case"yes-or-no":L=h(sc,{...k});break;case"motions":L=h(fc,{...k});break;case"blink":L=h(pc,{...k});break;default:L=h(j,{});break}return h(he,{show:v&&M&&!s&&i===C,appear:!0,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full",children:L},`task-${C}`)}),h(he,{show:v&&s,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(At,{Icon:Aa,title:T?"All Set!":"Please click the button below to complete your verification",description:T?"You can now close or exit the window":"Your identity has been verified. You must click the button below to submit and finalize the process.",actionText:b!==null&&b>0?`Finish in (${b}s)`:"Finish",loading:_,onActionClick:q,hideButton:T,children:g&&h("div",{className:"yvlw-mt-3",children:g})})})})]})}),h("div",{className:`${oe.rhs} divider`,children:r&&h("div",{className:`${oe.profile} divider`,children:[h("div",{children:h("div",{className:oe.avatar,children:[r.firstName.charAt(0).toUpperCase(),(X=r.lastName)==null?void 0:X.charAt(0).toUpperCase()]})}),h("div",{children:[h("h4",{children:[r.firstName," ",r.lastName]}),r.email&&h("p",{className:"subtext",children:r.email})]})]})})]})})}function $c(e){const{tasks:t,namespace:n,user:r,branding:o,isMobileAppWebView:i,onClose:s=()=>{},onSuccess:a,onFailure:c,presentation:u="modal",publicKey:d,metadata:l,sandboxEnvironment:f,sessionId:p,sessionToken:_,forceDevUrl:y}=e,[v,m]=x(e.show),g=()=>{m(!1),s()};return h(Ka,{namespace:n,publicKey:d,tasks:t,user:r,branding:o,isMobileAppWebView:i,onRequestClose:g,onSuccess:a,onFailure:c,metadata:l,presentation:u,sandboxEnvironment:f,sessionId:p,sessionToken:_,forceDevUrl:y,children:h(Fa,{id:n,open:u==="page"?!0:v,onClose:g,transition:!0,className:`${xa.root} ${Nt.root} ${Nt[u]}`,style:{"--branding-color":(o==null?void 0:o.color)??Ba},children:[u==="modal"&&h("div",{onClick:g,role:"button",className:Nt.close,children:h(Ra,{className:"yvlw-text-white"})}),h(yo,{className:`${Nt.container}`,children:h(Ec,{})})]})})}class Tc{constructor(t){this.tasks=[],this.container=null,this.namespace="liveness-web-sdk",this.loadedScripts=[];const{presentation:n="modal"}=t;this.presentation=n,this.props=t,t.tasks&&(this.tasks=t.tasks),n==="page"&&this.start()}validateOptions(){if(!this.tasks)throw new Error("Tasks cannot be empty");if(this.props.user&&!this.props.user.firstName)throw new Error("First Name is required when User object is supplied");if(!this.props.sessionId)throw new Error("A sessionId is required. Generate it on your backend and pass it in.");if(!this.props.sessionToken)throw new Error("A sessionToken is required for passive liveness. Generate it on your backend and pass it in.")}async start(t){t&&(this.tasks=t),this.validateOptions(),this.container=document.createElement("div"),document.body.appendChild(this.container),We(h($c,{namespace:this.namespace,publicKey:this.props.publicKey,sandboxEnvironment:this.props.sandboxEnvironment,forceDevUrl:this.props.forceDevUrl,presentation:this.props.presentation,show:!0,tasks:this.tasks,user:this.props.user,branding:this.props.branding,isMobileAppWebView:this.props.isMobileAppWebView,onClose:()=>this.close(),onSuccess:this.props.onSuccess,onFailure:this.props.onFailure,metadata:this.props.metadata,sessionId:this.props.sessionId,sessionToken:this.props.sessionToken}),this.container)}close(){if(this.container&&this.presentation!=="page"){if(!document.body.contains(this.container))return;document.body.removeChild(this.container),this.props.onClose&&this.props.onClose()}}}return Tc});
5
+ `))}else{let f=d.props,p=f==null?void 0:f.className,_=typeof p=="function"?(...v)=>mn(p(...v),c.className):mn(p,c.className),y=_?{className:_}:{},m=Vr(d.props,Ie(_n(c,["ref"])));for(let v in l)v in m&&delete l[v];return nn(d,Object.assign({},m,l,u,{ref:o(d.ref,u.ref)},y))}return le(i,Object.assign({},_n(c,["ref"]),i!==j&&u,i!==j&&l),d)}function ji(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Vr(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function Bi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function re(e){var t;return Object.assign(en(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ie(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _n(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let qi="button";function Yi(e,t){var n;let r=zr(),{disabled:o=r||!1,autoFocus:i=!1,...s}=e,{isFocusVisible:a,focusProps:c}=Ii({autoFocus:i}),{isHovered:u,hoverProps:d}=Ri({isDisabled:o}),{pressed:l,pressProps:f}=zi({disabled:o}),p=Bi({ref:t,type:(n=s.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},c,d,f),_=z(()=>({disabled:o,hover:u,focus:a,active:l,autofocus:i}),[o,u,a,l,i]);return se({ourProps:p,theirProps:s,slot:_,defaultTag:qi,name:"Button"})}let Gi=re(Yi),Ki="div";var kt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kt||{});function Xi(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return se({ourProps:i,theirProps:o,slot:{},defaultTag:Ki,name:"Hidden"})}let yn=re(Xi),Zi=ie(null);function Ji({children:e}){let t=te(Zi);if(!t)return N.createElement(N.Fragment,null,e);let{target:n}=t;return n?mt(N.createElement(N.Fragment,null,e),n):null}let jr=Symbol();function Qi(e,t=!0){return Object.assign(e,{[jr]:t})}function pe(...e){let t=w(e);H(()=>{t.current=e},[e]);let n=G(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[jr]))?void 0:n}let gn=ie(null);gn.displayName="DescriptionContext";function Br(){let e=te(gn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Br),t}return e}function es(){let[e,t]=x([]);return[e.length>0?e.join(" "):void 0,z(()=>function(n){let r=G(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),c=a.indexOf(i);return c!==-1&&a.splice(c,1),a}))),o=z(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return N.createElement(gn.Provider,{value:o},n.children)},[t])]}let ts="p";function ns(e,t){let n=Ee(),r=zr(),{id:o=`headlessui-description-${n}`,...i}=e,s=Br(),a=pe(t);ne(()=>s.register(o),[o,s.register]);let c=r||!1,u=z(()=>({...s.slot,disabled:c}),[s.slot,c]),d={ref:a,...s.props,id:o};return se({ourProps:d,theirProps:i,slot:u,defaultTag:ts,name:s.name||"Description"})}let rs=re(ns),os=Object.assign(rs,{});var qr=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qr||{});let is=ie(()=>{});function ss({value:e,children:t}){return N.createElement(is.Provider,{value:e},t)}let as=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Yr(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(a=>a()))}}}function Gr(e){return _t(e.subscribe,e.getSnapshot,e.getSnapshot)}let cs=new as(()=>Yr(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function je(e,t){let n=cs.get(t),r=Ee(),o=Gr(n);if(ne(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let i=o.indexOf(r),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let wn=new Map,et=new Map;function Kr(e){var t;let n=(t=et.get(e))!=null?t:0;return et.set(e,n+1),n!==0?()=>Xr(e):(wn.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Xr(e))}function Xr(e){var t;let n=(t=et.get(e))!=null?t:1;if(n===1?et.delete(e):et.set(e,n-1),n!==1)return;let r=wn.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,wn.delete(e))}function ls(e,{allowed:t,disallowed:n}={}){let r=je(e,"inert-others");ne(()=>{var o,i;if(!r)return;let s=$e();for(let c of(o=n==null?void 0:n())!=null?o:[])c&&s.add(Kr(c));let a=(i=t==null?void 0:t())!=null?i:[];for(let c of a){if(!c)continue;let u=wt(c);if(!u)continue;let d=c.parentElement;for(;d&&d!==u.body;){for(let l of d.children)a.some(f=>l.contains(f))||s.add(Kr(l));d=d.parentElement}}return s.dispose},[r,t,n])}function Zr(e,t,n){let r=Re(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});H(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=$e();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let bn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),us=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ge=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ge||{}),En=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(En||{}),ds=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ds||{});function fs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(bn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function ps(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(us)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Jr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Jr||{});function hs(e,t=0){var n;return e===((n=wt(e))==null?void 0:n.body)?!1:Te(t,{0(){return e.matches(bn)},1(){let r=e;for(;r!==null;){if(r.matches(bn))return!0;r=r.parentElement}return!1}})}var vs=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(vs||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function we(e){e==null||e.focus({preventScroll:!0})}let ms=["textarea","input"].join(",");function _s(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,ms))!=null?n:!1}function ys(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function tt(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?ys(e):e:t&64?ps(e):fs(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(_=>_!=null&&"current"in _?(_==null?void 0:_.current)===p:_===p))),r=r??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},d=0,l=s.length,f;do{if(d>=l||d+l<=0)return 0;let p=c+d;if(t&16)p=(p+l)%l;else{if(p<0)return 3;if(p>=l)return 1}f=s[p],f==null||f.focus(u),d+=a}while(f!==i.activeElement);return t&6&&_s(f)&&f.select(),2}function Qr(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gs(){return/Android/gi.test(window.navigator.userAgent)}function ws(){return Qr()||gs()}function nt(e,t,n,r){let o=Re(n);H(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function eo(e,t,n,r){let o=Re(n);H(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const to=30;function bs(e,t,n){let r=je(e,"outside-click"),o=Re(n),i=U(function(c,u){if(c.defaultPrevented)return;let d=u(c);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let l=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of l){if(f===null)continue;let p=f instanceof HTMLElement?f:f.current;if(p!=null&&p.contains(d)||c.composed&&c.composedPath().includes(p))return}return!hs(d,Jr.Loose)&&d.tabIndex!==-1&&c.preventDefault(),o.current(c,d)},[o]),s=w(null);nt(r,"pointerdown",c=>{var u,d;s.current=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target},!0),nt(r,"mousedown",c=>{var u,d;s.current=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target},!0),nt(r,"click",c=>{ws()||s.current&&(i(c,()=>s.current),s.current=null)},!0);let a=w({x:0,y:0});nt(r,"touchstart",c=>{a.current.x=c.touches[0].clientX,a.current.y=c.touches[0].clientY},!0),nt(r,"touchend",c=>{let u={x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=to||Math.abs(u.y-a.current.y)>=to))return i(c,()=>c.target instanceof HTMLElement?c.target:null)},!0),eo(r,"blur",c=>i(c,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rt(...e){return z(()=>wt(...e),[...e])}function no(e,t,n,r){let o=Re(n);H(()=>{e=e??window;function i(s){o.current(s)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function Es(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function $s(){return Qr()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=$e();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let c=a.target.closest("a");if(!c)return;let{hash:u}=new URL(c.href),d=e.querySelector(u);d&&!r(d)&&(s=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let c=a.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let c=(a=window.scrollY)!=null?a:window.pageYOffset;i!==c&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ts(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ks(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let De=Yr(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:$e(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:ks(n)},o=[$s(),Es(),Ts()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});De.subscribe(()=>{let e=De.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&De.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&De.dispatch("TEARDOWN",n)}});function Ss(e,t,n=()=>({containers:[]})){let r=Gr(De),o=t?r.get(t):void 0,i=o?o.count>0:!1;return ne(()=>{if(!(!t||!e))return De.dispatch("PUSH",t,n),()=>De.dispatch("POP",t,n)},[e,t]),i}function Cs(e,t,n=()=>[document.body]){let r=je(e,"scroll-lock");Ss(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Fs(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function xs(e=0){let[t,n]=x(e),r=U(c=>n(c),[t]),o=U(c=>n(u=>u|c),[t]),i=U(c=>(t&c)===c,[t]),s=U(c=>n(u=>u&~c),[n]),a=U(c=>n(u=>u^c),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ms=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ms||{});function Ps(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Ns(e,t,n,r){let[o,i]=x(n),{hasFlag:s,addFlag:a,removeFlag:c}=xs(e&&o?3:0),u=w(!1),d=w(!1),l=Et();return ne(function f(){var p;if(!e)return;n&&i(!0);let _=t.current;return _?((p=r==null?void 0:r.start)==null||p.call(r,n),Ls(_,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),c(4)):(a(4),c(2)))},run(){d.current?n?(c(3),a(4)):(c(4),a(3)):n?c(1):a(1)},done(){var y;d.current&&typeof _.getAnimations=="function"&&_.getAnimations().length>0||(u.current=!1,c(7),n||i(!1),(y=r==null?void 0:r.end)==null||y.call(r,n))}})):n?(a(3),l.nextFrame(()=>f())):void 0},[e,n,t,l]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Ls(e,{prepare:t,run:n,done:r,inFlight:o}){let i=$e();return Rs(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{i.add(As(e,r)),n()}),i.dispose}function As(e,t){let n=Fs(t),r=$e();if(!e)return r.dispose;let{transitionDuration:o,transitionDelay:i}=getComputedStyle(e),[s,a]=[o,i].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(l=>l.includes("ms")?parseFloat(l):parseFloat(l)*1e3).sort((l,f)=>f-l);return d}),c=s+a;if(c!==0){let u=r.group(d=>{let l=d.setTimeout(()=>{n(),d.dispose()},c);d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&(l(),d.addEventListener(e,"transitioncancel",p=>{p.target===p.currentTarget&&(n(),u())}))})});r.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function Rs(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function $n(e,t){let n=w([]),r=G(e);H(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}let St=ie(null);St.displayName="OpenClosedContext";var de=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(de||{});function Ct(){return te(St)}function Is({value:e,children:t}){return N.createElement(St.Provider,{value:e},t)}function Ds({children:e}){return N.createElement(St.Provider,{value:null},e)}function Os(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Se=[];Os(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Se[0]!==t.target&&(Se.unshift(t.target),Se=Se.filter(n=>n!=null&&n.isConnected),Se.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ro(e){let t=G(e),n=w(!1);H(()=>(n.current=!1,()=>{n.current=!0,bt(()=>{n.current&&t()})}),[t])}function Hs(){let e=typeof document>"u";return"useSyncExternalStore"in Lr?(t=>t.useSyncExternalStore)(Lr)(()=>()=>{},()=>!1,()=>!e):!1}function ot(){let e=Hs(),[t,n]=x(Ae.isHandoffComplete);return t&&Ae.isHandoffComplete===!1&&n(!1),H(()=>{t!==!0&&n(!0)},[t]),H(()=>Ae.handoff(),[]),e?!1:t}let oo=ie(!1);function Ws(){return te(oo)}function io(e){return N.createElement(oo.Provider,{value:e.force},e.children)}function Us(e){let t=Ws(),n=te(ao),r=rt(e),[o,i]=x(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Ae.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let c=r.createElement("div");return c.setAttribute("id","headlessui-portal-root"),r.body.appendChild(c)});return H(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),H(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let so=j,zs=re(function(e,t){let n=e,r=w(null),o=pe(Qi(d=>{r.current=d}),t),i=rt(r),s=Us(r),[a]=x(()=>{var d;return Ae.isServer?null:(d=i==null?void 0:i.createElement("div"))!=null?d:null}),c=te(Tn),u=ot();return ne(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),ne(()=>{if(a&&c)return c.register(a)},[c,a]),ro(()=>{var d;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((d=s.parentElement)==null||d.removeChild(s)))}),u?!s||!a?null:mt(se({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:so,name:"Portal"}),a):null});function Vs(e,t){let n=pe(t),{enabled:r=!0,...o}=e;return r?N.createElement(zs,{...o,ref:n}):se({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:so,name:"Portal"})}let js=j,ao=ie(null);function Bs(e,t){let{target:n,...r}=e,o={ref:pe(t)};return N.createElement(ao.Provider,{value:n},se({ourProps:o,theirProps:r,defaultTag:js,name:"Popover.Group"}))}let Tn=ie(null);function qs(){let e=te(Tn),t=w([]),n=G(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=G(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=z(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,z(()=>function({children:i}){return N.createElement(Tn.Provider,{value:o},i)},[o])]}let Ys=re(Vs),co=re(Bs),Gs=Object.assign(Ys,{Group:co});function Ks(e,t=typeof document<"u"?document.defaultView:null,n){let r=je(e,"escape");no(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===qr.Escape&&n(o))})}function Xs(){var e;let[t]=x(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=x((e=t==null?void 0:t.matches)!=null?e:!1);return ne(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function Zs({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=w((r=n==null?void 0:n.current)!=null?r:null),i=rt(o),s=G(()=>{var a,c,u;let d=[];for(let l of e)l!==null&&(l instanceof HTMLElement?d.push(l):"current"in l&&l.current instanceof HTMLElement&&d.push(l.current));if(t!=null&&t.current)for(let l of t.current)d.push(l);for(let l of(a=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(o.current)||l.contains((u=(c=o.current)==null?void 0:c.getRootNode())==null?void 0:u.host)||d.some(f=>l.contains(f))||d.push(l));return d});return{resolveContainers:s,contains:G(a=>s().some(c=>c.contains(a))),mainTreeNodeRef:o,MainTreeNode:z(()=>function(){return n!=null?null:N.createElement(yn,{features:kt.Hidden,ref:o})},[o,n])}}function kn(){let e=w(!1);return ne(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var it=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(it||{});function Js(){let e=w(0);return eo(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function lo(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Qs="div";var Oe=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Oe||{});function ea(e,t){let n=w(null),r=pe(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...c}=e;ot()||(a=0);let u=rt(n);oa(a,{ownerDocument:u});let d=ia(a,{ownerDocument:u,container:n,initialFocus:o,initialFocusFallback:i});sa(a,{ownerDocument:u,container:n,containers:s,previousActiveElement:d});let l=Js(),f=G(v=>{let g=n.current;g&&($=>$())(()=>{Te(l.current,{[it.Forwards]:()=>{tt(g,ge.First,{skipElements:[v.relatedTarget,i]})},[it.Backwards]:()=>{tt(g,ge.Last,{skipElements:[v.relatedTarget,i]})}})})}),p=je(!!(a&2),"focus-trap#tab-lock"),_=Et(),y=w(!1),m={ref:r,onKeyDown(v){v.key=="Tab"&&(y.current=!0,_.requestAnimationFrame(()=>{y.current=!1}))},onBlur(v){if(!(a&4))return;let g=lo(s);n.current instanceof HTMLElement&&g.add(n.current);let $=v.relatedTarget;$ instanceof HTMLElement&&$.dataset.headlessuiFocusGuard!=="true"&&(uo(g,$)||(y.current?tt(n.current,Te(l.current,{[it.Forwards]:()=>ge.Next,[it.Backwards]:()=>ge.Previous})|ge.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&we(v.target)))}};return N.createElement(N.Fragment,null,p&&N.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}),se({ourProps:m,theirProps:c,defaultTag:Qs,name:"FocusTrap"}),p&&N.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}))}let ta=re(ea),na=Object.assign(ta,{features:Oe});function ra(e=!0){let t=w(Se.slice());return $n(([n],[r])=>{r===!0&&n===!1&&bt(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Se.slice())},[e,Se,t]),G(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function oa(e,{ownerDocument:t}){let n=!!(e&8),r=ra(n);$n(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&we(r())},[n]),ro(()=>{n&&we(r())})}function ia(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=w(null),s=je(!!(e&1),"focus-trap#initial-focus"),a=kn();return $n(()=>{if(e===0)return;if(!s){o!=null&&o.current&&we(o.current);return}let c=n.current;c&&bt(()=>{if(!a.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){i.current=u;return}}else if(c.contains(u)){i.current=u;return}if(r!=null&&r.current)we(r.current);else{if(e&16){if(tt(c,ge.First|ge.AutoFocus)!==En.Error)return}else if(tt(c,ge.First)!==En.Error)return;if(o!=null&&o.current&&(we(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,s,e]),i}function sa(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=kn(),s=!!(e&4);no(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!i.current)return;let c=lo(r);n.current instanceof HTMLElement&&c.add(n.current);let u=o.current;if(!u)return;let d=a.target;d&&d instanceof HTMLElement?uo(c,d)?(o.current=d,we(d)):(a.preventDefault(),a.stopPropagation(),we(u)):we(o.current)},!0)}function uo(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function fo(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:ho)!==j||N.Children.count(e.children)===1}let Ft=ie(null);Ft.displayName="TransitionContext";var aa=(e=>(e.Visible="visible",e.Hidden="hidden",e))(aa||{});function ca(){let e=te(Ft);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function la(){let e=te(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=ie(null);xt.displayName="NestingContext";function Mt(e){return"children"in e?Mt(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function po(e,t){let n=Re(e),r=w([]),o=kn(),i=Et(),s=G((p,_=ke.Hidden)=>{let y=r.current.findIndex(({el:m})=>m===p);y!==-1&&(Te(_,{[ke.Unmount](){r.current.splice(y,1)},[ke.Hidden](){r.current[y].state="hidden"}}),i.microTask(()=>{var m;!Mt(r)&&o.current&&((m=n.current)==null||m.call(n))}))}),a=G(p=>{let _=r.current.find(({el:y})=>y===p);return _?_.state!=="visible"&&(_.state="visible"):r.current.push({el:p,state:"visible"}),()=>s(p,ke.Unmount)}),c=w([]),u=w(Promise.resolve()),d=w({enter:[],leave:[]}),l=G((p,_,y)=>{c.current.splice(0),t&&(t.chains.current[_]=t.chains.current[_].filter(([m])=>m!==p)),t==null||t.chains.current[_].push([p,new Promise(m=>{c.current.push(m)})]),t==null||t.chains.current[_].push([p,new Promise(m=>{Promise.all(d.current[_].map(([v,g])=>g)).then(()=>m())})]),_==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(_)):y(_)}),f=G((p,_,y)=>{Promise.all(d.current[_].splice(0).map(([m,v])=>v)).then(()=>{var m;(m=c.current.shift())==null||m()}).then(()=>y(_))});return z(()=>({children:r,register:a,unregister:s,onStart:l,onStop:f,wait:u,chains:d}),[a,s,r,l,f,d,u])}let ho=j,vo=$t.RenderStrategy;function ua(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:c,enter:u,enterFrom:d,enterTo:l,entered:f,leave:p,leaveFrom:_,leaveTo:y,...m}=e,v=w(null),g=fo(e),$=pe(...g?[v,t]:t===null?[]:[t]),T=(n=m.unmount)==null||n?ke.Unmount:ke.Hidden,{show:S,appear:M,initial:A}=ca(),[W,F]=x(S?"visible":"hidden"),b=la(),{register:R,unregister:q}=b;ne(()=>R(v),[R,v]),ne(()=>{if(T===ke.Hidden&&v.current){if(S&&W!=="visible"){F("visible");return}return Te(W,{hidden:()=>q(v),visible:()=>R(v)})}},[W,v,R,q,S,T]);let D=ot();ne(()=>{if(g&&D&&W==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,W,D,g]);let Y=A&&!M,Q=M&&S&&A,X=w(!1),k=po(()=>{X.current||(F("hidden"),q(v))},b),C=G(Z=>{X.current=!0;let J=Z?"enter":"leave";k.onStart(v,J,ee=>{ee==="enter"?i==null||i():ee==="leave"&&(a==null||a())})}),L=G(Z=>{let J=Z?"enter":"leave";X.current=!1,k.onStop(v,J,ee=>{ee==="enter"?s==null||s():ee==="leave"&&(c==null||c())}),J==="leave"&&!Mt(k)&&(F("hidden"),q(v))});H(()=>{g&&o||(C(S),L(S))},[S,g,o]);let P=!(!o||!g||!D||Y),[,E]=Ns(P,v,S,{start:C,end:L}),O=Ie({ref:$,className:((r=mn(m.className,Q&&u,Q&&d,E.enter&&u,E.enter&&E.closed&&d,E.enter&&!E.closed&&l,E.leave&&p,E.leave&&!E.closed&&_,E.leave&&E.closed&&y,!E.transition&&S&&f))==null?void 0:r.trim())||void 0,...Ps(E)}),V=0;return W==="visible"&&(V|=de.Open),W==="hidden"&&(V|=de.Closed),E.enter&&(V|=de.Opening),E.leave&&(V|=de.Closing),N.createElement(xt.Provider,{value:k},N.createElement(Is,{value:V},se({ourProps:O,theirProps:m,defaultTag:ho,features:vo,visible:W==="visible",name:"Transition.Child"})))}function da(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=w(null),a=fo(e),c=pe(...a?[s,t]:t===null?[]:[t]);ot();let u=Ct();if(n===void 0&&u!==null&&(n=(u&de.Open)===de.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,l]=x(n?"visible":"hidden"),f=po(()=>{n||l("hidden")}),[p,_]=x(!0),y=w([n]);ne(()=>{p!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),_(!1))},[y,n]);let m=z(()=>({show:n,appear:r,initial:p}),[n,r,p]);Zr(n,s,()=>l("hidden")),ne(()=>{n?l("visible"):!Mt(f)&&s.current!==null&&l("hidden")},[n,f]);let v={unmount:o},g=G(()=>{var T;p&&_(!1),(T=e.beforeEnter)==null||T.call(e)}),$=G(()=>{var T;p&&_(!1),(T=e.beforeLeave)==null||T.call(e)});return N.createElement(xt.Provider,{value:f},N.createElement(Ft.Provider,{value:m},se({ourProps:{...v,as:j,children:N.createElement(mo,{ref:c,...v,...i,beforeEnter:g,beforeLeave:$})},theirProps:{},defaultTag:j,features:vo,visible:d==="visible",name:"Transition"})))}function fa(e,t){let n=te(Ft)!==null,r=Ct()!==null;return N.createElement(N.Fragment,null,!n&&r?N.createElement(Sn,{ref:t,...e}):N.createElement(mo,{ref:t,...e}))}let Sn=re(da),mo=re(ua),Cn=re(fa),he=Object.assign(Sn,{Child:Cn,Root:Sn});var pa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(pa||{}),ha=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ha||{});let va={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Fn=ie(null);Fn.displayName="DialogContext";function Pt(e){let t=te(Fn);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pt),n}return t}function ma(e,t){return Te(t.type,va,e,t)}let _o=re(function(e,t){let n=Ee(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:c=!0,__demoMode:u=!1,...d}=e,l=w(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(l.current||(l.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=Ct();o===void 0&&f!==null&&(o=(f&de.Open)===de.Open);let p=w(null),_=pe(p,t),y=rt(p),m=o?0:1,[v,g]=Ke(ma,{titleId:null,descriptionId:null,panelRef:Vt()}),$=G(()=>i(!1)),T=G(P=>g({type:0,id:P})),S=ot()?m===0:!1,[M,A]=qs(),W={get current(){var P;return(P=v.panelRef.current)!=null?P:p.current}},{resolveContainers:F,mainTreeNodeRef:b,MainTreeNode:R}=Zs({portals:M,defaultContainers:[W]}),q=f!==null?(f&de.Closing)===de.Closing:!1;ls(u||q?!1:S,{allowed:G(()=>{var P,E;return[(E=(P=p.current)==null?void 0:P.closest("[data-headlessui-portal]"))!=null?E:null]}),disallowed:G(()=>{var P,E;return[(E=(P=b.current)==null?void 0:P.closest("body > *:not(#headlessui-portal-root)"))!=null?E:null]})}),bs(S,F,P=>{P.preventDefault(),$()}),Ks(S,y==null?void 0:y.defaultView,P=>{P.preventDefault(),P.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Cs(u||q?!1:S,y,F),Zr(S,p,$);let[D,Y]=es(),Q=z(()=>[{dialogState:m,close:$,setTitleId:T},v],[m,v,$,T]),X=z(()=>({open:m===0}),[m]),k={ref:_,id:r,role:a,tabIndex:-1,"aria-modal":u?void 0:m===0?!0:void 0,"aria-labelledby":v.titleId,"aria-describedby":D},C=!Xs(),L=Oe.None;return S&&!u&&(L|=Oe.RestoreFocus,L|=Oe.TabLock,c&&(L|=Oe.AutoFocus),C&&(L|=Oe.InitialFocus)),N.createElement(Ds,null,N.createElement(io,{force:!0},N.createElement(Gs,null,N.createElement(Fn.Provider,{value:Q},N.createElement(co,{target:p},N.createElement(io,{force:!1},N.createElement(Y,{slot:X},N.createElement(A,null,N.createElement(na,{initialFocus:s,initialFocusFallback:p,containers:F,features:L},N.createElement(ss,{value:$},se({ourProps:k,theirProps:d,slot:X,defaultTag:_a,features:ya,visible:m===0,name:"Dialog"})))))))))),N.createElement(Ji,null,N.createElement(R,null)))}),_a="div",ya=$t.RenderStrategy|$t.Static;function ga(e,t){let{transition:n=!1,open:r,...o}=e,i=Ct(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?N.createElement(he,{show:r,transition:n,unmount:o.unmount},N.createElement(_o,{ref:t,...o})):N.createElement(_o,{ref:t,open:r,...o})}let wa="div";function ba(e,t){let n=Ee(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s},a]=Pt("Dialog.Panel"),c=pe(t,a.panelRef),u=z(()=>({open:s===0}),[s]),d=G(l=>{l.stopPropagation()});return N.createElement(o?Cn:j,null,se({ourProps:{ref:c,id:r,onClick:d},theirProps:i,slot:u,defaultTag:wa,name:"Dialog.Panel"}))}let Ea="div";function $a(e,t){let{transition:n=!1,...r}=e,[{dialogState:o}]=Pt("Dialog.Backdrop"),i=z(()=>({open:o===0}),[o]);return N.createElement(n?Cn:j,null,se({ourProps:{ref:t,"aria-hidden":!0},theirProps:r,slot:i,defaultTag:Ea,name:"Dialog.Backdrop"}))}let Ta="h2";function ka(e,t){let n=Ee(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=Pt("Dialog.Title"),a=pe(t);H(()=>(s(r),()=>s(null)),[r,s]);let c=z(()=>({open:i===0}),[i]);return se({ourProps:{ref:a,id:r},theirProps:o,slot:c,defaultTag:Ta,name:"Dialog.Title"})}let Sa=re(ga),yo=re(ba);re($a);let Ca=re(ka),Fa=Object.assign(Sa,{Panel:yo,Title:Ca,Description:os});const Nt={root:"_root_1duny_1",modal:"_modal_1duny_10",container:"_container_1duny_13",page:"_page_1duny_18",close:"_close_1duny_21"},xa={root:"_root_1h6qm_1"},be=e=>{const{children:t,size:n="md",fill:r="currentColor",stroke:o,strokeWidth:i,className:s="",viewBox:a="0 0 20 20"}=e,c=z(()=>{switch(n){case"sm":return"yvlw-w-4 yvlw-h-4";case"lg":return"yvlw-w-7 yvlw-h-7";case"xl":return"yvlw-w-10 yvlw-h-10";case"custom":return"";default:return"yvlw-w-5 yvlw-h-5"}},[n]);return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:a,fill:r,stroke:o,strokeWidth:i,className:`${c} ${s}`,children:t})},Ma=e=>h(be,{...e,children:h("path",{d:"M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z"})}),go=e=>h(be,{...e,children:h("path",{fillRule:"evenodd",d:"M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z",clipRule:"evenodd"})}),Pa=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"})]}),Na=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),wo=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),La=e=>h(be,{...e,children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v2c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-2c0-2.66-5.33-4-8-4zm6 5H6v-.99c.2-.72 3.3-2.01 6-2.01s5.8 1.29 6 2v1z"})]}),Aa=e=>h(be,{...e,children:h("path",{d:"M18,10l-1.77-2.03l0.25-2.69l-2.63-0.6l-1.37-2.32L10,3.43L7.53,2.36L6.15,4.68L3.53,5.28l0.25,2.69L2,10l1.77,2.03 l-0.25,2.69l2.63,0.6l1.37,2.32L10,16.56l2.47,1.07l1.37-2.32l2.63-0.6l-0.25-2.69L18,10z M13.18,8.47l-4.24,4.24 c-0.2,0.2-0.51,0.2-0.71,0L6.82,11.3c-0.2-0.2-0.2-0.51,0-0.71s0.51-0.2,0.71,0l1.06,1.06l3.89-3.89c0.2-0.2,0.51-0.2,0.71,0 S13.38,8.28,13.18,8.47z"})}),bo=e=>h(be,{...e,viewBox:"0 0 24 24",children:h("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Ra=e=>h(be,{...e,children:h("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})});class Ce{static loadVision(){return import("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12")}static async loadDetector(){try{const{FaceLandmarker:t,FilesetResolver:n}=await Ce.loadVision(),r=await n.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12/wasm");return await t.createFromOptions(r,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},outputFaceBlendshapes:!0,runningMode:"IMAGE",numFaces:1})}catch(t){return Promise.reject(t)}}static denormalizeKeypoints(t,n,r){return t.map(o=>({x:o.x*n,y:o.y*r,z:o.z}))}static getBoundingBox(t,n,r){const o={width:n*.6,height:r*.8,x:0,y:0};o.x=(n-o.width)/2,o.y=(r-o.height)/2;let i=1/0,s=-1/0,a=1/0,c=-1/0;t.forEach(d=>{i=Math.min(i,d.x),s=Math.max(s,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y)});const u={xMin:i,xMax:s,yMin:a,yMax:c};return u.xMin<o.x||u.xMax>o.x+o.width||u.yMin<o.y||u.yMax>o.y+o.height?{box:{xMin:i,xMax:s,yMin:a,yMax:c,width:s-i,height:c-a},inBox:!1}:{box:{xMin:i,xMax:s,yMin:a,yMax:c,width:s-i,height:c-a},inBox:!0}}static async detectFaces(t,n){var r;try{const{width:o,height:i}=n,{faceLandmarks:s,faceBlendshapes:a}=await t.detect(n);if(s.length===0)return{faces:[],blendShapes:[],inBox:!1};const c=Ce.denormalizeKeypoints(s[0],o,i),{box:u,inBox:d}=Ce.getBoundingBox(c,o,i);return{faces:[{keypoints:c,box:u}],blendShapes:((r=a==null?void 0:a[0])==null?void 0:r.categories)??[],inBox:d}}catch(o){return Promise.reject(o)}}}const Ia=(e,t)=>{let n;return typeof OffscreenCanvas<"u"?n=new OffscreenCanvas(e,t):(n=document.createElement("canvas"),n.width=e,n.height=t),n},xn=(e,t,n,r,o)=>{let i=0,s=0,a=t,c=n;const d=Ia(t,n).getContext("2d",o);return d.drawImage(e,0,0),d.getImageData(i,s,a,c)},Da=e=>new Promise(t=>{const n=document.createElement("canvas");let{width:r}=e,{height:o}=e;e instanceof HTMLVideoElement&&(r=e.videoWidth,o=e.videoHeight),n.width=r,n.height=o,n.getContext("2d").drawImage(e,0,0),n.toBlob(s=>t(s))});function Oa(e){const{width:t,height:n,data:r}=e;let o=0,i=0;const s=[0,-1,0,-1,4,-1,0,-1,0];for(let d=1;d<n-1;d++)for(let l=1;l<t-1;l++){let f=0,p=0,_=0,y=0;for(let v=-1;v<=1;v++)for(let g=-1;g<=1;g++){const $=((d+v)*t+(l+g))*4,T=s[y++];f+=r[$]*T,p+=r[$+1]*T,_+=r[$+2]*T}const m=.299*f+.587*p+.114*_;o+=m,i+=m*m}const a=(t-2)*(n-2);if(a===0)return 0;const c=o/a;return i/a-c*c}function Ha(){if(MediaRecorder.isTypeSupported("video/webm; codecs=vp9"))return{mimeType:"video/webm; codecs=vp9",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/webm"))return{mimeType:"video/webm",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/mp4"))return{mimeType:"video/mp4",videoBitsPerSecond:25e4}}function Eo(e={}){const{onRecord:t=()=>{},onStop:n=()=>{}}=e,r=w([]),o=w(null),i=w(null),s=U(f=>{r.current.push(f)},[]),a=U(async f=>{if(o.current)return;let p=null;f instanceof ImageData?p=await new Promise(_=>{const y=document.createElement("canvas");y.width=f.width,y.height=f.height;const m=y.getContext("2d");m?(m.putImageData(f,0,0),y.toBlob(v=>{_(v)},"image/jpeg",.95)):_(null)}):p=await Da(f),p&&(o.current=p)},[]),c=U(()=>{o.current=null},[]),u=U(f=>{f.data.size>0&&t(f.data)},[]),d=U(()=>{!i.current||i.current.state==="inactive"||(i.current.stop(),i.current.stream.getTracks().forEach(f=>f.stop()),n())},[]),l=U(f=>{i.current||(i.current=new MediaRecorder(f,Ha()),i.current.ondataavailable=u,i.current.onstop=d,i.current.start(1e3))},[]);return{saveStream:s,savePhoto:a,start:l,stop:d,savedStreams:r,savedPhoto:o,clearSavedPhoto:c}}const Wa="https://cdn.svc.youverify.co",Ua="61d880f1e8e15aaf24558f1a",za=(e,t,n,r)=>{if(t)if(!n)r==null||r({faceImage:"",passed:!1,error:{key:"FORCE_DEV_URL_ERROR",message:"publicKey is required when forceDevUrl is true"}});else if(n!==Ua)r==null||r({faceImage:"",passed:!1,error:{key:"FORCE_DEV_URL_ERROR",message:"Invalid publicKey for forceDevUrl, access denied"}});else return"https://identity.dev.svc.youverify.co";return e?"https://identity.staging.svc.youverify.co":"https://identity.svc.youverify.co"};function Va(e,t,n,r){const o=za(e,t,n,r);return{postData:async c=>{const{faceImage:u,publicKey:d,passed:l,metadata:f,video:p,sessionId:_}=c,y=new FormData;y.append("files",u),y.append("files",p);const m=await fetch(`${Wa}/v1/uploads/media`,{method:"POST",headers:{},body:y});if(!m.ok)throw m;const v=(await m.json()).data,g={sessionId:_,components:["liveness"],faceImage:v[0].cachedLocation,livenessClip:v[1].cachedLocation,passed:l,metadata:f};d&&(g.publicMerchantID=d);const $=await fetch(`${o}/v1/sdk/identity/liveness/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)});if(!$.ok)throw $;return(await $.json()).data},fetchSessionToken:async()=>{throw new Error("fetchSessionToken is deprecated. Provide sessionToken from your backend.")},validateSessionId:async c=>{const u=await fetch(`${o}/v1/sdk/session/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:c})}),d=await u.json().catch(()=>({}));if(!u.ok){const l=(d==null?void 0:d.message)||"Session validation failed";throw new Error(l)}return!0}}}const ja=360,Ba="#125766",qa="https://cdn.youverify.co/1721901834404-q2nxqyng5klm918b3BDVU.jpg",$o="https://cdn.youverify.co",st={js:{default:"1731681780468-ttgfiK6Sl1GKegUe-wm4v.js",simd:"1731681609027-RTOweJqdl8Tt39aAdyie9.js"},wasm:{default:"1731681817302-aVNwDW6DP2MsDNTbiav_V.wasm",simd:"1731681739675-nvF1En4g5rAW4daq5g5DH.wasm"}},Ya=[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11],To={spoofing:{key:"GLARE_DETECTION_ERROR",message:"We detected a screen recording or photo during your liveness."},"no face":{key:"LIVENESS_FACE_NOT_FOUND",message:"We could not detect a face in your test."},lighting:{key:"LIGHTING_ERROR",message:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face."}},Ga={"complete-the-circle":{Icon:Pa,name:"Complete The Circle ⭕️",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"},"yes-or-no":{Icon:Na,name:"Yes or No ❓",description:"First position your face in the camera. Then tilt your head to the left to answer No and to the right to answer Yes"},motions:{Icon:wo,name:"Motions 💫",description:"First position your face in the camera frame, then follow the instructions"},blink:{Icon:wo,name:"Blink 💫",description:"First position your face in the camera frame, then follow the instructions"},"facial-expressions":{Icon:go,name:"Facial Expressions 🤪",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"}},ko=ie({tasks:[],namespace:"",user:void 0,currentTaskIndex:0,completedCount:0,nextTask:()=>{},completed:!1,onRequestClose:()=>{},faceDetector:null,saveStream:()=>{},savePhoto:()=>{},clearSavedPhoto:()=>{},onComplete:()=>Promise.resolve(),onFailure:()=>{},imageCaptured:!1,setImageCaptured:()=>{},sandboxEnvironment:!0,isMobileAppWebView:!1});let So,Co=!1;function Ka(e){const{publicKey:t,tasks:n,children:r,namespace:o,user:i,branding:s,onRequestClose:a,onSuccess:c=()=>{},onFailure:u=()=>{},metadata:d,presentation:l,sandboxEnvironment:f=!0,isMobileAppWebView:p=!1,sessionId:_,sessionToken:y,forceDevUrl:m}=e,[v,g]=x(0),[$,T]=x(0),[S,M]=x(null),[A,W]=x(!1),{saveStream:F,savePhoto:b,savedPhoto:R,clearSavedPhoto:q,savedStreams:D}=Eo(),{postData:Y,validateSessionId:Q}=Va(f,m,t,u),X=z(()=>$===n.length,[n,$]),k=()=>{T(E=>E+1),g(E=>E+1)},C=E=>{const O=new Image;O.crossOrigin="Anonymous",O.src=qa,O.onload=()=>{const V=xn(O,O.width,O.height);Ce.detectFaces(E,V)}},L=async()=>{if(!R.current){u({faceImage:"",passed:!1,metadata:d,error:{key:"image_capture_failed",message:"No face image captured. Image capture failed. Please try again."}}),a();return}try{const E=await Y({faceImage:R.current,video:new Blob(D.current,{type:"video/mp4"}),publicKey:t,passed:!0,metadata:d,sessionId:_});c(E),a()}catch{u({faceImage:"",passed:!1,metadata:d,error:{key:"API_ERROR",message:"Failed to process liveness check. Please try again."}}),a()}},P=async()=>{try{if(!_)throw new Error("sessionId is required. Provide it from your backend.");if(!y)throw new Error("sessionToken is required. Provide it from your backend.");await Q(_)}catch(O){const V=O instanceof Error?O.message:"Invalid or expired sessionId";u({faceImage:"",passed:!1,metadata:d,error:{key:"invalid_or_expired_session",message:V}});return}const E=await Ce.loadDetector();So=E,C(E),M(E)};return H(()=>{if(Co){M(So);return}P(),Co=!0},[]),h(ko.Provider,{value:{tasks:n,namespace:o,user:i,currentTaskIndex:v,completed:X,completedCount:$,nextTask:k,branding:{name:(s==null?void 0:s.name)??"Youverify",color:(s==null?void 0:s.color)??void 0,logo:(s==null?void 0:s.logo)??"/yv_logo.svg",logoAlt:(s==null?void 0:s.logoAlt)??`${(s==null?void 0:s.name)??"Youverify"} logo`,hideLogoOnMobile:(s==null?void 0:s.hideLogoOnMobile)??!0,showPoweredBy:(s==null?void 0:s.showPoweredBy)??!0,poweredByText:(s==null?void 0:s.poweredByText)??"Powered by Youverify",poweredByLogo:(s==null?void 0:s.poweredByLogo)??"/yv_logo.svg"},onRequestClose:a,faceDetector:S,saveStream:F,savePhoto:b,clearSavedPhoto:q,onComplete:L,onFailure:u,presentation:l,imageCaptured:A,setImageCaptured:W,sandboxEnvironment:f,publicKey:t,isMobileAppWebView:p,sessionId:_,sessionToken:y},children:r})}function fe(){return te(ko)}const oe={root:"_root_vqy7d_1",container:"_container_vqy7d_4",lhs:"_lhs_vqy7d_7",info:"_info_vqy7d_11",active:"_active_vqy7d_32",completed:"_completed_vqy7d_39",rhs:"_rhs_vqy7d_62",profile:"_profile_vqy7d_65",avatar:"_avatar_vqy7d_68",main:"_main_vqy7d_81",content:"_content_vqy7d_84"},Mn={root:"_root_lryhb_1",container:"_container_lryhb_1",brand:"_brand_lryhb_6"};function Xa(){const{branding:e,isMobileAppWebView:t,onRequestClose:n,presentation:r}=fe();return h("div",{className:Mn.root,children:h("div",{className:Mn.container,children:[h("div",{className:Mn.brand,children:(e==null?void 0:e.logo)&&!(e.hideLogoOnMobile&&t)&&h("img",{className:"yvlw-h-10",src:e.logo,alt:e.logoAlt||"Logo"})}),(t||r==="page")&&h("button",{type:"button",className:"yvlw-text-sm yvlw-rounded yvlw-px-3 yvlw-py-2 yvlw-border yvlw-border-gray-300 dark:yvlw-border-gray-700",onClick:()=>n(),children:"Close"})]})})}const Fo="colorScheme";function xo(){const{namespace:e}=fe(),t=()=>localStorage.getItem(Fo),n=(o=null)=>{o&&localStorage.setItem(Fo,o);const i=`${e}-color-scheme`,s=document.documentElement;o&&o==="dark"?s==null||s.setAttribute(i,"dark"):s==null||s.removeAttribute(i)};return{setColorScheme:n,toggleColorScheme:()=>{const o=t();return n(o==="dark"?"light":"dark")},getColorScheme:t}}const Za={root:"_root_bcsvc_1"};function Ja(){if(!(window.screen.width>=900))return 10/9}function at(e){const{children:t,onStream:n=()=>{},onRecord:r=()=>{}}=e,o=w(null),i=w(0),s=w(null),{start:a,stop:c}=Eo({onRecord:r}),u=async()=>{try{const f=await navigator.mediaDevices.getUserMedia({video:{aspectRatio:{exact:Ja()}}});s.current=f,a(f),o.current&&(o.current.srcObject=f)}catch{}},d=()=>{s.current&&(s.current.getTracks().forEach(f=>f.stop()),s.current=null,c(),o.current&&(o.current.srcObject=null))},l=()=>{n(o),i.current=requestAnimationFrame(l)};return H(()=>{const f=o.current;if(!f)return;const p=()=>{i.current=requestAnimationFrame(l)};return u(),f.addEventListener("canplay",p),()=>{f.removeEventListener("canplay",p),cancelAnimationFrame(i.current),d()}},[]),h("div",{className:Za.root,children:[h("video",{ref:o,autoPlay:!0,loop:!0,playsInline:!0}),t]})}const ct={container:"_container_mcmsr_1",focused:"_focused_mcmsr_12",progress:"_progress_mcmsr_15",completed:"_completed_mcmsr_36",marker:"_marker_mcmsr_40"},Mo=360,Qa=50;function ec(e){const{visitedSections:t,sectionsCount:n,faceDetected:r,divisions:o=Qa}=e,i=z(()=>{const s=[ct.container];return r&&s.push(ct.focused),s.join(" ")},[r]);return h("div",{className:i,children:[h(he,{as:"div",show:r,leave:"yvlw-transition yvlw-linear yvlw-duration-300",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-125 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-300",enterFrom:"yvlw-scale-125 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:ct.progress,children:Array.from(Array(o).keys()).map(s=>{const a=s*Mo/o,c=Math.ceil((a+1)*n/Mo),u=t.includes(c),d=u?s-(c-1)*(o/n):0,l=[];u&&l.push(ct.completed);const f=u?"translateX(158px)":"translateX(150px)";return h("div",{className:l.join(" "),style:{transform:`rotate(${a}deg) ${f}`,transitionDelay:`${d*20}ms`}},`key-${s}`)})})}),h(he,{as:"div",show:!r,leave:"yvlw-transition yvlw-linear yvlw-duration-200",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-75 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-200",enterFrom:"yvlw-scale-75 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:ct.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})]})}function Po(){return{checkZoomLevel:(r,o)=>{const{box:i}=r,{width:s,height:a}=i,c=s*a,u=o**2,d=c/u;if(d>.9)throw new Error("Move face farther from camera");if(d<.05)throw new Error("Move face closer to camera")},checkFacialFeatures:(r,o)=>{},checkInFrame:(r,o)=>{const{offsetX:i,offsetY:s}=o,{box:a}=r;if(!(a.xMin-i>=o.x&&a.yMin-s>=o.y&&a.xMax-i<=o.x+o.width&&a.yMax-s<=o.y+o.height))throw new Error("Position head in frame")}}}function Lt(e={}){const{validations:t=["zoom"],frameSize:n,onFace:r=()=>{},onError:o=()=>{}}=e,{faceDetector:i}=fe(),{checkFacialFeatures:s,checkZoomLevel:a,checkInFrame:c}=Po(),u=w(null),d=f=>{var p;try{if(f.length===0)throw new Error("Detecting face...");if(f.length>1)throw new Error("A maximum of 1 face is allowed");const _=u.current,y=(p=u.current)==null?void 0:p.parentElement;if(!_||!y)return;const m=f[0];for(const v of t)switch(v){case"zoom":a(m,Math.min(y.clientHeight,y.clientWidth));break;case"features":s(m,Math.min(y.clientHeight,y.clientWidth));break;case"in-frame":if(!n)throw new Error("Frame size is required to check if face is in frame");const g=n+200;c(m,{x:(y.clientWidth-g)/2,y:(y.clientHeight-g)/2,width:g,height:g,offsetX:(_.videoWidth-y.clientWidth)/2,offsetY:(_.videoHeight-y.clientHeight)/2});break;default:break}r(m)}catch(_){const{message:y}=_;o(y)}};return{detectFaces:async f=>{if(!i)return;const{ref:p}=f;u.current=p.current;const _=u.current;if(!_)throw new Error("No Video Source detected");const{videoWidth:y,videoHeight:m}=_;if(y===0||m===0)return;const v=xn(_,y,m),g=await Ce.detectFaces(i,v);d(g.faces)}}}const ae={root:"_root_5hgaj_1",container:"_container_5hgaj_4",progress:"_progress_5hgaj_7",intro:"_intro_5hgaj_12",content:"_content_5hgaj_15",branding:"_branding_5hgaj_18",instructionsContainer:"_instructionsContainer_5hgaj_22",instructions:"_instructions_5hgaj_22"},No={root:"_root_h5elg_1",spinner:"_spinner_h5elg_22"},Lo={container:"_container_1vep2_1",spin:"_spin_1vep2_1",md:"_md_1vep2_7",lg:"_lg_1vep2_10"};function Ao(e){const{size:t="md",message:n,className:r=""}=e;return h("span",{className:`${Lo.container} ${Lo[t]} ${r}`,children:n})}function At(e){const{Icon:t,description:n,title:r,actionText:o="Okay, got it",onActionClick:i=()=>{},loading:s=!1,children:a,hideButton:c=!1}=e;return h("div",{className:No.root,children:[h(t,{size:"custom",className:"yvlw-h-20 yvlw-mx-auto yvlw-mb-12"}),h("h2",{children:r}),h("p",{className:"subtext",children:n}),!c&&h("div",{className:"yvlw-mt-12",children:h(Gi,{onClick:()=>i(),className:"yvlw-flex yvlw-items-center yvlw-space-x-3",disabled:s,children:[h("span",{className:"yvlw-flex-1 yvlw-flex yvlw-items-center yvlw-space-x-1 yvlw-justify-center",children:o}),s&&h(Ao,{className:No.spinner})]})}),a]})}const Ro="yvlw-absolute yvlw-w-full yvlw-h-full",Io="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300",Do="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300";function Rt(e){const{children:t,instruction:n,completed:r,failed:o,onStart:i=()=>{},onReset:s=()=>{}}=e,[a,c]=x(!1),{completedCount:u,tasks:d,nextTask:l,branding:f,isMobileAppWebView:p}=fe(),_=z(()=>u*100/d.length,[u,d.length]);return H(()=>{!r&&!o&&(async()=>{await i(),c(!0)})()},[]),H(()=>{r&&(()=>{l()})()},[r]),h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:[h("div",{style:{width:`${_}%`},className:ae.progress}),h(he,{as:"div",show:a&&!r&&!o,enter:Io,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Ro,children:[h("div",{className:`${ae.content}`,children:t}),h("div",{className:ae.instructionsContainer,children:[h("div",{className:ae.instructions,children:[h("h2",{children:n.title}),h("p",{className:"subtext",children:n.description})]}),h("div",{className:ae.branding,children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})})]})]}),h(he,{show:o,as:"div",enter:Io,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Ro,children:h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:"Could not confirm liveness on this task. Click on the button below to go again",onActionClick:s,actionText:"Try Again"})})})]})})}function It(e={}){const{timeout:t,onTimeout:n=()=>{}}=e,[r,o]=x(!1),i=w(null),s=U(()=>{t&&i.current&&clearTimeout(i.current)},[]),a=U(()=>{t&&(i.current=setTimeout(()=>{o(!0),n()},t))},[]),c=U(()=>{o(!1),a()},[]);return H(()=>s,[]),{timedOut:r,reset:c,start:a,stop:s}}const tc=1,Pn=8,Oo="Place face in frame";function nc(e){const{difficulty:t,timeout:n}=e,{saveStream:r}=fe(),[o,i]=x([]),[s,a]=x(Oo),[c,u]=x(!1),[d,l]=x(!1),f=w(new Set),p=w(!1),_=w(null),{reset:y,start:m,stop:v,timedOut:g}=It({timeout:n}),$=()=>{i([]),a(Oo),u(!1),l(!1),f.current=new Set,p.current=!1,_.current=null,y()},T=b=>{const R=b*Pn,q=Math.ceil((R+1)/ja);f.current.has(q)||(f.current.add(q),i(Array.from(f.current))),f.current.size>=Pn&&(v(),setTimeout(()=>{l(!0)},1e3))},S=(b,R)=>{let D=Math.atan2(R,b)*(180/Math.PI);return D<0&&(D+=360),D},M=U(()=>{if(f.current.size===0)return 25;switch(t){case"easy":return 5;case"hard":return 15;default:return 10}},[]),A=b=>{const{keypoints:R,box:q}=b,D={x:q.width*.5,y:q.height*.5},Y=R[tc],Q={y:Y.y-q.yMin,x:Y.x-q.xMin},X=D.x-Q.x,k=Q.y-D.y,C=M();return Math.abs(X)<C&&Math.abs(k)<C?null:S(X,k)},{detectFaces:W}=Lt({frameSize:280,validations:["zoom","in-frame"],onFace:b=>{u(!0),a("Slowly move head around to complete circle");const R=A(b);R&&T(R)},onError:b=>{a(b),i([]),f.current.clear(),_.current=null,p.current=!1}});return h(j,{children:h(Rt,{instruction:{title:s,description:c?void 0:"Always ensure face is in frame"},name:"complete-the-circle",completed:d,failed:g,onReset:$,onStart:m,children:h(at,{onStream:b=>{try{if(!b.current||d)return;const{videoWidth:R}=b.current;W({ref:b,frameSize:R})}catch{}},onRecord:r,children:h(ec,{faceDetected:c,sectionsCount:Pn,visitedSections:o})})})})}const Nn={root:"_root_thujo_1",sticker:"_sticker_thujo_4",no:"_no_thujo_7",yes:"_yes_thujo_12"};function rc(e){const{show:t,stickers:n}=e;return h(j,{children:t&&h("div",{className:Nn.root,children:n.map(r=>h("div",{className:`${Nn.sticker} ${Nn[r]}`,children:r.toUpperCase()},`sticker-${r}`))})})}const oc={question:"Are you alive?",errorMessage:"You have to be alive to proceed though",answer:!0},ic="Wrong answer. Try again",Ho="Keep face in camera";function sc(e){const{difficulty:t,questions:n=[oc],timeout:r}=e,[o,i]=x(Ho),[s,a]=x(!1),[c,u]=x(!1),{saveStream:d}=fe(),l=w("inactive"),f=w(0),p=w(!1),_=w(null),y=w(null),m=w(null),v=()=>{_.current&&clearTimeout(_.current),y.current&&clearTimeout(y.current)},{reset:g,start:$,stop:T,timedOut:S}=It({timeout:r,onTimeout:v}),M=()=>{i(Ho),a(!1),u(!1),l.current="inactive",f.current=0,p.current=!1,g()},A=D=>{const{keypoints:Y}=D,Q=Y[1],X=Y[9],k=Q.x-X.x,C=Q.y-X.y;return 90-Math.atan2(C,k)*(180/Math.PI)},W=D=>{l.current="inactive",i(n[D].question),_.current=setTimeout(()=>{l.current="active"},2e3)},F=z(()=>{switch(t){case"easy":return 2;case"hard":return 6;default:return 4}},[]),b=D=>{try{if(l.current="inactive",Math.abs(D)<F)throw new Error("Tilt head further to answer");const Y=D>0,Q=n[f.current].answer;if(Y===Q)f.current+=1,f.current===n.length?(u(!0),T()):W(f.current);else throw new Error(n[f.current].errorMessage||ic)}catch(Y){i(Y.message),y.current=setTimeout(()=>{W(f.current)},2e3)}},{detectFaces:R}=Lt({onFace:D=>{if(p.current||(a(!0),p.current=!0,W(f.current)),l.current==="inactive")return;const Y=A(D);b(Y)},onError:D=>{i(D)}}),q=D=>{try{if(!D.current||c)return;m.current=D.current;const{videoWidth:Y}=D.current;R({ref:D,frameSize:Y})}catch{}};return H(()=>v,[]),h(Rt,{instruction:{title:o,description:s?"":"Move head left for No and right for Yes"},name:"yes-or-no",failed:S,onReset:M,onStart:$,completed:c,children:h(at,{onStream:q,onRecord:d,children:h(rc,{show:s,stickers:["yes","no"]})})})}function ac(e={}){const{onChange:t=()=>{}}=e,n=!!window.DeviceOrientationEvent,r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma})};return H(()=>(window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r)}),[]),{canUse:n}}function Be(e,t){return Math.sqrt(e**2+t**2)}function cc(e){const t=e.slice();for(let n=t.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}const He=(e,t)=>{for(const[n,r]of Object.entries(e))if(r===t)return n;return null},lc=e=>{const t=Object.keys(To);for(const n of t)if(new RegExp(`\\b${n}\\b`,"i").test(e))return To[n];return{key:"VALIDATION_ERROR",message:"We detected an error during your test. Please TRY AGAIN"}};function uc(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(null),s=w(!0),a=w(null),c=w(null),u=w(0),d=w(!1),l=z(()=>{switch(o){case"easy":return 6;case"hard":return 10;default:return 8}},[]),f=()=>{if(u.current<t){const m=t-u.current;let v=`Nod head ${m} `;m<t&&(v+="more "),v+=m>1?"times":"time",n(v);return}d.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)},{canUse:p}=ac({onChange:m=>{c.current=m}});return{evaluate:m=>{if(!p){n("Cannot perform task. Transfer to mobile device to complete");return}if(!c.current||!c.current.beta){n("Cannot perform task. Transfer to mobile device to complete");return}if(c.current.beta<60||c.current.beta>100){n("Keep phone in upright position to continue");return}if(d.current)return;const{keypoints:v}=m,g=Be(v[6].x-v[8].x,v[6].y-v[8].y),T=Be(v[2].x-v[1].x,v[2].y-v[1].y)/g*10;if(T>l){if(i.current||!s.current)return;i.current=T,s.current=!1,a.current=setTimeout(()=>{i.current=null},3e3)}else i.current&&i.current-T>l/2&&(u.current+=1,i.current=null,a.current&&clearTimeout(a.current)),s.current=!0;f()},reset:()=>{i.current=null,s.current=!0,a.current=null,c.current=null,u.current=0,d.current=!1}}}function dc(e){const{onMessage:t,onComplete:n,difficulty:r}=e,o=w(!1),i=z(()=>{switch(r){case"easy":return 80;case"hard":return 120;default:return 100}},[]);return{evaluate:c=>{if(o.current)return;const{keypoints:u}=c,d=Be(u[6].x-u[8].x,u[6].y-u[8].y);if(Be(u[14].x-u[13].x,u[14].y-u[13].y)/d*100>i){o.current=!0,t("Awesome!"),setTimeout(()=>{n()},500);return}t("Open your mouth wide")},reset:()=>{o.current=!1}}}function Wo(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(!0),s=w(!1),a=w(null),c=w(0),u=z(()=>{switch(o){case"easy":return{closed:20,open:30};case"hard":return{closed:10,open:30};default:return{closed:15,open:30}}},[]),d=y=>{i.current&&(y>=u.closed||(i.current=!1,a.current=Date.now()))},l=y=>{if(!i.current&&!(y<u.open)&&(i.current=!0,a.current)){const m=Date.now(),v=a.current;(m-v)/1e3<=2&&(c.current+=1)}},f=()=>{if(c.current<t){const y=t-c.current;let m=`Blink right eye ${y} `;y<t&&(m+="more "),m+=y>1?"times":"time",n(m);return}s.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)};return{evaluate:y=>{if(s.current)return;const{keypoints:m}=y,v=Be(m[6].x-m[8].x,m[6].y-m[8].y),$=Be(m[145].x-m[159].x,m[145].y-m[159].y)/v*100;d($),l($),f()},reset:()=>{i.current=!0,s.current=!1,a.current=null,c.current=0}}}var Uo=(e=>(e.open_mouth="open_mouth",e.blink="blink",e))(Uo||{});const zo=cc(Object.keys(Uo)),Vo="Keep face in camera";function fc(e){const{difficulty:t,maxBlinks:n=3,maxNods:r=3,timeout:o}=e,i=w(0),[s,a]=x(Vo),[c,u]=x(!1),[d,l]=x(null),f=w(!1),{saveStream:p}=fe(),{reset:_,start:y,stop:m,timedOut:v}=It({timeout:o}),g=()=>{if(i.current===zo.length-1){u(!0),m();return}i.current+=1},$=uc({total:Math.floor(Math.random()*r+1),difficulty:t,onMessage:b=>a(b),onComplete:g}),T=dc({difficulty:t,onMessage:b=>a(b),onComplete:g}),S=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:b=>a(b),onComplete:g}),{detectFaces:M}=Lt({onFace:b=>{switch(f.current||(f.current=!0),zo[i.current]){case"open_mouth":T.evaluate(b);break;case"blink":S.evaluate(b);break}},onError:b=>{a(b)}}),A=()=>{i.current=0,a(Vo),u(!1),f.current=!1,S.reset(),$.reset(),T.reset(),_()},W=async b=>{try{if(!b.current||c)return;const{videoWidth:R}=b.current;await M({ref:b,frameSize:R,throttleInterval:500})}catch{}},F=async()=>{};return h(Rt,{instruction:{title:s,description:"Follow the directives as instructed"},name:"motions",failed:v,onReset:A,completed:c,onStart:async()=>{await F(),y()},children:d?h(j,{}):h(at,{onStream:W,onRecord:p})})}const jo="Keep face in camera";function pc(e){const{difficulty:t,maxBlinks:n=3,timeout:r}=e,[o,i]=x(jo),[s,a]=x(!1),[c,u]=x(null),d=w(!1),{saveStream:l}=fe(),{reset:f,start:p,stop:_,timedOut:y}=It({timeout:r}),m=()=>{a(!0),_()},v=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:M=>i(M),onComplete:m}),{detectFaces:g}=Lt({onFace:M=>{d.current||(d.current=!0),v.evaluate(M)},onError:M=>{i(M)}}),$=()=>{i(jo),a(!1),d.current=!1,v.reset(),f()},T=async M=>{try{if(!M.current||s)return;const{videoWidth:A}=M.current;await g({ref:M,frameSize:A})}catch{}},S=async()=>{};return h(Rt,{instruction:{title:o,description:"Follow the directives as instructed"},name:"blink",failed:y,onReset:$,completed:s,onStart:async()=>{await S(),p()},children:c?h(j,{}):h(at,{onStream:T,onRecord:l})})}const Ln={LEFT_EYE:[36,37,38,39,40,41],RIGHT_EYE:[42,43,44,45,46,47],MOUTH:[48,49,50,51,52,53,54,55,56,57,58,59]},Dt=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),Bo=e=>{if(e.length!==6)return 0;const t=Dt(e[1],e[5]),n=Dt(e[2],e[4]),r=Dt(e[0],e[3]);return(t+n)/(2*r)},hc=e=>{if(e.length<12)return 0;const t=e[9],n=e[3];return Dt(t,n)},vc=(e,t,n,r)=>{var l,f,p;let o=!0,i=!0;if(!r){const m=Ln.LEFT_EYE.map(A=>e[A]),v=Ln.RIGHT_EYE.map(A=>e[A]),g=Ln.MOUTH.map(A=>e[A]),$=Bo(m),T=Bo(v),S=hc(g);o=($+T)/2>1,i=S<73.24,o||t("Please look at the camera!"),i||t("Please close your mouth!")}const s=.5,a=.12,c=((l=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkLeft"))==null?void 0:l.score)??0,u=((f=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkRight"))==null?void 0:f.score)??0,d=((p=r==null?void 0:r.find(_=>_.categoryName==="jawOpen"))==null?void 0:p.score)??0;return o=c<s&&u<s,o||t("Please look at the camera!"),i=d<a,i||t("Please close your mouth!"),{eyesOpen:o,mouthClosed:i}};function mc(e={}){const{validations:t=["zoom","in-frame"],frameSize:n,onFace:r=()=>{},onError:o=()=>{},onMessage:i=()=>{},livenessTimeout:s}=e,{faceDetector:a,savePhoto:c}=fe(),{checkFacialFeatures:u,checkZoomLevel:d,checkInFrame:l}=Po(),f=w(null),p=w(null),_=w(!1),y=w(null),m=w(!1),v=w([]),g=U(()=>{p.current&&clearTimeout(p.current),y.current&&clearTimeout(y.current),v.current.forEach(clearTimeout),m.current=!1,_.current=!0},[]),$=w(null),T=w(null),S=w([]),M=10,A=7.5,W=2,F=w({sharpness:0,data:null}),b=(k,C)=>{const L=k.getContext("2d");if(!L||C.width===0||C.height===0||!L||C.width===0||C.height===0)return!1;const P=L.getImageData(C.xMin,C.yMin,C.width,C.height),{data:E}=P;let O=0,V=0;for(let J=0;J<E.length;J+=4).299*E[J]+.587*E[J+1]+.114*E[J+2]>250&&V++;const Z=E.length/4;return O=V/Z,O>.01},R=(k,C,L,P)=>{const E=C.current,O=E==null?void 0:E.parentElement;if(!(!E||!O))for(const V of P)switch(V){case"zoom":d(k,Math.min(O.clientHeight,O.clientWidth));break;case"features":u(k,Math.min(O.clientHeight,O.clientWidth));break;case"in-frame":let Z=L;Z||(Z=Math.min(O.clientHeight,O.clientWidth)*.7);const J=Z+200;l(k,{x:(O.clientWidth-J)/2,y:(O.clientHeight-J)/2,width:J,height:J,offsetX:(E.videoWidth-O.clientWidth)/2,offsetY:(E.videoHeight-O.clientHeight)/2});break}},q=k=>{const C=[33,133,159,362,263,386],L=.5;for(const P of C){const E=k[P];if(!E||E.score&&E.score<L)return!1}return!0},D=(k,C)=>{const L=k.getContext("2d");if(!L||C.width===0||C.height===0)return!1;const P=L.getImageData(C.xMin,C.yMin,C.width,C.height),{data:E}=P;let O=0;for(let Z=0;Z<E.length;Z+=4){const J=E[Z],ee=E[Z+1],qe=E[Z+2],Ot=.299*J+.587*ee+.114*qe;O+=Ot}return O/(E.length/4)<60},Y=k=>{const C={x:k.box.xMin+(k.box.width??0)/2,y:k.box.yMin+(k.box.height??0)/2};if(S.current.push(C),S.current.length>M&&S.current.shift(),S.current.length<M)return!1;let L=0,P=0,E=0;for(let ee=1;ee<S.current.length;ee++){const qe=S.current[ee-1],Ot=S.current[ee],ut=Ot.x-qe.x,Yo=Ot.y-qe.y,Go=Math.sqrt(ut*ut+Yo*Yo);Go>=2&&(L+=Go,ee>1&&Math.sign(ut)!==Math.sign(E)&&Math.abs(ut)>3&&P++,E=ut)}const V=L/(M-1)>A,Z=P>=W,J=V||Z;return J&&i("🚨 Head shake detected!"),J},Q=(k,C,L,P)=>{try{if(k.length===0||k.length>1){p.current&&(clearTimeout(p.current),p.current=null),i(k.length>1?"Please ensure only one face is visible":"Detecting face...");return}const E=k[0];let O="",V=!0;try{R(E,f,n,t)}catch(ee){O=ee.message,V=!1}Y(E)&&(O="Please hold your head steady",V=!1),P||(O="Center your face in the frame",V=!1),q(E.keypoints)||(O="Please ensure your eyes are clearly visible. Remove glasses if necessary.",V=!1);const{eyesOpen:Z,mouthClosed:J}=vc(E.keypoints,i,!1,L);if(Z?J||(O="Please close your mouth",V=!1):(p.current&&(clearTimeout(p.current),p.current=null),V=!1),!V){p.current&&(clearTimeout(p.current),p.current=null,v.current.forEach(clearTimeout)),i(O),r(E,!1,L,!1);return}if(!p.current){if(D($.current,E.box)){i("Too dark – move to a well-lit area");return}if(b($.current,E.box)){i("Too much glare. Please avoid direct light on your face.");return}i("Hold still..."),F.current={sharpness:0,data:null},v.current.forEach(clearTimeout);const ee=setTimeout(()=>i("Almost there..."),400),qe=setTimeout(()=>i("Detecting liveness..."),700);v.current=[ee,qe],p.current=setTimeout(()=>{F.current.data?(c(F.current.data),r(E,!0,L,!0)):o("Could not capture a clear photo. Please try again.")},1e3)}if(p.current){const ee=Oa(C);ee>F.current.sharpness&&(F.current={sharpness:ee,data:C})}}catch(E){o(E.message),k.length>0&&r(k[0],!1,L,!1)}};return{detectFaces:async k=>{if(!a)return;f.current=k.ref.current;const C=f.current;if(!C||C.videoWidth===0)return;$.current||($.current=document.createElement("canvas"),T.current=$.current.getContext("2d",{willReadFrequently:!0}));const L=$.current,P=T.current;if(!L||!P)return;L.width=C.videoWidth,L.height=C.videoHeight,P.drawImage(C,0,0,L.width,L.height);const E=P.getImageData(0,0,L.width,L.height);!m.current&&C.readyState>=2&&!_.current&&(m.current=!0,y.current=setTimeout(()=>{o("Liveness check TIMED OUT. Please try again."),g()},s));const{faces:O,blendShapes:V,inBox:Z}=await Ce.detectFaces(a,E);Q(O,E,V,Z)},cleanup:g}}const An={container:"_container_1ej18_1",progress:"_progress_1ej18_12",completed:"_completed_1ej18_33",marker:"_marker_1ej18_37"};function _c(e){const{faceDetected:t}=e,n=z(()=>{const r=[An.container];return t&&r.push(An.focused),r.join(" ")},[t]);return h("div",{className:n,children:h(he,{as:"div",className:"yvlw-absolute",children:h("div",{className:An.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})})}const Rn={EnvironmentNotSupported:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face.",SpoofFace:"We detected a spoofing attempt",FaceTrackingFailed:"We could not detect your face",ExcessiveFaceBrightnessDetected:"We detected excessive light during the test, please wipe any oil or sweat that might cause a reflection on your face."},yc={None:"Processing...",LookAtCamera:"Look at camera.",FaceNotCentered:"Center your face in the camera.",MoveCloser:"Too far away! Move in closer.",ContinueToMoveCloser:"Continue to move closer.",MoveBack:"Too close! Move farther away.",TooMuchMovement:"Too much movement.",AttentionNotNeeded:"Finalizing check...",LookInFront:"Look in front.",TimedOut:"Timed out.",IncreaseBrightnessToMax:"Increase your screen brightness to maximum.",Tip1Title:"Tip 1:",Tip2Title:"Tip 2:",Tip3Title:"Tip 3:",Tip1:"Center your face in the preview. Make sure your eyes and mouth are visible, remove any obstructions like headphones.",Tip2:"You may be asked to smile.",Tip3:"You may be asked to turn your nose towards the green color.",Continue:"Continue"};function gc(e){const{onComplete:t=()=>{},onMessage:n=()=>{},onError:r=()=>{}}=e,{setColorScheme:o,getColorScheme:i}=xo(),s=w(null),a=w(!1),c=()=>{s.current&&(s.current.callAttemptEnd(),s.current.delete(),s.current=null)},u=U(()=>{c()},[]),d=()=>{s.current&&c(),s.current=null,a.current=!1},l=m=>{var A,W;const v=m.split(".");let g=!1;s.current.setToken(m);let $="",T="",S,M=0;if(v.length===3){const F=JSON.parse(atob(v[1]));if(F.face){const b=JSON.parse(F.face),R=/^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;if(b.endpoint&&(R.test(b.endpoint)||b.endpoint==="https://virginia.api.cognitive.microsoft.us")){s.current.setEndpoint(b.endpoint);const D=JSON.parse(F["allowed-paths"]);if(D){const Y=(A=D.find(P=>P.path.toLocaleLowerCase().endsWith("/session/start")))==null?void 0:A.path;s.current.setSessionStartPath(Y);const Q=(W=D.find(P=>P.path.toLocaleLowerCase().endsWith("/session/attempt/end")))==null?void 0:W.path;s.current.setAttemptEndPath(Q);const X=D.find(P=>P.path.endsWith("/detectLiveness/singleModal"));X&&({path:$,quota:M}=X,s.current.setLivenessPath($));const k=D.find(P=>P.path.endsWith("/detectLivenessWithVerify/singleModal"));k&&({path:T,quota:M}=k,s.current.setLivenessWithVerifyPath(T));const C=new Set(D.map(P=>{var E;return(E=P.path)==null?void 0:E.split("/")[1]}));if(C.size===1&&(X||k)){const P=C.values().next().value;s.current.setApiVersion(P),g=!0,S=b.clientClaims.livenessOperationMode}}}}s.current.setOperationQuota(M),s.current.setOperationMode(window.Module.LivenessOperationMode[S]),F.sid&&s.current.setSid(F.sid),F["azure-resource-id"]&&s.current.setResourceId(F["azure-resource-id"])}if(g)s.current.initialize();else{const F={livenessError:He(window.Module.LivenessFailureReason,window.Module.LivenessFailureReason.InvalidToken),recognitionError:He(window.Module.RecognitionFailureReason,window.Module.RecognitionFailureReason.None)};r(F.livenessError?Rn[F.livenessError]||F.livenessError:"Something went wrong"),u()}},f=m=>{try{o("light"),s.current=new window.Module.FaceRecoEngineAdapter,l(m)}catch(v){r(`Could not start liveness test: ${v.message}`),c()}},p=m=>{const{isActionValid:v,isFeedbackValid:g,feedback:$}=m;if(v)switch(m.action){case window.Module.ActionRequiredFromApplication.BrightenDisplay:o("light");break;case window.Module.ActionRequiredFromApplication.DarkenDisplay:o("dark");break;case window.Module.ActionRequiredFromApplication.StopCamera:break}if(!a.current&&g){const T=He(window.Module.FeedbackForFace,$);n(T&&(yc[T]||""))}if($===window.Module.FeedbackForFace.AttentionNotNeeded){a.current=!0;const T=i();o(T)}},_=m=>{var S,M;const{livenessResult:v,recognitionResult:g}=m,$=((S=v.failureReason)==null?void 0:S.value)!==0||((M=g.failureReason)==null?void 0:M.value)!==0,T=new Set(["EnvironmentNotSupported","ExcessiveFaceBrightnessDetected","FaceEyeRegionNotVisible"]);if($){const A={livenessError:He(window.Module.LivenessFailureReason,v.failureReason),recognitionError:He(window.Module.RecognitionFailureReason,g.failureReason)};A.livenessError&&T.has(A.livenessError)?t():r(A.livenessError?Rn[A.livenessError]||A.livenessError:"Something went wrong")}else{const A={livenessStatus:He(window.Module.LivenessStatus,v.status),recognitionResult:{status:He(window.Module.RecognitionStatus,g.status),matchConfidence:g.confidence},resultId:v.resultId,digest:v.digest};A.livenessStatus==="RealFace"?t():A.livenessStatus==="SpoofFace"?r(Rn[A.livenessStatus]):r("Could not validate request")}u()};return{start:f,analyze:p,processFrame:m=>{let v=!1;if(a.current)v=s.current.generatePayloadAndResult();else{const{videoWidth:g,videoHeight:$}=m,T=xn(m,g,$,void 0,{willReadFrequently:!0}),S=window.Module._malloc(T.data.byteLength);try{window.Module.HEAPU8.set(T.data,S);const M=s.current.processFrame(g,$,T.data.byteLength,S);M.terminate?v=!0:M.isValid&&p(M)}finally{window.Module._free(S)}}v&&_(s.current.getFaceAnalyzerResult())},reset:d,destroy:u}}const qo="Detecting face...";function wc({onImageCaptured:e,fetchAzureSessionToken:t,loadAzureSdk:n,onError:r,onReset:o,onFailure:i}){const[s,a]=x(qo),[c,u]=x(!1),d=w("findingFace"),l=w(null),f=w(),p=w(!1),[_,y]=x(0),m=w(!1),[v,g]=x(!1);H(()=>{y(Math.min(window.innerWidth,window.innerHeight)*.6)},[]),H(()=>{n(),t()},[]);const $=gc({onMessage:F=>{d.current==="analyzingLiveness"&&a(F)},onComplete:()=>{d.current="done",e(!0)},onError:F=>{const b=lc(F);a(b.message),d.current="done",u(!0),r&&r(F),i({faceImage:"",passed:!1,metadata:{},error:b})}}),T=()=>{m.current=!1,a(qo),d.current="findingFace",l.current=null,$.reset(),f.current&&cancelAnimationFrame(f.current),u(!1),o()},{detectFaces:S,cleanup:M}=mc({validations:["zoom","features"],frameSize:_,livenessTimeout:1e4,onFace:async(F,b,R)=>{p.current=b,b&&d.current==="findingFace"&&!m.current&&R&&(m.current=!0,g(!0))},onPhotoSaved:()=>{},onMessage:F=>{d.current==="findingFace"&&a(F)},onError:F=>{a(F),u(!0),r&&r(F)}});H(()=>()=>{M()},[]);const A=()=>{!l.current||l.current.paused||l.current.ended||(d.current==="findingFace"?S({ref:l}):d.current==="analyzingLiveness"&&$.processFrame(l.current),d.current!=="done"&&(f.current=requestAnimationFrame(A)))};H(()=>{(async()=>{if(v){g(!1),M();try{await n();const b=await t();if(b)$.start(b),d.current="analyzingLiveness";else throw new Error("Session token could not be retrieved.")}catch(b){const R=b instanceof Error?b.message:"Failed to start liveness check.";r&&r(R),i({faceImage:"",passed:!1,metadata:{},error:{key:"session_token_error",message:R}}),u(!0)}}})()},[v]);const W=F=>{F.current&&(l.current=F.current,A())};return H(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[]),h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col yvlw-items-center yvlw-justify-center",children:c?h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:s,onActionClick:T,actionText:"Try Again"})}):h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col",children:[h("div",{children:h(at,{onStream:W,children:h(j,{children:[h(_c,{faceDetected:p.current}),d.current==="analyzingLiveness"&&h("div",{className:"yvlw-bg-black/20 yvlw-z-5"})]})})}),h("div",{className:"yvlw-border-t dark:yvlw-border-gray-800 yvlw-border-gray-200",children:h("div",{className:"yvlw-text-center yvlw-mx-auto yvlw-pt-4 yvlw-pb-6 yvlw-px-4",children:[h("div",{className:ae.instructions,children:[h("h2",{children:s}),h("p",{className:"subtext",children:"Position your face in the camera frame and hold still."})]}),h("div",{className:ae.branding})]})})]})})})})}const bc=()=>{if(window.isAzureSdkLoading)return window.azureSdkLoadPromise;window.isAzureSdkLoading=!0;const e=new Promise((t,n)=>{let r=st.js.simd;try{WebAssembly.validate(new Uint8Array(Ya))||(r=st.js.default)}catch{r=st.js.simd}window.Module=window.Module||{},window.Module.onRuntimeInitialized=()=>{t()},Object.assign(window.Module,{locateFile(i,s){if(i.includes("AzureAIVisionFace")&&i.endsWith(".wasm")){const a=i.includes("SIMD")?st.wasm.simd:st.wasm.default;return`${$o}/${a}`}return`${s}${i}`}});const o=document.createElement("script");o.src=`${$o}/${r}`,o.async=!0,o.onerror=()=>{n(new Error("Network error: Failed to load SDK script."))},document.head.appendChild(o)});return window.azureSdkLoadPromise=e,e};let lt=null;function Ec(){var X;const{toggleColorScheme:e,getColorScheme:t,setColorScheme:n}=xo(),{user:r,tasks:o,currentTaskIndex:i,completed:s,onComplete:a,onFailure:c,faceDetector:u,presentation:d,clearSavedPhoto:l,branding:f,isMobileAppWebView:p}=fe(),[_,y]=x(!1),[m,v]=x(!1),[g,$]=x(null),[T,S]=x(!1),[M,A]=x(!1),[W,F]=x(0),[b,R]=x(null);H(()=>{const k=t();n(k)},[]),H(()=>{s&&!T&&b===null&&R(5)},[s,T,b]);const q=U(async()=>{try{y(!0),$(null),await a(),lt=null,d==="page"&&S(!0)}catch(k){$(k.message)}finally{y(!1)}},[a,d]);H(()=>{if(b===null||T)return;if(b===0){q();return}const k=setTimeout(()=>{R(C=>(C??1)-1)},1e3);return()=>{clearTimeout(k)}},[b,T]);const{sessionToken:D}=fe(),Y=async()=>(!D&&!lt&&(lt=Promise.reject(new Error("sessionToken not provided. Generate a sessionToken on your backend and pass it to the SDK."))),D??lt),Q=U(k=>k===i?oe.active:i>k?oe.completed:"subtext",[i]);return h("div",{className:oe.root,children:h("div",{className:oe.container,children:[h("div",{className:`${oe.lhs} divider`,children:[h("div",{className:oe.info,children:[h(Xa,{}),h("div",{children:h("p",{className:"yvlw-text-xs yvlw-m-0 yvlw-p-0 subtext",children:"You have been given this set of tasks to complete. They are pretty easy to do but we will be guiding you every step of the way."})}),h("ol",{children:[o.map((k,C)=>h("li",{className:Q(C),children:Ga[k.id].name},`task-${C}`)),h("li",{className:s?oe.active:"",children:"Complete! 🎉"})]})]}),h("footer",{className:"divider",children:[h("div",{children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})}),h("div",{onClick:()=>e(),role:"button",children:[h("div",{className:"dark:yvlw-hidden",children:h(go,{})}),h("div",{className:"yvlw-hidden dark:yvlw-block",children:h(Ma,{})})]})]})]}),h("div",{className:oe.main,children:h("div",{className:oe.content,children:[h(he,{show:!m,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:u?h(At,{Icon:La,title:"Liveness Check",description:"To ensure the security of your identity, we conduct a liveness check to verify that you are a real person actively engaging with the process. Please ensure to stay in a well lit area.",actionText:"Start Liveness Test",onActionClick:()=>v(!0)}):h(Ao,{size:"lg"})})}),h(he,{show:m&&!M,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(wc,{fetchAzureSessionToken:Y,loadAzureSdk:bc,onImageCaptured:k=>{$(null),k&&A(!0)},onError:k=>$(k),onReset:()=>{lt=null,A(!1),F(k=>k+1),l()},onFailure:c},W)})}),o.map((k,C)=>{let L;switch(k.id){case"complete-the-circle":L=h(nc,{...k});break;case"yes-or-no":L=h(sc,{...k});break;case"motions":L=h(fc,{...k});break;case"blink":L=h(pc,{...k});break;default:L=h(j,{});break}return h(he,{show:m&&M&&!s&&i===C,appear:!0,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full",children:L},`task-${C}`)}),h(he,{show:m&&s,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(At,{Icon:Aa,title:T?"All Set!":"Please click the button below to complete your verification",description:T?"You can now close or exit the window":"Your identity has been verified. You must click the button below to submit and finalize the process.",actionText:b!==null&&b>0?`Finish in (${b}s)`:"Finish",loading:_,onActionClick:q,hideButton:T,children:g&&h("div",{className:"yvlw-mt-3",children:g})})})})]})}),h("div",{className:`${oe.rhs} divider`,children:r&&h("div",{className:`${oe.profile} divider`,children:[h("div",{children:h("div",{className:oe.avatar,children:[r.firstName.charAt(0).toUpperCase(),(X=r.lastName)==null?void 0:X.charAt(0).toUpperCase()]})}),h("div",{children:[h("h4",{children:[r.firstName," ",r.lastName]}),r.email&&h("p",{className:"subtext",children:r.email})]})]})})]})})}function $c(e){const{tasks:t,namespace:n,user:r,branding:o,isMobileAppWebView:i,onClose:s=()=>{},onSuccess:a,onFailure:c,presentation:u="modal",publicKey:d,metadata:l,sandboxEnvironment:f,sessionId:p,sessionToken:_,forceDevUrl:y}=e,[m,v]=x(e.show),g=()=>{v(!1),s()};return h(Ka,{namespace:n,publicKey:d,tasks:t,user:r,branding:o,isMobileAppWebView:i,onRequestClose:g,onSuccess:a,onFailure:c,metadata:l,presentation:u,sandboxEnvironment:f,sessionId:p,sessionToken:_,forceDevUrl:y,children:h(Fa,{id:n,open:u==="page"?!0:m,onClose:g,transition:!0,className:`${xa.root} ${Nt.root} ${Nt[u]}`,style:{"--branding-color":(o==null?void 0:o.color)??Ba},children:[u==="modal"&&h("div",{onClick:g,role:"button",className:Nt.close,children:h(Ra,{className:"yvlw-text-white"})}),h(yo,{className:`${Nt.container}`,children:h(Ec,{})})]})})}class Tc{constructor(t){this.tasks=[],this.container=null,this.namespace="liveness-web-sdk",this.loadedScripts=[];const{presentation:n="modal"}=t;this.presentation=n,this.props=t,t.tasks&&(this.tasks=t.tasks),n==="page"&&this.start()}validateOptions(){if(!this.tasks||this.tasks.length===0)throw new Error("Tasks cannot be empty");if(this.props.user&&!this.props.user.firstName)throw new Error("First Name is required when User object is supplied");if(!this.props.sessionId)throw new Error("A sessionId is required. Generate it on your backend and pass it in.");if(!this.props.sessionToken)throw new Error("A sessionToken is required for passive liveness. Generate it on your backend and pass it in.")}async start(t){t&&(this.tasks=t),this.validateOptions(),this.container=document.createElement("div"),document.body.appendChild(this.container),We(h($c,{namespace:this.namespace,publicKey:this.props.publicKey,sandboxEnvironment:this.props.sandboxEnvironment,forceDevUrl:this.props.forceDevUrl,presentation:this.props.presentation,show:!0,tasks:this.tasks,user:this.props.user,branding:this.props.branding,isMobileAppWebView:this.props.isMobileAppWebView,onClose:()=>this.close(),onSuccess:this.props.onSuccess,onFailure:this.props.onFailure,metadata:this.props.metadata,sessionId:this.props.sessionId,sessionToken:this.props.sessionToken}),this.container)}close(){if(this.container&&this.presentation!=="page"){if(!document.body.contains(this.container))return;document.body.removeChild(this.container),this.props.onClose&&this.props.onClose()}}}return Tc});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "youverify-liveness-web",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"