@regulaforensics/idv-capture-web 2.3.130-nightly → 2.3.131-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.
|
@@ -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-D1mdtdde.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) => {
|
|
@@ -80850,7 +80850,7 @@ var yd = Ph_.create("wasm_idv"), cwe = /* @__PURE__ */ function() {
|
|
|
80850
80850
|
return po().wrap(function(R) {
|
|
80851
80851
|
for (; ; ) switch (R.prev = R.next) {
|
|
80852
80852
|
case 0:
|
|
80853
|
-
return R.prev = 1, R.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-
|
|
80853
|
+
return R.prev = 1, R.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-0ee1322f4//PlatformAdaptor.worker.js");
|
|
80854
80854
|
case 4:
|
|
80855
80855
|
return m = R.sent, R.next = 7, m.blob();
|
|
80856
80856
|
case 7:
|
|
@@ -80877,7 +80877,7 @@ var yd = Ph_.create("wasm_idv"), cwe = /* @__PURE__ */ function() {
|
|
|
80877
80877
|
}), R.next = 23, this.sendMessage({
|
|
80878
80878
|
target: "worker-init",
|
|
80879
80879
|
URL: document.URL,
|
|
80880
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-
|
|
80880
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-0ee1322f4/",
|
|
80881
80881
|
preMain: !0
|
|
80882
80882
|
});
|
|
80883
80883
|
case 23:
|
|
@@ -82168,9 +82168,9 @@ function ap_() {
|
|
|
82168
82168
|
supportedTemplates: lv.getSupportedTemplates(),
|
|
82169
82169
|
component: lv
|
|
82170
82170
|
}], h = np_(np_({}, YL_.LIVENESS, function() {
|
|
82171
|
-
return import("./index-
|
|
82171
|
+
return import("./index-Dshuacu2.js");
|
|
82172
82172
|
}), YL_.DOC_READER, function() {
|
|
82173
|
-
return import("./index-
|
|
82173
|
+
return import("./index-B6tccJe4.js");
|
|
82174
82174
|
}), m = /* @__PURE__ */ ju().mark(function F() {
|
|
82175
82175
|
var j, E, N;
|
|
82176
82176
|
return ju().wrap(function(K) {
|
|
@@ -82488,7 +82488,7 @@ var Cwe = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;m
|
|
|
82488
82488
|
}, {
|
|
82489
82489
|
key: "version",
|
|
82490
82490
|
get: function() {
|
|
82491
|
-
return "".concat("2.3.
|
|
82491
|
+
return "".concat("2.3.131-nightly".trim());
|
|
82492
82492
|
}
|
|
82493
82493
|
}, {
|
|
82494
82494
|
key: "render",
|
|
@@ -82958,7 +82958,7 @@ var jwe = /* @__PURE__ */ function() {
|
|
|
82958
82958
|
key: "version",
|
|
82959
82959
|
get: function() {
|
|
82960
82960
|
var u;
|
|
82961
|
-
return (u = "2.3.
|
|
82961
|
+
return (u = "2.3.131-nightly") !== null && u !== void 0 ? u : "Version unavailable. Something went wrong";
|
|
82962
82962
|
}
|
|
82963
82963
|
}, {
|
|
82964
82964
|
key: "setNonce",
|
|
@@ -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-D1mdtdde.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
|
@@ -200,7 +200,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
200
200
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QI_(r,a){if(r){if(typeof r=="string")return AVe(r,a);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?AVe(r,a):void 0}}function AVe(r,a){(a==null||a>r.length)&&(a=r.length);for(var i=0,u=Array(a);i<a;i++)u[i]=r[i];return u}function WI_(r,a){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var u,p,g,w,L=[],y=!0,v=!1;try{if(g=(i=i.call(r)).next,a!==0)for(;!(y=(u=g.call(i)).done)&&(L.push(u.value),L.length!==a);y=!0);}catch(M){v=!0,p=M}finally{try{if(!y&&i.return!=null&&(w=i.return(),Object(w)!==w))return}finally{if(v)throw p}}return L}}function YI_(r){if(Array.isArray(r))return r}var JI_=function(r){var a=r.option,i=r.layout,u=r.dataSourceQuestion,p=r.register,g=r.watch,w=cr.useState(!1),L=UI_(w,2),y=L[0],v=L[1],M=xVe(),C=String(u.id),q=g(C),D=q===String(a.id),j=i.option,E=i.optionSelected,z={borderRadius:j.cornerRadius,background:j.backgroundColor,borderColor:j.borderColor,borderWidth:j.borderWidth},Y={borderRadius:E.cornerRadius,background:E.backgroundColor,borderColor:E.borderColor,borderWidth:E.borderWidth},Z=y&&M?{outline:"2px solid ".concat(_z)}:{};return Ye.jsx("div",{style:{display:"flex",flexGrow:1},children:Ye.jsxs("label",{style:RVe(RVe({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},D?Y:z),Z),children:[Ye.jsx("input",Qc(Rr({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},p(C,{required:!!u.required,validate:hA(u.validators,!!u.required)})),{value:a.id,type:"radio",onFocus:function(){return v(!0)},onBlur:function(){return v(!1)}})),Ye.jsx(x2,Qc(Rr({},D?E.title:j.title),{text:a.text}))]})},a.id)},KI_=function(r){var a=r.layout,i=r.watch,u=r.register,p=r.dataSourceQuestion;return Ye.jsx("div",{style:{boxSizing:"border-box"},children:Ye.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[a.title&&Ye.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:Ye.jsx(x2,Qc(Rr({},a.title),{text:p.text}))}),Ye.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:p.options.map(function(g){return Ye.jsx(JI_,{register:u,watch:i,layout:a,option:g,dataSourceQuestion:p},g.id)})})]})})};function Sz(r){"@babel/helpers - typeof";return Sz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Sz(r)}function jVe(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function jae(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?jVe(Object(i),!0).forEach(function(u){XI_(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):jVe(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function XI_(r,a,i){return(a=e4_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function e4_(r){var a=_4_(r,"string");return Sz(a)=="symbol"?a:a+""}function _4_(r,a){if(Sz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(Sz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}var t4_=function(r){var a=r.children,i=r.backgroundColor,u=i===void 0?"transparent":i,p=r.cornerRadius,g=p===void 0?0:p,w=r.isError,L=r.isRequired,y=r.validationBorderColor,v=r.validationBorderWidth,M=jae({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:u,borderRadius:g,padding:"16px",boxSizing:"border-box",height:"auto"},w&&jae(jae({},y&&{borderColor:y,borderStyle:"solid"}),v&&{borderWidth:v}));return Ye.jsxs("div",{style:M,children:[L&&Ye.jsx("span",{style:{color:y!=null?y:void 0,position:"absolute",left:"6px",top:"18px"},children:"*"}),a]})};function r4_(r,a){return i4_(r)||s4_(r,a)||a4_(r,a)||n4_()}function n4_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
201
201
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a4_(r,a){if(r){if(typeof r=="string")return EVe(r,a);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?EVe(r,a):void 0}}function EVe(r,a){(a==null||a>r.length)&&(a=r.length);for(var i=0,u=Array(a);i<a;i++)u[i]=r[i];return u}function s4_(r,a){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var u,p,g,w,L=[],y=!0,v=!1;try{if(g=(i=i.call(r)).next,a!==0)for(;!(y=(u=g.call(i)).done)&&(L.push(u.value),L.length!==a);y=!0);}catch(M){v=!0,p=M}finally{try{if(!y&&i.return!=null&&(w=i.return(),Object(w)!==w))return}finally{if(v)throw p}}return L}}function i4_(r){if(Array.isArray(r))return r}var o4_=function(r){var a=r.validationErrorsTypes,i=r.title;return a?Ye.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(a).map(function(u){var p=r4_(u,2),g=p[0],w=p[1];return Ye.jsx(x2,Qc(Rr({},i),{text:w}),g)})}):null},c4_=function(r){var a,i,u,p,g,w,L,y,v,M,C,q,D,j,E=r.layout,z=r.dataSourceQuestion,Y=r.register,Z=String(z.id),H=function(G){return G?G===wH.EMAIL?"email":G===wH.FREE_TEXT?"text":G===wH.NUMBER?"number":G===wH.SECURE?"password":"text":"text"};return Ye.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[Ye.jsx(x2,Qc(Rr({},E.title),{text:z.text,htmlFor:Z})),Ye.jsx("input",Qc(Rr({},Y(Z,{required:!!z.required,validate:hA(z.validators,!!z.required)})),{id:Z,type:H((a=E.textField)===null||a===void 0?void 0:a.inputType),style:{fontFamily:(i=E==null||(u=E.textField)===null||u===void 0?void 0:u.fontName)!==null&&i!==void 0?i:"sans-serif",fontSize:(p=E==null||(g=E.textField)===null||g===void 0?void 0:g.fontSize)!==null&&p!==void 0?p:15,color:(w=E==null||(L=E.textField)===null||L===void 0?void 0:L.fontColor)!==null&&w!==void 0?w:"black",height:"42px",borderWidth:(y=E==null||(v=E.textField)===null||v===void 0?void 0:v.borderWidth)!==null&&y!==void 0?y:1,borderColor:(M=E==null||(C=E.textField)===null||C===void 0?void 0:C.borderColor)!==null&&M!==void 0?M:"#d9d9d9",borderStyle:"solid",borderRadius:(q=E==null||(D=E.textField)===null||D===void 0?void 0:D.cornerRadius)!==null&&q!==void 0?q:8,padding:"11px",boxSizing:"border-box",outlineColor:_z},placeholder:(j=z.placeholder)!==null&&j!==void 0?j:"","data-id":Z}))]})},u4_=function(r){var a,i,u,p,g,w,L,y,v,M,C,q=r.layout,D=r.dataSourceQuestion,j=r.register,E=String(D.id);return Ye.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[Ye.jsx(x2,Qc(Rr({},q.title),{text:D.text,htmlFor:E})),Ye.jsx("textarea",Qc(Rr({},j(E,{required:!!D.required,validate:hA(D.validators,!!D.required)})),{id:E,placeholder:(a=D.placeholder)!==null&&a!==void 0?a:"",onChange:function(z){z.target.style.height="auto",z.target.style.height="".concat(z.target.scrollHeight-15,"px")},"data-id":E,style:{fontFamily:"sans-serif",fontSize:(i=q==null||(u=q.textField)===null||u===void 0?void 0:u.fontSize)!==null&&i!==void 0?i:15,color:(p=q==null||(g=q.textField)===null||g===void 0?void 0:g.fontColor)!==null&&p!==void 0?p:"black",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(w=q==null||(L=q.textField)===null||L===void 0?void 0:L.borderWidth)!==null&&w!==void 0?w:1,borderColor:(y=q==null||(v=q.textField)===null||v===void 0?void 0:v.borderColor)!==null&&y!==void 0?y:"#d9d9d9",borderStyle:"solid",borderRadius:(M=q==null||(C=q.textField)===null||C===void 0?void 0:C.cornerRadius)!==null&&M!==void 0?M:8,padding:"11px",boxSizing:"border-box",outlineColor:_z}}))]})},NVe={},Eae,VVe;function zVe(){if(VVe)return Eae;VVe=1;var r=nl(),a=PS(),i=Rw(),u=xd(),p=YV(),g=ZV(),w=Function,L=r([].concat),y=r([].join),v={},M=function(C,q,D){if(!u(v,q)){for(var j=[],E=0;E<q;E++)j[E]="a["+E+"]";v[q]=w("C,a","return new C("+y(j,",")+")")}return v[q](C,D)};return Eae=g?w.bind:function(C){var q=a(this),D=q.prototype,j=p(arguments,1),E=function(){var z=L(j,p(arguments));return this instanceof E?M(q,z.length,z):q.apply(C,z)};return i(D)&&(E.prototype=D),E},Eae}var FVe;function l4_(){if(FVe)return NVe;FVe=1;var r=Ai(),a=zVe();return r({target:"Function",proto:!0,forced:Function.bind!==a},{bind:a}),NVe}l4_();var BVe={},ZVe;function f4_(){if(ZVe)return BVe;ZVe=1;var r=Ai(),a=Sl(),i=qS();return r({target:"Object",stat:!0,sham:!a},{create:i}),BVe}f4_();var HVe={},UVe;function p4_(){if(UVe)return HVe;UVe=1;var r=Ai(),a=Ec(),i=Yb(),u=WV(),p=QTe(),g=a(function(){u(1)});return r({target:"Object",stat:!0,forced:g,sham:!p},{getPrototypeOf:function(w){return u(i(w))}}),HVe}p4_();var GVe={},QVe;function d4_(){if(QVe)return GVe;QVe=1;var r=Sl(),a=lM(),i=Rw(),u=nDe(),p=Yb(),g=ix(),w=Object.getPrototypeOf,L=Object.setPrototypeOf,y=Object.prototype,v="__proto__";if(r&&w&&L&&!(v in y))try{a(y,v,{configurable:!0,get:function(){return w(p(this))},set:function(M){var C=g(this);u(M)&&i(C)&&L(C,M)}})}catch(M){}return GVe}d4_();var WVe={},YVe;function h4_(){if(YVe)return WVe;YVe=1;var r=Ai(),a=iH();return r({target:"Object",stat:!0},{setPrototypeOf:a}),WVe}h4_();var JVe={},Nae,KVe;function g4_(){if(KVe)return Nae;KVe=1;var r=uH(),a=UV(),i=TypeError;return Nae=function(u){if(r(u))return u;throw new i(a(u)+" is not a constructor")},Nae}var XVe;function w4_(){if(XVe)return JVe;XVe=1;var r=Ai(),a=h6(),i=sH(),u=zVe(),p=g4_(),g=lh(),w=Rw(),L=qS(),y=Ec(),v=a("Reflect","construct"),M=Object.prototype,C=[].push,q=y(function(){function E(){}return!(v(function(){},[],E)instanceof E)}),D=!y(function(){v(function(){})}),j=q||D;return r({target:"Reflect",stat:!0,forced:j,sham:j},{construct:function(E,z){p(E),g(z);var Y=arguments.length<3?E:p(arguments[2]);if(D&&!q)return v(E,z,Y);if(E===Y){switch(z.length){case 0:return new E;case 1:return new E(z[0]);case 2:return new E(z[0],z[1]);case 3:return new E(z[0],z[1],z[2]);case 4:return new E(z[0],z[1],z[2],z[3])}var Z=[null];return i(C,Z,z),new(i(u,E,Z))}var H=Y.prototype,G=L(w(H)?H:M),ee=i(E,G,z);return w(ee)?ee:G}}),JVe}w4_();var eze={},_ze;function $4_(){if(_ze)return eze;_ze=1;var r=Ai(),a=Ec(),i=oA(),u=Rw(),p=Yb(),g=ox(),w=FRe(),L=XV(),y=QDe(),v=fH(),M=ap(),C=cte(),q=M("isConcatSpreadable"),D=C>=51||!a(function(){var z=[];return z[q]=!1,z.concat()[0]!==z}),j=function(z){if(!u(z))return!1;var Y=z[q];return Y!==void 0?!!Y:i(z)},E=!D||!v("concat");return r({target:"Array",proto:!0,arity:1,forced:E},{concat:function(z){var Y=p(this),Z=y(Y,0),H=0,G,ee,se,ge,Ie;for(G=-1,se=arguments.length;G<se;G++)if(Ie=G===-1?Y:arguments[G],j(Ie))for(ge=g(Ie),w(H+ge),ee=0;ee<ge;ee++,H++)ee in Ie&&L(Z,H,Ie[ee]);else w(H+1),L(Z,H++,Ie);return Z.length=H,Z}}),eze}$4_();function kz(r){"@babel/helpers - typeof";return kz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},kz(r)}function m4_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function tze(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,rze(u.key),u)}}function y4_(r,a,i){return a&&tze(r.prototype,a),i&&tze(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function AS(r,a,i){return(a=rze(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function rze(r){var a=L4_(r,"string");return kz(a)=="symbol"?a:a+""}function L4_(r,a){if(kz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(kz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var nze=function(){function r(a){var i=a.errorCode,u=a.errorCodeKey,p=a.message,g=a.underlyingError,w=a.underlyingBaseError,L=a.domain,y=a.module,v=a.errorEnumName,M=a.shortDomainCode;m4_(this,r),AS(this,"errorCode",void 0),AS(this,"errorCodeKey",void 0),AS(this,"message",void 0),AS(this,"underlyingError",void 0),AS(this,"underlyingBaseError",void 0),AS(this,"domain",void 0),AS(this,"module",void 0),AS(this,"errorEnumName",void 0),AS(this,"shortDomainCode",void 0),this.errorCode=i,this.errorCodeKey=u,this.message=p,this.underlyingError=g,this.underlyingBaseError=w,this.module=y,this.domain=L,this.errorEnumName=v,this.shortDomainCode=M}return y4_(r,[{key:"lastUnderlyingError",get:function(){for(var a,i=this.underlyingBaseError;((u=i)===null||u===void 0?void 0:u.underlyingBaseError)instanceof r;){var u;i=i.underlyingBaseError}return(a=i)===null||a===void 0?void 0:a.underlyingError}},{key:"toObject",value:function(){var a={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 r&&(a.underlyingBaseError=this.underlyingBaseError.toObject()),a}},{key:"shortChain",get:function(){var a="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof r&&(a+="-".concat(this.underlyingBaseError.shortChain)),a}},{key:"fullChain",get:function(){var a="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof r&&(a+="-".concat(this.underlyingBaseError.fullChain)),a}}],[{key:"getErrorKey",value:function(a,i){var u=Object.keys(i).find(function(p){return i[p]===a});if(!u)throw new Error("Invalid errorCode: ".concat(a," in enum"));return u}}])}();function gA(r){"@babel/helpers - typeof";return gA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},gA(r)}function I4_(r,a,i){return Object.defineProperty(r,"prototype",{writable:!1}),r}function v4_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function b4_(r,a,i){return a=QH(a),O4_(r,aze()?Reflect.construct(a,i||[],QH(r).constructor):a.apply(r,i))}function O4_(r,a){if(a&&(gA(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S4_(r)}function S4_(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function aze(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(aze=function(){return!!r})()}function QH(r){return QH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},QH(r)}function k4_(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(a&&a.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),a&&Vae(r,a)}function Vae(r,a){return Vae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,u){return i.__proto__=u,i},Vae(r,a)}function zae(r,a,i){return(a=M4_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function M4_(r){var a=P4_(r,"string");return gA(a)=="symbol"?a:a+""}function P4_(r,a){if(gA(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(gA(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}var WH=function(r){function a(i){var u=i.errorCode,p=i.message,g=i.underlyingError,w=i.underlyingBaseError;v4_(this,a);var L=nze.getErrorKey(u,Kje);return b4_(this,a,[{errorCode:u,errorCodeKey:L,errorEnumName:a.ERROR_ENUM_NAME,module:a.MODULE,message:p,underlyingError:g,underlyingBaseError:w,domain:a.ERROR_ENUM_NAME,shortDomainCode:a.SHORT_CODE}])}return k4_(a,r),I4_(a)}(nze);zae(WH,"MODULE",Yne),zae(WH,"ERROR_ENUM_NAME","GuiModuleError"),zae(WH,"SHORT_CODE","GM");var x4_=function(r){var a=r.header,i=r.title,u=r.buttons,p=r.footer,g=r.questions,w=r.dataSource,L=r.backgroundColor,y=Cre(),v=y.perform,M=m2_({criteriaMode:"all"}),C=M.register,q=M.handleSubmit,D=M.formState.errors,j=M.reset,E=M.watch,z=M.control,Y=function(Z){v(_m_(Z)),j()};return Ye.jsx(sz,{header:a,footer:p,backgroundColor:L,children:Ye.jsxs("form",{onSubmit:q(Y),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[Ye.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:g.backgroundColor||"transparent"},children:[i&&Ye.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:Ye.jsx(x2,Rr({},i))}),Ye.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:w.questions.map(function(Z){var H,G=w.static,ee=function(_e,ae){return ae.find(function(le){var $e;if(($e=le.questionIds)!==null&&$e!==void 0&&$e.length)return le.questionIds.find(function(Pe){return _e===Pe})})},se=function(_e,ae){return ae.find(function(le){return!le.questionIds&&le.answerType===_e})},ge=G?ee(String(Z.id),g.itemTypes)||se(Z.answerType,g.itemTypes):g.itemTypes.find(function(_e){return _e.answerType===Z.answerType});if(!ge){var Ie=new WH({errorCode:Kje.DECODING_FAILED,message:"The question template has not been found"});v(Ie);return}var ye=ge==null?void 0:ge.displayType,ne=Z.id in D&&((H=D[Z.id])===null||H===void 0?void 0:H.types);return Ye.jsxs(cr.Fragment,{children:[Ye.jsxs(t4_,{backgroundColor:ge==null?void 0:ge.backgroundColor,cornerRadius:ge==null?void 0:ge.cornerRadius,isError:!!ne,isRequired:Z.required,validationBorderColor:ge==null?void 0:ge.validationBorderColor,validationBorderWidth:ge==null?void 0:ge.validationBorderWidth,children:[ye===cA.TEXT_EXPANDABLE&&Ye.jsx(u4_,{layout:ge,dataSourceQuestion:Z,register:C}),ye===cA.TEXT_SINGLE_LINE&&Ye.jsx(c4_,{layout:ge,dataSourceQuestion:Z,register:C}),ye===cA.SELECTOR_OPTIONS&&Ye.jsx(FI_,{layout:ge,dataSourceQuestion:Z,watch:E,register:C}),ye===cA.SELECTOR_BUTTONS&&Ye.jsx(KI_,{layout:ge,dataSourceQuestion:Z,watch:E,register:C}),ye===cA.SELECTOR_DROPDOWN&&Ye.jsx(hI_,{control:z,layout:ge,dataSourceQuestion:Z}),ye===cA.MULTI_SELECTOR_DROPDOWN&&Ye.jsx(kI_,{control:z,layout:ge,dataSourceQuestion:Z})]}),ne&&Ye.jsx(o4_,{validationErrorsTypes:ne,title:ge.validationMessage})]},Z.id)})})]}),!!(u!=null&&u.length)&&Ye.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:u.map(function(Z,H){return Ye.jsx(eEe,Rr({dataTestId:"question-button"},Z),H)})})]})})},sze=function(r){var a=r.templateId,i=r.templateLayout,u=r.dataSource;return!a||!i?Ye.jsx(oEe,{}):a===fM.STATUS?Ye.jsx(Om_,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,buttons:i==null?void 0:i.buttons,backgroundColor:i==null?void 0:i.backgroundColor}):a===fM.INFO?Ye.jsx(qm_,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,description:i==null?void 0:i.description,buttons:i==null?void 0:i.buttons,backgroundColor:i==null?void 0:i.backgroundColor}):a===fM.PROGRESS?Ye.jsx(oEe,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,progressView:i==null?void 0:i.progressView,backgroundColor:i==null?void 0:i.backgroundColor}):a===fM.INFO_DETAILS?Ye.jsx(Gm_,{header:i==null?void 0:i.header,title:i==null?void 0:i.title,details:i==null?void 0:i.details,buttons:i==null?void 0:i.buttons,footer:i==null?void 0:i.footer,backgroundColor:i==null?void 0:i.backgroundColor}):u&&u!==null&&u!==void 0&&u.questions.length&&a===fM.QUESTIONS?Ye.jsx(x4_,{dataSource:u,questions:i.questions,header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,title:i==null?void 0:i.title,buttons:i==null?void 0:i.buttons,backgroundColor:i==null?void 0:i.backgroundColor}):a===fM.QUESTIONS&&!u?Ye.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"}):Ye.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},Fae=!1,I6=function(r){var a=r.moduleProps,i=r.perform,u=a,p=u.templateId,g=u.templateLayout,w=u.dataSource,L=function(y){i&&i(y)};return p===fM.QUESTIONS?Ye.jsx(ODe,{perform:L,children:Ye.jsx(sze,{dataSource:w,templateId:p,templateLayout:g})}):Ye.jsx(ODe,{perform:L,children:Ye.jsx(sze,{templateId:p,templateLayout:g})})};I6.getIdentifier=function(){return Yne},I6.getSupportedTemplates=function(){return Object.values(fM)},I6.deinitialize=function(){Fae=!1},I6.initialize=function(){Fae=!0},I6.isReady=function(){return Fae},I6.displayName=Yne;var ize={},oze;function q4_(){if(oze)return ize;oze=1;var r=Bn(),a=co(),i=Date,u=a(i.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return u(new i)}}),ize}q4_();var cze={},uze={},Bae,lze;function fze(){if(lze)return Bae;lze=1;var r=oo(),a=Wl(),i=bu(),u=M2(),p=a("iterator");return Bae=!r(function(){var g=new URL("b?a=1&b=2&c=3","https://a"),w=g.searchParams,L=new URLSearchParams("a=1&a=2&b=3"),y="";return g.pathname="c%20d",w.forEach(function(v,M){w.delete("b"),y+=M+v}),L.delete("a",2),L.delete("b",void 0),u&&(!g.toJSON||!L.has("a",1)||L.has("a",2)||!L.has("a",void 0)||L.has("b"))||!w.size&&(u||!i)||!w.sort||g.href!=="https://a/c%20d?a=1&c=3"||w.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!w[p]||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"||y!=="a1c3"||new URL("https://x",void 0).host!=="x"}),Bae}var Zae,pze;function C4_(){if(pze)return Zae;pze=1;var r=bu(),a=co(),i=Gl(),u=oo(),p=zZ(),g=NZ(),w=PJ(),L=A0(),y=oV(),v=Object.assign,M=Object.defineProperty,C=a([].concat);return Zae=!v||u(function(){if(r&&v({b:1},v(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var q={},D={},j=Symbol("assign detection"),E="abcdefghijklmnopqrst";return q[j]=7,E.split("").forEach(function(z){D[z]=z}),v({},q)[j]!==7||p(v({},D)).join("")!==E})?function(D,j){for(var E=L(D),z=arguments.length,Y=1,Z=g.f,H=w.f;z>Y;)for(var G=y(arguments[Y++]),ee=Z?C(p(G),Z(G)):p(G),se=ee.length,ge=0,Ie;se>ge;)Ie=ee[ge++],(!r||i(H,G,Ie))&&(E[Ie]=G[Ie]);return E}:v,Zae}var Hae,dze;function T4_(){if(dze)return Hae;dze=1;var r=co(),a=2147483647,i=36,u=1,p=26,g=38,w=700,L=72,y=128,v="-",M=/[^\0-\u007E]/,C=/[.\u3002\uFF0E\uFF61]/g,q="Overflow: input needs wider integers to process",D=i-u,j=RangeError,E=r(C.exec),z=Math.floor,Y=String.fromCharCode,Z=r("".charCodeAt),H=r([].join),G=r([].push),ee=r("".replace),se=r("".split),ge=r("".toLowerCase),Ie=function(ae){for(var le=[],$e=0,Pe=ae.length;$e<Pe;){var Ee=Z(ae,$e++);if(Ee>=55296&&Ee<=56319&&$e<Pe){var r_=Z(ae,$e++);(r_&64512)===56320?G(le,((Ee&1023)<<10)+(r_&1023)+65536):(G(le,Ee),$e--)}else G(le,Ee)}return le},ye=function(ae){return ae+22+75*(ae<26)},ne=function(ae,le,$e){var Pe=0;for(ae=$e?z(ae/w):ae>>1,ae+=z(ae/le);ae>D*p>>1;)ae=z(ae/D),Pe+=i;return z(Pe+(D+1)*ae/(ae+g))},_e=function(ae){var le=[];ae=Ie(ae);var $e=ae.length,Pe=y,Ee=0,r_=L,ue,De;for(ue=0;ue<ae.length;ue++)De=ae[ue],De<128&&G(le,Y(De));var Be=le.length,re=Be;for(Be&&G(le,v);re<$e;){var Re=a;for(ue=0;ue<ae.length;ue++)De=ae[ue],De>=Pe&&De<Re&&(Re=De);var f_=re+1;if(Re-Pe>z((a-Ee)/f_))throw new j(q);for(Ee+=(Re-Pe)*f_,Pe=Re,ue=0;ue<ae.length;ue++){if(De=ae[ue],De<Pe&&++Ee>a)throw new j(q);if(De===Pe){for(var g_=Ee,o_=i;;){var z_=o_<=r_?u:o_>=r_+p?p:o_-r_;if(g_<z_)break;var ce=g_-z_,s_=i-z_;G(le,Y(ye(z_+ce%s_))),g_=z(ce/s_),o_+=i}G(le,Y(ye(g_))),r_=ne(Ee,f_,re===Be),Ee=0,re++}}Ee++,Pe++}return H(le,"")};return Hae=function(ae){var le=[],$e=se(ee(ge(ae),C,"."),"."),Pe,Ee;for(Pe=0;Pe<$e.length;Pe++)Ee=$e[Pe],G(le,E(M,Ee)?"xn--"+_e(Ee):Ee);return H(le,".")},Hae}var hze={},gze;function D4_(){if(gze)return hze;gze=1;var r=Bn(),a=co(),i=PK(),u=RangeError,p=String.fromCharCode,g=String.fromCodePoint,w=a([].join),L=!!g&&g.length!==1;return r({target:"String",stat:!0,arity:1,forced:L},{fromCodePoint:function(v){for(var M=[],C=arguments.length,q=0,D;C>q;){if(D=+arguments[q++],i(D,1114111)!==D)throw new u(D+" is not a valid code point");M[q]=D<65536?p(D):p(((D-=65536)>>10)+55296,D%1024+56320)}return w(M,"")}}),hze}var Uae,wze;function R4_(){if(wze)return Uae;wze=1;var r=iM(),a=Math.floor,i=function(u,p){var g=u.length;if(g<8)for(var w=1,L,y;w<g;){for(y=w,L=u[w];y&&p(u[y-1],L)>0;)u[y]=u[--y];y!==w++&&(u[y]=L)}else for(var v=a(g/2),M=i(r(u,0,v),p),C=i(r(u,v),p),q=M.length,D=C.length,j=0,E=0;j<q||E<D;)u[j+E]=j<q&&E<D?p(M[j],C[E])<=0?M[j++]:C[E++]:j<q?M[j++]:C[E++];return u};return Uae=i,Uae}var Gae,$ze;function mze(){if($ze)return Gae;$ze=1,FX(),D4_();var r=Bn(),a=oc(),i=xxe(),u=k2(),p=Gl(),g=co(),w=bu(),L=fze(),y=Ug(),v=a6(),M=cee(),C=Ub(),q=Zke(),D=r6(),j=XR(),E=Ql(),z=Fp(),Y=oM(),Z=dV(),H=Hf(),G=n1(),ee=C$(),se=n6(),ge=YP(),Ie=_ee(),ye=HZ(),ne=mV(),_e=eA(),ae=Wl(),le=R4_(),$e=ae("iterator"),Pe="URLSearchParams",Ee=Pe+"Iterator",r_=D.set,ue=D.getterFor(Pe),De=D.getterFor(Ee),Be=i("fetch"),re=i("Request"),Re=i("Headers"),f_=re&&re.prototype,g_=Re&&Re.prototype,o_=a.TypeError,z_=a.encodeURIComponent,ce=String.fromCharCode,s_=u("String","fromCodePoint"),rt=parseInt,It=g("".charAt),Ct=g([].join),jt=g([].push),Gt=g("".replace),vt=g([].shift),fr=g([].splice),ar=g("".split),Dt=g("".slice),U=g(/./.exec),mt=/\+/g,gr="�",Ge=/^[0-9a-f]+$/i,v_=function(k_,K_){var nt=Dt(k_,K_,K_+2);return U(Ge,nt)?rt(nt,16):NaN},D_=function(k_){for(var K_=0,nt=128;nt>0&&(k_&nt)!==0;nt>>=1)K_++;return K_},bt=function(k_){var K_=null;switch(k_.length){case 1:K_=k_[0];break;case 2:K_=(k_[0]&31)<<6|k_[1]&63;break;case 3:K_=(k_[0]&15)<<12|(k_[1]&63)<<6|k_[2]&63;break;case 4:K_=(k_[0]&7)<<18|(k_[1]&63)<<12|(k_[2]&63)<<6|k_[3]&63;break}return K_>1114111?null:K_},j_=function(k_){k_=Gt(k_,mt," ");for(var K_=k_.length,nt="",J_=0;J_<K_;){var Bt=It(k_,J_);if(Bt==="%"){if(It(k_,J_+1)==="%"||J_+3>K_){nt+="%",J_++;continue}var br=v_(k_,J_+1);if(br!==br){nt+=Bt,J_++;continue}J_+=2;var Er=D_(br);if(Er===0)Bt=ce(br);else{if(Er===1||Er>4){nt+=gr,J_++;continue}for(var Pr=[br],Mn=1;Mn<Er&&(J_++,!(J_+3>K_||It(k_,J_)!=="%"));){var la=v_(k_,J_+1);if(la!==la){J_+=3;break}if(la>191||la<128)break;jt(Pr,la),J_+=2,Mn++}if(Pr.length!==Er){nt+=gr;continue}var ma=bt(Pr);ma===null?nt+=gr:Bt=s_(ma)}}nt+=Bt,J_++}return nt},y_=/[!'()~]|%20/g,T_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},at=function(k_){return T_[k_]},Jt=function(k_){return Gt(z_(k_),y_,at)},Qt=q(function(K_,nt){r_(this,{type:Ee,target:ue(K_).entries,index:0,kind:nt})},Pe,function(){var K_=De(this),nt=K_.target,J_=K_.index++;if(!nt||J_>=nt.length)return K_.target=null,ne(void 0,!0);var Bt=nt[J_];switch(K_.kind){case"keys":return ne(Bt.key,!1);case"values":return ne(Bt.value,!1)}return ne([Bt.key,Bt.value],!1)},!0),X_=function(k_){this.entries=[],this.url=null,k_!==void 0&&(G(k_)?this.parseObject(k_):this.parseQuery(typeof k_=="string"?It(k_,0)==="?"?Dt(k_,1):k_:ee(k_)))};X_.prototype={type:Pe,bindURL:function(k_){this.url=k_,this.update()},parseObject:function(k_){var K_=this.entries,nt=ye(k_),J_,Bt,br,Er,Pr,Mn,la;if(nt)for(J_=Ie(k_,nt),Bt=J_.next;!(br=p(Bt,J_)).done;){if(Er=Ie(H(br.value)),Pr=Er.next,(Mn=p(Pr,Er)).done||(la=p(Pr,Er)).done||!p(Pr,Er).done)throw new o_("Expected sequence with length 2");jt(K_,{key:ee(Mn.value),value:ee(la.value)})}else for(var ma in k_)z(k_,ma)&&jt(K_,{key:ma,value:ee(k_[ma])})},parseQuery:function(k_){if(k_)for(var K_=this.entries,nt=ar(k_,"&"),J_=0,Bt,br;J_<nt.length;)Bt=nt[J_++],Bt.length&&(br=ar(Bt,"="),jt(K_,{key:j_(vt(br)),value:j_(Ct(br,"="))}))},serialize:function(){for(var k_=this.entries,K_=[],nt=0,J_;nt<k_.length;)J_=k_[nt++],jt(K_,Jt(J_.key)+"="+Jt(J_.value));return Ct(K_,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var N_=function(){j(this,U_);var K_=arguments.length>0?arguments[0]:void 0,nt=r_(this,new X_(K_));w||(this.size=nt.entries.length)},U_=N_.prototype;if(M(U_,{append:function(K_,nt){var J_=ue(this);_e(arguments.length,2),jt(J_.entries,{key:ee(K_),value:ee(nt)}),w||this.length++,J_.updateURL()},delete:function(k_){for(var K_=ue(this),nt=_e(arguments.length,1),J_=K_.entries,Bt=ee(k_),br=nt<2?void 0:arguments[1],Er=br===void 0?br:ee(br),Pr=0;Pr<J_.length;){var Mn=J_[Pr];if(Mn.key===Bt&&(Er===void 0||Mn.value===Er)){if(fr(J_,Pr,1),Er!==void 0)break}else Pr++}w||(this.size=J_.length),K_.updateURL()},get:function(K_){var nt=ue(this).entries;_e(arguments.length,1);for(var J_=ee(K_),Bt=0;Bt<nt.length;Bt++)if(nt[Bt].key===J_)return nt[Bt].value;return null},getAll:function(K_){var nt=ue(this).entries;_e(arguments.length,1);for(var J_=ee(K_),Bt=[],br=0;br<nt.length;br++)nt[br].key===J_&&jt(Bt,nt[br].value);return Bt},has:function(K_){for(var nt=ue(this).entries,J_=_e(arguments.length,1),Bt=ee(K_),br=J_<2?void 0:arguments[1],Er=br===void 0?br:ee(br),Pr=0;Pr<nt.length;){var Mn=nt[Pr++];if(Mn.key===Bt&&(Er===void 0||Mn.value===Er))return!0}return!1},set:function(K_,nt){var J_=ue(this);_e(arguments.length,1);for(var Bt=J_.entries,br=!1,Er=ee(K_),Pr=ee(nt),Mn=0,la;Mn<Bt.length;Mn++)la=Bt[Mn],la.key===Er&&(br?fr(Bt,Mn--,1):(br=!0,la.value=Pr));br||jt(Bt,{key:Er,value:Pr}),w||(this.size=Bt.length),J_.updateURL()},sort:function(){var K_=ue(this);le(K_.entries,function(nt,J_){return nt.key>J_.key?1:-1}),K_.updateURL()},forEach:function(K_){for(var nt=ue(this).entries,J_=Y(K_,arguments.length>1?arguments[1]:void 0),Bt=0,br;Bt<nt.length;)br=nt[Bt++],J_(br.value,br.key,this)},keys:function(){return new Qt(this,"keys")},values:function(){return new Qt(this,"values")},entries:function(){return new Qt(this,"entries")}},{enumerable:!0}),y(U_,$e,U_.entries,{name:"entries"}),y(U_,"toString",function(){return ue(this).serialize()},{enumerable:!0}),w&&v(U_,"size",{get:function(){return ue(this).entries.length},configurable:!0,enumerable:!0}),C(N_,Pe),r({global:!0,constructor:!0,forced:!L},{URLSearchParams:N_}),!L&&E(Re)){var xt=g(g_.has),Lr=g(g_.set),tn=function(k_){if(G(k_)){var K_=k_.body,nt;if(Z(K_)===Pe)return nt=k_.headers?new Re(k_.headers):new Re,xt(nt,"content-type")||Lr(nt,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),se(k_,{body:ge(0,ee(K_)),headers:ge(0,nt)})}return k_};if(E(Be)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(K_){return Be(K_,arguments.length>1?tn(arguments[1]):{})}}),E(re)){var Ia=function(K_){return j(this,f_),new re(K_,arguments.length>1?tn(arguments[1]):{})};f_.constructor=Ia,Ia.prototype=f_,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ia})}}return Gae={URLSearchParams:N_,getState:ue},Gae}var yze;function A4_(){if(yze)return uze;yze=1,l9e();var r=Bn(),a=bu(),i=fze(),u=oc(),p=oM(),g=co(),w=Ug(),L=a6(),y=XR(),v=Fp(),M=C4_(),C=B9e(),q=iM(),D=c9e().codeAt,j=T4_(),E=C$(),z=Ub(),Y=eA(),Z=mze(),H=r6(),G=H.set,ee=H.getterFor("URL"),se=Z.URLSearchParams,ge=Z.getState,Ie=u.URL,ye=u.TypeError,ne=u.parseInt,_e=Math.floor,ae=Math.pow,le=g("".charAt),$e=g(/./.exec),Pe=g([].join),Ee=g(1 .toString),r_=g([].pop),ue=g([].push),De=g("".replace),Be=g([].shift),re=g("".split),Re=g("".slice),f_=g("".toLowerCase),g_=g([].unshift),o_="Invalid authority",z_="Invalid scheme",ce="Invalid host",s_="Invalid port",rt=/[a-z]/i,It=/[\d+-.a-z]/i,Ct=/\d/,jt=/^0x/i,Gt=/^[0-7]+$/,vt=/^\d+$/,fr=/^[\da-f]+$/i,ar=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Dt=/[\0\t\n\r #/:<>?@[\\\]^|]/,U=/^[\u0000-\u0020]+/,mt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,gr=/[\t\n\r]/g,Ge,v_=function(Ue){var I_=re(Ue,"."),i_,je,P_,Zt,et,cn,Xt;if(I_.length&&I_[I_.length-1]===""&&I_.length--,i_=I_.length,i_>4)return Ue;for(je=[],P_=0;P_<i_;P_++){if(Zt=I_[P_],Zt==="")return Ue;if(et=10,Zt.length>1&&le(Zt,0)==="0"&&(et=$e(jt,Zt)?16:8,Zt=Re(Zt,et===8?1:2)),Zt==="")cn=0;else{if(!$e(et===10?vt:et===8?Gt:fr,Zt))return Ue;cn=ne(Zt,et)}ue(je,cn)}for(P_=0;P_<i_;P_++)if(cn=je[P_],P_===i_-1){if(cn>=ae(256,5-i_))return null}else if(cn>255)return null;for(Xt=r_(je),P_=0;P_<je.length;P_++)Xt+=je[P_]*ae(256,3-P_);return Xt},D_=function(Ue){var I_=[0,0,0,0,0,0,0,0],i_=0,je=null,P_=0,Zt,et,cn,Xt,_a,ka,M_,Ur=function(){return le(Ue,P_)};if(Ur()===":"){if(le(Ue,1)!==":")return;P_+=2,i_++,je=i_}for(;Ur();){if(i_===8)return;if(Ur()===":"){if(je!==null)return;P_++,i_++,je=i_;continue}for(Zt=et=0;et<4&&$e(fr,Ur());)Zt=Zt*16+ne(Ur(),16),P_++,et++;if(Ur()==="."){if(et===0||(P_-=et,i_>6))return;for(cn=0;Ur();){if(Xt=null,cn>0)if(Ur()==="."&&cn<4)P_++;else return;if(!$e(Ct,Ur()))return;for(;$e(Ct,Ur());){if(_a=ne(Ur(),10),Xt===null)Xt=_a;else{if(Xt===0)return;Xt=Xt*10+_a}if(Xt>255)return;P_++}I_[i_]=I_[i_]*256+Xt,cn++,(cn===2||cn===4)&&i_++}if(cn!==4)return;break}else if(Ur()===":"){if(P_++,!Ur())return}else if(Ur())return;I_[i_++]=Zt}if(je!==null)for(ka=i_-je,i_=7;i_!==0&&ka>0;)M_=I_[i_],I_[i_--]=I_[je+ka-1],I_[je+--ka]=M_;else if(i_!==8)return;return I_},bt=function(Ue){for(var I_=null,i_=1,je=null,P_=0,Zt=0;Zt<8;Zt++)Ue[Zt]!==0?(P_>i_&&(I_=je,i_=P_),je=null,P_=0):(je===null&&(je=Zt),++P_);return P_>i_?je:I_},j_=function(Ue){var I_,i_,je,P_;if(typeof Ue=="number"){for(I_=[],i_=0;i_<4;i_++)g_(I_,Ue%256),Ue=_e(Ue/256);return Pe(I_,".")}if(typeof Ue=="object"){for(I_="",je=bt(Ue),i_=0;i_<8;i_++)P_&&Ue[i_]===0||(P_&&(P_=!1),je===i_?(I_+=i_?":":"::",P_=!0):(I_+=Ee(Ue[i_],16),i_<7&&(I_+=":")));return"["+I_+"]"}return Ue},y_={},T_=M({},y_,{" ":1,'"':1,"<":1,">":1,"`":1}),at=M({},T_,{"#":1,"?":1,"{":1,"}":1}),Jt=M({},at,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qt=function(Ue,I_){var i_=D(Ue,0);return i_>32&&i_<127&&!v(I_,Ue)?Ue:encodeURIComponent(Ue)},X_={ftp:21,file:null,http:80,https:443,ws:80,wss:443},N_=function(Ue,I_){var i_;return Ue.length===2&&$e(rt,le(Ue,0))&&((i_=le(Ue,1))===":"||!I_&&i_==="|")},U_=function(Ue){var I_;return Ue.length>1&&N_(Re(Ue,0,2))&&(Ue.length===2||(I_=le(Ue,2))==="/"||I_==="\\"||I_==="?"||I_==="#")},xt=function(Ue){return Ue==="."||f_(Ue)==="%2e"},Lr=function(Ue){return Ue=f_(Ue),Ue===".."||Ue==="%2e."||Ue===".%2e"||Ue==="%2e%2e"},tn={},Ia={},k_={},K_={},nt={},J_={},Bt={},br={},Er={},Pr={},Mn={},la={},ma={},Eu={},za={},Yc={},Sn={},ks={},Co={},As={},Wa={},Jc=function(Ue,I_,i_){var je=E(Ue),P_,Zt,et;if(I_){if(Zt=this.parse(je),Zt)throw new ye(Zt);this.searchParams=null}else{if(i_!==void 0&&(P_=new Jc(i_,!0)),Zt=this.parse(je,null,P_),Zt)throw new ye(Zt);et=ge(new se),et.bindURL(this),this.searchParams=et}};Jc.prototype={type:"URL",parse:function(Ue,I_,i_){var je=this,P_=I_||tn,Zt=0,et="",cn=!1,Xt=!1,_a=!1,ka,M_,Ur,Gi;for(Ue=E(Ue),I_||(je.scheme="",je.username="",je.password="",je.host=null,je.port=null,je.path=[],je.query=null,je.fragment=null,je.cannotBeABaseURL=!1,Ue=De(Ue,U,""),Ue=De(Ue,mt,"$1")),Ue=De(Ue,gr,""),ka=C(Ue);Zt<=ka.length;){switch(M_=ka[Zt],P_){case tn:if(M_&&$e(rt,M_))et+=f_(M_),P_=Ia;else{if(I_)return z_;P_=k_;continue}break;case Ia:if(M_&&($e(It,M_)||M_==="+"||M_==="-"||M_==="."))et+=f_(M_);else if(M_===":"){if(I_&&(je.isSpecial()!==v(X_,et)||et==="file"&&(je.includesCredentials()||je.port!==null)||je.scheme==="file"&&!je.host))return;if(je.scheme=et,I_){je.isSpecial()&&X_[je.scheme]===je.port&&(je.port=null);return}et="",je.scheme==="file"?P_=Eu:je.isSpecial()&&i_&&i_.scheme===je.scheme?P_=K_:je.isSpecial()?P_=br:ka[Zt+1]==="/"?(P_=nt,Zt++):(je.cannotBeABaseURL=!0,ue(je.path,""),P_=Co)}else{if(I_)return z_;et="",P_=k_,Zt=0;continue}break;case k_:if(!i_||i_.cannotBeABaseURL&&M_!=="#")return z_;if(i_.cannotBeABaseURL&&M_==="#"){je.scheme=i_.scheme,je.path=q(i_.path),je.query=i_.query,je.fragment="",je.cannotBeABaseURL=!0,P_=Wa;break}P_=i_.scheme==="file"?Eu:J_;continue;case K_:if(M_==="/"&&ka[Zt+1]==="/")P_=Er,Zt++;else{P_=J_;continue}break;case nt:if(M_==="/"){P_=Pr;break}else{P_=ks;continue}case J_:if(je.scheme=i_.scheme,M_===Ge)je.username=i_.username,je.password=i_.password,je.host=i_.host,je.port=i_.port,je.path=q(i_.path),je.query=i_.query;else if(M_==="/"||M_==="\\"&&je.isSpecial())P_=Bt;else if(M_==="?")je.username=i_.username,je.password=i_.password,je.host=i_.host,je.port=i_.port,je.path=q(i_.path),je.query="",P_=As;else if(M_==="#")je.username=i_.username,je.password=i_.password,je.host=i_.host,je.port=i_.port,je.path=q(i_.path),je.query=i_.query,je.fragment="",P_=Wa;else{je.username=i_.username,je.password=i_.password,je.host=i_.host,je.port=i_.port,je.path=q(i_.path),je.path.length--,P_=ks;continue}break;case Bt:if(je.isSpecial()&&(M_==="/"||M_==="\\"))P_=Er;else if(M_==="/")P_=Pr;else{je.username=i_.username,je.password=i_.password,je.host=i_.host,je.port=i_.port,P_=ks;continue}break;case br:if(P_=Er,M_!=="/"||le(et,Zt+1)!=="/")continue;Zt++;break;case Er:if(M_!=="/"&&M_!=="\\"){P_=Pr;continue}break;case Pr:if(M_==="@"){cn&&(et="%40"+et),cn=!0,Ur=C(et);for(var sl=0;sl<Ur.length;sl++){var cs=Ur[sl];if(cs===":"&&!_a){_a=!0;continue}var Fa=Qt(cs,Jt);_a?je.password+=Fa:je.username+=Fa}et=""}else if(M_===Ge||M_==="/"||M_==="?"||M_==="#"||M_==="\\"&&je.isSpecial()){if(cn&&et==="")return o_;Zt-=C(et).length+1,et="",P_=Mn}else et+=M_;break;case Mn:case la:if(I_&&je.scheme==="file"){P_=Yc;continue}else if(M_===":"&&!Xt){if(et==="")return ce;if(Gi=je.parseHost(et),Gi)return Gi;if(et="",P_=ma,I_===la)return}else if(M_===Ge||M_==="/"||M_==="?"||M_==="#"||M_==="\\"&&je.isSpecial()){if(je.isSpecial()&&et==="")return ce;if(I_&&et===""&&(je.includesCredentials()||je.port!==null))return;if(Gi=je.parseHost(et),Gi)return Gi;if(et="",P_=Sn,I_)return;continue}else M_==="["?Xt=!0:M_==="]"&&(Xt=!1),et+=M_;break;case ma:if($e(Ct,M_))et+=M_;else if(M_===Ge||M_==="/"||M_==="?"||M_==="#"||M_==="\\"&&je.isSpecial()||I_){if(et!==""){var cp=ne(et,10);if(cp>65535)return s_;je.port=je.isSpecial()&&cp===X_[je.scheme]?null:cp,et=""}if(I_)return;P_=Sn;continue}else return s_;break;case Eu:if(je.scheme="file",M_==="/"||M_==="\\")P_=za;else if(i_&&i_.scheme==="file")switch(M_){case Ge:je.host=i_.host,je.path=q(i_.path),je.query=i_.query;break;case"?":je.host=i_.host,je.path=q(i_.path),je.query="",P_=As;break;case"#":je.host=i_.host,je.path=q(i_.path),je.query=i_.query,je.fragment="",P_=Wa;break;default:U_(Pe(q(ka,Zt),""))||(je.host=i_.host,je.path=q(i_.path),je.shortenPath()),P_=ks;continue}else{P_=ks;continue}break;case za:if(M_==="/"||M_==="\\"){P_=Yc;break}i_&&i_.scheme==="file"&&!U_(Pe(q(ka,Zt),""))&&(N_(i_.path[0],!0)?ue(je.path,i_.path[0]):je.host=i_.host),P_=ks;continue;case Yc:if(M_===Ge||M_==="/"||M_==="\\"||M_==="?"||M_==="#"){if(!I_&&N_(et))P_=ks;else if(et===""){if(je.host="",I_)return;P_=Sn}else{if(Gi=je.parseHost(et),Gi)return Gi;if(je.host==="localhost"&&(je.host=""),I_)return;et="",P_=Sn}continue}else et+=M_;break;case Sn:if(je.isSpecial()){if(P_=ks,M_!=="/"&&M_!=="\\")continue}else if(!I_&&M_==="?")je.query="",P_=As;else if(!I_&&M_==="#")je.fragment="",P_=Wa;else if(M_!==Ge&&(P_=ks,M_!=="/"))continue;break;case ks:if(M_===Ge||M_==="/"||M_==="\\"&&je.isSpecial()||!I_&&(M_==="?"||M_==="#")){if(Lr(et)?(je.shortenPath(),M_!=="/"&&!(M_==="\\"&&je.isSpecial())&&ue(je.path,"")):xt(et)?M_!=="/"&&!(M_==="\\"&&je.isSpecial())&&ue(je.path,""):(je.scheme==="file"&&!je.path.length&&N_(et)&&(je.host&&(je.host=""),et=le(et,0)+":"),ue(je.path,et)),et="",je.scheme==="file"&&(M_===Ge||M_==="?"||M_==="#"))for(;je.path.length>1&&je.path[0]==="";)Be(je.path);M_==="?"?(je.query="",P_=As):M_==="#"&&(je.fragment="",P_=Wa)}else et+=Qt(M_,at);break;case Co:M_==="?"?(je.query="",P_=As):M_==="#"?(je.fragment="",P_=Wa):M_!==Ge&&(je.path[0]+=Qt(M_,y_));break;case As:!I_&&M_==="#"?(je.fragment="",P_=Wa):M_!==Ge&&(M_==="'"&&je.isSpecial()?je.query+="%27":M_==="#"?je.query+="%23":je.query+=Qt(M_,y_));break;case Wa:M_!==Ge&&(je.fragment+=Qt(M_,T_));break}Zt++}},parseHost:function(Ue){var I_,i_,je;if(le(Ue,0)==="["){if(le(Ue,Ue.length-1)!=="]"||(I_=D_(Re(Ue,1,-1)),!I_))return ce;this.host=I_}else if(this.isSpecial()){if(Ue=j(Ue),$e(ar,Ue)||(I_=v_(Ue),I_===null))return ce;this.host=I_}else{if($e(Dt,Ue))return ce;for(I_="",i_=C(Ue),je=0;je<i_.length;je++)I_+=Qt(i_[je],y_);this.host=I_}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return v(X_,this.scheme)},shortenPath:function(){var Ue=this.path,I_=Ue.length;I_&&(this.scheme!=="file"||I_!==1||!N_(Ue[0],!0))&&Ue.length--},serialize:function(){var Ue=this,I_=Ue.scheme,i_=Ue.username,je=Ue.password,P_=Ue.host,Zt=Ue.port,et=Ue.path,cn=Ue.query,Xt=Ue.fragment,_a=I_+":";return P_!==null?(_a+="//",Ue.includesCredentials()&&(_a+=i_+(je?":"+je:"")+"@"),_a+=j_(P_),Zt!==null&&(_a+=":"+Zt)):I_==="file"&&(_a+="//"),_a+=Ue.cannotBeABaseURL?et[0]:et.length?"/"+Pe(et,"/"):"",cn!==null&&(_a+="?"+cn),Xt!==null&&(_a+="#"+Xt),_a},setHref:function(Ue){var I_=this.parse(Ue);if(I_)throw new ye(I_);this.searchParams.update()},getOrigin:function(){var Ue=this.scheme,I_=this.port;if(Ue==="blob")try{return new To(Ue.path[0]).origin}catch(i_){return"null"}return Ue==="file"||!this.isSpecial()?"null":Ue+"://"+j_(this.host)+(I_!==null?":"+I_:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(Ue){this.parse(E(Ue)+":",tn)},getUsername:function(){return this.username},setUsername:function(Ue){var I_=C(E(Ue));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i_=0;i_<I_.length;i_++)this.username+=Qt(I_[i_],Jt)}},getPassword:function(){return this.password},setPassword:function(Ue){var I_=C(E(Ue));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i_=0;i_<I_.length;i_++)this.password+=Qt(I_[i_],Jt)}},getHost:function(){var Ue=this.host,I_=this.port;return Ue===null?"":I_===null?j_(Ue):j_(Ue)+":"+I_},setHost:function(Ue){this.cannotBeABaseURL||this.parse(Ue,Mn)},getHostname:function(){var Ue=this.host;return Ue===null?"":j_(Ue)},setHostname:function(Ue){this.cannotBeABaseURL||this.parse(Ue,la)},getPort:function(){var Ue=this.port;return Ue===null?"":E(Ue)},setPort:function(Ue){this.cannotHaveUsernamePasswordPort()||(Ue=E(Ue),Ue===""?this.port=null:this.parse(Ue,ma))},getPathname:function(){var Ue=this.path;return this.cannotBeABaseURL?Ue[0]:Ue.length?"/"+Pe(Ue,"/"):""},setPathname:function(Ue){this.cannotBeABaseURL||(this.path=[],this.parse(Ue,Sn))},getSearch:function(){var Ue=this.query;return Ue?"?"+Ue:""},setSearch:function(Ue){Ue=E(Ue),Ue===""?this.query=null:(le(Ue,0)==="?"&&(Ue=Re(Ue,1)),this.query="",this.parse(Ue,As)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var Ue=this.fragment;return Ue?"#"+Ue:""},setHash:function(Ue){if(Ue=E(Ue),Ue===""){this.fragment=null;return}le(Ue,0)==="#"&&(Ue=Re(Ue,1)),this.fragment="",this.parse(Ue,Wa)},update:function(){this.query=this.searchParams.serialize()||null}};var To=function(I_){var i_=y(this,fa),je=Y(arguments.length,1)>1?arguments[1]:void 0,P_=G(i_,new Jc(I_,!1,je));a||(i_.href=P_.serialize(),i_.origin=P_.getOrigin(),i_.protocol=P_.getProtocol(),i_.username=P_.getUsername(),i_.password=P_.getPassword(),i_.host=P_.getHost(),i_.hostname=P_.getHostname(),i_.port=P_.getPort(),i_.pathname=P_.getPathname(),i_.search=P_.getSearch(),i_.searchParams=P_.getSearchParams(),i_.hash=P_.getHash())},fa=To.prototype,rs=function(Ue,I_){return{get:function(){return ee(this)[Ue]()},set:I_&&function(i_){return ee(this)[I_](i_)},configurable:!0,enumerable:!0}};if(a&&(L(fa,"href",rs("serialize","setHref")),L(fa,"origin",rs("getOrigin")),L(fa,"protocol",rs("getProtocol","setProtocol")),L(fa,"username",rs("getUsername","setUsername")),L(fa,"password",rs("getPassword","setPassword")),L(fa,"host",rs("getHost","setHost")),L(fa,"hostname",rs("getHostname","setHostname")),L(fa,"port",rs("getPort","setPort")),L(fa,"pathname",rs("getPathname","setPathname")),L(fa,"search",rs("getSearch","setSearch")),L(fa,"searchParams",rs("getSearchParams")),L(fa,"hash",rs("getHash","setHash"))),w(fa,"toJSON",function(){return ee(this).serialize()},{enumerable:!0}),w(fa,"toString",function(){return ee(this).serialize()},{enumerable:!0}),Ie){var ri=Ie.createObjectURL,op=Ie.revokeObjectURL;ri&&w(To,"createObjectURL",p(ri,Ie)),op&&w(To,"revokeObjectURL",p(op,Ie))}return z(To,"URL"),r({global:!0,constructor:!0,forced:!i,sham:!a},{URL:To}),uze}var Lze;function j4_(){return Lze||(Lze=1,A4_()),cze}j4_();var Ize={},vze;function E4_(){if(vze)return Ize;vze=1;var r=Bn(),a=Gl();return r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return a(URL.prototype.toString,this)}}),Ize}E4_();var bze={},Oze;function N4_(){return Oze||(Oze=1,mze()),bze}N4_();var Sze={},kze;function V4_(){if(kze)return Sze;kze=1;var r=Ug(),a=co(),i=C$(),u=eA(),p=URLSearchParams,g=p.prototype,w=a(g.append),L=a(g.delete),y=a(g.forEach),v=a([].push),M=new p("a=1&a=2&b=3");return M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&r(g,"delete",function(C){var q=arguments.length,D=q<2?void 0:arguments[1];if(q&&D===void 0)return L(this,C);var j=[];y(this,function(se,ge){v(j,{key:ge,value:se})}),u(q,1);for(var E=i(C),z=i(D),Y=0,Z=0,H=!1,G=j.length,ee;Y<G;)ee=j[Y++],H||ee.key===E?(H=!0,L(this,ee.key)):Z++;for(;Z<G;)ee=j[Z++],ee.key===E&&ee.value===z||w(this,ee.key,ee.value)},{enumerable:!0,unsafe:!0}),Sze}V4_();var Mze={},Pze;function z4_(){if(Pze)return Mze;Pze=1;var r=Ug(),a=co(),i=C$(),u=eA(),p=URLSearchParams,g=p.prototype,w=a(g.getAll),L=a(g.has),y=new p("a=1");return(y.has("a",2)||!y.has("a",void 0))&&r(g,"has",function(M){var C=arguments.length,q=C<2?void 0:arguments[1];if(C&&q===void 0)return L(this,M);var D=w(this,M);u(C,1);for(var j=i(q),E=0;E<D.length;)if(D[E++]===j)return!0;return!1},{enumerable:!0,unsafe:!0}),Mze}z4_();var xze={},qze;function F4_(){if(qze)return xze;qze=1;var r=bu(),a=co(),i=a6(),u=URLSearchParams.prototype,p=a(u.forEach);return r&&!("size"in u)&&i(u,"size",{get:function(){var w=0;return p(this,function(){w++}),w},configurable:!0,enumerable:!0}),xze}F4_();function Mz(r){"@babel/helpers - typeof";return Mz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Mz(r)}function B4_(r,a){return G4_(r)||U4_(r,a)||H4_(r,a)||Z4_()}function Z4_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
202
202
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H4_(r,a){if(r){if(typeof r=="string")return Cze(r,a);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Cze(r,a):void 0}}function Cze(r,a){(a==null||a>r.length)&&(a=r.length);for(var i=0,u=Array(a);i<a;i++)u[i]=r[i];return u}function U4_(r,a){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var u,p,g,w,L=[],y=!0,v=!1;try{if(g=(i=i.call(r)).next,a!==0)for(;!(y=(u=g.call(i)).done)&&(L.push(u.value),L.length!==a);y=!0);}catch(M){v=!0,p=M}finally{try{if(!y&&i.return!=null&&(w=i.return(),Object(w)!==w))return}finally{if(v)throw p}}return L}}function G4_(r){if(Array.isArray(r))return r}function Q4_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function W4_(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,Tze(u.key),u)}}function Y4_(r,a,i){return a&&W4_(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function YH(r,a,i){return(a=Tze(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Tze(r){var a=J4_(r,"string");return Mz(a)=="symbol"?a:a+""}function J4_(r,a){if(Mz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(Mz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var K4_=function(){function r(){Q4_(this,r),YH(this,"_levels",[]),YH(this,"_transports",[]),YH(this,"_logs",[]),YH(this,"_prevTime",0);try{if(!window.localStorage)return;var a=window.localStorage.getItem("logger");if(!a)return;var i=a.split(">"),u=B4_(i,2),p=u[0],g=u[1];this._levels=p.split(","),g&&(this._transports=g.split(","))}catch(w){return}}return Y4_(r,[{key:"create",value:function(i,u){var p=this;return function(g){var w=Date.now(),L=0;if(p._prevTime&&(L=w-p._prevTime),p._prevTime=w,p._levels.includes(i)&&p._transports.includes("console")){var y=(u==null?void 0:u.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(y,";"),i,"",g,"color: ".concat(y,";"),L)}p._logs.push("".concat(i,": ").concat(g," +").concat(L,"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 i=this._logs.join(`
|
|
203
|
-
`),u=new Blob([i],{type:"text/plain"}),p=window.URL.createObjectURL(u),g=document.createElement("a");g.download="log.txt",g.href=p,g.click(),window.URL.revokeObjectURL(p),this.cleanLogs()}}}])}(),Qae=new K4_;function px(r){"@babel/helpers - typeof";return px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},px(r)}function fu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */fu=function(){return a};var r,a={},i=Object.prototype,u=i.hasOwnProperty,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",w=p.asyncIterator||"@@asyncIterator",L=p.toStringTag||"@@toStringTag";function y(ne,_e,ae,le){return Object.defineProperty(ne,_e,{value:ae,enumerable:!le,configurable:!le,writable:!le})}try{y({},"")}catch(ne){y=function(ae,le,$e){return ae[le]=$e}}function v(ne,_e,ae,le){var $e=_e&&_e.prototype instanceof q?_e:q,Pe=Object.create($e.prototype);return y(Pe,"_invoke",function(Ee,r_,ue){var De=1;return function(Be,re){if(De===3)throw Error("Generator is already running");if(De===4){if(Be==="throw")throw re;return{value:r,done:!0}}for(ue.method=Be,ue.arg=re;;){var Re=ue.delegate;if(Re){var f_=ee(Re,ue);if(f_){if(f_===C)continue;return f_}}if(ue.method==="next")ue.sent=ue._sent=ue.arg;else if(ue.method==="throw"){if(De===1)throw De=4,ue.arg;ue.dispatchException(ue.arg)}else ue.method==="return"&&ue.abrupt("return",ue.arg);De=3;var g_=M(Ee,r_,ue);if(g_.type==="normal"){if(De=ue.done?4:2,g_.arg===C)continue;return{value:g_.arg,done:ue.done}}g_.type==="throw"&&(De=4,ue.method="throw",ue.arg=g_.arg)}}}(ne,ae,new Ie(le||[])),!0),Pe}function M(ne,_e,ae){try{return{type:"normal",arg:ne.call(_e,ae)}}catch(le){return{type:"throw",arg:le}}}a.wrap=v;var C={};function q(){}function D(){}function j(){}var E={};y(E,g,function(){return this});var z=Object.getPrototypeOf,Y=z&&z(z(ye([])));Y&&Y!==i&&u.call(Y,g)&&(E=Y);var Z=j.prototype=q.prototype=Object.create(E);function H(ne){["next","throw","return"].forEach(function(_e){y(ne,_e,function(ae){return this._invoke(_e,ae)})})}function G(ne,_e){function ae($e,Pe,Ee,r_){var ue=M(ne[$e],ne,Pe);if(ue.type!=="throw"){var De=ue.arg,Be=De.value;return Be&&px(Be)=="object"&&u.call(Be,"__await")?_e.resolve(Be.__await).then(function(re){ae("next",re,Ee,r_)},function(re){ae("throw",re,Ee,r_)}):_e.resolve(Be).then(function(re){De.value=re,Ee(De)},function(re){return ae("throw",re,Ee,r_)})}r_(ue.arg)}var le;y(this,"_invoke",function($e,Pe){function Ee(){return new _e(function(r_,ue){ae($e,Pe,r_,ue)})}return le=le?le.then(Ee,Ee):Ee()},!0)}function ee(ne,_e){var ae=_e.method,le=ne.i[ae];if(le===r)return _e.delegate=null,ae==="throw"&&ne.i.return&&(_e.method="return",_e.arg=r,ee(ne,_e),_e.method==="throw")||ae!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),C;var $e=M(le,ne.i,_e.arg);if($e.type==="throw")return _e.method="throw",_e.arg=$e.arg,_e.delegate=null,C;var Pe=$e.arg;return Pe?Pe.done?(_e[ne.r]=Pe.value,_e.next=ne.n,_e.method!=="return"&&(_e.method="next",_e.arg=r),_e.delegate=null,C):Pe:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,C)}function se(ne){this.tryEntries.push(ne)}function ge(ne){var _e=ne[4]||{};_e.type="normal",_e.arg=r,ne[4]=_e}function Ie(ne){this.tryEntries=[[-1]],ne.forEach(se,this),this.reset(!0)}function ye(ne){if(ne!=null){var _e=ne[g];if(_e)return _e.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var ae=-1,le=function $e(){for(;++ae<ne.length;)if(u.call(ne,ae))return $e.value=ne[ae],$e.done=!1,$e;return $e.value=r,$e.done=!0,$e};return le.next=le}}throw new TypeError(px(ne)+" is not iterable")}return D.prototype=j,y(Z,"constructor",j),y(j,"constructor",D),D.displayName=y(j,L,"GeneratorFunction"),a.isGeneratorFunction=function(ne){var _e=typeof ne=="function"&&ne.constructor;return!!_e&&(_e===D||(_e.displayName||_e.name)==="GeneratorFunction")},a.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,j):(ne.__proto__=j,y(ne,L,"GeneratorFunction")),ne.prototype=Object.create(Z),ne},a.awrap=function(ne){return{__await:ne}},H(G.prototype),y(G.prototype,w,function(){return this}),a.AsyncIterator=G,a.async=function(ne,_e,ae,le,$e){$e===void 0&&($e=Promise);var Pe=new G(v(ne,_e,ae,le),$e);return a.isGeneratorFunction(_e)?Pe:Pe.next().then(function(Ee){return Ee.done?Ee.value:Pe.next()})},H(Z),y(Z,L,"Generator"),y(Z,g,function(){return this}),y(Z,"toString",function(){return"[object Generator]"}),a.keys=function(ne){var _e=Object(ne),ae=[];for(var le in _e)ae.unshift(le);return function $e(){for(;ae.length;)if((le=ae.pop())in _e)return $e.value=le,$e.done=!1,$e;return $e.done=!0,$e}},a.values=ye,Ie.prototype={constructor:Ie,reset:function(_e){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ge),!_e)for(var ae in this)ae.charAt(0)==="t"&&u.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=r)},stop:function(){this.done=!0;var _e=this.tryEntries[0][4];if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ae=this;function le(Be){Ee.type="throw",Ee.arg=_e,ae.next=Be}for(var $e=ae.tryEntries.length-1;$e>=0;--$e){var Pe=this.tryEntries[$e],Ee=Pe[4],r_=this.prev,ue=Pe[1],De=Pe[2];if(Pe[0]===-1)return le("end"),!1;if(!ue&&!De)throw Error("try statement without catch or finally");if(Pe[0]!=null&&Pe[0]<=r_){if(r_<ue)return this.method="next",this.arg=r,le(ue),!0;if(r_<De)return le(De),!1}}},abrupt:function(_e,ae){for(var le=this.tryEntries.length-1;le>=0;--le){var $e=this.tryEntries[le];if($e[0]>-1&&$e[0]<=this.prev&&this.prev<$e[2]){var Pe=$e;break}}Pe&&(_e==="break"||_e==="continue")&&Pe[0]<=ae&&ae<=Pe[2]&&(Pe=null);var Ee=Pe?Pe[4]:{};return Ee.type=_e,Ee.arg=ae,Pe?(this.method="next",this.next=Pe[2],C):this.complete(Ee)},complete:function(_e,ae){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ae&&(this.next=ae),C},finish:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[2]===_e)return this.complete(le[4],le[3]),ge(le),C}},catch:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[0]===_e){var $e=le[4];if($e.type==="throw"){var Pe=$e.arg;ge(le)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(_e,ae,le){return this.delegate={i:ye(_e),r:ae,n:le},this.method==="next"&&(this.arg=r),C}},a}function Dze(r,a,i,u,p,g,w){try{var L=r[g](w),y=L.value}catch(v){return void i(v)}L.done?a(y):Promise.resolve(y).then(u,p)}function A$(r){return function(){var a=this,i=arguments;return new Promise(function(u,p){var g=r.apply(a,i);function w(y){Dze(g,u,p,w,L,"next",y)}function L(y){Dze(g,u,p,w,L,"throw",y)}w(void 0)})}}function X4_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function ev_(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,Rze(u.key),u)}}function _v_(r,a,i){return a&&ev_(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function wA(r,a,i){return(a=Rze(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Rze(r){var a=tv_(r,"string");return px(a)=="symbol"?a:a+""}function tv_(r,a){if(px(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(px(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Ew=Qae.create("wasm_idv"),rv_=function(){function r(a){X4_(this,r),wA(this,"_worker",null),wA(this,"_initialized",!1),wA(this,"_connectedToIdv",!1),wA(this,"_serviceRunning",!1),wA(this,"_userId",cg_(sd_)),wA(this,"_setErrorScreen",null),a&&(this._setErrorScreen=a)}return _v_(r,[{key:"init",value:function(){var a=A$(fu().mark(function u(){var p,g,w,L;return fu().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.prev=1,v.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-912af6286//PlatformAdaptor.worker.js");case 4:return p=v.sent,v.next=7,p.blob();case 7:g=v.sent,w=URL.createObjectURL(g),this._worker=new Worker(w),v.next=15;break;case 12:v.prev=12,v.t0=v.catch(1),Ew("Creating worker error: ".concat(JSON.stringify(v.t0)));case 15:v.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){v.next=20;break}return v.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),v.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-912af6286/",preMain:!0});case 23:return L=v.sent,L.code===0&&Ew("Worker was created successfully"),v.abrupt("return",L);case 26:case"end":return v.stop()}},u,this,[[1,12]])}));function i(){return a.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var a=A$(fu().mark(function u(p){var g,w;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:xee.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:p.host,httpRetryCount:p.httpRetryCount||0,httpTimeoutMs:p.httpTimeoutMs||0,isSecure:(g=p.isSecure)!==null&&g!==void 0?g:!0,password:p.password,port:p.port?p.port:0,schema:p.schema?p.schema:"basic",userName:p.userName},preMain:!0});case 2:return w=y.sent,w.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),Ew("IdvWasmService result code: ".concat(w.code)),y.abrupt("return",w);case 6:case"end":return y.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var a=A$(fu().mark(function u(p){var g;return fu().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:xee.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:p},preMain:!0});case 2:return g=L.sent,Ew("Connection by URL result code: ".concat(g.code)),L.abrupt("return",g);case 5:case"end":return L.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var a=A$(fu().mark(function u(p,g,w){var L,y;return fu().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return L={workflowId:p,locale:g},w&&(ug_(w)?L.metadata=w:console.log("WARN (Idv):: metadata is not an object or an empty object")),M.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:L,preMain:!0});case 4:return y=M.sent,Ew("Start session result code: ".concat(y.code)),M.abrupt("return",y);case 7:case"end":return M.stop()}},u,this)}));function i(u,p,g){return a.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var a=A$(fu().mark(function u(p){var g,w;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return g={sessionId:p},y.next=3,this.sendMessage({continueParams:g,target:"custom",method:"continue_session",preMain:!0});case 3:return w=y.sent,Ew("Continue session result code: ".concat(w.code)),y.abrupt("return",w);case 6:case"end":return y.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var a=A$(fu().mark(function u(){var p,g,w=arguments;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p=w.length>0&&w[0]!==void 0?w[0]:{limit:0,skip:0},y.next=3,this.sendMessage({workflowsParams:p,target:"custom",method:"list_workflows",preMain:!0});case 3:return g=y.sent,Ew("listWorkflows result code: ".concat(g.code)),y.abrupt("return",g);case 6:case"end":return y.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return p=w.sent,Ew("getHealth result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"getServiceToken",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return p=w.sent,Ew("getServiceToken result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return p=w.sent,Ew("abandonSession result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var a=A$(fu().mark(function u(p){var g;return fu().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.sendMessage({workflowIdParams:{workflowId:p},target:"custom",method:"get_workflow",preMain:!0});case 2:return g=L.sent,Ew("getWorkflow result code: ".concat(g.code)),L.abrupt("return",g);case 5:case"end":return L.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var a=A$(fu().mark(function u(p,g){var w;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:g,stage:0,step:p},preMain:!0});case 2:return w=y.sent,Ew("pushData result code: ".concat(w.code)),y.abrupt("return",w);case 5:case"end":return y.stop()}},u,this)}));function i(u,p){return a.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return p=w.sent,Ew("getSessionState result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return p=w.sent,Ew("waitForSessionUpdate result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return p=w.sent,this._connectedToIdv=!1,this._serviceRunning=!1,Ew("disconnect result code: ".concat(p.code)),w.abrupt("return",p);case 7:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var a=A$(fu().mark(function u(p){var g=this;return fu().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.abrupt("return",new Promise(function(y,v){if(!g._worker)return v();g._worker.onmessage=function(M){var C=M.data.target;if(C==="stdout"){Ew(JSON.stringify(M.data.content));return}if(C==="custom"){var q=M.data,D=q.method,j=q.data;D==="onRuntimeInitialized"&&(g._initialized=!0),y(j)}if(C==="stderr"){var E=M.data.content;Ew(JSON.stringify(E)),g._setErrorScreen&&g._setErrorScreen(E)}},g._worker.postMessage(p)}));case 1:case"end":return L.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(this._worker){w.next=2;break}return w.abrupt("return",{code:0});case 2:if(this._connectedToIdv){w.next=5;break}return this.terminateWorker(),w.abrupt("return",{code:0});case 5:return w.next=7,this.disconnect();case 7:return p=w.sent,this.terminateWorker(),w.abrupt("return",p);case 10:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()}])}();function dx(r){"@babel/helpers - typeof";return dx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},dx(r)}function Aze(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function Wae(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Aze(Object(i),!0).forEach(function(u){Yae(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Aze(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function Yae(r,a,i){return(a=nv_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function nv_(r){var a=av_(r,"string");return dx(a)=="symbol"?a:a+""}function av_(r,a){if(dx(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(dx(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}function sp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */sp=function(){return a};var r,a={},i=Object.prototype,u=i.hasOwnProperty,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",w=p.asyncIterator||"@@asyncIterator",L=p.toStringTag||"@@toStringTag";function y(ne,_e,ae,le){return Object.defineProperty(ne,_e,{value:ae,enumerable:!le,configurable:!le,writable:!le})}try{y({},"")}catch(ne){y=function(ae,le,$e){return ae[le]=$e}}function v(ne,_e,ae,le){var $e=_e&&_e.prototype instanceof q?_e:q,Pe=Object.create($e.prototype);return y(Pe,"_invoke",function(Ee,r_,ue){var De=1;return function(Be,re){if(De===3)throw Error("Generator is already running");if(De===4){if(Be==="throw")throw re;return{value:r,done:!0}}for(ue.method=Be,ue.arg=re;;){var Re=ue.delegate;if(Re){var f_=ee(Re,ue);if(f_){if(f_===C)continue;return f_}}if(ue.method==="next")ue.sent=ue._sent=ue.arg;else if(ue.method==="throw"){if(De===1)throw De=4,ue.arg;ue.dispatchException(ue.arg)}else ue.method==="return"&&ue.abrupt("return",ue.arg);De=3;var g_=M(Ee,r_,ue);if(g_.type==="normal"){if(De=ue.done?4:2,g_.arg===C)continue;return{value:g_.arg,done:ue.done}}g_.type==="throw"&&(De=4,ue.method="throw",ue.arg=g_.arg)}}}(ne,ae,new Ie(le||[])),!0),Pe}function M(ne,_e,ae){try{return{type:"normal",arg:ne.call(_e,ae)}}catch(le){return{type:"throw",arg:le}}}a.wrap=v;var C={};function q(){}function D(){}function j(){}var E={};y(E,g,function(){return this});var z=Object.getPrototypeOf,Y=z&&z(z(ye([])));Y&&Y!==i&&u.call(Y,g)&&(E=Y);var Z=j.prototype=q.prototype=Object.create(E);function H(ne){["next","throw","return"].forEach(function(_e){y(ne,_e,function(ae){return this._invoke(_e,ae)})})}function G(ne,_e){function ae($e,Pe,Ee,r_){var ue=M(ne[$e],ne,Pe);if(ue.type!=="throw"){var De=ue.arg,Be=De.value;return Be&&dx(Be)=="object"&&u.call(Be,"__await")?_e.resolve(Be.__await).then(function(re){ae("next",re,Ee,r_)},function(re){ae("throw",re,Ee,r_)}):_e.resolve(Be).then(function(re){De.value=re,Ee(De)},function(re){return ae("throw",re,Ee,r_)})}r_(ue.arg)}var le;y(this,"_invoke",function($e,Pe){function Ee(){return new _e(function(r_,ue){ae($e,Pe,r_,ue)})}return le=le?le.then(Ee,Ee):Ee()},!0)}function ee(ne,_e){var ae=_e.method,le=ne.i[ae];if(le===r)return _e.delegate=null,ae==="throw"&&ne.i.return&&(_e.method="return",_e.arg=r,ee(ne,_e),_e.method==="throw")||ae!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),C;var $e=M(le,ne.i,_e.arg);if($e.type==="throw")return _e.method="throw",_e.arg=$e.arg,_e.delegate=null,C;var Pe=$e.arg;return Pe?Pe.done?(_e[ne.r]=Pe.value,_e.next=ne.n,_e.method!=="return"&&(_e.method="next",_e.arg=r),_e.delegate=null,C):Pe:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,C)}function se(ne){this.tryEntries.push(ne)}function ge(ne){var _e=ne[4]||{};_e.type="normal",_e.arg=r,ne[4]=_e}function Ie(ne){this.tryEntries=[[-1]],ne.forEach(se,this),this.reset(!0)}function ye(ne){if(ne!=null){var _e=ne[g];if(_e)return _e.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var ae=-1,le=function $e(){for(;++ae<ne.length;)if(u.call(ne,ae))return $e.value=ne[ae],$e.done=!1,$e;return $e.value=r,$e.done=!0,$e};return le.next=le}}throw new TypeError(dx(ne)+" is not iterable")}return D.prototype=j,y(Z,"constructor",j),y(j,"constructor",D),D.displayName=y(j,L,"GeneratorFunction"),a.isGeneratorFunction=function(ne){var _e=typeof ne=="function"&&ne.constructor;return!!_e&&(_e===D||(_e.displayName||_e.name)==="GeneratorFunction")},a.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,j):(ne.__proto__=j,y(ne,L,"GeneratorFunction")),ne.prototype=Object.create(Z),ne},a.awrap=function(ne){return{__await:ne}},H(G.prototype),y(G.prototype,w,function(){return this}),a.AsyncIterator=G,a.async=function(ne,_e,ae,le,$e){$e===void 0&&($e=Promise);var Pe=new G(v(ne,_e,ae,le),$e);return a.isGeneratorFunction(_e)?Pe:Pe.next().then(function(Ee){return Ee.done?Ee.value:Pe.next()})},H(Z),y(Z,L,"Generator"),y(Z,g,function(){return this}),y(Z,"toString",function(){return"[object Generator]"}),a.keys=function(ne){var _e=Object(ne),ae=[];for(var le in _e)ae.unshift(le);return function $e(){for(;ae.length;)if((le=ae.pop())in _e)return $e.value=le,$e.done=!1,$e;return $e.done=!0,$e}},a.values=ye,Ie.prototype={constructor:Ie,reset:function(_e){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ge),!_e)for(var ae in this)ae.charAt(0)==="t"&&u.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=r)},stop:function(){this.done=!0;var _e=this.tryEntries[0][4];if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ae=this;function le(Be){Ee.type="throw",Ee.arg=_e,ae.next=Be}for(var $e=ae.tryEntries.length-1;$e>=0;--$e){var Pe=this.tryEntries[$e],Ee=Pe[4],r_=this.prev,ue=Pe[1],De=Pe[2];if(Pe[0]===-1)return le("end"),!1;if(!ue&&!De)throw Error("try statement without catch or finally");if(Pe[0]!=null&&Pe[0]<=r_){if(r_<ue)return this.method="next",this.arg=r,le(ue),!0;if(r_<De)return le(De),!1}}},abrupt:function(_e,ae){for(var le=this.tryEntries.length-1;le>=0;--le){var $e=this.tryEntries[le];if($e[0]>-1&&$e[0]<=this.prev&&this.prev<$e[2]){var Pe=$e;break}}Pe&&(_e==="break"||_e==="continue")&&Pe[0]<=ae&&ae<=Pe[2]&&(Pe=null);var Ee=Pe?Pe[4]:{};return Ee.type=_e,Ee.arg=ae,Pe?(this.method="next",this.next=Pe[2],C):this.complete(Ee)},complete:function(_e,ae){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ae&&(this.next=ae),C},finish:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[2]===_e)return this.complete(le[4],le[3]),ge(le),C}},catch:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[0]===_e){var $e=le[4];if($e.type==="throw"){var Pe=$e.arg;ge(le)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(_e,ae,le){return this.delegate={i:ye(_e),r:ae,n:le},this.method==="next"&&(this.arg=r),C}},a}function jze(r,a,i,u,p,g,w){try{var L=r[g](w),y=L.value}catch(v){return void i(v)}L.done?a(y):Promise.resolve(y).then(u,p)}function Xb(r){return function(){var a=this,i=arguments;return new Promise(function(u,p){var g=r.apply(a,i);function w(y){jze(g,u,p,w,L,"next",y)}function L(y){jze(g,u,p,w,L,"throw",y)}w(void 0)})}}var sv_=Qae.create("store_idv"),iv_=function(a,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var u=Xb(sp().mark(function g(){var w;return sp().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return w=new rv_,y.next=3,w.init();case 3:a({wasmService:w});case 4:case"end":return y.stop()}},g)}));function p(){return u.apply(this,arguments)}return p}(),setFinalWaitingUi:function(p){a({isFinalWaitingUi:p})},connectToIdv:function(p){return Xb(sp().mark(function g(){var w,L,y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(!((w=i().wasmService)!==null&&w!==void 0&&w.isServiceConnected())){q.next=3;break}return q.next=3,(L=i().wasmService)===null||L===void 0?void 0:L.disconnect();case 3:return q.next=5,i().wasmService.prepareAndConnect(p);case 5:if(y=q.sent,v=null,y.code===4&&(v=XP.HTTP_ISSUE),y.code!==0&&y.code!==4&&(v=XP.PROVIDER_ERROR),v===null){q.next=12;break}return M=new jV({errorCode:v}),q.abrupt("return",{error:M});case 12:return q.abrupt("return",{});case 13:case"end":return q.stop()}},g)}))()},connectByUrl:function(p){return Xb(sp().mark(function g(){var w,L,y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return w=i().wasmService,q.next=3,w.connectByUrl(p);case 3:if(L=q.sent,y=null,L.code===4&&(y=XP.HTTP_ISSUE),L.code!==0&&L.code!==4&&(y=XP.PROVIDER_ERROR),y===null){q.next=13;break}return v=new jV({errorCode:y}),M=new XZ({errorCode:Cee.CONNECTION_ISSUE,underlyingBaseError:v}),q.abrupt("return",{workflows:[],error:M});case 13:return q.abrupt("return",{workflows:L.data});case 14:case"end":return q.stop()}},g)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(p){var g=function(L){var y,v=(y=i().currentSessionData)===null||y===void 0?void 0:y.sessionId,M=Wae(Wae({},L.results),{},{sessionId:v}),C=Wae({results:M},L.error&&{error:L.error});i().setCurrentSessionDataLsAndStore(null),p(C)};a(function(){return{workflowSessionCompletion:g}})},loadModules:function(){var u=Xb(sp().mark(function g(){var w,L,y,v;return sp().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return w=i().externalModulesNames,C.prev=1,C.next=4,ov_(w);case 4:return L=C.sent,a(function(){return{externalModules:L}}),C.abrupt("return",{});case 9:return C.prev=9,C.t0=C.catch(1),(y=i().wasmService)===null||y===void 0||y.shutdown(),i().resetWasmService(),i().resetProps(),v=new AV({errorCode:vV.MODULES_INSTANTIATION_FAILURE}),C.abrupt("return",{error:v});case 16:case"end":return C.stop()}},g,null,[[1,9]])}));function p(){return u.apply(this,arguments)}return p}(),setProcessingTemplate:function(p){var g=j_e(p.find(function(w){return w.templateId===Tee}));g.templateLayout=Gqe(g.templateLayout,i().layout),a({processingTransformedTemplate:g})},setIsProcessing:function(p){a({isProcessing:p})},_pushStep:function(){var u=Xb(sp().mark(function g(w,L){var y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return y=null,v=function(){var D=Xb(sp().mark(function j(){var E,z,Y,Z;return sp().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,i().wasmService.pushData(w,L);case 2:if(E=G.sent,z=null,E.code===4&&(z=W4.HTTP_ISSUE),E.code!==0&&E.code!==4&&(z=W4.PROVIDER_ERROR),z!==null&&(Y=new EV({errorCode:W4.HTTP_ISSUE}),Z=new D$({errorCode:T$.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:Y}),y=Z),E.code!==0){G.next=12;break}return y=null,G.abrupt("return",E);case 12:return G.abrupt("return",null);case 13:case"end":return G.stop()}},j)}));return function(){return D.apply(this,arguments)}}(),M=function(){return null},q.next=5,N_e(v,M);case 5:return q.abrupt("return",y?{error:y}:{});case 6:case"end":return q.stop()}},g)}));function p(g,w){return u.apply(this,arguments)}return p}(),_findStepById:function(p){var g=i().workflow;if(!g||!p)return null;var w=g.steps.find(function(L){return L.id===p});return w!=null?w:null},_waitingForNextStep:function(){var u=Xb(sp().mark(function g(){var w,L,y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return w=i().currentStepId,L=null,y=function(){var D=Xb(sp().mark(function j(){var E,z,Y,Z,H,G,ee,se,ge,Ie,ye,ne,_e,ae,le;return sp().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Pe.next=2,i().wasmService.getSessionState();case 2:if(Z=Pe.sent,H=(E=Z.data)===null||E===void 0?void 0:E.currentStep,G=(z=Z.data)===null||z===void 0?void 0:z.isProcessingFiles,ee=(Y=Z.data)===null||Y===void 0||(Y=Y.workflow)===null||Y===void 0?void 0:Y.steps,se=sg_(ee,H),ge=Z.code===4,Ie=Z.code!==0&&Z.code!==4,ye=Z.code===0&&(!Z.data.workflow||!Z.data.currentStep),ne=H&&H===w,_e=null,ee&&!se&&(_e=W4.NOT_DATA_TYPE),ge&&(_e=W4.HTTP_ISSUE),Ie&&(_e=W4.PROVIDER_ERROR),G&&(_e=W4.IS_PROCESSING),ne&&(_e=W4.SAME_STEP),ye&&(_e=W4.DECODING_FAILED),_e!==null&&(ae=new EV({errorCode:_e}),le=new D$({errorCode:T$.INTERNAL_ISSUE,underlyingBaseError:ae}),L=le),sv_(JSON.stringify({nextStep:H,isDataType:se,isProcessingFiles:G})),!(se&&!ne&&!G&&!ge&&!Ie&&!ye)){Pe.next=23;break}return L=null,Pe.abrupt("return",Z.data);case 23:return Pe.abrupt("return",null);case 24:case"end":return Pe.stop()}},j)}));return function(){return D.apply(this,arguments)}}(),v=function(){return null},q.next=6,N_e(y,v);case 6:if(M=q.sent,!L){q.next=9;break}return q.abrupt("return",{error:L});case 9:return q.abrupt("return",{workflow:M==null?void 0:M.workflow,nextStep:M==null?void 0:M.currentStep});case 10:case"end":return q.stop()}},g)}));function p(){return u.apply(this,arguments)}return p}(),setFinalStepAndStopProcess:function(p){var g=p||i().currentStepId;if(g){var w=i()._findStepById(g);w&&(i().workflowSessionCompletion({results:{finalStep:{id:w.id,name:w.name,final:w.final}}}),i().resetSession(),i().listener({eventType:LV.MESSAGE,message:IV.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var u=Xb(sp().mark(function g(w){var L,y,v,M,C,q,D,j,E;return sp().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(L=i().currentStepId,L){Y.next=3;break}return Y.abrupt("return");case 3:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){Y.next=7;break}return i().setFinalStepAndStopProcess(),Y.abrupt("return");case 7:if(!(w instanceof Ol)){Y.next=13;break}return y=w,v=new D$({errorCode:T$.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:y}),i().workflowSessionCompletion({error:v}),i().resetSession(),Y.abrupt("return");case 13:return Y.next=15,i()._pushStep(L,w);case 15:if(M=Y.sent,!M.error){Y.next=20;break}return i().workflowSessionCompletion({error:M.error}),i().resetSession(),Y.abrupt("return");case 20:return Y.next=22,i()._waitingForNextStep();case 22:if(C=Y.sent,!C.error){Y.next=27;break}return i().workflowSessionCompletion({error:C.error}),i().resetSession(),Y.abrupt("return");case 27:if(q=C.workflow,D=C.nextStep,i().setWorkflow(q),i().setLayout(q.client.layout),i().setProcessingTemplate(q.client.steps),j=i()._findStepById(D),E=function(H){return!!H&&Object.prototype.toString.call(H)==="[object Object]"&&H.templateId},!(j!=null&&j.final&&!E(j.client))){Y.next=37;break}return i().setFinalStepAndStopProcess(j.id),Y.abrupt("return");case 37:j!=null&&j.final&&E(j.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(D),i().setIsProcessing(!1);case 40:case"end":return Y.stop()}},g)}));function p(g){return u.apply(this,arguments)}return p}(),onChangeScreen:function(p){if(!p)return a(function(){return{currentScreenConfig:null}});var g=i().workflow,w=null;if(p===Tee&&i().processingTransformedTemplate!==null){var L=i().processingTransformedTemplate;L&&(w={templateId:L.templateId,templateLayout:L.templateLayout,dataSource:null})}else{var y,v,M=i()._findStepById(p);if(typeof(M==null||(y=M.client)===null||y===void 0?void 0:y.templateId)=="string"){var C;w={templateId:M.client.templateId,dataSource:(C=M.dataSource)!==null&&C!==void 0?C:null}}if(w){var q;w.sessionId=(q=i().currentSessionData)===null||q===void 0?void 0:q.sessionId,w.serviceToken=i().serviceToken}if(w&&lg_(M==null||(v=M.client)===null||v===void 0?void 0:v.templateLayout)){var D=Gqe(M.client.templateLayout,i().layout);D&&(w.templateLayout=D)}}var j=ag_(i().externalModules,g.steps,p);if(w===null||!j){var E=new D$({errorCode:T$.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:E}),a(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(p),a(function(){return{currentScreenConfig:w}})},deinitializationIdv:function(){var u=Xb(sp().mark(function g(){var w,L;return sp().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(w=i().wasmService)===null||w===void 0?void 0:w.shutdown();case 2:if(L=v.sent,i().resetWasmService(),i().externalModules.forEach(function(M){M.component.deinitialize&&M.component.isReady&&M.component.deinitialize()}),(L==null?void 0:L.code)!==0){v.next=7;break}return v.abrupt("return",{});case 7:return v.abrupt("return",{});case 8:case"end":return v.stop()}},g)}));function p(){return u.apply(this,arguments)}return p}(),resetSession:function(){return a(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 a(function(){return{wasmService:null}})}}};function ov_(r){return Jae.apply(this,arguments)}function Jae(){return Jae=Xb(sp().mark(function r(a){var i,u,p,g,w,L;return sp().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:i=[{id:I6.getIdentifier(),supportedTemplates:I6.getSupportedTemplates(),component:I6}],u=Yae(Yae({},qee.LIVENESS,function(){return Promise.resolve().then(()=>NJ_)}),qee.DOC_READER,function(){return Promise.resolve().then(()=>fPt)}),p=sp().mark(function M(){var C,q,D;return sp().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(C=w[g],q=function(){return u[C]()},!q){E.next=7;break}return E.next=5,q();case 5:D=E.sent,i.push({id:D.default.getIdentifier(),supportedTemplates:D.default.getSupportedTemplates(),component:D.default});case 7:case"end":return E.stop()}},M)}),g=0,w=a;case 4:if(!(g<w.length)){v.next=9;break}return v.delegateYield(p(),"t0",6);case 6:g++,v.next=4;break;case 9:return L=i.filter(function(M){return M!==null}),v.abrupt("return",L);case 11:case"end":return v.stop()}},r)})),Jae.apply(this,arguments)}function Pz(r){"@babel/helpers - typeof";return Pz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Pz(r)}function Eze(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function Kae(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Eze(Object(i),!0).forEach(function(u){cv_(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Eze(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function cv_(r,a,i){return(a=uv_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function uv_(r){var a=lv_(r,"string");return Pz(a)=="symbol"?a:a+""}function lv_(r,a){if(Pz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(Pz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}var Dd=nh_(function(){return Kae(Kae(Kae({},$g_.apply(void 0,arguments)),Dg_.apply(void 0,arguments)),iv_.apply(void 0,arguments))}),Nze=function(a){var i=a.children;return Sf.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:i})};function xz(r){"@babel/helpers - typeof";return xz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},xz(r)}function Vze(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function zze(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Vze(Object(i),!0).forEach(function(u){fv_(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Vze(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function fv_(r,a,i){return(a=pv_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function pv_(r){var a=dv_(r,"string");return xz(a)=="symbol"?a:a+""}function dv_(r,a){if(xz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(xz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}var hv_=function(){var a=Dd(function(D){return D.currentScreenConfig}),i=Dd(function(D){return D.pushStepWaitNextStepAndSet}),u=Dd(function(D){return D.processingTransformedTemplate}),p=Dd(function(D){return D.isProcessing}),g=Dd(function(D){return D.setIsProcessing}),w=Dd(function(D){return D.listener}),L=Dd(function(D){return D.externalModules}),y=Dd(function(D){return D.modulesConfig}),v=function(j,E){w({eventType:LV.MESSAGE,message:E,module:j})},M=function(j){g(j)},C=function(j){g(!1),i(j)},q=cr.useCallback(function(){if(!a)return null;var D=L.find(function(j){return j.supportedTemplates.includes(a.templateId)});if(D&&a)return Sf.jsx(D.component,{perform:C,moduleProps:a,modulesConfig:y,idvEventListener:v,isProcessing:M})},[a,L]);return!a&&!u?Sf.jsx(Zee,{direction:GZ.Ltr,children:Sf.jsx(Nze,{children:"Waiting for play... or process completed"})}):Sf.jsx(Sf.Fragment,{children:Sf.jsx(Zee,{direction:GZ.Ltr,children:Sf.jsxs(Sf.Fragment,{children:[p&&Sf.jsx(Nze,{children:u?Sf.jsx(I6,{perform:C,moduleProps:zze(zze({},u),{},{templateId:"PROGRESS"}),idvEventListener:v,isProcessing:M}):"Processing..."}),q()]})})})};function gv_(){return Sf.jsx(cr.StrictMode,{children:Sf.jsx(Td_,{children:Sf.jsx(hv_,{})})})}function $A(r){"@babel/helpers - typeof";return $A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},$A(r)}function wv_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function Fze(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,Zze(u.key),u)}}function $v_(r,a,i){return a&&Fze(r.prototype,a),i&&Fze(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function mv_(r,a,i){return a=Cz(a),yv_(r,ese()?Reflect.construct(a,[],Cz(r).constructor):a.apply(r,i))}function yv_(r,a){if(a&&($A(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lv_(r)}function Lv_(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Iv_(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(a&&a.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),a&&qz(r,a)}function Xae(r){var a=typeof Map=="function"?new Map:void 0;return Xae=function(u){if(u===null||!bv_(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(u))return a.get(u);a.set(u,p)}function p(){return vv_(u,arguments,Cz(this).constructor)}return p.prototype=Object.create(u.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),qz(p,u)},Xae(r)}function vv_(r,a,i){if(ese())return Reflect.construct.apply(null,arguments);var u=[null];u.push.apply(u,a);var p=new(r.bind.apply(r,u));return i&&qz(p,i.prototype),p}function ese(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(ese=function(){return!!r})()}function bv_(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch(a){return typeof r=="function"}}function qz(r,a){return qz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,u){return i.__proto__=u,i},qz(r,a)}function Cz(r){return Cz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Cz(r)}function Bze(r,a,i){return(a=Zze(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Zze(r){var a=Ov_(r,"string");return $A(a)=="symbol"?a:a+""}function Ov_(r,a){if($A(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if($A(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Sv_="*,::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%}",Hze=function(r){function a(){var i;return wv_(this,a),i=mv_(this,a),Bze(i,"_root",ed_.createRoot(i.attachShadow({mode:"open"}))),Bze(i,"_mounted",!1),i}return Iv_(a,r),$v_(a,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.130-nightly".trim())}},{key:"render",value:function(){this._root.render(Sf.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Sf.jsx("style",{nonce:Dd.getState().getNonce(),children:Sv_}),Sf.jsx(gv_,{})]}))}},{key:"disconnectedCallback",value:function(){var u=this;setTimeout(function(){u._mounted&&(u._mounted=!1,u._root.unmount(),Qae.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(Xae(HTMLElement));function hx(r){"@babel/helpers - typeof";return hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},hx(r)}function kL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */kL=function(){return a};var r,a={},i=Object.prototype,u=i.hasOwnProperty,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",w=p.asyncIterator||"@@asyncIterator",L=p.toStringTag||"@@toStringTag";function y(ne,_e,ae,le){return Object.defineProperty(ne,_e,{value:ae,enumerable:!le,configurable:!le,writable:!le})}try{y({},"")}catch(ne){y=function(ae,le,$e){return ae[le]=$e}}function v(ne,_e,ae,le){var $e=_e&&_e.prototype instanceof q?_e:q,Pe=Object.create($e.prototype);return y(Pe,"_invoke",function(Ee,r_,ue){var De=1;return function(Be,re){if(De===3)throw Error("Generator is already running");if(De===4){if(Be==="throw")throw re;return{value:r,done:!0}}for(ue.method=Be,ue.arg=re;;){var Re=ue.delegate;if(Re){var f_=ee(Re,ue);if(f_){if(f_===C)continue;return f_}}if(ue.method==="next")ue.sent=ue._sent=ue.arg;else if(ue.method==="throw"){if(De===1)throw De=4,ue.arg;ue.dispatchException(ue.arg)}else ue.method==="return"&&ue.abrupt("return",ue.arg);De=3;var g_=M(Ee,r_,ue);if(g_.type==="normal"){if(De=ue.done?4:2,g_.arg===C)continue;return{value:g_.arg,done:ue.done}}g_.type==="throw"&&(De=4,ue.method="throw",ue.arg=g_.arg)}}}(ne,ae,new Ie(le||[])),!0),Pe}function M(ne,_e,ae){try{return{type:"normal",arg:ne.call(_e,ae)}}catch(le){return{type:"throw",arg:le}}}a.wrap=v;var C={};function q(){}function D(){}function j(){}var E={};y(E,g,function(){return this});var z=Object.getPrototypeOf,Y=z&&z(z(ye([])));Y&&Y!==i&&u.call(Y,g)&&(E=Y);var Z=j.prototype=q.prototype=Object.create(E);function H(ne){["next","throw","return"].forEach(function(_e){y(ne,_e,function(ae){return this._invoke(_e,ae)})})}function G(ne,_e){function ae($e,Pe,Ee,r_){var ue=M(ne[$e],ne,Pe);if(ue.type!=="throw"){var De=ue.arg,Be=De.value;return Be&&hx(Be)=="object"&&u.call(Be,"__await")?_e.resolve(Be.__await).then(function(re){ae("next",re,Ee,r_)},function(re){ae("throw",re,Ee,r_)}):_e.resolve(Be).then(function(re){De.value=re,Ee(De)},function(re){return ae("throw",re,Ee,r_)})}r_(ue.arg)}var le;y(this,"_invoke",function($e,Pe){function Ee(){return new _e(function(r_,ue){ae($e,Pe,r_,ue)})}return le=le?le.then(Ee,Ee):Ee()},!0)}function ee(ne,_e){var ae=_e.method,le=ne.i[ae];if(le===r)return _e.delegate=null,ae==="throw"&&ne.i.return&&(_e.method="return",_e.arg=r,ee(ne,_e),_e.method==="throw")||ae!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),C;var $e=M(le,ne.i,_e.arg);if($e.type==="throw")return _e.method="throw",_e.arg=$e.arg,_e.delegate=null,C;var Pe=$e.arg;return Pe?Pe.done?(_e[ne.r]=Pe.value,_e.next=ne.n,_e.method!=="return"&&(_e.method="next",_e.arg=r),_e.delegate=null,C):Pe:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,C)}function se(ne){this.tryEntries.push(ne)}function ge(ne){var _e=ne[4]||{};_e.type="normal",_e.arg=r,ne[4]=_e}function Ie(ne){this.tryEntries=[[-1]],ne.forEach(se,this),this.reset(!0)}function ye(ne){if(ne!=null){var _e=ne[g];if(_e)return _e.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var ae=-1,le=function $e(){for(;++ae<ne.length;)if(u.call(ne,ae))return $e.value=ne[ae],$e.done=!1,$e;return $e.value=r,$e.done=!0,$e};return le.next=le}}throw new TypeError(hx(ne)+" is not iterable")}return D.prototype=j,y(Z,"constructor",j),y(j,"constructor",D),D.displayName=y(j,L,"GeneratorFunction"),a.isGeneratorFunction=function(ne){var _e=typeof ne=="function"&&ne.constructor;return!!_e&&(_e===D||(_e.displayName||_e.name)==="GeneratorFunction")},a.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,j):(ne.__proto__=j,y(ne,L,"GeneratorFunction")),ne.prototype=Object.create(Z),ne},a.awrap=function(ne){return{__await:ne}},H(G.prototype),y(G.prototype,w,function(){return this}),a.AsyncIterator=G,a.async=function(ne,_e,ae,le,$e){$e===void 0&&($e=Promise);var Pe=new G(v(ne,_e,ae,le),$e);return a.isGeneratorFunction(_e)?Pe:Pe.next().then(function(Ee){return Ee.done?Ee.value:Pe.next()})},H(Z),y(Z,L,"Generator"),y(Z,g,function(){return this}),y(Z,"toString",function(){return"[object Generator]"}),a.keys=function(ne){var _e=Object(ne),ae=[];for(var le in _e)ae.unshift(le);return function $e(){for(;ae.length;)if((le=ae.pop())in _e)return $e.value=le,$e.done=!1,$e;return $e.done=!0,$e}},a.values=ye,Ie.prototype={constructor:Ie,reset:function(_e){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ge),!_e)for(var ae in this)ae.charAt(0)==="t"&&u.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=r)},stop:function(){this.done=!0;var _e=this.tryEntries[0][4];if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ae=this;function le(Be){Ee.type="throw",Ee.arg=_e,ae.next=Be}for(var $e=ae.tryEntries.length-1;$e>=0;--$e){var Pe=this.tryEntries[$e],Ee=Pe[4],r_=this.prev,ue=Pe[1],De=Pe[2];if(Pe[0]===-1)return le("end"),!1;if(!ue&&!De)throw Error("try statement without catch or finally");if(Pe[0]!=null&&Pe[0]<=r_){if(r_<ue)return this.method="next",this.arg=r,le(ue),!0;if(r_<De)return le(De),!1}}},abrupt:function(_e,ae){for(var le=this.tryEntries.length-1;le>=0;--le){var $e=this.tryEntries[le];if($e[0]>-1&&$e[0]<=this.prev&&this.prev<$e[2]){var Pe=$e;break}}Pe&&(_e==="break"||_e==="continue")&&Pe[0]<=ae&&ae<=Pe[2]&&(Pe=null);var Ee=Pe?Pe[4]:{};return Ee.type=_e,Ee.arg=ae,Pe?(this.method="next",this.next=Pe[2],C):this.complete(Ee)},complete:function(_e,ae){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ae&&(this.next=ae),C},finish:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[2]===_e)return this.complete(le[4],le[3]),ge(le),C}},catch:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[0]===_e){var $e=le[4];if($e.type==="throw"){var Pe=$e.arg;ge(le)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(_e,ae,le){return this.delegate={i:ye(_e),r:ae,n:le},this.method==="next"&&(this.arg=r),C}},a}function Uze(r,a,i,u,p,g,w){try{var L=r[g](w),y=L.value}catch(v){return void i(v)}L.done?a(y):Promise.resolve(y).then(u,p)}function mA(r){return function(){var a=this,i=arguments;return new Promise(function(u,p){var g=r.apply(a,i);function w(y){Uze(g,u,p,w,L,"next",y)}function L(y){Uze(g,u,p,w,L,"throw",y)}w(void 0)})}}function kv_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function Mv_(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,xv_(u.key),u)}}function Pv_(r,a,i){return a&&Mv_(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function xv_(r){var a=qv_(r,"string");return hx(a)=="symbol"?a:a+""}function qv_(r,a){if(hx(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(hx(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Cv_=function(){function r(){kv_(this,r)}return Pv_(r,[{key:"initialize",value:function(){var a=mA(kL().mark(function u(p){var g;return kL().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return g=Dd.getState().initialize(p),L.abrupt("return",g);case 2:case"end":return L.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"configure",value:function(){var a=mA(kL().mark(function u(p){var g,w;return kL().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(typeof p=="string"){y.next=5;break}return y.next=3,Dd.getState().configure(p);case 3:return g=y.sent,y.abrupt("return",g);case 5:return y.next=7,Dd.getState().configureWithUrl(p);case 7:return w=y.sent,y.abrupt("return",w);case 9:case"end":return y.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var a=mA(kL().mark(function u(p){var g;return kL().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,Dd.getState().getWorkflows(p);case 2:return g=L.sent,L.abrupt("return",g);case 4:case"end":return L.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var a=mA(kL().mark(function u(p){var g,w;return kL().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return g=p.workflowId,y.next=3,Dd.getState().prepareWorkflowAndPrepareUi(g);case 3:return w=y.sent,y.abrupt("return",w);case 5:case"end":return y.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var a=mA(kL().mark(function u(p){var g,w,L,y;return kL().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return g=p.metadata,w=p.locale,L=dg_(w),M.next=4,Dd.getState().startNewSession(L,g);case 4:if(y=M.sent,!y.error){M.next=7;break}return M.abrupt("return",y);case 7:return M.abrupt("return",new Promise(function(C){var q=function(j){C(j)};Dd.getState().playWorkflow(q)}));case 8:case"end":return M.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var a=mA(kL().mark(function u(){var p;return kL().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Dd.getState().deinitialize();case 2:return p=w.sent,w.abrupt("return",p);case 4:case"end":return w.stop()}},u)}));function i(){return a.apply(this,arguments)}return i}()},{key:"version",get:function(){var i;return(i="2.3.130-nightly")!==null&&i!==void 0?i:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(i){Dd.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Dd.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){Dd.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return Dd.getState().getCurrentSessionId()}}])}(),Tv_=window.customElements.get("idv-flow");Tv_||window.customElements.define("idv-flow",Hze);var Dv_=Object.defineProperty,Rv_=Object.defineProperties,Av_=Object.getOwnPropertyDescriptors,Gze=Object.getOwnPropertySymbols,jv_=Object.prototype.hasOwnProperty,Ev_=Object.prototype.propertyIsEnumerable,Qze=(r,a,i)=>a in r?Dv_(r,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[a]=i,_se=(r,a)=>{for(var i in a||(a={}))jv_.call(a,i)&&Qze(r,i,a[i]);if(Gze)for(var i of Gze(a))Ev_.call(a,i)&&Qze(r,i,a[i]);return r},Nv_=(r,a)=>Rv_(r,Av_(a)),Nw=(r,a,i)=>new Promise((u,p)=>{var g=y=>{try{L(i.next(y))}catch(v){p(v)}},w=y=>{try{L(i.throw(y))}catch(v){p(v)}},L=y=>y.done?u(y.value):Promise.resolve(y.value).then(g,w);L((i=i.apply(r,a)).next())}),Wze=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Yze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jze={exports:{}},Tz={},Kze={exports:{}},Qo={},Xze;function Vv_(){if(Xze)return Qo;Xze=1;/**
|
|
203
|
+
`),u=new Blob([i],{type:"text/plain"}),p=window.URL.createObjectURL(u),g=document.createElement("a");g.download="log.txt",g.href=p,g.click(),window.URL.revokeObjectURL(p),this.cleanLogs()}}}])}(),Qae=new K4_;function px(r){"@babel/helpers - typeof";return px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},px(r)}function fu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */fu=function(){return a};var r,a={},i=Object.prototype,u=i.hasOwnProperty,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",w=p.asyncIterator||"@@asyncIterator",L=p.toStringTag||"@@toStringTag";function y(ne,_e,ae,le){return Object.defineProperty(ne,_e,{value:ae,enumerable:!le,configurable:!le,writable:!le})}try{y({},"")}catch(ne){y=function(ae,le,$e){return ae[le]=$e}}function v(ne,_e,ae,le){var $e=_e&&_e.prototype instanceof q?_e:q,Pe=Object.create($e.prototype);return y(Pe,"_invoke",function(Ee,r_,ue){var De=1;return function(Be,re){if(De===3)throw Error("Generator is already running");if(De===4){if(Be==="throw")throw re;return{value:r,done:!0}}for(ue.method=Be,ue.arg=re;;){var Re=ue.delegate;if(Re){var f_=ee(Re,ue);if(f_){if(f_===C)continue;return f_}}if(ue.method==="next")ue.sent=ue._sent=ue.arg;else if(ue.method==="throw"){if(De===1)throw De=4,ue.arg;ue.dispatchException(ue.arg)}else ue.method==="return"&&ue.abrupt("return",ue.arg);De=3;var g_=M(Ee,r_,ue);if(g_.type==="normal"){if(De=ue.done?4:2,g_.arg===C)continue;return{value:g_.arg,done:ue.done}}g_.type==="throw"&&(De=4,ue.method="throw",ue.arg=g_.arg)}}}(ne,ae,new Ie(le||[])),!0),Pe}function M(ne,_e,ae){try{return{type:"normal",arg:ne.call(_e,ae)}}catch(le){return{type:"throw",arg:le}}}a.wrap=v;var C={};function q(){}function D(){}function j(){}var E={};y(E,g,function(){return this});var z=Object.getPrototypeOf,Y=z&&z(z(ye([])));Y&&Y!==i&&u.call(Y,g)&&(E=Y);var Z=j.prototype=q.prototype=Object.create(E);function H(ne){["next","throw","return"].forEach(function(_e){y(ne,_e,function(ae){return this._invoke(_e,ae)})})}function G(ne,_e){function ae($e,Pe,Ee,r_){var ue=M(ne[$e],ne,Pe);if(ue.type!=="throw"){var De=ue.arg,Be=De.value;return Be&&px(Be)=="object"&&u.call(Be,"__await")?_e.resolve(Be.__await).then(function(re){ae("next",re,Ee,r_)},function(re){ae("throw",re,Ee,r_)}):_e.resolve(Be).then(function(re){De.value=re,Ee(De)},function(re){return ae("throw",re,Ee,r_)})}r_(ue.arg)}var le;y(this,"_invoke",function($e,Pe){function Ee(){return new _e(function(r_,ue){ae($e,Pe,r_,ue)})}return le=le?le.then(Ee,Ee):Ee()},!0)}function ee(ne,_e){var ae=_e.method,le=ne.i[ae];if(le===r)return _e.delegate=null,ae==="throw"&&ne.i.return&&(_e.method="return",_e.arg=r,ee(ne,_e),_e.method==="throw")||ae!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),C;var $e=M(le,ne.i,_e.arg);if($e.type==="throw")return _e.method="throw",_e.arg=$e.arg,_e.delegate=null,C;var Pe=$e.arg;return Pe?Pe.done?(_e[ne.r]=Pe.value,_e.next=ne.n,_e.method!=="return"&&(_e.method="next",_e.arg=r),_e.delegate=null,C):Pe:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,C)}function se(ne){this.tryEntries.push(ne)}function ge(ne){var _e=ne[4]||{};_e.type="normal",_e.arg=r,ne[4]=_e}function Ie(ne){this.tryEntries=[[-1]],ne.forEach(se,this),this.reset(!0)}function ye(ne){if(ne!=null){var _e=ne[g];if(_e)return _e.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var ae=-1,le=function $e(){for(;++ae<ne.length;)if(u.call(ne,ae))return $e.value=ne[ae],$e.done=!1,$e;return $e.value=r,$e.done=!0,$e};return le.next=le}}throw new TypeError(px(ne)+" is not iterable")}return D.prototype=j,y(Z,"constructor",j),y(j,"constructor",D),D.displayName=y(j,L,"GeneratorFunction"),a.isGeneratorFunction=function(ne){var _e=typeof ne=="function"&&ne.constructor;return!!_e&&(_e===D||(_e.displayName||_e.name)==="GeneratorFunction")},a.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,j):(ne.__proto__=j,y(ne,L,"GeneratorFunction")),ne.prototype=Object.create(Z),ne},a.awrap=function(ne){return{__await:ne}},H(G.prototype),y(G.prototype,w,function(){return this}),a.AsyncIterator=G,a.async=function(ne,_e,ae,le,$e){$e===void 0&&($e=Promise);var Pe=new G(v(ne,_e,ae,le),$e);return a.isGeneratorFunction(_e)?Pe:Pe.next().then(function(Ee){return Ee.done?Ee.value:Pe.next()})},H(Z),y(Z,L,"Generator"),y(Z,g,function(){return this}),y(Z,"toString",function(){return"[object Generator]"}),a.keys=function(ne){var _e=Object(ne),ae=[];for(var le in _e)ae.unshift(le);return function $e(){for(;ae.length;)if((le=ae.pop())in _e)return $e.value=le,$e.done=!1,$e;return $e.done=!0,$e}},a.values=ye,Ie.prototype={constructor:Ie,reset:function(_e){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ge),!_e)for(var ae in this)ae.charAt(0)==="t"&&u.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=r)},stop:function(){this.done=!0;var _e=this.tryEntries[0][4];if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ae=this;function le(Be){Ee.type="throw",Ee.arg=_e,ae.next=Be}for(var $e=ae.tryEntries.length-1;$e>=0;--$e){var Pe=this.tryEntries[$e],Ee=Pe[4],r_=this.prev,ue=Pe[1],De=Pe[2];if(Pe[0]===-1)return le("end"),!1;if(!ue&&!De)throw Error("try statement without catch or finally");if(Pe[0]!=null&&Pe[0]<=r_){if(r_<ue)return this.method="next",this.arg=r,le(ue),!0;if(r_<De)return le(De),!1}}},abrupt:function(_e,ae){for(var le=this.tryEntries.length-1;le>=0;--le){var $e=this.tryEntries[le];if($e[0]>-1&&$e[0]<=this.prev&&this.prev<$e[2]){var Pe=$e;break}}Pe&&(_e==="break"||_e==="continue")&&Pe[0]<=ae&&ae<=Pe[2]&&(Pe=null);var Ee=Pe?Pe[4]:{};return Ee.type=_e,Ee.arg=ae,Pe?(this.method="next",this.next=Pe[2],C):this.complete(Ee)},complete:function(_e,ae){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ae&&(this.next=ae),C},finish:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[2]===_e)return this.complete(le[4],le[3]),ge(le),C}},catch:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[0]===_e){var $e=le[4];if($e.type==="throw"){var Pe=$e.arg;ge(le)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(_e,ae,le){return this.delegate={i:ye(_e),r:ae,n:le},this.method==="next"&&(this.arg=r),C}},a}function Dze(r,a,i,u,p,g,w){try{var L=r[g](w),y=L.value}catch(v){return void i(v)}L.done?a(y):Promise.resolve(y).then(u,p)}function A$(r){return function(){var a=this,i=arguments;return new Promise(function(u,p){var g=r.apply(a,i);function w(y){Dze(g,u,p,w,L,"next",y)}function L(y){Dze(g,u,p,w,L,"throw",y)}w(void 0)})}}function X4_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function ev_(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,Rze(u.key),u)}}function _v_(r,a,i){return a&&ev_(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function wA(r,a,i){return(a=Rze(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Rze(r){var a=tv_(r,"string");return px(a)=="symbol"?a:a+""}function tv_(r,a){if(px(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(px(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Ew=Qae.create("wasm_idv"),rv_=function(){function r(a){X4_(this,r),wA(this,"_worker",null),wA(this,"_initialized",!1),wA(this,"_connectedToIdv",!1),wA(this,"_serviceRunning",!1),wA(this,"_userId",cg_(sd_)),wA(this,"_setErrorScreen",null),a&&(this._setErrorScreen=a)}return _v_(r,[{key:"init",value:function(){var a=A$(fu().mark(function u(){var p,g,w,L;return fu().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.prev=1,v.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-0ee1322f4//PlatformAdaptor.worker.js");case 4:return p=v.sent,v.next=7,p.blob();case 7:g=v.sent,w=URL.createObjectURL(g),this._worker=new Worker(w),v.next=15;break;case 12:v.prev=12,v.t0=v.catch(1),Ew("Creating worker error: ".concat(JSON.stringify(v.t0)));case 15:v.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){v.next=20;break}return v.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),v.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/d378d19-0ee1322f4/",preMain:!0});case 23:return L=v.sent,L.code===0&&Ew("Worker was created successfully"),v.abrupt("return",L);case 26:case"end":return v.stop()}},u,this,[[1,12]])}));function i(){return a.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var a=A$(fu().mark(function u(p){var g,w;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:xee.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:p.host,httpRetryCount:p.httpRetryCount||0,httpTimeoutMs:p.httpTimeoutMs||0,isSecure:(g=p.isSecure)!==null&&g!==void 0?g:!0,password:p.password,port:p.port?p.port:0,schema:p.schema?p.schema:"basic",userName:p.userName},preMain:!0});case 2:return w=y.sent,w.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),Ew("IdvWasmService result code: ".concat(w.code)),y.abrupt("return",w);case 6:case"end":return y.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var a=A$(fu().mark(function u(p){var g;return fu().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:xee.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:p},preMain:!0});case 2:return g=L.sent,Ew("Connection by URL result code: ".concat(g.code)),L.abrupt("return",g);case 5:case"end":return L.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var a=A$(fu().mark(function u(p,g,w){var L,y;return fu().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return L={workflowId:p,locale:g},w&&(ug_(w)?L.metadata=w:console.log("WARN (Idv):: metadata is not an object or an empty object")),M.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:L,preMain:!0});case 4:return y=M.sent,Ew("Start session result code: ".concat(y.code)),M.abrupt("return",y);case 7:case"end":return M.stop()}},u,this)}));function i(u,p,g){return a.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var a=A$(fu().mark(function u(p){var g,w;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return g={sessionId:p},y.next=3,this.sendMessage({continueParams:g,target:"custom",method:"continue_session",preMain:!0});case 3:return w=y.sent,Ew("Continue session result code: ".concat(w.code)),y.abrupt("return",w);case 6:case"end":return y.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var a=A$(fu().mark(function u(){var p,g,w=arguments;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p=w.length>0&&w[0]!==void 0?w[0]:{limit:0,skip:0},y.next=3,this.sendMessage({workflowsParams:p,target:"custom",method:"list_workflows",preMain:!0});case 3:return g=y.sent,Ew("listWorkflows result code: ".concat(g.code)),y.abrupt("return",g);case 6:case"end":return y.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return p=w.sent,Ew("getHealth result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"getServiceToken",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return p=w.sent,Ew("getServiceToken result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return p=w.sent,Ew("abandonSession result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var a=A$(fu().mark(function u(p){var g;return fu().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.sendMessage({workflowIdParams:{workflowId:p},target:"custom",method:"get_workflow",preMain:!0});case 2:return g=L.sent,Ew("getWorkflow result code: ".concat(g.code)),L.abrupt("return",g);case 5:case"end":return L.stop()}},u,this)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var a=A$(fu().mark(function u(p,g){var w;return fu().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:g,stage:0,step:p},preMain:!0});case 2:return w=y.sent,Ew("pushData result code: ".concat(w.code)),y.abrupt("return",w);case 5:case"end":return y.stop()}},u,this)}));function i(u,p){return a.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return p=w.sent,Ew("getSessionState result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return p=w.sent,Ew("waitForSessionUpdate result code: ".concat(p.code)),w.abrupt("return",p);case 5:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return p=w.sent,this._connectedToIdv=!1,this._serviceRunning=!1,Ew("disconnect result code: ".concat(p.code)),w.abrupt("return",p);case 7:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var a=A$(fu().mark(function u(p){var g=this;return fu().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.abrupt("return",new Promise(function(y,v){if(!g._worker)return v();g._worker.onmessage=function(M){var C=M.data.target;if(C==="stdout"){Ew(JSON.stringify(M.data.content));return}if(C==="custom"){var q=M.data,D=q.method,j=q.data;D==="onRuntimeInitialized"&&(g._initialized=!0),y(j)}if(C==="stderr"){var E=M.data.content;Ew(JSON.stringify(E)),g._setErrorScreen&&g._setErrorScreen(E)}},g._worker.postMessage(p)}));case 1:case"end":return L.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var a=A$(fu().mark(function u(){var p;return fu().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(this._worker){w.next=2;break}return w.abrupt("return",{code:0});case 2:if(this._connectedToIdv){w.next=5;break}return this.terminateWorker(),w.abrupt("return",{code:0});case 5:return w.next=7,this.disconnect();case 7:return p=w.sent,this.terminateWorker(),w.abrupt("return",p);case 10:case"end":return w.stop()}},u,this)}));function i(){return a.apply(this,arguments)}return i}()}])}();function dx(r){"@babel/helpers - typeof";return dx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},dx(r)}function Aze(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function Wae(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Aze(Object(i),!0).forEach(function(u){Yae(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Aze(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function Yae(r,a,i){return(a=nv_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function nv_(r){var a=av_(r,"string");return dx(a)=="symbol"?a:a+""}function av_(r,a){if(dx(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(dx(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}function sp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */sp=function(){return a};var r,a={},i=Object.prototype,u=i.hasOwnProperty,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",w=p.asyncIterator||"@@asyncIterator",L=p.toStringTag||"@@toStringTag";function y(ne,_e,ae,le){return Object.defineProperty(ne,_e,{value:ae,enumerable:!le,configurable:!le,writable:!le})}try{y({},"")}catch(ne){y=function(ae,le,$e){return ae[le]=$e}}function v(ne,_e,ae,le){var $e=_e&&_e.prototype instanceof q?_e:q,Pe=Object.create($e.prototype);return y(Pe,"_invoke",function(Ee,r_,ue){var De=1;return function(Be,re){if(De===3)throw Error("Generator is already running");if(De===4){if(Be==="throw")throw re;return{value:r,done:!0}}for(ue.method=Be,ue.arg=re;;){var Re=ue.delegate;if(Re){var f_=ee(Re,ue);if(f_){if(f_===C)continue;return f_}}if(ue.method==="next")ue.sent=ue._sent=ue.arg;else if(ue.method==="throw"){if(De===1)throw De=4,ue.arg;ue.dispatchException(ue.arg)}else ue.method==="return"&&ue.abrupt("return",ue.arg);De=3;var g_=M(Ee,r_,ue);if(g_.type==="normal"){if(De=ue.done?4:2,g_.arg===C)continue;return{value:g_.arg,done:ue.done}}g_.type==="throw"&&(De=4,ue.method="throw",ue.arg=g_.arg)}}}(ne,ae,new Ie(le||[])),!0),Pe}function M(ne,_e,ae){try{return{type:"normal",arg:ne.call(_e,ae)}}catch(le){return{type:"throw",arg:le}}}a.wrap=v;var C={};function q(){}function D(){}function j(){}var E={};y(E,g,function(){return this});var z=Object.getPrototypeOf,Y=z&&z(z(ye([])));Y&&Y!==i&&u.call(Y,g)&&(E=Y);var Z=j.prototype=q.prototype=Object.create(E);function H(ne){["next","throw","return"].forEach(function(_e){y(ne,_e,function(ae){return this._invoke(_e,ae)})})}function G(ne,_e){function ae($e,Pe,Ee,r_){var ue=M(ne[$e],ne,Pe);if(ue.type!=="throw"){var De=ue.arg,Be=De.value;return Be&&dx(Be)=="object"&&u.call(Be,"__await")?_e.resolve(Be.__await).then(function(re){ae("next",re,Ee,r_)},function(re){ae("throw",re,Ee,r_)}):_e.resolve(Be).then(function(re){De.value=re,Ee(De)},function(re){return ae("throw",re,Ee,r_)})}r_(ue.arg)}var le;y(this,"_invoke",function($e,Pe){function Ee(){return new _e(function(r_,ue){ae($e,Pe,r_,ue)})}return le=le?le.then(Ee,Ee):Ee()},!0)}function ee(ne,_e){var ae=_e.method,le=ne.i[ae];if(le===r)return _e.delegate=null,ae==="throw"&&ne.i.return&&(_e.method="return",_e.arg=r,ee(ne,_e),_e.method==="throw")||ae!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),C;var $e=M(le,ne.i,_e.arg);if($e.type==="throw")return _e.method="throw",_e.arg=$e.arg,_e.delegate=null,C;var Pe=$e.arg;return Pe?Pe.done?(_e[ne.r]=Pe.value,_e.next=ne.n,_e.method!=="return"&&(_e.method="next",_e.arg=r),_e.delegate=null,C):Pe:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,C)}function se(ne){this.tryEntries.push(ne)}function ge(ne){var _e=ne[4]||{};_e.type="normal",_e.arg=r,ne[4]=_e}function Ie(ne){this.tryEntries=[[-1]],ne.forEach(se,this),this.reset(!0)}function ye(ne){if(ne!=null){var _e=ne[g];if(_e)return _e.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var ae=-1,le=function $e(){for(;++ae<ne.length;)if(u.call(ne,ae))return $e.value=ne[ae],$e.done=!1,$e;return $e.value=r,$e.done=!0,$e};return le.next=le}}throw new TypeError(dx(ne)+" is not iterable")}return D.prototype=j,y(Z,"constructor",j),y(j,"constructor",D),D.displayName=y(j,L,"GeneratorFunction"),a.isGeneratorFunction=function(ne){var _e=typeof ne=="function"&&ne.constructor;return!!_e&&(_e===D||(_e.displayName||_e.name)==="GeneratorFunction")},a.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,j):(ne.__proto__=j,y(ne,L,"GeneratorFunction")),ne.prototype=Object.create(Z),ne},a.awrap=function(ne){return{__await:ne}},H(G.prototype),y(G.prototype,w,function(){return this}),a.AsyncIterator=G,a.async=function(ne,_e,ae,le,$e){$e===void 0&&($e=Promise);var Pe=new G(v(ne,_e,ae,le),$e);return a.isGeneratorFunction(_e)?Pe:Pe.next().then(function(Ee){return Ee.done?Ee.value:Pe.next()})},H(Z),y(Z,L,"Generator"),y(Z,g,function(){return this}),y(Z,"toString",function(){return"[object Generator]"}),a.keys=function(ne){var _e=Object(ne),ae=[];for(var le in _e)ae.unshift(le);return function $e(){for(;ae.length;)if((le=ae.pop())in _e)return $e.value=le,$e.done=!1,$e;return $e.done=!0,$e}},a.values=ye,Ie.prototype={constructor:Ie,reset:function(_e){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ge),!_e)for(var ae in this)ae.charAt(0)==="t"&&u.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=r)},stop:function(){this.done=!0;var _e=this.tryEntries[0][4];if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ae=this;function le(Be){Ee.type="throw",Ee.arg=_e,ae.next=Be}for(var $e=ae.tryEntries.length-1;$e>=0;--$e){var Pe=this.tryEntries[$e],Ee=Pe[4],r_=this.prev,ue=Pe[1],De=Pe[2];if(Pe[0]===-1)return le("end"),!1;if(!ue&&!De)throw Error("try statement without catch or finally");if(Pe[0]!=null&&Pe[0]<=r_){if(r_<ue)return this.method="next",this.arg=r,le(ue),!0;if(r_<De)return le(De),!1}}},abrupt:function(_e,ae){for(var le=this.tryEntries.length-1;le>=0;--le){var $e=this.tryEntries[le];if($e[0]>-1&&$e[0]<=this.prev&&this.prev<$e[2]){var Pe=$e;break}}Pe&&(_e==="break"||_e==="continue")&&Pe[0]<=ae&&ae<=Pe[2]&&(Pe=null);var Ee=Pe?Pe[4]:{};return Ee.type=_e,Ee.arg=ae,Pe?(this.method="next",this.next=Pe[2],C):this.complete(Ee)},complete:function(_e,ae){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ae&&(this.next=ae),C},finish:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[2]===_e)return this.complete(le[4],le[3]),ge(le),C}},catch:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[0]===_e){var $e=le[4];if($e.type==="throw"){var Pe=$e.arg;ge(le)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(_e,ae,le){return this.delegate={i:ye(_e),r:ae,n:le},this.method==="next"&&(this.arg=r),C}},a}function jze(r,a,i,u,p,g,w){try{var L=r[g](w),y=L.value}catch(v){return void i(v)}L.done?a(y):Promise.resolve(y).then(u,p)}function Xb(r){return function(){var a=this,i=arguments;return new Promise(function(u,p){var g=r.apply(a,i);function w(y){jze(g,u,p,w,L,"next",y)}function L(y){jze(g,u,p,w,L,"throw",y)}w(void 0)})}}var sv_=Qae.create("store_idv"),iv_=function(a,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var u=Xb(sp().mark(function g(){var w;return sp().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return w=new rv_,y.next=3,w.init();case 3:a({wasmService:w});case 4:case"end":return y.stop()}},g)}));function p(){return u.apply(this,arguments)}return p}(),setFinalWaitingUi:function(p){a({isFinalWaitingUi:p})},connectToIdv:function(p){return Xb(sp().mark(function g(){var w,L,y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(!((w=i().wasmService)!==null&&w!==void 0&&w.isServiceConnected())){q.next=3;break}return q.next=3,(L=i().wasmService)===null||L===void 0?void 0:L.disconnect();case 3:return q.next=5,i().wasmService.prepareAndConnect(p);case 5:if(y=q.sent,v=null,y.code===4&&(v=XP.HTTP_ISSUE),y.code!==0&&y.code!==4&&(v=XP.PROVIDER_ERROR),v===null){q.next=12;break}return M=new jV({errorCode:v}),q.abrupt("return",{error:M});case 12:return q.abrupt("return",{});case 13:case"end":return q.stop()}},g)}))()},connectByUrl:function(p){return Xb(sp().mark(function g(){var w,L,y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return w=i().wasmService,q.next=3,w.connectByUrl(p);case 3:if(L=q.sent,y=null,L.code===4&&(y=XP.HTTP_ISSUE),L.code!==0&&L.code!==4&&(y=XP.PROVIDER_ERROR),y===null){q.next=13;break}return v=new jV({errorCode:y}),M=new XZ({errorCode:Cee.CONNECTION_ISSUE,underlyingBaseError:v}),q.abrupt("return",{workflows:[],error:M});case 13:return q.abrupt("return",{workflows:L.data});case 14:case"end":return q.stop()}},g)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(p){var g=function(L){var y,v=(y=i().currentSessionData)===null||y===void 0?void 0:y.sessionId,M=Wae(Wae({},L.results),{},{sessionId:v}),C=Wae({results:M},L.error&&{error:L.error});i().setCurrentSessionDataLsAndStore(null),p(C)};a(function(){return{workflowSessionCompletion:g}})},loadModules:function(){var u=Xb(sp().mark(function g(){var w,L,y,v;return sp().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return w=i().externalModulesNames,C.prev=1,C.next=4,ov_(w);case 4:return L=C.sent,a(function(){return{externalModules:L}}),C.abrupt("return",{});case 9:return C.prev=9,C.t0=C.catch(1),(y=i().wasmService)===null||y===void 0||y.shutdown(),i().resetWasmService(),i().resetProps(),v=new AV({errorCode:vV.MODULES_INSTANTIATION_FAILURE}),C.abrupt("return",{error:v});case 16:case"end":return C.stop()}},g,null,[[1,9]])}));function p(){return u.apply(this,arguments)}return p}(),setProcessingTemplate:function(p){var g=j_e(p.find(function(w){return w.templateId===Tee}));g.templateLayout=Gqe(g.templateLayout,i().layout),a({processingTransformedTemplate:g})},setIsProcessing:function(p){a({isProcessing:p})},_pushStep:function(){var u=Xb(sp().mark(function g(w,L){var y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return y=null,v=function(){var D=Xb(sp().mark(function j(){var E,z,Y,Z;return sp().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,i().wasmService.pushData(w,L);case 2:if(E=G.sent,z=null,E.code===4&&(z=W4.HTTP_ISSUE),E.code!==0&&E.code!==4&&(z=W4.PROVIDER_ERROR),z!==null&&(Y=new EV({errorCode:W4.HTTP_ISSUE}),Z=new D$({errorCode:T$.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:Y}),y=Z),E.code!==0){G.next=12;break}return y=null,G.abrupt("return",E);case 12:return G.abrupt("return",null);case 13:case"end":return G.stop()}},j)}));return function(){return D.apply(this,arguments)}}(),M=function(){return null},q.next=5,N_e(v,M);case 5:return q.abrupt("return",y?{error:y}:{});case 6:case"end":return q.stop()}},g)}));function p(g,w){return u.apply(this,arguments)}return p}(),_findStepById:function(p){var g=i().workflow;if(!g||!p)return null;var w=g.steps.find(function(L){return L.id===p});return w!=null?w:null},_waitingForNextStep:function(){var u=Xb(sp().mark(function g(){var w,L,y,v,M;return sp().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return w=i().currentStepId,L=null,y=function(){var D=Xb(sp().mark(function j(){var E,z,Y,Z,H,G,ee,se,ge,Ie,ye,ne,_e,ae,le;return sp().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Pe.next=2,i().wasmService.getSessionState();case 2:if(Z=Pe.sent,H=(E=Z.data)===null||E===void 0?void 0:E.currentStep,G=(z=Z.data)===null||z===void 0?void 0:z.isProcessingFiles,ee=(Y=Z.data)===null||Y===void 0||(Y=Y.workflow)===null||Y===void 0?void 0:Y.steps,se=sg_(ee,H),ge=Z.code===4,Ie=Z.code!==0&&Z.code!==4,ye=Z.code===0&&(!Z.data.workflow||!Z.data.currentStep),ne=H&&H===w,_e=null,ee&&!se&&(_e=W4.NOT_DATA_TYPE),ge&&(_e=W4.HTTP_ISSUE),Ie&&(_e=W4.PROVIDER_ERROR),G&&(_e=W4.IS_PROCESSING),ne&&(_e=W4.SAME_STEP),ye&&(_e=W4.DECODING_FAILED),_e!==null&&(ae=new EV({errorCode:_e}),le=new D$({errorCode:T$.INTERNAL_ISSUE,underlyingBaseError:ae}),L=le),sv_(JSON.stringify({nextStep:H,isDataType:se,isProcessingFiles:G})),!(se&&!ne&&!G&&!ge&&!Ie&&!ye)){Pe.next=23;break}return L=null,Pe.abrupt("return",Z.data);case 23:return Pe.abrupt("return",null);case 24:case"end":return Pe.stop()}},j)}));return function(){return D.apply(this,arguments)}}(),v=function(){return null},q.next=6,N_e(y,v);case 6:if(M=q.sent,!L){q.next=9;break}return q.abrupt("return",{error:L});case 9:return q.abrupt("return",{workflow:M==null?void 0:M.workflow,nextStep:M==null?void 0:M.currentStep});case 10:case"end":return q.stop()}},g)}));function p(){return u.apply(this,arguments)}return p}(),setFinalStepAndStopProcess:function(p){var g=p||i().currentStepId;if(g){var w=i()._findStepById(g);w&&(i().workflowSessionCompletion({results:{finalStep:{id:w.id,name:w.name,final:w.final}}}),i().resetSession(),i().listener({eventType:LV.MESSAGE,message:IV.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var u=Xb(sp().mark(function g(w){var L,y,v,M,C,q,D,j,E;return sp().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(L=i().currentStepId,L){Y.next=3;break}return Y.abrupt("return");case 3:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){Y.next=7;break}return i().setFinalStepAndStopProcess(),Y.abrupt("return");case 7:if(!(w instanceof Ol)){Y.next=13;break}return y=w,v=new D$({errorCode:T$.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:y}),i().workflowSessionCompletion({error:v}),i().resetSession(),Y.abrupt("return");case 13:return Y.next=15,i()._pushStep(L,w);case 15:if(M=Y.sent,!M.error){Y.next=20;break}return i().workflowSessionCompletion({error:M.error}),i().resetSession(),Y.abrupt("return");case 20:return Y.next=22,i()._waitingForNextStep();case 22:if(C=Y.sent,!C.error){Y.next=27;break}return i().workflowSessionCompletion({error:C.error}),i().resetSession(),Y.abrupt("return");case 27:if(q=C.workflow,D=C.nextStep,i().setWorkflow(q),i().setLayout(q.client.layout),i().setProcessingTemplate(q.client.steps),j=i()._findStepById(D),E=function(H){return!!H&&Object.prototype.toString.call(H)==="[object Object]"&&H.templateId},!(j!=null&&j.final&&!E(j.client))){Y.next=37;break}return i().setFinalStepAndStopProcess(j.id),Y.abrupt("return");case 37:j!=null&&j.final&&E(j.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(D),i().setIsProcessing(!1);case 40:case"end":return Y.stop()}},g)}));function p(g){return u.apply(this,arguments)}return p}(),onChangeScreen:function(p){if(!p)return a(function(){return{currentScreenConfig:null}});var g=i().workflow,w=null;if(p===Tee&&i().processingTransformedTemplate!==null){var L=i().processingTransformedTemplate;L&&(w={templateId:L.templateId,templateLayout:L.templateLayout,dataSource:null})}else{var y,v,M=i()._findStepById(p);if(typeof(M==null||(y=M.client)===null||y===void 0?void 0:y.templateId)=="string"){var C;w={templateId:M.client.templateId,dataSource:(C=M.dataSource)!==null&&C!==void 0?C:null}}if(w){var q;w.sessionId=(q=i().currentSessionData)===null||q===void 0?void 0:q.sessionId,w.serviceToken=i().serviceToken}if(w&&lg_(M==null||(v=M.client)===null||v===void 0?void 0:v.templateLayout)){var D=Gqe(M.client.templateLayout,i().layout);D&&(w.templateLayout=D)}}var j=ag_(i().externalModules,g.steps,p);if(w===null||!j){var E=new D$({errorCode:T$.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:E}),a(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(p),a(function(){return{currentScreenConfig:w}})},deinitializationIdv:function(){var u=Xb(sp().mark(function g(){var w,L;return sp().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(w=i().wasmService)===null||w===void 0?void 0:w.shutdown();case 2:if(L=v.sent,i().resetWasmService(),i().externalModules.forEach(function(M){M.component.deinitialize&&M.component.isReady&&M.component.deinitialize()}),(L==null?void 0:L.code)!==0){v.next=7;break}return v.abrupt("return",{});case 7:return v.abrupt("return",{});case 8:case"end":return v.stop()}},g)}));function p(){return u.apply(this,arguments)}return p}(),resetSession:function(){return a(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 a(function(){return{wasmService:null}})}}};function ov_(r){return Jae.apply(this,arguments)}function Jae(){return Jae=Xb(sp().mark(function r(a){var i,u,p,g,w,L;return sp().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:i=[{id:I6.getIdentifier(),supportedTemplates:I6.getSupportedTemplates(),component:I6}],u=Yae(Yae({},qee.LIVENESS,function(){return Promise.resolve().then(()=>NJ_)}),qee.DOC_READER,function(){return Promise.resolve().then(()=>fPt)}),p=sp().mark(function M(){var C,q,D;return sp().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(C=w[g],q=function(){return u[C]()},!q){E.next=7;break}return E.next=5,q();case 5:D=E.sent,i.push({id:D.default.getIdentifier(),supportedTemplates:D.default.getSupportedTemplates(),component:D.default});case 7:case"end":return E.stop()}},M)}),g=0,w=a;case 4:if(!(g<w.length)){v.next=9;break}return v.delegateYield(p(),"t0",6);case 6:g++,v.next=4;break;case 9:return L=i.filter(function(M){return M!==null}),v.abrupt("return",L);case 11:case"end":return v.stop()}},r)})),Jae.apply(this,arguments)}function Pz(r){"@babel/helpers - typeof";return Pz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Pz(r)}function Eze(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function Kae(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Eze(Object(i),!0).forEach(function(u){cv_(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Eze(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function cv_(r,a,i){return(a=uv_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function uv_(r){var a=lv_(r,"string");return Pz(a)=="symbol"?a:a+""}function lv_(r,a){if(Pz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(Pz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}var Dd=nh_(function(){return Kae(Kae(Kae({},$g_.apply(void 0,arguments)),Dg_.apply(void 0,arguments)),iv_.apply(void 0,arguments))}),Nze=function(a){var i=a.children;return Sf.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:i})};function xz(r){"@babel/helpers - typeof";return xz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},xz(r)}function Vze(r,a){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);a&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(r,p).enumerable})),i.push.apply(i,u)}return i}function zze(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Vze(Object(i),!0).forEach(function(u){fv_(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Vze(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function fv_(r,a,i){return(a=pv_(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function pv_(r){var a=dv_(r,"string");return xz(a)=="symbol"?a:a+""}function dv_(r,a){if(xz(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(xz(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}var hv_=function(){var a=Dd(function(D){return D.currentScreenConfig}),i=Dd(function(D){return D.pushStepWaitNextStepAndSet}),u=Dd(function(D){return D.processingTransformedTemplate}),p=Dd(function(D){return D.isProcessing}),g=Dd(function(D){return D.setIsProcessing}),w=Dd(function(D){return D.listener}),L=Dd(function(D){return D.externalModules}),y=Dd(function(D){return D.modulesConfig}),v=function(j,E){w({eventType:LV.MESSAGE,message:E,module:j})},M=function(j){g(j)},C=function(j){g(!1),i(j)},q=cr.useCallback(function(){if(!a)return null;var D=L.find(function(j){return j.supportedTemplates.includes(a.templateId)});if(D&&a)return Sf.jsx(D.component,{perform:C,moduleProps:a,modulesConfig:y,idvEventListener:v,isProcessing:M})},[a,L]);return!a&&!u?Sf.jsx(Zee,{direction:GZ.Ltr,children:Sf.jsx(Nze,{children:"Waiting for play... or process completed"})}):Sf.jsx(Sf.Fragment,{children:Sf.jsx(Zee,{direction:GZ.Ltr,children:Sf.jsxs(Sf.Fragment,{children:[p&&Sf.jsx(Nze,{children:u?Sf.jsx(I6,{perform:C,moduleProps:zze(zze({},u),{},{templateId:"PROGRESS"}),idvEventListener:v,isProcessing:M}):"Processing..."}),q()]})})})};function gv_(){return Sf.jsx(cr.StrictMode,{children:Sf.jsx(Td_,{children:Sf.jsx(hv_,{})})})}function $A(r){"@babel/helpers - typeof";return $A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},$A(r)}function wv_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function Fze(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,Zze(u.key),u)}}function $v_(r,a,i){return a&&Fze(r.prototype,a),i&&Fze(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function mv_(r,a,i){return a=Cz(a),yv_(r,ese()?Reflect.construct(a,[],Cz(r).constructor):a.apply(r,i))}function yv_(r,a){if(a&&($A(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lv_(r)}function Lv_(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Iv_(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(a&&a.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),a&&qz(r,a)}function Xae(r){var a=typeof Map=="function"?new Map:void 0;return Xae=function(u){if(u===null||!bv_(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(u))return a.get(u);a.set(u,p)}function p(){return vv_(u,arguments,Cz(this).constructor)}return p.prototype=Object.create(u.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),qz(p,u)},Xae(r)}function vv_(r,a,i){if(ese())return Reflect.construct.apply(null,arguments);var u=[null];u.push.apply(u,a);var p=new(r.bind.apply(r,u));return i&&qz(p,i.prototype),p}function ese(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(ese=function(){return!!r})()}function bv_(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch(a){return typeof r=="function"}}function qz(r,a){return qz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,u){return i.__proto__=u,i},qz(r,a)}function Cz(r){return Cz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Cz(r)}function Bze(r,a,i){return(a=Zze(a))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Zze(r){var a=Ov_(r,"string");return $A(a)=="symbol"?a:a+""}function Ov_(r,a){if($A(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if($A(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Sv_="*,::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%}",Hze=function(r){function a(){var i;return wv_(this,a),i=mv_(this,a),Bze(i,"_root",ed_.createRoot(i.attachShadow({mode:"open"}))),Bze(i,"_mounted",!1),i}return Iv_(a,r),$v_(a,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.131-nightly".trim())}},{key:"render",value:function(){this._root.render(Sf.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Sf.jsx("style",{nonce:Dd.getState().getNonce(),children:Sv_}),Sf.jsx(gv_,{})]}))}},{key:"disconnectedCallback",value:function(){var u=this;setTimeout(function(){u._mounted&&(u._mounted=!1,u._root.unmount(),Qae.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(Xae(HTMLElement));function hx(r){"@babel/helpers - typeof";return hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},hx(r)}function kL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */kL=function(){return a};var r,a={},i=Object.prototype,u=i.hasOwnProperty,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",w=p.asyncIterator||"@@asyncIterator",L=p.toStringTag||"@@toStringTag";function y(ne,_e,ae,le){return Object.defineProperty(ne,_e,{value:ae,enumerable:!le,configurable:!le,writable:!le})}try{y({},"")}catch(ne){y=function(ae,le,$e){return ae[le]=$e}}function v(ne,_e,ae,le){var $e=_e&&_e.prototype instanceof q?_e:q,Pe=Object.create($e.prototype);return y(Pe,"_invoke",function(Ee,r_,ue){var De=1;return function(Be,re){if(De===3)throw Error("Generator is already running");if(De===4){if(Be==="throw")throw re;return{value:r,done:!0}}for(ue.method=Be,ue.arg=re;;){var Re=ue.delegate;if(Re){var f_=ee(Re,ue);if(f_){if(f_===C)continue;return f_}}if(ue.method==="next")ue.sent=ue._sent=ue.arg;else if(ue.method==="throw"){if(De===1)throw De=4,ue.arg;ue.dispatchException(ue.arg)}else ue.method==="return"&&ue.abrupt("return",ue.arg);De=3;var g_=M(Ee,r_,ue);if(g_.type==="normal"){if(De=ue.done?4:2,g_.arg===C)continue;return{value:g_.arg,done:ue.done}}g_.type==="throw"&&(De=4,ue.method="throw",ue.arg=g_.arg)}}}(ne,ae,new Ie(le||[])),!0),Pe}function M(ne,_e,ae){try{return{type:"normal",arg:ne.call(_e,ae)}}catch(le){return{type:"throw",arg:le}}}a.wrap=v;var C={};function q(){}function D(){}function j(){}var E={};y(E,g,function(){return this});var z=Object.getPrototypeOf,Y=z&&z(z(ye([])));Y&&Y!==i&&u.call(Y,g)&&(E=Y);var Z=j.prototype=q.prototype=Object.create(E);function H(ne){["next","throw","return"].forEach(function(_e){y(ne,_e,function(ae){return this._invoke(_e,ae)})})}function G(ne,_e){function ae($e,Pe,Ee,r_){var ue=M(ne[$e],ne,Pe);if(ue.type!=="throw"){var De=ue.arg,Be=De.value;return Be&&hx(Be)=="object"&&u.call(Be,"__await")?_e.resolve(Be.__await).then(function(re){ae("next",re,Ee,r_)},function(re){ae("throw",re,Ee,r_)}):_e.resolve(Be).then(function(re){De.value=re,Ee(De)},function(re){return ae("throw",re,Ee,r_)})}r_(ue.arg)}var le;y(this,"_invoke",function($e,Pe){function Ee(){return new _e(function(r_,ue){ae($e,Pe,r_,ue)})}return le=le?le.then(Ee,Ee):Ee()},!0)}function ee(ne,_e){var ae=_e.method,le=ne.i[ae];if(le===r)return _e.delegate=null,ae==="throw"&&ne.i.return&&(_e.method="return",_e.arg=r,ee(ne,_e),_e.method==="throw")||ae!=="return"&&(_e.method="throw",_e.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),C;var $e=M(le,ne.i,_e.arg);if($e.type==="throw")return _e.method="throw",_e.arg=$e.arg,_e.delegate=null,C;var Pe=$e.arg;return Pe?Pe.done?(_e[ne.r]=Pe.value,_e.next=ne.n,_e.method!=="return"&&(_e.method="next",_e.arg=r),_e.delegate=null,C):Pe:(_e.method="throw",_e.arg=new TypeError("iterator result is not an object"),_e.delegate=null,C)}function se(ne){this.tryEntries.push(ne)}function ge(ne){var _e=ne[4]||{};_e.type="normal",_e.arg=r,ne[4]=_e}function Ie(ne){this.tryEntries=[[-1]],ne.forEach(se,this),this.reset(!0)}function ye(ne){if(ne!=null){var _e=ne[g];if(_e)return _e.call(ne);if(typeof ne.next=="function")return ne;if(!isNaN(ne.length)){var ae=-1,le=function $e(){for(;++ae<ne.length;)if(u.call(ne,ae))return $e.value=ne[ae],$e.done=!1,$e;return $e.value=r,$e.done=!0,$e};return le.next=le}}throw new TypeError(hx(ne)+" is not iterable")}return D.prototype=j,y(Z,"constructor",j),y(j,"constructor",D),D.displayName=y(j,L,"GeneratorFunction"),a.isGeneratorFunction=function(ne){var _e=typeof ne=="function"&&ne.constructor;return!!_e&&(_e===D||(_e.displayName||_e.name)==="GeneratorFunction")},a.mark=function(ne){return Object.setPrototypeOf?Object.setPrototypeOf(ne,j):(ne.__proto__=j,y(ne,L,"GeneratorFunction")),ne.prototype=Object.create(Z),ne},a.awrap=function(ne){return{__await:ne}},H(G.prototype),y(G.prototype,w,function(){return this}),a.AsyncIterator=G,a.async=function(ne,_e,ae,le,$e){$e===void 0&&($e=Promise);var Pe=new G(v(ne,_e,ae,le),$e);return a.isGeneratorFunction(_e)?Pe:Pe.next().then(function(Ee){return Ee.done?Ee.value:Pe.next()})},H(Z),y(Z,L,"Generator"),y(Z,g,function(){return this}),y(Z,"toString",function(){return"[object Generator]"}),a.keys=function(ne){var _e=Object(ne),ae=[];for(var le in _e)ae.unshift(le);return function $e(){for(;ae.length;)if((le=ae.pop())in _e)return $e.value=le,$e.done=!1,$e;return $e.done=!0,$e}},a.values=ye,Ie.prototype={constructor:Ie,reset:function(_e){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ge),!_e)for(var ae in this)ae.charAt(0)==="t"&&u.call(this,ae)&&!isNaN(+ae.slice(1))&&(this[ae]=r)},stop:function(){this.done=!0;var _e=this.tryEntries[0][4];if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ae=this;function le(Be){Ee.type="throw",Ee.arg=_e,ae.next=Be}for(var $e=ae.tryEntries.length-1;$e>=0;--$e){var Pe=this.tryEntries[$e],Ee=Pe[4],r_=this.prev,ue=Pe[1],De=Pe[2];if(Pe[0]===-1)return le("end"),!1;if(!ue&&!De)throw Error("try statement without catch or finally");if(Pe[0]!=null&&Pe[0]<=r_){if(r_<ue)return this.method="next",this.arg=r,le(ue),!0;if(r_<De)return le(De),!1}}},abrupt:function(_e,ae){for(var le=this.tryEntries.length-1;le>=0;--le){var $e=this.tryEntries[le];if($e[0]>-1&&$e[0]<=this.prev&&this.prev<$e[2]){var Pe=$e;break}}Pe&&(_e==="break"||_e==="continue")&&Pe[0]<=ae&&ae<=Pe[2]&&(Pe=null);var Ee=Pe?Pe[4]:{};return Ee.type=_e,Ee.arg=ae,Pe?(this.method="next",this.next=Pe[2],C):this.complete(Ee)},complete:function(_e,ae){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ae&&(this.next=ae),C},finish:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[2]===_e)return this.complete(le[4],le[3]),ge(le),C}},catch:function(_e){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le[0]===_e){var $e=le[4];if($e.type==="throw"){var Pe=$e.arg;ge(le)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(_e,ae,le){return this.delegate={i:ye(_e),r:ae,n:le},this.method==="next"&&(this.arg=r),C}},a}function Uze(r,a,i,u,p,g,w){try{var L=r[g](w),y=L.value}catch(v){return void i(v)}L.done?a(y):Promise.resolve(y).then(u,p)}function mA(r){return function(){var a=this,i=arguments;return new Promise(function(u,p){var g=r.apply(a,i);function w(y){Uze(g,u,p,w,L,"next",y)}function L(y){Uze(g,u,p,w,L,"throw",y)}w(void 0)})}}function kv_(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function Mv_(r,a){for(var i=0;i<a.length;i++){var u=a[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,xv_(u.key),u)}}function Pv_(r,a,i){return a&&Mv_(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function xv_(r){var a=qv_(r,"string");return hx(a)=="symbol"?a:a+""}function qv_(r,a){if(hx(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,a);if(hx(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Cv_=function(){function r(){kv_(this,r)}return Pv_(r,[{key:"initialize",value:function(){var a=mA(kL().mark(function u(p){var g;return kL().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return g=Dd.getState().initialize(p),L.abrupt("return",g);case 2:case"end":return L.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"configure",value:function(){var a=mA(kL().mark(function u(p){var g,w;return kL().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(typeof p=="string"){y.next=5;break}return y.next=3,Dd.getState().configure(p);case 3:return g=y.sent,y.abrupt("return",g);case 5:return y.next=7,Dd.getState().configureWithUrl(p);case 7:return w=y.sent,y.abrupt("return",w);case 9:case"end":return y.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var a=mA(kL().mark(function u(p){var g;return kL().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,Dd.getState().getWorkflows(p);case 2:return g=L.sent,L.abrupt("return",g);case 4:case"end":return L.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var a=mA(kL().mark(function u(p){var g,w;return kL().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return g=p.workflowId,y.next=3,Dd.getState().prepareWorkflowAndPrepareUi(g);case 3:return w=y.sent,y.abrupt("return",w);case 5:case"end":return y.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var a=mA(kL().mark(function u(p){var g,w,L,y;return kL().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return g=p.metadata,w=p.locale,L=dg_(w),M.next=4,Dd.getState().startNewSession(L,g);case 4:if(y=M.sent,!y.error){M.next=7;break}return M.abrupt("return",y);case 7:return M.abrupt("return",new Promise(function(C){var q=function(j){C(j)};Dd.getState().playWorkflow(q)}));case 8:case"end":return M.stop()}},u)}));function i(u){return a.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var a=mA(kL().mark(function u(){var p;return kL().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Dd.getState().deinitialize();case 2:return p=w.sent,w.abrupt("return",p);case 4:case"end":return w.stop()}},u)}));function i(){return a.apply(this,arguments)}return i}()},{key:"version",get:function(){var i;return(i="2.3.131-nightly")!==null&&i!==void 0?i:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(i){Dd.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Dd.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){Dd.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return Dd.getState().getCurrentSessionId()}}])}(),Tv_=window.customElements.get("idv-flow");Tv_||window.customElements.define("idv-flow",Hze);var Dv_=Object.defineProperty,Rv_=Object.defineProperties,Av_=Object.getOwnPropertyDescriptors,Gze=Object.getOwnPropertySymbols,jv_=Object.prototype.hasOwnProperty,Ev_=Object.prototype.propertyIsEnumerable,Qze=(r,a,i)=>a in r?Dv_(r,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[a]=i,_se=(r,a)=>{for(var i in a||(a={}))jv_.call(a,i)&&Qze(r,i,a[i]);if(Gze)for(var i of Gze(a))Ev_.call(a,i)&&Qze(r,i,a[i]);return r},Nv_=(r,a)=>Rv_(r,Av_(a)),Nw=(r,a,i)=>new Promise((u,p)=>{var g=y=>{try{L(i.next(y))}catch(v){p(v)}},w=y=>{try{L(i.throw(y))}catch(v){p(v)}},L=y=>y.done?u(y.value):Promise.resolve(y.value).then(g,w);L((i=i.apply(r,a)).next())}),Wze=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Yze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jze={exports:{}},Tz={},Kze={exports:{}},Qo={},Xze;function Vv_(){if(Xze)return Qo;Xze=1;/**
|
|
204
204
|
* @license React
|
|
205
205
|
* react.production.min.js
|
|
206
206
|
*
|
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-D1mdtdde.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED