@smartcomply/web-sdk 1.0.0 → 1.0.1
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/client/Config.d.ts +8 -0
- package/dist/client/HttpClient.d.ts +13 -0
- package/dist/components/MainSDKFlow.d.ts +6 -0
- package/dist/components/steps/IdentityForm.d.ts +10 -0
- package/dist/components/steps/LivenessFlow.d.ts +13 -0
- package/dist/components/steps/LivenessPreCheck.d.ts +8 -0
- package/dist/components/steps/LoadingScreen.d.ts +6 -0
- package/dist/components/steps/SuccessConfirmation.d.ts +6 -0
- package/dist/components/steps/UploadingScreen.d.ts +6 -0
- package/dist/components/steps/WelcomeScreen.d.ts +8 -0
- package/dist/components/ui/Dropdown.d.ts +14 -0
- package/dist/components/ui/SessionTimeout.d.ts +4 -0
- package/dist/components/ui/toast/ToastContainer.d.ts +1 -0
- package/dist/components/ui/toast/index.d.ts +15 -0
- package/dist/index.d.ts +4 -34
- package/dist/index.js +84 -17
- package/dist/main.d.ts +13 -0
- package/dist/utils/constants.d.ts +8 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/livenessHelpers.d.ts +3 -0
- package/dist/utils/types.d.ts +76 -0
- package/dist/vite.svg +1 -0
- package/dist/web-sdk.css +1 -0
- package/package.json +15 -6
- package/dist/index.cjs +0 -17
- package/dist/index.d.cts +0 -34
- package/dist/loading-5HD36QXU.svg +0 -14
- package/dist/shield-checkmark-JBZCUXJC.png +0 -0
- package/dist/success-GHUHNWON.svg +0 -4
- package/dist/trash-KETR47RP.svg +0 -7
package/dist/index.js
CHANGED
|
@@ -1,17 +1,84 @@
|
|
|
1
|
-
var bt=Object.defineProperty;var wt=(t,e,r)=>e in t?bt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var D=(t,e,r)=>wt(t,typeof e!="symbol"?e+"":e,r);import{createRoot as Xt}from"react-dom/client";function ye(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}ye(`/*! tailwindcss v4.2.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CBD5E1;--color-gray-400: #94A3B8;--color-gray-500: #64748B;--color-gray-600: #475569;--color-gray-700: #334155;--color-gray-800: #A3AED0;--color-white: #FFFFFF;--spacing: .25rem;--container-md: 28rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--radius-lg: .5rem;--radius-xl: .75rem;--radius-3xl: 1.5rem;--shadow-2xl: var(--shadow-2xl);--ease-out: cubic-bezier(0, 0, .2, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);--shadow-boxy: var(--shadow-boxy);--shadow-subtle: var(--shadow-subtle);--shadow-subtle2: var(--shadow-subtle2);--shadow-3xl: 0px 12px 24px 0px #4750760A;--color-background: var(--background);--color-foreground: var(--foreground);--color-accent: var(--accent);--color-accent-foreground: var(--accent-foreground);--color-popover: var(--popover);--color-popover-foreground: var(--popover-foreground);--color-border: var(--border);--color-input-bg: var(--input-bg);--color-input-foreground: var(--input-foreground);--color-label: var(--label);--color-card: var(--card);--color-ring: var(--ring);--color-placeholder: var(--placeholder);--color-caption: var(--caption);--color-disabled: var(--disabled);--color-caption-error: var(--accent-foreground);--color-menu-bg: var(--menu-bg);--color-tooltip-bg: var(--tooltip-bg);--color-error-6: #F43F5E;--color-primary-10: #011947;--color-primary-20: #002C72;--color-primary-30: #1D438F;--color-primary-40: #395BA9;--color-primary-60: #6E8EDF;--color-primary-80: #B1C5FF;--color-primary-95: #EEF0FF;--color-primary-100: #304499;--color-secondary-5: #FFC87F}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-6{bottom:calc(var(--spacing) * 6)}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%;@media(width>=40rem){max-width:40rem}@media(width>=48rem){max-width:48rem}@media(width>=64rem){max-width:64rem}@media(width>=80rem){max-width:80rem}@media(width>=96rem){max-width:96rem}}.m-0{margin:calc(var(--spacing) * 0)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.aspect-\\[3\\/4\\]{aspect-ratio:3/4}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-30{width:calc(var(--spacing) * 30);height:calc(var(--spacing) * 30)}.size-44{width:calc(var(--spacing) * 44);height:calc(var(--spacing) * 44)}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-12{height:calc(var(--spacing) * 12)}.h-\\[80\\%\\]{height:80%}.h-\\[90\\%\\]{height:90%}.h-\\[400px\\]{height:400px}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing) * 60)}.min-h-screen{min-height:100vh}.w-4{width:calc(var(--spacing) * 4)}.w-12{width:calc(var(--spacing) * 12)}.w-\\[35\\%\\]{width:35%}.w-\\[80\\%\\]{width:80%}.w-full{width:100%}.max-w-\\[55\\%\\]{max-width:55%}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[500px\\]{max-width:500px}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-180{rotate:180deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.space-y-1{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-2{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-3{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-4{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-5{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-6{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:calc(infinity * 1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style: dashed;border-style:dashed}.border-\\[\\#CBD5E1\\]{border-color:#cbd5e1}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.bg-\\[\\#262A2F\\]{background-color:#262a2f}.bg-\\[\\#F8F8F8\\]{background-color:#f8f8f8}.bg-\\[rgba\\(0\\,0\\,0\\,0\\.6\\)\\]{background-color:#0009}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-secondary-5{background-color:var(--color-secondary-5)}.bg-white{background-color:var(--color-white)}.stroke-\\[\\#62DF98\\]{stroke:#62df98}.stroke-error-6\\/60{stroke:color-mix(in srgb,#F43F5E 60%,transparent);@supports (color: color-mix(in lab,red,red)){stroke:color-mix(in oklab,var(--color-error-6) 60%,transparent)}}.stroke-white\\/50{stroke:color-mix(in srgb,#FFFFFF 50%,transparent);@supports (color: color-mix(in lab,red,red)){stroke:color-mix(in oklab,var(--color-white) 50%,transparent)}}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-24\\!{padding-block:calc(var(--spacing) * 24)!important}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.font-\\[monospace\\]{font-family:monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading, var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading, var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading, var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.text-\\[14px\\]{font-size:14px}.font-bold{--tw-font-weight: var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight: var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight: var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-all{word-break:break-all}.text-error-6{color:var(--color-error-6)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.shadow-lg{--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.duration-200{--tw-duration: .2s;transition-duration:.2s}.duration-300{--tw-duration: .3s;transition-duration:.3s}.duration-500{--tw-duration: .5s;transition-duration:.5s}.ease-in-out{--tw-ease: var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease: var(--ease-out);transition-timing-function:var(--ease-out)}.hover\\:rounded-3xl{&:hover{@media(hover:hover){border-radius:var(--radius-3xl)}}}.hover\\:border-gray-100{&:hover{@media(hover:hover){border-color:var(--color-gray-100)}}}.hover\\:border-gray-400{&:hover{@media(hover:hover){border-color:var(--color-gray-400)}}}.hover\\:\\!bg-transparent{&:hover{@media(hover:hover){background-color:transparent!important}}}.focus\\:border-\\[\\#E8EAF6\\]{&:focus{border-color:#e8eaf6}}.focus\\:border-\\[\\#E8F5E9\\]{&:focus{border-color:#e8f5e9}}.focus\\:border-\\[\\#FFF8E1\\]{&:focus{border-color:#fff8e1}}.focus\\:ring-2{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-\\[\\#E8EAF6\\]{&:focus{--tw-ring-color: #E8EAF6}}.focus\\:ring-\\[\\#E8F5E9\\]{&:focus{--tw-ring-color: #E8F5E9}}.focus\\:ring-\\[\\#FFF8E1\\]{&:focus{--tw-ring-color: #FFF8E1}}.focus\\:outline-none{&:focus{--tw-outline-style: none;outline-style:none}}.disabled\\:opacity-50{&:disabled{opacity:50%}}.max-\\[450px\\]\\:\\!w-\\[calc\\(100vw_-_2rem\\)\\]{@media(width<450px){width:calc(100vw - 2rem)!important}}.max-sm\\:w-\\[80vw\\]{@media(width<40rem){width:80vw}}.sm\\:px-\\[6\\%\\]{@media(width>=40rem){padding-inline:6%}}.md\\:right-8{@media(width>=48rem){right:calc(var(--spacing) * 8)}}.md\\:bottom-6{@media(width>=48rem){bottom:calc(var(--spacing) * 6)}}.md\\:flex{@media(width>=48rem){display:flex}}.md\\:justify-between{@media(width>=48rem){justify-content:space-between}}.md\\:justify-start{@media(width>=48rem){justify-content:flex-start}}.md\\:bg-transparent\\!{@media(width>=48rem){background-color:transparent!important}}.md\\:px-10{@media(width>=48rem){padding-inline:calc(var(--spacing) * 10)}}.md\\:text-xl{@media(width>=48rem){font-size:var(--text-xl);line-height:var(--tw-leading, var(--text-xl--line-height))}}.\\[\\&_li\\]\\:hover\\:bg-transparent\\!{& li{&:hover{@media(hover:hover){background-color:transparent!important}}}}}@font-face{font-family:Lexend;src:url(./assets/fonts/Lexend-Regular.ttf)}@font-face{font-family:LexendMedium;src:url(./assets/fonts/Lexend-Medium.ttf)}@font-face{font-family:LexendSemibold;src:url(./assets/fonts/Lexend-SemiBold.ttf)}@font-face{font-family:LexendBold;src:url(./assets/fonts/Lexend-Bold.ttf)}:root{font-family:Lexend,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--background: #f8fafc;--foreground: #334155;--primary: #202d66;--primary-foreground: #ffffff;--input-bg: #ffffff;--input-foreground: #475569;--label: #475569;--placeholder: #94a3b8;--caption: #64748b;--caption-error: #f43f5e;--disabled: #f1f5f9;--card: #ffffff;--card-foreground: oklch(.985 0 0);--popover: #ffffff;--popover-foreground: #475569;--menu-bg: #f1f5f9;--accent: #e9eeff;--accent-foreground: #4d61b0;--secondary: #1e293b;--secondary-foreground: 0 0% 100%;--muted: #64748b;--muted-foreground: #94a3b8;--border: #e2e8f0;--ring: #4d61b0;--destructive: #f43f5e;--destructive-foreground: #cc135f;--tooltip-bg: #212529;--shadow-boxy: 0px 1px 2px 0px #0a0d120d;--shadow-subtle: 0px 11.76px 22.06px 0px #00000014;--shadow-subtle2: 0px 4px 8px 0px #9898980a;--shadow-2xl: 0px 24px 48px -12px #0a0d122e;--chart-1: oklch(.646 .222 41.116);--chart-2: oklch(.6 .118 184.704);--chart-3: oklch(.398 .07 227.392);--chart-4: oklch(.828 .189 84.429);--chart-5: oklch(.769 .188 70.08)}@layer utilities{.bg-background{background-color:var(--color-background)}.bg-foreground{background-color:var(--color-foreground)}.bg-accent{background-color:var(--color-accent)}.bg-accent-foreground{background-color:var(--color-accent-foreground)}.bg-popover{background-color:var(--color-popover)}.bg-popover-foreground{background-color:var(--color-popover-foreground)}.bg-border{background-color:var(--color-border)}.bg-input-bg{background-color:var(--color-input-bg)}.bg-input-foreground{background-color:var(--color-input-foreground)}.bg-label{background-color:var(--color-label)}.bg-card{background-color:var(--color-card)}.bg-ring{background-color:var(--color-ring)}.bg-placeholder{background-color:var(--color-placeholder)}.bg-caption{background-color:var(--color-caption)}.bg-disabled{background-color:var(--color-disabled)}.bg-caption-error{background-color:var(--color-caption-error)}.bg-menu-bg{background-color:var(--color-menu-bg)}.bg-tooltip-bg{background-color:var(--color-tooltip-bg)}.text-background{color:var(--color-background)}.text-foreground{color:var(--color-foreground)}.text-accent{color:var(--color-accent)}.text-accent-foreground{color:var(--color-accent-foreground)}.text-popover{color:var(--color-popover)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-border{color:var(--color-border)}.text-input-bg{color:var(--color-input-bg)}.text-input-foreground{color:var(--color-input-foreground)}.text-label{color:var(--color-label)}.text-card{color:var(--color-card)}.text-ring{color:var(--color-ring)}.text-placeholder{color:var(--color-placeholder)}.text-caption{color:var(--color-caption)}.text-disabled{color:var(--color-disabled)}.text-caption-error{color:var(--color-caption-error)}.text-menu-bg{color:var(--color-menu-bg)}.text-tooltip-bg{color:var(--color-tooltip-bg)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.bg-primary-10{background-color:var(--color-primary-10)}.bg-primary-20{background-color:var(--color-primary-20)}.bg-primary-30{background-color:var(--color-primary-30)}.bg-primary-40{background-color:var(--color-primary-40)}.bg-primary-60{background-color:var(--color-primary-60)}.bg-primary-80{background-color:var(--color-primary-80)}.bg-primary-95{background-color:var(--color-primary-95)}.bg-primary-100{background-color:var(--color-primary-100)}.text-primary-10{color:var(--color-primary-10)}.text-primary-20{color:var(--color-primary-20)}.text-primary-30{color:var(--color-primary-30)}.text-primary-40{color:var(--color-primary-40)}.text-primary-60{color:var(--color-primary-60)}.text-primary-80{color:var(--color-primary-80)}.text-primary-95{color:var(--color-primary-95)}.text-primary-100{color:var(--color-primary-100)}.shadow-boxy{box-shadow:var(--shadow-boxy)}.shadow-subtle{box-shadow:var(--shadow-subtle)}.shadow-subtle2{box-shadow:var(--shadow-subtle2)}.shadow-2xl{box-shadow:var(--shadow-2xl)}.shadow-3xl{box-shadow:var(--shadow-3xl)}.font-semibold{font-family:LexendSemibold}.font-bold{font-family:LexendBold}.font-medium{font-family:LexendMedium}}.sc-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:999999}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}@property --tw-space-y-reverse{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@property --tw-duration{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse: 0;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-duration: initial;--tw-ease: initial}}}
|
|
2
|
-
`);import Zt from"react";import{useState as q,useEffect as Yt,useMemo as De}from"react";import{jsx as xt}from"react/jsx-runtime";function ie({selectedTheme:t}){return xt("div",{className:"mx-auto animate-spin rounded-full h-12 w-12 border-b-2 ",style:{borderColor:t.primaryColor}})}import{twMerge as kt}from"tailwind-merge";import Ft from"clsx";import{FaceLandmarker as Et,FilesetResolver as Tt}from"@mediapipe/tasks-vision";var Ue={default:{primaryColor:"#4d61b0",secondaryColor:"#E8EAF6",buttonText:"#FFFFFF",borderRadius:"4px",focus:"focus:outline-none focus:ring-2 focus:ring-[#E8EAF6] focus:border-[#E8EAF6]"},sunset_gold:{primaryColor:"#FFD700",secondaryColor:"#FFF8E1",buttonText:"#5D4037",borderRadius:"8px",focus:"focus:outline-none focus:ring-2 focus:ring-[#FFF8E1] focus:border-[#FFF8E1]"},midnight_blue:{primaryColor:"#1A237E",secondaryColor:"#E8EAF6",buttonText:"#FFFFFF",borderRadius:"4px",focus:"focus:outline-none focus:ring-2 focus:ring-[#E8EAF6] focus:border-[#E8EAF6]"},forest_emerald:{primaryColor:"#2E7D32",secondaryColor:"#E8F5E9",buttonText:"#FFFFFF",borderRadius:"12px",focus:"focus:outline-none focus:ring-2 focus:ring-[#E8F5E9] focus:border-[#E8F5E9]"}},He=t=>Ue[t]||Ue.default;function x(...t){return kt(Ft(t))}var Ae=t=>t.map(e=>({label:e,value:e}));var je=async t=>{let e=await Tt.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm"),r=await Et.createFromOptions(e,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},runningMode:"IMAGE"}),o=new Image,s=URL.createObjectURL(t);o.src=s,await o.decode(),URL.revokeObjectURL(s);let n=r.detect(o);if(n.faceLandmarks&&n.faceLandmarks.length>0){let a=n.faceLandmarks[0],i=document.createElement("canvas"),l=i.getContext("2d"),k=a.map(m=>m.x*o.width),v=a.map(m=>m.y*o.height),E=Math.min(...k),u=Math.max(...k),T=Math.min(...v),w=Math.max(...v),c=u-E,y=w-T,F=c*.5;return i.width=224,i.height=224,l?.drawImage(o,E-F,T-F,c+F*2,y+F*2,0,0,224,224),r.close(),new Promise(m=>i.toBlob(m,"image/jpeg",.95))}return r.close(),null};function se(t,e,r){return new File([t],e,{type:r||t.type,lastModified:Date.now()})}var ze={data_verification:{key:"data_verification",title:"Data verification",subtitle:"Businesses that store, process, or transmit credit or debit card information maintain a secure environment.",preview:"Verify your identity with personal data"},document_verification:{key:"document_verification",title:"Document verification",subtitle:"Businesses that store, process, or transmit credit or debit card information maintain a secure environment.",preview:"Verify your identity with ID documents"}},ve={global:{passport:{title:"Passport",key:"passport"}},kenya:{},nigeria:{bvn:{title:"Bank Verification Number (BVN)",key:"bvn"},nin:{title:"National Identity Number (NIN)",key:"nin"},passport:{title:"Nigeria Passport",key:"passport"}}};var Be=`
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
flex justify-between items-center
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`,children:u.label},u.value))})]})}import P from"react-hot-toast";var Qe="./trash-KETR47RP.svg";import{jsx as h,jsxs as U}from"react/jsx-runtime";var Ve=200;function xe({config:t,selectedTheme:e,onSubmit:r,handleIdUpdate:o,idFile:s}){let n=Nt(null),[a,i]=Ct({identifier:"",identifier_type:"",country:""}),l=ce(()=>Object.keys(t.channels||{}),[t.channels]),k=ce(()=>{let c={};return(t?.channels?.[a.country]||[])?.forEach(F=>{let m=ve?.[a?.country]?.[F]||null;m&&(c[F]=m)}),c},[t.channels,a.country]),v=ce(()=>ve?.[a.country||""]?.[a?.identifier_type||""]||null,[a?.identifier_type]),E=ce(()=>Object.entries(k).map(c=>{let[y,F]=c;return{label:F.title,value:y}}),[k]),u=(c,y)=>{i(F=>({...F,[c]:y}))},T=()=>{n.current&&(n.current.value="",n.current.files=null),o(void 0,void 0)},w=async c=>{let y=c.target.files?.[0];if(!y)return;if(!["image/jpeg","image/png"].includes(y.type)){P.error("Only JPG and PNG files are allowed."),c.target.value="";return}if(y?.size>1024*Ve){P.error(`Max file size is ${Ve}kb`);return}T(),P.loading("Scanning document for photo...");try{let m=await je(y);if(!m){P.dismiss(),P.error("Could not find a clear face on this ID. Please upload a clearer image.");return}let C=new FileReader;C.onload=function(){let j=C.result},C.readAsDataURL(m);let I=`snapshot-${new Date().getTime()}.jpg`,H=new File([m],I,{type:"image/jpeg"});P.dismiss(),P.success("ID Photo extracted!"),o(y,H)}catch{P.dismiss(),P.error("Error processing document. Please upload a document with your face on it")}};return U("section",{className:"space-y-6",children:[U("section",{className:"space-y-2",children:[h("h3",{className:"text-left text-2xl font-semibold text-gray-600",children:"Verify your identity"}),h("p",{className:"text-left text-sm text-gray-500",children:"Identity verification. Please note that you need to be on a well-connected network to complete this verification."})]}),U("div",{className:"mx-auto space-y-5",children:[U("div",{children:[h("label",{className:"block text-sm font-medium text-gray-700 mb-1 text-left",children:"Country"}),h(le,{options:Ae(l),onChange:c=>u("country",c),value:a.country,selectedTheme:e,placeholder:"Select country"})]}),U("div",{children:[h("label",{className:"block text-sm font-medium text-gray-700 mb-1 text-left",children:"Verification Channel"}),h(le,{options:E,onChange:c=>u("identifier_type",c),value:a.identifier_type,selectedTheme:e,placeholder:"Select verification channel"})]}),a.identifier_type?U("div",{children:[h("label",{className:"block text-sm font-medium text-gray-700 mb-1 text-left",children:v?.title||"Input"}),h("input",{ref:n,type:"text",placeholder:"Enter "+a.identifier_type,value:a.identifier,onChange:c=>u("identifier",c.target.value),className:x(Be,e.focus)})]}):null,a?.identifier_type&&t?.verification_type?.includes("document_verification")?U("div",{children:[h("label",{className:"block text-sm font-medium text-gray-700 mb-1 text-left",children:"Upload identity document"}),U("div",{className:"flex w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-xl border-4 border-dashed border-[#CBD5E1] bg-[#F8F8F8] px-4 py-6",children:[h("input",{type:"file",name:"id-doc",id:"id-doc",hidden:!0,onChange:w},s?s.name:"empty"),h("label",{htmlFor:"id-doc",className:"text-center text-sm text-gray-600",children:"Click to upload"}),h("p",{className:"text-center text-sm font-normal text-gray-400",children:"Accepted file types: JPG, PNG"})]}),h("p",{className:"text-sm text-gray-600 font-semibold",children:"Max file size: 200KB"}),s&&h("aside",{className:"mt-3",children:h("ul",{children:U("li",{className:"m-0 mb-1 flex justify-between gap-3 p-2 hover:rounded-3xl hover:border-1.5 hover:border-gray-100 hover:!bg-transparent",children:[h("div",{className:"flex flex-1 gap-3",children:h("div",{className:"flex flex-1 flex-col",children:h("p",{className:"break-all text-left text-[14px] font-normal text-gray-600",children:s?.name})})}),h("div",{className:"flex shrink-0 gap-2",children:h("button",{onClick:T,className:"text-lg font-semibold",children:h("img",{src:Qe,className:"size-5 mx-auto shrink-0",alt:"delete"})})})]})})})]}):null]}),h("button",{onClick:()=>r(a.identifier,a.identifier_type,a.country),className:x("text-md h-12 w-full rounded-xl text-center font-semibold disabled:opacity-50"),disabled:!a?.country||!a?.identifier||!a?.identifier_type||!s&&t.verification_type.includes("document_verification"),style:{background:e.primaryColor,color:e.buttonText},children:"Continue"}),h("div",{className:"w-full h-12"})]})}import{jsx as X,jsxs as de}from"react/jsx-runtime";function ke({selectedTheme:t,onStart:e}){return de("section",{className:"mt-8 space-y-6",children:[de("section",{className:"space-y-2",children:[X("h3",{className:"text-left text-2xl font-semibold text-gray-600",children:"Liveliness Check"}),de("p",{className:"text-left text-sm text-gray-500",children:["Make sure you are in a well lit area, hold your phone at eye level and look straight into the camera."," "]})]}),de("ul",{className:"mx-auto max-w-[80%] list-disc text-sm text-gray-600 [&_li]:hover:bg-transparent!",children:[X("li",{children:"Stay in a well lit area with your eyes clearly visible. "}),X("li",{children:"Remove anything covering your face like masks, glasses, hats."}),X("li",{children:"Follow the onscreen instruction for face capture."})]}),X("button",{onClick:e,className:x("text-md h-12 w-full rounded-xl text-center font-semibold "),style:{background:t.primaryColor,color:t.buttonText},children:"Take a selfie"})]})}import ge,{Toaster as at}from"react-hot-toast";import{useEffect as ue,useRef as N,useState as R}from"react";import{FaceLandmarker as At,FilesetResolver as jt}from"@mediapipe/tasks-vision";var Dt=[362,385,387,263,373,380],Rt=[33,160,158,133,153,144],Ye=t=>{let e=s=>{let n=s.map(k=>t[k]),a=Math.hypot(n[1].x-n[5].x,n[1].y-n[5].y),i=Math.hypot(n[2].x-n[4].x,n[2].y-n[4].y),l=Math.hypot(n[0].x-n[3].x,n[0].y-n[3].y);return(a+i)/(2*l)},r=e(Dt),o=e(Rt);return(r+o)/2<.18},Fe=t=>{let e=t[1].x,r=t[234].x,s=t[454].x-r,n=(e-r)/s;return n<.35?"LEFT":n>.65?"RIGHT":"CENTER"},It=13,_t=14,Lt=78,Mt=308,We=t=>{let e=t[It],r=t[_t],o=t[Lt],s=t[Mt],n=Math.hypot(e.x-r.x,e.y-r.y),a=Math.hypot(o.x-s.x,o.y-s.y);return n/a>.35};var Xe="http://localhost:8000";var $=class{constructor(e,r){D(this,"baseUrl");D(this,"timeout");D(this,"session");D(this,"onError");D(this,"destroy");this.baseUrl=Xe,this.timeout=e.timeout||45e3,this.session=e.session,this.onError=e.onError,this.destroy=r}async request(e,r,o,s){let n=new AbortController,a=setTimeout(()=>n.abort(),this.timeout);try{let i=o instanceof FormData,l=await fetch(`${this.baseUrl}${r}`,{method:e,headers:{Authorization:`Session ${this.session}`,...s||{},...i?{}:{"Content-Type":"application/json"}},body:o?i?o:JSON.stringify(o):void 0,signal:n.signal});if(!(l.headers.get("content-type")||"").includes("application/json"))throw new Error(`Unexpected response from ${r} (${l.status})`);let v;try{v=await l.json()}catch{v=null}if(!l.ok){let E=v?.message||v?.error||`Error: ${l.status}`;throw{status:l.status,message:E,data:v}}return v}catch(i){throw i.name==="AbortError"?this.onError?.({error:i,message:"Request timeout",code:"TIMEOUT_ERROR"}):i.status==403||i.status==401?(this.onError?.({error:i,message:"Session expired. Please restart the process",code:"AUTH_ERROR"}),console.error("Authentication failed. Session is no longer valid."),setTimeout(()=>{typeof this.destroy=="function"&&this.destroy()},2e3)):this.onError?.({error:i||i.data,message:"An error occured",code:"UNKNOWN_ERROR"}),i}finally{clearTimeout(a)}}post(e,r,o){return this.request("POST",e,r,o)}patch(e,r,o){return this.request("PATCH",e,r,o)}get(e){return this.request("GET",e)}};import me from"react-hot-toast";import{useEffect as Pt,useState as Ut}from"react";import{jsx as pe,jsxs as Ee}from"react/jsx-runtime";function Te({onComplete:t,canClose:e}){let[r,o]=Ut(0);return Pt(()=>{let s;return r<99?s=setInterval(()=>{o(n=>{let a=Math.floor(Math.random()*10)+1,i=n+a;return i>=99?99:i})},500):r===99&&e&&(o(100),t&&t()),()=>clearInterval(s)},[r,e,t]),Ee("div",{className:"mt-8 space-y-4",children:[Ee("section",{className:"space-y-1",children:[pe("h3",{className:"text-center animate-pulse text-2xl font-semibold text-gray-600",children:"Finalizing Verification..."}),pe("p",{className:"text-center text-sm text-gray-600",children:"Please do not close this page"})]}),pe("div",{className:"w-full max-w-[55%] mx-auto bg-gray-100 rounded-full h-2",children:pe("div",{className:"bg-secondary-5 h-2 rounded-full transition-all duration-300 ease-out",style:{width:`${r}%`}})}),Ee("p",{className:"text-center text-sm text-gray-600",children:[r,"%"]})]})}var Ze="./loading-5HD36QXU.svg";import{Fragment as Bt,jsx as _,jsxs as fe}from"react/jsx-runtime";var A=[{id:"CENTER",label:"Center your face in the oval",subtitle:"Position your face inside of the circle and take a photo."},{id:"BLINK",label:"Blink your eyes",subtitle:"While your face is centered, blink your eyes twice."},{id:"TURN_HEAD",label:"Turn your head",subtitle:"Slowly turn your head left or right"},{id:"OPEN_MOUTH",label:"Open your mouth",subtitle:"Open your mouth"}],zt=({sdkInstance:t,updateStep:e,config:r,idFile:o,snapshotFile:s,identityFormData:n})=>{let a=N(null),i=N(null),l=N(0),k=N(0),v=N(null),E=N(null),u=N(null),T=N(!1),w=N(null),c=N(!1),[y,F]=R(0),[m,C]=R(!1),[I,H]=R(!1),[j,z]=R(),[J,Re]=R(null),[he,Ie]=R(),[st,ee]=R(!1),[lt,te]=R(!1),[ct,dt]=R(!1),[B,pt]=R(!1),[G,re]=R("neutral"),[ut,_e]=R(!1),Q=N(!1),M=N(null),oe=N([]),Le=()=>{E.current&&cancelAnimationFrame(E.current),v.current&&(v.current.getTracks().forEach(d=>d.stop()),v.current=null),a.current&&(a.current.srcObject=null)},ae=()=>{Q.current||l.current>=A.length||(Q.current=!0,re("success"),u.current&&clearTimeout(u.current),setTimeout(()=>{if(l.current<A.length-1){let d=l.current+1;F(d),re("neutral"),Q.current=!1}else console.log("\u{1F38A} All actions done!"),mt()},2e3))},mt=async()=>{te(!0),Le();let d;he||(d=await Me()),await ht(d)},ft=()=>{Re(null),z(void 0),H(!1),C(!1),ee(!1),_e(!1),F(0),Ie(void 0)},gt=()=>new Promise(d=>{if(!a.current)return null;let S=document.createElement("canvas");S.width=a.current.videoWidth,S.height=a.current.videoHeight,S.getContext("2d")?.drawImage(a.current,0,0),S.toBlob(p=>{d(p)},"image/jpeg",.9)}),ht=async d=>{let S=d||he;if(!w.current?.id||!S){me.error("Invalid payload"),ft(),te(!1);return}let f=new $(t);try{te(!0);let p=new FormData;p.append("entry",w.current.id.toString()),p.append("session",t.session),p.append("video_file",S),(await f.post("/v1/liveness/submit/",p)).status=="success"&&dt(!0)}catch(p){let g=p?.message||p.response?.data?.message||"Submission failed";me.error(g),t.onError?.({error:p,message:g,code:"SUBMISSION_ERROR"}),setTimeout(()=>{window.location.reload()},3e3)}};ue(()=>{if(!(!B||y>=A.length))return re("neutral"),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{re("error")},5e3),()=>{u.current&&clearTimeout(u.current)}},[y,B]),ue(()=>{l.current=y},[y]),ue(()=>{if(J||!j||st||T.current||!n)return;let d=new $(t);(async()=>{T.current=!0;try{let f=new FormData;f.append("sdk_config",r.id.toString()),f.append("autoshot_file",j),f.append("challenge_actions",JSON.stringify(A.filter(g=>g.id!=="CENTER").map(g=>g.id))),f.append("identifier",n.identifier),f.append("identifier_type",n.identifier_type),f.append("country",n?.country),r.verification_type.includes("document_verification")&&(f.append("id_file",o),f.append("snapshot_file",s)),ee(!0);let p=await d.post("/v1/liveness/create/",f);p.status=="success"&&p.data&&setTimeout(()=>{Re(p.data),w.current=p.data,ee(!1)},1500)}catch(f){let p=f?.message||f.response?.data?.message||"An error occured. Please try again";me.error(p),t.onError?.({error:f,message:p,code:"ENTRY_CREATION_ERROR"}),ee(!1),setTimeout(()=>{window.location.reload()},3e3)}})()},[J,j]),ue(()=>{if(ut)return;_e(!0);let d,S,f=async()=>{let g=await jt.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm");d=await At.createFromOptions(g,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},runningMode:"VIDEO",numFaces:1}),d&&!B&&pt(!0),S=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user",width:{ideal:480},height:{ideal:640},frameRate:{ideal:15}}}),a.current&&(a.current.srcObject=S,a.current.onloadedmetadata=()=>{a.current?.play(),p()})},p=async()=>{if(!a.current||!d||G==="success"||Q.current){E.current=requestAnimationFrame(p);return}let g=performance.now(),O=d.detectForVideo(a.current,g);if(O.faceLandmarks&&O.faceLandmarks.length>0){let V=O.faceLandmarks[0],ne=A[l.current];if(l.current==A.length)return;if(ne.id==="CENTER"){let Y=V[1];if(Y.x>.4&&Y.x<.6&&Y.y>.4&&Y.y<.6){if(!c.current){c.current=!0;let Pe=await gt();if(Pe){let vt=se(Pe,`autoshot-${t.session}.jpg`,"image/jpeg");z(vt),H(!0)}else c.current=!1}c.current&&w.current&&!Q.current&&(M.current?.state!=="recording"&&yt(S),ae())}}else ne.id==="BLINK"?Ye(V)?ae():k.current=0:ne.id==="TURN_HEAD"?(Fe(V)==="LEFT"||Fe(V)==="RIGHT")&&ae():ne.id==="OPEN_MOUTH"&&We(V)&&ae()}E.current=requestAnimationFrame(p)};return f(),()=>{Le(),i.current&&clearTimeout(i.current),M.current?.state!=="inactive"&&M.current?.stop()}},[]);let yt=d=>{oe.current=[];let f=["video/webm;codecs=vp8","video/webm","video/mp4"].find(g=>MediaRecorder.isTypeSupported(g));if(!f){me.error("Browser does not support recording");return}let p={mimeType:f,videoBitsPerSecond:25e4};try{M.current=new MediaRecorder(d,p)}catch{M.current=new MediaRecorder(d)}M.current.ondataavailable=g=>{g.data&&g.data.size>0&&oe.current.push(g.data)},M.current.onstop=()=>{let g=new Blob(oe.current,{type:"video/webm"});if(g.size>0){let O=se(g,`session-${t.session}.webm`,"video/webm");Ie(O)}},M.current.start(),i.current=setTimeout(()=>{Me()},2e4)},Me=async()=>{let d=M.current;return!d||d.state==="inactive"?he||void 0:new Promise(S=>{i.current&&(clearTimeout(i.current),i.current=null);let f=()=>{d.removeEventListener("stop",f);let p=new Blob(oe.current,{type:"video/webm"}),g=se(p,`session-${t.session}.webm`,"video/webm");v.current&&v.current.getTracks().forEach(O=>O.stop()),S(g)};d.addEventListener("stop",f),d.stop()})};return _(Bt,{children:lt?_(Te,{canClose:ct,onComplete:()=>{t.onSuccess?.({data:{entryId:w.current?.id,identifier:w.current?.identifier,identifier_type:w.current?.identifier_type,video_url:w.current?.video_url,autoshot_url:w.current?.autoshot_url,document_url:w.current?.document_url||null},status:200,message:"Liveness captured successfully"}),e("success-confirmation"),te(!1)}}):fe("section",{className:"space-y-3 relative flex flex-col items-start justify-center p-4 h-[400px]",children:[fe("div",{className:"text-left",children:[_("h3",{className:"text-2xl font-bold text-gray-600 animate-pulse",children:B?y===0&&!J&&I?"Synchronizing Session...":A[y]?.label:"Getting ready..."}),B&&J?_("p",{className:"text-sm text-gray-500",children:A[y]?.subtitle}):null]}),fe("div",{className:x("relative w-full max-w-md aspect-[3/4] overflow-hidden rounded-3xl",B?"bg-[rgba(0,0,0,0.6)]":"bg-[#262A2F]"),children:[_("video",{ref:a,className:"absolute inset-0 w-full h-full object-cover mirror",muted:!0,playsInline:!0}),B?_("div",{className:"absolute inset-0 pointer-events-none flex items-center justify-center",children:_("svg",{viewBox:"0 0 100 100",className:"w-[80%] h-[80%] overflow-visible",children:_("ellipse",{cx:"50",cy:"50",rx:"35",ry:"45",fill:"none",strokeWidth:"3",className:x("transition-colors duration-500 ease-in-out",G==="neutral"&&"stroke-white/50",G==="success"&&"stroke-[#62DF98]",G==="error"&&"stroke-error-6/60"),style:{filter:G!=="neutral"?`drop-shadow(0 0 8px ${G==="success"?"#22c55e":"#ef4444"})`:"none"}})})}):fe("div",{className:"absolute w-full h-full gap-1.5 pointer-events-none flex flex-col items-center justify-center",children:[_("img",{src:Ze,alt:"loading",className:"size-9 animate-spin"}),_("span",{className:"text-white text-sm text-center",children:"Loading camera"})]})]})]})})},Je=zt;var et="./success-GHUHNWON.svg";import{useEffect as Kt}from"react";import{jsx as Se,jsxs as $t}from"react/jsx-runtime";function Ne({redirect_url:t,destroy:e}){return Kt(()=>{let r=setTimeout(()=>{t?window.location.assign(t):e()},3e3);return()=>clearTimeout(r)},[]),$t("section",{className:"mt-8 space-y-3",children:[Se("img",{src:et,className:"size-44 mx-auto shrink-0",alt:"success-icon"}),Se("h3",{className:"text-center text-2xl font-semibold text-gray-600",children:"Identity verified"}),Se("p",{className:"text-center text-sm text-gray-600",children:"We have successfully verified your identity. You can close this page now."})]})}var tt="./shield-checkmark-JBZCUXJC.png";import{useEffect as rt,useState as ot}from"react";import qt from"react-hot-toast";import{jsxs as Vt}from"react/jsx-runtime";var Qt=180;function Ce({destroy:t,onExpire:e}){let[r,o]=ot(Qt),[s,n]=ot(!1);rt(()=>{let l=setInterval(()=>{o(k=>k>0?k-1:0)},1e3);return()=>clearInterval(l)},[]),rt(()=>{if(r>0&&!s)return;qt.error("Time limit exceeded"),n(!1);let l=setTimeout(()=>{e?.(),t()},1500);return()=>clearTimeout(l)},[r,s]);let a=Math.floor(r/60),i=r%60;return Vt("p",{className:x("text-2xl font-bold font-[monospace]",r<60?"text-error-6":"text-gray-600"),children:[a,":",i.toString().padStart(2,"0")]})}import{jsx as b,jsxs as L}from"react/jsx-runtime";var Wt=({sdkInstance:t})=>{let[e,r]=q("loading"),[o,s]=q(null),[n,a]=q(),[i,l]=q(),[k,v]=q(),[E,u]=q(!1),T=De(()=>t.getConfig(),[t]),w=De(()=>He(o?.theme),[o?.theme]),c=De(()=>({identity:1,"liveness-intro":2,"liveness-check":3})[e]||0,[e]),y=async(m,C,I)=>{if(!n&&o?.verification_type?.includes("document_verification")){ge.error("Please upload ID");return}let H={session_id:T.session,onboarding_type:C,id_number:m,name_to_confirm:"",[C]:m};v({identifier:m,identifier_type:C,country:I});try{let z=await t.getHttp().post("/v1/onboarding/verify",H);z.status==="verified"&&(ge.success(z.message||"Verification successful"),r("liveness-intro"))}catch(j){let z=j?.message||"An error occured. Please try again";ge.error(z)}},F=async(m,C)=>{a(m),l(C)};return Yt(()=>{let m=t.getHttp();(async()=>{try{r("loading");let I=await m.get("/v1/sdk/initialize/");I.status=="success"&&I.data&&setTimeout(()=>{s(I.data),r("welcome")},1500)}catch(I){let H=I?.message||"An error occured. Please try again";ge.error(H),r("")}})()},[]),o?L("main",{id:"smartcomply-sdk-root",className:"sc-overlay overflow-y-auto flex h-full min-h-screen bg-gray-50",children:[b("div",{id:"liveness-container",className:""}),b(at,{}),L("div",{className:"fixed bg-gray-50 top-0 flex w-full items-center justify-between px-4 py-4 md:px-10",children:[b("section",{className:"flex items-center gap-4",children:b("h2",{className:"text-center text-lg font-semibold text-gray-600 md:text-xl",children:o?.brand_name?o?.brand_name:"Brand name"})}),L("div",{className:"flex items-center justify-end gap-4",children:[E?b(Ce,{destroy:t.destroy,onExpire:T?.onExpire}):null,e==="welcome"||e==="loading"?null:b("p",{className:"relative text-center text-sm font-medium text-gray-400",children:c?`Step ${c} of 3`:"All Done"})]})]}),L("div",{className:"fixed z-1 bg-gray-50 md:bg-transparent! bottom-0 flex w-full items-center justify-center px-10 py-4 md:bottom-6 md:right-8 md:justify-between",children:[b("span",{className:"hidden md:flex"}),b("p",{className:"relative pt-2 text-center text-xs font-medium text-gray-400",children:"Powered by Adhere"})]}),b("div",{className:"flex flex-1 items-start justify-center px-4 py-24! sm:px-[6%] md:justify-start h-full",children:L("div",{className:x("w-full max-w-[500px] max-sm:w-[80vw] max-[450px]:!w-[calc(100vw_-_2rem)]",Oe.includes(e)?"mx-auto":""),children:[e==="loading"&&b(ie,{selectedTheme:w}),e==="welcome"&&b(we,{config:o,onNext:()=>{r("identity"),u(!0)},selectedTheme:w}),e==="identity"&&b(xe,{config:o,onSubmit:y,selectedTheme:w,handleIdUpdate:F,idFile:n}),e==="liveness-intro"&&b(ke,{config:o,onStart:()=>r("liveness-check"),selectedTheme:w}),e==="liveness-check"&&b(Je,{config:o,updateStep:m=>r(m),sdkInstance:T,idFile:n,snapshotFile:i,identityFormData:k}),e==="success-confirmation"&&b(Ne,{destroy:t.destroy,redirect_url:o.redirect_url})]})}),e==="loading"||e==="welcome"?L("div",{className:"relative hidden w-[35%] bg-gray-100 h-full md:flex",children:[L("section",{className:"mx-auto flex h-[90%] max-w-[90%] flex-col justify-center space-y-4",children:[b("img",{src:tt,className:"size-30 mx-auto shrink-0",alt:"shield-checkmark"}),L("section",{className:"space-y-2",children:[L("h3",{className:"text-center text-xl font-semibold text-gray-600",children:["Welcome to"," ",o?.brand_name?o?.brand_name:"Brand Name"]}),b("p",{className:"break-all text-center text-sm text-gray-500",children:o?.description?o?.description:"Description"})]})]})," ",b("div",{className:"absolute bottom-6 flex w-full items-center justify-center",children:b("p",{className:"relative pt-2 text-center text-xs font-medium text-gray-400",children:"Powered by Adhere"})})]}):null]}):L("main",{id:"smartcomply-sdk-root",className:"sc-overlay flex h-full min-h-screen bg-gray-50",children:[b(at,{}),e=="loading"?b(ie,{selectedTheme:w}):null]})},nt=Wt;import{jsx as it}from"react/jsx-runtime";var Z=class{constructor(e){D(this,"http");D(this,"config");D(this,"root",null);D(this,"containerId","smartcomply-sdk-root");D(this,"destroy",()=>{this.root&&(this.root.unmount(),this.root=null);let e=document.getElementById(this.containerId);e&&e.remove(),console.log("SDK Destroyed and cleaned up.")});this.config=e,this.http=new $(e,this.destroy.bind(this))}getConfig(){return this.config}getHttp(){return this.http}launch(){let e=document.getElementById(this.containerId);e||(e=document.createElement("div"),e.id=this.containerId,document.body.appendChild(e)),this.root=Xt(e),this.root.render(it(Zt.StrictMode,{children:it(nt,{sdkInstance:this})}))}};var Ho=Z;export{Z as SmartComply,Ho as default};
|
|
1
|
+
var t,e,r,n,o,s,i,a,c,l,u,d={},h=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function m(t,e){for(var r in e)t[r]=e[r];return t}function g(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function _(e,r,n){var o,s,i,a={};for(i in r)"key"==i?o=r[i]:"ref"==i?s=r[i]:a[i]=r[i];if(arguments.length>2&&(a.children=arguments.length>3?t.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return y(e,a,o,s,null)}function y(t,n,o,s,i){var a={type:t,props:n,key:o,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++r:i,__i:-1,__u:0};return null==i&&null!=e.vnode&&e.vnode(a),a}function v(t){return t.children}function b(t,e){this.props=t,this.context=e}function w(t,e){if(null==e)return t.__?w(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?w(t):null}function x(t){if(t.__P&&t.__d){var r=t.__v,n=r.__e,o=[],s=[],i=m({},r);i.__v=r.__v+1,e.vnode&&e.vnode(i),C(t.__P,i,r,t.__n,t.__P.namespaceURI,32&r.__u?[n]:null,o,null==n?w(r):n,!!(32&r.__u),s),i.__v=r.__v,i.__.__k[i.__i]=i,I(o,i,s),r.__e=r.__=null,i.__e!=n&&k(i)}}function k(t){if(null!=(t=t.__)&&null!=t.__c)return t.__e=t.__c.base=null,t.__k.some(function(e){if(null!=e&&null!=e.__e)return t.__e=t.__c.base=e.__e}),k(t)}function E(t){(!t.__d&&(t.__d=!0)&&n.push(t)&&!A.__r++||o!=e.debounceRendering)&&((o=e.debounceRendering)||s)(A)}function A(){for(var t,e=1;n.length;)n.length>e&&n.sort(i),t=n.shift(),e=n.length,x(t);A.__r=0}function S(t,e,r,n,o,s,i,a,c,l,u){var f,m,g,_,b,x,k,E=n&&n.__k||h,A=e.length;for(c=function(t,e,r,n,o){var s,i,a,c,l,u=r.length,d=u,h=0;for(t.__k=new Array(o),s=0;s<o;s++)null!=(i=e[s])&&"boolean"!=typeof i&&"function"!=typeof i?("string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?i=t.__k[s]=y(null,i,null,null,null):p(i)?i=t.__k[s]=y(v,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?i=t.__k[s]=y(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):t.__k[s]=i,c=s+h,i.__=t,i.__b=t.__b+1,a=null,-1!=(l=i.__i=L(i,r,c,d))&&(d--,(a=r[l])&&(a.__u|=2)),null==a||null==a.__v?(-1==l&&(o>u?h--:o<u&&h++),"function"!=typeof i.type&&(i.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,i.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<u;s++)null!=(a=r[s])&&!(2&a.__u)&&(a.__e==n&&(n=w(a)),D(a,a));return n}(r,e,E,c,A),f=0;f<A;f++)null!=(g=r.__k[f])&&(m=-1!=g.__i&&E[g.__i]||d,g.__i=f,x=C(t,g,m,o,s,i,a,c,l,u),_=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&j(m.ref,null,g),u.push(g.ref,g.__c||_,g)),null==b&&null!=_&&(b=_),(k=!!(4&g.__u))||m.__k===g.__k?c=T(g,c,t,k):"function"==typeof g.type&&void 0!==x?c=x:_&&(c=_.nextSibling),g.__u&=-7);return r.__e=b,c}function T(t,e,r,n){var o,s;if("function"==typeof t.type){for(o=t.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=t,e=T(o[s],e,r,n));return e}t.__e!=e&&(n&&(e&&t.type&&!e.parentNode&&(e=w(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function N(t,e){return e=e||[],null==t||"boolean"==typeof t||(p(t)?t.some(function(t){N(t,e)}):e.push(t)),e}function L(t,e,r,n){var o,s,i,a=t.key,c=t.type,l=e[r],u=null!=l&&!(2&l.__u);if(null===l&&null==a||u&&a==l.key&&c==l.type)return r;if(n>(u?1:0))for(o=r-1,s=r+1;o>=0||s<e.length;)if(null!=(l=e[i=o>=0?o--:s++])&&!(2&l.__u)&&a==l.key&&c==l.type)return i;return-1}function F(t,e,r){"-"==e[0]?t.setProperty(e,null==r?"":r):t[e]=null==r?"":"number"!=typeof r||f.test(e)?r:r+"px"}function P(t,e,r,n,o){var s,i;t:if("style"==e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||F(t.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||F(t.style,e,r[e])}else if("o"==e[0]&&"n"==e[1])s=e!=(e=e.replace(a,"$1")),i=e.toLowerCase(),e=i in t||"onFocusOut"==e||"onFocusIn"==e?i.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r.u=n.u:(r.u=c,t.addEventListener(e,s?u:l,s)):t.removeEventListener(e,s?u:l,s);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==r?"":r;break t}catch(d){}"function"==typeof r||(null==r||!1===r&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==r?"":r))}}function M(t){return function(r){if(this.l){var n=this.l[r.type+t];if(null==r.t)r.t=c++;else if(r.t<n.u)return;return n(e.event?e.event(r):r)}}}function C(r,n,o,s,i,a,c,l,u,f){var _,y,x,k,E,A,T,N,L,F,M,C,I,j,D,B=n.type;if(void 0!==n.constructor)return null;128&o.__u&&(u=!!(32&o.__u),a=[l=n.__e=o.__e]),(_=e.__b)&&_(n);t:if("function"==typeof B)try{if(N=n.props,L="prototype"in B&&B.prototype.render,F=(_=B.contextType)&&s[_.__c],M=_?F?F.props.value:_.__:s,o.__c?T=(y=n.__c=o.__c).__=y.__E:(L?n.__c=y=new B(N,M):(n.__c=y=new b(N,M),y.constructor=B,y.render=U),F&&F.sub(y),y.state||(y.state={}),y.__n=s,x=y.__d=!0,y.__h=[],y._sb=[]),L&&null==y.__s&&(y.__s=y.state),L&&null!=B.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=m({},y.__s)),m(y.__s,B.getDerivedStateFromProps(N,y.__s))),k=y.props,E=y.state,y.__v=n,x)L&&null==B.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),L&&null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(L&&null==B.getDerivedStateFromProps&&N!==k&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(N,M),n.__v==o.__v||!y.__e&&null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(N,y.__s,M)){n.__v!=o.__v&&(y.props=N,y.state=y.__s,y.__d=!1),n.__e=o.__e,n.__k=o.__k,n.__k.some(function(t){t&&(t.__=n)}),h.push.apply(y.__h,y._sb),y._sb=[],y.__h.length&&c.push(y);break t}null!=y.componentWillUpdate&&y.componentWillUpdate(N,y.__s,M),L&&null!=y.componentDidUpdate&&y.__h.push(function(){y.componentDidUpdate(k,E,A)})}if(y.context=M,y.props=N,y.__P=r,y.__e=!1,C=e.__r,I=0,L)y.state=y.__s,y.__d=!1,C&&C(n),_=y.render(y.props,y.state,y.context),h.push.apply(y.__h,y._sb),y._sb=[];else do{y.__d=!1,C&&C(n),_=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++I<25);y.state=y.__s,null!=y.getChildContext&&(s=m(m({},s),y.getChildContext())),L&&!x&&null!=y.getSnapshotBeforeUpdate&&(A=y.getSnapshotBeforeUpdate(k,E)),j=null!=_&&_.type===v&&null==_.key?R(_.props.children):_,l=S(r,p(j)?j:[j],n,o,s,i,a,c,l,u,f),y.base=n.__e,n.__u&=-161,y.__h.length&&c.push(y),T&&(y.__E=y.__=null)}catch(z){if(n.__v=null,u||null!=a)if(z.then){for(n.__u|=u?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,n.__e=l}else{for(D=a.length;D--;)g(a[D]);O(n)}else n.__e=o.__e,n.__k=o.__k,z.then||O(n);e.__e(z,n,o)}else null==a&&n.__v==o.__v?(n.__k=o.__k,n.__e=o.__e):l=n.__e=function(r,n,o,s,i,a,c,l,u){var h,f,m,_,y,v,b,x=o.props||d,k=n.props,E=n.type;if("svg"==E?i="http://www.w3.org/2000/svg":"math"==E?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=a)for(h=0;h<a.length;h++)if((y=a[h])&&"setAttribute"in y==!!E&&(E?y.localName==E:3==y.nodeType)){r=y,a[h]=null;break}if(null==r){if(null==E)return document.createTextNode(k);r=document.createElementNS(i,E,k.is&&k),l&&(e.__m&&e.__m(n,a),l=!1),a=null}if(null==E)x===k||l&&r.data==k||(r.data=k);else{if(a=a&&t.call(r.childNodes),!l&&null!=a)for(x={},h=0;h<r.attributes.length;h++)x[(y=r.attributes[h]).name]=y.value;for(h in x)y=x[h],"dangerouslySetInnerHTML"==h?m=y:"children"==h||h in k||"value"==h&&"defaultValue"in k||"checked"==h&&"defaultChecked"in k||P(r,h,null,y,i);for(h in k)y=k[h],"children"==h?_=y:"dangerouslySetInnerHTML"==h?f=y:"value"==h?v=y:"checked"==h?b=y:l&&"function"!=typeof y||x[h]===y||P(r,h,y,x[h],i);if(f)l||m&&(f.__html==m.__html||f.__html==r.innerHTML)||(r.innerHTML=f.__html),n.__k=[];else if(m&&(r.innerHTML=""),S("template"==n.type?r.content:r,p(_)?_:[_],n,o,s,"foreignObject"==E?"http://www.w3.org/1999/xhtml":i,a,c,a?a[0]:o.__k&&w(o,0),l,u),null!=a)for(h=a.length;h--;)g(a[h]);l||(h="value","progress"==E&&null==v?r.removeAttribute("value"):null!=v&&(v!==r[h]||"progress"==E&&!v||"option"==E&&v!=x[h])&&P(r,h,v,x[h],i),h="checked",null!=b&&b!=r[h]&&P(r,h,b,x[h],i))}return r}(o.__e,n,o,s,i,a,c,u,f);return(_=e.diffed)&&_(n),128&n.__u?void 0:l}function O(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(O))}function I(t,r,n){for(var o=0;o<n.length;o++)j(n[o],n[++o],n[++o]);e.__c&&e.__c(r,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(t){t.call(r)})}catch(n){e.__e(n,r.__v)}})}function R(t){return"object"!=typeof t||null==t||t.__b>0?t:p(t)?t.map(R):m({},t)}function j(t,r,n){try{if("function"==typeof t){var o="function"==typeof t.__u;o&&t.__u(),o&&null==r||(t.__u=t(r))}else t.current=r}catch(s){e.__e(s,n)}}function D(t,r,n){var o,s;if(e.unmount&&e.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||j(o,null,r)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){e.__e(i,r)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&D(o[s],r,n||"function"!=typeof t.type);n||g(t.__e),t.__c=t.__=t.__e=void 0}function U(t,e,r){return this.constructor(t,r)}function B(r,n,o){var s,i,a;n==document&&(n=document.documentElement),e.__&&e.__(r,n),s=!1?null:n.__k,i=[],a=[],C(n,r=n.__k=_(v,null,[r]),s||d,d,n.namespaceURI,s?null:n.firstChild?t.call(n.childNodes):null,i,s?s.__e:n.firstChild,false,a),I(i,r,a)}t=h.slice,e={__e:function(t,e,r,n){for(var o,s,i;e=e.__;)if((o=e.__c)&&!o.__)try{if((s=o.constructor)&&null!=s.getDerivedStateFromError&&(o.setState(s.getDerivedStateFromError(t)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,n||{}),i=o.__d),i)return o.__E=o}catch(a){t=a}throw t}},r=0,b.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),"function"==typeof t&&(t=t(m({},r),this.props)),t&&m(r,t),null!=t&&this.__v&&(e&&this._sb.push(e),E(this))},b.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},b.prototype.render=v,n=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,i=function(t,e){return t.__v.__b-e.__v.__b},A.__r=0,a=/(PointerCapture)$|Capture$/i,c=0,l=M(!1),u=M(!0);var z,G,V,H,W=0,K=[],$=e,q=$.__b,Y=$.__r,X=$.diffed,J=$.__c,Z=$.unmount,Q=$.__;function tt(t,e){$.__h&&$.__h(G,t,W||e),W=0;var r=G.__H||(G.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function et(t){return W=1,function(t,e,r){var n=tt(z++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):dt(void 0,e),function(t){var e=n.__N?n.__N[0]:n.__[0],r=n.t(e,t);e!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=G,!G.__f)){var o=function(t,e,r){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter(function(t){return t.__c});if(o.every(function(t){return!t.__N}))return!s||s.call(this,t,e,r);var i=n.__c.props!==t;return o.some(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(i=!0)}}),s&&s.call(this,t,e,r)||i};G.__f=!0;var s=G.shouldComponentUpdate,i=G.componentWillUpdate;G.componentWillUpdate=function(t,e,r){if(this.__e){var n=s;s=void 0,o(t,e,r),s=n}i&&i.call(this,t,e,r)},G.shouldComponentUpdate=o}return n.__N||n.__}(dt,t)}function rt(t,e){var r=tt(z++,3);!$.__s&&ut(r.__H,e)&&(r.__=t,r.u=e,G.__H.__h.push(r))}function nt(t){return W=5,ot(function(){return{current:t}},[])}function ot(t,e){var r=tt(z++,7);return ut(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function st(){for(var t;t=K.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(ct),e.__h.some(lt),e.__h=[]}catch(r){e.__h=[],$.__e(r,t.__v)}}}$.__b=function(t){G=null,q&&q(t)},$.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Q&&Q(t,e)},$.__r=function(t){Y&&Y(t),z=0;var e=(G=t.__c).__H;e&&(V===G?(e.__h=[],G.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(ct),e.__h.some(lt),e.__h=[],z=0)),V=G},$.diffed=function(t){X&&X(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==K.push(e)&&H===$.requestAnimationFrame||((H=$.requestAnimationFrame)||at)(st)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),V=G=null},$.__c=function(t,e){e.some(function(t){try{t.__h.some(ct),t.__h=t.__h.filter(function(t){return!t.__||lt(t)})}catch(r){e.some(function(t){t.__h&&(t.__h=[])}),e=[],$.__e(r,t.__v)}}),J&&J(t,e)},$.unmount=function(t){Z&&Z(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.some(function(t){try{ct(t)}catch(r){e=r}}),r.__H=void 0,e&&$.__e(e,r.__v))};var it="function"==typeof requestAnimationFrame;function at(t){var e,r=function(){clearTimeout(n),it&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);it&&(e=requestAnimationFrame(r))}function ct(t){var e=G,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),G=e}function lt(t){var e=G;t.__c=t.__(),G=e}function ut(t,e){return!t||t.length!==e.length||e.some(function(e,r){return e!==t[r]})}function dt(t,e){return"function"==typeof e?e(t):e}function ht(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function ft(t,e){this.props=t,this.context=e}(ft.prototype=new b).isPureReactComponent=!0,ft.prototype.shouldComponentUpdate=function(t,e){return ht(this.props,t)||ht(this.state,e)};var pt=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),pt&&pt(t)};var mt=e.__e;e.__e=function(t,e,r,n){if(t.then)for(var o,s=e;s=s.__;)if((o=s.__c)&&o.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),o.__c(t,e);mt(t,e,r,n)};var gt=e.unmount;function _t(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=function(t,e){for(var r in e)t[r]=e[r];return t}({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return _t(t,e,r)})),t}function yt(t,e,r){return t&&r&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return yt(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=r)),t}function vt(){this.__u=0,this.o=null,this.__b=null}function bt(t){if(!t.__)return null;var e=t.__.__c;return e&&e.__a&&e.__a(t)}function wt(){this.i=null,this.l=null}e.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),gt&>(t)},(vt.prototype=new b).__c=function(t,e){var r=e.__c,n=this;null==n.o&&(n.o=[]),n.o.push(r);var o=bt(n.__v),s=!1,i=function(){s||n.__z||(s=!0,r.__R=null,o?o(c):c())};r.__R=i;var a=r.__P;r.__P=null;var c=function(){if(! --n.__u){if(n.state.__a){var t=n.state.__a;n.__v.__k[0]=yt(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__a:n.__b=null});e=n.o.pop();)e.__P=a,e.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(i,i)},vt.prototype.componentWillUnmount=function(){this.o=[]},vt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=_t(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__a&&_(v,null,t.fallback);return o&&(o.__u&=-33),[_(v,null,e.__a?null:t.children),o]};var xt=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.i=r=r[2]}};(wt.prototype=new b).__a=function(t){var e=this,r=bt(e.__v),n=e.l.get(t);return n[0]++,function(o){var s=function(){e.props.revealOrder?(n.push(o),xt(e,t,n)):o()};r?r(s):s()}},wt.prototype.render=function(t){this.i=null,this.l=/* @__PURE__ */new Map;var e=N(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},wt.prototype.componentDidUpdate=wt.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,r){xt(t,r,e)})};var kt="undefined"!=typeof Symbol&&Symbol.for&&/* @__PURE__ */Symbol.for("react.element")||60103,Et=/^(?: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]/,At=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,St=/[A-Z0-9]/g,Tt="undefined"!=typeof document,Nt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof/* @__PURE__ */Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};b.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(b.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Lt=e.event;function Ft(){}function Pt(){return this.cancelBubble}function Mt(){return this.defaultPrevented}e.event=function(t){return Lt&&(t=Lt(t)),t.persist=Ft,t.isPropagationStopped=Pt,t.isDefaultPrevented=Mt,t.nativeEvent=t};var Ct={enumerable:!1,configurable:!0,get:function(){return this.class}},Ot=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,r=t.type,n={},o=-1===r.indexOf("-");for(var s in e){var i=e[s];if(!("value"===s&&"defaultValue"in e&&null==i||Tt&&"children"===s&&"noscript"===r||"class"===s||"className"===s)){var a=s.toLowerCase();"defaultValue"===s&&"value"in e&&null==e.value?s="value":"download"===s&&!0===i?i="":"translate"===a&&"no"===i?i=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?s="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||Nt(e.type)?"onfocus"===a?s="onfocusin":"onblur"===a?s="onfocusout":At.test(s)&&(s=a):a=s="oninput":o&&Et.test(s)?s=s.replace(St,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===a&&n[s=a]&&(s="oninputCapture"),n[s]=i}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=N(e.children).forEach(function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)})),"select"==r&&null!=n.defaultValue&&(n.value=N(e.children).forEach(function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value})),e.class&&!e.className?(n.class=e.class,Object.defineProperty(n,"className",Ct)):e.className&&(n.class=n.className=e.className),t.props=n}(t),t.$$typeof=kt,Ot&&Ot(t)};var It=e.__r;e.__r=function(t){It&&It(t),t.__c};var Rt=e.diffed;e.diffed=function(t){Rt&&Rt(t);var e=t.props,r=t.__e;null!=r&&"textarea"===t.type&&"value"in e&&e.value!==r.value&&(r.value=null==e.value?"":e.value)};var jt={StrictMode:v},Dt=0;function Ut(t,r,n,o,s,i){r||(r={});var a,c,l=r;if("ref"in l)for(c in l={},r)"ref"==c?a=r[c]:l[c]=r[c];var u={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Dt,__i:-1,__u:0,__source:s,__self:i};if("function"==typeof t&&(a=t.defaultProps))for(c in a)void 0===l[c]&&(l[c]=a[c]);return e.vnode&&e.vnode(u),u}function Bt(t){return{render:function(e){var r,n,o;r=e,null==(n=t).__k&&(n.textContent=""),B(r,n),"function"==typeof o&&o(),r&&r.__c},unmount:function(){var e;(e=t).__k&&B(null,e)}}}function zt({selectedTheme:t}){/* @__PURE__ */
|
|
2
|
+
return Ut("div",{className:"sc:mx-auto sc:animate-spin sc:rounded-full sc:h-12 sc:w-12 sc:border-b-2 ",style:{borderColor:t.primaryColor}})}const Gt=(t=/* @__PURE__ */new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),Vt="-",Ht=[],Wt=t=>{const e=qt(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:t=>{if(t.startsWith("[")&&t.endsWith("]"))return $t(t);const r=t.split(Vt),n=""===r[0]&&r.length>1?1:0;return Kt(r,n,e)},getConflictingClassGroupIds:(t,e)=>{if(e){const e=n[t],o=r[t];return e?o?((t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r})(o,e):e:o||Ht}return r[t]||Ht}}},Kt=(t,e,r)=>{if(0===t.length-e)return r.classGroupId;const n=t[e],o=r.nextPart.get(n);if(o){const r=Kt(t,e+1,o);if(r)return r}const s=r.validators;if(null===s)return;const i=0===e?t.join(Vt):t.slice(e).join(Vt),a=s.length;for(let c=0;c<a;c++){const t=s[c];if(t.validator(i))return t.classGroupId}},$t=t=>-1===t.slice(1,-1).indexOf(":")?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?"arbitrary.."+n:void 0})(),qt=t=>{const{theme:e,classGroups:r}=t;return Yt(r,e)},Yt=(t,e)=>{const r=Gt();for(const n in t){const o=t[n];Xt(o,r,n,e)}return r},Xt=(t,e,r,n)=>{const o=t.length;for(let s=0;s<o;s++){const o=t[s];Jt(o,e,r,n)}},Jt=(t,e,r,n)=>{"string"!=typeof t?"function"!=typeof t?te(t,e,r,n):Qt(t,e,r,n):Zt(t,e,r)},Zt=(t,e,r)=>{(""===t?e:ee(e,t)).classGroupId=r},Qt=(t,e,r,n)=>{re(t)?Xt(t(n),e,r,n):(null===e.validators&&(e.validators=[]),e.validators.push(((t,e)=>({classGroupId:t,validator:e}))(r,t)))},te=(t,e,r,n)=>{const o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[t,s]=o[i];Xt(s,ee(e,t),r,n)}},ee=(t,e)=>{let r=t;const n=e.split(Vt),o=n.length;for(let s=0;s<o;s++){const t=n[s];let e=r.nextPart.get(t);e||(e=Gt(),r.nextPart.set(t,e)),r=e}return r},re=t=>"isThemeGetter"in t&&!0===t.isThemeGetter,ne=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=/* @__PURE__ */Object.create(null),n=/* @__PURE__ */Object.create(null);const o=(o,s)=>{r[o]=s,e++,e>t&&(e=0,n=r,r=/* @__PURE__ */Object.create(null))};return{get(t){let e=r[t];return void 0!==e?e:void 0!==(e=n[t])?(o(t,e),e):void 0},set(t,e){t in r?r[t]=e:o(t,e)}}},oe=[],se=(t,e,r,n,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),ie=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=t=>{const e=[];let r,n=0,o=0,s=0;const i=t.length;for(let u=0;u<i;u++){const i=t[u];if(0===n&&0===o){if(":"===i){e.push(t.slice(s,u)),s=u+1;continue}if("/"===i){r=u;continue}}"["===i?n++:"]"===i?n--:"("===i?o++:")"===i&&o--}const a=0===e.length?t:t.slice(s);let c=a,l=!1;a.endsWith("!")?(c=a.slice(0,-1),l=!0):a.startsWith("!")&&(c=a.slice(1),l=!0);return se(e,l,c,r&&r>s?r-s:void 0)};if(e){const t=e+":",r=n;n=e=>e.startsWith(t)?r(e.slice(t.length)):se(oe,!1,e,void 0,!0)}if(r){const t=n;n=e=>r({className:e,parseClassName:t})}return n},ae=t=>{const e=/* @__PURE__ */new Map;return t.orderSensitiveModifiers.forEach((t,r)=>{e.set(t,1e6+r)}),t=>{const r=[];let n=[];for(let o=0;o<t.length;o++){const s=t[o],i="["===s[0],a=e.has(s);i||a?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(s)):n.push(s)}return n.length>0&&(n.sort(),r.push(...n)),r}},ce=/\s+/,le=t=>{if("string"==typeof t)return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=le(t[n]))&&(r&&(r+=" "),r+=e);return r},ue=[],de=t=>{const e=e=>e[t]||ue;return e.isThemeGetter=!0,e},he=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+\/\d+$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ge=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,be=t=>pe.test(t),we=t=>!!t&&!Number.isNaN(Number(t)),xe=t=>!!t&&Number.isInteger(Number(t)),ke=t=>t.endsWith("%")&&we(t.slice(0,-1)),Ee=t=>me.test(t),Ae=()=>!0,Se=t=>ge.test(t)&&!_e.test(t),Te=()=>!1,Ne=t=>ye.test(t),Le=t=>ve.test(t),Fe=t=>!Me(t)&&!De(t),Pe=t=>We(t,Ye,Te),Me=t=>he.test(t),Ce=t=>We(t,Xe,Se),Oe=t=>We(t,Je,we),Ie=t=>We(t,$e,Te),Re=t=>We(t,qe,Le),je=t=>We(t,Qe,Ne),De=t=>fe.test(t),Ue=t=>Ke(t,Xe),Be=t=>Ke(t,Ze),ze=t=>Ke(t,$e),Ge=t=>Ke(t,Ye),Ve=t=>Ke(t,qe),He=t=>Ke(t,Qe,!0),We=(t,e,r)=>{const n=he.exec(t);return!!n&&(n[1]?e(n[1]):r(n[2]))},Ke=(t,e,r=!1)=>{const n=fe.exec(t);return!!n&&(n[1]?e(n[1]):r)},$e=t=>"position"===t||"percentage"===t,qe=t=>"image"===t||"url"===t,Ye=t=>"length"===t||"size"===t||"bg-size"===t,Xe=t=>"length"===t,Je=t=>"number"===t,Ze=t=>"family-name"===t,Qe=t=>"shadow"===t,tr=/* @__PURE__ */((t,...e)=>{let r,n,o,s;const i=t=>{const e=n(t);if(e)return e;const s=((t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=e,i=[],a=t.trim().split(ce);let c="";for(let l=a.length-1;l>=0;l-=1){const t=a[l],{isExternal:e,modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=r(t);if(e){c=t+(c.length>0?" "+c:c);continue}let p=!!f,m=n(p?h.substring(0,f):h);if(!m){if(!p){c=t+(c.length>0?" "+c:c);continue}if(m=n(h),!m){c=t+(c.length>0?" "+c:c);continue}p=!1}const g=0===u.length?"":1===u.length?u[0]:s(u).join(":"),_=d?g+"!":g,y=_+m;if(i.indexOf(y)>-1)continue;i.push(y);const v=o(m,p);for(let r=0;r<v.length;++r){const t=v[r];i.push(_+t)}c=t+(c.length>0?" "+c:c)}return c})(t,r);return o(t,s),s};return s=a=>{const c=e.reduce((t,e)=>e(t),t());return r=(t=>({cache:ne(t.cacheSize),parseClassName:ie(t),sortModifiers:ae(t),...Wt(t)}))(c),n=r.cache.get,o=r.cache.set,s=i,i(a)},(...t)=>s(((...t)=>{let e,r,n=0,o="";for(;n<t.length;)(e=t[n++])&&(r=le(e))&&(o&&(o+=" "),o+=r);return o})(...t))})(()=>{const t=de("color"),e=de("font"),r=de("text"),n=de("font-weight"),o=de("tracking"),s=de("leading"),i=de("breakpoint"),a=de("container"),c=de("spacing"),l=de("radius"),u=de("shadow"),d=de("inset-shadow"),h=de("text-shadow"),f=de("drop-shadow"),p=de("blur"),m=de("perspective"),g=de("aspect"),_=de("ease"),y=de("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",De,Me],b=()=>[De,Me,c],w=()=>[be,"full","auto",...b()],x=()=>[xe,"none","subgrid",De,Me],k=()=>["auto",{span:["full",xe,De,Me]},xe,De,Me],E=()=>[xe,"auto",De,Me],A=()=>["auto","min","max","fr",De,Me],S=()=>["auto",...b()],T=()=>[be,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],N=()=>[t,De,Me],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ze,Ie,{position:[De,Me]}],F=()=>["auto","cover","contain",Ge,Pe,{size:[De,Me]}],P=()=>[ke,Ue,Ce],M=()=>["","none","full",l,De,Me],C=()=>["",we,Ue,Ce],O=()=>[we,ke,ze,Ie],I=()=>["","none",p,De,Me],R=()=>["none",we,De,Me],j=()=>["none",we,De,Me],D=()=>[we,De,Me],U=()=>[be,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ee],breakpoint:[Ee],color:[Ae],container:[Ee],"drop-shadow":[Ee],ease:["in","out","in-out"],font:[Fe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ee],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ee],shadow:[Ee],spacing:["px",we],text:[Ee],"text-shadow":[Ee],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",be,Me,De,g]}],container:["container"],columns:[{columns:[we,Me,De,a]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[xe,"auto",De,Me]}],basis:[{basis:[be,"full","auto",a,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,be,"auto","initial","none",Me]}],grow:[{grow:["",we,De,Me]}],shrink:[{shrink:["",we,De,Me]}],order:[{order:[xe,"first","last","none",De,Me]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],w:[{w:[a,"screen",...T()]}],"min-w":[{"min-w":[a,"screen","none",...T()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh",...T()]}],"font-size":[{text:["base",r,Ue,Ce]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,De,Oe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ke,Me]}],"font-family":[{font:[Be,Me,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,De,Me]}],"line-clamp":[{"line-clamp":[we,"none",De,Oe]}],leading:[{leading:[s,...b()]}],"list-image":[{"list-image":["none",De,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[we,"from-font","auto",De,Ce]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[we,"auto",De,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xe,De,Me],radial:["",De,Me],conic:[xe,De,Me]},Ve,Re]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:C()}],"border-w-x":[{"border-x":C()}],"border-w-y":[{"border-y":C()}],"border-w-s":[{"border-s":C()}],"border-w-e":[{"border-e":C()}],"border-w-t":[{"border-t":C()}],"border-w-r":[{"border-r":C()}],"border-w-b":[{"border-b":C()}],"border-w-l":[{"border-l":C()}],"divide-x":[{"divide-x":C()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":C()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[we,De,Me]}],"outline-w":[{outline:["",we,Ue,Ce]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",u,He,je]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,He,je]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[we,Ce]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":C()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",h,He,je]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[we,De,Me]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[De,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Me]}],filter:[{filter:["","none",De,Me]}],blur:[{blur:I()}],brightness:[{brightness:[we,De,Me]}],contrast:[{contrast:[we,De,Me]}],"drop-shadow":[{"drop-shadow":["","none",f,He,je]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",we,De,Me]}],"hue-rotate":[{"hue-rotate":[we,De,Me]}],invert:[{invert:["",we,De,Me]}],saturate:[{saturate:[we,De,Me]}],sepia:[{sepia:["",we,De,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Me]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[we,De,Me]}],"backdrop-contrast":[{"backdrop-contrast":[we,De,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",we,De,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,De,Me]}],"backdrop-invert":[{"backdrop-invert":["",we,De,Me]}],"backdrop-opacity":[{"backdrop-opacity":[we,De,Me]}],"backdrop-saturate":[{"backdrop-saturate":[we,De,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",we,De,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[we,"initial",De,Me]}],ease:[{ease:["linear","initial",_,De,Me]}],delay:[{delay:[we,De,Me]}],animate:[{animate:["none",y,De,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,De,Me]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:R()}],"rotate-x":[{"rotate-x":R()}],"rotate-y":[{"rotate-y":R()}],"rotate-z":[{"rotate-z":R()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[De,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Me]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[we,Ue,Ce,Oe]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function er(t){var e,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=er(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}var rr="undefined"!=typeof self?self:{};function nr(t,e){t:{for(var r=["CLOSURE_FLAGS"],n=rr,o=0;o<r.length;o++)if(null==(n=n[r[o]])){r=null;break t}r=n}return null!=(t=r&&r[t])?t:e}function or(){throw Error("Invalid UTF8")}function sr(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let ir,ar;const cr="undefined"!=typeof TextDecoder;let lr;const ur="undefined"!=typeof TextEncoder;function dr(t){if(ur)t=(lr||=new TextEncoder).encode(t);else{let r=0;const n=new Uint8Array(3*t.length);for(let o=0;o<t.length;o++){var e=t.charCodeAt(o);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&o<t.length){const s=t.charCodeAt(++o);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}o--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}function hr(t){rr.setTimeout(()=>{throw t},0)}var fr,pr=nr(610401301,!1),mr=nr(748402147,!0),gr=nr(824648567,!0),_r=nr(824656860,nr(1,!0));function yr(){var t=rr.navigator;return t&&(t=t.userAgent)?t:""}const vr=rr.navigator;function br(t){return br[" "](t),t}fr=vr&&vr.userAgentData||null,br[" "]=function(){};const wr={};let xr=null;function kr(){if(!xr){xr={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){const n=t.concat(e[r].split(""));wr[r]=n;for(let t=0;t<n.length;t++){const e=n[t];void 0===xr[e]&&(xr[e]=t)}}}}var Er="undefined"!=typeof Uint8Array,Ar=!!(pr&&fr&&fr.brands.length>0||-1==yr().indexOf("Trident")&&-1==yr().indexOf("MSIE"))&&"function"==typeof btoa;const Sr=/[-_.]/g,Tr={"-":"+",_:"/",".":"="};function Nr(t){return Tr[t]||""}function Lr(t){if(!Ar)return function(t){const e=t.length;let r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);const n=new Uint8Array(r);let o=0;return function(t,e){function r(e){for(;n<t.length;){const e=t.charAt(n++),r=xr[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}kr();let n=0;for(;;){const t=r(-1),n=r(0),o=r(64),s=r(64);if(64===s&&-1===t)break;e(t<<2|n>>4),64!=o&&(e(n<<4&240|o>>2),64!=s&&e(o<<6&192|s))}}(t,function(t){n[o++]=t}),o!==r?n.subarray(0,o):n}(t);t=Sr.test(t)?t.replace(Sr,Nr):t,t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function Fr(t){return Er&&null!=t&&t instanceof Uint8Array}var Pr={};function Mr(){return Ir||=new Or(null,Pr)}function Cr(t){jr(Pr);var e=t.g;return null==(e=null==e||Fr(e)?e:"string"==typeof e?Lr(e):null)?e:t.g=e}var Or=class{h(){return new Uint8Array(Cr(this)||0)}constructor(t,e){if(jr(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let Ir,Rr;function jr(t){if(t!==Pr)throw Error("illegal external caller")}function Dr(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function Ur(t){return Dr(t=Error(t),"warning"),t}function Br(t,e){if(null!=t){var r=Rr??={},n=r[t]||0;n>=e||(r[t]=n+1,Dr(t=Error(),"incident"),hr(t))}}function zr(){return"function"==typeof BigInt}var Gr="function"==typeof Symbol&&"symbol"==typeof/* @__PURE__ */Symbol();function Vr(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof/* @__PURE__ */Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):/* @__PURE__ */Symbol():e}var Hr=Vr("jas",void 0,!0),Wr=Vr(void 0,"0di"),Kr=Vr(void 0,"1oa"),$r=Vr(void 0,/* @__PURE__ */Symbol()),qr=Vr(void 0,"0ub"),Yr=Vr(void 0,"0ubs"),Xr=Vr(void 0,"0ubsb"),Jr=Vr(void 0,"0actk"),Zr=Vr("m_m","Pa",!0),Qr=Vr();const tn={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},en=Object.defineProperties,rn=Gr?Hr:"Ga";var nn;const on=[];function sn(t,e){Gr||rn in t||en(t,tn),t[rn]|=e}function an(t,e){Gr||rn in t||en(t,tn),t[rn]=e}function cn(t){return sn(t,34),t}function ln(t){return sn(t,8192),t}an(on,7),nn=Object.freeze(on);var un={};function dn(t,e){return void 0===e?t.h!==hn&&!!(2&t.v[rn]):!!(2&e)&&t.h!==hn}const hn={};function fn(t,e){if(null!=t)if("string"==typeof t)t=t?new Or(t,Pr):Mr();else if(t.constructor!==Or)if(Fr(t))t=t.length?new Or(new Uint8Array(t),Pr):Mr();else{if(!e)throw Error();t=void 0}return t}class pn{constructor(t,e,r){this.g=t,this.h=e,this.l=r}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var mn=Object.freeze({});function gn(t,e,r){const n=128&e?0:-1,o=t.length;var s;(s=!!o)&&(s=null!=(s=t[o-1])&&"object"==typeof s&&s.constructor===Object);const i=o+(s?-1:0);for(e=128&e?1:0;e<i;e++)r(e-n,t[e]);if(s){t=t[o-1];for(const e in t)!isNaN(e)&&r(+e,t[e])}}var _n={};function yn(t){return 128&t?_n:void 0}function vn(t){return t.Na=!0,t}var bn=vn(t=>"number"==typeof t),wn=vn(t=>"string"==typeof t),xn=vn(t=>"boolean"==typeof t),kn="function"==typeof rr.BigInt&&"bigint"==typeof rr.BigInt(0);function En(t){var e=t;if(wn(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(bn(e)&&!Number.isSafeInteger(e))throw Error(String(e));return kn?BigInt(t):t=xn(t)?t?"1":"0":wn(t)?t.trim()||"0":String(t)}var An=vn(t=>kn?t>=Tn&&t<=Ln:"-"===t[0]?Fn(t,Sn):Fn(t,Nn));const Sn=Number.MIN_SAFE_INTEGER.toString(),Tn=kn?BigInt(Number.MIN_SAFE_INTEGER):void 0,Nn=Number.MAX_SAFE_INTEGER.toString(),Ln=kn?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Fn(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){const n=t[r],o=e[r];if(n>o)return!1;if(n<o)return!0}}const Pn="function"==typeof Uint8Array.prototype.slice;let Mn,Cn=0,On=0;function In(t){const e=t>>>0;Cn=e,On=(t-e)/4294967296>>>0}function Rn(t){if(t<0){In(-t);const[e,r]=Kn(Cn,On);Cn=e>>>0,On=r>>>0}else In(t)}function jn(t){const e=Mn||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),On=0,Cn=e.getUint32(0,!0)}function Dn(t,e){const r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Gn(t,e)}function Un(t,e){return En(zr()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Gn(t,e))}function Bn(t,e){const r=2147483648&e;return r&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=Dn(t,e))?r?-t:t:r?"-"+t:t}function zn(t,e){return zr()?En(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):En(Hn(t,e))}function Gn(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else zr()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+Vn(r)+Vn(t));return r}function Vn(t){return t=String(t),"0000000".slice(t.length)+t}function Hn(t,e){if(2147483648&e)if(zr())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[r,n]=Kn(t,e);t="-"+Gn(r,n)}else t=Gn(t,e);return t}function Wn(t){if(t.length<16)Rn(Number(t));else if(zr())t=BigInt(t),Cn=Number(t&BigInt(4294967295))>>>0,On=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);On=Cn=0;const r=t.length;for(let n=e,o=(r-e)%6+e;o<=r;n=o,o+=6){const e=Number(t.slice(n,o));On*=1e6,Cn=1e6*Cn+e,Cn>=4294967296&&(On+=Math.trunc(Cn/4294967296),On>>>=0,Cn>>>=0)}if(e){const[t,e]=Kn(Cn,On);Cn=t,On=e}}}function Kn(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function $n(t){return Array.prototype.slice.call(t)}const qn="function"==typeof BigInt?BigInt.asIntN:void 0,Yn="function"==typeof BigInt?BigInt.asUintN:void 0,Xn=Number.isSafeInteger,Jn=Number.isFinite,Zn=Math.trunc,Qn=En(0);function to(t){if(null!=t&&"number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function eo(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function ro(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}function no(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const oo=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function so(t){switch(typeof t){case"bigint":return!0;case"number":return Jn(t);case"string":return oo.test(t);default:return!1}}function io(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Jn(t)?0|t:void 0}function ao(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Jn(t)?t>>>0:void 0}function co(t){const e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(Wn(t),Hn(Cn,On))}function lo(t){return t=Zn(t),Xn(t)||(Rn(t),t=Bn(Cn,On)),t}function uo(t){var e=Zn(Number(t));return Xn(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),co(t))}function ho(t){var e=Zn(Number(t));return Xn(e)?En(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),zr()?En(qn(64,BigInt(t))):En(co(t)))}function fo(t){return Xn(t)?t=En(lo(t)):(t=Zn(t),Xn(t)?t=String(t):(Rn(t),t=Hn(Cn,On)),t=En(t)),t}function po(t){const e=typeof t;return null==t?t:"bigint"===e?En(qn(64,t)):so(t)?"string"===e?ho(t):fo(t):void 0}function mo(t){if("string"!=typeof t)throw Error();return t}function go(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function _o(t){return null==t||"string"==typeof t?t:void 0}function yo(t,e,r,n){return null!=t&&t[Zr]===un?t:Array.isArray(t)?((n=(r=0|t[rn])|32&n|2&n)!==r&&an(t,n),new e(t)):(r?2&n?((t=e[Wr])||(cn((t=new e).v),t=e[Wr]=t),e=t):e=new e:e=void 0,e)}function vo(t,e,r){if(e)t:{if(!so(e=t))throw Ur("int64");switch(typeof e){case"string":e=ho(e);break t;case"bigint":e=En(qn(64,e));break t;default:e=fo(e)}}else e=po(t);return null==(t=e)?r?Qn:void 0:t}const bo={};let wo=function(){try{return br(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class xo{constructor(){this.g=/* @__PURE__ */new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const ko=wo?(Object.setPrototypeOf(xo.prototype,Map.prototype),Object.defineProperties(xo.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),xo):class extends Map{constructor(){super()}};function Eo(t){return t}function Ao(t){if(2&t.J)throw Error("Cannot mutate an immutable Map")}var So=class extends ko{constructor(t,e,r=Eo,n=Eo){super(),this.J=0|t[rn],this.K=e,this.S=r,this.fa=this.K?To:n;for(let o=0;o<t.length;o++){const s=t[o],i=r(s[0],!1,!0);let a=s[1];e?void 0===a&&(a=null):a=n(s[1],!1,!0,void 0,void 0,this.J),super.set(i,a)}}V(t){return ln(Array.from(super.entries(),t))}clear(){Ao(this),super.clear()}delete(t){return Ao(this),super.delete(this.S(t,!0,!1))}entries(){if(this.K){var t=super.keys();t=new pn(t,No,this)}else t=super.entries();return t}values(){if(this.K){var t=super.keys();t=new pn(t,So.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.K?super.forEach((r,n,o)=>{t.call(e,o.get(n),n,o)}):super.forEach(t,e)}set(t,e){return Ao(this),null==(t=this.S(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.fa(e,!0,!0,this.K,!1,this.J))}Ma(t){const e=this.S(t[0],!1,!0);t=t[1],t=this.K?void 0===t?null:t:this.fa(t,!1,!0,void 0,!1,this.J),super.set(e,t)}has(t){return super.has(this.S(t,!1,!1))}get(t){t=this.S(t,!1,!1);const e=super.get(t);if(void 0!==e){var r=this.K;return r?((r=this.fa(e,!1,!0,r,this.ra,this.J))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function To(t,e,r,n,o,s){return t=yo(t,n,r,s),o&&(t=Yo(t)),t}function No(t){return[t,this.get(t)]}let Lo;function Fo(){return Lo||=new So(cn([]),void 0,void 0,void 0,bo)}function Po(t){return $r?t[$r]:void 0}function Mo(t,e){for(const r in t)!isNaN(r)&&e(t,+r,t[r])}So.prototype.toJSON=void 0;var Co=class{};const Oo={Ka:!0};function Io(t,e){e<100||Br(Yr,1)}function Ro(t,e,r,n){const o=void 0!==n;n=!!n;var s,i=$r;!o&&Gr&&i&&(s=t[i])&&Mo(s,Io),i=[];var a=t.length;let c;s=4294967295;let l=!1;const u=!!(64&e),d=u?128&e?0:-1:void 0;1&e||(c=a&&t[a-1],null!=c&&"object"==typeof c&&c.constructor===Object?s=--a:c=void 0,!u||128&e||o||(l=!0,s=s-d+d)),e=void 0;for(var h=0;h<a;h++){let o=t[h];if(null!=o&&null!=(o=r(o,n)))if(u&&h>=s){const t=h-d;(e??={})[t]=o}else i[h]=o}if(c)for(let f in c){if(null==(a=c[f])||null==(a=r(a,n)))continue;let t;h=+f,u&&!Number.isNaN(h)&&(t=h+d)<s?i[t]=a:(e??={})[f]=a}return e&&(l?i.push(e):i[s]=e),o&&$r&&(t=Po(t))&&t instanceof Co&&(i[$r]=function(t){const e=new Co;return Mo(t,(t,r,n)=>{e[r]=$n(n)}),e.da=t.da,e}(t)),i}function jo(t){return t[0]=Do(t[0]),t[1]=Do(t[1]),t}function Do(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return An(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[rn];return 0===t.length&&1&e?void 0:Ro(t,e,Do)}if(null!=t&&t[Zr]===un)return Uo(t);if(t instanceof Or){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(Ar){for(var r="",n=0,o=e.length-10240;n<o;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),kr(),r=wr[r],n=Array(Math.floor(e.length/3)),o=r[64]||"";let t=0,l=0;for(;t<e.length-2;t+=3){var s=e[t],i=e[t+1],a=e[t+2],c=r[s>>2];s=r[(3&s)<<4|i>>4],i=r[(15&i)<<2|a>>6],a=r[63&a],n[l++]=c+s+i+a}switch(c=0,a=o,e.length-t){case 2:a=r[(15&(c=e[t+1]))<<2]||o;case 1:e=e[t],n[l]=r[e>>2]+r[(3&e)<<4|c>>4]+a+o}e=n.join("")}t=t.g=e}return t}return t instanceof So?t=0!==t.size?t.V(jo):void 0:void 0}return t}function Uo(t){return Ro(t=t.v,0|t[rn],Do)}let Bo,zo;function Go(t,e){return Vo(t,e[0],e[1])}function Vo(t,e,r,n=0){if(null==t){var o=32;r?(t=[r],o|=128):t=[],e&&(o=-16760833&o|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(o=0|t[rn],mr&&1&o)throw Error("rfarr");if(2048&o&&!(2&o)&&function(){if(mr)throw Error("carr");Br(Jr,5)}(),256&o)throw Error("farr");if(64&o)return(o|n)!==o&&an(t,o|n),t;if(r&&(o|=128,r!==t[0]))throw Error("mid");t:{o|=64;var s=(r=t).length;if(s){var i=s-1;const t=r[i];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((i-=e=128&o?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<i&&(r[s+e]=t[a],delete t[a]);o=-16760833&o|(1023&i)<<14;break t}}if(e){if((a=Math.max(e,s-(128&o?0:-1)))>1024)throw Error("spvt");o=-16760833&o|(1023&a)<<14}}}return an(t,64|o|n),t}function Ho(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[rn];return 0===t.length&&1&r?void 0:Wo(t,r,e)}if(null!=t&&t[Zr]===un)return $o(t);if(t instanceof So){if(2&(e=t.J))return t;if(!t.size)return;if(r=cn(t.V()),t.K)for(t=0;t<r.length;t++){const n=r[t];let o=n[1];o=null==o||"object"!=typeof o?void 0:null!=o&&o[Zr]===un?$o(o):Array.isArray(o)?Wo(o,0|o[rn],!!(32&e)):void 0,n[1]=o}return r}return t instanceof Or?t:void 0}function Wo(t,e,r){return 2&e||(!r||4096&e||16&e?t=qo(t,e,!1,r&&!(16&e)):(sn(t,34),4&e&&Object.freeze(t))),t}function Ko(t,e,r){return t=new t.constructor(e),r&&(t.h=hn),t.m=hn,t}function $o(t){const e=t.v,r=0|e[rn];return dn(t,r)?t:Qo(t,e,r)?Ko(t,e):qo(e,r)}function qo(t,e,r,n){return n??=!!(34&e),t=Ro(t,e,Ho,n),n=32,r&&(n|=2),an(t,e=16769217&e|n),t}function Yo(t){const e=t.v,r=0|e[rn];return dn(t,r)?Qo(t,e,r)?Ko(t,e,!0):new t.constructor(qo(e,r,!1)):t}function Xo(t){if(t.h!==hn)return!1;var e=t.v;return sn(e=qo(e,0|e[rn]),2048),t.v=e,t.h=void 0,t.m=void 0,!0}function Jo(t){if(!Xo(t)&&dn(t,0|t.v[rn]))throw Error()}function Zo(t,e){void 0===e&&(e=0|t[rn]),32&e&&!(4096&e)&&an(t,4096|e)}function Qo(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(an(e,2|r),t.h=hn,!0)}const ts=En(0),es={};function rs(t,e,r,n,o){if(null!==(e=ns(t.v,e,r,o))||n&&t.m!==hn)return e}function ns(t,e,r,n){if(-1===e)return null;const o=e+(r?0:-1),s=t.length-1;let i,a;if(!(s<1+(r?0:-1))){if(o>=s)if(i=t[s],null!=i&&"object"==typeof i&&i.constructor===Object)r=i[e],a=!0;else{if(o!==s)return;r=i}else r=t[o];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return a?i[e]=n:t[o]=n,n}return r}}function os(t,e,r,n){Jo(t),ss(t=t.v,0|t[rn],e,r,n)}function ss(t,e,r,n,o){const s=r+(o?0:-1);var i=t.length-1;if(i>=1+(o?0:-1)&&s>=i){const o=t[i];if(null!=o&&"object"==typeof o&&o.constructor===Object)return o[r]=n,e}return s<=i?(t[s]=n,e):(void 0!==n&&(r>=(i=(e??=0|t[rn])>>14&1023||536870912)?null!=n&&(t[i+(o?0:-1)]={[r]:n}):t[s]=n),e)}function is(){return void 0===mn?2:4}function as(t,e,r,n,o){let s=t.v,i=0|s[rn];n=dn(t,i)?1:n,o=!!o||3===n,2===n&&Xo(t)&&(s=t.v,i=0|s[rn]);let a=(t=ls(s,e))===nn?7:0|t[rn],c=us(a,i);var l=!(4&c);if(l){4&c&&(t=$n(t),a=0,c=Ns(c,i),i=ss(s,i,e,t));let n=0,o=0;for(;n<t.length;n++){const e=r(t[n]);null!=e&&(t[o++]=e)}o<n&&(t.length=o),r=-513&c|4,c=r&=-1025,c&=-4097}return c!==a&&(an(t,c),2&c&&Object.freeze(t)),cs(t,c,s,i,e,n,l,o)}function cs(t,e,r,n,o,s,i,a){let c=e;return 1===s||4===s&&(2&e||!(16&e)&&32&n)?ds(e)||((e|=!t.length||i&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==c&&an(t,e),Object.freeze(t)):(2===s&&ds(e)&&(t=$n(t),c=0,e=Ns(e,n),n=ss(r,n,o,t)),ds(e)||(a||(e|=16),e!==c&&an(t,e))),2&e||!(4096&e||16&e)||Zo(r,n),t}function ls(t,e,r){return t=ns(t,e,r),Array.isArray(t)?t:nn}function us(t,e){return 2&e&&(t|=2),1|t}function ds(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function hs(t){return fn(t,!0)}function fs(t){t=$n(t);for(let e=0;e<t.length;e++){const r=t[e]=$n(t[e]);Array.isArray(r[1])&&(r[1]=cn(r[1]))}return ln(t)}function ps(t,e,r,n){Jo(t),ss(t=t.v,0|t[rn],e,("0"===n?0===Number(r):r===n)?void 0:r)}function ms(t,e,r){if(2&e)throw Error();const n=yn(e);let o=ls(t,r,n),s=o===nn?7:0|o[rn],i=us(s,e);return(2&i||ds(i)||16&i)&&(i===s||ds(i)||an(o,i),o=$n(o),s=0,i=Ns(i,e),ss(t,e,r,o,n)),i&=-13,i!==s&&an(o,i),o}function gs(t,e){var r=Uc;return vs(_s(t=t.v),t,void 0,r)===e?e:-1}function _s(t){if(Gr)return t[Kr]??(t[Kr]=/* @__PURE__ */new Map);if(Kr in t)return t[Kr];const e=/* @__PURE__ */new Map;return Object.defineProperty(t,Kr,{value:e}),e}function ys(t,e,r,n,o){const s=_s(t),i=vs(s,t,e,r,o);return i!==n&&(i&&(e=ss(t,e,i,void 0,o)),s.set(r,n)),e}function vs(t,e,r,n,o){let s=t.get(n);if(null!=s)return s;s=0;for(let i=0;i<n.length;i++){const t=n[i];null!=ns(e,t,o)&&(0!==s&&(r=ss(e,r,s,void 0,o)),s=t)}return t.set(n,s),s}function bs(t,e,r){let n=0|t[rn];const o=yn(n),s=ns(t,r,o);let i;if(null!=s&&s[Zr]===un){if(!dn(s))return Xo(s),s.v;i=s.v}else Array.isArray(s)&&(i=s);if(i){const t=0|i[rn];2&t&&(i=qo(i,t))}return i=Go(i,e),i!==s&&ss(t,n,r,i,o),i}function ws(t,e,r,n,o){let s=!1;if(null!=(n=ns(t,n,o,t=>{const n=yo(t,r,!1,e);return s=n!==t&&null!=n,n})))return s&&!dn(n)&&Zo(t,e),n}function xs(t,e,r,n){let o=t.v,s=0|o[rn];if(null==(e=ws(o,s,e,r,n)))return e;if(s=0|o[rn],!dn(t,s)){const i=Yo(e);i!==e&&(Xo(t)&&(o=t.v,s=0|o[rn]),s=ss(o,s,r,e=i,n),Zo(o,s))}return e}function ks(t,e,r,n,o,s,i,a){var c=dn(t,r);s=c?1:s,i=!!i||3===s,c=a&&!c,(2===s||c)&&Xo(t)&&(r=0|(e=t.v)[rn]);var l=(t=ls(e,o))===nn?7:0|t[rn],u=us(l,r);if(a=!(4&u)){var d=t,h=r;const e=!!(2&u);e&&(h|=2);let o=!e,s=!0,i=0,a=0;for(;i<d.length;i++){const t=yo(d[i],n,!1,h);if(t instanceof n){if(!e){const e=dn(t);o&&=!e,s&&=e}d[a++]=t}}a<i&&(d.length=a),u|=4,u=s?-4097&u:4096|u,u=o?8|u:-9&u}if(u!==l&&(an(t,u),2&u&&Object.freeze(t)),c&&!(8&u||!t.length&&(1===s||4===s&&(2&u||!(16&u)&&32&r)))){for(ds(u)&&(t=$n(t),u=Ns(u,r),r=ss(e,r,o,t)),n=t,c=u,l=0;l<n.length;l++)(d=n[l])!==(u=Yo(d))&&(n[l]=u);c|=8,an(t,u=c=n.length?4096|c:-4097&c)}return cs(t,u,e,r,o,s,a,i)}function Es(t,e,r){const n=t.v;return ks(t,n,0|n[rn],e,r,is(),!1,!0)}function As(t){return null==t&&(t=void 0),t}function Ss(t,e,r,n,o){return os(t,r,n=As(n),o),n&&!dn(n)&&Zo(t.v),t}function Ts(t,e,r,n){t:{var o=n=As(n);Jo(t);const s=t.v;let i=0|s[rn];if(null==o){const t=_s(s);if(vs(t,s,i,r)!==e)break t;t.set(r,0)}else i=ys(s,i,r,e);ss(s,i,e,o)}n&&!dn(n)&&Zo(t.v)}function Ns(t,e){return-273&(2&e?2|t:-3&t)}function Ls(t,e,r,n){var o=n;Jo(t),t=ks(t,n=t.v,0|n[rn],r,e,2,!0),o=null!=o?o:new r,t.push(o),e=r=t===nn?7:0|t[rn],(o=dn(o))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&an(t,r),o||Zo(n)}function Fs(t,e,r){return io(rs(t,e,void 0,r))}function Ps(t){return(_r?rs(t,2,void 0,void 0,po):po(rs(t,2)))??ts}function Ms(t,e){return rs(t,e,void 0,void 0,eo)??0}function Cs(t,e,r){if(null!=r){if("number"!=typeof r)throw Ur("int32");if(!Jn(r))throw Ur("int32");r|=0}os(t,e,r)}function Os(t,e,r){os(t,e,to(r))}function Is(t,e,r){ps(t,e,go(r),"")}function Rs(t,e,r){{Jo(t);const i=t.v;let a=0|i[rn];if(null==r)ss(i,a,e);else{var n=t=r===nn?7:0|r[rn],o=ds(t),s=o||Object.isFrozen(r);for(o||(t=0),s||(r=$n(r),n=0,t=Ns(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??(_r?1024:0),o=0;o<r.length;o++){const e=r[o],i=mo(e);Object.is(e,i)||(s&&(r=$n(r),n=0,t=Ns(t,a),s=!1),r[o]=i)}t!==n&&(s&&(r=$n(r),t=Ns(t,a)),an(r,t)),ss(i,a,e,r)}}}function js(t,e,r){Jo(t),as(t,e,_o,2,!0).push(mo(r))}var Ds=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.g=e}};function Us(t,e){if("string"==typeof t)return new Ds(Lr(t),e);if(Array.isArray(t))return new Ds(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Ds(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Ds(t,!1);if(t.constructor===Or)return e=Cr(t)||new Uint8Array(0),new Ds(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Ds(t,!1);throw Error()}function Bs(t,e){let r,n=0,o=0,s=0;const i=t.h;let a=t.g;do{r=i[a++],n|=(127&r)<<s,s+=7}while(s<32&&128&r);if(s>32)for(o|=(127&r)>>4,s=3;s<32&&128&r;s+=7)r=i[a++],o|=(127&r)<<s;if(Ks(t,a),!(128&r))return e(n>>>0,o>>>0);throw Error()}function zs(t){let e=0,r=t.g;const n=r+10,o=t.h;for(;r<n;){const n=o[r++];if(e|=n,!(128&n))return Ks(t,r),!!(127&e)}throw Error()}function Gs(t){const e=t.h;let r=t.g,n=e[r++],o=127&n;if(128&n&&(n=e[r++],o|=(127&n)<<7,128&n&&(n=e[r++],o|=(127&n)<<14,128&n&&(n=e[r++],o|=(127&n)<<21,128&n&&(n=e[r++],o|=n<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return Ks(t,r),o}function Vs(t){return Gs(t)>>>0}function Hs(t){var e=t.h;const r=t.g;var n=e[r],o=e[r+1];const s=e[r+2];return e=e[r+3],Ks(t,t.g+4),t=2*((o=(n|o<<8|s<<16|e<<24)>>>0)>>31)+1,n=o>>>23&255,o&=8388607,255==n?o?NaN:t*(1/0):0==n?1401298464324817e-60*t*o:t*Math.pow(2,n-150)*(o+8388608)}function Ws(t){return Gs(t)}function Ks(t,e){if(t.g=e,e>t.l)throw Error()}function $s(t,e){if(e<0)throw Error();const r=t.g;if((e=r+e)>t.l)throw Error();return t.g=e,r}function qs(t,e){if(0==e)return Mr();var r=$s(t,e);return t.Y&&t.j?r=t.h.subarray(r,r+e):(t=t.h,r=r===(e=r+e)?new Uint8Array(0):Pn?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?Mr():new Or(r,Pr)}var Ys=[];function Xs(t,e,r,n){if(si.length){const o=si.pop();return o.o(n),o.g.init(t,e,r,n),o}return new oi(t,e,r,n)}function Js(t){t.g.clear(),t.l=-1,t.h=-1,si.length<100&&si.push(t)}function Zs(t){var e=t.g;if(e.g==e.l)return!1;t.m=t.g.g;var r=Vs(t.g);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.l=e,t.h=r,!0}function Qs(t){switch(t.h){case 0:0!=t.h?Qs(t):zs(t.g);break;case 1:Ks(t=t.g,t.g+8);break;case 2:if(2!=t.h)Qs(t);else{var e=Vs(t.g);Ks(t=t.g,t.g+e)}break;case 5:Ks(t=t.g,t.g+4);break;case 3:for(e=t.l;;){if(!Zs(t))throw Error();if(4==t.h){if(t.l!=e)throw Error();break}Qs(t)}break;default:throw Error()}}function ti(t,e,r){const n=t.g.l;var o=Vs(t.g);let s=(o=t.g.g+o)-n;if(s<=0&&(t.g.l=o,r(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error();return t.g.g=o,t.g.l=n,e}function ei(t){var e=Vs(t.g),r=$s(t=t.g,e);if(t=t.h,cr){var n,o=t;(n=ar)||(n=ar=new TextDecoder("utf-8",{fatal:!0})),e=r+e,o=0===r&&e===o.length?o:o.subarray(r,e);try{var s=n.decode(o)}catch(a){if(void 0===ir){try{n.decode(new Uint8Array([128]))}catch(c){}try{n.decode(new Uint8Array([97])),ir=!0}catch(c){ir=!1}}throw!ir&&(ar=void 0),a}}else{e=(s=r)+e,r=[];let a,c=null;for(;s<e;){var i=t[s++];i<128?r.push(i):i<224?s>=e?or():(a=t[s++],i<194||128!=(192&a)?(s--,or()):r.push((31&i)<<6|63&a)):i<240?s>=e-1?or():(a=t[s++],128!=(192&a)||224===i&&a<160||237===i&&a>=160||128!=(192&(n=t[s++]))?(s--,or()):r.push((15&i)<<12|(63&a)<<6|63&n)):i<=244?s>=e-2?or():(a=t[s++],128!=(192&a)||a-144+(i<<28)>>30||128!=(192&(n=t[s++]))||128!=(192&(o=t[s++]))?(s--,or()):(i=(7&i)<<18|(63&a)<<12|(63&n)<<6|63&o,i-=65536,r.push(55296+(i>>10&1023),56320+(1023&i)))):or(),r.length>=8192&&(c=sr(c,r),r.length=0)}s=sr(c,r)}return s}function ri(t){const e=Vs(t.g);return qs(t.g,e)}function ni(t,e,r){var n=Vs(t.g);for(n=t.g.g+n;t.g.g<n;)r.push(e(t.g))}var oi=class{constructor(t,e,r,n){if(Ys.length){const o=Ys.pop();o.init(t,e,r,n),t=o}else t=new class{constructor(t,e,r,n){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(t,e,r,n)}init(t,e,r,{Y:n=!1,ea:o=!1}={}){this.Y=n,this.ea=o,t&&(t=Us(t,this.ea),this.h=t.buffer,this.j=t.g,this.m=e||0,this.l=void 0!==r?this.m+r:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}}(t,e,r,n);this.g=t,this.m=this.g.g,this.h=this.l=-1,this.o(n)}o({ha:t=!1}={}){this.ha=t}},si=[];function ii(t){return t?/^\d+$/.test(t)?(Wn(t),new ai(Cn,On)):null:ci||=new ai(0,0)}var ai=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let ci;function li(t){return t?/^-?\d+$/.test(t)?(Wn(t),new ui(Cn,On)):null:di||=new ui(0,0)}var ui=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let di;function hi(t,e,r){for(;r>0||e>127;)t.g.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.g.push(e)}function fi(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function pi(t,e){if(e>=0)fi(t,e);else{for(let r=0;r<9;r++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function mi(t){var e=Cn;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function gi(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function _i(t,e,r){fi(t.g,8*e+r)}function yi(t,e){return _i(t,e,2),e=t.g.end(),gi(t,e),e.push(t.h),e}function vi(t,e){var r=e.pop();for(r=t.h+t.g.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.h++;e.push(r),t.h++}function bi(t,e,r){_i(t,e,2),fi(t.g,r.length),gi(t,t.g.end()),gi(t,r)}function wi(t,e,r,n){null!=r&&(e=yi(t,e),n(r,t),vi(t,e))}function xi(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var ki=xi(),Ei=xi(),Ai=xi(),Si=xi(),Ti=xi(),Ni=xi(),Li=xi(),Fi=xi(),Pi=xi(),Mi=xi();function Ci(t,e,r){var n=t.v;$r&&$r in n&&(n=n[$r])&&delete n[e.g],e.h?e.j(t,e.h,e.g,r,e.l):e.j(t,e.g,r,e.l)}var Oi=class{constructor(t,e){this.v=Vo(t,e,void 0,2048)}toJSON(){return Uo(this)}j(){var t=Pl,e=this.v,r=t.g,n=$r;if(Gr&&n&&null!=e[n]?.[r]&&Br(qr,3),e=t.g,Qr&&$r&&void 0===Qr&&(n=(r=this.v)[$r])&&(n=n.da))try{n(r,e,Oo)}catch(o){hr(o)}return t.h?t.m(this,t.h,t.g,t.l):t.m(this,t.g,t.defaultValue,t.l)}clone(){const t=this.v,e=0|t[rn];return Qo(this,t,e)?Ko(this,t,!0):new this.constructor(qo(t,e,!1))}};Oi.prototype[Zr]=un,Oi.prototype.toString=function(){return this.v.toString()};var Ii=class{constructor(t,e,r){this.g=t,this.h=e,t=ki,this.l=!!t&&r===t||!1}};function Ri(t,e){return new Ii(t,e,ki)}function ji(t,e,r,n,o){wi(t,r,Yi(e,n),o)}const Di=Ri(function(t,e,r,n,o){return 2===t.h&&(ti(t,bs(e,n,r),o),!0)},ji),Ui=Ri(function(t,e,r,n,o){return 2===t.h&&(ti(t,bs(e,n,r),o),!0)},ji);var Bi=/* @__PURE__ */Symbol(),zi=/* @__PURE__ */Symbol(),Gi=/* @__PURE__ */Symbol(),Vi=/* @__PURE__ */Symbol(),Hi=/* @__PURE__ */Symbol();let Wi,Ki;function $i(t,e,r,n){var o=n[t];if(o)return o;(o={}).qa=n,o.T=function(t){switch(typeof t){case"boolean":return Bo||=[0,void 0,!0];case"number":return t>0?void 0:0===t?zo||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var s=n[1];let i=1;s&&s.constructor===Object&&(o.ba=s,"function"==typeof(s=n[++i])&&(o.ma=!0,Wi??=s,Ki??=n[i+1],s=n[i+=2]));const a={};for(;s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var c=0;c<s.length;c++)a[s[c]]=s;s=n[++i]}for(c=1;void 0!==s;){let t;"number"==typeof s&&(c+=s,s=n[++i]);var l=void 0;if(s instanceof Ii?t=s:(t=Di,i--),t?.l){s=n[++i],l=n;var u=i;"function"==typeof s&&(s=s(),l[u]=s),l=s}for(u=c+1,"number"==typeof(s=n[++i])&&s<0&&(u-=s,s=n[++i]);c<u;c++){const n=a[c];l?r(o,c,t,l,n):e(o,c,t,n)}}return n[t]=o}function qi(t){return Array.isArray(t)?t[0]instanceof Ii?t:[Ui,t]:[t,void 0]}function Yi(t,e){return t instanceof Oi?t.v:Array.isArray(t)?Go(t,e):void 0}function Xi(t,e,r,n){const o=r.g;t[e]=n?(t,e,r)=>o(t,e,r,n):o}function Ji(t,e,r,n,o){const s=r.g;let i,a;t[e]=(t,e,r)=>s(t,e,r,a||=$i(zi,Xi,Ji,n).T,i||=Zi(n),o)}function Zi(t){let e=t[Gi];if(null!=e)return e;const r=$i(zi,Xi,Ji,t);return e=r.ma?(t,e)=>Wi(t,e,r):(t,e)=>{for(;Zs(e)&&4!=e.h;){var n=e.l,o=r[n];if(null==o){var s=r.ba;s&&(s=s[n])&&null!=(s=ta(s))&&(o=r[n]=s)}if(null==o||!o(e,t,n)){if(o=(s=e).m,Qs(s),s.ha)var i=void 0;else i=s.g.g-o,s.g.g=o,i=qs(s.g,i);o=void 0,s=t,i&&((o=s[$r]??(s[$r]=new Co))[n]??(o[n]=[])).push(i)}}return(t=Po(t))&&(t.da=r.qa[Hi]),!0},t[Gi]=e,t[Hi]=Qi.bind(t),e}function Qi(t,e,r,n){var o=this[zi];const s=this[Gi],i=Go(void 0,o.T),a=Po(t);if(a){var c=!1,l=o.ba;if(l){if(o=(e,r,o)=>{if(0!==o.length)if(l[r])for(const t of o){e=Xs(t);try{c=!0,s(i,e)}finally{Js(e)}}else n?.(t,r,o)},null==e)Mo(a,o);else if(null!=a){const t=a[e];t&&o(a,e,t)}if(c){let n=0|t[rn];if(2&n&&2048&n&&!r?.Ka)throw Error();const o=yn(n),s=(e,s)=>{if(null!=ns(t,e,o)){if(1===r?.Qa)return;throw Error()}null!=s&&(n=ss(t,n,e,s,o)),delete a[e]};null==e?gn(i,0|i[rn],(t,e)=>{s(t,e)}):s(e,ns(i,e,o))}}}}function ta(t){const e=(t=qi(t))[0].g;if(t=t[1]){const r=Zi(t),n=$i(zi,Xi,Ji,t).T;return(t,o,s)=>e(t,o,s,n,r)}return e}function ea(t,e,r){t[e]=r.h}function ra(t,e,r,n){let o,s;const i=r.h;t[e]=(t,e,r)=>i(t,e,r,s||=$i(Bi,ea,ra,n).T,o||=na(n))}function na(t){let e=t[Vi];if(!e){const r=$i(Bi,ea,ra,t);e=(t,e)=>oa(t,e,r),t[Vi]=e}return e}function oa(t,e,r){gn(t,0|t[rn],(t,n)=>{if(null!=n){var o=function(t,e){var r=t[e];if(r)return r;if((r=t.ba)&&(r=r[e])){var n=(r=qi(r))[0].h;if(r=r[1]){const e=na(r),o=$i(Bi,ea,ra,r).T;r=t.ma?Ki(o,e):(t,r,s)=>n(t,r,s,o,e)}else r=n;return t[e]=r}}(r,t);o?o(e,n,t):t<500||Br(Xr,3)}}),(t=Po(t))&&Mo(t,(t,r,n)=>{for(gi(e,e.g.end()),t=0;t<n.length;t++)gi(e,Cr(n[t])||new Uint8Array(0))})}const sa=En(0);function ia(t,e){if(Array.isArray(e)){var r=0|e[rn];if(4&r)return e;for(var n=0,o=0;n<e.length;n++){const r=t(e[n]);null!=r&&(e[o++]=r)}return o<n&&(e.length=o),(t=-1537&r|5)!==r&&an(e,t),2&t&&Object.freeze(e),e}}function aa(t,e,r){return new Ii(t,e,r)}function ca(t,e,r){return new Ii(t,e,r)}function la(t,e,r){ss(t,0|t[rn],e,r,yn(0|t[rn]))}var ua=Ri(function(t,e,r,n,o){if(2!==t.h)return!1;if(t=$n(t=ti(t,Go([void 0,void 0],n),o)),o=yn(n=0|e[rn]),2&n)throw Error();let s=ns(e,r,o);if(s instanceof So)2&s.J?(s=s.V(),s.push(t),ss(e,n,r,s,o)):s.Ma(t);else if(Array.isArray(s)){var i=0|s[rn];8192&i||an(s,i|=8192),2&i&&(s=fs(s),ss(e,n,r,s,o)),s.push(t)}else ss(e,n,r,ln([t]),o);return!0},function(t,e,r,n,o){if(e instanceof So)e.forEach((e,s)=>{wi(t,r,Go([s,e],n),o)});else if(Array.isArray(e)){for(let s=0;s<e.length;s++){const i=e[s];Array.isArray(i)&&wi(t,r,Go(i,n),o)}ln(e)}});function da(t,e,r){null!=(e=eo(e))&&(_i(t,r,5),t=t.g,jn(e),mi(t))}function ha(t,e,r){if(null!=(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(qn(64,t));if(so(t)){if("string"===e)return uo(t);if("number"===e)return lo(t)}}(e))&&("string"==typeof e&&li(e),null!=e))switch(_i(t,r,0),typeof e){case"number":t=t.g,Rn(e),hi(t,Cn,On);break;case"bigint":r=BigInt.asUintN(64,e),r=new ui(Number(r&BigInt(4294967295)),Number(r>>BigInt(32))),hi(t.g,r.h,r.g);break;default:r=li(e),hi(t.g,r.h,r.g)}}function fa(t,e,r){null!=(e=io(e))&&null!=e&&(_i(t,r,0),pi(t.g,e))}function pa(t,e,r){null!=(e=no(e))&&(_i(t,r,0),t.g.g.push(e?1:0))}function ma(t,e,r){null!=(e=_o(e))&&bi(t,r,dr(e))}function ga(t,e,r,n,o){wi(t,r,Yi(e,n),o)}function _a(t,e,r){null!=(e=null==e||"string"==typeof e||e instanceof Or?e:void 0)&&bi(t,r,Us(e,!0).buffer)}function ya(t,e,r){return(5===t.h||2===t.h)&&(e=ms(e,0|e[rn],r),2==t.h?ni(t,Hs,e):e.push(Hs(t.g)),!0)}var va=aa(function(t,e,r){return 5===t.h&&(la(e,r,Hs(t.g)),!0)},da,Fi),ba=ca(ya,function(t,e,r){if(null!=(e=ia(eo,e)))for(let i=0;i<e.length;i++){var n=t,o=r,s=e[i];null!=s&&(_i(n,o,5),n=n.g,jn(s),mi(n))}},Fi),wa=ca(ya,function(t,e,r){if(null!=(e=ia(eo,e))&&e.length){_i(t,r,2),fi(t.g,4*e.length);for(let n=0;n<e.length;n++)r=t.g,jn(e[n]),mi(r)}},Fi),xa=aa(function(t,e,r){return 5===t.h&&(la(e,r,0===(t=Hs(t.g))?void 0:t),!0)},da,Fi),ka=aa(function(t,e,r){return gr?(0!==t.h?t=!1:(la(e,r,Bs(t.g,zn)),t=!0),t):0===t.h&&(la(e,r,Bs(t.g,Bn)),!0)},ha,Ni),Ea=aa(function(t,e,r){return gr?(0!==t.h?e=!1:(la(e,r,(t=Bs(t.g,zn))===sa?void 0:t),e=!0),e):0===t.h&&(la(e,r,0===(t=Bs(t.g,Bn))?void 0:t),!0)},ha,Ni),Aa=aa(function(t,e,r){return gr?(0!==t.h?t=!1:(la(e,r,Bs(t.g,Un)),t=!0),t):0===t.h&&(la(e,r,Bs(t.g,Dn)),!0)},function(t,e,r){if(null!=(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Yn(64,t));if(so(t)){if("string"===e)return e=Zn(Number(t)),Xn(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),(e="-"!==t[0]&&((e=t.length)<20||20===e&&t<="18446744073709551615"))||(Wn(t),t=Gn(Cn,On))),t;if("number"===e)return(t=Zn(t))>=0&&Xn(t)||(Rn(t),t=Dn(Cn,On)),t}}(e))&&("string"==typeof e&&ii(e),null!=e))switch(_i(t,r,0),typeof e){case"number":t=t.g,Rn(e),hi(t,Cn,On);break;case"bigint":r=BigInt.asUintN(64,e),r=new ai(Number(r&BigInt(4294967295)),Number(r>>BigInt(32))),hi(t.g,r.h,r.g);break;default:r=ii(e),hi(t.g,r.h,r.g)}},Li),Sa=aa(function(t,e,r){return 0===t.h&&(la(e,r,Gs(t.g)),!0)},fa,Si),Ta=ca(function(t,e,r){return(0===t.h||2===t.h)&&(e=ms(e,0|e[rn],r),2==t.h?ni(t,Gs,e):e.push(Gs(t.g)),!0)},function(t,e,r){if(null!=(e=ia(io,e))&&e.length){r=yi(t,r);for(let r=0;r<e.length;r++)pi(t.g,e[r]);vi(t,r)}},Si),Na=aa(function(t,e,r){return 0===t.h&&(la(e,r,0===(t=Gs(t.g))?void 0:t),!0)},fa,Si),La=aa(function(t,e,r){return 0===t.h&&(la(e,r,zs(t.g)),!0)},pa,Ei),Fa=aa(function(t,e,r){return 0===t.h&&(la(e,r,!1===(t=zs(t.g))?void 0:t),!0)},pa,Ei),Pa=ca(function(t,e,r){return 2===t.h&&(t=ei(t),ms(e,0|e[rn],r).push(t),!0)},function(t,e,r){if(null!=(e=ia(_o,e)))for(let i=0;i<e.length;i++){var n=t,o=r,s=e[i];null!=s&&bi(n,o,dr(s))}},Ai),Ma=aa(function(t,e,r){return 2===t.h&&(la(e,r,""===(t=ei(t))?void 0:t),!0)},ma,Ai),Ca=aa(function(t,e,r){return 2===t.h&&(la(e,r,ei(t)),!0)},ma,Ai),Oa=function(t,e,r=ki){return new Ii(t,e,r)}(function(t,e,r,n,o){return 2===t.h&&(n=Go(void 0,n),ms(e,0|e[rn],r).push(n),ti(t,n,o),!0)},function(t,e,r,n,o){if(Array.isArray(e)){for(let s=0;s<e.length;s++)ga(t,e[s],r,n,o);1&(t=0|e[rn])||an(e,1|t)}}),Ia=Ri(function(t,e,r,n,o,s){if(2!==t.h)return!1;let i=0|e[rn];return ys(e,i,s,r,yn(i)),ti(t,e=bs(e,n,r),o),!0},ga),Ra=aa(function(t,e,r){return 2===t.h&&(la(e,r,ri(t)),!0)},_a,Pi),ja=ca(function(t,e,r){return(0===t.h||2===t.h)&&(e=ms(e,0|e[rn],r),2==t.h?ni(t,Vs,e):e.push(Vs(t.g)),!0)},function(t,e,r){if(null!=(e=ia(ao,e)))for(let i=0;i<e.length;i++){var n=t,o=r,s=e[i];null!=s&&(_i(n,o,0),fi(n.g,s))}},Ti),Da=aa(function(t,e,r){return 0===t.h&&(la(e,r,0===(t=Vs(t.g))?void 0:t),!0)},function(t,e,r){null!=(e=ao(e))&&null!=e&&(_i(t,r,0),fi(t.g,e))},Ti),Ua=aa(function(t,e,r){return 0===t.h&&(la(e,r,Gs(t.g)),!0)},function(t,e,r){null!=(e=io(e))&&(e=parseInt(e,10),_i(t,r,0),pi(t.g,e))},Mi);class Ba{constructor(t,e){var r=oc;this.g=t,this.h=e,this.m=xs,this.j=Ss,this.defaultValue=void 0,this.l=null!=r.Oa?_n:void 0}register(){br(this)}}function za(t,e){return new Ba(t,e)}function Ga(t,e){return(r,n)=>{{const s={ea:!0};n&&Object.assign(s,n),r=Xs(r,void 0,void 0,s);try{const n=new t,s=n.v;Zi(e)(s,r);var o=n}finally{Js(r)}}return o}}function Va(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};oa(this.v,e,$i(Bi,ea,ra,t)),gi(e,e.g.end());const r=new Uint8Array(e.h),n=e.l,o=n.length;let s=0;for(let t=0;t<o;t++){const e=n[t];r.set(e,s),s+=e.length}return e.l=[r],r}}var Ha=class extends Oi{constructor(t){super(t)}},Wa=[0,Ma,aa(function(t,e,r){return 2===t.h&&(la(e,r,(t=ri(t))===Mr()?void 0:t),!0)},function(t,e,r){if(null!=e){if(e instanceof Oi){const n=e.Ra;return void(n?(e=n(e),null!=e&&bi(t,r,Us(e,!0).buffer)):Br(Xr,3))}if(Array.isArray(e))return void Br(Xr,3)}_a(t,e,r)},Pi)];let Ka,$a=globalThis.trustedTypes;function qa(t){var e;return void 0===Ka&&(Ka=function(){let t=null;if(!$a)return t;try{const e=t=>t;t=$a.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(e){}return t}()),t=(e=Ka)?e.createScriptURL(t):t,new class{constructor(t){this.g=t}toString(){return this.g+""}}(t)}function Ya(t,...e){if(0===e.length)return qa(t[0]);let r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return qa(r)}var Xa=[0,Sa,Ua,La,-1,Ta,Ua,-1,La],Ja=class extends Oi{constructor(t){super(t)}},Za=[0,La,Ca,La,Ua,-1,ca(function(t,e,r){return(0===t.h||2===t.h)&&(e=ms(e,0|e[rn],r),2==t.h?ni(t,Ws,e):e.push(Gs(t.g)),!0)},function(t,e,r){if(null!=(e=ia(io,e))&&e.length){r=yi(t,r);for(let r=0;r<e.length;r++)pi(t.g,e[r]);vi(t,r)}},Mi),Ca,-1,[0,La,-1],Ua,La,-1],Qa=[0,3,La,-1,2,[0,Sa],[0,Ua,La],[0,Ca,-1],[0]],tc=[0,Ca,-2],ec=class extends Oi{constructor(t){super(t)}},rc=[0],nc=[0,Sa,La,1,La,-4],oc=class extends Oi{constructor(t){super(t,2)}},sc={};sc[336783863]=[0,Ca,La,-1,Sa,[0,[1,2,3,4,5,6,7,8,9],Ia,rc,Ia,Za,Ia,tc,Ia,nc,Ia,Xa,Ia,[0,Ca,-2],Ia,[0,Ca,Ua],Ia,Qa,Ia,[0,Ua,-1,La]],[0,Ca],La,[0,[1,3],[2,4],Ia,[0,Ta],-1,Ia,[0,Pa],-1,Oa,[0,Ca,-1]],Ca];var ic=[0,Ea,-1,Fa,-3,Ea,Ta,Ma,Na,Ea,-1,Fa,Na,Fa,-2,Ma];function ac(t,e){js(t,3,e)}function cc(t,e){js(t,4,e)}var lc=class extends Oi{constructor(t){super(t,500)}o(t){return Ss(this,0,7,t)}},uc=[-1,{}],dc=[0,Ca,1,uc],hc=[0,Ca,Pa,uc];function fc(t,e){Ls(t,1,lc,e)}function pc(t,e){js(t,10,e)}function mc(t,e){js(t,15,e)}var gc=class extends Oi{constructor(t){super(t,500)}o(t){return Ss(this,0,1001,t)}},_c=[-500,Oa,[-500,Ma,-1,Pa,-3,[-2,sc,La],Oa,Wa,Na,-1,dc,hc,Oa,[0,Ma,Fa],Ma,ic,Na,Pa,987,Pa],4,Oa,[-500,Ca,-1,[-1,{}],998,Ca],Oa,[-500,Ca,Pa,-1,[-2,{},La],997,Pa,-1],Na,Oa,[-500,Ca,Pa,uc,998,Pa],Pa,Na,dc,hc,Oa,[0,Ma,-1,uc],Pa,-2,ic,Ma,-1,Fa,[0,Fa,Da],978,uc,Oa,Wa];gc.prototype.g=Va(_c);var yc=Ga(gc,_c),vc=class extends Oi{constructor(t){super(t)}},bc=class extends Oi{constructor(t){super(t)}g(){return Es(this,vc,1)}},wc=[0,Oa,[0,Sa,va,Ca,-1]],xc=Ga(bc,wc),kc=class extends Oi{constructor(t){super(t)}},Ec=class extends Oi{constructor(t){super(t)}},Ac=class extends Oi{constructor(t){super(t)}l(){return xs(this,kc,2)}g(){return Es(this,Ec,5)}},Sc=Ga(class extends Oi{constructor(t){super(t)}},[0,Pa,Ta,wa,[0,Ua,[0,Sa,-3],[0,va,-3],[0,Sa,-1,[0,Oa,[0,Sa,-2]]],Oa,[0,va,-1,Ca,va]],Ca,-1,ka,Oa,[0,Sa,va],Pa,ka]),Tc=class extends Oi{constructor(t){super(t)}},Nc=Ga(class extends Oi{constructor(t){super(t)}},[0,Oa,[0,va,-4]]),Lc=class extends Oi{constructor(t){super(t)}},Fc=Ga(class extends Oi{constructor(t){super(t)}},[0,Oa,[0,va,-4]]),Pc=class extends Oi{constructor(t){super(t)}},Mc=[0,Sa,-1,wa,Ua],Cc=class extends Oi{constructor(t){super(t)}};Cc.prototype.g=Va([0,va,-4,ka]);var Oc=class extends Oi{constructor(t){super(t)}},Ic=Ga(class extends Oi{constructor(t){super(t)}},[0,Oa,[0,1,Sa,Ca,wc],ka]),Rc=class extends Oi{constructor(t){super(t)}},jc=class extends Oi{constructor(t){super(t)}na(){const t=rs(this,1,void 0,void 0,hs);return null==t?Mr():t}},Dc=class extends Oi{constructor(t){super(t)}},Uc=[1,2],Bc=Ga(class extends Oi{constructor(t){super(t)}},[0,Oa,[0,Uc,Ia,[0,wa],Ia,[0,Ra],Sa,Ca],ka]),zc=class extends Oi{constructor(t){super(t)}},Gc=[0,Ca,Sa,va,Pa,-1],Vc=class extends Oi{constructor(t){super(t)}},Hc=[0,La,-1],Wc=class extends Oi{constructor(t){super(t)}},Kc=[1,2,3,4,5,6],$c=class extends Oi{constructor(t){super(t)}g(){return null!=rs(this,1,void 0,void 0,hs)}l(){return null!=_o(rs(this,2))}},qc=class extends Oi{constructor(t){super(t)}g(){return no(rs(this,2))??!1}},Yc=[0,Ra,Ca,[0,Sa,ka,-1],[0,Aa,ka]],Xc=[0,Yc,La,[0,Kc,Ia,nc,Ia,Za,Ia,Xa,Ia,rc,Ia,tc,Ia,Qa],Ua],Jc=class extends Oi{constructor(t){super(t)}},Zc=[0,Xc,va,-1,Sa],Qc=za(502141897,Jc);sc[502141897]=Zc;var tl=Ga(class extends Oi{constructor(t){super(t)}},[0,[0,Ua,-1,ba,ja],Mc]),el=class extends Oi{constructor(t){super(t)}},rl=class extends Oi{constructor(t){super(t)}},nl=[0,Xc,va,[0,Xc],La],ol=za(508968150,rl);sc[508968150]=[0,Xc,Zc,nl,va,[0,[0,Yc]]],sc[508968149]=nl;var sl=class extends Oi{constructor(t){super(t)}l(){return xs(this,zc,2)}g(){os(this,2)}},il=[0,Xc,Gc];sc[478825465]=il;var al=class extends Oi{constructor(t){super(t)}},cl=class extends Oi{constructor(t){super(t)}},ll=class extends Oi{constructor(t){super(t)}},ul=class extends Oi{constructor(t){super(t)}},dl=class extends Oi{constructor(t){super(t)}},hl=[0,Xc,[0,Xc],il,-1],fl=[0,Xc,va,Sa],pl=[0,Xc,va],ml=[0,Xc,fl,pl,va],gl=za(479097054,dl);sc[479097054]=[0,Xc,ml,hl],sc[463370452]=hl,sc[464864288]=fl;var _l=za(462713202,ul);sc[462713202]=ml,sc[474472470]=pl;var yl=class extends Oi{constructor(t){super(t)}},vl=class extends Oi{constructor(t){super(t)}},bl=class extends Oi{constructor(t){super(t)}},wl=class extends Oi{constructor(t){super(t)}},xl=[0,Xc,va,-1,Sa],kl=[0,Xc,va,La];wl.prototype.g=Va([0,Xc,pl,[0,Xc],Zc,nl,xl,kl]);var El=class extends Oi{constructor(t){super(t)}},Al=za(456383383,El);sc[456383383]=[0,Xc,Gc];var Sl=class extends Oi{constructor(t){super(t)}},Tl=za(476348187,Sl);sc[476348187]=[0,Xc,Hc];var Nl=class extends Oi{constructor(t){super(t)}},Ll=class extends Oi{constructor(t){super(t)}},Fl=[0,Ua,-1],Pl=za(458105876,class extends Oi{constructor(t){super(t)}g(){let t;var e=this.v;const r=0|e[rn];return t=dn(this,r),e=function(t,e,r,n){var o=Ll;!n&&Xo(t)&&(r=0|(e=t.v)[rn]);var s=ns(e,2);if(t=!1,null==s){if(n)return Fo();s=[]}else if(s.constructor===So){if(!(2&s.J)||n)return s;s=s.V()}else Array.isArray(s)?t=!!(2&s[rn]):s=[];if(n){if(!s.length)return Fo();t||(t=!0,cn(s))}else t&&(t=!1,ln(s),s=fs(s));return!t&&32&r&&sn(s,32),r=ss(e,r,2,n=new So(s,o,vo,void 0)),t||Zo(e,r),n}(this,e,r,t),!t&&Ll&&(e.ra=!0),e}});sc[458105876]=[0,Fl,ua,[!0,ka,[0,Ca,-1,Pa]],[0,Ta,La,Ua]];var Ml=class extends Oi{constructor(t){super(t)}},Cl=za(458105758,Ml);sc[458105758]=[0,Xc,Ca,Fl];var Ol=class extends Oi{constructor(t){super(t)}},Il=[0,xa,-1,Fa],Rl=class extends Oi{constructor(t){super(t)}},jl=class extends Oi{constructor(t){super(t)}},Dl=[1,2];jl.prototype.g=Va([0,Dl,Ia,Il,Ia,[0,Oa,Il]]);var Ul=class extends Oi{constructor(t){super(t)}},Bl=za(443442058,Ul);sc[443442058]=[0,Xc,Ca,Sa,va,Pa,-1,La,va],sc[514774813]=xl;var zl=class extends Oi{constructor(t){super(t)}},Gl=za(516587230,zl);function Vl(t,e){return e=e?e.clone():new zc,void 0!==t.displayNamesLocale?os(e,1,go(t.displayNamesLocale)):void 0===t.displayNamesLocale&&os(e,1),void 0!==t.maxResults?Cs(e,2,t.maxResults):"maxResults"in t&&os(e,2),void 0!==t.scoreThreshold?Os(e,3,t.scoreThreshold):"scoreThreshold"in t&&os(e,3),void 0!==t.categoryAllowlist?Rs(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&os(e,4),void 0!==t.categoryDenylist?Rs(e,5,t.categoryDenylist):"categoryDenylist"in t&&os(e,5),e}function Hl(t){const e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function Wl(t,e=-1,r=""){return{categories:t.map(t=>({index:Fs(t,1)??0??-1,score:Ms(t,2)??0,categoryName:_o(rs(t,3))??""??"",displayName:_o(rs(t,4))??""??""})),headIndex:e,headName:r}}function Kl(t){const e={classifications:Es(t,Oc,1).map(t=>Wl(xs(t,bc,4)?.g()??[],Fs(t,2)??0,_o(rs(t,3))??""))};return null!=(r=t,function(t){return null==t?t:"bigint"==typeof t?(An(t)?t=Number(t):(t=qn(64,t),t=An(t)?Number(t):String(t)),t):so(t)?"number"==typeof t?lo(t):uo(t):void 0}(_r?rs(r,2,void 0,void 0,po):rs(r,2)))&&(e.timestampMs=Hl(Ps(t))),e;var r}function $l(t){var e=as(t,3,eo,is()),r=as(t,2,io,is()),n=as(t,1,_o,is()),o=as(t,9,_o,is());const s={categories:[],keypoints:[]};for(let i=0;i<e.length;i++)s.categories.push({score:e[i],index:r[i]??-1,categoryName:n[i]??"",displayName:o[i]??""});if((e=xs(t,Ac,4)?.l())&&(s.boundingBox={originX:Fs(e,1,es)??0,originY:Fs(e,2,es)??0,width:Fs(e,3,es)??0,height:Fs(e,4,es)??0,angle:0}),xs(t,Ac,4)?.g().length)for(const i of xs(t,Ac,4).g())s.keypoints.push({x:rs(i,1,void 0,es,eo)??0,y:rs(i,2,void 0,es,eo)??0,score:rs(i,4,void 0,es,eo)??0,label:_o(rs(i,3,void 0,es))??""});return s}function ql(t){const e=[];for(const r of Es(t,Lc,1))e.push({x:Ms(r,1)??0,y:Ms(r,2)??0,z:Ms(r,3)??0,visibility:Ms(r,4)??0});return e}function Yl(t){const e=[];for(const r of Es(t,Tc,1))e.push({x:Ms(r,1)??0,y:Ms(r,2)??0,z:Ms(r,3)??0,visibility:Ms(r,4)??0});return e}function Xl(t){return Array.from(t,t=>t>127?t-256:t)}function Jl(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let r=0,n=0,o=0;for(let s=0;s<t.length;s++)r+=t[s]*e[s],n+=t[s]*t[s],o+=e[s]*e[s];if(n<=0||o<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*o)}let Zl;sc[516587230]=[0,Xc,xl,kl,va],sc[518928384]=kl;const Ql=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function tu(){if(void 0===Zl)try{await WebAssembly.instantiate(Ql),Zl=!0}catch{Zl=!1}return Zl}async function eu(t,e=Ya``){const r=await tu()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${r}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`}}var ru=class{};function nu(){var t=navigator;return!("undefined"==typeof OffscreenCanvas||function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)&&!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function ou(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;await self.import(t.toString())}}function su(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function iu(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function au(t,e,r){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(r?t.i._bindTextureToStream(r):t.i._bindTextureToCanvas(),!(r=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const[n,o]=su(e);return!t.l||n===t.i.canvas.width&&o===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=o),[n,o]}function cu(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const n=new Uint32Array(e.length);for(let o=0;o<e.length;o++)n[o]=t.i.stringToNewUTF8(e[o]);e=t.i._malloc(4*n.length),t.i.HEAPU32.set(n,e>>2),r(e);for(const o of n)t.i._free(o);t.i._free(e)}function lu(t,e,r){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=r}function uu(t,e,r){let n=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,o)=>{e?(r(n,o),n=[]):n.push(t)}}function du(t,e){const r=xs(t.baseOptions,$c,1)||new $c;"string"==typeof e?(os(r,2,go(e)),os(r,1)):e instanceof Uint8Array&&(os(r,1,fn(e,!1)),os(r,2)),Ss(t.baseOptions,0,1,r)}function hu(t){try{const e=t.H.length;if(1===e)throw Error(t.H[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.H.map(t=>t.message).join(", "))}finally{t.H=[]}}function fu(t,e){t.C=Math.max(t.C,e)}function pu(t,e){t.B=new lc,Is(t.B,2,"PassThroughCalculator"),ac(t.B,"free_memory"),cc(t.B,"free_memory_unused_out"),pc(e,"free_memory"),fc(e,t.B)}function mu(t,e){ac(t.B,e),cc(t.B,e+"_unused_out")}function gu(t){t.g.addBoolToStream(!0,"free_memory",t.C)}ru.forVisionTasks=function(t){return eu("vision",t)},ru.forTextTasks=function(t){return eu("text",t)},ru.forGenAiExperimentalTasks=function(t){return eu("genai_experimental",t)},ru.forGenAiTasks=function(t){return eu("genai",t)},ru.forAudioTasks=function(t){return eu("audio",t)},ru.isSimdSupported=function(){return tu()};var _u=class{constructor(t){this.g=t,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(xs(this.baseOptions,$c,1)?.g()||xs(this.baseOptions,$c,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let r=xs(t.baseOptions,Wc,3);if(!r){var n=r=new Wc,o=new ec;Ts(n,4,Kc,o)}"delegate"in e&&("GPU"===e.delegate?(e=r,n=new Ja,Ts(e,2,Kc,n)):(e=r,n=new ec,Ts(e,4,Kc,n))),Ss(t.baseOptions,0,3,r)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),du(this,"/model.dat"),this.m(),this.L()});if(e.modelAssetBuffer instanceof Uint8Array)du(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){const e=[];for(var r=0;;){const{done:n,value:o}=await t.read();if(n)break;e.push(o),r+=o.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(const n of e)t.set(n,r),r+=n.length;return t}(e.modelAssetBuffer).then(t=>{du(this,t),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}ca(){let t;if(this.g.ca(e=>{t=yc(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((t,e)=>{this.H.push(Error(e))}),this.g.Ja(),this.g.setGraph(t,e),this.B=void 0,hu(this)}finishProcessing(){this.g.finishProcessing(),hu(this)}close(){this.B=void 0,this.g.closeGraph()}};function yu(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}_u.prototype.close=_u.prototype.close;class vu{constructor(t,e,r,n){this.g=t,this.h=e,this.m=r,this.l=n}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function bu(t,e,r){const n=t.g;if(r=yu(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.h,r),r}function wu(t,e){const r=t.g,n=yu(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);const o=yu(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,o),r.enableVertexAttribArray(t.O),r.vertexAttribPointer(t.O,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);const s=yu(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(t.L),r.vertexAttribPointer(t.L,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new vu(r,n,o,s)}function xu(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function ku(t,e,r,n){return xu(t,e),t.h||(t.m(),t.D()),r?(t.u||(t.u=wu(t,!0)),r=t.u):(t.A||(t.A=wu(t,!1)),r=t.A),e.useProgram(t.h),r.bind(),t.l(),t=n(),r.g.bindVertexArray(null),t}function Eu(t,e,r){return xu(t,e),t=yu(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function Au(t,e,r){xu(t,e),t.B||(t.B=yu(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.B),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function Su(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var Tu=class{H(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=yu(t.createProgram(),"Failed to create WebGL program"),this.X=bu(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.W=bu(this,this.H(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.O=t.getAttribLocation(this.h,"aVertex"),this.L=t.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.X),t.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};function Nu(t,e){switch(e){case 0:return t.g.find(t=>t instanceof Uint8Array);case 1:return t.g.find(t=>t instanceof Float32Array);case 2:return t.g.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function Lu(t){var e=Nu(t,1);if(!e){if(e=Nu(t,0))e=new Float32Array(e).map(t=>t/255);else{e=new Float32Array(t.width*t.height);const n=Pu(t);var r=Cu(t);if(Au(r,n,Fu(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let t=0,n=0;t<e.length;++t,n+=4)e[t]=r[n]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.g.push(e)}return e}function Fu(t){let e=Nu(t,2);if(!e){const r=Pu(t);e=Ou(t);const n=Lu(t),o=Mu(t);r.texImage2D(r.TEXTURE_2D,0,o,t.width,t.height,0,r.RED,r.FLOAT,n),Iu(t)}return e}function Pu(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=yu(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Mu(t){if(t=Pu(t),!Ru)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Ru=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Ru=t.R16F}return Ru}function Cu(t){return t.l||(t.l=new Tu),t.l}function Ou(t){const e=Pu(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let r=Nu(t,2);return r||(r=Eu(Cu(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(r),t.j=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Iu(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Ru,ju=class{constructor(t,e,r,n,o,s,i){this.g=t,this.m=e,this.j=r,this.canvas=n,this.l=o,this.width=s,this.height=i,this.j&&0===--Du&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!Nu(this,0)}ka(){return!!Nu(this,1)}R(){return!!Nu(this,2)}ja(){return(t=Nu(this,0))||(t=Lu(this),t=new Uint8Array(t.map(t=>Math.round(255*t))),this.g.push(t)),t;var t}ia(){return Lu(this)}N(){return Fu(this)}clone(){const t=[];for(const e of this.g){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=Pu(this),e=Cu(this);t.activeTexture(t.TEXTURE1),r=Eu(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,r);const n=Mu(this);t.texImage2D(t.TEXTURE_2D,0,n,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),Au(e,t,r),ku(e,t,!1,()=>{Ou(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Iu(this)}),Su(e),Iu(this)}}t.push(r)}return new ju(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Pu(this).deleteTexture(Nu(this,2)),Du=-1}};ju.prototype.close=ju.prototype.close,ju.prototype.clone=ju.prototype.clone,ju.prototype.getAsWebGLTexture=ju.prototype.N,ju.prototype.getAsFloat32Array=ju.prototype.ia,ju.prototype.getAsUint8Array=ju.prototype.ja,ju.prototype.hasWebGLTexture=ju.prototype.R,ju.prototype.hasFloat32Array=ju.prototype.ka,ju.prototype.hasUint8Array=ju.prototype.Fa;var Du=250;function Uu(...t){return t.map(([t,e])=>({start:t,end:e}))}const Bu=/* @__PURE__ */function(t){return class extends t{Ja(){this.i._registerModelResourcesGraphService()}}}((zu=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:nu()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const r=t.length,n=this.i._malloc(r);this.i.HEAPU8.set(t,n),e?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(t,e,r,n,o){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),iu(this,n||"input_audio",n=>{iu(this,o=o||"audio_header",o=>{this.i._configureAudio(n,o,t,e??0,r)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){lu(this,"__graph_config__",e=>{t(e)}),iu(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,o){const s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),iu(this,n,t=>{this.i._addAudioToInputStream(this.g,e,r,t,o)})}addGpuBufferToStream(t,e,r){iu(this,e,e=>{const[n,o]=au(this,t,e);this.i._addBoundTextureToStream(e,n,o,r)})}addBoolToStream(t,e,r){iu(this,e,e=>{this.i._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){iu(this,e,e=>{this.i._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){iu(this,e,e=>{this.i._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){iu(this,e,e=>{this.i._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){iu(this,e,e=>{this.i._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){iu(this,e,e=>{iu(this,t,t=>{this.i._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){iu(this,e,e=>{cu(this,Object.keys(t),n=>{cu(this,Object.values(t),o=>{this.i._addFlatHashMapToInputStream(n,o,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){iu(this,r,r=>{iu(this,e,e=>{const o=this.i._malloc(t.length);this.i.HEAPU8.set(t,o),this.i._addProtoToInputStream(o,t.length,e,r,n),this.i._free(o)})})}addEmptyPacketToStream(t,e){iu(this,t,t=>{this.i._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){iu(this,e,e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const r of t)this.i._addBoolVectorEntry(n,r);this.i._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){iu(this,e,e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const r of t)this.i._addDoubleVectorEntry(n,r);this.i._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){iu(this,e,e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const r of t)this.i._addFloatVectorEntry(n,r);this.i._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){iu(this,e,e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const r of t)this.i._addIntVectorEntry(n,r);this.i._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){iu(this,e,e=>{const n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const r of t)this.i._addUintVectorEntry(n,r);this.i._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){iu(this,e,e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const r of t)iu(this,r,t=>{this.i._addStringVectorEntry(n,t)});this.i._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){iu(this,e,e=>{this.i._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){iu(this,e,e=>{this.i._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){iu(this,e,e=>{this.i._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){iu(this,e,e=>{this.i._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){iu(this,e,e=>{this.i._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){iu(this,e,e=>{iu(this,t,t=>{this.i._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){iu(this,r,r=>{iu(this,e,e=>{const n=this.i._malloc(t.length);this.i.HEAPU8.set(t,n),this.i._addProtoToInputSidePacket(n,t.length,e,r),this.i._free(n)})})}addBoolVectorToInputSidePacket(t,e){iu(this,e,e=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const n of t)this.i._addBoolVectorEntry(r,n);this.i._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){iu(this,e,e=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const n of t)this.i._addDoubleVectorEntry(r,n);this.i._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){iu(this,e,e=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const n of t)this.i._addFloatVectorEntry(r,n);this.i._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){iu(this,e,e=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const n of t)this.i._addIntVectorEntry(r,n);this.i._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){iu(this,e,e=>{const r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const n of t)this.i._addUintVectorEntry(r,n);this.i._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){iu(this,e,e=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const n of t)iu(this,n,t=>{this.i._addStringVectorEntry(r,t)});this.i._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){lu(this,t,e),iu(this,t,t=>{this.i._attachBoolListener(t)})}attachBoolVectorListener(t,e){uu(this,t,e),iu(this,t,t=>{this.i._attachBoolVectorListener(t)})}attachIntListener(t,e){lu(this,t,e),iu(this,t,t=>{this.i._attachIntListener(t)})}attachIntVectorListener(t,e){uu(this,t,e),iu(this,t,t=>{this.i._attachIntVectorListener(t)})}attachUintListener(t,e){lu(this,t,e),iu(this,t,t=>{this.i._attachUintListener(t)})}attachUintVectorListener(t,e){uu(this,t,e),iu(this,t,t=>{this.i._attachUintVectorListener(t)})}attachDoubleListener(t,e){lu(this,t,e),iu(this,t,t=>{this.i._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){uu(this,t,e),iu(this,t,t=>{this.i._attachDoubleVectorListener(t)})}attachFloatListener(t,e){lu(this,t,e),iu(this,t,t=>{this.i._attachFloatListener(t)})}attachFloatVectorListener(t,e){uu(this,t,e),iu(this,t,t=>{this.i._attachFloatVectorListener(t)})}attachStringListener(t,e){lu(this,t,e),iu(this,t,t=>{this.i._attachStringListener(t)})}attachStringVectorListener(t,e){uu(this,t,e),iu(this,t,t=>{this.i._attachStringVectorListener(t)})}attachProtoListener(t,e,r){lu(this,t,e),iu(this,t,t=>{this.i._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){uu(this,t,e),iu(this,t,t=>{this.i._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),lu(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),iu(this,t,t=>{this.i._attachAudioListener(t,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends zu{get ga(){return this.i}pa(t,e,r){iu(this,e,e=>{const[n,o]=au(this,t,e);this.ga._addBoundTextureAsImageToStream(e,n,o,r)})}Z(t,e){lu(this,t,e),iu(this,t,t=>{this.ga._attachImageListener(t)})}aa(t,e){uu(this,t,e),iu(this,t,t=>{this.ga._attachImageVectorListener(t)})}}));var zu,Gu=class extends Bu{};async function Vu(t,e,r){return async function(t,e,r,n){return async function(t,e,r,n){return t=await(async(t,e,r,n,o)=>{if(e&&await ou(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await ou(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&o&&((e=self.Module).locateFile=o.locateFile,o.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=o.mainScriptUrlOrBlob)),o=await self.ModuleFactory(self.Module||o),self.ModuleFactory=self.Module=void 0,new t(o,n)})(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&t.endsWith(".data")?r.assetBinaryPath.toString():t}),await t.o(n),t}(t,e,r,n)}(t,r.canvas??(nu()?void 0:document.createElement("canvas")),e,r)}function Hu(t,e,r,n){if(t.U){const s=new Cc;if(r?.regionOfInterest){if(!t.oa)throw Error("This task doesn't support region-of-interest.");var o=r.regionOfInterest;if(o.left>=o.right||o.top>=o.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(o.left<0||o.top<0||o.right>1||o.bottom>1)throw Error("Expected RectF values to be in [0,1].");Os(s,1,(o.left+o.right)/2),Os(s,2,(o.top+o.bottom)/2),Os(s,4,o.right-o.left),Os(s,3,o.bottom-o.top)}else Os(s,1,.5),Os(s,2,.5),Os(s,4,1),Os(s,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Os(s,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){const[t,n]=su(e);r=Ms(s,3)*n/t,o=Ms(s,4)*t/n,Os(s,4,r),Os(s,3,o)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.U,n)}t.g.pa(e,t.X,n??performance.now()),t.finishProcessing()}function Wu(t,e,r){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Hu(t,e,r,t.C+1)}function Ku(t,e,r,n){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Hu(t,e,r,n)}function $u(t,e,r,n){var o=e.data;const s=e.width,i=s*(e=e.height);if((o instanceof Uint8Array||o instanceof Float32Array)&&o.length!==i)throw Error("Unsupported channel count: "+o.length/i);return t=new ju([o],r,!1,t.g.i.canvas,t.P,s,e),n?t.clone():t}var qu=class extends _u{constructor(t,e,r,n){super(t),this.g=t,this.X=e,this.U=r,this.oa=n,this.P=new Tu}l(t,e=!0){if("runningMode"in t&&os(this.baseOptions,2,ro(!!t.runningMode&&"IMAGE"!==t.runningMode)),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.P.close(),super.close()}};qu.prototype.close=qu.prototype.close;var Yu=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},Ss(t=this.h=new Jc,0,1,e=new qc),Os(this.h,2,.5),Os(this.h,3,.3)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&Os(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Os(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}F(t,e){return this.j={detections:[]},Wu(this,t,e),this.j}G(t,e,r){return this.j={detections:[]},Ku(this,t,r,e),this.j}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect_in"),mc(t,"detections");const e=new oc;Ci(e,Qc,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect_in"),cc(r,"DETECTIONS:detections"),r.o(e),fc(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(const r of t)t=Sc(r),this.j.detections.push($l(t));fu(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Yu.prototype.detectForVideo=Yu.prototype.G,Yu.prototype.detect=Yu.prototype.F,Yu.prototype.setOptions=Yu.prototype.o,Yu.createFromModelPath=async function(t,e){return Vu(Yu,t,{baseOptions:{modelAssetPath:e}})},Yu.createFromModelBuffer=function(t,e){return Vu(Yu,t,{baseOptions:{modelAssetBuffer:e}})},Yu.createFromOptions=function(t,e){return Vu(Yu,t,e)};var Xu=Uu([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),Ju=Uu([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),Zu=Uu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Qu=Uu([474,475],[475,476],[476,477],[477,474]),td=Uu([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),ed=Uu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),rd=Uu([469,470],[470,471],[471,472],[472,469]),nd=Uu([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),od=[...Xu,...Ju,...Zu,...td,...ed,...nd],sd=Uu([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function id(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var ad=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Ss(t=this.h=new rl,0,1,e=new qc),this.A=new el,Ss(this.h,0,3,this.A),this.u=new Jc,Ss(this.h,0,2,this.u),Cs(this.u,4,1),Os(this.u,2,.5),Os(this.A,2,.5),Os(this.h,4,.5)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return"numFaces"in t&&Cs(this.u,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Os(this.u,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Os(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Os(this.A,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}F(t,e){return id(this),Wu(this,t,e),this.j}G(t,e,r){return id(this),Ku(this,t,r,e),this.j}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect"),mc(t,"face_landmarks");const e=new oc;Ci(e,ol,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect"),cc(r,"NORM_LANDMARKS:face_landmarks"),r.o(e),fc(t,r),this.g.attachProtoVectorListener("face_landmarks",(t,e)=>{for(const r of t)t=Fc(r),this.j.faceLandmarks.push(ql(t));fu(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{fu(this,t)}),this.outputFaceBlendshapes&&(mc(t,"blendshapes"),cc(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(t,e)=>{if(this.outputFaceBlendshapes)for(const r of t)t=xc(r),this.j.faceBlendshapes.push(Wl(t.g()??[]));fu(this,e)}),this.g.attachEmptyPacketListener("blendshapes",t=>{fu(this,t)})),this.outputFacialTransformationMatrixes&&(mc(t,"face_geometry"),cc(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(t,e)=>{if(this.outputFacialTransformationMatrixes)for(const r of t)(t=xs(t=tl(r),Pc,2))&&this.j.facialTransformationMatrixes.push({rows:Fs(t,1)??0??0,columns:Fs(t,2)??0??0,data:as(t,3,eo,is()).slice()??[]});fu(this,e)}),this.g.attachEmptyPacketListener("face_geometry",t=>{fu(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ad.prototype.detectForVideo=ad.prototype.G,ad.prototype.detect=ad.prototype.F,ad.prototype.setOptions=ad.prototype.o,ad.createFromModelPath=function(t,e){return Vu(ad,t,{baseOptions:{modelAssetPath:e}})},ad.createFromModelBuffer=function(t,e){return Vu(ad,t,{baseOptions:{modelAssetBuffer:e}})},ad.createFromOptions=function(t,e){return Vu(ad,t,e)},ad.FACE_LANDMARKS_LIPS=Xu,ad.FACE_LANDMARKS_LEFT_EYE=Ju,ad.FACE_LANDMARKS_LEFT_EYEBROW=Zu,ad.FACE_LANDMARKS_LEFT_IRIS=Qu,ad.FACE_LANDMARKS_RIGHT_EYE=td,ad.FACE_LANDMARKS_RIGHT_EYEBROW=ed,ad.FACE_LANDMARKS_RIGHT_IRIS=rd,ad.FACE_LANDMARKS_FACE_OVAL=nd,ad.FACE_LANDMARKS_CONTOURS=od,ad.FACE_LANDMARKS_TESSELATION=sd;var cd=Uu([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function ld(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function ud(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function dd(t,e=!0){const r=[];for(const o of t){var n=xc(o);t=[];for(const r of n.g())n=e&&null!=Fs(r,1)?Fs(r,1)??0:-1,t.push({score:Ms(r,2)??0,index:n,categoryName:_o(rs(r,3))??""??"",displayName:_o(rs(r,4))??""??""});r.push(t)}return r}var hd=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ss(t=this.j=new dl,0,1,e=new qc),this.u=new ul,Ss(this.j,0,2,this.u),this.D=new ll,Ss(this.u,0,3,this.D),this.A=new cl,Ss(this.u,0,2,this.A),this.h=new al,Ss(this.j,0,3,this.h),Os(this.A,2,.5),Os(this.u,4,.5),Os(this.D,2,.5)}get baseOptions(){return xs(this.j,qc,1)}set baseOptions(t){Ss(this.j,0,1,t)}o(t){if(Cs(this.A,3,t.numHands??1),"minHandDetectionConfidence"in t&&Os(this.A,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Os(this.u,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Os(this.D,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new sl,r=e,n=Vl(t.cannedGesturesClassifierOptions,xs(this.h,sl,3)?.l());Ss(r,0,2,n),Ss(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&xs(this.h,sl,3)?.g();return t.customGesturesClassifierOptions?(Ss(r=e=new sl,0,2,n=Vl(t.customGesturesClassifierOptions,xs(this.h,sl,4)?.l())),Ss(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&xs(this.h,sl,4)?.g(),this.l(t)}Ha(t,e){return ld(this),Wu(this,t,e),ud(this)}Ia(t,e,r){return ld(this),Ku(this,t,r,e),ud(this)}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect"),mc(t,"hand_gestures"),mc(t,"hand_landmarks"),mc(t,"world_hand_landmarks"),mc(t,"handedness");const e=new oc;Ci(e,gl,this.j);const r=new lc;Is(r,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect"),cc(r,"HAND_GESTURES:hand_gestures"),cc(r,"LANDMARKS:hand_landmarks"),cc(r,"WORLD_LANDMARKS:world_hand_landmarks"),cc(r,"HANDEDNESS:handedness"),r.o(e),fc(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(const r of t){t=Fc(r);const e=[];for(const r of Es(t,Lc,1))e.push({x:Ms(r,1)??0,y:Ms(r,2)??0,z:Ms(r,3)??0,visibility:Ms(r,4)??0});this.landmarks.push(e)}fu(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{fu(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(const r of t){t=Nc(r);const e=[];for(const r of Es(t,Tc,1))e.push({x:Ms(r,1)??0,y:Ms(r,2)??0,z:Ms(r,3)??0,visibility:Ms(r,4)??0});this.worldLandmarks.push(e)}fu(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{fu(this,t)}),this.g.attachProtoVectorListener("hand_gestures",(t,e)=>{this.gestures.push(...dd(t,!1)),fu(this,e)}),this.g.attachEmptyPacketListener("hand_gestures",t=>{fu(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{this.handedness.push(...dd(t)),fu(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function fd(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}hd.prototype.recognizeForVideo=hd.prototype.Ia,hd.prototype.recognize=hd.prototype.Ha,hd.prototype.setOptions=hd.prototype.o,hd.createFromModelPath=function(t,e){return Vu(hd,t,{baseOptions:{modelAssetPath:e}})},hd.createFromModelBuffer=function(t,e){return Vu(hd,t,{baseOptions:{modelAssetBuffer:e}})},hd.createFromOptions=function(t,e){return Vu(hd,t,e)},hd.HAND_CONNECTIONS=cd;var pd=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ss(t=this.h=new ul,0,1,e=new qc),this.u=new ll,Ss(this.h,0,3,this.u),this.j=new cl,Ss(this.h,0,2,this.j),Cs(this.j,3,1),Os(this.j,2,.5),Os(this.u,2,.5),Os(this.h,4,.5)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return"numHands"in t&&Cs(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&Os(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Os(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Os(this.u,2,t.minHandPresenceConfidence??.5),this.l(t)}F(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Wu(this,t,e),fd(this)}G(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ku(this,t,r,e),fd(this)}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect"),mc(t,"hand_landmarks"),mc(t,"world_hand_landmarks"),mc(t,"handedness");const e=new oc;Ci(e,_l,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect"),cc(r,"LANDMARKS:hand_landmarks"),cc(r,"WORLD_LANDMARKS:world_hand_landmarks"),cc(r,"HANDEDNESS:handedness"),r.o(e),fc(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(const r of t)t=Fc(r),this.landmarks.push(ql(t));fu(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{fu(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(const r of t)t=Nc(r),this.worldLandmarks.push(Yl(t));fu(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{fu(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{var r=this.handedness,n=r.push;const o=[];for(const s of t){t=xc(s);const e=[];for(const r of t.g())e.push({score:Ms(r,2)??0,index:Fs(r,1)??0??-1,categoryName:_o(rs(r,3))??""??"",displayName:_o(rs(r,4))??""??""});o.push(e)}n.call(r,...o),fu(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pd.prototype.detectForVideo=pd.prototype.G,pd.prototype.detect=pd.prototype.F,pd.prototype.setOptions=pd.prototype.o,pd.createFromModelPath=function(t,e){return Vu(pd,t,{baseOptions:{modelAssetPath:e}})},pd.createFromModelBuffer=function(t,e){return Vu(pd,t,{baseOptions:{modelAssetBuffer:e}})},pd.createFromOptions=function(t,e){return Vu(pd,t,e)},pd.HAND_CONNECTIONS=cd;var md=Uu([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function gd(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function _d(t){try{if(!t.D)return t.h;t.D(t.h)}finally{gu(t)}}function yd(t,e){t=Fc(t),e.push(ql(t))}var vd=class extends qu{constructor(t,e){super(new Gu(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Ss(t=this.j=new wl,0,1,e=new qc),this.I=new ll,Ss(this.j,0,2,this.I),this.W=new yl,Ss(this.j,0,3,this.W),this.u=new Jc,Ss(this.j,0,4,this.u),this.O=new el,Ss(this.j,0,5,this.O),this.A=new vl,Ss(this.j,0,6,this.A),this.M=new bl,Ss(this.j,0,7,this.M),Os(this.u,2,.5),Os(this.u,3,.3),Os(this.O,2,.5),Os(this.A,2,.5),Os(this.A,3,.3),Os(this.M,2,.5),Os(this.I,2,.5)}get baseOptions(){return xs(this.j,qc,1)}set baseOptions(t){Ss(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&Os(this.u,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Os(this.u,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Os(this.O,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Os(this.A,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Os(this.A,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Os(this.M,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Os(this.I,2,t.minHandLandmarksConfidence??.5),this.l(t)}F(t,e,r){const n="function"!=typeof e?e:{};return this.D="function"==typeof e?e:r,gd(this),Wu(this,t,n),_d(this)}G(t,e,r,n){const o="function"!=typeof r?r:{};return this.D="function"==typeof r?r:n,gd(this),Ku(this,t,o,e),_d(this)}m(){var t=new gc;pc(t,"input_frames_image"),mc(t,"pose_landmarks"),mc(t,"pose_world_landmarks"),mc(t,"face_landmarks"),mc(t,"left_hand_landmarks"),mc(t,"left_hand_world_landmarks"),mc(t,"right_hand_landmarks"),mc(t,"right_hand_world_landmarks");const e=new oc,r=new Ha;Is(r,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))os(t,2,Ro(e,0,Do));else{if(!("string"==typeof e||e instanceof Or||Fr(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");ps(t,2,fn(e,!1),Mr())}}(r,this.j.g());const n=new lc;Is(n,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Ls(n,8,Ha,r),ac(n,"IMAGE:input_frames_image"),cc(n,"POSE_LANDMARKS:pose_landmarks"),cc(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),cc(n,"FACE_LANDMARKS:face_landmarks"),cc(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),cc(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),cc(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),cc(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.o(e),fc(t,n),pu(this,t),this.g.attachProtoListener("pose_landmarks",(t,e)=>{yd(t,this.h.poseLandmarks),fu(this,e)}),this.g.attachEmptyPacketListener("pose_landmarks",t=>{fu(this,t)}),this.g.attachProtoListener("pose_world_landmarks",(t,e)=>{var r=this.h.poseWorldLandmarks;t=Nc(t),r.push(Yl(t)),fu(this,e)}),this.g.attachEmptyPacketListener("pose_world_landmarks",t=>{fu(this,t)}),this.outputPoseSegmentationMasks&&(cc(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),mu(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",(t,e)=>{this.h.poseSegmentationMasks=[$u(this,t,!0,!this.D)],fu(this,e)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",t=>{this.h.poseSegmentationMasks=[],fu(this,t)})),this.g.attachProtoListener("face_landmarks",(t,e)=>{yd(t,this.h.faceLandmarks),fu(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{fu(this,t)}),this.outputFaceBlendshapes&&(mc(t,"extra_blendshapes"),cc(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(t,e)=>{var r=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=xc(t),r.push(Wl(t.g()??[]))),fu(this,e)}),this.g.attachEmptyPacketListener("extra_blendshapes",t=>{fu(this,t)})),this.g.attachProtoListener("left_hand_landmarks",(t,e)=>{yd(t,this.h.leftHandLandmarks),fu(this,e)}),this.g.attachEmptyPacketListener("left_hand_landmarks",t=>{fu(this,t)}),this.g.attachProtoListener("left_hand_world_landmarks",(t,e)=>{var r=this.h.leftHandWorldLandmarks;t=Nc(t),r.push(Yl(t)),fu(this,e)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",t=>{fu(this,t)}),this.g.attachProtoListener("right_hand_landmarks",(t,e)=>{yd(t,this.h.rightHandLandmarks),fu(this,e)}),this.g.attachEmptyPacketListener("right_hand_landmarks",t=>{fu(this,t)}),this.g.attachProtoListener("right_hand_world_landmarks",(t,e)=>{var r=this.h.rightHandWorldLandmarks;t=Nc(t),r.push(Yl(t)),fu(this,e)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};vd.prototype.detectForVideo=vd.prototype.G,vd.prototype.detect=vd.prototype.F,vd.prototype.setOptions=vd.prototype.o,vd.createFromModelPath=function(t,e){return Vu(vd,t,{baseOptions:{modelAssetPath:e}})},vd.createFromModelBuffer=function(t,e){return Vu(vd,t,{baseOptions:{modelAssetBuffer:e}})},vd.createFromOptions=function(t,e){return Vu(vd,t,e)},vd.HAND_CONNECTIONS=cd,vd.POSE_CONNECTIONS=md,vd.FACE_LANDMARKS_LIPS=Xu,vd.FACE_LANDMARKS_LEFT_EYE=Ju,vd.FACE_LANDMARKS_LEFT_EYEBROW=Zu,vd.FACE_LANDMARKS_LEFT_IRIS=Qu,vd.FACE_LANDMARKS_RIGHT_EYE=td,vd.FACE_LANDMARKS_RIGHT_EYEBROW=ed,vd.FACE_LANDMARKS_RIGHT_IRIS=rd,vd.FACE_LANDMARKS_FACE_OVAL=nd,vd.FACE_LANDMARKS_CONTOURS=od,vd.FACE_LANDMARKS_TESSELATION=sd;var bd=class extends qu{constructor(t,e){super(new Gu(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},Ss(t=this.h=new El,0,1,e=new qc)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return Ss(this.h,0,2,Vl(t,xs(this.h,zc,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},Wu(this,t,e),this.j}ta(t,e,r){return this.j={classifications:[]},Ku(this,t,r,e),this.j}m(){var t=new gc;pc(t,"input_image"),pc(t,"norm_rect"),mc(t,"classifications");const e=new oc;Ci(e,Al,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),ac(r,"IMAGE:input_image"),ac(r,"NORM_RECT:norm_rect"),cc(r,"CLASSIFICATIONS:classifications"),r.o(e),fc(t,r),this.g.attachProtoListener("classifications",(t,e)=>{this.j=Kl(Ic(t)),fu(this,e)}),this.g.attachEmptyPacketListener("classifications",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bd.prototype.classifyForVideo=bd.prototype.ta,bd.prototype.classify=bd.prototype.sa,bd.prototype.setOptions=bd.prototype.o,bd.createFromModelPath=function(t,e){return Vu(bd,t,{baseOptions:{modelAssetPath:e}})},bd.createFromModelBuffer=function(t,e){return Vu(bd,t,{baseOptions:{modelAssetBuffer:e}})},bd.createFromOptions=function(t,e){return Vu(bd,t,e)};var wd=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect",!0),this.h=new Sl,this.embeddings={embeddings:[]},Ss(t=this.h,0,1,e=new qc)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){var e=this.h,r=xs(this.h,Vc,2);return r=r?r.clone():new Vc,void 0!==t.l2Normalize?os(r,1,ro(t.l2Normalize)):"l2Normalize"in t&&os(r,1),void 0!==t.quantize?os(r,2,ro(t.quantize)):"quantize"in t&&os(r,2),Ss(e,0,2,r),this.l(t)}za(t,e){return Wu(this,t,e),this.embeddings}Aa(t,e,r){return Ku(this,t,r,e),this.embeddings}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect"),mc(t,"embeddings_out");const e=new oc;Ci(e,Tl,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect"),cc(r,"EMBEDDINGS:embeddings_out"),r.o(e),fc(t,r),this.g.attachProtoListener("embeddings_out",(t,e)=>{var r;t=Bc(t),this.embeddings={embeddings:Es(r=t,Dc,1).map(t=>{const e={headIndex:Fs(t,3)??0??-1,headName:_o(rs(t,4))??""??""};var r=t.v;return void 0!==ws(r,0|r[rn],Rc,gs(t,1))?(t=as(t=xs(t,Rc,gs(t,1),void 0),1,eo,is()),e.floatEmbedding=t.slice()):(r=new Uint8Array(0),e.quantizedEmbedding=xs(t,jc,gs(t,2),void 0)?.na()?.h()??r),e}),timestampMs:Hl(Ps(r))},fu(this,e)}),this.g.attachEmptyPacketListener("embeddings_out",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};wd.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Jl(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Jl(Xl(t.quantizedEmbedding),Xl(e.quantizedEmbedding))}return t},wd.prototype.embedForVideo=wd.prototype.Aa,wd.prototype.embed=wd.prototype.za,wd.prototype.setOptions=wd.prototype.o,wd.createFromModelPath=function(t,e){return Vu(wd,t,{baseOptions:{modelAssetPath:e}})},wd.createFromModelBuffer=function(t,e){return Vu(wd,t,{baseOptions:{modelAssetBuffer:e}})},wd.createFromOptions=function(t,e){return Vu(wd,t,e)};var xd=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function kd(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Ed(t){try{const e=new xd(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{gu(t)}}xd.prototype.close=xd.prototype.close;var Ad=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Ml,this.A=new Nl,Ss(this.h,0,3,this.A),Ss(t=this.h,0,1,e=new qc)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?os(this.h,2,go(t.displayNamesLocale)):"displayNamesLocale"in t&&os(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}L(){!function(t){const e=(r=t.ca(),Es(r,lc,1)).filter(t=>(_o(rs(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));var r;if(t.u=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(xs(e[0],oc,7)?.j()?.g()??/* @__PURE__ */new Map).forEach((e,r)=>{t.u[Number(r)]=_o(rs(e,1))??""})}(this)}segment(t,e,r){const n="function"!=typeof e?e:{};return this.j="function"==typeof e?e:r,kd(this),Wu(this,t,n),Ed(this)}La(t,e,r,n){const o="function"!=typeof r?r:{};return this.j="function"==typeof r?r:n,kd(this),Ku(this,t,o,e),Ed(this)}Da(){return this.u}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect");const e=new oc;Ci(e,Cl,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect"),r.o(e),fc(t,r),pu(this,t),this.outputConfidenceMasks&&(mc(t,"confidence_masks"),cc(r,"CONFIDENCE_MASKS:confidence_masks"),mu(this,"confidence_masks"),this.g.aa("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>$u(this,t,!0,!this.j)),fu(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],fu(this,t)})),this.outputCategoryMask&&(mc(t,"category_mask"),cc(r,"CATEGORY_MASK:category_mask"),mu(this,"category_mask"),this.g.Z("category_mask",(t,e)=>{this.categoryMask=$u(this,t,!1,!this.j),fu(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,fu(this,t)})),mc(t,"quality_scores"),cc(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,fu(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ad.prototype.getLabels=Ad.prototype.Da,Ad.prototype.segmentForVideo=Ad.prototype.La,Ad.prototype.segment=Ad.prototype.segment,Ad.prototype.setOptions=Ad.prototype.o,Ad.createFromModelPath=function(t,e){return Vu(Ad,t,{baseOptions:{modelAssetPath:e}})},Ad.createFromModelBuffer=function(t,e){return Vu(Ad,t,{baseOptions:{modelAssetBuffer:e}})},Ad.createFromOptions=function(t,e){return Vu(Ad,t,e)};var Sd=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};Sd.prototype.close=Sd.prototype.close;var Td=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Ml,this.u=new Nl,Ss(this.h,0,3,this.u),Ss(t=this.h,0,1,e=new qc)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,r,n){const o="function"!=typeof r?r:{};if(this.j="function"==typeof r?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.C+1,n=new jl,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new Ol;ps(s,3,ro(!0),!1),ps(s,1,to(e.keypoint.x),0),ps(s,2,to(e.keypoint.y),0),Ts(n,1,Dl,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{const t=new Rl;for(s of e.scribble)ps(e=new Ol,3,ro(!0),!1),ps(e,1,to(s.x),0),ps(e,2,to(s.y),0),Ls(t,1,Ol,e);Ts(n,2,Dl,t)}}this.g.addProtoToStream(n.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",r),Wu(this,t,o);t:{try{const t=new Sd(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var i=t;break t}this.j(t)}finally{gu(this)}i=void 0}return i}m(){var t=new gc;pc(t,"image_in"),pc(t,"roi_in"),pc(t,"norm_rect_in");const e=new oc;Ci(e,Cl,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),ac(r,"IMAGE:image_in"),ac(r,"ROI:roi_in"),ac(r,"NORM_RECT:norm_rect_in"),r.o(e),fc(t,r),pu(this,t),this.outputConfidenceMasks&&(mc(t,"confidence_masks"),cc(r,"CONFIDENCE_MASKS:confidence_masks"),mu(this,"confidence_masks"),this.g.aa("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>$u(this,t,!0,!this.j)),fu(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],fu(this,t)})),this.outputCategoryMask&&(mc(t,"category_mask"),cc(r,"CATEGORY_MASK:category_mask"),mu(this,"category_mask"),this.g.Z("category_mask",(t,e)=>{this.categoryMask=$u(this,t,!1,!this.j),fu(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,fu(this,t)})),mc(t,"quality_scores"),cc(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,fu(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Td.prototype.segment=Td.prototype.segment,Td.prototype.setOptions=Td.prototype.o,Td.createFromModelPath=function(t,e){return Vu(Td,t,{baseOptions:{modelAssetPath:e}})},Td.createFromModelBuffer=function(t,e){return Vu(Td,t,{baseOptions:{modelAssetBuffer:e}})},Td.createFromOptions=function(t,e){return Vu(Td,t,e)};var Nd=class extends qu{constructor(t,e){super(new Gu(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},Ss(t=this.h=new Ul,0,1,e=new qc)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?os(this.h,2,go(t.displayNamesLocale)):"displayNamesLocale"in t&&os(this.h,2),void 0!==t.maxResults?Cs(this.h,3,t.maxResults):"maxResults"in t&&os(this.h,3),void 0!==t.scoreThreshold?Os(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&os(this.h,4),void 0!==t.categoryAllowlist?Rs(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&os(this.h,5),void 0!==t.categoryDenylist?Rs(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&os(this.h,6),this.l(t)}F(t,e){return this.j={detections:[]},Wu(this,t,e),this.j}G(t,e,r){return this.j={detections:[]},Ku(this,t,r,e),this.j}m(){var t=new gc;pc(t,"input_frame_gpu"),pc(t,"norm_rect"),mc(t,"detections");const e=new oc;Ci(e,Bl,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),ac(r,"IMAGE:input_frame_gpu"),ac(r,"NORM_RECT:norm_rect"),cc(r,"DETECTIONS:detections"),r.o(e),fc(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(const r of t)t=Sc(r),this.j.detections.push($l(t));fu(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{fu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Nd.prototype.detectForVideo=Nd.prototype.G,Nd.prototype.detect=Nd.prototype.F,Nd.prototype.setOptions=Nd.prototype.o,Nd.createFromModelPath=async function(t,e){return Vu(Nd,t,{baseOptions:{modelAssetPath:e}})},Nd.createFromModelBuffer=function(t,e){return Vu(Nd,t,{baseOptions:{modelAssetBuffer:e}})},Nd.createFromOptions=function(t,e){return Vu(Nd,t,e)};var Ld=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function Fd(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Pd(t){try{const e=new Ld(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.u)return e;t.u(e)}finally{gu(t)}}Ld.prototype.close=Ld.prototype.close;var Md=class extends qu{constructor(t,e){super(new Gu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Ss(t=this.h=new zl,0,1,e=new qc),this.A=new bl,Ss(this.h,0,3,this.A),this.j=new vl,Ss(this.h,0,2,this.j),Cs(this.j,4,1),Os(this.j,2,.5),Os(this.A,2,.5),Os(this.h,4,.5)}get baseOptions(){return xs(this.h,qc,1)}set baseOptions(t){Ss(this.h,0,1,t)}o(t){return"numPoses"in t&&Cs(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Os(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Os(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Os(this.A,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}F(t,e,r){const n="function"!=typeof e?e:{};return this.u="function"==typeof e?e:r,Fd(this),Wu(this,t,n),Pd(this)}G(t,e,r,n){const o="function"!=typeof r?r:{};return this.u="function"==typeof r?r:n,Fd(this),Ku(this,t,o,e),Pd(this)}m(){var t=new gc;pc(t,"image_in"),pc(t,"norm_rect"),mc(t,"normalized_landmarks"),mc(t,"world_landmarks"),mc(t,"segmentation_masks");const e=new oc;Ci(e,Gl,this.h);const r=new lc;Is(r,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),ac(r,"IMAGE:image_in"),ac(r,"NORM_RECT:norm_rect"),cc(r,"NORM_LANDMARKS:normalized_landmarks"),cc(r,"WORLD_LANDMARKS:world_landmarks"),r.o(e),fc(t,r),pu(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(t,e)=>{this.landmarks=[];for(const r of t)t=Fc(r),this.landmarks.push(ql(t));fu(this,e)}),this.g.attachEmptyPacketListener("normalized_landmarks",t=>{this.landmarks=[],fu(this,t)}),this.g.attachProtoVectorListener("world_landmarks",(t,e)=>{this.worldLandmarks=[];for(const r of t)t=Nc(r),this.worldLandmarks.push(Yl(t));fu(this,e)}),this.g.attachEmptyPacketListener("world_landmarks",t=>{this.worldLandmarks=[],fu(this,t)}),this.outputSegmentationMasks&&(cc(r,"SEGMENTATION_MASK:segmentation_masks"),mu(this,"segmentation_masks"),this.g.aa("segmentation_masks",(t,e)=>{this.segmentationMasks=t.map(t=>$u(this,t,!0,!this.u)),fu(this,e)}),this.g.attachEmptyPacketListener("segmentation_masks",t=>{this.segmentationMasks=[],fu(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Md.prototype.detectForVideo=Md.prototype.G,Md.prototype.detect=Md.prototype.F,Md.prototype.setOptions=Md.prototype.o,Md.createFromModelPath=function(t,e){return Vu(Md,t,{baseOptions:{modelAssetPath:e}})},Md.createFromModelBuffer=function(t,e){return Vu(Md,t,{baseOptions:{modelAssetBuffer:e}})},Md.createFromOptions=function(t,e){return Vu(Md,t,e)},Md.POSE_CONNECTIONS=md;const Cd={default:{primaryColor:"#4d61b0",secondaryColor:"#E8EAF6",buttonText:"#FFFFFF",borderRadius:"4px",focus:"focus:outline-none focus:ring-2 focus:ring-[#E8EAF6] focus:border-[#E8EAF6]"},sunset_gold:{primaryColor:"#FFD700",secondaryColor:"#FFF8E1",buttonText:"#5D4037",borderRadius:"8px",focus:"focus:outline-none focus:ring-2 focus:ring-[#FFF8E1] focus:border-[#FFF8E1]"},midnight_blue:{primaryColor:"#1A237E",secondaryColor:"#E8EAF6",buttonText:"#FFFFFF",borderRadius:"4px",focus:"focus:outline-none focus:ring-2 focus:ring-[#E8EAF6] focus:border-[#E8EAF6]"},forest_emerald:{primaryColor:"#2E7D32",secondaryColor:"#E8F5E9",buttonText:"#FFFFFF",borderRadius:"12px",focus:"focus:outline-none focus:ring-2 focus:ring-[#E8F5E9] focus:border-[#E8F5E9]"}};function Od(...t){return tr(function(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=er(t))&&(n&&(n+=" "),n+=e);return n}(t))}function Id(t,e,r){return new File([t],e,{type:r||t.type,lastModified:Date.now()})}const Rd={data_verification:{key:"data_verification",title:"Data verification",subtitle:"Businesses that store, process, or transmit credit or debit card information maintain a secure environment.",preview:"Verify your identity with personal data"},document_verification:{key:"document_verification",title:"Document verification",subtitle:"Businesses that store, process, or transmit credit or debit card information maintain a secure environment.",preview:"Verify your identity with ID documents"}},jd={global:{passport:{title:"Passport",key:"passport"}},kenya:{},nigeria:{bvn:{title:"Bank Verification Number (BVN)",key:"bvn"},nin:{title:"National Identity Number (NIN)",key:"nin"},passport:{title:"Nigeria Passport",key:"passport"}}},Dd=["liveness-intro","liveness-check","success-confirmation"];function Ud({config:t,selectedTheme:e,onNext:r}){/* @__PURE__ */
|
|
3
|
+
return Ut("section",{className:"sc:space-y-4",children:[
|
|
4
|
+
/* @__PURE__ */Ut("section",{className:"sc:space-y-2",children:[
|
|
5
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-left sc:text-2xl sc:font-semibold sc:text-gray-600",children:"Verify your identity"}),
|
|
6
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-left sc:text-sm sc:text-gray-500",children:"Please note that you need to be on a well-connected network to complete this verification. You will undergo the following verification:"})]}),
|
|
7
|
+
/* @__PURE__ */Ut("div",{className:"sc:w-full sc:space-y-5 sc:pb-2 sc:pt-3",children:Object.values(Rd).map(e=>t.verification_type?.includes(e.key)?/* @__PURE__ */Ut("button",{className:Od("sc:flex sc:w-full sc:items-start sc:justify-start sc:gap-2 sc:rounded-3xl sc:px-4 sc:py-3","sc:pointer-events-none sc:border sc:border-gray-200"),children:/* @__PURE__ */Ut("div",{className:"sc:space-y-1",children:[
|
|
8
|
+
/* @__PURE__ */Ut("p",{className:Od("sc:text-md sc:text-left sc:font-semibold","sc:text-gray-600"),children:e.title}),
|
|
9
|
+
/* @__PURE__ */Ut("p",{className:Od("sc:text-left sc:text-sm sc:text-gray-500"),children:e.preview})]})},e.key):null)}),
|
|
10
|
+
/* @__PURE__ */Ut("button",{onClick:r,className:Od("sc:text-md sc:h-12 sc:w-full sc:rounded-xl sc:text-center sc:font-semibold sc:text-white"),style:{background:e.primaryColor},children:"Continue"})]})}function Bd({options:t,value:e,onChange:r,selectedTheme:n,placeholder:o}){const[s,i]=et(!1),a=nt(null),c=nt(null),[l,u]=et(0);rt(()=>{const t=t=>{const e=t.composedPath();c.current&&a.current&&!e.includes(c.current)&&!e.includes(a.current)&&i(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]),rt(()=>{a.current&&u(a.current.offsetWidth)},[s]);const d=t.find(t=>t.value===e)?.label||o||"Select";/* @__PURE__ */
|
|
11
|
+
return Ut("div",{className:"sc:relative sc:inline-block sc:text-left sc:w-full",children:[
|
|
12
|
+
/* @__PURE__ */Ut("button",{ref:a,onClick:()=>i(!s),className:Od("\n sc:w-full sc:px-4 sc:py-2 sc:rounded-lg sc:border sc:border-gray-300\n sc:shadow-sm sc:text-gray-700 sc:text-sm\n sc:bg-white\n sc:flex sc:justify-between sc:items-center\n sc:capitalize\n ",n.focus),children:[
|
|
13
|
+
/* @__PURE__ */Ut("span",{children:d}),
|
|
14
|
+
/* @__PURE__ */Ut("svg",{className:"sc:w-4 sc:h-4 sc:ml-2 sc:transition-transform sc:duration-200 "+(s?"sc:rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */Ut("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&/* @__PURE__ */Ut("div",{ref:c,className:"sc:absolute sc:z-10 sc:mt-1 sc:bg-white shadow-lg sc:rounded-lg sc:max-h-60 sc:overflow-auto",style:{width:l},children:t.map(t=>/* @__PURE__ */Ut("div",{onMouseDown:e=>{e.preventDefault(),r(t.value),i(!1)},className:`\n sc:cursor-pointer sc:px-4 sc:py-2 sc:text-sm sc:text-gray-700 sc:capitalize\n ${t.value===e?"sc:font-semibold":""}\n `,children:t.label},t.value))})]})}let zd=[],Gd=[];const Vd=()=>{Gd.forEach(t=>t(zd))},Hd=(t,e)=>{const r=crypto.randomUUID(),n={id:r,message:t,type:e};return zd=[...zd,n],Vd(),r},Wd=t=>{zd=t?zd.filter(e=>e.id!==t):[],Vd()},Kd={subscribe:t=>(Gd.push(t),t(zd),()=>{Gd=Gd.filter(e=>e!==t)}),success(t){const e=Hd(t,"success");setTimeout(()=>Wd(e),3e3)},error(t){const e=Hd(t,"error");setTimeout(()=>Wd(e),3e3)},loading:t=>Hd(t,"loading"),dismiss(t){Wd(t)}};function $d({config:t,selectedTheme:e,onSubmit:r,handleIdUpdate:n,idFile:o}){const s=nt(null),[i,a]=et({identifier:"",identifier_type:"",country:""}),c=ot(()=>Object.keys(t.channels||{}),[t.channels]),l=ot(()=>{let e={};const r=t?.channels?.[i.country]||[];return r?.forEach(t=>{const r=jd?.[i?.country]?.[t]||null;r&&(e[t]=r)}),e},[t.channels,i.country]),u=ot(()=>jd?.[i.country||""]?.[i?.identifier_type||""]||null,[i?.identifier_type]),d=ot(()=>Object.entries(l).map(t=>{const[e,r]=t;return{label:r.title,value:e}}),[l]),h=(t,e)=>{a(r=>({...r,[t]:e}))},f=()=>{s.current&&(s.current.value="",s.current.files=null),n(void 0,void 0)};/* @__PURE__ */
|
|
15
|
+
return Ut("section",{className:"sc:space-y-6",children:[
|
|
16
|
+
/* @__PURE__ */Ut("section",{className:"sc:space-y-2",children:[
|
|
17
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-left sc:text-2xl sc:font-semibold sc:text-gray-600",children:"Verify your identity"}),
|
|
18
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-left sc:text-sm sc:text-gray-500",children:"Identity verification. Please note that you need to be on a well-connected network to complete this verification."})]}),
|
|
19
|
+
/* @__PURE__ */Ut("div",{className:"sc:mx-auto sc:space-y-5",children:[
|
|
20
|
+
/* @__PURE__ */Ut("div",{children:[
|
|
21
|
+
/* @__PURE__ */Ut("label",{className:"sc:block sc:text-sm sc:font-medium sc:text-gray-700 sc:mb-1 sc:text-left",children:"Country"}),
|
|
22
|
+
/* @__PURE__ */Ut(Bd,{options:(p=c,p.map(t=>({label:t,value:t}))),onChange:t=>h("country",t),value:i.country,selectedTheme:e,placeholder:"Select country"})]}),
|
|
23
|
+
/* @__PURE__ */Ut("div",{children:[
|
|
24
|
+
/* @__PURE__ */Ut("label",{className:"sc:block sc:text-sm sc:font-medium sc:text-gray-700 sc:mb-1 sc:text-left",children:"Verification Channel"}),
|
|
25
|
+
/* @__PURE__ */Ut(Bd,{options:d,onChange:t=>h("identifier_type",t),value:i.identifier_type,selectedTheme:e,placeholder:"Select verification channel"})]}),i.identifier_type?/* @__PURE__ */Ut("div",{children:[
|
|
26
|
+
/* @__PURE__ */Ut("label",{className:"sc:block sc:text-sm sc:font-medium sc:text-gray-700 sc:mb-1 sc:text-left",children:u?.title||"Input"}),
|
|
27
|
+
/* @__PURE__ */Ut("input",{ref:s,type:"text",placeholder:"Enter "+i.identifier_type,value:i.identifier,onChange:t=>h("identifier",t.target.value),className:Od("\n sc:block sc:bg-white sc:w-full sc:px-2 sc:py-1.5 sc:rounded-lg\n sc:border sc:border-gray-300\n sc:shadow-sm\n sc:text-gray-700 sc:text-sm\n sc:transition-all\n sc:hover:border-gray-400",e.focus)})]}):null,i?.identifier_type&&t?.verification_type?.includes("document_verification")?/* @__PURE__ */Ut("div",{children:[
|
|
28
|
+
/* @__PURE__ */Ut("label",{className:"sc:block sc:text-sm sc:font-medium sc:text-gray-700 sc:mb-1 sc:text-left",children:"Upload identity document"}),
|
|
29
|
+
/* @__PURE__ */Ut("div",{className:"sc:flex sc:w-full cursor-pointer sc:flex-col sc:items-center sc:justify-center sc:gap-1 sc:rounded-xl sc:border-4 sc:border-dashed sc:border-[#CBD5E1] sc:bg-[#F8F8F8] sc:px-4 sc:py-6",children:[
|
|
30
|
+
/* @__PURE__ */Ut("input",{type:"file",name:"id-doc",id:"id-doc",hidden:!0,onChange:async t=>{const e=t.target.files?.[0];if(!e)return;if(!["image/jpeg","image/png"].includes(e.type))return Kd.error("Only JPG and PNG files are allowed."),void(t.target.value="");if(e?.size>204800)Kd.error("Max file size is 200kb");else{f(),Kd.loading("Scanning document for photo...");try{const t=await(async t=>{const e=await ru.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm"),r=await ad.createFromOptions(e,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},runningMode:"IMAGE"}),n=new Image,o=URL.createObjectURL(t);n.src=o,await n.decode(),URL.revokeObjectURL(o);const s=r.detect(n);if(s.faceLandmarks&&s.faceLandmarks.length>0){const t=s.faceLandmarks[0],e=document.createElement("canvas"),o=e.getContext("2d"),i=t.map(t=>t.x*n.width),a=t.map(t=>t.y*n.height),c=Math.min(...i),l=Math.max(...i),u=Math.min(...a),d=l-c,h=Math.max(...a)-u,f=.5*d;return e.width=224,e.height=224,o?.drawImage(n,c-f,u-f,d+2*f,h+2*f,0,0,224,224),r.close(),new Promise(t=>e.toBlob(t,"image/jpeg",.95))}return r.close(),null})(e);if(!t)return Kd.dismiss(),void Kd.error("Could not find a clear face on this ID. Please upload a clearer image.");const r=new FileReader;r.onload=function(){},r.readAsDataURL(t);const o=`snapshot-${/* @__PURE__ */(new Date).getTime()}.jpg`,s=new File([t],o,{type:"image/jpeg"});Kd.dismiss(),Kd.success("ID Photo extracted!"),n(e,s)}catch(r){Kd.dismiss(),Kd.error("Error processing document. Please upload a document with your face on it")}}}},o?o.name:"empty"),
|
|
31
|
+
/* @__PURE__ */Ut("label",{htmlFor:"id-doc",className:"sc:text-center sc:text-sm sc:text-gray-600",children:"Click to upload"}),
|
|
32
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-center sc:text-sm sc:font-normal sc:text-gray-400",children:"Accepted file types: JPG, PNG"})]}),
|
|
33
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-sm sc:text-gray-600 sc:font-semibold",children:"Max file size: 200KB"}),o&&/* @__PURE__ */Ut("aside",{className:"sc:mt-3",children:/* @__PURE__ */Ut("ul",{children:/* @__PURE__ */Ut("li",{className:"sc:m-0 sc:mb-1 sc:flex sc:justify-between sc:gap-3 sc:p-2 sc:hover:rounded-3xl sc:hover:border-1.5 sc:hover:border-gray-100 sc:hover:!bg-transparent",children:[
|
|
34
|
+
/* @__PURE__ */Ut("div",{className:"sc:flex sc:flex-1 sc:gap-3",children:/* @__PURE__ */Ut("div",{className:"sc:flex sc:flex-1 sc:flex-col",children:/* @__PURE__ */Ut("p",{className:"sc:break-all sc:text-left sc:text-[14px] sc:font-normal sc:text-gray-600",children:o?.name})})}),
|
|
35
|
+
/* @__PURE__ */Ut("div",{className:"sc:flex shrink-0 sc:gap-2",children:/* @__PURE__ */Ut("button",{onClick:f,className:"sc:text-lg sc:font-semibold",children:/* @__PURE__ */Ut("img",{src:"https://res.cloudinary.com/dilpkxreh/image/upload/v1771844904/trash_eshhwf.svg",className:"size-5 sc:mx-auto shrink-0",alt:"delete",loading:"eager"})})})]})})})]}):null]}),
|
|
36
|
+
/* @__PURE__ */Ut("button",{onClick:()=>r(i.identifier,i.identifier_type,i.country),className:Od("sc:text-md sc:h-12 sc:w-full sc:rounded-xl sc:text-center sc:font-semibold sc:disabled:opacity-50"),disabled:!i?.country||!i?.identifier||!i?.identifier_type||!o&&t.verification_type.includes("document_verification"),style:{background:e.primaryColor,color:e.buttonText},children:"Continue"}),
|
|
37
|
+
/* @__PURE__ */Ut("div",{className:"sc:w-full sc:h-12"})]});var p}function qd({selectedTheme:t,onStart:e}){/* @__PURE__ */
|
|
38
|
+
return Ut("section",{className:"sc:mt-8 sc:space-y-6",children:[
|
|
39
|
+
/* @__PURE__ */Ut("section",{className:"sc:space-y-2",children:[
|
|
40
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-left sc:text-2xl sc:font-semibold sc:text-gray-600",children:"Liveliness Check"}),
|
|
41
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-left sc:text-sm sc:text-gray-500",children:["Make sure you are in a well lit area, hold your phone at eye level and look straight into the camera."," "]})]}),
|
|
42
|
+
/* @__PURE__ */Ut("ul",{className:"sc:mx-auto sc:max-w-[80%] sc:list-disc sc:text-sm sc:text-gray-600 sc:[&_li]:hover:bg-transparent!",children:[
|
|
43
|
+
/* @__PURE__ */Ut("li",{children:"Stay in a well lit area with your eyes clearly visible. "}),
|
|
44
|
+
/* @__PURE__ */Ut("li",{children:"Remove anything covering your face like masks, glasses, hats."}),
|
|
45
|
+
/* @__PURE__ */Ut("li",{children:"Follow the onscreen instruction for face capture."})]}),
|
|
46
|
+
/* @__PURE__ */Ut("button",{onClick:e,className:Od("sc:text-md sc:h-12 sc:w-full sc:rounded-xl sc:text-center sc:font-semibold "),style:{background:t.primaryColor,color:t.buttonText},children:"Take a selfie"})]})}const Yd=[362,385,387,263,373,380],Xd=[33,160,158,133,153,144],Jd=t=>{const e=t[1].x,r=t[234].x,n=(e-r)/(t[454].x-r);return n<.35?"LEFT":n>.65?"RIGHT":"CENTER"};class Zd{baseUrl;timeout;session;onError;destroy;constructor(t,e){this.baseUrl="http://localhost:8000",this.timeout=t.timeout||45e3,this.session=t.session,this.onError=t.onError,this.destroy=e}async request(t,e,r,n){const o=new AbortController,s=setTimeout(()=>o.abort(),this.timeout);try{const s=r instanceof FormData,a=await fetch(`${this.baseUrl}${e}`,{method:t,headers:{Authorization:`Session ${this.session}`,...n||{},...s?{}:{"Content-Type":"application/json"}},body:r?s?r:JSON.stringify(r):void 0,signal:o.signal});if(!(a.headers.get("content-type")||"").includes("application/json"))throw new Error(`Unexpected response from ${e} (${a.status})`);let c;try{c=await a.json()}catch(i){c=null}if(!a.ok){const t=c?.message||c?.error||`Error: ${a.status}`;throw{status:a.status,message:t,data:c}}return c}catch(a){throw"AbortError"===a.name?this.onError?.({error:a,message:"Request timeout",code:"TIMEOUT_ERROR"}):403==a.status||401==a.status?(this.onError?.({error:a,message:"Session expired. Please restart the process",code:"AUTH_ERROR"}),console.error("Authentication failed. Session is no longer valid."),setTimeout(()=>{"function"==typeof this.destroy&&this.destroy()},2e3)):this.onError?.({error:a||a.data,message:"An error occured",code:"UNKNOWN_ERROR"}),a}finally{clearTimeout(s)}}post(t,e,r){return this.request("POST",t,e,r)}patch(t,e,r){return this.request("PATCH",t,e,r)}get(t){return this.request("GET",t)}}function Qd({onComplete:t,canClose:e}){const[r,n]=et(0);return rt(()=>{let o;return r<99?o=setInterval(()=>{n(t=>{const e=t+(Math.floor(10*Math.random())+1);return e>=99?99:e})},500):99===r&&e&&(n(100),t&&t()),()=>clearInterval(o)},[r,e,t]),/* @__PURE__ */Ut("div",{className:"sc:mt-8 sc:space-y-4",children:[
|
|
47
|
+
/* @__PURE__ */Ut("section",{className:"sc:space-y-1",children:[
|
|
48
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-center sc:animate-pulse sc:text-2xl sc:font-semibold sc:text-gray-600",children:"Finalizing Verification..."}),
|
|
49
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-center sc:text-sm sc:text-gray-600",children:"Please do not close this page"})]}),
|
|
50
|
+
/* @__PURE__ */Ut("div",{className:"sc:w-full sc:max-w-[55%] sc:mx-auto sc:bg-gray-100 sc:rounded-full sc:h-2",children:/* @__PURE__ */Ut("div",{className:"sc:bg-secondary-5 sc:h-2 sc:rounded-full sc:transition-all sc:duration-300 sc:ease-out",style:{width:`${r}%`}})}),
|
|
51
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-center sc:text-sm sc:text-gray-600",children:[r,"%"]})]})}const th=[{id:"CENTER",label:"Center your face in the oval",subtitle:"Position your face inside of the circle and take a photo."},{id:"BLINK",label:"Blink your eyes",subtitle:"While your face is centered, blink your eyes twice."},{id:"TURN_HEAD",label:"Turn your head",subtitle:"Slowly turn your head left or right"},{id:"OPEN_MOUTH",label:"Open your mouth",subtitle:"Open your mouth"}],eh=({sdkInstance:t,updateStep:e,config:r,idFile:n,snapshotFile:o,identityFormData:s,handleDetectionPass:i})=>{const a=nt(null),c=nt(null),l=nt(0),u=nt(0),d=nt(null),h=nt(null),f=nt(null),p=nt(!1),m=nt(null),g=nt(!1),[_,y]=et(0),[b,w]=et(!1),[x,k]=et(),[E,A]=et(null),[S,T]=et(),[N,L]=et(!1),[F,P]=et(!1),[M,C]=et(!1),[O,I]=et(!1),[R,j]=et("neutral"),[D,U]=et(!1),B=nt(!1),z=nt(null),G=nt([]),V=()=>{h.current&&cancelAnimationFrame(h.current),d.current&&(d.current.getTracks().forEach(t=>{t.stop(),t.enabled=!1}),d.current=null),a.current&&(a.current.srcObject=null)},H=()=>{B.current||l.current>=th.length||(B.current=!0,j("success"),f.current&&clearTimeout(f.current),setTimeout(()=>{if(l.current<th.length-1){const t=l.current+1;y(t),j("neutral"),B.current=!1}else console.log("🎊 All actions done!"),W()},2e3))},W=async()=>{let t;P(!0),i(),V(),S||(t=await q()),await K(t)},K=async e=>{const r=e||S;if(!m.current?.id||!r)return Kd.error("Invalid payload"),A(null),k(void 0),w(!1),L(!1),U(!1),y(0),T(void 0),void P(!1);const n=new Zd(t);try{P(!0);const e=new FormData;e.append("entry",m.current.id.toString()),e.append("session",t.session),e.append("video_file",r);"success"==(await n.post("/v1/liveness/submit/",e)).status&&C(!0)}catch(o){const e=o?.message||o.response?.data?.message||"Submission failed";Kd.error(e),t.onError?.({error:o,message:e,code:"SUBMISSION_ERROR"}),setTimeout(()=>{window.location.reload()},3e3)}};rt(()=>{if(O&&!(_>=th.length))return j("neutral"),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{j("error")},5e3),()=>{f.current&&clearTimeout(f.current)}},[_,O]),rt(()=>{l.current=_},[_]),rt(()=>{if(E||!x||N||p.current||!s)return;const e=new Zd(t);(async()=>{p.current=!0;try{const t=new FormData;t.append("sdk_config",r.id.toString()),t.append("autoshot_file",x),t.append("challenge_actions",JSON.stringify(th.filter(t=>"CENTER"!==t.id).map(t=>t.id))),t.append("identifier",s.identifier),t.append("identifier_type",s.identifier_type),t.append("country",s?.country),r.verification_type.includes("document_verification")&&(t.append("id_file",n),t.append("snapshot_file",o)),L(!0);const i=await e.post("/v1/liveness/create/",t);"success"==i.status&&i.data&&setTimeout(()=>{A(i.data),m.current=i.data,L(!1)},1500)}catch(i){const e=i?.message||i.response?.data?.message||"An error occured. Please try again";Kd.error(e),t.onError?.({error:i,message:e,code:"ENTRY_CREATION_ERROR"}),L(!1),setTimeout(()=>{window.location.reload()},3e3)}})()},[E,x]),rt(()=>{if(D)return;let e,r;U(!0);const n=async()=>{if(!a.current||!e||"success"===R||B.current)return void(h.current=requestAnimationFrame(n));const o=performance.now(),s=e.detectForVideo(a.current,o);if(s.faceLandmarks&&s.faceLandmarks.length>0){const e=s.faceLandmarks[0],n=th[l.current];if(l.current==th.length)return;if("CENTER"===n.id){const n=e[1];if(n.x>.4&&n.x<.6&&n.y>.4&&n.y<.6){if(!g.current){g.current=!0;const e=await new Promise(t=>{if(!a.current)return null;const e=document.createElement("canvas");e.width=a.current.videoWidth,e.height=a.current.videoHeight;const r=e.getContext("2d");r?.drawImage(a.current,0,0),e.toBlob(e=>{t(e)},"image/jpeg",.9)});if(e){const r=Id(e,`autoshot-${t.session}.jpg`,"image/jpeg");k(r),w(!0)}else g.current=!1}g.current&&m.current&&!B.current&&("recording"!==z.current?.state&&$(r),H())}}else if("BLINK"===n.id){let t=(t=>{const e=e=>{const r=e.map(e=>t[e]);return(Math.hypot(r[1].x-r[5].x,r[1].y-r[5].y)+Math.hypot(r[2].x-r[4].x,r[2].y-r[4].y))/(2*Math.hypot(r[0].x-r[3].x,r[0].y-r[3].y))};return(e(Yd)+e(Xd))/2<.18})(e);t?H():u.current=0}else"TURN_HEAD"===n.id?"LEFT"!==Jd(e)&&"RIGHT"!==Jd(e)||H():"OPEN_MOUTH"===n.id&&(t=>{const e=t[13],r=t[14],n=t[78],o=t[308];return Math.hypot(e.x-r.x,e.y-r.y)/Math.hypot(n.x-o.x,n.y-o.y)>.35})(e)&&H()}h.current=requestAnimationFrame(n)};return(async()=>{const t=await ru.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm");e=await ad.createFromOptions(t,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},runningMode:"VIDEO",numFaces:1}),e&&!O&&I(!0),r=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user",width:{ideal:480},height:{ideal:640},frameRate:{ideal:15}}}),a.current&&(a.current.srcObject=r,a.current.onloadedmetadata=()=>{a.current?.play(),n()})})(),()=>{V(),c.current&&clearTimeout(c.current),"inactive"!==z.current?.state&&z.current?.stop()}},[]);const $=e=>{G.current=[];const r=["video/webm;codecs=vp8","video/webm","video/mp4"].find(t=>MediaRecorder.isTypeSupported(t));if(!r)return void Kd.error("Browser does not support recording");const n={mimeType:r,videoBitsPerSecond:25e4};try{z.current=new MediaRecorder(e,n)}catch(o){z.current=new MediaRecorder(e)}z.current.ondataavailable=t=>{t.data&&t.data.size>0&&G.current.push(t.data)},z.current.onstop=()=>{const e=new Blob(G.current,{type:"video/webm"});if(e.size>0){const r=Id(e,`session-${t.session}.webm`,"video/webm");T(r)}},z.current.start(),c.current=setTimeout(()=>{q()},2e4)},q=async()=>{const e=z.current;return e&&"inactive"!==e.state?new Promise(r=>{c.current&&(clearTimeout(c.current),c.current=null);const n=()=>{e.removeEventListener("stop",n);const o=Id(new Blob(G.current,{type:"video/webm"}),`session-${t.session}.webm`,"video/webm");d.current&&d.current.getTracks().forEach(t=>t.stop()),r(o)};e.addEventListener("stop",n),e.stop()}):S||void 0};/* @__PURE__ */
|
|
52
|
+
return Ut(v,{children:F?/* @__PURE__ */Ut(Qd,{canClose:M,onComplete:()=>{t.onSuccess?.({data:{entryId:m.current?.id,identifier:m.current?.identifier,identifier_type:m.current?.identifier_type,video_url:m.current?.video_url,autoshot_url:m.current?.autoshot_url,document_url:m.current?.document_url||null},status:200,message:"Liveness captured successfully"}),e("success-confirmation"),P(!1)}}):/* @__PURE__ */Ut("section",{className:"sc:space-y-3 sc:relative sc:flex sc:flex-col sc:items-start sc:justify-center sc:p-4 sc:h-[400px]",children:[
|
|
53
|
+
/* @__PURE__ */Ut("div",{className:"sc:text-left",children:[
|
|
54
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-2xl sc:font-bold sc:text-gray-600 sc:animate-pulse",children:O?0===_&&!E&&b?"Synchronizing Session...":th[_]?.label:"Getting ready..."}),O&&E?/* @__PURE__ */Ut("p",{className:"sc:text-sm sc:text-gray-500",children:th[_]?.subtitle}):null]}),
|
|
55
|
+
/* @__PURE__ */Ut("div",{className:Od("sc:relative sc:w-full sc:max-w-md sc:aspect-[3/4] sc:overflow-hidden sc:rounded-3xl",O?"sc:bg-[rgba(0,0,0,0.6)]":"sc:bg-[#262A2F]"),children:[
|
|
56
|
+
/* @__PURE__ */Ut("video",{ref:a,className:"sc:absolute sc:inset-0 sc:w-full sc:h-full sc:object-cover sc:mirror",muted:!0,playsInline:!0}),/* @__PURE__ */Ut("div",O?{className:"sc:absolute sc:inset-0 sc:pointer-events-none sc:flex sc:items-center sc:justify-center",children:/* @__PURE__ */Ut("svg",{viewBox:"0 0 100 100",className:"sc:w-[80%] sc:h-[80%] sc:overflow-visible",children:/* @__PURE__ */Ut("ellipse",{cx:"50",cy:"50",rx:"35",ry:"45",fill:"none",strokeWidth:"3",className:Od("sc:transition-colors sc:duration-500 sc:ease-in-out","neutral"===R&&"sc:stroke-white/50","success"===R&&"sc:stroke-[#62DF98]","error"===R&&"sc:stroke-error-6/60"),style:{filter:"neutral"!==R?`drop-shadow(0 0 8px ${"success"===R?"#22c55e":"#ef4444"})`:"none"}})})}:{className:"sc:absolute sc:w-full sc:h-full sc:gap-1.5 sc:pointer-events-none sc:flex sc:flex-col sc:items-center sc:justify-center",children:[
|
|
57
|
+
/* @__PURE__ */Ut("img",{src:"https://res.cloudinary.com/dilpkxreh/image/upload/v1771844904/loading_c1wddz.svg",alt:"loading",loading:"eager",className:"size-9 sc:animate-spin"}),
|
|
58
|
+
/* @__PURE__ */Ut("span",{className:"sc:text-white sc:text-sm sc:text-center",children:"Loading camera"})]})]})]})})};function rh({redirect_url:t,destroy:e}){return rt(()=>{const r=setTimeout(()=>{t?window.location.assign(t):e()},3e3);return()=>clearTimeout(r)},[]),/* @__PURE__ */Ut("section",{className:"sc:mt-8 sc:space-y-3",children:[
|
|
59
|
+
/* @__PURE__ */Ut("img",{src:"https://res.cloudinary.com/dilpkxreh/image/upload/v1771844904/success_whdphq.svg",className:"size-44 sc:mx-auto shrink-0",alt:"success-icon",loading:"eager"}),
|
|
60
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-center sc:text-2xl sc:font-semibold sc:text-gray-600",children:"Identity verified"}),
|
|
61
|
+
/* @__PURE__ */Ut("p",{className:"sc:text-center sc:text-sm sc:text-gray-600",children:"We have successfully verified your identity. You can close this page now."})]})}function nh({destroy:t,onExpire:e}){const[r,n]=et(120),[o,s]=et(!1);rt(()=>{const t=setInterval(()=>{n(t=>t>0?t-1:0)},1e3);return()=>clearInterval(t)},[]),rt(()=>{if(r>0&&!o)return;Kd.error("Time limit exceeded"),s(!1);const n=setTimeout(()=>{e?.(),t()},1500);return()=>clearTimeout(n)},[r,o]);const i=Math.floor(r/60),a=r%60;/* @__PURE__ */
|
|
62
|
+
return Ut("p",{className:Od("sc:text-2xl sc:font-bold sc:font-[monospace]",r<60?"sc:text-error-6":"sc:text-gray-600"),children:[i,":",a.toString().padStart(2,"0")]})}function oh(){const[t,e]=et([]);return rt(()=>Kd.subscribe(e),[]),/* @__PURE__ */Ut("div",{className:"sc:fixed sc:top-6 sc:left-1/2 sc:-translate-x-1/2 sc:z-50 sc:flex sc:flex-col sc:gap-3 sc:w-auto",children:t.map(t=>/* @__PURE__ */Ut("div",{className:`\n sc:flex sc:items-center sc:gap-3\n sc:px-4 sc:py-3\n sc:rounded-lg\n sc:shadow-lg\n sc:text-sm\n sc:text-white\n sc:animate-in sc:fade-in sc:slide-in-from-top-2\n ${"success"===t.type?"sc:bg-green-600":"error"===t.type?"sc:bg-red-600":"sc:bg-gray-50 sc:text-gray-500!"}\n `,children:[
|
|
63
|
+
/* @__PURE__ */Ut(sh,{type:t.type}),
|
|
64
|
+
/* @__PURE__ */Ut("span",{children:t.message})]},t.id))})}function sh({type:t}){/* @__PURE__ */
|
|
65
|
+
return Ut("svg","success"===t?{className:"sc:w-4 sc:h-4",viewBox:"0 0 20 20",fill:"currentColor",children:/* @__PURE__ */Ut("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-7.25 7.25a1 1 0 01-1.414 0L3.293 9.207a1 1 0 011.414-1.414l3.043 3.043 6.543-6.543a1 1 0 011.414 0z",clipRule:"evenodd"})}:"error"===t?{className:"sc:w-4 sc:h-4",viewBox:"0 0 20 20",fill:"currentColor",children:/* @__PURE__ */Ut("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3-10a1 1 0 10-2 0v2a1 1 0 102 0V8zm-4 0a1 1 0 10-2 0v2a1 1 0 102 0V8zm1 6a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",clipRule:"evenodd"})}:{className:"sc:w-4 sc:h-4 sc:animate-spin",viewBox:"0 0 24 24",fill:"none",children:[
|
|
66
|
+
/* @__PURE__ */Ut("circle",{className:"sc:opacity-25",cx:"12",cy:"12",r:"10",stroke:"#64748b",strokeWidth:"4"}),
|
|
67
|
+
/* @__PURE__ */Ut("path",{className:"sc:opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}const ih=({sdkInstance:t})=>{const[e,r]=et("loading"),[n,o]=et(null),[s,i]=et(),[a,c]=et(),[l,u]=et(),[d,h]=et(!1),f=ot(()=>t.getConfig(),[t]),p=ot(()=>{return t=n?.theme,Cd[t]||Cd.default;var t},[n?.theme]),m=ot(()=>({identity:1,"liveness-intro":2,"liveness-check":3}[e]||0),[e]);return rt(()=>{const e=t.getHttp();(async()=>{try{r("loading");const t=await e.get("/v1/sdk/initialize/");"success"==t.status&&t.data&&setTimeout(()=>{o(t.data),r("welcome")},1500)}catch(t){const e=t?.message||"An error occured. Please try again";Kd.error(e),r("")}})()},[]),/* @__PURE__ */Ut("main",n?{id:"smartcomply-sdk-root",className:"sc-overlay sc:overflow-y-auto sc:flex sc:h-full sc:min-h-screen sc:bg-gray-50",children:[
|
|
68
|
+
/* @__PURE__ */Ut("div",{id:"liveness-container",className:""}),
|
|
69
|
+
/* @__PURE__ */Ut(oh,{}),
|
|
70
|
+
/* @__PURE__ */Ut("div",{className:"sc:fixed sc:bg-gray-50 sc:top-0 sc:flex sc:w-full sc:items-center sc:justify-between sc:px-4 sc:py-4 sc:sm:px-10",children:[
|
|
71
|
+
/* @__PURE__ */Ut("section",{className:"sc:flex sc:items-center sc:gap-4",children:/* @__PURE__ */Ut("h2",{className:"sc:text-center sc:text-lg sc:font-semibold sc:text-gray-600 sc:md:text-xl",children:n?.brand_name?n?.brand_name:"Brand name"})}),
|
|
72
|
+
/* @__PURE__ */Ut("div",{className:"sc:flex sc:items-center sc:justify-end sc:gap-4",children:[d?/* @__PURE__ */Ut(nh,{destroy:t.destroy,onExpire:f?.onExpire}):null,"welcome"===e||"loading"===e?null:/* @__PURE__ */Ut("p",{className:"sc:relative sc:text-center sc:text-sm sc:font-medium sc:text-gray-400",children:m?`Step ${m} of 3`:"All Done"})]})]}),
|
|
73
|
+
/* @__PURE__ */Ut("div",{className:"sc:fixed sc:z-1 sc:bg-gray-50 sc:md:bg-transparent! sc:bottom-0 sc:flex sc:w-full sc:items-center sc:justify-center sc:px-10 sc:py-4 sc:md:bottom-6 sc:md:right-8 sc:md:justify-between",children:[
|
|
74
|
+
/* @__PURE__ */Ut("span",{className:"sc:hidden sc:md:flex"}),
|
|
75
|
+
/* @__PURE__ */Ut("p",{className:"sc:relative sc:pt-2 sc:text-center sc:text-xs sc:font-medium sc:text-gray-400",children:"Powered by Adhere"})]}),
|
|
76
|
+
/* @__PURE__ */Ut("div",{className:"sc:flex sc:flex-1 sc:items-start sc:justify-center sc:px-4 sc:py-24! sc:sm:px-10 sc:md:justify-start sc:h-full",children:/* @__PURE__ */Ut("div",{className:Od("sc:w-full sc:max-w-[500px] sc:max-sm:w-[80vw] sc:max-[450px]:!w-[calc(100vw_-_2rem)]",Dd.includes(e)?"mx-auto":""),children:["loading"===e&&/* @__PURE__ */Ut(zt,{selectedTheme:p}),"welcome"===e&&/* @__PURE__ */Ut(Ud,{config:n,onNext:()=>{r("identity"),h(!0)},selectedTheme:p}),"identity"===e&&/* @__PURE__ */Ut($d,{config:n,onSubmit:async(e,o,i)=>{if(!s&&n?.verification_type?.includes("document_verification"))return void Kd.error("Please upload ID");const a={session_id:f.session,onboarding_type:o,id_number:e,name_to_confirm:"",[o]:e};u({identifier:e,identifier_type:o,country:i});try{const e=t.getHttp(),n=await e.post("/v1/onboarding/verify",a);"verified"===n.status&&(Kd.success(n.message||"Verification successful"),r("liveness-intro"))}catch(c){const t=c?.message||"An error occured. Please try again";Kd.error(t)}},selectedTheme:p,handleIdUpdate:async(t,e)=>{i(t),c(e)},idFile:s}),"liveness-intro"===e&&/* @__PURE__ */Ut(qd,{config:n,onStart:()=>r("liveness-check"),selectedTheme:p}),"liveness-check"===e&&/* @__PURE__ */Ut(eh,{config:n,updateStep:t=>r(t),sdkInstance:f,idFile:s,snapshotFile:a,identityFormData:l,handleDetectionPass:()=>h(!1)}),"success-confirmation"===e&&/* @__PURE__ */Ut(rh,{destroy:t.destroy,redirect_url:n.redirect_url})]})}),"loading"===e||"welcome"===e?/* @__PURE__ */Ut("div",{className:"sc:relative sc:hidden sc:w-[35%] sc:bg-gray-100 sc:h-full sc:md:flex",children:[
|
|
77
|
+
/* @__PURE__ */Ut("section",{className:"sc:mx-auto sc:flex sc:h-[90%] sc:max-w-[90%] sc:flex-col sc:justify-center sc:space-y-4",children:[
|
|
78
|
+
/* @__PURE__ */Ut("img",{src:"https://res.cloudinary.com/dilpkxreh/image/upload/v1771844904/shield-checkmark_cg13fd.png",className:"size-30 sc:mx-auto shrink-0",alt:"shield-checkmark",loading:"eager"}),
|
|
79
|
+
/* @__PURE__ */Ut("section",{className:"sc:space-y-2",children:[
|
|
80
|
+
/* @__PURE__ */Ut("h3",{className:"sc:text-center sc:text-xl sc:font-semibold sc:text-gray-600",children:["Welcome to"," ",n?.brand_name?n?.brand_name:"Brand Name"]}),
|
|
81
|
+
/* @__PURE__ */Ut("p",{className:"sc:break-all sc:text-center sc:text-sm sc:text-gray-500",children:n?.description?n?.description:"Description"})]})]})," ",
|
|
82
|
+
/* @__PURE__ */Ut("div",{className:"sc:absolute sc:bottom-6 sc:flex sc:w-full sc:items-center sc:justify-center",children:/* @__PURE__ */Ut("p",{className:"sc:relative sc:pt-2 sc:text-center sc:text-xs sc:font-medium sc:text-gray-400",children:"Powered by Adhere"})})]}):null]}:{id:"smartcomply-sdk-root",className:"sc-overlay sc:flex sc:h-full sc:min-h-screen sc:bg-gray-50",children:[
|
|
83
|
+
/* @__PURE__ */Ut(oh,{}),"loading"==e?/* @__PURE__ */Ut(zt,{selectedTheme:p}):null]})};class ah{http;config;root=null;containerId="smartcomply-sdk-root";constructor(t){this.config=t,this.http=new Zd(t,this.destroy.bind(this))}getConfig(){return this.config}getHttp(){return this.http}launch(){let t=document.getElementById(this.containerId);t||(t=document.createElement("div"),t.id=this.containerId,document.body.appendChild(t));const e=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent='@import"https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap";@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer components;@layer theme{:root,:host{--sc-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--sc-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--sc-color-red-600:oklch(57.7% .245 27.325);--sc-color-green-600:oklch(62.7% .194 149.214);--sc-color-gray-50:#f8fafc;--sc-color-gray-100:#f1f5f9;--sc-color-gray-200:#e2e8f0;--sc-color-gray-300:#cbd5e1;--sc-color-gray-400:#94a3b8;--sc-color-gray-500:#64748b;--sc-color-gray-600:#475569;--sc-color-gray-700:#334155;--sc-color-white:#fff;--sc-spacing:.25rem;--sc-container-md:28rem;--sc-text-xs:.75rem;--sc-text-xs--line-height:calc(1/.75);--sc-text-sm:.875rem;--sc-text-sm--line-height:calc(1.25/.875);--sc-text-lg:1.125rem;--sc-text-lg--line-height:calc(1.75/1.125);--sc-text-xl:1.25rem;--sc-text-xl--line-height:calc(1.75/1.25);--sc-text-2xl:1.5rem;--sc-text-2xl--line-height:calc(2/1.5);--sc-font-weight-normal:400;--sc-font-weight-medium:500;--sc-font-weight-semibold:600;--sc-font-weight-bold:700;--sc-radius-lg:.5rem;--sc-radius-xl:.75rem;--sc-radius-3xl:1.5rem;--sc-ease-out:cubic-bezier(0,0,.2,1);--sc-ease-in-out:cubic-bezier(.4,0,.2,1);--sc-animate-spin:spin 1s linear infinite;--sc-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--sc-default-font-family:var(--sc-font-sans);--sc-default-mono-font-family:var(--sc-font-mono);--sc-color-error-6:#f43f5e;--sc-color-secondary-5:#ffc87f}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--sc-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--sc-default-font-feature-settings,normal);font-variation-settings:var(--sc-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--sc-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--sc-default-mono-font-feature-settings,normal);font-variation-settings:var(--sc-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.sc\\:pointer-events-none{pointer-events:none}.sc\\:absolute{position:absolute}.sc\\:fixed{position:fixed}.sc\\:relative{position:relative}.sc\\:inset-0{inset:calc(var(--sc-spacing)*0)}.sc\\:top-0{top:calc(var(--sc-spacing)*0)}.sc\\:top-6{top:calc(var(--sc-spacing)*6)}.sc\\:bottom-0{bottom:calc(var(--sc-spacing)*0)}.sc\\:bottom-6{bottom:calc(var(--sc-spacing)*6)}.sc\\:left-1\\/2{left:50%}.sc\\:z-1{z-index:1}.sc\\:z-10{z-index:10}.sc\\:z-50{z-index:50}.sc\\:m-0{margin:calc(var(--sc-spacing)*0)}.sc\\:mx-auto{margin-inline:auto}.sc\\:mt-1{margin-top:calc(var(--sc-spacing)*1)}.sc\\:mt-3{margin-top:calc(var(--sc-spacing)*3)}.sc\\:mt-8{margin-top:calc(var(--sc-spacing)*8)}.sc\\:mb-1{margin-bottom:calc(var(--sc-spacing)*1)}.sc\\:ml-2{margin-left:calc(var(--sc-spacing)*2)}.sc\\:block{display:block}.sc\\:flex{display:flex}.sc\\:hidden{display:none}.sc\\:inline-block{display:inline-block}.sc\\:aspect-\\[3\\/4\\]{aspect-ratio:3/4}.sc\\:h-2{height:calc(var(--sc-spacing)*2)}.sc\\:h-4{height:calc(var(--sc-spacing)*4)}.sc\\:h-12{height:calc(var(--sc-spacing)*12)}.sc\\:h-\\[80\\%\\]{height:80%}.sc\\:h-\\[90\\%\\]{height:90%}.sc\\:h-\\[400px\\]{height:400px}.sc\\:h-full{height:100%}.sc\\:max-h-60{max-height:calc(var(--sc-spacing)*60)}.sc\\:min-h-screen{min-height:100vh}.sc\\:w-4{width:calc(var(--sc-spacing)*4)}.sc\\:w-12{width:calc(var(--sc-spacing)*12)}.sc\\:w-\\[35\\%\\]{width:35%}.sc\\:w-\\[80\\%\\]{width:80%}.sc\\:w-auto{width:auto}.sc\\:w-full{width:100%}.sc\\:max-w-\\[55\\%\\]{max-width:55%}.sc\\:max-w-\\[80\\%\\]{max-width:80%}.sc\\:max-w-\\[90\\%\\]{max-width:90%}.sc\\:max-w-\\[500px\\]{max-width:500px}.sc\\:max-w-md{max-width:var(--sc-container-md)}.sc\\:flex-1{flex:1}.sc\\:-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.sc\\:rotate-180{rotate:180deg}.sc\\:animate-pulse{animation:var(--sc-animate-pulse)}.sc\\:animate-spin{animation:var(--sc-animate-spin)}.sc\\:cursor-pointer{cursor:pointer}.sc\\:list-disc{list-style-type:disc}.sc\\:flex-col{flex-direction:column}.sc\\:items-center{align-items:center}.sc\\:items-start{align-items:flex-start}.sc\\:justify-between{justify-content:space-between}.sc\\:justify-center{justify-content:center}.sc\\:justify-end{justify-content:flex-end}.sc\\:justify-start{justify-content:flex-start}.sc\\:gap-1{gap:calc(var(--sc-spacing)*1)}.sc\\:gap-1\\.5{gap:calc(var(--sc-spacing)*1.5)}.sc\\:gap-2{gap:calc(var(--sc-spacing)*2)}.sc\\:gap-3{gap:calc(var(--sc-spacing)*3)}.sc\\:gap-4{gap:calc(var(--sc-spacing)*4)}:where(.sc\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--sc-spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--sc-spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.sc\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--sc-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--sc-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.sc\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--sc-spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--sc-spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.sc\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--sc-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--sc-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.sc\\:space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--sc-spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--sc-spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.sc\\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--sc-spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--sc-spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.sc\\:overflow-auto{overflow:auto}.sc\\:overflow-hidden{overflow:hidden}.sc\\:overflow-visible{overflow:visible}.sc\\:overflow-y-auto{overflow-y:auto}.sc\\:rounded-3xl{border-radius:var(--sc-radius-3xl)}.sc\\:rounded-full{border-radius:3.40282e38px}.sc\\:rounded-lg{border-radius:var(--sc-radius-lg)}.sc\\:rounded-xl{border-radius:var(--sc-radius-xl)}.sc\\:border{border-style:var(--tw-border-style);border-width:1px}.sc\\:border-4{border-style:var(--tw-border-style);border-width:4px}.sc\\:border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.sc\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.sc\\:border-\\[\\#CBD5E1\\]{border-color:#cbd5e1}.sc\\:border-gray-200{border-color:var(--sc-color-gray-200)}.sc\\:border-gray-300{border-color:var(--sc-color-gray-300)}.sc\\:bg-\\[\\#262A2F\\]{background-color:#262a2f}.sc\\:bg-\\[\\#F8F8F8\\]{background-color:#f8f8f8}.sc\\:bg-\\[rgba\\(0\\,0\\,0\\,0\\.6\\)\\]{background-color:#0009}.sc\\:bg-gray-50{background-color:var(--sc-color-gray-50)}.sc\\:bg-gray-100{background-color:var(--sc-color-gray-100)}.sc\\:bg-green-600{background-color:var(--sc-color-green-600)}.sc\\:bg-red-600{background-color:var(--sc-color-red-600)}.sc\\:bg-secondary-5{background-color:var(--sc-color-secondary-5)}.sc\\:bg-white{background-color:var(--sc-color-white)}.sc\\:stroke-\\[\\#62DF98\\]{stroke:#62df98}.sc\\:stroke-error-6\\/60{stroke:var(--sc-color-error-6)}@supports (color:color-mix(in lab,red,red)){.sc\\:stroke-error-6\\/60{stroke:color-mix(in oklab,var(--sc-color-error-6)60%,transparent)}}.sc\\:stroke-white\\/50{stroke:var(--sc-color-white)}@supports (color:color-mix(in lab,red,red)){.sc\\:stroke-white\\/50{stroke:color-mix(in oklab,var(--sc-color-white)50%,transparent)}}.sc\\:object-cover{-o-object-fit:cover;object-fit:cover}.sc\\:p-2{padding:calc(var(--sc-spacing)*2)}.sc\\:p-4{padding:calc(var(--sc-spacing)*4)}.sc\\:px-2{padding-inline:calc(var(--sc-spacing)*2)}.sc\\:px-4{padding-inline:calc(var(--sc-spacing)*4)}.sc\\:px-10{padding-inline:calc(var(--sc-spacing)*10)}.sc\\:py-1\\.5{padding-block:calc(var(--sc-spacing)*1.5)}.sc\\:py-2{padding-block:calc(var(--sc-spacing)*2)}.sc\\:py-3{padding-block:calc(var(--sc-spacing)*3)}.sc\\:py-4{padding-block:calc(var(--sc-spacing)*4)}.sc\\:py-6{padding-block:calc(var(--sc-spacing)*6)}.sc\\:py-24\\!{padding-block:calc(var(--sc-spacing)*24)!important}.sc\\:pt-2{padding-top:calc(var(--sc-spacing)*2)}.sc\\:pt-3{padding-top:calc(var(--sc-spacing)*3)}.sc\\:pb-2{padding-bottom:calc(var(--sc-spacing)*2)}.sc\\:text-center{text-align:center}.sc\\:text-left{text-align:left}.sc\\:font-\\[monospace\\]{font-family:monospace}.sc\\:text-2xl{font-size:var(--sc-text-2xl);line-height:var(--tw-leading,var(--sc-text-2xl--line-height))}.sc\\:text-lg{font-size:var(--sc-text-lg);line-height:var(--tw-leading,var(--sc-text-lg--line-height))}.sc\\:text-sm{font-size:var(--sc-text-sm);line-height:var(--tw-leading,var(--sc-text-sm--line-height))}.sc\\:text-xl{font-size:var(--sc-text-xl);line-height:var(--tw-leading,var(--sc-text-xl--line-height))}.sc\\:text-xs{font-size:var(--sc-text-xs);line-height:var(--tw-leading,var(--sc-text-xs--line-height))}.sc\\:text-\\[14px\\]{font-size:14px}.sc\\:font-bold{--tw-font-weight:var(--sc-font-weight-bold);font-weight:var(--sc-font-weight-bold)}.sc\\:font-medium{--tw-font-weight:var(--sc-font-weight-medium);font-weight:var(--sc-font-weight-medium)}.sc\\:font-normal{--tw-font-weight:var(--sc-font-weight-normal);font-weight:var(--sc-font-weight-normal)}.sc\\:font-semibold{--tw-font-weight:var(--sc-font-weight-semibold);font-weight:var(--sc-font-weight-semibold)}.sc\\:break-all{word-break:break-all}.sc\\:text-error-6{color:var(--sc-color-error-6)}.sc\\:text-gray-400{color:var(--sc-color-gray-400)}.sc\\:text-gray-500{color:var(--sc-color-gray-500)}.sc\\:text-gray-500\\!{color:var(--sc-color-gray-500)!important}.sc\\:text-gray-600{color:var(--sc-color-gray-600)}.sc\\:text-gray-700{color:var(--sc-color-gray-700)}.sc\\:text-white{color:var(--sc-color-white)}.sc\\:capitalize{text-transform:capitalize}.sc\\:opacity-25{opacity:.25}.sc\\:opacity-75{opacity:.75}.sc\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.sc\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.sc\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.sc\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.sc\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.sc\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.sc\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.sc\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.sc\\:ease-in-out{--tw-ease:var(--sc-ease-in-out);transition-timing-function:var(--sc-ease-in-out)}.sc\\:ease-out{--tw-ease:var(--sc-ease-out);transition-timing-function:var(--sc-ease-out)}@media(hover:hover){.sc\\:hover\\:rounded-3xl:hover{border-radius:var(--sc-radius-3xl)}.sc\\:hover\\:border-gray-100:hover{border-color:var(--sc-color-gray-100)}.sc\\:hover\\:border-gray-400:hover{border-color:var(--sc-color-gray-400)}.sc\\:hover\\:\\!bg-transparent:hover{background-color:#0000!important}}.sc\\:disabled\\:opacity-50:disabled{opacity:.5}@media not all and (min-width:450px){.sc\\:max-\\[450px\\]\\:\\!w-\\[calc\\(100vw_-_2rem\\)\\]{width:calc(100vw - 2rem)!important}}@media not all and (min-width:40rem){.sc\\:max-sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:40rem){.sc\\:sm\\:px-10{padding-inline:calc(var(--sc-spacing)*10)}}@media(min-width:48rem){.sc\\:md\\:right-8{right:calc(var(--sc-spacing)*8)}.sc\\:md\\:bottom-6{bottom:calc(var(--sc-spacing)*6)}.sc\\:md\\:flex{display:flex}.sc\\:md\\:justify-between{justify-content:space-between}.sc\\:md\\:justify-start{justify-content:flex-start}.sc\\:md\\:bg-transparent\\!{background-color:#0000!important}.sc\\:md\\:text-xl{font-size:var(--sc-text-xl);line-height:var(--tw-leading,var(--sc-text-xl--line-height))}}@media(hover:hover){.sc\\:\\[\\&_li\\]\\:hover\\:bg-transparent\\! li:hover{background-color:#0000!important}}.bg-background{background-color:var(--color-background)}.bg-foreground{background-color:var(--color-foreground)}.bg-accent{background-color:var(--color-accent)}.bg-accent-foreground{background-color:var(--color-accent-foreground)}.bg-popover{background-color:var(--color-popover)}.bg-popover-foreground{background-color:var(--color-popover-foreground)}.bg-border{background-color:var(--color-border)}.bg-input-bg{background-color:var(--color-input-bg)}.bg-input-foreground{background-color:var(--color-input-foreground)}.bg-label{background-color:var(--color-label)}.bg-card{background-color:var(--color-card)}.bg-ring{background-color:var(--color-ring)}.bg-placeholder{background-color:var(--color-placeholder)}.bg-caption{background-color:var(--color-caption)}.bg-disabled{background-color:var(--color-disabled)}.bg-caption-error{background-color:var(--color-caption-error)}.bg-menu-bg{background-color:var(--color-menu-bg)}.bg-tooltip-bg{background-color:var(--color-tooltip-bg)}.text-background{color:var(--color-background)}.text-foreground{color:var(--color-foreground)}.text-accent{color:var(--color-accent)}.text-accent-foreground{color:var(--color-accent-foreground)}.text-popover{color:var(--color-popover)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-border{color:var(--color-border)}.text-input-bg{color:var(--color-input-bg)}.text-input-foreground{color:var(--color-input-foreground)}.text-label{color:var(--color-label)}.text-card{color:var(--color-card)}.text-ring{color:var(--color-ring)}.text-placeholder{color:var(--color-placeholder)}.text-caption{color:var(--color-caption)}.text-disabled{color:var(--color-disabled)}.text-caption-error{color:var(--color-caption-error)}.text-menu-bg{color:var(--color-menu-bg)}.text-tooltip-bg{color:var(--color-tooltip-bg)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.bg-primary-10{background-color:var(--color-primary-10)}.bg-primary-20{background-color:var(--color-primary-20)}.bg-primary-30{background-color:var(--color-primary-30)}.bg-primary-40{background-color:var(--color-primary-40)}.bg-primary-60{background-color:var(--color-primary-60)}.bg-primary-80{background-color:var(--color-primary-80)}.bg-primary-95{background-color:var(--color-primary-95)}.bg-primary-100{background-color:var(--color-primary-100)}.text-primary-10{color:var(--color-primary-10)}.text-primary-20{color:var(--color-primary-20)}.text-primary-30{color:var(--color-primary-30)}.text-primary-40{color:var(--color-primary-40)}.text-primary-60{color:var(--color-primary-60)}.text-primary-80{color:var(--color-primary-80)}.text-primary-95{color:var(--color-primary-95)}.text-primary-100{color:var(--color-primary-100)}.shadow-boxy{box-shadow:var(--shadow-boxy)}.shadow-subtle{box-shadow:var(--shadow-subtle)}.shadow-subtle2{box-shadow:var(--shadow-subtle2)}.shadow-2xl{box-shadow:var(--shadow-2xl)}.shadow-3xl{box-shadow:var(--shadow-3xl)}.font-semibold{font-family:Lexend;font-weight:600}.font-bold{font-family:Lexend;font-weight:700}.font-medium{font-family:Lexend;font-weight:500}}:host{all:initial;font-family:Lexend,sans-serif;font-weight:400;display:block}:root{color-scheme:light dark;color:#ffffffde;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--background:#f8fafc;--foreground:#334155;--primary:#202d66;--primary-foreground:#fff;--input-bg:#fff;--input-foreground:#475569;--label:#475569;--placeholder:#94a3b8;--caption:#64748b;--caption-error:#f43f5e;--disabled:#f1f5f9;--card:#fff;--card-foreground:oklch(98.5% 0 0);--popover:#fff;--popover-foreground:#475569;--menu-bg:#f1f5f9;--accent:#e9eeff;--accent-foreground:#4d61b0;--secondary:#1e293b;--secondary-foreground:0 0% 100%;--muted:#64748b;--muted-foreground:#94a3b8;--border:#e2e8f0;--ring:#4d61b0;--destructive:#f43f5e;--destructive-foreground:#cc135f;--tooltip-bg:#212529;--shadow-boxy:0px 1px 2px 0px #0a0d120d;--shadow-subtle:0px 11.76px 22.06px 0px #00000014;--shadow-subtle2:0px 4px 8px 0px #9898980a;--shadow-2xl:0px 24px 48px -12px #0a0d122e;--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);background-color:#242424;font-family:Lexend,system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}.sc-overlay{z-index:999999;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}a{color:#646cff;-webkit-text-decoration:inherit;text-decoration:inherit;font-weight:500}a:hover{color:#535bf2}body{place-items:center;min-width:320px;min-height:100vh;margin:0;display:flex}h1{font-size:3.2em;line-height:1.1}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}',e.appendChild(r);const n=document.createElement("div");n.id="sdk-inner-container",e.appendChild(n),this.root=Bt(n),this.root.render(
|
|
84
|
+
/* @__PURE__ */Ut(jt.StrictMode,{children:/* @__PURE__ */Ut(ih,{sdkInstance:this})}))}destroy=()=>{this.root&&(this.root.unmount(),this.root=null);const t=document.getElementById(this.containerId);t&&t.remove(),console.log("SDK Destroyed and cleaned up.")}}export{ah as SmartComply,ah as default};
|