@regulaforensics/idv-capture-web 0.1.89-nightly → 0.1.90-nightly
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.
|
@@ -13447,7 +13447,7 @@ var Gr = M2.create("wasm_idv"), VG = /* @__PURE__ */ function() {
|
|
|
13447
13447
|
return ie().wrap(function(s) {
|
|
13448
13448
|
for (; ; ) switch (s.prev = s.next) {
|
|
13449
13449
|
case 0:
|
|
13450
|
-
return s.prev = 1, s.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/
|
|
13450
|
+
return s.prev = 1, s.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/d9ec9d9-f6d3304b9//PlatformAdaptor.worker.js");
|
|
13451
13451
|
case 4:
|
|
13452
13452
|
return i = s.sent, s.next = 7, i.blob();
|
|
13453
13453
|
case 7:
|
|
@@ -13474,7 +13474,7 @@ var Gr = M2.create("wasm_idv"), VG = /* @__PURE__ */ function() {
|
|
|
13474
13474
|
}), s.next = 23, this.sendMessage({
|
|
13475
13475
|
target: "worker-init",
|
|
13476
13476
|
URL: document.URL,
|
|
13477
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/
|
|
13477
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/d9ec9d9-f6d3304b9/",
|
|
13478
13478
|
preMain: !0
|
|
13479
13479
|
});
|
|
13480
13480
|
case 23:
|
|
@@ -14795,9 +14795,9 @@ function k4() {
|
|
|
14795
14795
|
supportedTemplates: pt.getSupportedTemplates(),
|
|
14796
14796
|
component: pt
|
|
14797
14797
|
}], n = I4(I4({}, "LIVENESS", function() {
|
|
14798
|
-
return import("./index-
|
|
14798
|
+
return import("./index-CAdnA2V5.js");
|
|
14799
14799
|
}), "DOC_READER", function() {
|
|
14800
|
-
return import("./index-
|
|
14800
|
+
return import("./index-zwGPcWb6.js");
|
|
14801
14801
|
}), i = /* @__PURE__ */ se().mark(function y() {
|
|
14802
14802
|
var v, d, g;
|
|
14803
14803
|
return se().wrap(function(S) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Eo, r as Nn, j as qN } from "./index-
|
|
1
|
+
import { B as Eo, r as Nn, j as qN } from "./index-BzqucS5t.js";
|
|
2
2
|
var Mz = Object.defineProperty, tz = Object.defineProperties, iz = Object.getOwnPropertyDescriptors, $N = Object.getOwnPropertySymbols, nz = Object.prototype.hasOwnProperty, rz = Object.prototype.propertyIsEnumerable, es = (e, M, t) => M in e ? Mz(e, M, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[M] = t, Sy = (e, M) => {
|
|
3
3
|
for (var t in M || (M = {}))
|
|
4
4
|
nz.call(M, t) && es(e, t, M[t]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as ac, r as xo, j as ZE } from "./index-
|
|
1
|
+
import { B as ac, r as xo, j as ZE } from "./index-BzqucS5t.js";
|
|
2
2
|
var XA = Object.defineProperty, QA = Object.defineProperties, $A = Object.getOwnPropertyDescriptors, zE = Object.getOwnPropertySymbols, JA = Object.prototype.hasOwnProperty, eO = Object.prototype.propertyIsEnumerable, WE = (e, t, n) => t in e ? XA(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, q = (e, t) => {
|
|
3
3
|
for (var n in t || (t = {}))
|
|
4
4
|
JA.call(t, n) && WE(e, n, t[n]);
|
package/dist/main.iife.js
CHANGED
|
@@ -48,7 +48,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
48
48
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fUe(e,t){if(e){if(typeof e=="string")return zJ(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zJ(e,t):void 0}}function zJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function dUe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function gUe(e){if(Array.isArray(e))return e}var bM=function(t){var r=t.imageId,n=t.imageURL,i=t.base64,a=t.contentMode,o=a===void 0?T5.ASPECT_FILL:a,l=t.cornerRadius,u=t.backgroundColor,s=u===void 0?"transparent":u,c=function(D){if(D===T5.ASPECT_FILL)return"cover";if(D===T5.ASPECT_FIT)return"contain";if(D===T5.FILL)return"fill"},d=et.useState(!0),M=cUe(d,2),g=M[0],I=M[1],p=g&&n,j=function(){I(!1)};if(r){var h=r in Sv?r:"default";return x.jsx(sUe,{type:h})}if(i||n)return x.jsxs(x.Fragment,{children:[p&&x.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:"#e0e0e0",borderRadius:l}}),x.jsx("img",{style:{width:"100%",height:"100%",objectFit:c(o),borderRadius:l,backgroundColor:s,display:p?"none":"block"},src:i||n,onLoad:j})]})},IUe=function(t){var r=t.signature;return x.jsx("footer",{style:{display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:x.jsx("a",{href:"",children:x.jsx(bM,{imageId:r==null?void 0:r.imageId})})})},kJ=et.createContext(void 0),pUe=function(t){var r=t.perform,n=t.children;return x.jsx(kJ.Provider,{value:{perform:r},children:n})},RJ=function(){var t=et.useContext(kJ);if(!t)throw new Error("usePerform must be used within a PerformProvider");return t},PJ=Xe,NUe=ke,UJ=_e,yUe=qN,hUe=Zf,EUe=Da,DUe=kf.f,$J=UJ(DUe),jUe=UJ([].push),mUe=PJ&&NUe(function(){var e=Object.create(null);return e[2]=2,!$J(e,2)}),HJ=function(e){return function(t){for(var r=EUe(t),n=hUe(r),i=mUe&&yUe(r)===null,a=n.length,o=0,l=[],u;a>o;)u=n[o++],(!PJ||(i?u in r:$J(r,u)))&&jUe(l,e?[u,r[u]]:r[u]);return l}},TUe={entries:HJ(!0),values:HJ(!1)},CUe=Ee,AUe=TUe.entries;CUe({target:"Object",stat:!0},{entries:function(t){return AUe(t)}});function Jh(e){"@babel/helpers - typeof";return Jh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jh(e)}function VJ(e){return e.split("\\n")}function YJ(e){return e===m5.CENTER?"center":e===m5.RIGHT?"right":"left"}function vv(e){if(Jh(e)==="object"&&e!==null)for(var t in e)Jh(e[t])==="object"?vv(e[t]):e[t]==="true"?e[t]=!0:e[t]==="false"&&(e[t]=!1);return e}var SUe={display:"flex",justifyContent:"center",alignItems:"center",background:"white",borderRadius:"50%",width:"36px",height:"36px",border:"none",cursor:"pointer"},vUe=function(t){var r=t.dataTestId,n=t.responseBody,i=RJ(),a=i.perform,o=function(){var u=JSON.parse(JSON.stringify(n));vv(u),a(u)};return x.jsx("button",{"data-test":r,onClick:o,style:SUe,children:x.jsx(bM,{imageId:"cross"})},r)},OUe=function(t){var r=t.closeButton;return x.jsx("header",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"16px"},children:x.jsx("div",{children:r&&x.jsx(vUe,ln({dataTestId:"close-btn"},r))})})},A5=function(t){var r=t.text,n=t.fontName,i=n===void 0?"":n,a=t.fontSize,o=a===void 0?"17px":a,l=t.fontColor,u=l===void 0?"black":l,s=t.alignment,c=s===void 0?m5.LEFT:s,d=t.backgroundColor,M=d===void 0?"transparent":d,g=t.cornerRadius,I=g===void 0?0:g;return x.jsx("div",{className:"title",style:{fontFamily:i+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:o,color:u,textAlign:YJ(c),backgroundColor:M,borderRadius:I},children:r&&VJ(r)})};function S5(e){"@babel/helpers - typeof";return S5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S5(e)}function Ov(e,t,r){return(t=xUe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xUe(e){var t=LUe(e,"string");return S5(t)=="symbol"?t:t+""}function LUe(e,t){if(S5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(S5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _Ue=function(t){var r=t.title,n=t.image,i=t.responseBody,a=t.backgroundColor,o=t.cornerRadius,l=t.highlightColor,u=t.dataTestId,s=t.children,c=RJ(),d=c.perform,M=function(){var p=JSON.parse(JSON.stringify(i));vv(p),d(p)},g=Ov(Ov(Ov({height:"50px",width:"100%",padding:"10px 16px",textAlign:"center",fontSize:"16px",fontWeight:"400",border:"none",cursor:"pointer",borderRadius:o||0},"--hover-btn-background",l||"red"),"backgroundColor",a||"transparent"),"transition",".3s");return x.jsxs("button",{"data-test":u,onClick:M,style:g,children:[n&&x.jsx(bM,{imageURL:n.imageURL}),s||x.jsx(A5,ln({},r))]},u)};function v5(e){"@babel/helpers - typeof";return v5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v5(e)}var wUe=["items"];function QJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function FJ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QJ(Object(r),!0).forEach(function(n){bUe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bUe(e,t,r){return(t=zUe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zUe(e){var t=kUe(e,"string");return v5(t)=="symbol"?t:t+""}function kUe(e,t){if(v5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(v5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RUe(e,t){if(e==null)return{};var r,n,i=PUe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function PUe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}var UUe=function(t){var r=t.items,n=RUe(t,wUe),i={display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",alignSelf:"flex-end",justifyContent:"center",gap:"8px",width:"100%",height:"auto",alignContent:"flex-end",paddingTop:"20px"};return x.jsx("div",{className:"buttons",style:FJ(FJ({},i),n),children:r.map(function(a){var o,l;return x.jsx(_Ue,ln({dataTestId:"button-"+((o=a.title)===null||o===void 0?void 0:o.text)},a),(l=a.title)===null||l===void 0?void 0:l.text)})})};function O5(e){"@babel/helpers - typeof";return O5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O5(e)}function BJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BJ(Object(r),!0).forEach(function(n){HUe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HUe(e,t,r){return(t=VUe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VUe(e){var t=YUe(e,"string");return O5(t)=="symbol"?t:t+""}function YUe(e,t){if(O5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(O5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xh=function(t){var r=t.children,n=t.header,i=t.footer,a=t.backgroundColor,o=a===void 0?"white":a,l=t.buttons,u=n?60:10,s=i?30:10,c={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"center",alignContent:"center",justifyContent:"center",margin:"0 auto",paddingTop:n?u+10+"px":"10px",paddingBottom:i?s+10+"px":"10px",paddingLeft:"20px",paddingRight:"20px",height:"100%",width:"100%",backgroundColor:o};return x.jsxs("div",{id:"base-container",style:$Ue({},c),children:[n&&x.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:u},children:x.jsx(OUe,{closeButton:n.closeButton})}),x.jsx("div",{style:{height:"100%",flex:"1 1 100%",overflow:"hidden"},children:r}),(l==null?void 0:l.length)&&x.jsx(UUe,{items:l}),i&&x.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:s},children:x.jsx(IUe,ln({},i))})]})},xv=function(t){var r=t.text,n=t.fontName,i=n===void 0?"":n,a=t.fontColor,o=a===void 0?"#000000":a,l=t.alignment,u=l===void 0?m5.LEFT:l,s=t.fontSize,c=s===void 0?17:s,d=t.backgroundColor,M=d===void 0?"transparent":d,g=t.cornerRadius,I=g===void 0?0:g;return x.jsx("div",{style:{fontFamily:i+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:c,textAlign:YJ(u),color:o,borderRadius:I,backgroundColor:M,whiteSpace:"pre-line"},children:r&&VJ(r).map(function(p,j){return p.length===0?x.jsx("br",{},"description-text_"+j):x.jsx("p",{children:p},"description-text_"+j)})})};function x5(e){"@babel/helpers - typeof";return x5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x5(e)}function ZJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GJ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZJ(Object(r),!0).forEach(function(n){QUe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QUe(e,t,r){return(t=FUe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FUe(e){var t=BUe(e,"string");return x5(t)=="symbol"?t:t+""}function BUe(e,t){if(x5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(x5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZUe=function(t){var r=t.title,n=t.description,i=t.image,a=t.backgroundColor,o=a===void 0?"transparent":a,l=t.cornerRadius,u=l===void 0?0:l,s=t.isLastChild,c={display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:s?"none":"1px solid #E0E0E0",padding:"16px 0",gap:16};return x.jsxs("div",{className:"details-item",style:GJ(GJ({},c),{},{backgroundColor:o,borderRadius:u}),children:[x.jsxs("div",{style:{flex:"0 1 auto"},children:[x.jsx("div",{style:{marginBottom:5,fontWeight:"bold",lineHeight:"21px"},children:x.jsx(A5,ln({},r))}),x.jsx("div",{style:{lineHeight:"21px",fontWeight:"400"},children:x.jsx(xv,ln({},n))})]}),x.jsx("div",{style:{aspectRatio:"1 / 1",width:120,height:120,flex:"0 0 120px"},children:x.jsx(bM,ln({},i))})]})};function L5(e){"@babel/helpers - typeof";return L5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L5(e)}function WJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KJ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WJ(Object(r),!0).forEach(function(n){GUe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GUe(e,t,r){return(t=WUe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WUe(e){var t=KUe(e,"string");return L5(t)=="symbol"?t:t+""}function KUe(e,t){if(L5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(L5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JUe={display:"flex",flexDirection:"column",padding:"0 16px"},XUe=function(t){var r=t.items,n=t.backgroundColor,i=n===void 0?"white":n,a=t.cornerRadius,o=a===void 0?16:a;return x.jsx("div",{className:"details",style:KJ(KJ({},JUe),{},{backgroundColor:i,borderRadius:o}),children:r.map(function(l,u){return x.jsx(ZUe,ln({isLastChild:u===r.length-1},l),u)})})},qUe=function(t){var r=t.title,n=t.indicatorColor,i=n===void 0?"black":n;return x.jsxs(x.Fragment,{children:[x.jsx(bJ,{indicatorColor:i}),x.jsx("div",{children:r==null?void 0:r.text})]})};function e$e(e,t){return i$e(e)||n$e(e,t)||r$e(e,t)||t$e()}function t$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r$e(e,t){if(e){if(typeof e=="string")return JJ(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?JJ(e,t):void 0}}function JJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n$e(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function i$e(e){if(Array.isArray(e))return e}var a$e=function(t){var r=t.title,n=t.header,i=t.footer,a=t.details,o=t.buttons,l=t.backgroundColor,u=et.useRef(null),s=et.useState(!1),c=e$e(s,2),d=c[0],M=c[1];return et.useEffect(function(){u.current&&M(u.current.scrollHeight>u.current.clientHeight)},[]),x.jsx(Xh,{header:n,buttons:o,footer:i,backgroundColor:l,children:x.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:d?"flex-start":"center",height:"100%",minHeight:"100%",overflow:"auto"},ref:u,children:[x.jsx("div",{style:{marginBottom:r?"16px":"0",fontWeight:400,fontSize:"28px"},children:r&&x.jsx(A5,ln({},r))}),a&&x.jsx(XUe,ln({},a))]})})},o$e={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},l$e={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function _5(e){"@babel/helpers - typeof";return _5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_5(e)}function XJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qJ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XJ(Object(r),!0).forEach(function(n){u$e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u$e(e,t,r){return(t=s$e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s$e(e){var t=c$e(e,"string");return _5(t)=="symbol"?t:t+""}function c$e(e,t){if(_5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var M$e=function(t){var r=t.title,n=t.header,i=t.footer,a=t.image,o=t.description,l=t.buttons,u=t.backgroundColor;return x.jsx(Xh,{header:n,footer:i,buttons:l,backgroundColor:u,children:x.jsx(x.Fragment,{children:x.jsxs("div",{style:qJ(qJ({},l$e),{},{justifyContent:a?"flex-start":"center"}),children:[a&&x.jsx("div",{style:o$e,children:x.jsx(bM,ln({},a))}),r&&x.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:x.jsx(A5,ln({},r))}),o&&x.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:x.jsx(xv,ln({},o))})]})})})},eX=function(t){var r=t.progressView,n=t.footer,i=t.backgroundColor;return x.jsx(Xh,{footer:n,backgroundColor:i,children:x.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"20px",height:"100%",width:"100%"},children:x.jsx(qUe,{title:(r==null?void 0:r.title)||{text:""},indicatorColor:(r==null?void 0:r.indicatorColor)||"black"})})})},f$e={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},d$e={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},g$e={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},I$e={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},p$e=function(t){var r=t.header,n=t.footer,i=t.image,a=t.title,o=t.description,l=t.buttons,u=t.backgroundColor;return x.jsx(Xh,{header:r,buttons:l,footer:n,backgroundColor:u,children:x.jsxs("div",{style:f$e,children:[i&&x.jsx("div",{style:d$e,children:x.jsx(bM,ln({},i))}),(a==null?void 0:a.text)&&x.jsx("div",{style:g$e,children:a&&x.jsx(A5,ln({},a))}),(o==null?void 0:o.text)&&x.jsx("div",{style:I$e,children:x.jsx(xv,ln({},o))})]})})},Lv=!1,N$e=function(t){var r=t.template,n=t.templateLayout;if(r==="STATUS")return x.jsx(p$e,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,description:n==null?void 0:n.description,backgroundColor:n==null?void 0:n.backgroundColor});if(r==="INFO")return x.jsx(M$e,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor});if(r==="PROGRESS")return x.jsx(eX,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,progressView:n==null?void 0:n.progressView,backgroundColor:n==null?void 0:n.backgroundColor});if(r==="INFO_DETAILS")return x.jsx(a$e,{header:n==null?void 0:n.header,title:n==null?void 0:n.title,details:n==null?void 0:n.details,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:n==null?void 0:n.backgroundColor})},tX="GUI",Ul=function(t){var r=t.moduleProps,n=t.perform,i=r.templateId,a=r.templateLayout,o=et.useCallback(function(l){n&&n(l)},[i]);return i&&a?x.jsx(pUe,{perform:o,children:x.jsx(N$e,{template:i,templateLayout:a})}):x.jsx(eX,{})};Ul.getIdentifier=function(){return tX},Ul.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},Ul.deinitialize=function(){Lv=!1},Ul.initialize=function(){Lv=!0},Ul.isReady=function(){return Lv},Ul.displayName=tX;var y$e=Ee,h$e=_e,rX=Date,E$e=h$e(rX.prototype.getTime);y$e({target:"Date",stat:!0},{now:function(){return E$e(new rX)}});var D$e=ke,j$e=gt,m$e=Xe,nX=AH,T$e=j$e("iterator"),iX=!D$e(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(i,a){t.delete("b"),n+=a+i}),r.delete("a",2),r.delete("b",void 0),nX&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(nX||!m$e)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[T$e]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",void 0).host!=="x"}),aX=Xe,C$e=_e,A$e=Wt,S$e=ke,_v=Zf,v$e=Qf,O$e=kf,x$e=Hi,L$e=Rf,zM=Object.assign,oX=Object.defineProperty,_$e=C$e([].concat),w$e=!zM||S$e(function(){if(aX&&zM({b:1},zM(oX({},"a",{enumerable:!0,get:function(){oX(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),zM({},e)[r]!==7||_v(zM({},t)).join("")!==n})?function(t,r){for(var n=x$e(t),i=arguments.length,a=1,o=v$e.f,l=O$e.f;i>a;)for(var u=L$e(arguments[a++]),s=o?_$e(_v(u),o(u)):_v(u),c=s.length,d=0,M;c>d;)M=s[d++],(!aX||A$e(l,u,M))&&(n[M]=u[M]);return n}:zM,D4=_e,wv=2147483647,w5=36,lX=1,bv=26,b$e=38,z$e=700,k$e=72,R$e=128,P$e="-",U$e=/[^\0-\u007E]/,uX=/[.\u3002\uFF0E\uFF61]/g,sX="Overflow: input needs wider integers to process",zv=w5-lX,cX=RangeError,$$e=D4(uX.exec),kM=Math.floor,kv=String.fromCharCode,MX=D4("".charCodeAt),fX=D4([].join),Nc=D4([].push),H$e=D4("".replace),V$e=D4("".split),Y$e=D4("".toLowerCase),Q$e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=MX(e,r++);if(i>=55296&&i<=56319&&r<n){var a=MX(e,r++);(a&64512)===56320?Nc(t,((i&1023)<<10)+(a&1023)+65536):(Nc(t,i),r--)}else Nc(t,i)}return t},dX=function(e){return e+22+75*(e<26)},F$e=function(e,t,r){var n=0;for(e=r?kM(e/z$e):e>>1,e+=kM(e/t);e>zv*bv>>1;)e=kM(e/zv),n+=w5;return kM(n+(zv+1)*e/(e+b$e))},B$e=function(e){var t=[];e=Q$e(e);var r=e.length,n=R$e,i=0,a=k$e,o,l;for(o=0;o<e.length;o++)l=e[o],l<128&&Nc(t,kv(l));var u=t.length,s=u;for(u&&Nc(t,P$e);s<r;){var c=wv;for(o=0;o<e.length;o++)l=e[o],l>=n&&l<c&&(c=l);var d=s+1;if(c-n>kM((wv-i)/d))throw new cX(sX);for(i+=(c-n)*d,n=c,o=0;o<e.length;o++){if(l=e[o],l<n&&++i>wv)throw new cX(sX);if(l===n){for(var M=i,g=w5;;){var I=g<=a?lX:g>=a+bv?bv:g-a;if(M<I)break;var p=M-I,j=w5-I;Nc(t,kv(dX(I+p%j))),M=kM(p/j),g+=w5}Nc(t,kv(dX(M))),a=F$e(i,d,s===u),i=0,s++}}i++,n++}return fX(t,"")},Z$e=function(e){var t=[],r=V$e(H$e(Y$e(e),uX,"."),"."),n,i;for(n=0;n<r.length;n++)i=r[n],Nc(t,$$e(U$e,i)?"xn--"+B$e(i):i);return fX(t,".")},G$e=Ee,W$e=_e,K$e=iT,J$e=RangeError,gX=String.fromCharCode,IX=String.fromCodePoint,X$e=W$e([].join),q$e=!!IX&&IX.length!==1;G$e({target:"String",stat:!0,arity:1,forced:q$e},{fromCodePoint:function(t){for(var r=[],n=arguments.length,i=0,a;n>i;){if(a=+arguments[i++],K$e(a,1114111)!==a)throw new J$e(a+" is not a valid code point");r[i]=a<65536?gX(a):gX(((a-=65536)>>10)+55296,a%1024+56320)}return X$e(r,"")}});var pX=$s,eHe=Math.floor,Rv=function(e,t){var r=e.length;if(r<8)for(var n=1,i,a;n<r;){for(a=n,i=e[n];a&&t(e[a-1],i)>0;)e[a]=e[--a];a!==n++&&(e[a]=i)}else for(var o=eHe(r/2),l=Rv(pX(e,0,o),t),u=Rv(pX(e,o),t),s=l.length,c=u.length,d=0,M=0;d<s||M<c;)e[d+M]=d<s&&M<c?t(l[d],u[M])<=0?l[d++]:u[M++]:d<s?l[d++]:u[M++];return e},tHe=Rv,Pv=Ee,NX=Ye,Uv=LK,rHe=Pn,qh=Wt,Ho=_e,b5=Xe,yX=iX,hX=Sr,nHe=Ou,iHe=TQ,aHe=wo,oHe=kY,$v=vu,EX=ud,Hv=ft,lHe=kt,uHe=Hs,sHe=Bf,cHe=Mr,DX=zt,Vn=cn,MHe=Us,jX=B1,mX=WT,fHe=oy,e6=ty,RM=B2,dHe=gt,gHe=tHe,IHe=dHe("iterator"),PM="URLSearchParams",TX=PM+"Iterator",CX=$v.set,xa=$v.getterFor(PM),pHe=$v.getterFor(TX),AX=Uv("fetch"),t6=Uv("Request"),z5=Uv("Headers"),Vv=t6&&t6.prototype,SX=z5&&z5.prototype,NHe=NX.TypeError,yHe=NX.encodeURIComponent,hHe=String.fromCharCode,EHe=rHe("String","fromCodePoint"),DHe=parseInt,r6=Ho("".charAt),vX=Ho([].join),yc=Ho([].push),OX=Ho("".replace),jHe=Ho([].shift),xX=Ho([].splice),LX=Ho("".split),_X=Ho("".slice),mHe=Ho(/./.exec),THe=/\+/g,Yv="�",CHe=/^[0-9a-f]+$/i,wX=function(e,t){var r=_X(e,t,t+2);return mHe(CHe,r)?DHe(r,16):NaN},AHe=function(e){for(var t=0,r=128;r>0&&e&r;r>>=1)t++;return t},SHe=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(e[0]&31)<<6|e[1]&63;break;case 3:t=(e[0]&15)<<12|(e[1]&63)<<6|e[2]&63;break;case 4:t=(e[0]&7)<<18|(e[1]&63)<<12|(e[2]&63)<<6|e[3]&63;break}return t>1114111?null:t},bX=function(e){e=OX(e,THe," ");for(var t=e.length,r="",n=0;n<t;){var i=r6(e,n);if(i==="%"){if(r6(e,n+1)==="%"||n+3>t){r+="%",n++;continue}var a=wX(e,n+1);if(a!==a){r+=i,n++;continue}n+=2;var o=AHe(a);if(o===0)i=hHe(a);else{if(o===1||o>4){r+=Yv,n++;continue}for(var l=[a],u=1;u<o&&(n++,!(n+3>t||r6(e,n)!=="%"));){var s=wX(e,n+1);if(s!==s){n+=3;break}if(s>191||s<128)break;yc(l,s),n+=2,u++}if(l.length!==o){r+=Yv;continue}var c=SHe(l);c===null?r+=Yv:i=EHe(c)}}r+=i,n++}return r},vHe=/[!'()~]|%20/g,OHe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},xHe=function(e){return OHe[e]},zX=function(e){return OX(yHe(e),vHe,xHe)},Qv=oHe(function(t,r){CX(this,{type:TX,target:xa(t).entries,index:0,kind:r})},PM,function(){var t=pHe(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=null,e6(void 0,!0);var i=r[n];switch(t.kind){case"keys":return e6(i.key,!1);case"values":return e6(i.value,!1)}return e6([i.key,i.value],!1)},!0),kX=function(e){this.entries=[],this.url=null,e!==void 0&&(DX(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?r6(e,0)==="?"?_X(e,1):e:Vn(e)))};kX.prototype={type:PM,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=fHe(e),n,i,a,o,l,u,s;if(r)for(n=mX(e,r),i=n.next;!(a=qh(i,n)).done;){if(o=mX(cHe(a.value)),l=o.next,(u=qh(l,o)).done||(s=qh(l,o)).done||!qh(l,o).done)throw new NHe("Expected sequence with length 2");yc(t,{key:Vn(u.value),value:Vn(s.value)})}else for(var c in e)lHe(e,c)&&yc(t,{key:c,value:Vn(e[c])})},parseQuery:function(e){if(e)for(var t=this.entries,r=LX(e,"&"),n=0,i,a;n<r.length;)i=r[n++],i.length&&(a=LX(i,"="),yc(t,{key:bX(jHe(a)),value:bX(vX(a,"="))}))},serialize:function(){for(var e=this.entries,t=[],r=0,n;r<e.length;)n=e[r++],yc(t,zX(n.key)+"="+zX(n.value));return vX(t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var n6=function(){EX(this,UM);var t=arguments.length>0?arguments[0]:void 0,r=CX(this,new kX(t));b5||(this.size=r.entries.length)},UM=n6.prototype;if(iHe(UM,{append:function(t,r){var n=xa(this);RM(arguments.length,2),yc(n.entries,{key:Vn(t),value:Vn(r)}),b5||this.length++,n.updateURL()},delete:function(e){for(var t=xa(this),r=RM(arguments.length,1),n=t.entries,i=Vn(e),a=r<2?void 0:arguments[1],o=a===void 0?a:Vn(a),l=0;l<n.length;){var u=n[l];if(u.key===i&&(o===void 0||u.value===o)){if(xX(n,l,1),o!==void 0)break}else l++}b5||(this.size=n.length),t.updateURL()},get:function(t){var r=xa(this).entries;RM(arguments.length,1);for(var n=Vn(t),i=0;i<r.length;i++)if(r[i].key===n)return r[i].value;return null},getAll:function(t){var r=xa(this).entries;RM(arguments.length,1);for(var n=Vn(t),i=[],a=0;a<r.length;a++)r[a].key===n&&yc(i,r[a].value);return i},has:function(t){for(var r=xa(this).entries,n=RM(arguments.length,1),i=Vn(t),a=n<2?void 0:arguments[1],o=a===void 0?a:Vn(a),l=0;l<r.length;){var u=r[l++];if(u.key===i&&(o===void 0||u.value===o))return!0}return!1},set:function(t,r){var n=xa(this);RM(arguments.length,1);for(var i=n.entries,a=!1,o=Vn(t),l=Vn(r),u=0,s;u<i.length;u++)s=i[u],s.key===o&&(a?xX(i,u--,1):(a=!0,s.value=l));a||yc(i,{key:o,value:l}),b5||(this.size=i.length),n.updateURL()},sort:function(){var t=xa(this);gHe(t.entries,function(r,n){return r.key>n.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=xa(this).entries,n=uHe(t,arguments.length>1?arguments[1]:void 0),i=0,a;i<r.length;)a=r[i++],n(a.value,a.key,this)},keys:function(){return new Qv(this,"keys")},values:function(){return new Qv(this,"values")},entries:function(){return new Qv(this,"entries")}},{enumerable:!0}),hX(UM,IHe,UM.entries,{name:"entries"}),hX(UM,"toString",function(){return xa(this).serialize()},{enumerable:!0}),b5&&nHe(UM,"size",{get:function(){return xa(this).entries.length},configurable:!0,enumerable:!0}),aHe(n6,PM),Pv({global:!0,constructor:!0,forced:!yX},{URLSearchParams:n6}),!yX&&Hv(z5)){var LHe=Ho(SX.has),_He=Ho(SX.set),RX=function(e){if(DX(e)){var t=e.body,r;if(sHe(t)===PM)return r=e.headers?new z5(e.headers):new z5,LHe(r,"content-type")||_He(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),MHe(e,{body:jX(0,Vn(t)),headers:jX(0,r)})}return e};if(Hv(AX)&&Pv({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return AX(t,arguments.length>1?RX(arguments[1]):{})}}),Hv(t6)){var Fv=function(t){return EX(this,Vv),new t6(t,arguments.length>1?RX(arguments[1]):{})};Vv.constructor=Fv,Fv.prototype=Vv,Pv({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Fv})}}var wHe={URLSearchParams:n6,getState:xa},bHe=Ee,Bv=Xe,zHe=iX,Zv=Ye,PX=Hs,La=_e,i6=Sr,_a=Ou,kHe=ud,Gv=kt,Wv=w$e,$M=VW,Vo=$s,RHe=uF.codeAt,PHe=Z$e,Fu=cn,UHe=wo,$He=B2,UX=wHe,$X=vu,HHe=$X.set,a6=$X.getterFor("URL"),VHe=UX.URLSearchParams,YHe=UX.getState,k5=Zv.URL,Kv=Zv.TypeError,o6=Zv.parseInt,QHe=Math.floor,HX=Math.pow,wa=La("".charAt),Yo=La(/./.exec),R5=La([].join),FHe=La(1 .toString),BHe=La([].pop),HM=La([].push),Jv=La("".replace),ZHe=La([].shift),GHe=La("".split),P5=La("".slice),l6=La("".toLowerCase),WHe=La([].unshift),KHe="Invalid authority",Xv="Invalid scheme",j4="Invalid host",VX="Invalid port",YX=/[a-z]/i,JHe=/[\d+-.a-z]/i,qv=/\d/,XHe=/^0x/i,qHe=/^[0-7]+$/,eVe=/^\d+$/,QX=/^[\da-f]+$/i,tVe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rVe=/[\0\t\n\r #/:<>?@[\\\]^|]/,nVe=/^[\u0000-\u0020]+/,iVe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,aVe=/[\t\n\r]/g,ba,oVe=function(e){var t=GHe(e,"."),r,n,i,a,o,l,u;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],i=0;i<r;i++){if(a=t[i],a==="")return e;if(o=10,a.length>1&&wa(a,0)==="0"&&(o=Yo(XHe,a)?16:8,a=P5(a,o===8?1:2)),a==="")l=0;else{if(!Yo(o===10?eVe:o===8?qHe:QX,a))return e;l=o6(a,o)}HM(n,l)}for(i=0;i<r;i++)if(l=n[i],i===r-1){if(l>=HX(256,5-r))return null}else if(l>255)return null;for(u=BHe(n),i=0;i<n.length;i++)u+=n[i]*HX(256,3-i);return u},lVe=function(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,i=0,a,o,l,u,s,c,d,M=function(){return wa(e,i)};if(M()===":"){if(wa(e,1)!==":")return;i+=2,r++,n=r}for(;M();){if(r===8)return;if(M()===":"){if(n!==null)return;i++,r++,n=r;continue}for(a=o=0;o<4&&Yo(QX,M());)a=a*16+o6(M(),16),i++,o++;if(M()==="."){if(o===0||(i-=o,r>6))return;for(l=0;M();){if(u=null,l>0)if(M()==="."&&l<4)i++;else return;if(!Yo(qv,M()))return;for(;Yo(qv,M());){if(s=o6(M(),10),u===null)u=s;else{if(u===0)return;u=u*10+s}if(u>255)return;i++}t[r]=t[r]*256+u,l++,(l===2||l===4)&&r++}if(l!==4)return;break}else if(M()===":"){if(i++,!M())return}else if(M())return;t[r++]=a}if(n!==null)for(c=r-n,r=7;r!==0&&c>0;)d=t[r],t[r--]=t[n+c-1],t[n+--c]=d;else if(r!==8)return;return t},uVe=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)e[a]!==0?(i>r&&(t=n,r=i),n=null,i=0):(n===null&&(n=a),++i);return i>r?n:t},U5=function(e){var t,r,n,i;if(typeof e=="number"){for(t=[],r=0;r<4;r++)WHe(t,e%256),e=QHe(e/256);return R5(t,".")}if(typeof e=="object"){for(t="",n=uVe(e),r=0;r<8;r++)i&&e[r]===0||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=FHe(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},u6={},FX=Wv({},u6,{" ":1,'"':1,"<":1,">":1,"`":1}),BX=Wv({},FX,{"#":1,"?":1,"{":1,"}":1}),e9=Wv({},BX,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),hc=function(e,t){var r=RHe(e,0);return r>32&&r<127&&!Gv(t,e)?e:encodeURIComponent(e)},s6={ftp:21,file:null,http:80,https:443,ws:80,wss:443},$5=function(e,t){var r;return e.length===2&&Yo(YX,wa(e,0))&&((r=wa(e,1))===":"||!t&&r==="|")},ZX=function(e){var t;return e.length>1&&$5(P5(e,0,2))&&(e.length===2||(t=wa(e,2))==="/"||t==="\\"||t==="?"||t==="#")},sVe=function(e){return e==="."||l6(e)==="%2e"},cVe=function(e){return e=l6(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},t9={},GX={},r9={},WX={},KX={},n9={},JX={},XX={},c6={},M6={},i9={},a9={},o9={},l9={},qX={},u9={},VM={},$l={},eq={},m4={},Bu={},s9=function(e,t,r){var n=Fu(e),i,a,o;if(t){if(a=this.parse(n),a)throw new Kv(a);this.searchParams=null}else{if(r!==void 0&&(i=new s9(r,!0)),a=this.parse(n,null,i),a)throw new Kv(a);o=YHe(new VHe),o.bindURL(this),this.searchParams=o}};s9.prototype={type:"URL",parse:function(e,t,r){var n=this,i=t||t9,a=0,o="",l=!1,u=!1,s=!1,c,d,M,g;for(e=Fu(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=Jv(e,nVe,""),e=Jv(e,iVe,"$1")),e=Jv(e,aVe,""),c=$M(e);a<=c.length;){switch(d=c[a],i){case t9:if(d&&Yo(YX,d))o+=l6(d),i=GX;else{if(t)return Xv;i=r9;continue}break;case GX:if(d&&(Yo(JHe,d)||d==="+"||d==="-"||d==="."))o+=l6(d);else if(d===":"){if(t&&(n.isSpecial()!==Gv(s6,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&s6[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?i=l9:n.isSpecial()&&r&&r.scheme===n.scheme?i=WX:n.isSpecial()?i=XX:c[a+1]==="/"?(i=KX,a++):(n.cannotBeABaseURL=!0,HM(n.path,""),i=eq)}else{if(t)return Xv;o="",i=r9,a=0;continue}break;case r9:if(!r||r.cannotBeABaseURL&&d!=="#")return Xv;if(r.cannotBeABaseURL&&d==="#"){n.scheme=r.scheme,n.path=Vo(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,i=Bu;break}i=r.scheme==="file"?l9:n9;continue;case WX:if(d==="/"&&c[a+1]==="/")i=c6,a++;else{i=n9;continue}break;case KX:if(d==="/"){i=M6;break}else{i=$l;continue}case n9:if(n.scheme=r.scheme,d===ba)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Vo(r.path),n.query=r.query;else if(d==="/"||d==="\\"&&n.isSpecial())i=JX;else if(d==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Vo(r.path),n.query="",i=m4;else if(d==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Vo(r.path),n.query=r.query,n.fragment="",i=Bu;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Vo(r.path),n.path.length--,i=$l;continue}break;case JX:if(n.isSpecial()&&(d==="/"||d==="\\"))i=c6;else if(d==="/")i=M6;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,i=$l;continue}break;case XX:if(i=c6,d!=="/"||wa(o,a+1)!=="/")continue;a++;break;case c6:if(d!=="/"&&d!=="\\"){i=M6;continue}break;case M6:if(d==="@"){l&&(o="%40"+o),l=!0,M=$M(o);for(var I=0;I<M.length;I++){var p=M[I];if(p===":"&&!s){s=!0;continue}var j=hc(p,e9);s?n.password+=j:n.username+=j}o=""}else if(d===ba||d==="/"||d==="?"||d==="#"||d==="\\"&&n.isSpecial()){if(l&&o==="")return KHe;a-=$M(o).length+1,o="",i=i9}else o+=d;break;case i9:case a9:if(t&&n.scheme==="file"){i=u9;continue}else if(d===":"&&!u){if(o==="")return j4;if(g=n.parseHost(o),g)return g;if(o="",i=o9,t===a9)return}else if(d===ba||d==="/"||d==="?"||d==="#"||d==="\\"&&n.isSpecial()){if(n.isSpecial()&&o==="")return j4;if(t&&o===""&&(n.includesCredentials()||n.port!==null))return;if(g=n.parseHost(o),g)return g;if(o="",i=VM,t)return;continue}else d==="["?u=!0:d==="]"&&(u=!1),o+=d;break;case o9:if(Yo(qv,d))o+=d;else if(d===ba||d==="/"||d==="?"||d==="#"||d==="\\"&&n.isSpecial()||t){if(o!==""){var h=o6(o,10);if(h>65535)return VX;n.port=n.isSpecial()&&h===s6[n.scheme]?null:h,o=""}if(t)return;i=VM;continue}else return VX;break;case l9:if(n.scheme="file",d==="/"||d==="\\")i=qX;else if(r&&r.scheme==="file")switch(d){case ba:n.host=r.host,n.path=Vo(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=Vo(r.path),n.query="",i=m4;break;case"#":n.host=r.host,n.path=Vo(r.path),n.query=r.query,n.fragment="",i=Bu;break;default:ZX(R5(Vo(c,a),""))||(n.host=r.host,n.path=Vo(r.path),n.shortenPath()),i=$l;continue}else{i=$l;continue}break;case qX:if(d==="/"||d==="\\"){i=u9;break}r&&r.scheme==="file"&&!ZX(R5(Vo(c,a),""))&&($5(r.path[0],!0)?HM(n.path,r.path[0]):n.host=r.host),i=$l;continue;case u9:if(d===ba||d==="/"||d==="\\"||d==="?"||d==="#"){if(!t&&$5(o))i=$l;else if(o===""){if(n.host="",t)return;i=VM}else{if(g=n.parseHost(o),g)return g;if(n.host==="localhost"&&(n.host=""),t)return;o="",i=VM}continue}else o+=d;break;case VM:if(n.isSpecial()){if(i=$l,d!=="/"&&d!=="\\")continue}else if(!t&&d==="?")n.query="",i=m4;else if(!t&&d==="#")n.fragment="",i=Bu;else if(d!==ba&&(i=$l,d!=="/"))continue;break;case $l:if(d===ba||d==="/"||d==="\\"&&n.isSpecial()||!t&&(d==="?"||d==="#")){if(cVe(o)?(n.shortenPath(),d!=="/"&&!(d==="\\"&&n.isSpecial())&&HM(n.path,"")):sVe(o)?d!=="/"&&!(d==="\\"&&n.isSpecial())&&HM(n.path,""):(n.scheme==="file"&&!n.path.length&&$5(o)&&(n.host&&(n.host=""),o=wa(o,0)+":"),HM(n.path,o)),o="",n.scheme==="file"&&(d===ba||d==="?"||d==="#"))for(;n.path.length>1&&n.path[0]==="";)ZHe(n.path);d==="?"?(n.query="",i=m4):d==="#"&&(n.fragment="",i=Bu)}else o+=hc(d,BX);break;case eq:d==="?"?(n.query="",i=m4):d==="#"?(n.fragment="",i=Bu):d!==ba&&(n.path[0]+=hc(d,u6));break;case m4:!t&&d==="#"?(n.fragment="",i=Bu):d!==ba&&(d==="'"&&n.isSpecial()?n.query+="%27":d==="#"?n.query+="%23":n.query+=hc(d,u6));break;case Bu:d!==ba&&(n.fragment+=hc(d,FX));break}a++}},parseHost:function(e){var t,r,n;if(wa(e,0)==="["){if(wa(e,e.length-1)!=="]"||(t=lVe(P5(e,1,-1)),!t))return j4;this.host=t}else if(this.isSpecial()){if(e=PHe(e),Yo(tVe,e)||(t=oVe(e),t===null))return j4;this.host=t}else{if(Yo(rVe,e))return j4;for(t="",r=$M(e),n=0;n<r.length;n++)t+=hc(r[n],u6);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return Gv(s6,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!=="file"||t!==1||!$5(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,l=e.query,u=e.fragment,s=t+":";return i!==null?(s+="//",e.includesCredentials()&&(s+=r+(n?":"+n:"")+"@"),s+=U5(i),a!==null&&(s+=":"+a)):t==="file"&&(s+="//"),s+=e.cannotBeABaseURL?o[0]:o.length?"/"+R5(o,"/"):"",l!==null&&(s+="?"+l),u!==null&&(s+="#"+u),s},setHref:function(e){var t=this.parse(e);if(t)throw new Kv(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new YM(e.path[0]).origin}catch(r){return"null"}return e==="file"||!this.isSpecial()?"null":e+"://"+U5(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Fu(e)+":",t9)},getUsername:function(){return this.username},setUsername:function(e){var t=$M(Fu(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=hc(t[r],e9)}},getPassword:function(){return this.password},setPassword:function(e){var t=$M(Fu(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=hc(t[r],e9)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?U5(e):U5(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,i9)},getHostname:function(){var e=this.host;return e===null?"":U5(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,a9)},getPort:function(){var e=this.port;return e===null?"":Fu(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=Fu(e),e===""?this.port=null:this.parse(e,o9))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+R5(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,VM))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=Fu(e),e===""?this.query=null:(wa(e,0)==="?"&&(e=P5(e,1)),this.query="",this.parse(e,m4)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){if(e=Fu(e),e===""){this.fragment=null;return}wa(e,0)==="#"&&(e=P5(e,1)),this.fragment="",this.parse(e,Bu)},update:function(){this.query=this.searchParams.serialize()||null}};var YM=function(t){var r=kHe(this,Yn),n=$He(arguments.length,1)>1?arguments[1]:void 0,i=HHe(r,new s9(t,!1,n));Bv||(r.href=i.serialize(),r.origin=i.getOrigin(),r.protocol=i.getProtocol(),r.username=i.getUsername(),r.password=i.getPassword(),r.host=i.getHost(),r.hostname=i.getHostname(),r.port=i.getPort(),r.pathname=i.getPathname(),r.search=i.getSearch(),r.searchParams=i.getSearchParams(),r.hash=i.getHash())},Yn=YM.prototype,za=function(e,t){return{get:function(){return a6(this)[e]()},set:t&&function(r){return a6(this)[t](r)},configurable:!0,enumerable:!0}};if(Bv&&(_a(Yn,"href",za("serialize","setHref")),_a(Yn,"origin",za("getOrigin")),_a(Yn,"protocol",za("getProtocol","setProtocol")),_a(Yn,"username",za("getUsername","setUsername")),_a(Yn,"password",za("getPassword","setPassword")),_a(Yn,"host",za("getHost","setHost")),_a(Yn,"hostname",za("getHostname","setHostname")),_a(Yn,"port",za("getPort","setPort")),_a(Yn,"pathname",za("getPathname","setPathname")),_a(Yn,"search",za("getSearch","setSearch")),_a(Yn,"searchParams",za("getSearchParams")),_a(Yn,"hash",za("getHash","setHash"))),i6(Yn,"toJSON",function(){return a6(this).serialize()},{enumerable:!0}),i6(Yn,"toString",function(){return a6(this).serialize()},{enumerable:!0}),k5){var tq=k5.createObjectURL,rq=k5.revokeObjectURL;tq&&i6(YM,"createObjectURL",PX(tq,k5)),rq&&i6(YM,"revokeObjectURL",PX(rq,k5))}UHe(YM,"URL"),bHe({global:!0,constructor:!0,forced:!zHe,sham:!Bv},{URL:YM});var MVe=Ee,fVe=Wt;MVe({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return fVe(URL.prototype.toString,this)}});var dVe=Sr,f6=_e,nq=cn,gVe=B2,iq=URLSearchParams,d6=iq.prototype,IVe=f6(d6.append),aq=f6(d6.delete),pVe=f6(d6.forEach),NVe=f6([].push),c9=new iq("a=1&a=2&b=3");c9.delete("a",1),c9.delete("b",void 0),c9+""!="a=2"&&dVe(d6,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return aq(this,e);var n=[];pVe(this,function(d,M){NVe(n,{key:M,value:d})}),gVe(t,1);for(var i=nq(e),a=nq(r),o=0,l=0,u=!1,s=n.length,c;o<s;)c=n[o++],u||c.key===i?(u=!0,aq(this,c.key)):l++;for(;l<s;)c=n[l++],c.key===i&&c.value===a||IVe(this,c.key,c.value)},{enumerable:!0,unsafe:!0});var yVe=Sr,oq=_e,hVe=cn,EVe=B2,lq=URLSearchParams,M9=lq.prototype,DVe=oq(M9.getAll),jVe=oq(M9.has),uq=new lq("a=1");(uq.has("a",2)||!uq.has("a",void 0))&&yVe(M9,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return jVe(this,t);var i=DVe(this,t);EVe(r,1);for(var a=hVe(n),o=0;o<i.length;)if(i[o++]===a)return!0;return!1},{enumerable:!0,unsafe:!0});var mVe=Xe,TVe=_e,CVe=Ou,f9=URLSearchParams.prototype,AVe=TVe(f9.forEach);mVe&&!("size"in f9)&&CVe(f9,"size",{get:function(){var t=0;return AVe(this,function(){t++}),t},configurable:!0,enumerable:!0});function H5(e){"@babel/helpers - typeof";return H5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H5(e)}function SVe(e,t){return LVe(e)||xVe(e,t)||OVe(e,t)||vVe()}function vVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
50
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OVe(e,t){if(e){if(typeof e=="string")return sq(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sq(e,t):void 0}}function sq(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function xVe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function LVe(e){if(Array.isArray(e))return e}function _Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wVe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cq(n.key),n)}}function bVe(e,t,r){return t&&wVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V5(e,t,r){return(t=cq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cq(e){var t=zVe(e,"string");return H5(t)=="symbol"?t:t+""}function zVe(e,t){if(H5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(H5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kVe=function(){function e(){_Ve(this,e),V5(this,"_levels",[]),V5(this,"_transports",[]),V5(this,"_logs",[]),V5(this,"_prevTime",0),V5(this,"logListener",null);try{if(!window.localStorage)return;var t=window.localStorage.getItem("logger");if(!t)return;var r=t.split(">"),n=SVe(r,2),i=n[0],a=n[1];this._levels=i.split(","),a&&(this._transports=a.split(","))}catch(o){return}}return bVe(e,[{key:"create",value:function(r,n){var i=this;return function(a){if(!(!i._levels.includes(r)&&!i._levels.includes("all")&&!i.logListener)){var o=Date.now(),l=0;if(i._prevTime&&(l=o-i._prevTime),i._prevTime=o,i.logListener&&i.logListener("".concat(r,": ").concat(a," +").concat(l,"ms")),i._transports.includes("console")){var u=(n==null?void 0:n.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(u,";"),r,"",a,"color: ".concat(u,";"),l)}i._transports.includes("file")&&i._logs.push("".concat(r,": ").concat(a," +").concat(l,"ms"))}}}},{key:"saveLogs",value:function(){if(this._logs.length){var r=this._logs.join(`
|
|
51
|
-
`),n=new Blob([r],{type:"text/plain"}),i=window.URL.createObjectURL(n),a=document.createElement("a");a.download="log.txt",a.href=i,a.click(),window.URL.revokeObjectURL(i),this._logs=[]}}}])}();const d9=new kVe;function T4(e){"@babel/helpers - typeof";return T4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T4(e)}function tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,O,_){return m[O]=_}}function c(v,C,m,O){var _=C&&C.prototype instanceof h?C:h,z=Object.create(_.prototype),H=new ae(O||[]);return i(z,"_invoke",{value:P(v,m,H)}),z}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var M="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function h(){}function y(){}function D(){}var T={};s(T,o,function(){return this});var L=Object.getPrototypeOf,w=L&&L(L(Me([])));w&&w!==r&&n.call(w,o)&&(T=w);var b=D.prototype=h.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function U(v,C){function m(_,z,H,F){var Z=d(v[_],v,z);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&T4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var O;i(this,"_invoke",{value:function(z,H){function F(){return new C(function(Z,ce){m(z,H,Z,ce)})}return O=O?O.then(F,F):F()}})}function P(v,C,m){var O=M;return function(_,z){if(O===I)throw Error("Generator is already running");if(O===p){if(_==="throw")throw z;return{value:e,done:!0}}for(m.method=_,m.arg=z;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(O===M)throw O=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);O=I;var Z=d(v,C,m);if(Z.type==="normal"){if(O=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(O=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,O=v.iterator[m];if(O===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var _=d(O,v.iterator,C.arg);if(_.type==="throw")return C.method="throw",C.arg=_.arg,C.delegate=null,j;var z=_.arg;return z?z.done?(C[v.resultName]=z.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):z:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ae(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function Me(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,O=function _(){for(;++m<v.length;)if(n.call(v,m))return _.value=v[m],_.done=!1,_;return _.value=e,_.done=!0,_};return O.next=O}}throw new TypeError(T4(v)+" is not iterable")}return y.prototype=D,i(b,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:y,configurable:!0}),y.displayName=s(D,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===y||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,D):(v.__proto__=D,s(v,u,"GeneratorFunction")),v.prototype=Object.create(b),v},t.awrap=function(v){return{__await:v}},R(U.prototype),s(U.prototype,l,function(){return this}),t.AsyncIterator=U,t.async=function(v,C,m,O,_){_===void 0&&(_=Promise);var z=new U(c(v,C,m,O),_);return t.isGeneratorFunction(C)?z:z.next().then(function(H){return H.done?H.value:z.next()})},R(b),s(b,u,"Generator"),s(b,o,function(){return this}),s(b,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var O in C)m.push(O);return m.reverse(),function _(){for(;m.length;){var z=m.pop();if(z in C)return _.value=z,_.done=!1,_}return _.done=!0,_}},t.values=Me,ae.prototype={constructor:ae,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function O(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var _=this.tryEntries.length-1;_>=0;--_){var z=this.tryEntries[_],H=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var F=n.call(z,"catchLoc"),Z=n.call(z,"finallyLoc");if(F&&Z){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if(F){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(C,m){for(var O=this.tryEntries.length-1;O>=0;--O){var _=this.tryEntries[O];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var z=_;break}}z&&(C==="break"||C==="continue")&&z.tryLoc<=m&&m<=z.finallyLoc&&(z=null);var H=z?z.completion:{};return H.type=C,H.arg=m,z?(this.method="next",this.next=z.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),K(O),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.tryLoc===C){var _=O.completion;if(_.type==="throw"){var z=_.arg;K(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(C,m,O){return this.delegate={iterator:Me(C),resultName:m,nextLoc:O},this.method==="next"&&(this.arg=e),j}},t}function Mq(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function Qn(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){Mq(a,n,i,o,l,"next",u)}function l(u){Mq(a,n,i,o,l,"throw",u)}o(void 0)})}}function RVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PVe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fq(n.key),n)}}function UVe(e,t,r){return t&&PVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QM(e,t,r){return(t=fq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fq(e){var t=$Ve(e,"string");return T4(t)=="symbol"?t:t+""}function $Ve(e,t){if(T4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(T4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qo=d9.create("wasm_idv"),HVe=function(){function e(t){RVe(this,e),QM(this,"_worker",null),QM(this,"_initialized",!1),QM(this,"_connectedToIdv",!1),QM(this,"_serviceRunning",!1),QM(this,"_userId",hPe(LLe)),QM(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return UVe(e,[{key:"init",value:function(){var t=Qn(tt().mark(function n(){var i,a,o,l;return tt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=1,s.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/98d1c95-7afea4eed//PlatformAdaptor.worker.js");case 4:return i=s.sent,s.next=7,i.blob();case 7:a=s.sent,o=URL.createObjectURL(a),this._worker=new Worker(o),s.next=15;break;case 12:s.prev=12,s.t0=s.catch(1),Qo("Creating worker error: ".concat(JSON.stringify(s.t0)));case 15:s.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){s.next=20;break}return s.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),s.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/98d1c95-7afea4eed/",preMain:!0});case 23:return l=s.sent,s.abrupt("return",l);case 25:case"end":return s.stop()}},n,this,[[1,12]])}));function r(){return t.apply(this,arguments)}return r}()},{key:"prepareAndConnect",value:function(){var t=Qn(tt().mark(function n(i){var a;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:kW,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:i.host,httpRetryCount:i.httpRetryCount||0,httpTimeoutMs:i.httpTimeoutMs||0,isSecure:!0,password:i.password,port:i.port?i.port:0,schema:i.schema?i.schema:"basic",userName:i.userName},preMain:!0});case 2:return a=l.sent,Qo("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(a))),a.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),l.abrupt("return",a);case 6:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"connectByUrl",value:function(){var t=Qn(tt().mark(function n(i){var a;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:kW,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:i},preMain:!0});case 2:return a=l.sent,a.code===0&&(this._serviceRunning=!0),l.abrupt("return",a);case 5:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startSession",value:function(){var t=Qn(tt().mark(function n(i){var a,o;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a={workflowId:i},u.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:a,preMain:!0});case 3:return o=u.sent,Qo("Start session connect result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"continueSession",value:function(){var t=Qn(tt().mark(function n(i){var a,o;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a={sessionId:i},u.next=3,this.sendMessage({continueParams:a,target:"custom",method:"continue_session",preMain:!0});case 3:return o=u.sent,Qo("continue session result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"listWorkflows",value:function(){var t=Qn(tt().mark(function n(){var i,a,o=arguments;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{limit:0,skip:0},u.next=3,this.sendMessage({workflowsParams:i,target:"custom",method:"list_workflows",preMain:!0});case 3:return a=u.sent,Qo("listWorkflows result: ".concat(JSON.stringify(a))),u.abrupt("return",a);case 6:case"end":return u.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getHealth",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"abandonSession",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getWorkflow",value:function(){var t=Qn(tt().mark(function n(i){var a;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({workflowIdParams:{workflowId:i},target:"custom",method:"get_workflow",preMain:!0});case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"pushData",value:function(){var t=Qn(tt().mark(function n(i,a){var o;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return Qo("Push data: ".concat(i," , ").concat(JSON.stringify(a))),u.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:a,stage:0,step:i},preMain:!0});case 3:return o=u.sent,Qo("Push data result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"getSessionState",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"waitForSessionUpdate",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return i=o.sent,Qo("Wait for session update result: ".concat(JSON.stringify(i))),o.abrupt("return",i);case 5:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"disconnect",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return i=o.sent,this._connectedToIdv=!1,this._serviceRunning=!1,o.abrupt("return",i);case 6:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"sendMessage",value:function(){var t=Qn(tt().mark(function n(i){var a=this;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",new Promise(function(u,s){if(!a._worker)return s();a._worker.onmessage=function(c){var d=c.data.target;if(d==="stdout"){Qo(JSON.stringify(c.data.content));return}if(d==="custom"){var M=c.data,g=M.method,I=M.data;Qo("::: custom method, ".concat(g,", ").concat(JSON.stringify(I))),g==="onRuntimeInitialized"&&(a._initialized=!0),u(I)}if(d==="stderr"){var p=c.data.content;Qo(JSON.stringify(p)),a._setErrorScreen&&a._setErrorScreen(p)}},a._worker.postMessage(i)}));case 1:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var r;(r=this._worker)===null||r===void 0||r.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(this._worker){o.next=2;break}return o.abrupt("return",{code:0});case 2:if(this._connectedToIdv){o.next=5;break}return this.terminateWorker(),o.abrupt("return",{code:0});case 5:return o.next=7,this.disconnect();case 7:return i=o.sent,this.terminateWorker(),o.abrupt("return",i);case 10:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()}])}();function C4(e){"@babel/helpers - typeof";return C4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C4(e)}function dq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dq(Object(r),!0).forEach(function(n){g9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g9(e,t,r){return(t=VVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VVe(e){var t=YVe(e,"string");return C4(t)=="symbol"?t:t+""}function YVe(e,t){if(C4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(C4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */dt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,O,_){return m[O]=_}}function c(v,C,m,O){var _=C&&C.prototype instanceof h?C:h,z=Object.create(_.prototype),H=new ae(O||[]);return i(z,"_invoke",{value:P(v,m,H)}),z}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var M="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function h(){}function y(){}function D(){}var T={};s(T,o,function(){return this});var L=Object.getPrototypeOf,w=L&&L(L(Me([])));w&&w!==r&&n.call(w,o)&&(T=w);var b=D.prototype=h.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function U(v,C){function m(_,z,H,F){var Z=d(v[_],v,z);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&C4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var O;i(this,"_invoke",{value:function(z,H){function F(){return new C(function(Z,ce){m(z,H,Z,ce)})}return O=O?O.then(F,F):F()}})}function P(v,C,m){var O=M;return function(_,z){if(O===I)throw Error("Generator is already running");if(O===p){if(_==="throw")throw z;return{value:e,done:!0}}for(m.method=_,m.arg=z;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(O===M)throw O=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);O=I;var Z=d(v,C,m);if(Z.type==="normal"){if(O=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(O=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,O=v.iterator[m];if(O===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var _=d(O,v.iterator,C.arg);if(_.type==="throw")return C.method="throw",C.arg=_.arg,C.delegate=null,j;var z=_.arg;return z?z.done?(C[v.resultName]=z.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):z:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ae(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function Me(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,O=function _(){for(;++m<v.length;)if(n.call(v,m))return _.value=v[m],_.done=!1,_;return _.value=e,_.done=!0,_};return O.next=O}}throw new TypeError(C4(v)+" is not iterable")}return y.prototype=D,i(b,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:y,configurable:!0}),y.displayName=s(D,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===y||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,D):(v.__proto__=D,s(v,u,"GeneratorFunction")),v.prototype=Object.create(b),v},t.awrap=function(v){return{__await:v}},R(U.prototype),s(U.prototype,l,function(){return this}),t.AsyncIterator=U,t.async=function(v,C,m,O,_){_===void 0&&(_=Promise);var z=new U(c(v,C,m,O),_);return t.isGeneratorFunction(C)?z:z.next().then(function(H){return H.done?H.value:z.next()})},R(b),s(b,u,"Generator"),s(b,o,function(){return this}),s(b,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var O in C)m.push(O);return m.reverse(),function _(){for(;m.length;){var z=m.pop();if(z in C)return _.value=z,_.done=!1,_}return _.done=!0,_}},t.values=Me,ae.prototype={constructor:ae,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function O(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var _=this.tryEntries.length-1;_>=0;--_){var z=this.tryEntries[_],H=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var F=n.call(z,"catchLoc"),Z=n.call(z,"finallyLoc");if(F&&Z){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if(F){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(C,m){for(var O=this.tryEntries.length-1;O>=0;--O){var _=this.tryEntries[O];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var z=_;break}}z&&(C==="break"||C==="continue")&&z.tryLoc<=m&&m<=z.finallyLoc&&(z=null);var H=z?z.completion:{};return H.type=C,H.arg=m,z?(this.method="next",this.next=z.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),K(O),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.tryLoc===C){var _=O.completion;if(_.type==="throw"){var z=_.arg;K(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(C,m,O){return this.delegate={iterator:Me(C),resultName:m,nextLoc:O},this.method==="next"&&(this.arg=e),j}},t}function gq(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function ka(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){gq(a,n,i,o,l,"next",u)}function l(u){gq(a,n,i,o,l,"throw",u)}o(void 0)})}}var QVe=d9.create("store_idv"),FVe=function(t,r){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var n=ka(dt().mark(function a(){var o;return dt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=new HVe,u.next=3,o.init();case 3:t({wasmService:o});case 4:case"end":return u.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),setFinalWaitingUi:function(i){t({isFinalWaitingUi:i})},connectToIdv:function(i){return ka(dt().mark(function a(){var o,l,u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!((o=r().wasmService)!==null&&o!==void 0&&o.isServiceConnected())){M.next=3;break}return M.next=3,(l=r().wasmService)===null||l===void 0?void 0:l.disconnect();case 3:return M.next=5,r().wasmService.prepareAndConnect(i);case 5:if(u=M.sent,s=null,u.code===4&&(s=g4.HTTP_ISSUE),u.code!==0&&u.code!==4&&(s=g4.PROVIDER_ERROR),s===null){M.next=12;break}return c=new y5({errorCode:s}),M.abrupt("return",{error:c});case 12:return M.abrupt("return",{});case 13:case"end":return M.stop()}},a)}))()},connectByUrl:function(i){return ka(dt().mark(function a(){var o,l,u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return o=r().wasmService,M.next=3,o.connectByUrl(i);case 3:if(l=M.sent,u=null,l.code===4&&(u=g4.HTTP_ISSUE),l.code!==0&&l.code!==4&&(u=g4.PROVIDER_ERROR),u===null){M.next=13;break}return s=new y5({errorCode:u}),c=new Gh({errorCode:SS.CONNECTION_ISSUE,underlyingBaseError:s}),M.abrupt("return",{workflows:[],error:c});case 13:return M.abrupt("return",{workflows:l.data});case 14:case"end":return M.stop()}},a)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(i){var a=function(l){var u,s=(u=r().currentSessionData)===null||u===void 0?void 0:u.sessionId,c=A4(A4({},l.results),{},{sessionId:s}),d=A4({results:c},l.error&&{error:l.error});r().setCurrentSessionDataLsAndStore(null),i(d)};t(function(){return{workflowSessionCompletion:a}})},loadModules:function(){var n=ka(dt().mark(function a(){var o,l,u,s;return dt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return o=r().externalModulesNames,d.prev=1,d.next=4,BVe(o);case 4:return l=d.sent,t(function(){return{externalModules:l}}),d.abrupt("return",{});case 9:return d.prev=9,d.t0=d.catch(1),(u=r().wasmService)===null||u===void 0||u.shutdown(),r().resetWasmService(),r().resetProps(),s=new N5({errorCode:i5.MODULES_INSTANTIATION_FAILURE}),d.abrupt("return",{error:s});case 16:case"end":return d.stop()}},a,null,[[1,9]])}));function i(){return n.apply(this,arguments)}return i}(),setProcessingTemplate:function(i){var a=Ev(i.find(function(o){return o.templateId===PW}));a.templateLayout=SJ(a.templateLayout,r().layout),t({proccessingTransformedTemplate:a})},setIsProcessing:function(i){t({isProcessing:i})},_pushStep:function(){var n=ka(dt().mark(function a(o,l){var u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=null,s=function(){var g=ka(dt().mark(function I(){var p,j,h,y;return dt().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,r().wasmService.pushData(o,l);case 2:if(p=T.sent,j=null,p.code===4&&(j=Wi.HTTP_ISSUE),p.code!==0&&p.code!==4&&(j=Wi.PROVIDER_ERROR),j!==null&&(h=new h5({errorCode:Wi.HTTP_ISSUE}),y=new yi({errorCode:Ni.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:h}),u=y),p.code!==0){T.next=12;break}return u=null,T.abrupt("return",p);case 12:return T.abrupt("return",null);case 13:case"end":return T.stop()}},I)}));return function(){return g.apply(this,arguments)}}(),c=function(){return null},M.next=5,jv(s,c);case 5:return M.abrupt("return",u?{error:u}:{});case 6:case"end":return M.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),_findStepById:function(i){var a=r().workflow;if(!(!a||!i))return a.steps.find(function(o){return o.id===i})},_waitingForNextStep:function(){var n=ka(dt().mark(function a(){var o,l,u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return o=r().currentStepId,l=null,u=function(){var g=ka(dt().mark(function I(){var p,j,h,y,D,T,L,w,b,R,U,P,Q,le,K;return dt().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,r().wasmService.getSessionState();case 2:if(y=Me.sent,D=(p=y.data)===null||p===void 0?void 0:p.currentStep,T=(j=y.data)===null||j===void 0?void 0:j.isProcessingFiles,L=(h=y.data)===null||h===void 0||(h=h.workflow)===null||h===void 0?void 0:h.steps,w=pPe(L,D),b=y.code===4,R=y.code!==0&&y.code!==4,U=y.code===0&&(!y.data.workflow||!y.data.currentStep),P=D&&D===o,Q=null,L&&!w&&(Q=Wi.NOT_DATA_TYPE),b&&(Q=Wi.HTTP_ISSUE),R&&(Q=Wi.PROVIDER_ERROR),T&&(Q=Wi.IS_PROCESSING),P&&(Q=Wi.SAME_STEP),U&&(Q=Wi.DECODING_FAILED),Q!==null&&(le=new h5({errorCode:Q}),K=new yi({errorCode:Ni.INTERNAL_ISSUE,underlyingBaseError:le}),l=K),QVe(JSON.stringify({nextStep:D,isDataType:w,isProcessingFiles:T})),!(w&&!P&&!T&&!b&&!R&&!U)){Me.next=23;break}return l=null,Me.abrupt("return",y.data);case 23:return Me.abrupt("return",null);case 24:case"end":return Me.stop()}},I)}));return function(){return g.apply(this,arguments)}}(),s=function(){return null},M.next=6,jv(u,s);case 6:if(c=M.sent,!l){M.next=9;break}return M.abrupt("return",{error:l});case 9:return M.abrupt("return",{workflow:c==null?void 0:c.workflow,nextStep:c==null?void 0:c.currentStep});case 10:case"end":return M.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),setFinalStepAndStopProcess:function(i){var a=i||r().currentStepId;if(a){var o=r()._findStepById(a);o&&(r().workflowSessionCompletion({results:{finalStep:{id:o.id,name:o.name,final:o.final}}}),r().resetSession(),r().listener({target:mM.SERVICE,eventType:r5.MESSAGE,message:n5.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var n=ka(dt().mark(function a(o,l){var u,s,c,d,M,g,I,p;return dt().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(r().setIsProcessing(!0),!r().isFinalWaitingUi){h.next=4;break}return r().setFinalStepAndStopProcess(),h.abrupt("return");case 4:if(!(l instanceof ot)){h.next=10;break}return u=l,s=new yi({errorCode:Ni.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:u}),r().workflowSessionCompletion({error:s}),r().resetSession(),h.abrupt("return");case 10:return h.next=12,r()._pushStep(o,l);case 12:if(c=h.sent,!c.error){h.next=17;break}return r().workflowSessionCompletion({error:c.error}),r().resetSession(),h.abrupt("return");case 17:return h.next=19,r()._waitingForNextStep();case 19:if(d=h.sent,!d.error){h.next=24;break}return r().workflowSessionCompletion({error:d.error}),r().resetSession(),h.abrupt("return");case 24:if(M=d.workflow,g=d.nextStep,r().setWorkflow(M),r().setLayout(M.client.layout),r().setProcessingTemplate(M.client.steps),I=r()._findStepById(g),p=function(D){return!!D&&Object.prototype.toString.call(D)==="[object Object]"&&D.templateId},!(I!=null&&I.final&&!p(I.client))){h.next=34;break}return r().setFinalStepAndStopProcess(I.id),h.abrupt("return");case 34:I!=null&&I.final&&p(I.client)&&r().setFinalWaitingUi(!0),r().onChangeScreen(g),r().setIsProcessing(!1);case 37:case"end":return h.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),continueSession:function(){var n=ka(dt().mark(function a(){var o,l,u,s,c,d,M,g,I,p,j,h,y;return dt().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(o={isContinue:!1},l=r().workflow,u=r().getCurrentSessionDataLs(),s=r().sessionRestoreMode,s){T.next=6;break}return T.abrupt("return",o);case 6:if(u){T.next=8;break}return T.abrupt("return",o);case 8:if(c=u.sessionId,d=u.workflowId,!(!c||d!==l.id)){T.next=11;break}return T.abrupt("return",o);case 11:return T.next=13,r().wasmService.continueSession(c);case 13:return M=T.sent,g=M.data,I=g.currentStep,"id"in g&&"currentStep"in g||(p=new E5({errorCode:Oh.DECODING_FAILED}),j=new yi({errorCode:Ni.START_SESSION_ERROR,underlyingBaseError:p}),o=A4(A4({},o),{},{error:j})),h=r()._findStepById(I),(h==null?void 0:h.final)===!1?(y=g.currentStep,r().setIsProcessing(!1),r().setCurrentStepId(y),r().setCurrentSessionDataLsAndStore({sessionId:g.id,workflowId:d}),r().listener({target:mM.SERVICE,eventType:r5.MESSAGE,message:n5.DID_START_RESTORE_SESSION}),o=A4(A4({},o),{},{isContinue:!0})):r().setCurrentSessionDataLsAndStore(null),T.abrupt("return",o);case 20:case"end":return T.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),onChangeScreen:function(i,a){if(!i&&!a)return t(function(){return{currentScreenConfig:null}});if(a)return t(function(){return{currentScreenConfig:a}});if(i===null)return t(function(){return{currentScreenConfig:null}});var o=r().workflow,l=null;if(i===PW)l=r().proccessingTransformedTemplate;else{var u;if(l=(u=r()._findStepById(i))===null||u===void 0?void 0:u.client,l!==null){var s;l.sessionId=(s=r().currentSessionData)===null||s===void 0?void 0:s.sessionId}l&&l.templateLayout&&(l.templateLayout=SJ(l.templateLayout,r().layout))}var c=IPe(r().externalModules,o.steps,i);if(l===null||!c){var d=new yi({errorCode:Ni.UNKNOWN_STEP,message:"Unsupported step template"});r().workflowSessionCompletion({error:d}),t(function(){return{currentScreenConfig:null}}),r().resetSession();return}r().setCurrentStepId(i),t(function(){return{currentScreenConfig:l}})},deinitializationIdv:function(){var n=ka(dt().mark(function a(){var o,l;return dt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.shutdown();case 2:if(l=s.sent,r().resetWasmService(),r().externalModules.forEach(function(c){c.component.deinitialize&&c.component.isReady&&c.component.deinitialize()}),(l==null?void 0:l.code)!==0){s.next=7;break}return s.abrupt("return",{});case 7:return s.abrupt("return",{});case 8:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),resetSession:function(){return t(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null}})},resetWasmService:function(){return t(function(){return{wasmService:null}})}}};function BVe(e){return I9.apply(this,arguments)}function I9(){return I9=ka(dt().mark(function e(t){var r,n,i,a,o,l;return dt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=[{id:Ul.getIdentifier(),supportedTemplates:Ul.getSupportedTemplates(),component:Ul}],n=g9(g9({},"LIVENESS",function(){return Promise.resolve().then(()=>cLt)}),"DOC_READER",function(){return Promise.resolve().then(()=>U7r)}),i=dt().mark(function c(){var d,M,g;return dt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(d=o[a],M=function(){return n[d]()},!M){p.next=7;break}return p.next=5,M();case 5:g=p.sent,r.push({id:g.default.getIdentifier(),supportedTemplates:g.default.getSupportedTemplates(),component:g.default});case 7:case"end":return p.stop()}},c)}),a=0,o=t;case 4:if(!(a<o.length)){s.next=9;break}return s.delegateYield(i(),"t0",6);case 6:a++,s.next=4;break;case 9:return l=r.filter(function(c){return c!==null}),s.abrupt("return",l);case 11:case"end":return s.stop()}},e)})),I9.apply(this,arguments)}function Y5(e){"@babel/helpers - typeof";return Y5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y5(e)}function Iq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function p9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iq(Object(r),!0).forEach(function(n){ZVe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZVe(e,t,r){return(t=GVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GVe(e){var t=WVe(e,"string");return Y5(t)=="symbol"?t:t+""}function WVe(e,t){if(Y5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Y5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xt=sbe(function(){return p9(p9(p9({},mPe.apply(void 0,arguments)),UPe.apply(void 0,arguments)),FVe.apply(void 0,arguments))}),KVe=function(t){var r=t.children;return x.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:r})},JVe=function(){var t=Xt(function(I){return I.currentScreenConfig}),r=Xt(function(I){return I.pushStepWaitNextStepAndSet}),n=Xt(function(I){return I.proccessingTransformedTemplate}),i=Xt(function(I){return I.isProcessing}),a=Xt(function(I){return I.setIsProcessing}),o=Xt(function(I){return I.currentStepId}),l=Xt(function(I){return I.listener}),u=Xt(function(I){return I.externalModules}),s=Xt(function(I){return I.modulesConfig}),c=function(p,j){l({target:mM.WEB_COMPONENT,eventType:r5.MESSAGE,message:j,module:p})},d=function(p){a(p)},M=function(p){o&&(a(!1),r(o,p))},g=et.useCallback(function(){if(!t)return x.jsx(KVe,{children:"Waiting for play... or process completed"});var I=u.find(function(p){return p.supportedTemplates.includes(t.templateId)});if(I&&t)return x.jsx(I.component,{perform:M,moduleProps:t,modulesConfig:s,idvEventListener:c,isProcessing:d})},[t,u]);return x.jsx(x.Fragment,{children:x.jsx(tK,{direction:AS.Ltr,children:x.jsxs(x.Fragment,{children:[i&&x.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"white",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n?x.jsx(Ul,{perform:M,moduleProps:n,idvEventListener:c,isProcessing:d}):"Processing..."}),g()]})})})};function XVe(){return x.jsx(et.StrictMode,{children:x.jsx(uwe,{children:x.jsx(JVe,{})})})}const qVe="*,*:before,*:after{box-sizing:border-box}ul,p,h1,h2,h3,h4{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}._window_tmw1v_24{--base-main-color: #7E57C5;--base-font-family: sans-serif;width:100%;max-width:680px;height:100%;position:relative;background:#fff;overflow:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);margin:0 auto;font-family:var(--base-font-family)}._content_tmw1v_43{overflow:auto;height:100%;display:flex;flex-direction:column}._back_tmw1v_50{position:absolute;width:24px;height:24px;top:16px;left:16px;cursor:pointer}._to-mobile_tmw1v_59{position:absolute;left:calc(50% - 12px);height:24px;width:24px;top:16px;cursor:pointer}",eYe="._error-boundary_mput0_1{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;position:absolute;width:100%;height:100%;top:0;left:0}._title_mput0_14{font-size:20px;font-weight:700;margin-bottom:10px}._subtitle_mput0_20{margin-bottom:10px}._details_mput0_24{font-weight:lighter}";function FM(e){"@babel/helpers - typeof";return FM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},FM(e)}function tYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yq(n.key),n)}}function rYe(e,t,r){return t&&pq(e.prototype,t),r&&pq(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nYe(e,t,r){return t=F5(t),iYe(e,y9()?Reflect.construct(t,[],F5(e).constructor):t.apply(e,r))}function iYe(e,t){if(t&&(FM(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aYe(e)}function aYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q5(e,t)}function N9(e){var t=typeof Map=="function"?new Map:void 0;return N9=function(n){if(n===null||!uYe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return lYe(n,arguments,F5(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Q5(i,n)},N9(e)}function lYe(e,t,r){if(y9())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&Q5(i,r.prototype),i}function y9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(y9=function(){return!!e})()}function uYe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function Q5(e,t){return Q5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Q5(e,t)}function F5(e){return F5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F5(e)}function Nq(e,t,r){return(t=yq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yq(e){var t=sYe(e,"string");return FM(t)=="symbol"?t:t+""}function sYe(e,t){if(FM(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(FM(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cYe=[qVe,eYe],MYe=[].concat(cYe).reduce(function(e,t){return e+t.toString()},""),hq=function(e){function t(){var r;return tYe(this,t),r=nYe(this,t),Nq(r,"_root",wG(r.attachShadow({mode:"open"}))),Nq(r,"_mounted",!1),r}return oYe(t,e),rYe(t,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(x.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[x.jsx("style",{nonce:Xt.getState().getNonce(),children:MYe}),x.jsx(XVe,{})]}))}},{key:"disconnectedCallback",value:function(){var n=this;setTimeout(function(){n._mounted&&(n._mounted=!1,n._root.unmount())}),d9.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(N9(HTMLElement));function S4(e){"@babel/helpers - typeof";return S4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S4(e)}function Ji(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ji=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,O,_){return m[O]=_}}function c(v,C,m,O){var _=C&&C.prototype instanceof h?C:h,z=Object.create(_.prototype),H=new ae(O||[]);return i(z,"_invoke",{value:P(v,m,H)}),z}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var M="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function h(){}function y(){}function D(){}var T={};s(T,o,function(){return this});var L=Object.getPrototypeOf,w=L&&L(L(Me([])));w&&w!==r&&n.call(w,o)&&(T=w);var b=D.prototype=h.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function U(v,C){function m(_,z,H,F){var Z=d(v[_],v,z);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&S4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var O;i(this,"_invoke",{value:function(z,H){function F(){return new C(function(Z,ce){m(z,H,Z,ce)})}return O=O?O.then(F,F):F()}})}function P(v,C,m){var O=M;return function(_,z){if(O===I)throw Error("Generator is already running");if(O===p){if(_==="throw")throw z;return{value:e,done:!0}}for(m.method=_,m.arg=z;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(O===M)throw O=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);O=I;var Z=d(v,C,m);if(Z.type==="normal"){if(O=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(O=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,O=v.iterator[m];if(O===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var _=d(O,v.iterator,C.arg);if(_.type==="throw")return C.method="throw",C.arg=_.arg,C.delegate=null,j;var z=_.arg;return z?z.done?(C[v.resultName]=z.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):z:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ae(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function Me(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,O=function _(){for(;++m<v.length;)if(n.call(v,m))return _.value=v[m],_.done=!1,_;return _.value=e,_.done=!0,_};return O.next=O}}throw new TypeError(S4(v)+" is not iterable")}return y.prototype=D,i(b,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:y,configurable:!0}),y.displayName=s(D,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===y||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,D):(v.__proto__=D,s(v,u,"GeneratorFunction")),v.prototype=Object.create(b),v},t.awrap=function(v){return{__await:v}},R(U.prototype),s(U.prototype,l,function(){return this}),t.AsyncIterator=U,t.async=function(v,C,m,O,_){_===void 0&&(_=Promise);var z=new U(c(v,C,m,O),_);return t.isGeneratorFunction(C)?z:z.next().then(function(H){return H.done?H.value:z.next()})},R(b),s(b,u,"Generator"),s(b,o,function(){return this}),s(b,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var O in C)m.push(O);return m.reverse(),function _(){for(;m.length;){var z=m.pop();if(z in C)return _.value=z,_.done=!1,_}return _.done=!0,_}},t.values=Me,ae.prototype={constructor:ae,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function O(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var _=this.tryEntries.length-1;_>=0;--_){var z=this.tryEntries[_],H=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var F=n.call(z,"catchLoc"),Z=n.call(z,"finallyLoc");if(F&&Z){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if(F){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(C,m){for(var O=this.tryEntries.length-1;O>=0;--O){var _=this.tryEntries[O];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var z=_;break}}z&&(C==="break"||C==="continue")&&z.tryLoc<=m&&m<=z.finallyLoc&&(z=null);var H=z?z.completion:{};return H.type=C,H.arg=m,z?(this.method="next",this.next=z.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),K(O),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.tryLoc===C){var _=O.completion;if(_.type==="throw"){var z=_.arg;K(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(C,m,O){return this.delegate={iterator:Me(C),resultName:m,nextLoc:O},this.method==="next"&&(this.arg=e),j}},t}function Eq(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function BM(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){Eq(a,n,i,o,l,"next",u)}function l(u){Eq(a,n,i,o,l,"throw",u)}o(void 0)})}}function fYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dYe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,IYe(n.key),n)}}function gYe(e,t,r){return t&&dYe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IYe(e){var t=pYe(e,"string");return S4(t)=="symbol"?t:t+""}function pYe(e,t){if(S4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(S4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var NYe=function(){function e(){fYe(this,e)}return gYe(e,[{key:"initialize",value:function(){var t=BM(Ji().mark(function n(i){var a;return Ji().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return a=Xt.getState().initialize(i),l.abrupt("return",a);case 2:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"configure",value:function(){var t=BM(Ji().mark(function n(i){var a,o;return Ji().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(typeof i=="string"){u.next=5;break}return u.next=3,Xt.getState().configure(i);case 3:return a=u.sent,u.abrupt("return",a);case 5:return u.next=7,Xt.getState().configureWithUrl(i);case 7:return o=u.sent,u.abrupt("return",o);case 9:case"end":return u.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"getWorkFlows",value:function(){var t=BM(Ji().mark(function n(i){var a;return Ji().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Xt.getState().getWorkflows(i);case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"prepareWorkflow",value:function(){var t=BM(Ji().mark(function n(i){var a,o;return Ji().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=i.workfowId,u.next=3,Xt.getState().preparareWorkflowAndPrepareUi(a);case 3:return o=u.sent,u.abrupt("return",o);case 5:case"end":return u.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startWorkflow",value:function(){var t=BM(Ji().mark(function n(){var i;return Ji().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Xt.getState().startNewSession();case 2:if(i=o.sent,!i.error){o.next=5;break}return o.abrupt("return",i);case 5:return o.abrupt("return",new Promise(function(l){var u=function(c){l(c)};Xt.getState().playWorkflow(u)}));case 6:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"deinitialize",value:function(){var t=BM(Ji().mark(function n(){var i;return Ji().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Xt.getState().deinitialize();case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"setNonce",value:function(r){Xt.getState().setNonce(r)}},{key:"eventListener",set:function(r){if(!r||typeof r!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Xt.getState().setListener(r)}},{key:"sessionRestoreMode",set:function(r){Xt.getState().setSessionRestoreMode(r)}},{key:"currentSessionId",get:function(){return Xt.getState().getCurrentSessionId()}}])}(),yYe=window.customElements.get("idv-flow");yYe||window.customElements.define("idv-flow",hq);var hYe=Object.defineProperty,EYe=Object.defineProperties,DYe=Object.getOwnPropertyDescriptors,Dq=Object.getOwnPropertySymbols,jYe=Object.prototype.hasOwnProperty,mYe=Object.prototype.propertyIsEnumerable,jq=(e,t,r)=>t in e?hYe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mq=(e,t)=>{for(var r in t||(t={}))jYe.call(t,r)&&jq(e,r,t[r]);if(Dq)for(var r of Dq(t))mYe.call(t,r)&&jq(e,r,t[r]);return e},TYe=(e,t)=>EYe(e,DYe(t)),Br=(e,t,r)=>new Promise((n,i)=>{var a=u=>{try{l(r.next(u))}catch(s){i(s)}},o=u=>{try{l(r.throw(u))}catch(s){i(s)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);l((r=r.apply(e,t)).next())}),ZM=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Tq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cq={exports:{}},g6={},Aq={exports:{}},Ue={};/**
|
|
51
|
+
`),n=new Blob([r],{type:"text/plain"}),i=window.URL.createObjectURL(n),a=document.createElement("a");a.download="log.txt",a.href=i,a.click(),window.URL.revokeObjectURL(i),this._logs=[]}}}])}();const d9=new kVe;function T4(e){"@babel/helpers - typeof";return T4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T4(e)}function tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,O,_){return m[O]=_}}function c(v,C,m,O){var _=C&&C.prototype instanceof h?C:h,z=Object.create(_.prototype),H=new ae(O||[]);return i(z,"_invoke",{value:P(v,m,H)}),z}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var M="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function h(){}function y(){}function D(){}var T={};s(T,o,function(){return this});var L=Object.getPrototypeOf,w=L&&L(L(Me([])));w&&w!==r&&n.call(w,o)&&(T=w);var b=D.prototype=h.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function U(v,C){function m(_,z,H,F){var Z=d(v[_],v,z);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&T4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var O;i(this,"_invoke",{value:function(z,H){function F(){return new C(function(Z,ce){m(z,H,Z,ce)})}return O=O?O.then(F,F):F()}})}function P(v,C,m){var O=M;return function(_,z){if(O===I)throw Error("Generator is already running");if(O===p){if(_==="throw")throw z;return{value:e,done:!0}}for(m.method=_,m.arg=z;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(O===M)throw O=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);O=I;var Z=d(v,C,m);if(Z.type==="normal"){if(O=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(O=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,O=v.iterator[m];if(O===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var _=d(O,v.iterator,C.arg);if(_.type==="throw")return C.method="throw",C.arg=_.arg,C.delegate=null,j;var z=_.arg;return z?z.done?(C[v.resultName]=z.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):z:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ae(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function Me(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,O=function _(){for(;++m<v.length;)if(n.call(v,m))return _.value=v[m],_.done=!1,_;return _.value=e,_.done=!0,_};return O.next=O}}throw new TypeError(T4(v)+" is not iterable")}return y.prototype=D,i(b,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:y,configurable:!0}),y.displayName=s(D,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===y||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,D):(v.__proto__=D,s(v,u,"GeneratorFunction")),v.prototype=Object.create(b),v},t.awrap=function(v){return{__await:v}},R(U.prototype),s(U.prototype,l,function(){return this}),t.AsyncIterator=U,t.async=function(v,C,m,O,_){_===void 0&&(_=Promise);var z=new U(c(v,C,m,O),_);return t.isGeneratorFunction(C)?z:z.next().then(function(H){return H.done?H.value:z.next()})},R(b),s(b,u,"Generator"),s(b,o,function(){return this}),s(b,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var O in C)m.push(O);return m.reverse(),function _(){for(;m.length;){var z=m.pop();if(z in C)return _.value=z,_.done=!1,_}return _.done=!0,_}},t.values=Me,ae.prototype={constructor:ae,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function O(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var _=this.tryEntries.length-1;_>=0;--_){var z=this.tryEntries[_],H=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var F=n.call(z,"catchLoc"),Z=n.call(z,"finallyLoc");if(F&&Z){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if(F){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(C,m){for(var O=this.tryEntries.length-1;O>=0;--O){var _=this.tryEntries[O];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var z=_;break}}z&&(C==="break"||C==="continue")&&z.tryLoc<=m&&m<=z.finallyLoc&&(z=null);var H=z?z.completion:{};return H.type=C,H.arg=m,z?(this.method="next",this.next=z.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),K(O),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.tryLoc===C){var _=O.completion;if(_.type==="throw"){var z=_.arg;K(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(C,m,O){return this.delegate={iterator:Me(C),resultName:m,nextLoc:O},this.method==="next"&&(this.arg=e),j}},t}function Mq(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function Qn(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){Mq(a,n,i,o,l,"next",u)}function l(u){Mq(a,n,i,o,l,"throw",u)}o(void 0)})}}function RVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PVe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fq(n.key),n)}}function UVe(e,t,r){return t&&PVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QM(e,t,r){return(t=fq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fq(e){var t=$Ve(e,"string");return T4(t)=="symbol"?t:t+""}function $Ve(e,t){if(T4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(T4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qo=d9.create("wasm_idv"),HVe=function(){function e(t){RVe(this,e),QM(this,"_worker",null),QM(this,"_initialized",!1),QM(this,"_connectedToIdv",!1),QM(this,"_serviceRunning",!1),QM(this,"_userId",hPe(LLe)),QM(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return UVe(e,[{key:"init",value:function(){var t=Qn(tt().mark(function n(){var i,a,o,l;return tt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=1,s.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/d9ec9d9-f6d3304b9//PlatformAdaptor.worker.js");case 4:return i=s.sent,s.next=7,i.blob();case 7:a=s.sent,o=URL.createObjectURL(a),this._worker=new Worker(o),s.next=15;break;case 12:s.prev=12,s.t0=s.catch(1),Qo("Creating worker error: ".concat(JSON.stringify(s.t0)));case 15:s.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){s.next=20;break}return s.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),s.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/d9ec9d9-f6d3304b9/",preMain:!0});case 23:return l=s.sent,s.abrupt("return",l);case 25:case"end":return s.stop()}},n,this,[[1,12]])}));function r(){return t.apply(this,arguments)}return r}()},{key:"prepareAndConnect",value:function(){var t=Qn(tt().mark(function n(i){var a;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:kW,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:i.host,httpRetryCount:i.httpRetryCount||0,httpTimeoutMs:i.httpTimeoutMs||0,isSecure:!0,password:i.password,port:i.port?i.port:0,schema:i.schema?i.schema:"basic",userName:i.userName},preMain:!0});case 2:return a=l.sent,Qo("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(a))),a.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),l.abrupt("return",a);case 6:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"connectByUrl",value:function(){var t=Qn(tt().mark(function n(i){var a;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:kW,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:i},preMain:!0});case 2:return a=l.sent,a.code===0&&(this._serviceRunning=!0),l.abrupt("return",a);case 5:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startSession",value:function(){var t=Qn(tt().mark(function n(i){var a,o;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a={workflowId:i},u.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:a,preMain:!0});case 3:return o=u.sent,Qo("Start session connect result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"continueSession",value:function(){var t=Qn(tt().mark(function n(i){var a,o;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a={sessionId:i},u.next=3,this.sendMessage({continueParams:a,target:"custom",method:"continue_session",preMain:!0});case 3:return o=u.sent,Qo("continue session result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"listWorkflows",value:function(){var t=Qn(tt().mark(function n(){var i,a,o=arguments;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{limit:0,skip:0},u.next=3,this.sendMessage({workflowsParams:i,target:"custom",method:"list_workflows",preMain:!0});case 3:return a=u.sent,Qo("listWorkflows result: ".concat(JSON.stringify(a))),u.abrupt("return",a);case 6:case"end":return u.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getHealth",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"abandonSession",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getWorkflow",value:function(){var t=Qn(tt().mark(function n(i){var a;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({workflowIdParams:{workflowId:i},target:"custom",method:"get_workflow",preMain:!0});case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"pushData",value:function(){var t=Qn(tt().mark(function n(i,a){var o;return tt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return Qo("Push data: ".concat(i," , ").concat(JSON.stringify(a))),u.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:a,stage:0,step:i},preMain:!0});case 3:return o=u.sent,Qo("Push data result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"getSessionState",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"waitForSessionUpdate",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return i=o.sent,Qo("Wait for session update result: ".concat(JSON.stringify(i))),o.abrupt("return",i);case 5:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"disconnect",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return i=o.sent,this._connectedToIdv=!1,this._serviceRunning=!1,o.abrupt("return",i);case 6:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"sendMessage",value:function(){var t=Qn(tt().mark(function n(i){var a=this;return tt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",new Promise(function(u,s){if(!a._worker)return s();a._worker.onmessage=function(c){var d=c.data.target;if(d==="stdout"){Qo(JSON.stringify(c.data.content));return}if(d==="custom"){var M=c.data,g=M.method,I=M.data;Qo("::: custom method, ".concat(g,", ").concat(JSON.stringify(I))),g==="onRuntimeInitialized"&&(a._initialized=!0),u(I)}if(d==="stderr"){var p=c.data.content;Qo(JSON.stringify(p)),a._setErrorScreen&&a._setErrorScreen(p)}},a._worker.postMessage(i)}));case 1:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var r;(r=this._worker)===null||r===void 0||r.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var t=Qn(tt().mark(function n(){var i;return tt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(this._worker){o.next=2;break}return o.abrupt("return",{code:0});case 2:if(this._connectedToIdv){o.next=5;break}return this.terminateWorker(),o.abrupt("return",{code:0});case 5:return o.next=7,this.disconnect();case 7:return i=o.sent,this.terminateWorker(),o.abrupt("return",i);case 10:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()}])}();function C4(e){"@babel/helpers - typeof";return C4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C4(e)}function dq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dq(Object(r),!0).forEach(function(n){g9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g9(e,t,r){return(t=VVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VVe(e){var t=YVe(e,"string");return C4(t)=="symbol"?t:t+""}function YVe(e,t){if(C4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(C4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */dt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,O,_){return m[O]=_}}function c(v,C,m,O){var _=C&&C.prototype instanceof h?C:h,z=Object.create(_.prototype),H=new ae(O||[]);return i(z,"_invoke",{value:P(v,m,H)}),z}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var M="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function h(){}function y(){}function D(){}var T={};s(T,o,function(){return this});var L=Object.getPrototypeOf,w=L&&L(L(Me([])));w&&w!==r&&n.call(w,o)&&(T=w);var b=D.prototype=h.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function U(v,C){function m(_,z,H,F){var Z=d(v[_],v,z);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&C4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var O;i(this,"_invoke",{value:function(z,H){function F(){return new C(function(Z,ce){m(z,H,Z,ce)})}return O=O?O.then(F,F):F()}})}function P(v,C,m){var O=M;return function(_,z){if(O===I)throw Error("Generator is already running");if(O===p){if(_==="throw")throw z;return{value:e,done:!0}}for(m.method=_,m.arg=z;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(O===M)throw O=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);O=I;var Z=d(v,C,m);if(Z.type==="normal"){if(O=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(O=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,O=v.iterator[m];if(O===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var _=d(O,v.iterator,C.arg);if(_.type==="throw")return C.method="throw",C.arg=_.arg,C.delegate=null,j;var z=_.arg;return z?z.done?(C[v.resultName]=z.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):z:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ae(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function Me(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,O=function _(){for(;++m<v.length;)if(n.call(v,m))return _.value=v[m],_.done=!1,_;return _.value=e,_.done=!0,_};return O.next=O}}throw new TypeError(C4(v)+" is not iterable")}return y.prototype=D,i(b,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:y,configurable:!0}),y.displayName=s(D,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===y||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,D):(v.__proto__=D,s(v,u,"GeneratorFunction")),v.prototype=Object.create(b),v},t.awrap=function(v){return{__await:v}},R(U.prototype),s(U.prototype,l,function(){return this}),t.AsyncIterator=U,t.async=function(v,C,m,O,_){_===void 0&&(_=Promise);var z=new U(c(v,C,m,O),_);return t.isGeneratorFunction(C)?z:z.next().then(function(H){return H.done?H.value:z.next()})},R(b),s(b,u,"Generator"),s(b,o,function(){return this}),s(b,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var O in C)m.push(O);return m.reverse(),function _(){for(;m.length;){var z=m.pop();if(z in C)return _.value=z,_.done=!1,_}return _.done=!0,_}},t.values=Me,ae.prototype={constructor:ae,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function O(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var _=this.tryEntries.length-1;_>=0;--_){var z=this.tryEntries[_],H=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var F=n.call(z,"catchLoc"),Z=n.call(z,"finallyLoc");if(F&&Z){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if(F){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(C,m){for(var O=this.tryEntries.length-1;O>=0;--O){var _=this.tryEntries[O];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var z=_;break}}z&&(C==="break"||C==="continue")&&z.tryLoc<=m&&m<=z.finallyLoc&&(z=null);var H=z?z.completion:{};return H.type=C,H.arg=m,z?(this.method="next",this.next=z.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),K(O),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.tryLoc===C){var _=O.completion;if(_.type==="throw"){var z=_.arg;K(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(C,m,O){return this.delegate={iterator:Me(C),resultName:m,nextLoc:O},this.method==="next"&&(this.arg=e),j}},t}function gq(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function ka(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){gq(a,n,i,o,l,"next",u)}function l(u){gq(a,n,i,o,l,"throw",u)}o(void 0)})}}var QVe=d9.create("store_idv"),FVe=function(t,r){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var n=ka(dt().mark(function a(){var o;return dt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=new HVe,u.next=3,o.init();case 3:t({wasmService:o});case 4:case"end":return u.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),setFinalWaitingUi:function(i){t({isFinalWaitingUi:i})},connectToIdv:function(i){return ka(dt().mark(function a(){var o,l,u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!((o=r().wasmService)!==null&&o!==void 0&&o.isServiceConnected())){M.next=3;break}return M.next=3,(l=r().wasmService)===null||l===void 0?void 0:l.disconnect();case 3:return M.next=5,r().wasmService.prepareAndConnect(i);case 5:if(u=M.sent,s=null,u.code===4&&(s=g4.HTTP_ISSUE),u.code!==0&&u.code!==4&&(s=g4.PROVIDER_ERROR),s===null){M.next=12;break}return c=new y5({errorCode:s}),M.abrupt("return",{error:c});case 12:return M.abrupt("return",{});case 13:case"end":return M.stop()}},a)}))()},connectByUrl:function(i){return ka(dt().mark(function a(){var o,l,u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return o=r().wasmService,M.next=3,o.connectByUrl(i);case 3:if(l=M.sent,u=null,l.code===4&&(u=g4.HTTP_ISSUE),l.code!==0&&l.code!==4&&(u=g4.PROVIDER_ERROR),u===null){M.next=13;break}return s=new y5({errorCode:u}),c=new Gh({errorCode:SS.CONNECTION_ISSUE,underlyingBaseError:s}),M.abrupt("return",{workflows:[],error:c});case 13:return M.abrupt("return",{workflows:l.data});case 14:case"end":return M.stop()}},a)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(i){var a=function(l){var u,s=(u=r().currentSessionData)===null||u===void 0?void 0:u.sessionId,c=A4(A4({},l.results),{},{sessionId:s}),d=A4({results:c},l.error&&{error:l.error});r().setCurrentSessionDataLsAndStore(null),i(d)};t(function(){return{workflowSessionCompletion:a}})},loadModules:function(){var n=ka(dt().mark(function a(){var o,l,u,s;return dt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return o=r().externalModulesNames,d.prev=1,d.next=4,BVe(o);case 4:return l=d.sent,t(function(){return{externalModules:l}}),d.abrupt("return",{});case 9:return d.prev=9,d.t0=d.catch(1),(u=r().wasmService)===null||u===void 0||u.shutdown(),r().resetWasmService(),r().resetProps(),s=new N5({errorCode:i5.MODULES_INSTANTIATION_FAILURE}),d.abrupt("return",{error:s});case 16:case"end":return d.stop()}},a,null,[[1,9]])}));function i(){return n.apply(this,arguments)}return i}(),setProcessingTemplate:function(i){var a=Ev(i.find(function(o){return o.templateId===PW}));a.templateLayout=SJ(a.templateLayout,r().layout),t({proccessingTransformedTemplate:a})},setIsProcessing:function(i){t({isProcessing:i})},_pushStep:function(){var n=ka(dt().mark(function a(o,l){var u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=null,s=function(){var g=ka(dt().mark(function I(){var p,j,h,y;return dt().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,r().wasmService.pushData(o,l);case 2:if(p=T.sent,j=null,p.code===4&&(j=Wi.HTTP_ISSUE),p.code!==0&&p.code!==4&&(j=Wi.PROVIDER_ERROR),j!==null&&(h=new h5({errorCode:Wi.HTTP_ISSUE}),y=new yi({errorCode:Ni.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:h}),u=y),p.code!==0){T.next=12;break}return u=null,T.abrupt("return",p);case 12:return T.abrupt("return",null);case 13:case"end":return T.stop()}},I)}));return function(){return g.apply(this,arguments)}}(),c=function(){return null},M.next=5,jv(s,c);case 5:return M.abrupt("return",u?{error:u}:{});case 6:case"end":return M.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),_findStepById:function(i){var a=r().workflow;if(!(!a||!i))return a.steps.find(function(o){return o.id===i})},_waitingForNextStep:function(){var n=ka(dt().mark(function a(){var o,l,u,s,c;return dt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return o=r().currentStepId,l=null,u=function(){var g=ka(dt().mark(function I(){var p,j,h,y,D,T,L,w,b,R,U,P,Q,le,K;return dt().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,r().wasmService.getSessionState();case 2:if(y=Me.sent,D=(p=y.data)===null||p===void 0?void 0:p.currentStep,T=(j=y.data)===null||j===void 0?void 0:j.isProcessingFiles,L=(h=y.data)===null||h===void 0||(h=h.workflow)===null||h===void 0?void 0:h.steps,w=pPe(L,D),b=y.code===4,R=y.code!==0&&y.code!==4,U=y.code===0&&(!y.data.workflow||!y.data.currentStep),P=D&&D===o,Q=null,L&&!w&&(Q=Wi.NOT_DATA_TYPE),b&&(Q=Wi.HTTP_ISSUE),R&&(Q=Wi.PROVIDER_ERROR),T&&(Q=Wi.IS_PROCESSING),P&&(Q=Wi.SAME_STEP),U&&(Q=Wi.DECODING_FAILED),Q!==null&&(le=new h5({errorCode:Q}),K=new yi({errorCode:Ni.INTERNAL_ISSUE,underlyingBaseError:le}),l=K),QVe(JSON.stringify({nextStep:D,isDataType:w,isProcessingFiles:T})),!(w&&!P&&!T&&!b&&!R&&!U)){Me.next=23;break}return l=null,Me.abrupt("return",y.data);case 23:return Me.abrupt("return",null);case 24:case"end":return Me.stop()}},I)}));return function(){return g.apply(this,arguments)}}(),s=function(){return null},M.next=6,jv(u,s);case 6:if(c=M.sent,!l){M.next=9;break}return M.abrupt("return",{error:l});case 9:return M.abrupt("return",{workflow:c==null?void 0:c.workflow,nextStep:c==null?void 0:c.currentStep});case 10:case"end":return M.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),setFinalStepAndStopProcess:function(i){var a=i||r().currentStepId;if(a){var o=r()._findStepById(a);o&&(r().workflowSessionCompletion({results:{finalStep:{id:o.id,name:o.name,final:o.final}}}),r().resetSession(),r().listener({target:mM.SERVICE,eventType:r5.MESSAGE,message:n5.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var n=ka(dt().mark(function a(o,l){var u,s,c,d,M,g,I,p;return dt().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(r().setIsProcessing(!0),!r().isFinalWaitingUi){h.next=4;break}return r().setFinalStepAndStopProcess(),h.abrupt("return");case 4:if(!(l instanceof ot)){h.next=10;break}return u=l,s=new yi({errorCode:Ni.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:u}),r().workflowSessionCompletion({error:s}),r().resetSession(),h.abrupt("return");case 10:return h.next=12,r()._pushStep(o,l);case 12:if(c=h.sent,!c.error){h.next=17;break}return r().workflowSessionCompletion({error:c.error}),r().resetSession(),h.abrupt("return");case 17:return h.next=19,r()._waitingForNextStep();case 19:if(d=h.sent,!d.error){h.next=24;break}return r().workflowSessionCompletion({error:d.error}),r().resetSession(),h.abrupt("return");case 24:if(M=d.workflow,g=d.nextStep,r().setWorkflow(M),r().setLayout(M.client.layout),r().setProcessingTemplate(M.client.steps),I=r()._findStepById(g),p=function(D){return!!D&&Object.prototype.toString.call(D)==="[object Object]"&&D.templateId},!(I!=null&&I.final&&!p(I.client))){h.next=34;break}return r().setFinalStepAndStopProcess(I.id),h.abrupt("return");case 34:I!=null&&I.final&&p(I.client)&&r().setFinalWaitingUi(!0),r().onChangeScreen(g),r().setIsProcessing(!1);case 37:case"end":return h.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),continueSession:function(){var n=ka(dt().mark(function a(){var o,l,u,s,c,d,M,g,I,p,j,h,y;return dt().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(o={isContinue:!1},l=r().workflow,u=r().getCurrentSessionDataLs(),s=r().sessionRestoreMode,s){T.next=6;break}return T.abrupt("return",o);case 6:if(u){T.next=8;break}return T.abrupt("return",o);case 8:if(c=u.sessionId,d=u.workflowId,!(!c||d!==l.id)){T.next=11;break}return T.abrupt("return",o);case 11:return T.next=13,r().wasmService.continueSession(c);case 13:return M=T.sent,g=M.data,I=g.currentStep,"id"in g&&"currentStep"in g||(p=new E5({errorCode:Oh.DECODING_FAILED}),j=new yi({errorCode:Ni.START_SESSION_ERROR,underlyingBaseError:p}),o=A4(A4({},o),{},{error:j})),h=r()._findStepById(I),(h==null?void 0:h.final)===!1?(y=g.currentStep,r().setIsProcessing(!1),r().setCurrentStepId(y),r().setCurrentSessionDataLsAndStore({sessionId:g.id,workflowId:d}),r().listener({target:mM.SERVICE,eventType:r5.MESSAGE,message:n5.DID_START_RESTORE_SESSION}),o=A4(A4({},o),{},{isContinue:!0})):r().setCurrentSessionDataLsAndStore(null),T.abrupt("return",o);case 20:case"end":return T.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),onChangeScreen:function(i,a){if(!i&&!a)return t(function(){return{currentScreenConfig:null}});if(a)return t(function(){return{currentScreenConfig:a}});if(i===null)return t(function(){return{currentScreenConfig:null}});var o=r().workflow,l=null;if(i===PW)l=r().proccessingTransformedTemplate;else{var u;if(l=(u=r()._findStepById(i))===null||u===void 0?void 0:u.client,l!==null){var s;l.sessionId=(s=r().currentSessionData)===null||s===void 0?void 0:s.sessionId}l&&l.templateLayout&&(l.templateLayout=SJ(l.templateLayout,r().layout))}var c=IPe(r().externalModules,o.steps,i);if(l===null||!c){var d=new yi({errorCode:Ni.UNKNOWN_STEP,message:"Unsupported step template"});r().workflowSessionCompletion({error:d}),t(function(){return{currentScreenConfig:null}}),r().resetSession();return}r().setCurrentStepId(i),t(function(){return{currentScreenConfig:l}})},deinitializationIdv:function(){var n=ka(dt().mark(function a(){var o,l;return dt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.shutdown();case 2:if(l=s.sent,r().resetWasmService(),r().externalModules.forEach(function(c){c.component.deinitialize&&c.component.isReady&&c.component.deinitialize()}),(l==null?void 0:l.code)!==0){s.next=7;break}return s.abrupt("return",{});case 7:return s.abrupt("return",{});case 8:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),resetSession:function(){return t(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null}})},resetWasmService:function(){return t(function(){return{wasmService:null}})}}};function BVe(e){return I9.apply(this,arguments)}function I9(){return I9=ka(dt().mark(function e(t){var r,n,i,a,o,l;return dt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=[{id:Ul.getIdentifier(),supportedTemplates:Ul.getSupportedTemplates(),component:Ul}],n=g9(g9({},"LIVENESS",function(){return Promise.resolve().then(()=>cLt)}),"DOC_READER",function(){return Promise.resolve().then(()=>U7r)}),i=dt().mark(function c(){var d,M,g;return dt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(d=o[a],M=function(){return n[d]()},!M){p.next=7;break}return p.next=5,M();case 5:g=p.sent,r.push({id:g.default.getIdentifier(),supportedTemplates:g.default.getSupportedTemplates(),component:g.default});case 7:case"end":return p.stop()}},c)}),a=0,o=t;case 4:if(!(a<o.length)){s.next=9;break}return s.delegateYield(i(),"t0",6);case 6:a++,s.next=4;break;case 9:return l=r.filter(function(c){return c!==null}),s.abrupt("return",l);case 11:case"end":return s.stop()}},e)})),I9.apply(this,arguments)}function Y5(e){"@babel/helpers - typeof";return Y5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y5(e)}function Iq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function p9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iq(Object(r),!0).forEach(function(n){ZVe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZVe(e,t,r){return(t=GVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GVe(e){var t=WVe(e,"string");return Y5(t)=="symbol"?t:t+""}function WVe(e,t){if(Y5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Y5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xt=sbe(function(){return p9(p9(p9({},mPe.apply(void 0,arguments)),UPe.apply(void 0,arguments)),FVe.apply(void 0,arguments))}),KVe=function(t){var r=t.children;return x.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:r})},JVe=function(){var t=Xt(function(I){return I.currentScreenConfig}),r=Xt(function(I){return I.pushStepWaitNextStepAndSet}),n=Xt(function(I){return I.proccessingTransformedTemplate}),i=Xt(function(I){return I.isProcessing}),a=Xt(function(I){return I.setIsProcessing}),o=Xt(function(I){return I.currentStepId}),l=Xt(function(I){return I.listener}),u=Xt(function(I){return I.externalModules}),s=Xt(function(I){return I.modulesConfig}),c=function(p,j){l({target:mM.WEB_COMPONENT,eventType:r5.MESSAGE,message:j,module:p})},d=function(p){a(p)},M=function(p){o&&(a(!1),r(o,p))},g=et.useCallback(function(){if(!t)return x.jsx(KVe,{children:"Waiting for play... or process completed"});var I=u.find(function(p){return p.supportedTemplates.includes(t.templateId)});if(I&&t)return x.jsx(I.component,{perform:M,moduleProps:t,modulesConfig:s,idvEventListener:c,isProcessing:d})},[t,u]);return x.jsx(x.Fragment,{children:x.jsx(tK,{direction:AS.Ltr,children:x.jsxs(x.Fragment,{children:[i&&x.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"white",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n?x.jsx(Ul,{perform:M,moduleProps:n,idvEventListener:c,isProcessing:d}):"Processing..."}),g()]})})})};function XVe(){return x.jsx(et.StrictMode,{children:x.jsx(uwe,{children:x.jsx(JVe,{})})})}const qVe="*,*:before,*:after{box-sizing:border-box}ul,p,h1,h2,h3,h4{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}._window_tmw1v_24{--base-main-color: #7E57C5;--base-font-family: sans-serif;width:100%;max-width:680px;height:100%;position:relative;background:#fff;overflow:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);margin:0 auto;font-family:var(--base-font-family)}._content_tmw1v_43{overflow:auto;height:100%;display:flex;flex-direction:column}._back_tmw1v_50{position:absolute;width:24px;height:24px;top:16px;left:16px;cursor:pointer}._to-mobile_tmw1v_59{position:absolute;left:calc(50% - 12px);height:24px;width:24px;top:16px;cursor:pointer}",eYe="._error-boundary_mput0_1{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;position:absolute;width:100%;height:100%;top:0;left:0}._title_mput0_14{font-size:20px;font-weight:700;margin-bottom:10px}._subtitle_mput0_20{margin-bottom:10px}._details_mput0_24{font-weight:lighter}";function FM(e){"@babel/helpers - typeof";return FM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},FM(e)}function tYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yq(n.key),n)}}function rYe(e,t,r){return t&&pq(e.prototype,t),r&&pq(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nYe(e,t,r){return t=F5(t),iYe(e,y9()?Reflect.construct(t,[],F5(e).constructor):t.apply(e,r))}function iYe(e,t){if(t&&(FM(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aYe(e)}function aYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q5(e,t)}function N9(e){var t=typeof Map=="function"?new Map:void 0;return N9=function(n){if(n===null||!uYe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return lYe(n,arguments,F5(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Q5(i,n)},N9(e)}function lYe(e,t,r){if(y9())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&Q5(i,r.prototype),i}function y9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(y9=function(){return!!e})()}function uYe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function Q5(e,t){return Q5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Q5(e,t)}function F5(e){return F5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F5(e)}function Nq(e,t,r){return(t=yq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yq(e){var t=sYe(e,"string");return FM(t)=="symbol"?t:t+""}function sYe(e,t){if(FM(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(FM(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cYe=[qVe,eYe],MYe=[].concat(cYe).reduce(function(e,t){return e+t.toString()},""),hq=function(e){function t(){var r;return tYe(this,t),r=nYe(this,t),Nq(r,"_root",wG(r.attachShadow({mode:"open"}))),Nq(r,"_mounted",!1),r}return oYe(t,e),rYe(t,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(x.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[x.jsx("style",{nonce:Xt.getState().getNonce(),children:MYe}),x.jsx(XVe,{})]}))}},{key:"disconnectedCallback",value:function(){var n=this;setTimeout(function(){n._mounted&&(n._mounted=!1,n._root.unmount())}),d9.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(N9(HTMLElement));function S4(e){"@babel/helpers - typeof";return S4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S4(e)}function Ji(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ji=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,O,_){return m[O]=_}}function c(v,C,m,O){var _=C&&C.prototype instanceof h?C:h,z=Object.create(_.prototype),H=new ae(O||[]);return i(z,"_invoke",{value:P(v,m,H)}),z}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var M="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function h(){}function y(){}function D(){}var T={};s(T,o,function(){return this});var L=Object.getPrototypeOf,w=L&&L(L(Me([])));w&&w!==r&&n.call(w,o)&&(T=w);var b=D.prototype=h.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function U(v,C){function m(_,z,H,F){var Z=d(v[_],v,z);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&S4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var O;i(this,"_invoke",{value:function(z,H){function F(){return new C(function(Z,ce){m(z,H,Z,ce)})}return O=O?O.then(F,F):F()}})}function P(v,C,m){var O=M;return function(_,z){if(O===I)throw Error("Generator is already running");if(O===p){if(_==="throw")throw z;return{value:e,done:!0}}for(m.method=_,m.arg=z;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(O===M)throw O=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);O=I;var Z=d(v,C,m);if(Z.type==="normal"){if(O=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(O=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,O=v.iterator[m];if(O===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var _=d(O,v.iterator,C.arg);if(_.type==="throw")return C.method="throw",C.arg=_.arg,C.delegate=null,j;var z=_.arg;return z?z.done?(C[v.resultName]=z.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):z:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ae(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function Me(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,O=function _(){for(;++m<v.length;)if(n.call(v,m))return _.value=v[m],_.done=!1,_;return _.value=e,_.done=!0,_};return O.next=O}}throw new TypeError(S4(v)+" is not iterable")}return y.prototype=D,i(b,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:y,configurable:!0}),y.displayName=s(D,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===y||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,D):(v.__proto__=D,s(v,u,"GeneratorFunction")),v.prototype=Object.create(b),v},t.awrap=function(v){return{__await:v}},R(U.prototype),s(U.prototype,l,function(){return this}),t.AsyncIterator=U,t.async=function(v,C,m,O,_){_===void 0&&(_=Promise);var z=new U(c(v,C,m,O),_);return t.isGeneratorFunction(C)?z:z.next().then(function(H){return H.done?H.value:z.next()})},R(b),s(b,u,"Generator"),s(b,o,function(){return this}),s(b,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var O in C)m.push(O);return m.reverse(),function _(){for(;m.length;){var z=m.pop();if(z in C)return _.value=z,_.done=!1,_}return _.done=!0,_}},t.values=Me,ae.prototype={constructor:ae,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function O(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var _=this.tryEntries.length-1;_>=0;--_){var z=this.tryEntries[_],H=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var F=n.call(z,"catchLoc"),Z=n.call(z,"finallyLoc");if(F&&Z){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if(F){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(C,m){for(var O=this.tryEntries.length-1;O>=0;--O){var _=this.tryEntries[O];if(_.tryLoc<=this.prev&&n.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var z=_;break}}z&&(C==="break"||C==="continue")&&z.tryLoc<=m&&m<=z.finallyLoc&&(z=null);var H=z?z.completion:{};return H.type=C,H.arg=m,z?(this.method="next",this.next=z.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),K(O),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var O=this.tryEntries[m];if(O.tryLoc===C){var _=O.completion;if(_.type==="throw"){var z=_.arg;K(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(C,m,O){return this.delegate={iterator:Me(C),resultName:m,nextLoc:O},this.method==="next"&&(this.arg=e),j}},t}function Eq(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function BM(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){Eq(a,n,i,o,l,"next",u)}function l(u){Eq(a,n,i,o,l,"throw",u)}o(void 0)})}}function fYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dYe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,IYe(n.key),n)}}function gYe(e,t,r){return t&&dYe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IYe(e){var t=pYe(e,"string");return S4(t)=="symbol"?t:t+""}function pYe(e,t){if(S4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(S4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var NYe=function(){function e(){fYe(this,e)}return gYe(e,[{key:"initialize",value:function(){var t=BM(Ji().mark(function n(i){var a;return Ji().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return a=Xt.getState().initialize(i),l.abrupt("return",a);case 2:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"configure",value:function(){var t=BM(Ji().mark(function n(i){var a,o;return Ji().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(typeof i=="string"){u.next=5;break}return u.next=3,Xt.getState().configure(i);case 3:return a=u.sent,u.abrupt("return",a);case 5:return u.next=7,Xt.getState().configureWithUrl(i);case 7:return o=u.sent,u.abrupt("return",o);case 9:case"end":return u.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"getWorkFlows",value:function(){var t=BM(Ji().mark(function n(i){var a;return Ji().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Xt.getState().getWorkflows(i);case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"prepareWorkflow",value:function(){var t=BM(Ji().mark(function n(i){var a,o;return Ji().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=i.workfowId,u.next=3,Xt.getState().preparareWorkflowAndPrepareUi(a);case 3:return o=u.sent,u.abrupt("return",o);case 5:case"end":return u.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startWorkflow",value:function(){var t=BM(Ji().mark(function n(){var i;return Ji().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Xt.getState().startNewSession();case 2:if(i=o.sent,!i.error){o.next=5;break}return o.abrupt("return",i);case 5:return o.abrupt("return",new Promise(function(l){var u=function(c){l(c)};Xt.getState().playWorkflow(u)}));case 6:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"deinitialize",value:function(){var t=BM(Ji().mark(function n(){var i;return Ji().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Xt.getState().deinitialize();case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"setNonce",value:function(r){Xt.getState().setNonce(r)}},{key:"eventListener",set:function(r){if(!r||typeof r!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Xt.getState().setListener(r)}},{key:"sessionRestoreMode",set:function(r){Xt.getState().setSessionRestoreMode(r)}},{key:"currentSessionId",get:function(){return Xt.getState().getCurrentSessionId()}}])}(),yYe=window.customElements.get("idv-flow");yYe||window.customElements.define("idv-flow",hq);var hYe=Object.defineProperty,EYe=Object.defineProperties,DYe=Object.getOwnPropertyDescriptors,Dq=Object.getOwnPropertySymbols,jYe=Object.prototype.hasOwnProperty,mYe=Object.prototype.propertyIsEnumerable,jq=(e,t,r)=>t in e?hYe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mq=(e,t)=>{for(var r in t||(t={}))jYe.call(t,r)&&jq(e,r,t[r]);if(Dq)for(var r of Dq(t))mYe.call(t,r)&&jq(e,r,t[r]);return e},TYe=(e,t)=>EYe(e,DYe(t)),Br=(e,t,r)=>new Promise((n,i)=>{var a=u=>{try{l(r.next(u))}catch(s){i(s)}},o=u=>{try{l(r.throw(u))}catch(s){i(s)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);l((r=r.apply(e,t)).next())}),ZM=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Tq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cq={exports:{}},g6={},Aq={exports:{}},Ue={};/**
|
|
52
52
|
* @license React
|
|
53
53
|
* react.production.min.js
|
|
54
54
|
*
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as e, b as s, I as i, h as n, f as t, c as v, a as E, d as I, P as d, S, e as c, g as l, W as f } from "./index-
|
|
1
|
+
import { C as a, D as e, b as s, I as i, h as n, f as t, c as v, a as E, d as I, P as d, S, e as c, g as l, W as f } from "./index-BzqucS5t.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED