@regulaforensics/idv-capture-web 2.3.150-nightly → 2.3.151-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.
|
@@ -28996,7 +28996,7 @@ var Zt = am.create("wasm_idv"), RY = /* @__PURE__ */ function() {
|
|
|
28996
28996
|
return Dr().wrap(function(d) {
|
|
28997
28997
|
for (; ; ) switch (d.prev = d.next) {
|
|
28998
28998
|
case 0:
|
|
28999
|
-
return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/
|
|
28999
|
+
return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/e8d3b7c-72f7cfc30//PlatformAdaptor.worker.js");
|
|
29000
29000
|
case 4:
|
|
29001
29001
|
return o = d.sent, d.next = 7, o.blob();
|
|
29002
29002
|
case 7:
|
|
@@ -29023,7 +29023,7 @@ var Zt = am.create("wasm_idv"), RY = /* @__PURE__ */ function() {
|
|
|
29023
29023
|
}), d.next = 23, this.sendMessage({
|
|
29024
29024
|
target: "worker-init",
|
|
29025
29025
|
URL: document.URL,
|
|
29026
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/
|
|
29026
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/e8d3b7c-72f7cfc30/",
|
|
29027
29027
|
preMain: !0
|
|
29028
29028
|
});
|
|
29029
29029
|
case 23:
|
|
@@ -30314,9 +30314,9 @@ function _5() {
|
|
|
30314
30314
|
supportedTemplates: Ui.getSupportedTemplates(),
|
|
30315
30315
|
component: Ui
|
|
30316
30316
|
}], n = O5(O5({}, Pb.LIVENESS, function() {
|
|
30317
|
-
return import("./index-
|
|
30317
|
+
return import("./index-Do3i8L38.js");
|
|
30318
30318
|
}), Pb.DOC_READER, function() {
|
|
30319
|
-
return import("./index-
|
|
30319
|
+
return import("./index-Cm98Fyz2.js");
|
|
30320
30320
|
}), o = /* @__PURE__ */ lt().mark(function p() {
|
|
30321
30321
|
var h, m, g;
|
|
30322
30322
|
return lt().wrap(function(S) {
|
|
@@ -30634,7 +30634,7 @@ var QY = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
|
|
|
30634
30634
|
}, {
|
|
30635
30635
|
key: "version",
|
|
30636
30636
|
get: function() {
|
|
30637
|
-
return "".concat("2.3.
|
|
30637
|
+
return "".concat("2.3.151-nightly".trim());
|
|
30638
30638
|
}
|
|
30639
30639
|
}, {
|
|
30640
30640
|
key: "render",
|
|
@@ -31104,7 +31104,7 @@ var oQ = /* @__PURE__ */ function() {
|
|
|
31104
31104
|
key: "version",
|
|
31105
31105
|
get: function() {
|
|
31106
31106
|
var t;
|
|
31107
|
-
return (t = "2.3.
|
|
31107
|
+
return (t = "2.3.151-nightly") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
|
|
31108
31108
|
}
|
|
31109
31109
|
}, {
|
|
31110
31110
|
key: "setNonce",
|
|
@@ -22,7 +22,7 @@ var N1 = (e) => {
|
|
|
22
22
|
throw l;
|
|
23
23
|
}, "return" in r && i("return"), o;
|
|
24
24
|
};
|
|
25
|
-
import { B as cc, r as Bs, j as gE } from "./index-
|
|
25
|
+
import { B as cc, r as Bs, j as gE } from "./index-9QN4tdvS.js";
|
|
26
26
|
var QT = Object.defineProperty, JT = Object.defineProperties, XT = Object.getOwnPropertyDescriptors, RE = Object.getOwnPropertySymbols, $T = Object.prototype.hasOwnProperty, eb = Object.prototype.propertyIsEnumerable, Fo = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), tb = (e) => {
|
|
27
27
|
throw TypeError(e);
|
|
28
28
|
}, IE = (e, r, t) => r in e ? QT(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, xe = (e, r) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Vu, r as la, j as lD } from "./index-
|
|
1
|
+
import { B as Vu, r as la, j as lD } from "./index-9QN4tdvS.js";
|
|
2
2
|
var m0 = Object.defineProperty, k0 = Object.defineProperties, h0 = Object.getOwnPropertyDescriptors, jD = Object.getOwnPropertySymbols, v0 = Object.prototype.hasOwnProperty, b0 = Object.prototype.propertyIsEnumerable, sD = (M, r, i) => r in M ? m0(M, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : M[r] = i, sl = (M, r) => {
|
|
3
3
|
for (var i in r || (r = {}))
|
|
4
4
|
v0.call(r, i) && sD(M, i, r[i]);
|
package/dist/main.iife.js
CHANGED
|
@@ -82,7 +82,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
82
82
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TOe(t,e){if(t){if(typeof t=="string")return _ee(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_ee(t,e):void 0}}function _ee(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function jOe(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],f=!0,g=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);f=!0);}catch(M){g=!0,o=M}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function SOe(t){if(Array.isArray(t))return t}var COe=function(e){var n=e.option,a=e.layout,o=e.dataSourceQuestion,s=e.register,l=e.watch,d=ht.useState(!1),f=EOe(d,2),g=f[0],M=f[1],I=Tee(),y=String(o.id),h=l(y),m=h===String(n.id),N=a.option,E=a.optionSelected,A={borderRadius:N.cornerRadius,background:Br(N.backgroundColor),borderColor:Br(N.borderColor),borderWidth:N.borderWidth},T={borderRadius:E.cornerRadius,background:Br(E.backgroundColor),borderColor:Br(E.borderColor),borderWidth:E.borderWidth},j=g&&I?{outline:"2px solid ".concat(e2)}:{};return ne.jsx("div",{style:{display:"flex",flexGrow:1},children:ne.jsxs("label",{style:Oee(Oee({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},m?T:A),j),children:[ne.jsx("input",xn(Tt({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},s(y,{required:!!o.required,validate:e0(o.validators,!!o.required)})),{value:n.id,type:"radio",onFocus:function(){return M(!0)},onBlur:function(){return M(!1)}})),ne.jsx(Ou,xn(Tt({},m?E.title:N.title),{text:n.text}))]})},n.id)},AOe=function(e){var n=e.layout,a=e.watch,o=e.register,s=e.dataSourceQuestion;return ne.jsx("div",{style:{boxSizing:"border-box"},children:ne.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[n.title&&ne.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ne.jsx(Ou,xn(Tt({},n.title),{text:s.text}))}),ne.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:s.options.map(function(l){return ne.jsx(COe,{register:o,watch:a,layout:n,option:l,dataSourceQuestion:s},l.id)})})]})})};function C2(t){"@babel/helpers - typeof";return C2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C2(t)}function xee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function cA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xee(Object(n),!0).forEach(function(a){OOe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xee(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function OOe(t,e,n){return(e=_Oe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _Oe(t){var e=xOe(t,"string");return C2(e)=="symbol"?e:e+""}function xOe(t,e){if(C2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(C2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wOe=function(e){var n=e.children,a=e.backgroundColor,o=e.cornerRadius,s=o===void 0?0:o,l=e.isError,d=e.isRequired,f=e.validationBorderColor,g=e.validationBorderWidth,M=cA({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Br(a)||"transparent",borderRadius:s,padding:"16px",boxSizing:"border-box",height:"auto"},l&&cA(cA({},Br(f)&&{borderColor:f,borderStyle:"solid"}),g&&{borderWidth:g}));return ne.jsxs("div",{style:M,children:[d&&ne.jsx("span",{style:{color:Br(f),position:"absolute",left:"6px",top:"18px"},children:"*"}),n]})};function bOe(t,e){return zOe(t)||ROe(t,e)||kOe(t,e)||LOe()}function LOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
83
83
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kOe(t,e){if(t){if(typeof t=="string")return wee(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wee(t,e):void 0}}function wee(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function ROe(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],f=!0,g=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);f=!0);}catch(M){g=!0,o=M}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function zOe(t){if(Array.isArray(t))return t}var POe=function(e){var n=e.validationErrorsTypes,a=e.title;return n?ne.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(n).map(function(o){var s=bOe(o,2),l=s[0],d=s[1];return ne.jsx(Ou,xn(Tt({},a),{text:d}),l)})}):null},UOe=function(e){var n,a,o,s,l,d,f,g,M,I,y,h,m,N,E=e.layout,A=e.dataSourceQuestion,T=e.register,j=String(A.id),C=function(L){return L?L===rv.EMAIL?"email":L===rv.FREE_TEXT?"text":L===rv.NUMBER?"number":L===rv.SECURE?"password":"text":"text"};return ne.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ne.jsx(Ou,xn(Tt({},E.title),{text:A.text,htmlFor:j})),ne.jsx("input",xn(Tt({},T(j,{required:!!A.required,validate:e0(A.validators,!!A.required)})),{id:j,type:C((n=E.textField)===null||n===void 0?void 0:n.inputType),style:{fontFamily:(a=E==null||(o=E.textField)===null||o===void 0?void 0:o.fontName)!==null&&a!==void 0?a:"sans-serif",fontSize:(s=E==null||(l=E.textField)===null||l===void 0?void 0:l.fontSize)!==null&&s!==void 0?s:15,color:(d=Br(E==null||(f=E.textField)===null||f===void 0?void 0:f.fontColor))!==null&&d!==void 0?d:"#000000",height:"42px",borderWidth:(g=E==null||(M=E.textField)===null||M===void 0?void 0:M.borderWidth)!==null&&g!==void 0?g:1,borderColor:(I=Br(E==null||(y=E.textField)===null||y===void 0?void 0:y.borderColor))!==null&&I!==void 0?I:"#d9d9d9",borderStyle:"solid",borderRadius:(h=E==null||(m=E.textField)===null||m===void 0?void 0:m.cornerRadius)!==null&&h!==void 0?h:8,padding:"11px",boxSizing:"border-box",outlineColor:e2},placeholder:(N=A.placeholder)!==null&&N!==void 0?N:"","data-id":j}))]})},YOe=function(e){var n,a,o,s,l,d,f,g,M,I,y,h=e.layout,m=e.dataSourceQuestion,N=e.register,E=String(m.id);return ne.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ne.jsx(Ou,xn(Tt({},h.title),{text:m.text,htmlFor:E})),ne.jsx("textarea",xn(Tt({},N(E,{required:!!m.required,validate:e0(m.validators,!!m.required)})),{id:E,placeholder:(n=m.placeholder)!==null&&n!==void 0?n:"",onChange:function(T){T.target.style.height="auto",T.target.style.height="".concat(T.target.scrollHeight-15,"px")},"data-id":E,style:{fontFamily:"sans-serif",fontSize:(a=h==null||(o=h.textField)===null||o===void 0?void 0:o.fontSize)!==null&&a!==void 0?a:15,color:(s=Br(h==null||(l=h.textField)===null||l===void 0?void 0:l.fontColor))!==null&&s!==void 0?s:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(d=h==null||(f=h.textField)===null||f===void 0?void 0:f.borderWidth)!==null&&d!==void 0?d:1,borderColor:(g=Br(h==null||(M=h.textField)===null||M===void 0?void 0:M.borderColor))!==null&&g!==void 0?g:"#d9d9d9",borderStyle:"solid",borderRadius:(I=h==null||(y=h.textField)===null||y===void 0?void 0:y.cornerRadius)!==null&&I!==void 0?I:8,padding:"11px",boxSizing:"border-box",outlineColor:e2}}))]})},bee={},fA,Lee;function kee(){if(Lee)return fA;Lee=1;var t=ei(),e=Wl(),n=Oo(),a=Ca(),o=Zp(),s=$p(),l=Function,d=t([].concat),f=t([].join),g={},M=function(y,h,m){if(!a(g,h)){for(var N=[],E=0;E<h;E++)N[E]="a["+E+"]";g[h]=l("C,a","return new C("+f(N,",")+")")}return g[h](y,m)};return fA=s?l.bind:function(I){var y=e(this),h=y.prototype,m=o(arguments,1),N=function(){var A=d(m,o(arguments));return this instanceof N?M(y,A.length,A):y.apply(I,A)};return n(h)&&(N.prototype=h),N},fA}var Ree;function $Oe(){if(Ree)return bee;Ree=1;var t=kr(),e=kee();return t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),bee}$Oe();var zee={},Pee;function QOe(){if(Pee)return zee;Pee=1;var t=kr(),e=ii(),n=O1();return t({target:"Object",stat:!0,sham:!e},{create:n}),zee}QOe();var Uee={},Yee;function FOe(){if(Yee)return Uee;Yee=1;var t=kr(),e=pn(),n=El(),a=Bp(),o=bG(),s=e(function(){a(1)});return t({target:"Object",stat:!0,forced:s,sham:!o},{getPrototypeOf:function(d){return a(n(d))}}),Uee}FOe();var $ee={},Qee;function HOe(){if(Qee)return $ee;Qee=1;var t=ii(),e=id(),n=Oo(),a=FG(),o=El(),s=ZM(),l=Object.getPrototypeOf,d=Object.setPrototypeOf,f=Object.prototype,g="__proto__";if(t&&l&&d&&!(g in f))try{e(f,g,{configurable:!0,get:function(){return l(o(this))},set:function(I){var y=s(this);a(I)&&n(y)&&d(y,I)}})}catch(M){}return $ee}HOe();var Fee={},Hee;function VOe(){if(Hee)return Fee;Hee=1;var t=kr(),e=Zh();return t({target:"Object",stat:!0},{setPrototypeOf:e}),Fee}VOe();var Vee={},dA,Bee;function BOe(){if(Bee)return dA;Bee=1;var t=qh(),e=Fp(),n=TypeError;return dA=function(o){if(t(o))return o;throw new n(e(o)+" is not a constructor")},dA}var Gee;function GOe(){if(Gee)return Vee;Gee=1;var t=kr(),e=Jf(),n=Gp(),a=kee(),o=BOe(),s=Aa(),l=Oo(),d=O1(),f=pn(),g=e("Reflect","construct"),M=Object.prototype,I=[].push,y=f(function(){function N(){}return!(g(function(){},[],N)instanceof N)}),h=!f(function(){g(function(){})}),m=y||h;return t({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(E,A){o(E),s(A);var T=arguments.length<3?E:o(arguments[2]);if(h&&!y)return g(E,A,T);if(E===T){switch(A.length){case 0:return new E;case 1:return new E(A[0]);case 2:return new E(A[0],A[1]);case 3:return new E(A[0],A[1],A[2]);case 4:return new E(A[0],A[1],A[2],A[3])}var j=[null];return n(I,j,A),new(n(a,E,j))}var C=T.prototype,_=d(l(C)?C:M),L=n(E,_,A);return l(L)?L:_}}),Vee}GOe();var Zee={},Wee;function ZOe(){if(Wee)return Zee;Wee=1;var t=kr(),e=pn(),n=B4(),a=Oo(),o=El(),s=nd(),l=CW(),d=qp(),f=bZ(),g=Xh(),M=Qi(),I=Fh(),y=M("isConcatSpreadable"),h=I>=51||!e(function(){var E=[];return E[y]=!1,E.concat()[0]!==E}),m=function(A){if(!a(A))return!1;var T=A[y];return T!==void 0?!!T:n(A)},N=!h||!g("concat");return t({target:"Array",proto:!0,arity:1,forced:N},{concat:function(A){var T=o(this),j=f(T,0),C=0,_,L,U,H,Q;for(_=-1,U=arguments.length;_<U;_++)if(Q=_===-1?T:arguments[_],m(Q))for(H=s(Q),l(C+H),L=0;L<H;L++,C++)L in Q&&d(j,C,Q[L]);else l(C+1),d(j,C++,Q);return j.length=C,j}}),Zee}ZOe();function A2(t){"@babel/helpers - typeof";return A2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A2(t)}function WOe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kee(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,qee(a.key),a)}}function KOe(t,e,n){return e&&Kee(t.prototype,e),n&&Kee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function L1(t,e,n){return(e=qee(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qee(t){var e=qOe(t,"string");return A2(e)=="symbol"?e:e+""}function qOe(t,e){if(A2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(A2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Jee=function(){function t(e){var n=e.errorCode,a=e.errorCodeKey,o=e.message,s=e.underlyingError,l=e.underlyingBaseError,d=e.domain,f=e.module,g=e.errorEnumName,M=e.shortDomainCode;WOe(this,t),L1(this,"errorCode",void 0),L1(this,"errorCodeKey",void 0),L1(this,"message",void 0),L1(this,"underlyingError",void 0),L1(this,"underlyingBaseError",void 0),L1(this,"domain",void 0),L1(this,"module",void 0),L1(this,"errorEnumName",void 0),L1(this,"shortDomainCode",void 0),this.errorCode=n,this.errorCodeKey=a,this.message=o,this.underlyingError=s,this.underlyingBaseError=l,this.module=f,this.domain=d,this.errorEnumName=g,this.shortDomainCode=M}return KOe(t,[{key:"lastUnderlyingError",get:function(){for(var n,a=this.underlyingBaseError;((o=a)===null||o===void 0?void 0:o.underlyingBaseError)instanceof t;){var o;a=a.underlyingBaseError}return(n=a)===null||n===void 0?void 0:n.underlyingError}},{key:"toObject",value:function(){var n={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof t&&(n.underlyingBaseError=this.underlyingBaseError.toObject()),n}},{key:"shortChain",get:function(){var n="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.shortChain)),n}},{key:"fullChain",get:function(){var n="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.fullChain)),n}}],[{key:"getErrorKey",value:function(n,a){var o=Object.keys(a).find(function(s){return a[s]===n});if(!o)throw new Error("Invalid errorCode: ".concat(n," in enum"));return o}}])}();function t0(t){"@babel/helpers - typeof";return t0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t0(t)}function JOe(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function XOe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e6e(t,e,n){return e=bv(e),t6e(t,Xee()?Reflect.construct(e,n||[],bv(t).constructor):e.apply(t,n))}function t6e(t,e){if(e&&(t0(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r6e(t)}function r6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xee(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xee=function(){return!!t})()}function bv(t){return bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bv(t)}function n6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gA(t,e)}function gA(t,e){return gA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gA(t,e)}function MA(t,e,n){return(e=i6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i6e(t){var e=a6e(t,"string");return t0(e)=="symbol"?e:e+""}function a6e(t,e){if(t0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(t0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Lv=function(t){function e(n){var a=n.errorCode,o=n.message,s=n.underlyingError,l=n.underlyingBaseError;XOe(this,e);var d=Jee.getErrorKey(a,Pq);return e6e(this,e,[{errorCode:a,errorCodeKey:d,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:o,underlyingError:s,underlyingBaseError:l,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE}])}return n6e(e,t),JOe(e)}(Jee);MA(Lv,"MODULE",EC),MA(Lv,"ERROR_ENUM_NAME","GuiModuleError"),MA(Lv,"SHORT_CODE","GM");var o6e=function(e){var n=e.header,a=e.title,o=e.buttons,s=e.footer,l=e.questions,d=e.dataSource,f=e.properties,g=e.backgroundColor,M=nS(),I=M.perform,y=f?ZEe(d.questions,f):{},h=qTe({criteriaMode:"all",defaultValues:y}),m=h.register,N=h.handleSubmit,E=h.formState.errors,A=h.reset,T=h.watch,j=h.control,C=function(L){I(BEe(L)),A()};return ne.jsx(u2,{header:n,footer:s,backgroundColor:g,children:ne.jsxs("form",{onSubmit:N(C),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ne.jsxs("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"flex-start",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"10px",height:"100%",width:"100%",overflow:"auto",position:"relative",backgroundColor:Br(l.backgroundColor)||"transparent"},children:[a&&ne.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ne.jsx(Ou,Tt({},a))}),ne.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:d.questions.map(function(_){var L,U=d.static,H=function(V,q){return q.find(function(te){var z;if((z=te.questionIds)!==null&&z!==void 0&&z.length)return te.questionIds.find(function(G){return V===G})})},Q=function(V,q){return q.find(function(te){return!te.questionIds&&te.answerType===V})},x=U?H(String(_.id),l.itemTypes)||Q(_.answerType,l.itemTypes):l.itemTypes.find(function(Y){return Y.answerType===_.answerType});if(!x){var O=new Lv({errorCode:Pq.DECODING_FAILED,message:"The question template has not been found"});I(O);return}var w=x==null?void 0:x.displayType,R=_.id in E&&((L=E[_.id])===null||L===void 0?void 0:L.types);return ne.jsxs(ht.Fragment,{children:[ne.jsxs(wOe,{backgroundColor:x==null?void 0:x.backgroundColor,cornerRadius:x==null?void 0:x.cornerRadius,isError:!!R,isRequired:_.required,validationBorderColor:x==null?void 0:x.validationBorderColor,validationBorderWidth:x==null?void 0:x.validationBorderWidth,children:[w===G4.TEXT_EXPANDABLE&&ne.jsx(YOe,{layout:x,dataSourceQuestion:_,register:m}),w===G4.TEXT_SINGLE_LINE&&ne.jsx(UOe,{layout:x,dataSourceQuestion:_,register:m}),w===G4.SELECTOR_OPTIONS&&ne.jsx(hOe,{layout:x,dataSourceQuestion:_,watch:T,register:m}),w===G4.SELECTOR_BUTTONS&&ne.jsx(AOe,{layout:x,dataSourceQuestion:_,watch:T,register:m}),w===G4.SELECTOR_DROPDOWN&&ne.jsx(VAe,{control:j,layout:x,dataSourceQuestion:_}),w===G4.MULTI_SELECTOR_DROPDOWN&&ne.jsx(nOe,{control:j,layout:x,dataSourceQuestion:_})]}),R&&ne.jsx(POe,{validationErrorsTypes:R,title:x.validationMessage})]},_.id)})})]}),!!(o!=null&&o.length)&&ne.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:o.map(function(_,L){return ne.jsx(eJ,Tt({dataTestId:"question-button"},_),L)})})]})})},ete=function(e){var n=e.templateId,a=e.templateLayout,o=e.dataSource,s=e.properties;return!n||!a?ne.jsx(sJ,{}):n===od.STATUS?ne.jsx(uTe,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===od.INFO?ne.jsx(gTe,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,description:a==null?void 0:a.description,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===od.PROGRESS?ne.jsx(sJ,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,progressView:a==null?void 0:a.progressView,backgroundColor:a==null?void 0:a.backgroundColor}):n===od.INFO_DETAILS?ne.jsx(OTe,{header:a==null?void 0:a.header,title:a==null?void 0:a.title,details:a==null?void 0:a.details,buttons:a==null?void 0:a.buttons,footer:a==null?void 0:a.footer,backgroundColor:a==null?void 0:a.backgroundColor}):o&&o!==null&&o!==void 0&&o.questions.length&&n===od.QUESTIONS?ne.jsx(o6e,{dataSource:o,properties:s,questions:a.questions,header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===od.QUESTIONS&&!o?ne.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: No data for questions"}):ne.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},pA=!1,a1=function(e){var n=e.moduleProps,a=e.perform,o=n,s=o.templateId,l=o.templateLayout,d=o.dataSource,f=o.properties,g=function(I){a&&a(I)};return s===od.QUESTIONS?ne.jsx(cZ,{perform:g,children:ne.jsx(ete,{properties:f,dataSource:d,templateId:s,templateLayout:l})}):ne.jsx(cZ,{perform:g,children:ne.jsx(ete,{templateId:s,templateLayout:l})})};a1.getIdentifier=function(){return EC},a1.getSupportedTemplates=function(){return Object.values(od)},a1.deinitialize=function(){pA=!1},a1.initialize=function(){pA=!0},a1.isReady=function(){return pA},a1.displayName=EC;var tte={},rte;function u6e(){if(rte)return tte;rte=1;var t=wt(),e=Mr(),n=Date,a=e(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),tte}u6e();var nte={},ite={},IA,ate;function ote(){if(ate)return IA;ate=1;var t=dr(),e=Zn(),n=tn(),a=yu(),o=e("iterator");return IA=!t(function(){var s=new URL("b?a=1&b=2&c=3","https://a"),l=s.searchParams,d=new URLSearchParams("a=1&a=2&b=3"),f="";return s.pathname="c%20d",l.forEach(function(g,M){l.delete("b"),f+=M+g}),d.delete("a",2),d.delete("b",void 0),a&&(!s.toJSON||!d.has("a",1)||d.has("a",2)||!d.has("a",void 0)||d.has("b"))||!l.size&&(a||!n)||!l.sort||s.href!=="https://a/c%20d?a=1&c=3"||l.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!l[o]||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"||f!=="a1c3"||new URL("https://x",void 0).host!=="x"}),IA}var yA,ute;function s6e(){if(ute)return yA;ute=1;var t=Mr(),e=2147483647,n=36,a=1,o=26,s=38,l=700,d=72,f=128,g="-",M=/[^\0-\u007E]/,I=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",h=n-a,m=RangeError,N=t(I.exec),E=Math.floor,A=String.fromCharCode,T=t("".charCodeAt),j=t([].join),C=t([].push),_=t("".replace),L=t("".split),U=t("".toLowerCase),H=function(w){for(var R=[],Y=0,V=w.length;Y<V;){var q=T(w,Y++);if(q>=55296&&q<=56319&&Y<V){var te=T(w,Y++);(te&64512)===56320?C(R,((q&1023)<<10)+(te&1023)+65536):(C(R,q),Y--)}else C(R,q)}return R},Q=function(w){return w+22+75*(w<26)},x=function(w,R,Y){var V=0;for(w=Y?E(w/l):w>>1,w+=E(w/R);w>h*o>>1;)w=E(w/h),V+=n;return E(V+(h+1)*w/(w+s))},O=function(w){var R=[];w=H(w);var Y=w.length,V=f,q=0,te=d,z,G;for(z=0;z<w.length;z++)G=w[z],G<128&&C(R,A(G));var K=R.length,k=K;for(K&&C(R,g);k<Y;){var W=e;for(z=0;z<w.length;z++)G=w[z],G>=V&&G<W&&(W=G);var pe=k+1;if(W-V>E((e-q)/pe))throw new m(y);for(q+=(W-V)*pe,V=W,z=0;z<w.length;z++){if(G=w[z],G<V&&++q>e)throw new m(y);if(G===V){for(var Me=q,le=n;;){var Oe=le<=te?a:le>=te+o?o:le-te;if(Me<Oe)break;var Pe=Me-Oe,me=n-Oe;C(R,A(Q(Oe+Pe%me))),Me=E(Pe/me),le+=n}C(R,A(Q(Me))),te=x(q,pe,k===K),q=0,k++}}q++,V++}return j(R,"")};return yA=function(w){var R=[],Y=L(_(U(w),I,"."),"."),V,q;for(V=0;V<Y.length;V++)q=Y[V],C(R,N(M,q)?"xn--"+O(q):q);return j(R,".")},yA}var ste={},lte;function l6e(){if(lte)return ste;lte=1;var t=wt(),e=Mr(),n=AN(),a=RangeError,o=String.fromCharCode,s=String.fromCodePoint,l=e([].join),d=!!s&&s.length!==1;return t({target:"String",stat:!0,arity:1,forced:d},{fromCodePoint:function(g){for(var M=[],I=arguments.length,y=0,h;I>y;){if(h=+arguments[y++],n(h,1114111)!==h)throw new a(h+" is not a valid code point");M[y]=h<65536?o(h):o(((h-=65536)>>10)+55296,h%1024+56320)}return l(M,"")}}),ste}var hA,cte;function c6e(){if(cte)return hA;cte=1;var t=q1(),e=Math.floor,n=function(a,o){var s=a.length;if(s<8)for(var l=1,d,f;l<s;){for(f=l,d=a[l];f&&o(a[f-1],d)>0;)a[f]=a[--f];f!==l++&&(a[f]=d)}else for(var g=e(s/2),M=n(t(a,0,g),o),I=n(t(a,g),o),y=M.length,h=I.length,m=0,N=0;m<y||N<h;)a[m+N]=m<y&&N<h?o(M[m],I[N])<=0?M[m++]:I[N++]:m<y?M[m++]:I[N++];return a};return hA=n,hA}var vA,fte;function dte(){if(fte)return vA;fte=1,Q5(),l6e();var t=wt(),e=Lr(),n=BQ(),a=ju(),o=yn(),s=Mr(),l=tn(),d=ote(),f=Ra(),g=Uu(),M=Ip(),I=vl(),y=sU(),h=Au(),m=PM(),N=qn(),E=mi(),A=J1(),T=sp(),j=_n(),C=Jn(),_=Ni(),L=Vl(),U=LM(),H=rE(),Q=Sh(),x=Mp(),O=U4(),w=Zn(),R=c6e(),Y=w("iterator"),V="URLSearchParams",q=V+"Iterator",te=h.set,z=h.getterFor(V),G=h.getterFor(q),K=n("fetch"),k=n("Request"),W=n("Headers"),pe=k&&k.prototype,Me=W&&W.prototype,le=e.TypeError,Oe=e.encodeURIComponent,Pe=String.fromCharCode,me=a("String","fromCodePoint"),Le=parseInt,Ze=s("".charAt),Xe=s([].join),tt=s([].push),ct=s("".replace),Dt=s([].shift),Et=s([].splice),vt=s("".split),Je=s("".slice),dt=s(/./.exec),pt=/\+/g,Ke="�",Ce=/^[0-9a-f]+$/i,Ue=function(he,Re){var $e=Je(he,Re,Re+2);return dt(Ce,$e)?Le($e,16):NaN},fe=function(he){for(var Re=0,$e=128;$e>0&&(he&$e)!==0;$e>>=1)Re++;return Re},xe=function(he){var Re=null;switch(he.length){case 1:Re=he[0];break;case 2:Re=(he[0]&31)<<6|he[1]&63;break;case 3:Re=(he[0]&15)<<12|(he[1]&63)<<6|he[2]&63;break;case 4:Re=(he[0]&7)<<18|(he[1]&63)<<12|(he[2]&63)<<6|he[3]&63;break}return Re>1114111?null:Re},ve=function(he){he=ct(he,pt," ");for(var Re=he.length,$e="",be=0;be<Re;){var ot=Ze(he,be);if(ot==="%"){if(Ze(he,be+1)==="%"||be+3>Re){$e+="%",be++;continue}var It=Ue(he,be+1);if(It!==It){$e+=ot,be++;continue}be+=2;var At=fe(It);if(At===0)ot=Pe(It);else{if(At===1||At>4){$e+=Ke,be++;continue}for(var St=[It],Ft=1;Ft<At&&(be++,!(be+3>Re||Ze(he,be)!=="%"));){var ir=Ue(he,be+1);if(ir!==ir){be+=3;break}if(ir>191||ir<128)break;tt(St,ir),be+=2,Ft++}if(St.length!==At){$e+=Ke;continue}var Ir=xe(St);Ir===null?$e+=Ke:ot=me(Ir)}}$e+=ot,be++}return $e},ge=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},we=function(he){return de[he]},et=function(he){return ct(Oe(he),ge,we)},rt=y(function(Re,$e){te(this,{type:q,target:z(Re).entries,index:0,kind:$e})},V,function(){var Re=G(this),$e=Re.target,be=Re.index++;if(!$e||be>=$e.length)return Re.target=null,x(void 0,!0);var ot=$e[be];switch(Re.kind){case"keys":return x(ot.key,!1);case"values":return x(ot.value,!1)}return x([ot.key,ot.value],!1)},!0),Ye=function(he){this.entries=[],this.url=null,he!==void 0&&(C(he)?this.parseObject(he):this.parseQuery(typeof he=="string"?Ze(he,0)==="?"?Je(he,1):he:_(he)))};Ye.prototype={type:V,bindURL:function(he){this.url=he,this.update()},parseObject:function(he){var Re=this.entries,$e=Q(he),be,ot,It,At,St,Ft,ir;if($e)for(be=H(he,$e),ot=be.next;!(It=o(ot,be)).done;){if(At=H(j(It.value)),St=At.next,(Ft=o(St,At)).done||(ir=o(St,At)).done||!o(St,At).done)throw new le("Expected sequence with length 2");tt(Re,{key:_(Ft.value),value:_(ir.value)})}else for(var Ir in he)E(he,Ir)&&tt(Re,{key:Ir,value:_(he[Ir])})},parseQuery:function(he){if(he)for(var Re=this.entries,$e=vt(he,"&"),be=0,ot,It;be<$e.length;)ot=$e[be++],ot.length&&(It=vt(ot,"="),tt(Re,{key:ve(Dt(It)),value:ve(Xe(It,"="))}))},serialize:function(){for(var he=this.entries,Re=[],$e=0,be;$e<he.length;)be=he[$e++],tt(Re,et(be.key)+"="+et(be.value));return Xe(Re,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Te=function(){m(this,_e);var Re=arguments.length>0?arguments[0]:void 0,$e=te(this,new Ye(Re));l||(this.size=$e.entries.length)},_e=Te.prototype;if(M(_e,{append:function(Re,$e){var be=z(this);O(arguments.length,2),tt(be.entries,{key:_(Re),value:_($e)}),l||this.length++,be.updateURL()},delete:function(he){for(var Re=z(this),$e=O(arguments.length,1),be=Re.entries,ot=_(he),It=$e<2?void 0:arguments[1],At=It===void 0?It:_(It),St=0;St<be.length;){var Ft=be[St];if(Ft.key===ot&&(At===void 0||Ft.value===At)){if(Et(be,St,1),At!==void 0)break}else St++}l||(this.size=be.length),Re.updateURL()},get:function(Re){var $e=z(this).entries;O(arguments.length,1);for(var be=_(Re),ot=0;ot<$e.length;ot++)if($e[ot].key===be)return $e[ot].value;return null},getAll:function(Re){var $e=z(this).entries;O(arguments.length,1);for(var be=_(Re),ot=[],It=0;It<$e.length;It++)$e[It].key===be&&tt(ot,$e[It].value);return ot},has:function(Re){for(var $e=z(this).entries,be=O(arguments.length,1),ot=_(Re),It=be<2?void 0:arguments[1],At=It===void 0?It:_(It),St=0;St<$e.length;){var Ft=$e[St++];if(Ft.key===ot&&(At===void 0||Ft.value===At))return!0}return!1},set:function(Re,$e){var be=z(this);O(arguments.length,1);for(var ot=be.entries,It=!1,At=_(Re),St=_($e),Ft=0,ir;Ft<ot.length;Ft++)ir=ot[Ft],ir.key===At&&(It?Et(ot,Ft--,1):(It=!0,ir.value=St));It||tt(ot,{key:At,value:St}),l||(this.size=ot.length),be.updateURL()},sort:function(){var Re=z(this);R(Re.entries,function($e,be){return $e.key>be.key?1:-1}),Re.updateURL()},forEach:function(Re){for(var $e=z(this).entries,be=A(Re,arguments.length>1?arguments[1]:void 0),ot=0,It;ot<$e.length;)It=$e[ot++],be(It.value,It.key,this)},keys:function(){return new rt(this,"keys")},values:function(){return new rt(this,"values")},entries:function(){return new rt(this,"entries")}},{enumerable:!0}),f(_e,Y,_e.entries,{name:"entries"}),f(_e,"toString",function(){return z(this).serialize()},{enumerable:!0}),l&&g(_e,"size",{get:function(){return z(this).entries.length},configurable:!0,enumerable:!0}),I(Te,V),t({global:!0,constructor:!0,forced:!d},{URLSearchParams:Te}),!d&&N(W)){var Be=s(Me.has),gt=s(Me.set),lt=function(he){if(C(he)){var Re=he.body,$e;if(T(Re)===V)return $e=he.headers?new W(he.headers):new W,Be($e,"content-type")||gt($e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),L(he,{body:U(0,_(Re)),headers:U(0,$e)})}return he};if(N(K)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Re){return K(Re,arguments.length>1?lt(arguments[1]):{})}}),N(k)){var Ut=function(Re){return m(this,pe),new k(Re,arguments.length>1?lt(arguments[1]):{})};pe.constructor=Ut,Ut.prototype=pe,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ut})}}return vA={URLSearchParams:Te,getState:z},vA}var gte;function f6e(){if(gte)return ite;gte=1,DY();var t=wt(),e=tn(),n=ote(),a=Lr(),o=J1(),s=Mr(),l=Ra(),d=Uu(),f=PM(),g=mi(),M=VH(),I=t$(),y=q1(),h=DE().codeAt,m=s6e(),N=Ni(),E=vl(),A=U4(),T=dte(),j=Au(),C=j.set,_=j.getterFor("URL"),L=T.URLSearchParams,U=T.getState,H=a.URL,Q=a.TypeError,x=a.parseInt,O=Math.floor,w=Math.pow,R=s("".charAt),Y=s(/./.exec),V=s([].join),q=s(1 .toString),te=s([].pop),z=s([].push),G=s("".replace),K=s([].shift),k=s("".split),W=s("".slice),pe=s("".toLowerCase),Me=s([].unshift),le="Invalid authority",Oe="Invalid scheme",Pe="Invalid host",me="Invalid port",Le=/[a-z]/i,Ze=/[\d+-.a-z]/i,Xe=/\d/,tt=/^0x/i,ct=/^[0-7]+$/,Dt=/^\d+$/,Et=/^[\da-f]+$/i,vt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Je=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,pt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ke=/[\t\n\r]/g,Ce,Ue=function(ie){var Ie=k(ie,"."),se,J,je,ut,Fe,bt,yt;if(Ie.length&&Ie[Ie.length-1]===""&&Ie.length--,se=Ie.length,se>4)return ie;for(J=[],je=0;je<se;je++){if(ut=Ie[je],ut==="")return ie;if(Fe=10,ut.length>1&&R(ut,0)==="0"&&(Fe=Y(tt,ut)?16:8,ut=W(ut,Fe===8?1:2)),ut==="")bt=0;else{if(!Y(Fe===10?Dt:Fe===8?ct:Et,ut))return ie;bt=x(ut,Fe)}z(J,bt)}for(je=0;je<se;je++)if(bt=J[je],je===se-1){if(bt>=w(256,5-se))return null}else if(bt>255)return null;for(yt=te(J),je=0;je<J.length;je++)yt+=J[je]*w(256,3-je);return yt},fe=function(ie){var Ie=[0,0,0,0,0,0,0,0],se=0,J=null,je=0,ut,Fe,bt,yt,er,sr,De,Lt=function(){return R(ie,je)};if(Lt()===":"){if(R(ie,1)!==":")return;je+=2,se++,J=se}for(;Lt();){if(se===8)return;if(Lt()===":"){if(J!==null)return;je++,se++,J=se;continue}for(ut=Fe=0;Fe<4&&Y(Et,Lt());)ut=ut*16+x(Lt(),16),je++,Fe++;if(Lt()==="."){if(Fe===0||(je-=Fe,se>6))return;for(bt=0;Lt();){if(yt=null,bt>0)if(Lt()==="."&&bt<4)je++;else return;if(!Y(Xe,Lt()))return;for(;Y(Xe,Lt());){if(er=x(Lt(),10),yt===null)yt=er;else{if(yt===0)return;yt=yt*10+er}if(yt>255)return;je++}Ie[se]=Ie[se]*256+yt,bt++,(bt===2||bt===4)&&se++}if(bt!==4)return;break}else if(Lt()===":"){if(je++,!Lt())return}else if(Lt())return;Ie[se++]=ut}if(J!==null)for(sr=se-J,se=7;se!==0&&sr>0;)De=Ie[se],Ie[se--]=Ie[J+sr-1],Ie[J+--sr]=De;else if(se!==8)return;return Ie},xe=function(ie){for(var Ie=null,se=1,J=null,je=0,ut=0;ut<8;ut++)ie[ut]!==0?(je>se&&(Ie=J,se=je),J=null,je=0):(J===null&&(J=ut),++je);return je>se?J:Ie},ve=function(ie){var Ie,se,J,je;if(typeof ie=="number"){for(Ie=[],se=0;se<4;se++)Me(Ie,ie%256),ie=O(ie/256);return V(Ie,".")}if(typeof ie=="object"){for(Ie="",J=xe(ie),se=0;se<8;se++)je&&ie[se]===0||(je&&(je=!1),J===se?(Ie+=se?":":"::",je=!0):(Ie+=q(ie[se],16),se<7&&(Ie+=":")));return"["+Ie+"]"}return ie},ge={},de=M({},ge,{" ":1,'"':1,"<":1,">":1,"`":1}),we=M({},de,{"#":1,"?":1,"{":1,"}":1}),et=M({},we,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),rt=function(ie,Ie){var se=h(ie,0);return se>32&&se<127&&!g(Ie,ie)?ie:encodeURIComponent(ie)},Ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(ie,Ie){var se;return ie.length===2&&Y(Le,R(ie,0))&&((se=R(ie,1))===":"||!Ie&&se==="|")},_e=function(ie){var Ie;return ie.length>1&&Te(W(ie,0,2))&&(ie.length===2||(Ie=R(ie,2))==="/"||Ie==="\\"||Ie==="?"||Ie==="#")},Be=function(ie){return ie==="."||pe(ie)==="%2e"},gt=function(ie){return ie=pe(ie),ie===".."||ie==="%2e."||ie===".%2e"||ie==="%2e%2e"},lt={},Ut={},he={},Re={},$e={},be={},ot={},It={},At={},St={},Ft={},ir={},Ir={},ui={},Ar={},Pn={},Ht={},Or={},Nn={},_r={},yr={},Un=function(ie,Ie,se){var J=N(ie),je,ut,Fe;if(Ie){if(ut=this.parse(J),ut)throw new Q(ut);this.searchParams=null}else{if(se!==void 0&&(je=new Un(se,!0)),ut=this.parse(J,null,je),ut)throw new Q(ut);Fe=U(new L),Fe.bindURL(this),this.searchParams=Fe}};Un.prototype={type:"URL",parse:function(ie,Ie,se){var J=this,je=Ie||lt,ut=0,Fe="",bt=!1,yt=!1,er=!1,sr,De,Lt,Zr;for(ie=N(ie),Ie||(J.scheme="",J.username="",J.password="",J.host=null,J.port=null,J.path=[],J.query=null,J.fragment=null,J.cannotBeABaseURL=!1,ie=G(ie,dt,""),ie=G(ie,pt,"$1")),ie=G(ie,Ke,""),sr=I(ie);ut<=sr.length;){switch(De=sr[ut],je){case lt:if(De&&Y(Le,De))Fe+=pe(De),je=Ut;else{if(Ie)return Oe;je=he;continue}break;case Ut:if(De&&(Y(Ze,De)||De==="+"||De==="-"||De==="."))Fe+=pe(De);else if(De===":"){if(Ie&&(J.isSpecial()!==g(Ye,Fe)||Fe==="file"&&(J.includesCredentials()||J.port!==null)||J.scheme==="file"&&!J.host))return;if(J.scheme=Fe,Ie){J.isSpecial()&&Ye[J.scheme]===J.port&&(J.port=null);return}Fe="",J.scheme==="file"?je=ui:J.isSpecial()&&se&&se.scheme===J.scheme?je=Re:J.isSpecial()?je=It:sr[ut+1]==="/"?(je=$e,ut++):(J.cannotBeABaseURL=!0,z(J.path,""),je=Nn)}else{if(Ie)return Oe;Fe="",je=he,ut=0;continue}break;case he:if(!se||se.cannotBeABaseURL&&De!=="#")return Oe;if(se.cannotBeABaseURL&&De==="#"){J.scheme=se.scheme,J.path=y(se.path),J.query=se.query,J.fragment="",J.cannotBeABaseURL=!0,je=yr;break}je=se.scheme==="file"?ui:be;continue;case Re:if(De==="/"&&sr[ut+1]==="/")je=At,ut++;else{je=be;continue}break;case $e:if(De==="/"){je=St;break}else{je=Or;continue}case be:if(J.scheme=se.scheme,De===Ce)J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.query=se.query;else if(De==="/"||De==="\\"&&J.isSpecial())je=ot;else if(De==="?")J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.query="",je=_r;else if(De==="#")J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.query=se.query,J.fragment="",je=yr;else{J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.path.length--,je=Or;continue}break;case ot:if(J.isSpecial()&&(De==="/"||De==="\\"))je=At;else if(De==="/")je=St;else{J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,je=Or;continue}break;case It:if(je=At,De!=="/"||R(Fe,ut+1)!=="/")continue;ut++;break;case At:if(De!=="/"&&De!=="\\"){je=St;continue}break;case St:if(De==="@"){bt&&(Fe="%40"+Fe),bt=!0,Lt=I(Fe);for(var Ci=0;Ci<Lt.length;Ci++){var si=Lt[Ci];if(si===":"&&!er){er=!0;continue}var xr=rt(si,et);er?J.password+=xr:J.username+=xr}Fe=""}else if(De===Ce||De==="/"||De==="?"||De==="#"||De==="\\"&&J.isSpecial()){if(bt&&Fe==="")return le;ut-=I(Fe).length+1,Fe="",je=Ft}else Fe+=De;break;case Ft:case ir:if(Ie&&J.scheme==="file"){je=Pn;continue}else if(De===":"&&!yt){if(Fe==="")return Pe;if(Zr=J.parseHost(Fe),Zr)return Zr;if(Fe="",je=Ir,Ie===ir)return}else if(De===Ce||De==="/"||De==="?"||De==="#"||De==="\\"&&J.isSpecial()){if(J.isSpecial()&&Fe==="")return Pe;if(Ie&&Fe===""&&(J.includesCredentials()||J.port!==null))return;if(Zr=J.parseHost(Fe),Zr)return Zr;if(Fe="",je=Ht,Ie)return;continue}else De==="["?yt=!0:De==="]"&&(yt=!1),Fe+=De;break;case Ir:if(Y(Xe,De))Fe+=De;else if(De===Ce||De==="/"||De==="?"||De==="#"||De==="\\"&&J.isSpecial()||Ie){if(Fe!==""){var ra=x(Fe,10);if(ra>65535)return me;J.port=J.isSpecial()&&ra===Ye[J.scheme]?null:ra,Fe=""}if(Ie)return;je=Ht;continue}else return me;break;case ui:if(J.scheme="file",De==="/"||De==="\\")je=Ar;else if(se&&se.scheme==="file")switch(De){case Ce:J.host=se.host,J.path=y(se.path),J.query=se.query;break;case"?":J.host=se.host,J.path=y(se.path),J.query="",je=_r;break;case"#":J.host=se.host,J.path=y(se.path),J.query=se.query,J.fragment="",je=yr;break;default:_e(V(y(sr,ut),""))||(J.host=se.host,J.path=y(se.path),J.shortenPath()),je=Or;continue}else{je=Or;continue}break;case Ar:if(De==="/"||De==="\\"){je=Pn;break}se&&se.scheme==="file"&&!_e(V(y(sr,ut),""))&&(Te(se.path[0],!0)?z(J.path,se.path[0]):J.host=se.host),je=Or;continue;case Pn:if(De===Ce||De==="/"||De==="\\"||De==="?"||De==="#"){if(!Ie&&Te(Fe))je=Or;else if(Fe===""){if(J.host="",Ie)return;je=Ht}else{if(Zr=J.parseHost(Fe),Zr)return Zr;if(J.host==="localhost"&&(J.host=""),Ie)return;Fe="",je=Ht}continue}else Fe+=De;break;case Ht:if(J.isSpecial()){if(je=Or,De!=="/"&&De!=="\\")continue}else if(!Ie&&De==="?")J.query="",je=_r;else if(!Ie&&De==="#")J.fragment="",je=yr;else if(De!==Ce&&(je=Or,De!=="/"))continue;break;case Or:if(De===Ce||De==="/"||De==="\\"&&J.isSpecial()||!Ie&&(De==="?"||De==="#")){if(gt(Fe)?(J.shortenPath(),De!=="/"&&!(De==="\\"&&J.isSpecial())&&z(J.path,"")):Be(Fe)?De!=="/"&&!(De==="\\"&&J.isSpecial())&&z(J.path,""):(J.scheme==="file"&&!J.path.length&&Te(Fe)&&(J.host&&(J.host=""),Fe=R(Fe,0)+":"),z(J.path,Fe)),Fe="",J.scheme==="file"&&(De===Ce||De==="?"||De==="#"))for(;J.path.length>1&&J.path[0]==="";)K(J.path);De==="?"?(J.query="",je=_r):De==="#"&&(J.fragment="",je=yr)}else Fe+=rt(De,we);break;case Nn:De==="?"?(J.query="",je=_r):De==="#"?(J.fragment="",je=yr):De!==Ce&&(J.path[0]+=rt(De,ge));break;case _r:!Ie&&De==="#"?(J.fragment="",je=yr):De!==Ce&&(De==="'"&&J.isSpecial()?J.query+="%27":De==="#"?J.query+="%23":J.query+=rt(De,ge));break;case yr:De!==Ce&&(J.fragment+=rt(De,de));break}ut++}},parseHost:function(ie){var Ie,se,J;if(R(ie,0)==="["){if(R(ie,ie.length-1)!=="]"||(Ie=fe(W(ie,1,-1)),!Ie))return Pe;this.host=Ie}else if(this.isSpecial()){if(ie=m(ie),Y(vt,ie)||(Ie=Ue(ie),Ie===null))return Pe;this.host=Ie}else{if(Y(Je,ie))return Pe;for(Ie="",se=I(ie),J=0;J<se.length;J++)Ie+=rt(se[J],ge);this.host=Ie}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return g(Ye,this.scheme)},shortenPath:function(){var ie=this.path,Ie=ie.length;Ie&&(this.scheme!=="file"||Ie!==1||!Te(ie[0],!0))&&ie.length--},serialize:function(){var ie=this,Ie=ie.scheme,se=ie.username,J=ie.password,je=ie.host,ut=ie.port,Fe=ie.path,bt=ie.query,yt=ie.fragment,er=Ie+":";return je!==null?(er+="//",ie.includesCredentials()&&(er+=se+(J?":"+J:"")+"@"),er+=ve(je),ut!==null&&(er+=":"+ut)):Ie==="file"&&(er+="//"),er+=ie.cannotBeABaseURL?Fe[0]:Fe.length?"/"+V(Fe,"/"):"",bt!==null&&(er+="?"+bt),yt!==null&&(er+="#"+yt),er},setHref:function(ie){var Ie=this.parse(ie);if(Ie)throw new Q(Ie);this.searchParams.update()},getOrigin:function(){var ie=this.scheme,Ie=this.port;if(ie==="blob")try{return new En(ie.path[0]).origin}catch(se){return"null"}return ie==="file"||!this.isSpecial()?"null":ie+"://"+ve(this.host)+(Ie!==null?":"+Ie:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ie){this.parse(N(ie)+":",lt)},getUsername:function(){return this.username},setUsername:function(ie){var Ie=I(N(ie));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var se=0;se<Ie.length;se++)this.username+=rt(Ie[se],et)}},getPassword:function(){return this.password},setPassword:function(ie){var Ie=I(N(ie));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var se=0;se<Ie.length;se++)this.password+=rt(Ie[se],et)}},getHost:function(){var ie=this.host,Ie=this.port;return ie===null?"":Ie===null?ve(ie):ve(ie)+":"+Ie},setHost:function(ie){this.cannotBeABaseURL||this.parse(ie,Ft)},getHostname:function(){var ie=this.host;return ie===null?"":ve(ie)},setHostname:function(ie){this.cannotBeABaseURL||this.parse(ie,ir)},getPort:function(){var ie=this.port;return ie===null?"":N(ie)},setPort:function(ie){this.cannotHaveUsernamePasswordPort()||(ie=N(ie),ie===""?this.port=null:this.parse(ie,Ir))},getPathname:function(){var ie=this.path;return this.cannotBeABaseURL?ie[0]:ie.length?"/"+V(ie,"/"):""},setPathname:function(ie){this.cannotBeABaseURL||(this.path=[],this.parse(ie,Ht))},getSearch:function(){var ie=this.query;return ie?"?"+ie:""},setSearch:function(ie){ie=N(ie),ie===""?this.query=null:(R(ie,0)==="?"&&(ie=W(ie,1)),this.query="",this.parse(ie,_r)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ie=this.fragment;return ie?"#"+ie:""},setHash:function(ie){if(ie=N(ie),ie===""){this.fragment=null;return}R(ie,0)==="#"&&(ie=W(ie,1)),this.fragment="",this.parse(ie,yr)},update:function(){this.query=this.searchParams.serialize()||null}};var En=function(Ie){var se=f(this,rr),J=A(arguments.length,1)>1?arguments[1]:void 0,je=C(se,new Un(Ie,!1,J));e||(se.href=je.serialize(),se.origin=je.getOrigin(),se.protocol=je.getProtocol(),se.username=je.getUsername(),se.password=je.getPassword(),se.host=je.getHost(),se.hostname=je.getHostname(),se.port=je.getPort(),se.pathname=je.getPathname(),se.search=je.getSearch(),se.searchParams=je.getSearchParams(),se.hash=je.getHash())},rr=En.prototype,Dr=function(ie,Ie){return{get:function(){return _(this)[ie]()},set:Ie&&function(se){return _(this)[Ie](se)},configurable:!0,enumerable:!0}};if(e&&(d(rr,"href",Dr("serialize","setHref")),d(rr,"origin",Dr("getOrigin")),d(rr,"protocol",Dr("getProtocol","setProtocol")),d(rr,"username",Dr("getUsername","setUsername")),d(rr,"password",Dr("getPassword","setPassword")),d(rr,"host",Dr("getHost","setHost")),d(rr,"hostname",Dr("getHostname","setHostname")),d(rr,"port",Dr("getPort","setPort")),d(rr,"pathname",Dr("getPathname","setPathname")),d(rr,"search",Dr("getSearch","setSearch")),d(rr,"searchParams",Dr("getSearchParams")),d(rr,"hash",Dr("getHash","setHash"))),l(rr,"toJSON",function(){return _(this).serialize()},{enumerable:!0}),l(rr,"toString",function(){return _(this).serialize()},{enumerable:!0}),H){var un=H.createObjectURL,ta=H.revokeObjectURL;un&&l(En,"createObjectURL",o(un,H)),ta&&l(En,"revokeObjectURL",o(ta,H))}return E(En,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!e},{URL:En}),ite}var Mte;function d6e(){return Mte||(Mte=1,f6e()),nte}d6e();var pte={},Ite;function g6e(){if(Ite)return pte;Ite=1;var t=wt(),e=yn();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return e(URL.prototype.toString,this)}}),pte}g6e();var yte={},hte;function M6e(){return hte||(hte=1,dte()),yte}M6e();var vte={},mte;function p6e(){if(mte)return vte;mte=1;var t=Ra(),e=Mr(),n=Ni(),a=U4(),o=URLSearchParams,s=o.prototype,l=e(s.append),d=e(s.delete),f=e(s.forEach),g=e([].push),M=new o("a=1&a=2&b=3");return M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&t(s,"delete",function(I){var y=arguments.length,h=y<2?void 0:arguments[1];if(y&&h===void 0)return d(this,I);var m=[];f(this,function(L,U){g(m,{key:U,value:L})}),a(y,1);for(var N=n(I),E=n(h),A=0,T=0,j=!1,C=m.length,_;A<C;)_=m[A++],j||_.key===N?(j=!0,d(this,_.key)):T++;for(;T<C;)_=m[T++],_.key===N&&_.value===E||l(this,_.key,_.value)},{enumerable:!0,unsafe:!0}),vte}p6e();var Nte={},Ete;function I6e(){if(Ete)return Nte;Ete=1;var t=Ra(),e=Mr(),n=Ni(),a=U4(),o=URLSearchParams,s=o.prototype,l=e(s.getAll),d=e(s.has),f=new o("a=1");return(f.has("a",2)||!f.has("a",void 0))&&t(s,"has",function(M){var I=arguments.length,y=I<2?void 0:arguments[1];if(I&&y===void 0)return d(this,M);var h=l(this,M);a(I,1);for(var m=n(y),N=0;N<h.length;)if(h[N++]===m)return!0;return!1},{enumerable:!0,unsafe:!0}),Nte}I6e();var Dte={},Tte;function y6e(){if(Tte)return Dte;Tte=1;var t=tn(),e=Mr(),n=Uu(),a=URLSearchParams.prototype,o=e(a.forEach);return t&&!("size"in a)&&n(a,"size",{get:function(){var l=0;return o(this,function(){l++}),l},configurable:!0,enumerable:!0}),Dte}y6e();function O2(t){"@babel/helpers - typeof";return O2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O2(t)}function h6e(t,e){return E6e(t)||N6e(t,e)||m6e(t,e)||v6e()}function v6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
84
84
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m6e(t,e){if(t){if(typeof t=="string")return jte(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jte(t,e):void 0}}function jte(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function N6e(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],f=!0,g=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);f=!0);}catch(M){g=!0,o=M}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function E6e(t){if(Array.isArray(t))return t}function D6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Ste(a.key),a)}}function j6e(t,e,n){return e&&T6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function kv(t,e,n){return(e=Ste(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ste(t){var e=S6e(t,"string");return O2(e)=="symbol"?e:e+""}function S6e(t,e){if(O2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(O2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var C6e=function(){function t(){D6e(this,t),kv(this,"_levels",[]),kv(this,"_transports",[]),kv(this,"_logs",[]),kv(this,"_prevTime",0);try{if(!window.localStorage)return;var e=window.localStorage.getItem("logger");if(!e)return;var n=e.split(">"),a=h6e(n,2),o=a[0],s=a[1];this._levels=o.split(","),s&&(this._transports=s.split(","))}catch(l){return}}return j6e(t,[{key:"create",value:function(n,a){var o=this;return function(s){var l=Date.now(),d=0;if(o._prevTime&&(d=l-o._prevTime),o._prevTime=l,o._levels.includes(n)&&o._transports.includes("console")){var f=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(f,";"),n,"",s,"color: ".concat(f,";"),d)}o._logs.push("".concat(n,": ").concat(s," +").concat(d,"ms"))}}},{key:"getLogs",value:function(){return this._logs}},{key:"cleanLogs",value:function(){this._logs=[]}},{key:"saveLogsToFile",value:function(){if(!(!this._transports.includes("file")||!this._logs.length)){var n=this._logs.join(`
|
|
85
|
-
`),a=new Blob([n],{type:"text/plain"}),o=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=o,s.click(),window.URL.revokeObjectURL(o),this.cleanLogs()}}}])}(),mA=new C6e;function XM(t){"@babel/helpers - typeof";return XM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XM(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */bn=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,w,R){return Object.defineProperty(x,O,{value:w,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(w,R,Y){return w[R]=Y}}function g(x,O,w,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,w,new H(R||[])),!0),V}function M(x,O,w){try{return{type:"normal",arg:x.call(O,w)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(N=A);var T=m.prototype=y.prototype=Object.create(N);function j(x){["next","throw","return"].forEach(function(O){f(x,O,function(w){return this._invoke(O,w)})})}function C(x,O){function w(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&XM(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){w("next",k,q,te)},function(k){w("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return w("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){w(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var w=O.method,R=x.i[w];if(R===t)return O.delegate=null,w==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||w!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+w+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function Q(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,R=function Y(){for(;++w<x.length;)if(a.call(x,w))return Y.value=x[w],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(XM(x)+" is not iterable")}return h.prototype=m,f(T,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(T),x},e.awrap=function(x){return{__await:x}},j(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,w,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,w,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},j(T),f(T,d,"Generator"),f(T,s,function(){return this}),f(T,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),w=[];for(var R in O)w.unshift(R);return function Y(){for(;w.length;)if((R=w.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=Q,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!O)for(var w in this)w.charAt(0)==="t"&&a.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var w=this;function R(K){q.type="throw",q.arg=O,w.next=K}for(var Y=w.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,w){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=w&&w<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=w,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,w){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&w&&(this.next=w),I},finish:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,w,R){return this.delegate={i:Q(O),r:w,n:R},this.method==="next"&&(this.arg=t),I}},e}function Cte(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function Nu(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Cte(s,a,o,l,d,"next",f)}function d(f){Cte(s,a,o,l,d,"throw",f)}l(void 0)})}}function A6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Ate(a.key),a)}}function _6e(t,e,n){return e&&O6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function r0(t,e,n){return(e=Ate(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ate(t){var e=x6e(t,"string");return XM(e)=="symbol"?e:e+""}function x6e(t,e){if(XM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(XM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wo=mA.create("wasm_idv"),w6e=function(){function t(e){A6e(this,t),r0(this,"_worker",null),r0(this,"_initialized",!1),r0(this,"_connectedToIdv",!1),r0(this,"_serviceRunning",!1),r0(this,"_userId",Ome(Lve)),r0(this,"_setErrorScreen",null),e&&(this._setErrorScreen=e)}return _6e(t,[{key:"init",value:function(){var e=Nu(bn().mark(function a(){var o,s,l,d;return bn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=1,g.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/27441b5-1a9959378//PlatformAdaptor.worker.js");case 4:return o=g.sent,g.next=7,o.blob();case 7:s=g.sent,l=URL.createObjectURL(s),this._worker=new Worker(l),g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),wo("Creating worker error: ".concat(JSON.stringify(g.t0)));case 15:g.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){g.next=20;break}return g.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),g.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/27441b5-1a9959378/",preMain:!0});case 23:return d=g.sent,d.code===0&&wo("Worker was created successfully"),g.abrupt("return",d);case 26:case"end":return g.stop()}},a,this,[[1,12]])}));function n(){return e.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:LE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:o.host,httpRetryCount:o.httpRetryCount||0,httpTimeoutMs:o.httpTimeoutMs||0,isSecure:(s=o.isSecure)!==null&&s!==void 0?s:!0,password:o.password,port:o.port?o.port:0,schema:o.schema?o.schema:"basic",userName:o.userName},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("IdvWasmService result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:LE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:o},preMain:!0});case 2:return s=d.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("Connection by URL result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var e=Nu(bn().mark(function a(o,s,l){var d,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return d={workflowId:o,locale:s},l&&(_me(l)?d.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),M.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:d,preMain:!0});case 4:return f=M.sent,wo("Start session result code: ".concat(f.code)),M.abrupt("return",f);case 7:case"end":return M.stop()}},a,this)}));function n(a,o,s){return e.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s={sessionId:o},f.next=3,this.sendMessage({continueParams:s,target:"custom",method:"continue_session",preMain:!0});case 3:return l=f.sent,wo("Continue session result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var e=Nu(bn().mark(function a(){var o,s,l=arguments;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=l.length>0&&l[0]!==void 0?l[0]:{limit:0,skip:0},f.next=3,this.sendMessage({workflowsParams:o,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=f.sent,wo("listWorkflows result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return o=l.sent,wo("getHealth result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return o=l.sent,wo("getServiceToken result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return o=l.sent,wo("abandonSession result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({workflowIdParams:{workflowId:o},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=d.sent,wo("getWorkflow result code: ".concat(s.code)),d.abrupt("return",s);case 5:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var e=Nu(bn().mark(function a(o,s){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:o},preMain:!0});case 2:return l=f.sent,wo("pushData result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a,o){return e.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return o=l.sent,wo("getSessionState result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return o=l.sent,wo("waitForSessionUpdate result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return o=l.sent,this._connectedToIdv=!1,this._serviceRunning=!1,wo("disconnect result code: ".concat(o.code)),l.abrupt("return",o);case 7:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var e=Nu(bn().mark(function a(o){var s=this;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(f,g){if(!s._worker)return g();s._worker.onmessage=function(M){var I=M.data.target;if(I==="stdout"){wo(JSON.stringify(M.data.content));return}if(I==="custom"){var y=M.data,h=y.method,m=y.data;h==="onRuntimeInitialized"&&(s._initialized=!0),f(m)}if(I==="stderr"){var N=M.data.content;wo(JSON.stringify(N)),s._setErrorScreen&&s._setErrorScreen(N)}},s._worker.postMessage(o)}));case 1:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this._worker){l.next=2;break}return l.abrupt("return",{code:0});case 2:if(this._connectedToIdv){l.next=5;break}return this.terminateWorker(),l.abrupt("return",{code:0});case 5:return l.next=7,this.disconnect();case 7:return o=l.sent,this.terminateWorker(),l.abrupt("return",o);case 10:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()}])}();function e4(t){"@babel/helpers - typeof";return e4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e4(t)}function Ote(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function _2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ote(Object(n),!0).forEach(function(a){NA(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ote(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function NA(t,e,n){return(e=b6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b6e(t){var e=L6e(t,"string");return e4(e)=="symbol"?e:e+""}function L6e(t,e){if(e4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(e4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Fi=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,w,R){return Object.defineProperty(x,O,{value:w,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(w,R,Y){return w[R]=Y}}function g(x,O,w,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,w,new H(R||[])),!0),V}function M(x,O,w){try{return{type:"normal",arg:x.call(O,w)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(N=A);var T=m.prototype=y.prototype=Object.create(N);function j(x){["next","throw","return"].forEach(function(O){f(x,O,function(w){return this._invoke(O,w)})})}function C(x,O){function w(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&e4(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){w("next",k,q,te)},function(k){w("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return w("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){w(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var w=O.method,R=x.i[w];if(R===t)return O.delegate=null,w==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||w!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+w+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function Q(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,R=function Y(){for(;++w<x.length;)if(a.call(x,w))return Y.value=x[w],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(e4(x)+" is not iterable")}return h.prototype=m,f(T,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(T),x},e.awrap=function(x){return{__await:x}},j(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,w,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,w,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},j(T),f(T,d,"Generator"),f(T,s,function(){return this}),f(T,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),w=[];for(var R in O)w.unshift(R);return function Y(){for(;w.length;)if((R=w.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=Q,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!O)for(var w in this)w.charAt(0)==="t"&&a.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var w=this;function R(K){q.type="throw",q.arg=O,w.next=K}for(var Y=w.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,w){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=w&&w<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=w,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,w){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&w&&(this.next=w),I},finish:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,w,R){return this.delegate={i:Q(O),r:w,n:R},this.method==="next"&&(this.arg=t),I}},e}function _te(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function Jl(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){_te(s,a,o,l,d,"next",f)}function d(f){_te(s,a,o,l,d,"throw",f)}l(void 0)})}}var k6e=mA.create("store_idv"),R6e=function(e,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Jl(Fi().mark(function s(){var l;return Fi().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new w6e,f.next=3,l.init();case 3:e({wasmService:l});case 4:case"end":return f.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalWaitingUi:function(o){e({isFinalWaitingUi:o})},connectToIdv:function(o){return Jl(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((l=n().wasmService)!==null&&l!==void 0&&l.isServiceConnected())){y.next=3;break}return y.next=3,(d=n().wasmService)===null||d===void 0?void 0:d.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(o);case 5:if(f=y.sent,g=null,f.code===4&&(g=YM.HTTP_ISSUE),f.code!==0&&f.code!==4&&(g=YM.PROVIDER_ERROR),g===null){y.next=12;break}return M=new Lp({errorCode:g}),y.abrupt("return",{error:M});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},s)}))()},connectByUrl:function(o){return Jl(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().wasmService,y.next=3,l.connectByUrl(o);case 3:if(d=y.sent,f=null,d.code===4&&(f=YM.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=YM.PROVIDER_ERROR),f===null){y.next=13;break}return g=new Lp({errorCode:f}),M=new zh({errorCode:RE.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:M});case 13:return y.abrupt("return",{workflows:d.data});case 14:case"end":return y.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(o){var s=function(d){var f,g=(f=n().currentSessionData)===null||f===void 0?void 0:f.sessionId,M=_2(_2({},d.results),{},{sessionId:g}),I=_2({results:M},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),o(I)};e(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Jl(Fi().mark(function s(){var l,d,f,g;return Fi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().externalModulesNames,I.prev=1,I.next=4,z6e(l);case 4:return d=I.sent,e(function(){return{externalModules:d}}),I.abrupt("return",{});case 9:return I.prev=9,I.t0=I.catch(1),(f=n().wasmService)===null||f===void 0||f.shutdown(),n().resetWasmService(),n().resetProps(),g=new bp({errorCode:mp.MODULES_INSTANTIATION_FAILURE}),I.abrupt("return",{error:g});case 16:case"end":return I.stop()}},s,null,[[1,9]])}));function o(){return a.apply(this,arguments)}return o}(),setProcessingTemplate:function(o){var s=HD(o.find(function(l){return l.templateId===zE}));s.templateLayout=lH(s.templateLayout,n().layout),e({processingTransformedTemplate:s})},setIsProcessing:function(o){e({isProcessing:o})},_pushStep:function(){var a=Jl(Fi().mark(function s(l,d){var f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return f=null,g=function(){var h=Jl(Fi().mark(function m(){var N,E,A,T;return Fi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(l,d);case 2:if(N=C.sent,E=null,N.code===4&&(E=Nl.HTTP_ISSUE),N.code!==0&&N.code!==4&&(E=Nl.PROVIDER_ERROR),E!==null&&(A=new kp({errorCode:Nl.HTTP_ISSUE}),T=new vu({errorCode:hu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:A}),f=T),N.code!==0){C.next=12;break}return f=null,C.abrupt("return",N);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),M=function(){return null},y.next=5,BD(g,M);case 5:return y.abrupt("return",f?{error:f}:{});case 6:case"end":return y.stop()}},s)}));function o(s,l){return a.apply(this,arguments)}return o}(),_findStepById:function(o){var s=n().workflow;if(!s||!o)return null;var l=s.steps.find(function(d){return d.id===o});return l!=null?l:null},_waitingForNextStep:function(){var a=Jl(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().currentStepId,d=null,f=function(){var h=Jl(Fi().mark(function m(){var N,E,A,T,j,C,_,L,U,H,Q,x,O,w,R;return Fi().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,n().wasmService.getSessionState();case 2:if(T=V.sent,j=(N=T.data)===null||N===void 0?void 0:N.currentStep,C=(E=T.data)===null||E===void 0?void 0:E.isProcessingFiles,_=(A=T.data)===null||A===void 0||(A=A.workflow)===null||A===void 0?void 0:A.steps,L=Sme(_,j),U=T.code===4,H=T.code!==0&&T.code!==4,Q=T.code===0&&(!T.data.workflow||!T.data.currentStep),x=j&&j===l,O=null,_&&!L&&(O=Nl.NOT_DATA_TYPE),U&&(O=Nl.HTTP_ISSUE),H&&(O=Nl.PROVIDER_ERROR),C&&(O=Nl.IS_PROCESSING),x&&(O=Nl.SAME_STEP),Q&&(O=Nl.DECODING_FAILED),O!==null&&(w=new kp({errorCode:O}),R=new vu({errorCode:hu.INTERNAL_ISSUE,underlyingBaseError:w}),d=R),k6e(JSON.stringify({nextStep:j,isDataType:L,isProcessingFiles:C})),!(L&&!x&&!C&&!U&&!H&&!Q)){V.next=23;break}return d=null,V.abrupt("return",T.data);case 23:return V.abrupt("return",null);case 24:case"end":return V.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),g=function(){return null},y.next=6,BD(f,g);case 6:if(M=y.sent,!d){y.next=9;break}return y.abrupt("return",{error:d});case 9:return y.abrupt("return",{sessionData:M});case 10:case"end":return y.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalStepAndStopProcess:function(o){var s=o||n().currentStepId;if(s){var l=n()._findStepById(s);l&&(n().workflowSessionCompletion({results:{finalStep:{id:l.id,name:l.name,final:l.final}}}),n().resetSession(),n().listener({eventType:hp.MESSAGE,message:vp.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Jl(Fi().mark(function s(l){var d,f,g,M,I,y,h,m,N,E,A,T;return Fi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(M=n().currentStepId,M){C.next=3;break}return C.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){C.next=7;break}return n().setFinalStepAndStopProcess(),C.abrupt("return");case 7:if(!(l instanceof ri)){C.next=13;break}return I=l,y=new vu({errorCode:hu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:I}),n().workflowSessionCompletion({error:y}),n().resetSession(),C.abrupt("return");case 13:return C.next=15,n()._pushStep(M,l);case 15:if(h=C.sent,!h.error){C.next=20;break}return n().workflowSessionCompletion({error:h.error}),n().resetSession(),C.abrupt("return");case 20:return C.next=22,n()._waitingForNextStep();case 22:if(m=C.sent,!m.error){C.next=27;break}return n().workflowSessionCompletion({error:m.error}),n().resetSession(),C.abrupt("return");case 27:if(N=(d=m.sessionData)===null||d===void 0?void 0:d.workflow,E=(f=m.sessionData)===null||f===void 0?void 0:f.currentStep,n().setWorkflow(N),n().setLayout(N.client.layout),n().setProcessingTemplate(N.client.steps),n().setSessionProperties((g=m.sessionData)===null||g===void 0?void 0:g.properties),A=n()._findStepById(E),T=function(L){return!!L&&Object.prototype.toString.call(L)==="[object Object]"&&L.templateId},!(A!=null&&A.final&&!T(A.client))){C.next=38;break}return n().setFinalStepAndStopProcess(A.id),C.abrupt("return");case 38:A!=null&&A.final&&T(A.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(E),n().setIsProcessing(!1);case 41:case"end":return C.stop()}},s)}));function o(s){return a.apply(this,arguments)}return o}(),onChangeScreen:function(o){if(!o)return e(function(){return{currentScreenConfig:null}});var s=n().workflow,l=n().sessionProperties,d=null;if(o===zE&&n().processingTransformedTemplate!==null){var f=n().processingTransformedTemplate;f&&(d={templateId:f.templateId,templateLayout:f.templateLayout,dataSource:null})}else{var g,M,I=n()._findStepById(o);if(typeof(I==null||(g=I.client)===null||g===void 0?void 0:g.templateId)=="string"){var y;d=_2(_2({},I==null?void 0:I.client),{},{templateId:I.client.templateId,dataSource:(y=I.dataSource)!==null&&y!==void 0?y:null,properties:l})}if(d){var h;d.sessionId=(h=n().currentSessionData)===null||h===void 0?void 0:h.sessionId,d.serviceToken=n().serviceToken}if(d&&xme(I==null||(M=I.client)===null||M===void 0?void 0:M.templateLayout)){var m=lH(I.client.templateLayout,n().layout);m&&(d.templateLayout=m)}}var N=jme(n().externalModules,s.steps,o);if(d===null||!N){var E=new vu({errorCode:hu.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:E}),e(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(o),e(function(){return{currentScreenConfig:d}})},deinitializationIdv:function(){var a=Jl(Fi().mark(function s(){var l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(l=n().wasmService)===null||l===void 0?void 0:l.shutdown();case 2:if(d=g.sent,n().resetWasmService(),n().externalModules.forEach(function(M){M.component.deinitialize&&M.component.isReady&&M.component.deinitialize()}),(d==null?void 0:d.code)!==0){g.next=7;break}return g.abrupt("return",{});case 7:return g.abrupt("return",{});case 8:case"end":return g.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),resetSession:function(){return e(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return e(function(){return{wasmService:null}})}}};function z6e(t){return EA.apply(this,arguments)}function EA(){return EA=Jl(Fi().mark(function t(e){var n,a,o,s,l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:n=[{id:a1.getIdentifier(),supportedTemplates:a1.getSupportedTemplates(),component:a1}],a=NA(NA({},kE.LIVENESS,function(){return Promise.resolve().then(()=>Iut)}),kE.DOC_READER,function(){return Promise.resolve().then(()=>$Pt)}),o=Fi().mark(function M(){var I,y,h;return Fi().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(I=l[s],y=function(){return a[I]()},!y){N.next=7;break}return N.next=5,y();case 5:h=N.sent,n.push({id:h.default.getIdentifier(),supportedTemplates:h.default.getSupportedTemplates(),component:h.default});case 7:case"end":return N.stop()}},M)}),s=0,l=e;case 4:if(!(s<l.length)){g.next=9;break}return g.delegateYield(o(),"t0",6);case 6:s++,g.next=4;break;case 9:return d=n.filter(function(M){return M!==null}),g.abrupt("return",d);case 11:case"end":return g.stop()}},t)})),EA.apply(this,arguments)}function x2(t){"@babel/helpers - typeof";return x2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x2(t)}function xte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function DA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xte(Object(n),!0).forEach(function(a){P6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function P6e(t,e,n){return(e=U6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U6e(t){var e=Y6e(t,"string");return x2(e)=="symbol"?e:e+""}function Y6e(t,e){if(x2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(x2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wa=j3e(function(){return DA(DA(DA({},Pme.apply(void 0,arguments)),eNe.apply(void 0,arguments)),R6e.apply(void 0,arguments))}),wte=function(e){var n=e.children;return vi.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function w2(t){"@babel/helpers - typeof";return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w2(t)}function bte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function Lte(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bte(Object(n),!0).forEach(function(a){$6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function $6e(t,e,n){return(e=Q6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q6e(t){var e=F6e(t,"string");return w2(e)=="symbol"?e:e+""}function F6e(t,e){if(w2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(w2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var H6e=function(){var e=wa(function(h){return h.currentScreenConfig}),n=wa(function(h){return h.pushStepWaitNextStepAndSet}),a=wa(function(h){return h.processingTransformedTemplate}),o=wa(function(h){return h.isProcessing}),s=wa(function(h){return h.setIsProcessing}),l=wa(function(h){return h.listener}),d=wa(function(h){return h.externalModules}),f=wa(function(h){return h.modulesConfig}),g=function(m,N){l({eventType:hp.MESSAGE,message:N,module:m})},M=function(m){s(m)},I=function(m){s(!1),n(m)},y=ht.useCallback(function(){if(!e)return null;var h=d.find(function(m){return m.supportedTemplates.includes(e.templateId)});if(h&&e)return vi.jsx(h.component,{perform:I,moduleProps:e,modulesConfig:f,idvEventListener:g,isProcessing:M})},[e,d]);return!e&&!a?vi.jsx(qE,{direction:_h.Ltr,children:vi.jsx(wte,{children:"Waiting for play... or process completed"})}):vi.jsx(vi.Fragment,{children:vi.jsx(qE,{direction:_h.Ltr,children:vi.jsxs(vi.Fragment,{children:[o&&vi.jsx(wte,{children:a?vi.jsx(a1,{perform:I,moduleProps:Lte(Lte({},a),{},{templateId:"PROGRESS"}),idvEventListener:g,isProcessing:M}):"Processing..."}),y()]})})})};function V6e(){return vi.jsx(ht.StrictMode,{children:vi.jsx(n3e,{children:vi.jsx(H6e,{})})})}function n0(t){"@babel/helpers - typeof";return n0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n0(t)}function B6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kte(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,zte(a.key),a)}}function G6e(t,e,n){return e&&kte(t.prototype,e),n&&kte(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z6e(t,e,n){return e=L2(e),W6e(t,jA()?Reflect.construct(e,[],L2(t).constructor):e.apply(t,n))}function W6e(t,e){if(e&&(n0(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K6e(t)}function K6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b2(t,e)}function TA(t){var e=typeof Map=="function"?new Map:void 0;return TA=function(a){if(a===null||!X6e(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(a))return e.get(a);e.set(a,o)}function o(){return J6e(a,arguments,L2(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),b2(o,a)},TA(t)}function J6e(t,e,n){if(jA())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,e);var o=new(t.bind.apply(t,a));return n&&b2(o,n.prototype),o}function jA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jA=function(){return!!t})()}function X6e(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(e){return typeof t=="function"}}function b2(t,e){return b2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},b2(t,e)}function L2(t){return L2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L2(t)}function Rte(t,e,n){return(e=zte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zte(t){var e=e_e(t,"string");return n0(e)=="symbol"?e:e+""}function e_e(t,e){if(n0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(n0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var t_e="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",Pte=function(t){function e(){var n;return B6e(this,e),n=Z6e(this,e),Rte(n,"_root",Ave.createRoot(n.attachShadow({mode:"open"}))),Rte(n,"_mounted",!1),n}return q6e(e,t),G6e(e,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.150-nightly".trim())}},{key:"render",value:function(){this._root.render(vi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[vi.jsx("style",{nonce:wa.getState().getNonce(),children:t_e}),vi.jsx(V6e,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),mA.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(TA(HTMLElement));function t4(t){"@babel/helpers - typeof";return t4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t4(t)}function sl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */sl=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,w,R){return Object.defineProperty(x,O,{value:w,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(w,R,Y){return w[R]=Y}}function g(x,O,w,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,w,new H(R||[])),!0),V}function M(x,O,w){try{return{type:"normal",arg:x.call(O,w)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(N=A);var T=m.prototype=y.prototype=Object.create(N);function j(x){["next","throw","return"].forEach(function(O){f(x,O,function(w){return this._invoke(O,w)})})}function C(x,O){function w(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&t4(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){w("next",k,q,te)},function(k){w("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return w("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){w(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var w=O.method,R=x.i[w];if(R===t)return O.delegate=null,w==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||w!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+w+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function Q(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,R=function Y(){for(;++w<x.length;)if(a.call(x,w))return Y.value=x[w],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(t4(x)+" is not iterable")}return h.prototype=m,f(T,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(T),x},e.awrap=function(x){return{__await:x}},j(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,w,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,w,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},j(T),f(T,d,"Generator"),f(T,s,function(){return this}),f(T,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),w=[];for(var R in O)w.unshift(R);return function Y(){for(;w.length;)if((R=w.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=Q,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!O)for(var w in this)w.charAt(0)==="t"&&a.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var w=this;function R(K){q.type="throw",q.arg=O,w.next=K}for(var Y=w.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,w){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=w&&w<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=w,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,w){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&w&&(this.next=w),I},finish:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,w,R){return this.delegate={i:Q(O),r:w,n:R},this.method==="next"&&(this.arg=t),I}},e}function Ute(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function i0(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Ute(s,a,o,l,d,"next",f)}function d(f){Ute(s,a,o,l,d,"throw",f)}l(void 0)})}}function r_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n_e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a_e(a.key),a)}}function i_e(t,e,n){return e&&n_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function a_e(t){var e=o_e(t,"string");return t4(e)=="symbol"?e:e+""}function o_e(t,e){if(t4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(t4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var u_e=function(){function t(){r_e(this,t)}return i_e(t,[{key:"initialize",value:function(){var e=i0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=wa.getState().initialize(o),d.abrupt("return",s);case 2:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"configure",value:function(){var e=i0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof o=="string"){f.next=5;break}return f.next=3,wa.getState().configure(o);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,wa.getState().configureWithUrl(o);case 7:return l=f.sent,f.abrupt("return",l);case 9:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var e=i0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,wa.getState().getWorkflows(o);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var e=i0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=o.workflowId,f.next=3,wa.getState().prepareWorkflowAndPrepareUi(s);case 3:return l=f.sent,f.abrupt("return",l);case 5:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var e=i0(sl().mark(function a(o){var s,l,d,f;return sl().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return s=o==null?void 0:o.locale,l=o==null?void 0:o.metadata,d=Lme(s),M.next=5,wa.getState().startNewSession(d,l);case 5:if(f=M.sent,!f.error){M.next=8;break}return M.abrupt("return",f);case 8:return M.abrupt("return",new Promise(function(I){var y=function(m){I(m)};wa.getState().playWorkflow(y)}));case 9:case"end":return M.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var e=i0(sl().mark(function a(){var o;return sl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,wa.getState().deinitialize();case 2:return o=l.sent,l.abrupt("return",o);case 4:case"end":return l.stop()}},a)}));function n(){return e.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.150-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){wa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}wa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){wa.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return wa.getState().getCurrentSessionId()}}])}(),s_e=window.customElements.get("idv-flow");s_e||window.customElements.define("idv-flow",Pte);var l_e=Object.defineProperty,c_e=Object.defineProperties,f_e=Object.getOwnPropertyDescriptors,Yte=Object.getOwnPropertySymbols,d_e=Object.prototype.hasOwnProperty,g_e=Object.prototype.propertyIsEnumerable,$te=(t,e,n)=>e in t?l_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SA=(t,e)=>{for(var n in e||(e={}))d_e.call(e,n)&&$te(t,n,e[n]);if(Yte)for(var n of Yte(e))g_e.call(e,n)&&$te(t,n,e[n]);return t},M_e=(t,e)=>c_e(t,f_e(e)),bo=(t,e,n)=>new Promise((a,o)=>{var s=f=>{try{d(n.next(f))}catch(g){o(g)}},l=f=>{try{d(n.throw(f))}catch(g){o(g)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,l);d((n=n.apply(t,e)).next())}),Qte=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Fte(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hte={exports:{}},k2={},Vte={exports:{}},rn={},Bte;function p_e(){if(Bte)return rn;Bte=1;/**
|
|
85
|
+
`),a=new Blob([n],{type:"text/plain"}),o=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=o,s.click(),window.URL.revokeObjectURL(o),this.cleanLogs()}}}])}(),mA=new C6e;function XM(t){"@babel/helpers - typeof";return XM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XM(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */bn=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,w,R){return Object.defineProperty(x,O,{value:w,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(w,R,Y){return w[R]=Y}}function g(x,O,w,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,w,new H(R||[])),!0),V}function M(x,O,w){try{return{type:"normal",arg:x.call(O,w)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(N=A);var T=m.prototype=y.prototype=Object.create(N);function j(x){["next","throw","return"].forEach(function(O){f(x,O,function(w){return this._invoke(O,w)})})}function C(x,O){function w(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&XM(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){w("next",k,q,te)},function(k){w("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return w("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){w(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var w=O.method,R=x.i[w];if(R===t)return O.delegate=null,w==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||w!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+w+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function Q(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,R=function Y(){for(;++w<x.length;)if(a.call(x,w))return Y.value=x[w],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(XM(x)+" is not iterable")}return h.prototype=m,f(T,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(T),x},e.awrap=function(x){return{__await:x}},j(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,w,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,w,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},j(T),f(T,d,"Generator"),f(T,s,function(){return this}),f(T,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),w=[];for(var R in O)w.unshift(R);return function Y(){for(;w.length;)if((R=w.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=Q,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!O)for(var w in this)w.charAt(0)==="t"&&a.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var w=this;function R(K){q.type="throw",q.arg=O,w.next=K}for(var Y=w.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,w){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=w&&w<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=w,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,w){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&w&&(this.next=w),I},finish:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,w,R){return this.delegate={i:Q(O),r:w,n:R},this.method==="next"&&(this.arg=t),I}},e}function Cte(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function Nu(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Cte(s,a,o,l,d,"next",f)}function d(f){Cte(s,a,o,l,d,"throw",f)}l(void 0)})}}function A6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Ate(a.key),a)}}function _6e(t,e,n){return e&&O6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function r0(t,e,n){return(e=Ate(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ate(t){var e=x6e(t,"string");return XM(e)=="symbol"?e:e+""}function x6e(t,e){if(XM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(XM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wo=mA.create("wasm_idv"),w6e=function(){function t(e){A6e(this,t),r0(this,"_worker",null),r0(this,"_initialized",!1),r0(this,"_connectedToIdv",!1),r0(this,"_serviceRunning",!1),r0(this,"_userId",Ome(Lve)),r0(this,"_setErrorScreen",null),e&&(this._setErrorScreen=e)}return _6e(t,[{key:"init",value:function(){var e=Nu(bn().mark(function a(){var o,s,l,d;return bn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=1,g.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/e8d3b7c-72f7cfc30//PlatformAdaptor.worker.js");case 4:return o=g.sent,g.next=7,o.blob();case 7:s=g.sent,l=URL.createObjectURL(s),this._worker=new Worker(l),g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),wo("Creating worker error: ".concat(JSON.stringify(g.t0)));case 15:g.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){g.next=20;break}return g.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),g.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/e8d3b7c-72f7cfc30/",preMain:!0});case 23:return d=g.sent,d.code===0&&wo("Worker was created successfully"),g.abrupt("return",d);case 26:case"end":return g.stop()}},a,this,[[1,12]])}));function n(){return e.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:LE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:o.host,httpRetryCount:o.httpRetryCount||0,httpTimeoutMs:o.httpTimeoutMs||0,isSecure:(s=o.isSecure)!==null&&s!==void 0?s:!0,password:o.password,port:o.port?o.port:0,schema:o.schema?o.schema:"basic",userName:o.userName},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("IdvWasmService result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:LE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:o},preMain:!0});case 2:return s=d.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("Connection by URL result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var e=Nu(bn().mark(function a(o,s,l){var d,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return d={workflowId:o,locale:s},l&&(_me(l)?d.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),M.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:d,preMain:!0});case 4:return f=M.sent,wo("Start session result code: ".concat(f.code)),M.abrupt("return",f);case 7:case"end":return M.stop()}},a,this)}));function n(a,o,s){return e.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s={sessionId:o},f.next=3,this.sendMessage({continueParams:s,target:"custom",method:"continue_session",preMain:!0});case 3:return l=f.sent,wo("Continue session result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var e=Nu(bn().mark(function a(){var o,s,l=arguments;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=l.length>0&&l[0]!==void 0?l[0]:{limit:0,skip:0},f.next=3,this.sendMessage({workflowsParams:o,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=f.sent,wo("listWorkflows result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return o=l.sent,wo("getHealth result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return o=l.sent,wo("getServiceToken result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return o=l.sent,wo("abandonSession result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({workflowIdParams:{workflowId:o},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=d.sent,wo("getWorkflow result code: ".concat(s.code)),d.abrupt("return",s);case 5:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var e=Nu(bn().mark(function a(o,s){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:o},preMain:!0});case 2:return l=f.sent,wo("pushData result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a,o){return e.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return o=l.sent,wo("getSessionState result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return o=l.sent,wo("waitForSessionUpdate result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return o=l.sent,this._connectedToIdv=!1,this._serviceRunning=!1,wo("disconnect result code: ".concat(o.code)),l.abrupt("return",o);case 7:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var e=Nu(bn().mark(function a(o){var s=this;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(f,g){if(!s._worker)return g();s._worker.onmessage=function(M){var I=M.data.target;if(I==="stdout"){wo(JSON.stringify(M.data.content));return}if(I==="custom"){var y=M.data,h=y.method,m=y.data;h==="onRuntimeInitialized"&&(s._initialized=!0),f(m)}if(I==="stderr"){var N=M.data.content;wo(JSON.stringify(N)),s._setErrorScreen&&s._setErrorScreen(N)}},s._worker.postMessage(o)}));case 1:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this._worker){l.next=2;break}return l.abrupt("return",{code:0});case 2:if(this._connectedToIdv){l.next=5;break}return this.terminateWorker(),l.abrupt("return",{code:0});case 5:return l.next=7,this.disconnect();case 7:return o=l.sent,this.terminateWorker(),l.abrupt("return",o);case 10:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()}])}();function e4(t){"@babel/helpers - typeof";return e4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e4(t)}function Ote(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function _2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ote(Object(n),!0).forEach(function(a){NA(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ote(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function NA(t,e,n){return(e=b6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b6e(t){var e=L6e(t,"string");return e4(e)=="symbol"?e:e+""}function L6e(t,e){if(e4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(e4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Fi=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,w,R){return Object.defineProperty(x,O,{value:w,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(w,R,Y){return w[R]=Y}}function g(x,O,w,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,w,new H(R||[])),!0),V}function M(x,O,w){try{return{type:"normal",arg:x.call(O,w)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(N=A);var T=m.prototype=y.prototype=Object.create(N);function j(x){["next","throw","return"].forEach(function(O){f(x,O,function(w){return this._invoke(O,w)})})}function C(x,O){function w(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&e4(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){w("next",k,q,te)},function(k){w("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return w("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){w(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var w=O.method,R=x.i[w];if(R===t)return O.delegate=null,w==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||w!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+w+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function Q(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,R=function Y(){for(;++w<x.length;)if(a.call(x,w))return Y.value=x[w],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(e4(x)+" is not iterable")}return h.prototype=m,f(T,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(T),x},e.awrap=function(x){return{__await:x}},j(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,w,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,w,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},j(T),f(T,d,"Generator"),f(T,s,function(){return this}),f(T,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),w=[];for(var R in O)w.unshift(R);return function Y(){for(;w.length;)if((R=w.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=Q,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!O)for(var w in this)w.charAt(0)==="t"&&a.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var w=this;function R(K){q.type="throw",q.arg=O,w.next=K}for(var Y=w.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,w){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=w&&w<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=w,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,w){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&w&&(this.next=w),I},finish:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,w,R){return this.delegate={i:Q(O),r:w,n:R},this.method==="next"&&(this.arg=t),I}},e}function _te(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function Jl(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){_te(s,a,o,l,d,"next",f)}function d(f){_te(s,a,o,l,d,"throw",f)}l(void 0)})}}var k6e=mA.create("store_idv"),R6e=function(e,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Jl(Fi().mark(function s(){var l;return Fi().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new w6e,f.next=3,l.init();case 3:e({wasmService:l});case 4:case"end":return f.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalWaitingUi:function(o){e({isFinalWaitingUi:o})},connectToIdv:function(o){return Jl(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((l=n().wasmService)!==null&&l!==void 0&&l.isServiceConnected())){y.next=3;break}return y.next=3,(d=n().wasmService)===null||d===void 0?void 0:d.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(o);case 5:if(f=y.sent,g=null,f.code===4&&(g=YM.HTTP_ISSUE),f.code!==0&&f.code!==4&&(g=YM.PROVIDER_ERROR),g===null){y.next=12;break}return M=new Lp({errorCode:g}),y.abrupt("return",{error:M});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},s)}))()},connectByUrl:function(o){return Jl(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().wasmService,y.next=3,l.connectByUrl(o);case 3:if(d=y.sent,f=null,d.code===4&&(f=YM.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=YM.PROVIDER_ERROR),f===null){y.next=13;break}return g=new Lp({errorCode:f}),M=new zh({errorCode:RE.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:M});case 13:return y.abrupt("return",{workflows:d.data});case 14:case"end":return y.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(o){var s=function(d){var f,g=(f=n().currentSessionData)===null||f===void 0?void 0:f.sessionId,M=_2(_2({},d.results),{},{sessionId:g}),I=_2({results:M},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),o(I)};e(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Jl(Fi().mark(function s(){var l,d,f,g;return Fi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().externalModulesNames,I.prev=1,I.next=4,z6e(l);case 4:return d=I.sent,e(function(){return{externalModules:d}}),I.abrupt("return",{});case 9:return I.prev=9,I.t0=I.catch(1),(f=n().wasmService)===null||f===void 0||f.shutdown(),n().resetWasmService(),n().resetProps(),g=new bp({errorCode:mp.MODULES_INSTANTIATION_FAILURE}),I.abrupt("return",{error:g});case 16:case"end":return I.stop()}},s,null,[[1,9]])}));function o(){return a.apply(this,arguments)}return o}(),setProcessingTemplate:function(o){var s=HD(o.find(function(l){return l.templateId===zE}));s.templateLayout=lH(s.templateLayout,n().layout),e({processingTransformedTemplate:s})},setIsProcessing:function(o){e({isProcessing:o})},_pushStep:function(){var a=Jl(Fi().mark(function s(l,d){var f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return f=null,g=function(){var h=Jl(Fi().mark(function m(){var N,E,A,T;return Fi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(l,d);case 2:if(N=C.sent,E=null,N.code===4&&(E=Nl.HTTP_ISSUE),N.code!==0&&N.code!==4&&(E=Nl.PROVIDER_ERROR),E!==null&&(A=new kp({errorCode:Nl.HTTP_ISSUE}),T=new vu({errorCode:hu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:A}),f=T),N.code!==0){C.next=12;break}return f=null,C.abrupt("return",N);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),M=function(){return null},y.next=5,BD(g,M);case 5:return y.abrupt("return",f?{error:f}:{});case 6:case"end":return y.stop()}},s)}));function o(s,l){return a.apply(this,arguments)}return o}(),_findStepById:function(o){var s=n().workflow;if(!s||!o)return null;var l=s.steps.find(function(d){return d.id===o});return l!=null?l:null},_waitingForNextStep:function(){var a=Jl(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().currentStepId,d=null,f=function(){var h=Jl(Fi().mark(function m(){var N,E,A,T,j,C,_,L,U,H,Q,x,O,w,R;return Fi().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,n().wasmService.getSessionState();case 2:if(T=V.sent,j=(N=T.data)===null||N===void 0?void 0:N.currentStep,C=(E=T.data)===null||E===void 0?void 0:E.isProcessingFiles,_=(A=T.data)===null||A===void 0||(A=A.workflow)===null||A===void 0?void 0:A.steps,L=Sme(_,j),U=T.code===4,H=T.code!==0&&T.code!==4,Q=T.code===0&&(!T.data.workflow||!T.data.currentStep),x=j&&j===l,O=null,_&&!L&&(O=Nl.NOT_DATA_TYPE),U&&(O=Nl.HTTP_ISSUE),H&&(O=Nl.PROVIDER_ERROR),C&&(O=Nl.IS_PROCESSING),x&&(O=Nl.SAME_STEP),Q&&(O=Nl.DECODING_FAILED),O!==null&&(w=new kp({errorCode:O}),R=new vu({errorCode:hu.INTERNAL_ISSUE,underlyingBaseError:w}),d=R),k6e(JSON.stringify({nextStep:j,isDataType:L,isProcessingFiles:C})),!(L&&!x&&!C&&!U&&!H&&!Q)){V.next=23;break}return d=null,V.abrupt("return",T.data);case 23:return V.abrupt("return",null);case 24:case"end":return V.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),g=function(){return null},y.next=6,BD(f,g);case 6:if(M=y.sent,!d){y.next=9;break}return y.abrupt("return",{error:d});case 9:return y.abrupt("return",{sessionData:M});case 10:case"end":return y.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalStepAndStopProcess:function(o){var s=o||n().currentStepId;if(s){var l=n()._findStepById(s);l&&(n().workflowSessionCompletion({results:{finalStep:{id:l.id,name:l.name,final:l.final}}}),n().resetSession(),n().listener({eventType:hp.MESSAGE,message:vp.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Jl(Fi().mark(function s(l){var d,f,g,M,I,y,h,m,N,E,A,T;return Fi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(M=n().currentStepId,M){C.next=3;break}return C.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){C.next=7;break}return n().setFinalStepAndStopProcess(),C.abrupt("return");case 7:if(!(l instanceof ri)){C.next=13;break}return I=l,y=new vu({errorCode:hu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:I}),n().workflowSessionCompletion({error:y}),n().resetSession(),C.abrupt("return");case 13:return C.next=15,n()._pushStep(M,l);case 15:if(h=C.sent,!h.error){C.next=20;break}return n().workflowSessionCompletion({error:h.error}),n().resetSession(),C.abrupt("return");case 20:return C.next=22,n()._waitingForNextStep();case 22:if(m=C.sent,!m.error){C.next=27;break}return n().workflowSessionCompletion({error:m.error}),n().resetSession(),C.abrupt("return");case 27:if(N=(d=m.sessionData)===null||d===void 0?void 0:d.workflow,E=(f=m.sessionData)===null||f===void 0?void 0:f.currentStep,n().setWorkflow(N),n().setLayout(N.client.layout),n().setProcessingTemplate(N.client.steps),n().setSessionProperties((g=m.sessionData)===null||g===void 0?void 0:g.properties),A=n()._findStepById(E),T=function(L){return!!L&&Object.prototype.toString.call(L)==="[object Object]"&&L.templateId},!(A!=null&&A.final&&!T(A.client))){C.next=38;break}return n().setFinalStepAndStopProcess(A.id),C.abrupt("return");case 38:A!=null&&A.final&&T(A.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(E),n().setIsProcessing(!1);case 41:case"end":return C.stop()}},s)}));function o(s){return a.apply(this,arguments)}return o}(),onChangeScreen:function(o){if(!o)return e(function(){return{currentScreenConfig:null}});var s=n().workflow,l=n().sessionProperties,d=null;if(o===zE&&n().processingTransformedTemplate!==null){var f=n().processingTransformedTemplate;f&&(d={templateId:f.templateId,templateLayout:f.templateLayout,dataSource:null})}else{var g,M,I=n()._findStepById(o);if(typeof(I==null||(g=I.client)===null||g===void 0?void 0:g.templateId)=="string"){var y;d=_2(_2({},I==null?void 0:I.client),{},{templateId:I.client.templateId,dataSource:(y=I.dataSource)!==null&&y!==void 0?y:null,properties:l})}if(d){var h;d.sessionId=(h=n().currentSessionData)===null||h===void 0?void 0:h.sessionId,d.serviceToken=n().serviceToken}if(d&&xme(I==null||(M=I.client)===null||M===void 0?void 0:M.templateLayout)){var m=lH(I.client.templateLayout,n().layout);m&&(d.templateLayout=m)}}var N=jme(n().externalModules,s.steps,o);if(d===null||!N){var E=new vu({errorCode:hu.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:E}),e(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(o),e(function(){return{currentScreenConfig:d}})},deinitializationIdv:function(){var a=Jl(Fi().mark(function s(){var l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(l=n().wasmService)===null||l===void 0?void 0:l.shutdown();case 2:if(d=g.sent,n().resetWasmService(),n().externalModules.forEach(function(M){M.component.deinitialize&&M.component.isReady&&M.component.deinitialize()}),(d==null?void 0:d.code)!==0){g.next=7;break}return g.abrupt("return",{});case 7:return g.abrupt("return",{});case 8:case"end":return g.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),resetSession:function(){return e(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return e(function(){return{wasmService:null}})}}};function z6e(t){return EA.apply(this,arguments)}function EA(){return EA=Jl(Fi().mark(function t(e){var n,a,o,s,l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:n=[{id:a1.getIdentifier(),supportedTemplates:a1.getSupportedTemplates(),component:a1}],a=NA(NA({},kE.LIVENESS,function(){return Promise.resolve().then(()=>Iut)}),kE.DOC_READER,function(){return Promise.resolve().then(()=>$Pt)}),o=Fi().mark(function M(){var I,y,h;return Fi().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(I=l[s],y=function(){return a[I]()},!y){N.next=7;break}return N.next=5,y();case 5:h=N.sent,n.push({id:h.default.getIdentifier(),supportedTemplates:h.default.getSupportedTemplates(),component:h.default});case 7:case"end":return N.stop()}},M)}),s=0,l=e;case 4:if(!(s<l.length)){g.next=9;break}return g.delegateYield(o(),"t0",6);case 6:s++,g.next=4;break;case 9:return d=n.filter(function(M){return M!==null}),g.abrupt("return",d);case 11:case"end":return g.stop()}},t)})),EA.apply(this,arguments)}function x2(t){"@babel/helpers - typeof";return x2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x2(t)}function xte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function DA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xte(Object(n),!0).forEach(function(a){P6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function P6e(t,e,n){return(e=U6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U6e(t){var e=Y6e(t,"string");return x2(e)=="symbol"?e:e+""}function Y6e(t,e){if(x2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(x2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wa=j3e(function(){return DA(DA(DA({},Pme.apply(void 0,arguments)),eNe.apply(void 0,arguments)),R6e.apply(void 0,arguments))}),wte=function(e){var n=e.children;return vi.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function w2(t){"@babel/helpers - typeof";return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w2(t)}function bte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function Lte(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bte(Object(n),!0).forEach(function(a){$6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function $6e(t,e,n){return(e=Q6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q6e(t){var e=F6e(t,"string");return w2(e)=="symbol"?e:e+""}function F6e(t,e){if(w2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(w2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var H6e=function(){var e=wa(function(h){return h.currentScreenConfig}),n=wa(function(h){return h.pushStepWaitNextStepAndSet}),a=wa(function(h){return h.processingTransformedTemplate}),o=wa(function(h){return h.isProcessing}),s=wa(function(h){return h.setIsProcessing}),l=wa(function(h){return h.listener}),d=wa(function(h){return h.externalModules}),f=wa(function(h){return h.modulesConfig}),g=function(m,N){l({eventType:hp.MESSAGE,message:N,module:m})},M=function(m){s(m)},I=function(m){s(!1),n(m)},y=ht.useCallback(function(){if(!e)return null;var h=d.find(function(m){return m.supportedTemplates.includes(e.templateId)});if(h&&e)return vi.jsx(h.component,{perform:I,moduleProps:e,modulesConfig:f,idvEventListener:g,isProcessing:M})},[e,d]);return!e&&!a?vi.jsx(qE,{direction:_h.Ltr,children:vi.jsx(wte,{children:"Waiting for play... or process completed"})}):vi.jsx(vi.Fragment,{children:vi.jsx(qE,{direction:_h.Ltr,children:vi.jsxs(vi.Fragment,{children:[o&&vi.jsx(wte,{children:a?vi.jsx(a1,{perform:I,moduleProps:Lte(Lte({},a),{},{templateId:"PROGRESS"}),idvEventListener:g,isProcessing:M}):"Processing..."}),y()]})})})};function V6e(){return vi.jsx(ht.StrictMode,{children:vi.jsx(n3e,{children:vi.jsx(H6e,{})})})}function n0(t){"@babel/helpers - typeof";return n0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n0(t)}function B6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kte(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,zte(a.key),a)}}function G6e(t,e,n){return e&&kte(t.prototype,e),n&&kte(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z6e(t,e,n){return e=L2(e),W6e(t,jA()?Reflect.construct(e,[],L2(t).constructor):e.apply(t,n))}function W6e(t,e){if(e&&(n0(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K6e(t)}function K6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b2(t,e)}function TA(t){var e=typeof Map=="function"?new Map:void 0;return TA=function(a){if(a===null||!X6e(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(a))return e.get(a);e.set(a,o)}function o(){return J6e(a,arguments,L2(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),b2(o,a)},TA(t)}function J6e(t,e,n){if(jA())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,e);var o=new(t.bind.apply(t,a));return n&&b2(o,n.prototype),o}function jA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jA=function(){return!!t})()}function X6e(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(e){return typeof t=="function"}}function b2(t,e){return b2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},b2(t,e)}function L2(t){return L2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L2(t)}function Rte(t,e,n){return(e=zte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zte(t){var e=e_e(t,"string");return n0(e)=="symbol"?e:e+""}function e_e(t,e){if(n0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(n0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var t_e="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",Pte=function(t){function e(){var n;return B6e(this,e),n=Z6e(this,e),Rte(n,"_root",Ave.createRoot(n.attachShadow({mode:"open"}))),Rte(n,"_mounted",!1),n}return q6e(e,t),G6e(e,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.151-nightly".trim())}},{key:"render",value:function(){this._root.render(vi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[vi.jsx("style",{nonce:wa.getState().getNonce(),children:t_e}),vi.jsx(V6e,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),mA.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(TA(HTMLElement));function t4(t){"@babel/helpers - typeof";return t4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t4(t)}function sl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */sl=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,w,R){return Object.defineProperty(x,O,{value:w,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(w,R,Y){return w[R]=Y}}function g(x,O,w,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,w,new H(R||[])),!0),V}function M(x,O,w){try{return{type:"normal",arg:x.call(O,w)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(N=A);var T=m.prototype=y.prototype=Object.create(N);function j(x){["next","throw","return"].forEach(function(O){f(x,O,function(w){return this._invoke(O,w)})})}function C(x,O){function w(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&t4(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){w("next",k,q,te)},function(k){w("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return w("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){w(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var w=O.method,R=x.i[w];if(R===t)return O.delegate=null,w==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||w!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+w+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function Q(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,R=function Y(){for(;++w<x.length;)if(a.call(x,w))return Y.value=x[w],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(t4(x)+" is not iterable")}return h.prototype=m,f(T,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(T),x},e.awrap=function(x){return{__await:x}},j(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,w,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,w,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},j(T),f(T,d,"Generator"),f(T,s,function(){return this}),f(T,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),w=[];for(var R in O)w.unshift(R);return function Y(){for(;w.length;)if((R=w.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=Q,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!O)for(var w in this)w.charAt(0)==="t"&&a.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var w=this;function R(K){q.type="throw",q.arg=O,w.next=K}for(var Y=w.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,w){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=w&&w<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=w,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,w){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&w&&(this.next=w),I},finish:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var R=this.tryEntries[w];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,w,R){return this.delegate={i:Q(O),r:w,n:R},this.method==="next"&&(this.arg=t),I}},e}function Ute(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function i0(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Ute(s,a,o,l,d,"next",f)}function d(f){Ute(s,a,o,l,d,"throw",f)}l(void 0)})}}function r_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n_e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a_e(a.key),a)}}function i_e(t,e,n){return e&&n_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function a_e(t){var e=o_e(t,"string");return t4(e)=="symbol"?e:e+""}function o_e(t,e){if(t4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(t4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var u_e=function(){function t(){r_e(this,t)}return i_e(t,[{key:"initialize",value:function(){var e=i0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=wa.getState().initialize(o),d.abrupt("return",s);case 2:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"configure",value:function(){var e=i0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof o=="string"){f.next=5;break}return f.next=3,wa.getState().configure(o);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,wa.getState().configureWithUrl(o);case 7:return l=f.sent,f.abrupt("return",l);case 9:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var e=i0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,wa.getState().getWorkflows(o);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var e=i0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=o.workflowId,f.next=3,wa.getState().prepareWorkflowAndPrepareUi(s);case 3:return l=f.sent,f.abrupt("return",l);case 5:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var e=i0(sl().mark(function a(o){var s,l,d,f;return sl().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return s=o==null?void 0:o.locale,l=o==null?void 0:o.metadata,d=Lme(s),M.next=5,wa.getState().startNewSession(d,l);case 5:if(f=M.sent,!f.error){M.next=8;break}return M.abrupt("return",f);case 8:return M.abrupt("return",new Promise(function(I){var y=function(m){I(m)};wa.getState().playWorkflow(y)}));case 9:case"end":return M.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var e=i0(sl().mark(function a(){var o;return sl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,wa.getState().deinitialize();case 2:return o=l.sent,l.abrupt("return",o);case 4:case"end":return l.stop()}},a)}));function n(){return e.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.151-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){wa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}wa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){wa.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return wa.getState().getCurrentSessionId()}}])}(),s_e=window.customElements.get("idv-flow");s_e||window.customElements.define("idv-flow",Pte);var l_e=Object.defineProperty,c_e=Object.defineProperties,f_e=Object.getOwnPropertyDescriptors,Yte=Object.getOwnPropertySymbols,d_e=Object.prototype.hasOwnProperty,g_e=Object.prototype.propertyIsEnumerable,$te=(t,e,n)=>e in t?l_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SA=(t,e)=>{for(var n in e||(e={}))d_e.call(e,n)&&$te(t,n,e[n]);if(Yte)for(var n of Yte(e))g_e.call(e,n)&&$te(t,n,e[n]);return t},M_e=(t,e)=>c_e(t,f_e(e)),bo=(t,e,n)=>new Promise((a,o)=>{var s=f=>{try{d(n.next(f))}catch(g){o(g)}},l=f=>{try{d(n.throw(f))}catch(g){o(g)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,l);d((n=n.apply(t,e)).next())}),Qte=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Fte(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hte={exports:{}},k2={},Vte={exports:{}},rn={},Bte;function p_e(){if(Bte)return rn;Bte=1;/**
|
|
86
86
|
* @license React
|
|
87
87
|
* react.production.min.js
|
|
88
88
|
*
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as e, b as s, I as i, g as n, c as t, a as E, d as v, P as I, S as d, e as S, f as c, W as l } from "./index-
|
|
1
|
+
import { C as a, D as e, b as s, I as i, g as n, c as t, a as E, d as v, P as I, S as d, e as S, f as c, W as l } from "./index-9QN4tdvS.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED