@regulaforensics/idv-capture-web 2.4.166-rc → 2.4.167-rc

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-B0x-s2h5.js";
25
+ import { B as cc, r as Bs, j as gE } from "./index-oxFpkCkq.js";
26
26
  var QT = Object.defineProperty, JT = Object.defineProperties, XT = Object.getOwnPropertyDescriptors, RE = Object.getOwnPropertySymbols, $T = Object.prototype.hasOwnProperty, eb = Object.prototype.propertyIsEnumerable, Fo = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), tb = (e) => {
27
27
  throw TypeError(e);
28
28
  }, IE = (e, r, t) => r in e ? QT(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, xe = (e, r) => {
@@ -1,4 +1,4 @@
1
- import { B as Vu, r as la, j as lD } from "./index-B0x-s2h5.js";
1
+ import { B as Vu, r as la, j as lD } from "./index-oxFpkCkq.js";
2
2
  var p0 = Object.defineProperty, k0 = Object.defineProperties, m0 = Object.getOwnPropertyDescriptors, jD = Object.getOwnPropertySymbols, w0 = Object.prototype.hasOwnProperty, h0 = Object.prototype.propertyIsEnumerable, sD = (M, r, i) => r in M ? p0(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
  w0.call(r, i) && sD(M, i, r[i]);
@@ -26066,9 +26066,9 @@ function t5() {
26066
26066
  supportedTemplates: Si.getSupportedTemplates(),
26067
26067
  component: Si
26068
26068
  }], i = r5(r5({}, Qm.LIVENESS, function() {
26069
- return import("./index-Djb6Eakf.js");
26069
+ return import("./index-D75Treec.js");
26070
26070
  }), Qm.DOC_READER, function() {
26071
- return import("./index-ByeEzsHB.js");
26071
+ return import("./index-CF6ONq03.js");
26072
26072
  }), a = /* @__PURE__ */ Jr().mark(function p() {
26073
26073
  var h, y, m;
26074
26074
  return Jr().wrap(function(C) {
@@ -26386,7 +26386,7 @@ var BW = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
26386
26386
  }, {
26387
26387
  key: "version",
26388
26388
  get: function() {
26389
- return "".concat("2.4.166-rc".trim());
26389
+ return "".concat("2.4.167-rc".trim());
26390
26390
  }
26391
26391
  }, {
26392
26392
  key: "render",
@@ -26856,7 +26856,7 @@ var KW = /* @__PURE__ */ function() {
26856
26856
  key: "version",
26857
26857
  get: function() {
26858
26858
  var t;
26859
- return (t = "2.4.166-rc") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
26859
+ return (t = "2.4.167-rc") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
26860
26860
  }
26861
26861
  }, {
26862
26862
  key: "nonce",
package/dist/main.iife.js CHANGED
@@ -73,7 +73,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
73
73
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dEe(t,r){if(t){if(typeof t=="string")return sq(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sq(t,r):void 0}}function sq(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function MEe(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function gEe(t){if(Array.isArray(t))return t}var IEe=function(r){var n=r.option,a=r.layout,u=r.dataSourceQuestion,s=r.register,c=r.watch,f=Tr.useState(!1),d=cEe(f,2),M=d[0],I=d[1],y=rq(),p=String(u.id),N=c(p),v=N===String(n.id),m=a.option,D=a.optionSelected,C={borderRadius:m.cornerRadius,background:Gn(m.backgroundColor),borderColor:Gn(m.borderColor),borderWidth:m.borderWidth},j={borderRadius:D.cornerRadius,background:Gn(D.backgroundColor),borderColor:Gn(D.borderColor),borderWidth:D.borderWidth},S=M&&y?{outline:"2px solid ".concat(T2)}:{};return ie.jsx("div",{style:{display:"flex",flexGrow:1},children:ie.jsxs("label",{style:uq(uq({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},v?j:C),S),children:[ie.jsx("input",si(St({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},s(p,{required:!!u.required,validate:L4(u.validators,!!u.required)})),{value:n.id,type:"radio",onFocus:function(){return I(!0)},onBlur:function(){return I(!1)}})),ie.jsx(Eo,si(St({},v?D.title:m.title),{text:n.text}))]})},n.id)},pEe=function(r){var n=r.layout,a=r.watch,u=r.register,s=r.dataSourceQuestion;return ie.jsx("div",{style:{boxSizing:"border-box"},children:ie.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[n.title&&ie.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ie.jsx(Eo,si(St({},n.title),{text:s.text}))}),ie.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:s.options.map(function(c){return ie.jsx(IEe,{register:u,watch:a,layout:n,option:c,dataSourceQuestion:s},c.id)})})]})})};function Q2(t){"@babel/helpers - typeof";return Q2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Q2(t)}function lq(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function AS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?lq(Object(n),!0).forEach(function(a){yEe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lq(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function yEe(t,r,n){return(r=hEe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function hEe(t){var r=NEe(t,"string");return Q2(r)=="symbol"?r:r+""}function NEe(t,r){if(Q2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Q2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var vEe=function(r){var n=r.children,a=r.backgroundColor,u=r.cornerRadius,s=u===void 0?0:u,c=r.isError,f=r.isRequired,d=r.validationBorderColor,M=r.validationBorderWidth,I=AS({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Gn(a)||"transparent",borderRadius:s,padding:"16px",boxSizing:"border-box",height:"auto"},c&&AS(AS({},Gn(d)&&{borderColor:d,borderStyle:"solid"}),M&&{borderWidth:M}));return ie.jsxs("div",{style:I,children:[f&&ie.jsx("span",{style:{color:Gn(d),position:"absolute",left:"6px",top:"18px"},children:"*"}),n]})};function mEe(t,r){return jEe(t)||TEe(t,r)||DEe(t,r)||EEe()}function EEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
74
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DEe(t,r){if(t){if(typeof t=="string")return cq(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cq(t,r):void 0}}function cq(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function TEe(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function jEe(t){if(Array.isArray(t))return t}var SEe=function(r){var n=r.validationErrorsTypes,a=r.title;return n?ie.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(n).map(function(u){var s=mEe(u,2),c=s[0],f=s[1];return ie.jsx(Eo,si(St({},a),{text:f}),c)})}):null},AEe=function(r){var n,a,u,s,c,f,d,M,I,y,p,N,v,m,D,C,j=r.layout,S=r.dataSourceQuestion,A=r.register,w=String(S.id),R=function(H){return H?H===yh.EMAIL?"email":H===yh.FREE_TEXT?"text":H===yh.NUMBER?"number":H===yh.SECURE?"password":"text":"text"};return ie.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ie.jsx(Eo,si(St({},j.title),{text:S.text,htmlFor:w})),ie.jsx("input",si(St({},A(w,{required:!!S.required,validate:L4(S.validators,!!S.required)})),{id:w,type:R((n=j.textField)===null||n===void 0?void 0:n.inputType),style:{fontFamily:(a=j==null||(u=j.textField)===null||u===void 0?void 0:u.fontName)!==null&&a!==void 0?a:"sans-serif",fontSize:(s=j==null||(c=j.textField)===null||c===void 0?void 0:c.fontSize)!==null&&s!==void 0?s:15,color:(f=Gn(j==null||(d=j.textField)===null||d===void 0?void 0:d.fontColor))!==null&&f!==void 0?f:"#000000",height:"42px",borderWidth:(M=j==null||(I=j.textField)===null||I===void 0?void 0:I.borderWidth)!==null&&M!==void 0?M:1,borderColor:(y=Gn(j==null||(p=j.textField)===null||p===void 0?void 0:p.borderColor))!==null&&y!==void 0?y:"#d9d9d9",borderStyle:"solid",borderRadius:(N=j==null||(v=j.textField)===null||v===void 0?void 0:v.cornerRadius)!==null&&N!==void 0?N:8,padding:"11px",boxSizing:"border-box",backgroundColor:(m=Gn(j==null||(D=j.textField)===null||D===void 0?void 0:D.backgroundColor))!==null&&m!==void 0?m:"#FFFFFF",outlineColor:T2},placeholder:(C=S.placeholder)!==null&&C!==void 0?C:"","data-id":w}))]})},CEe=function(r){var n,a,u,s,c,f,d,M,I,y,p,N,v,m=r.layout,D=r.dataSourceQuestion,C=r.register,j=String(D.id);return ie.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ie.jsx(Eo,si(St({},m.title),{text:D.text,htmlFor:j})),ie.jsx("textarea",si(St({},C(j,{required:!!D.required,validate:L4(D.validators,!!D.required)})),{id:j,placeholder:(n=D.placeholder)!==null&&n!==void 0?n:"",onChange:function(A){A.target.style.height="auto",A.target.style.height="".concat(A.target.scrollHeight-15,"px")},"data-id":j,style:{fontFamily:"sans-serif",fontSize:(a=m==null||(u=m.textField)===null||u===void 0?void 0:u.fontSize)!==null&&a!==void 0?a:15,color:(s=Gn(m==null||(c=m.textField)===null||c===void 0?void 0:c.fontColor))!==null&&s!==void 0?s:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(f=m==null||(d=m.textField)===null||d===void 0?void 0:d.borderWidth)!==null&&f!==void 0?f:1,borderColor:(M=Gn(m==null||(I=m.textField)===null||I===void 0?void 0:I.borderColor))!==null&&M!==void 0?M:"#d9d9d9",borderStyle:"solid",borderRadius:(y=m==null||(p=m.textField)===null||p===void 0?void 0:p.cornerRadius)!==null&&y!==void 0?y:8,padding:"11px",boxSizing:"border-box",backgroundColor:(N=Gn(m==null||(v=m.textField)===null||v===void 0?void 0:v.backgroundColor))!==null&&N!==void 0?N:"#FFFFFF",outlineColor:T2}}))]})},fq={},CS,dq;function Mq(){if(dq)return CS;dq=1;var t=Bn(),r=ul(),n=mo(),a=ma(),u=sh(),s=p2(),c=Function,f=t([].concat),d=t([].join),M={},I=function(p,N,v){if(!a(M,N)){for(var m=[],D=0;D<N;D++)m[D]="a["+D+"]";M[N]=c("C,a","return new C("+d(m,",")+")")}return M[N](p,v)};return CS=s?c.bind:function(y){var p=r(this),N=p.prototype,v=u(arguments,1),m=function(){var C=f(v,u(arguments));return this instanceof m?I(p,C.length,C):p.apply(y,C)};return n(N)&&(m.prototype=N),m},CS}var gq;function OEe(){if(gq)return fq;gq=1;var t=xr(),r=Mq();return t({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r}),fq}OEe();var Iq={},pq;function _Ee(){if(pq)return Iq;pq=1;var t=xr(),r=Kn(),n=f1();return t({target:"Object",stat:!0,sham:!r},{create:n}),Iq}_Ee();var yq={},hq;function xEe(){if(hq)return yq;hq=1;var t=xr(),r=fn(),n=sl(),a=m2(),u=wV(),s=r(function(){a(1)});return t({target:"Object",stat:!0,forced:s,sham:!u},{getPrototypeOf:function(f){return a(n(f))}}),yq}xEe();var Nq={},vq;function LEe(){if(vq)return Nq;vq=1;var t=Kn(),r=Y1(),n=mo(),a=$V(),u=sl(),s=jg(),c=Object.getPrototypeOf,f=Object.setPrototypeOf,d=Object.prototype,M="__proto__";if(t&&c&&f&&!(M in d))try{r(d,M,{configurable:!0,get:function(){return c(u(this))},set:function(y){var p=s(this);a(y)&&n(p)&&f(p,y)}})}catch(I){}return Nq}LEe();var mq={},Eq;function wEe(){if(Eq)return mq;Eq=1;var t=xr(),r=oh();return t({target:"Object",stat:!0},{setPrototypeOf:r}),mq}wEe();var Dq={},OS,Tq;function bEe(){if(Tq)return OS;Tq=1;var t=ch(),r=h2(),n=TypeError;return OS=function(u){if(t(u))return u;throw new n(r(u)+" is not a constructor")},OS}var jq;function kEe(){if(jq)return Dq;jq=1;var t=xr(),r=Rf(),n=ah(),a=Mq(),u=bEe(),s=ga(),c=mo(),f=f1(),d=fn(),M=r("Reflect","construct"),I=Object.prototype,y=[].push,p=d(function(){function m(){}return!(M(function(){},[],m)instanceof m)}),N=!d(function(){M(function(){})}),v=p||N;return t({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(D,C){u(D),s(C);var j=arguments.length<3?D:u(arguments[2]);if(N&&!p)return M(D,C,j);if(D===j){switch(C.length){case 0:return new D;case 1:return new D(C[0]);case 2:return new D(C[0],C[1]);case 3:return new D(C[0],C[1],C[2]);case 4:return new D(C[0],C[1],C[2],C[3])}var S=[null];return n(y,S,C),new(n(a,D,S))}var A=j.prototype,w=f(c(A)?A:I),R=n(D,w,C);return c(R)?R:w}}),Dq}kEe();function F2(t){"@babel/helpers - typeof";return F2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},F2(t)}function REe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Sq(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Aq(a.key),a)}}function zEe(t,r,n){return r&&Sq(t.prototype,r),n&&Sq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p1(t,r,n){return(r=Aq(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Aq(t){var r=PEe(t,"string");return F2(r)=="symbol"?r:r+""}function PEe(t,r){if(F2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(F2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Cq=function(){function t(r){var n=r.errorCode,a=r.errorCodeKey,u=r.message,s=r.underlyingError,c=r.underlyingBaseError,f=r.domain,d=r.module,M=r.errorEnumName,I=r.shortDomainCode;REe(this,t),p1(this,"errorCode",void 0),p1(this,"errorCodeKey",void 0),p1(this,"message",void 0),p1(this,"underlyingError",void 0),p1(this,"underlyingBaseError",void 0),p1(this,"domain",void 0),p1(this,"module",void 0),p1(this,"errorEnumName",void 0),p1(this,"shortDomainCode",void 0),this.errorCode=n,this.errorCodeKey=a,this.message=u,this.underlyingError=s,this.underlyingBaseError=c,this.module=d,this.domain=f,this.errorEnumName=M,this.shortDomainCode=I}return zEe(t,[{key:"lastUnderlyingError",get:function(){for(var n,a=this.underlyingBaseError;((u=a)===null||u===void 0?void 0:u.underlyingBaseError)instanceof t;){var u;a=a.underlyingBaseError}return(n=a)===null||n===void 0?void 0:n.underlyingError}},{key:"toObject",value:function(){var n={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof t&&(n.underlyingBaseError=this.underlyingBaseError.toObject()),n}},{key:"shortChain",get:function(){var n="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.shortChain)),n}},{key:"fullChain",get:function(){var n="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.fullChain)),n}}],[{key:"getErrorKey",value:function(n,a){var u=Object.keys(a).find(function(s){return a[s]===n});if(!u)throw new Error("Invalid errorCode: ".concat(n," in enum"));return u}}])}();function w4(t){"@babel/helpers - typeof";return w4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},w4(t)}function UEe(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function YEe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function QEe(t,r,n){return r=Ah(r),FEe(t,Oq()?Reflect.construct(r,n||[],Ah(t).constructor):r.apply(t,n))}function FEe(t,r){if(r&&(w4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ee(t)}function $Ee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Oq(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(Oq=function(){return!!t})()}function Ah(t){return Ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ah(t)}function HEe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&_S(t,r)}function _S(t,r){return _S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_S(t,r)}function xS(t,r,n){return(r=VEe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function VEe(t){var r=BEe(t,"string");return w4(r)=="symbol"?r:r+""}function BEe(t,r){if(w4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(w4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Ch=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;YEe(this,r);var f=Cq.getErrorKey(a,wW);return QEe(this,r,[{errorCode:a,errorCodeKey:f,errorEnumName:r.ERROR_ENUM_NAME,module:r.MODULE,message:u,underlyingError:s,underlyingBaseError:c,domain:r.ERROR_ENUM_NAME,shortDomainCode:r.SHORT_CODE}])}return HEe(r,t),UEe(r)}(Cq);xS(Ch,"MODULE",lS),xS(Ch,"ERROR_ENUM_NAME","GuiModuleError"),xS(Ch,"SHORT_CODE","GM");var GEe=function(r){var n=r.header,a=r.title,u=r.buttons,s=r.footer,c=r.questions,f=r.dataSource,d=r.properties,M=r.backgroundColor,I=ZT(),y=I.perform,p=d?gve(f.questions,d):{},N=Tr.useRef(null),v=N5e({criteriaMode:"all",defaultValues:p}),m=v.register,D=v.handleSubmit,C=v.formState.errors,j=v.reset,S=v.watch,A=v.control,w=function(F){y(dve(F)),j()};return ie.jsx(O2,{header:n,footer:s,backgroundColor:M,children:ie.jsxs("form",{onSubmit:D(w),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ie.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:Gn(c.backgroundColor)||"transparent"},ref:N,children:[a&&ie.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ie.jsx(Eo,St({},a))}),ie.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:f.questions.map(function(R){var F,H=f.static,$=function(J,te){return te.find(function(k){var G;if((G=k.questionIds)!==null&&G!==void 0&&G.length)return k.questionIds.find(function(K){return J===K})})},x=function(J,te){return te.find(function(k){return!k.questionIds&&k.answerType===J})},O=H?$(String(R.id),c.itemTypes)||x(R.answerType,c.itemTypes):c.itemTypes.find(function(B){return B.answerType===R.answerType});if(!O){var L=new Ch({errorCode:wW.DECODING_FAILED,message:"The question template has not been found"});y(L);return}var P=O==null?void 0:O.displayType,Y=R.id in C&&((F=C[R.id])===null||F===void 0?void 0:F.types);return ie.jsxs(Tr.Fragment,{children:[ie.jsxs(vEe,{backgroundColor:O==null?void 0:O.backgroundColor,cornerRadius:O==null?void 0:O.cornerRadius,isError:!!Y,isRequired:R.required,validationBorderColor:O==null?void 0:O.validationBorderColor,validationBorderWidth:O==null?void 0:O.validationBorderWidth,children:[P===O4.TEXT_EXPANDABLE&&ie.jsx(CEe,{layout:O,dataSourceQuestion:R,register:m}),P===O4.TEXT_SINGLE_LINE&&ie.jsx(AEe,{layout:O,dataSourceQuestion:R,register:m}),P===O4.SELECTOR_OPTIONS&&ie.jsx(oEe,{layout:O,dataSourceQuestion:R,watch:S,register:m}),P===O4.SELECTOR_BUTTONS&&ie.jsx(pEe,{layout:O,dataSourceQuestion:R,watch:S,register:m}),P===O4.SELECTOR_DROPDOWN&&ie.jsx(Y5e,{control:A,layout:O,dataSourceQuestion:R,parentElementRef:N}),P===O4.MULTI_SELECTOR_DROPDOWN&&ie.jsx(V5e,{control:A,layout:O,dataSourceQuestion:R,parentElementRef:N})]}),Y&&ie.jsx(SEe,{validationErrorsTypes:Y,title:O.validationMessage})]},R.id)})})]}),!!(u!=null&&u.length)&&ie.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:u.map(function(R,F){return ie.jsx(BW,St({dataTestId:"question-button"},R),F)})})]})})},_q=function(r){var n=r.templateId,a=r.templateLayout,u=r.dataSource,s=r.properties;if(!n||!a)return ie.jsx(eK,{});var c=s!=null&&s.length?JSON.stringify(s):"default-key";return n===Q1.STATUS?ie.jsx(Ome,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===Q1.INFO?ie.jsx(kme,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,description:a==null?void 0:a.description,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===Q1.PROGRESS?ie.jsx(eK,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,progressView:a==null?void 0:a.progressView,backgroundColor:a==null?void 0:a.backgroundColor}):n===Q1.INFO_DETAILS?ie.jsx(qme,{header:a==null?void 0:a.header,title:a==null?void 0:a.title,details:a==null?void 0:a.details,buttons:a==null?void 0:a.buttons,footer:a==null?void 0:a.footer,backgroundColor:a==null?void 0:a.backgroundColor}):u&&u!==null&&u!==void 0&&u.questions.length&&n===Q1.QUESTIONS?ie.jsx(GEe,{dataSource:u,properties:s,questions:a.questions,header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor},c):n===Q1.QUESTIONS&&!u?ie.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"}):ie.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},LS=!1,Yf=function(r){var n=r.moduleProps,a=r.perform,u=n,s=u.templateId,c=u.templateLayout,f=u.dataSource,d=u.properties,M=function(y){a&&a(y)};return s===Q1.QUESTIONS?ie.jsx(cB,{perform:M,children:ie.jsx(_q,{properties:d,dataSource:f,templateId:s,templateLayout:c})}):ie.jsx(cB,{perform:M,children:ie.jsx(_q,{templateId:s,templateLayout:c})})};Yf.getIdentifier=function(){return lS},Yf.getSupportedTemplates=function(){return Object.values(Q1)},Yf.deinitialize=function(){LS=!1},Yf.initialize=function(){LS=!0},Yf.isReady=function(){return LS},Yf.displayName=lS;var xq={},Lq;function ZEe(){if(Lq)return xq;Lq=1;var t=xt(),r=hr(),n=Date,a=r(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),xq}ZEe();var wq={},bq={},wS,kq;function Rq(){if(kq)return wS;kq=1;var t=pr(),r=$n(),n=qr(),a=lu(),u=r("iterator");return wS=!t(function(){var s=new URL("b?a=1&b=2&c=3","https://a"),c=s.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),d="";return s.pathname="c%20d",c.forEach(function(M,I){c.delete("b"),d+=I+M}),f.delete("a",2),f.delete("b",void 0),a&&(!s.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(a||!n)||!c.sort||s.href!=="https://a/c%20d?a=1&c=3"||c.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!c[u]||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"||d!=="a1c3"||new URL("https://x",void 0).host!=="x"}),wS}var bS,zq;function WEe(){if(zq)return bS;zq=1;var t=qr(),r=hr(),n=Mn(),a=pr(),u=Q0(),s=Ry(),c=Ly(),f=gu(),d=b0(),M=Object.assign,I=Object.defineProperty,y=r([].concat);return bS=!M||a(function(){if(t&&M({b:1},M(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},N={},v=Symbol("assign detection"),m="abcdefghijklmnopqrst";return p[v]=7,m.split("").forEach(function(D){N[D]=D}),M({},p)[v]!==7||u(M({},N)).join("")!==m})?function(N,v){for(var m=f(N),D=arguments.length,C=1,j=s.f,S=c.f;D>C;)for(var A=d(arguments[C++]),w=j?y(u(A),j(A)):u(A),R=w.length,F=0,H;R>F;)H=w[F++],(!t||n(S,A,H))&&(m[H]=A[H]);return m}:M,bS}var kS,Pq;function KEe(){if(Pq)return kS;Pq=1;var t=hr(),r=2147483647,n=36,a=1,u=26,s=38,c=700,f=72,d=128,M="-",I=/[^\0-\u007E]/,y=/[.\u3002\uFF0E\uFF61]/g,p="Overflow: input needs wider integers to process",N=n-a,v=RangeError,m=t(y.exec),D=Math.floor,C=String.fromCharCode,j=t("".charCodeAt),S=t([].join),A=t([].push),w=t("".replace),R=t("".split),F=t("".toLowerCase),H=function(L){for(var P=[],Y=0,B=L.length;Y<B;){var J=j(L,Y++);if(J>=55296&&J<=56319&&Y<B){var te=j(L,Y++);(te&64512)===56320?A(P,((J&1023)<<10)+(te&1023)+65536):(A(P,J),Y--)}else A(P,J)}return P},$=function(L){return L+22+75*(L<26)},x=function(L,P,Y){var B=0;for(L=Y?D(L/c):L>>1,L+=D(L/P);L>N*u>>1;)L=D(L/N),B+=n;return D(B+(N+1)*L/(L+s))},O=function(L){var P=[];L=H(L);var Y=L.length,B=d,J=0,te=f,k,G;for(k=0;k<L.length;k++)G=L[k],G<128&&A(P,C(G));var K=P.length,b=K;for(K&&A(P,M);b<Y;){var W=r;for(k=0;k<L.length;k++)G=L[k],G>=B&&G<W&&(W=G);var he=b+1;if(W-B>D((r-J)/he))throw new v(p);for(J+=(W-B)*he,B=W,k=0;k<L.length;k++){if(G=L[k],G<B&&++J>r)throw new v(p);if(G===B){for(var pe=J,le=n;;){var _e=le<=te?a:le>=te+u?u:le-te;if(pe<_e)break;var Ue=pe-_e,De=n-_e;A(P,C($(_e+Ue%De))),pe=D(Ue/De),le+=n}A(P,C($(pe))),te=x(J,he,b===K),J=0,b++}}J++,B++}return S(P,"")};return kS=function(L){var P=[],Y=R(w(F(L),y,"."),"."),B,J;for(B=0;B<Y.length;B++)J=Y[B],A(P,m(I,J)?"xn--"+O(J):J);return S(P,".")},kS}var Uq={},Yq;function qEe(){if(Yq)return Uq;Yq=1;var t=xt(),r=hr(),n=Ev(),a=RangeError,u=String.fromCharCode,s=String.fromCodePoint,c=r([].join),f=!!s&&s.length!==1;return t({target:"String",stat:!0,arity:1,forced:f},{fromCodePoint:function(M){for(var I=[],y=arguments.length,p=0,N;y>p;){if(N=+arguments[p++],n(N,1114111)!==N)throw new a(N+" is not a valid code point");I[p]=N<65536?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(I,"")}}),Uq}var RS,Qq;function JEe(){if(Qq)return RS;Qq=1;var t=w1(),r=Math.floor,n=function(a,u){var s=a.length;if(s<8)for(var c=1,f,d;c<s;){for(d=c,f=a[c];d&&u(a[d-1],f)>0;)a[d]=a[--d];d!==c++&&(a[d]=f)}else for(var M=r(s/2),I=n(t(a,0,M),u),y=n(t(a,M),u),p=I.length,N=y.length,v=0,m=0;v<p||m<N;)a[v+m]=v<p&&m<N?u(I[v],y[m])<=0?I[v++]:y[m++]:v<p?I[v++]:y[m++];return a};return RS=n,RS}var zS,Fq;function $q(){if(Fq)return zS;Fq=1,Rm(),qEe();var t=xt(),r=Qr(),n=gQ(),a=Mu(),u=Mn(),s=hr(),c=qr(),f=Rq(),d=Aa(),M=Su(),I=n5(),y=il(),p=jz(),N=Hs(),v=p4(),m=Hn(),D=Mi(),C=b1(),j=Y0(),S=An(),A=ci(),w=wi(),R=Ll(),F=Mg(),H=Wm(),$=Yy(),x=B0(),O=y4(),L=$n(),P=JEe(),Y=L("iterator"),B="URLSearchParams",J=B+"Iterator",te=N.set,k=N.getterFor(B),G=N.getterFor(J),K=n("fetch"),b=n("Request"),W=n("Headers"),he=b&&b.prototype,pe=W&&W.prototype,le=r.TypeError,_e=r.encodeURIComponent,Ue=String.fromCharCode,De=a("String","fromCodePoint"),ke=parseInt,Ze=s("".charAt),et=s([].join),nt=s([].push),ct=s("".replace),Et=s([].shift),mt=s([].splice),ht=s("".split),Je=s("".slice),dt=s(/./.exec),It=/\+/g,Ke="�",Ae=/^[0-9a-f]+$/i,Pe=function(ye,Re){var Qe=Je(ye,Re,Re+2);return dt(Ae,Qe)?ke(Qe,16):NaN},fe=function(ye){for(var Re=0,Qe=128;Qe>0&&(ye&Qe)!==0;Qe>>=1)Re++;return Re},xe=function(ye){var Re=null;switch(ye.length){case 1:Re=ye[0];break;case 2:Re=(ye[0]&31)<<6|ye[1]&63;break;case 3:Re=(ye[0]&15)<<12|(ye[1]&63)<<6|ye[2]&63;break;case 4:Re=(ye[0]&7)<<18|(ye[1]&63)<<12|(ye[2]&63)<<6|ye[3]&63;break}return Re>1114111?null:Re},Ne=function(ye){ye=ct(ye,It," ");for(var Re=ye.length,Qe="",we=0;we<Re;){var ot=Ze(ye,we);if(ot==="%"){if(Ze(ye,we+1)==="%"||we+3>Re){Qe+="%",we++;continue}var pt=Pe(ye,we+1);if(pt!==pt){Qe+=ot,we++;continue}we+=2;var At=fe(pt);if(At===0)ot=Ue(pt);else{if(At===1||At>4){Qe+=Ke,we++;continue}for(var Tt=[pt],Ft=1;Ft<At&&(we++,!(we+3>Re||Ze(ye,we)!=="%"));){var nr=Pe(ye,we+1);if(nr!==nr){we+=3;break}if(nr>191||nr<128)break;nt(Tt,nr),we+=2,Ft++}if(Tt.length!==At){Qe+=Ke;continue}var dr=xe(Tt);dr===null?Qe+=Ke:ot=De(dr)}}Qe+=ot,we++}return Qe},Me=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Le=function(ye){return de[ye]},Xe=function(ye){return ct(_e(ye),Me,Le)},tt=p(function(Re,Qe){te(this,{type:J,target:k(Re).entries,index:0,kind:Qe})},B,function(){var Re=G(this),Qe=Re.target,we=Re.index++;if(!Qe||we>=Qe.length)return Re.target=null,x(void 0,!0);var ot=Qe[we];switch(Re.kind){case"keys":return x(ot.key,!1);case"values":return x(ot.value,!1)}return x([ot.key,ot.value],!1)},!0),Ye=function(ye){this.entries=[],this.url=null,ye!==void 0&&(A(ye)?this.parseObject(ye):this.parseQuery(typeof ye=="string"?Ze(ye,0)==="?"?Je(ye,1):ye:w(ye)))};Ye.prototype={type:B,bindURL:function(ye){this.url=ye,this.update()},parseObject:function(ye){var Re=this.entries,Qe=$(ye),we,ot,pt,At,Tt,Ft,nr;if(Qe)for(we=H(ye,Qe),ot=we.next;!(pt=u(ot,we)).done;){if(At=H(S(pt.value)),Tt=At.next,(Ft=u(Tt,At)).done||(nr=u(Tt,At)).done||!u(Tt,At).done)throw new le("Expected sequence with length 2");nt(Re,{key:w(Ft.value),value:w(nr.value)})}else for(var dr in ye)D(ye,dr)&&nt(Re,{key:dr,value:w(ye[dr])})},parseQuery:function(ye){if(ye)for(var Re=this.entries,Qe=ht(ye,"&"),we=0,ot,pt;we<Qe.length;)ot=Qe[we++],ot.length&&(pt=ht(ot,"="),nt(Re,{key:Ne(Et(pt)),value:Ne(et(pt,"="))}))},serialize:function(){for(var ye=this.entries,Re=[],Qe=0,we;Qe<ye.length;)we=ye[Qe++],nt(Re,Xe(we.key)+"="+Xe(we.value));return et(Re,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Te=function(){v(this,Oe);var Re=arguments.length>0?arguments[0]:void 0,Qe=te(this,new Ye(Re));c||(this.size=Qe.entries.length)},Oe=Te.prototype;if(I(Oe,{append:function(Re,Qe){var we=k(this);O(arguments.length,2),nt(we.entries,{key:w(Re),value:w(Qe)}),c||this.length++,we.updateURL()},delete:function(ye){for(var Re=k(this),Qe=O(arguments.length,1),we=Re.entries,ot=w(ye),pt=Qe<2?void 0:arguments[1],At=pt===void 0?pt:w(pt),Tt=0;Tt<we.length;){var Ft=we[Tt];if(Ft.key===ot&&(At===void 0||Ft.value===At)){if(mt(we,Tt,1),At!==void 0)break}else Tt++}c||(this.size=we.length),Re.updateURL()},get:function(Re){var Qe=k(this).entries;O(arguments.length,1);for(var we=w(Re),ot=0;ot<Qe.length;ot++)if(Qe[ot].key===we)return Qe[ot].value;return null},getAll:function(Re){var Qe=k(this).entries;O(arguments.length,1);for(var we=w(Re),ot=[],pt=0;pt<Qe.length;pt++)Qe[pt].key===we&&nt(ot,Qe[pt].value);return ot},has:function(Re){for(var Qe=k(this).entries,we=O(arguments.length,1),ot=w(Re),pt=we<2?void 0:arguments[1],At=pt===void 0?pt:w(pt),Tt=0;Tt<Qe.length;){var Ft=Qe[Tt++];if(Ft.key===ot&&(At===void 0||Ft.value===At))return!0}return!1},set:function(Re,Qe){var we=k(this);O(arguments.length,1);for(var ot=we.entries,pt=!1,At=w(Re),Tt=w(Qe),Ft=0,nr;Ft<ot.length;Ft++)nr=ot[Ft],nr.key===At&&(pt?mt(ot,Ft--,1):(pt=!0,nr.value=Tt));pt||nt(ot,{key:At,value:Tt}),c||(this.size=ot.length),we.updateURL()},sort:function(){var Re=k(this);P(Re.entries,function(Qe,we){return Qe.key>we.key?1:-1}),Re.updateURL()},forEach:function(Re){for(var Qe=k(this).entries,we=C(Re,arguments.length>1?arguments[1]:void 0),ot=0,pt;ot<Qe.length;)pt=Qe[ot++],we(pt.value,pt.key,this)},keys:function(){return new tt(this,"keys")},values:function(){return new tt(this,"values")},entries:function(){return new tt(this,"entries")}},{enumerable:!0}),d(Oe,Y,Oe.entries,{name:"entries"}),d(Oe,"toString",function(){return k(this).serialize()},{enumerable:!0}),c&&M(Oe,"size",{get:function(){return k(this).entries.length},configurable:!0,enumerable:!0}),y(Te,B),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:Te}),!f&&m(W)){var Be=s(pe.has),Mt=s(pe.set),lt=function(ye){if(A(ye)){var Re=ye.body,Qe;if(j(Re)===B)return Qe=ye.headers?new W(ye.headers):new W,Be(Qe,"content-type")||Mt(Qe,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),R(ye,{body:F(0,w(Re)),headers:F(0,Qe)})}return ye};if(m(K)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Re){return K(Re,arguments.length>1?lt(arguments[1]):{})}}),m(b)){var Pt=function(Re){return v(this,he),new b(Re,arguments.length>1?lt(arguments[1]):{})};he.constructor=Pt,Pt.prototype=he,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Pt})}}return zS={URLSearchParams:Te,getState:k},zS}var Hq;function XEe(){if(Hq)return bq;Hq=1,FP();var t=xt(),r=qr(),n=Rq(),a=Qr(),u=b1(),s=hr(),c=Aa(),f=Su(),d=p4(),M=Mi(),I=WEe(),y=DU(),p=w1(),N=h5().codeAt,v=KEe(),m=wi(),D=il(),C=y4(),j=$q(),S=Hs(),A=S.set,w=S.getterFor("URL"),R=j.URLSearchParams,F=j.getState,H=a.URL,$=a.TypeError,x=a.parseInt,O=Math.floor,L=Math.pow,P=s("".charAt),Y=s(/./.exec),B=s([].join),J=s(1 .toString),te=s([].pop),k=s([].push),G=s("".replace),K=s([].shift),b=s("".split),W=s("".slice),he=s("".toLowerCase),pe=s([].unshift),le="Invalid authority",_e="Invalid scheme",Ue="Invalid host",De="Invalid port",ke=/[a-z]/i,Ze=/[\d+-.a-z]/i,et=/\d/,nt=/^0x/i,ct=/^[0-7]+$/,Et=/^\d+$/,mt=/^[\da-f]+$/i,ht=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Je=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,It=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ke=/[\t\n\r]/g,Ae,Pe=function(ne){var ge=b(ne,"."),se,q,je,ut,$e,Lt,yt;if(ge.length&&ge[ge.length-1]===""&&ge.length--,se=ge.length,se>4)return ne;for(q=[],je=0;je<se;je++){if(ut=ge[je],ut==="")return ne;if($e=10,ut.length>1&&P(ut,0)==="0"&&($e=Y(nt,ut)?16:8,ut=W(ut,$e===8?1:2)),ut==="")Lt=0;else{if(!Y($e===10?Et:$e===8?ct:mt,ut))return ne;Lt=x(ut,$e)}k(q,Lt)}for(je=0;je<se;je++)if(Lt=q[je],je===se-1){if(Lt>=L(256,5-se))return null}else if(Lt>255)return null;for(yt=te(q),je=0;je<q.length;je++)yt+=q[je]*L(256,3-je);return yt},fe=function(ne){var ge=[0,0,0,0,0,0,0,0],se=0,q=null,je=0,ut,$e,Lt,yt,Xt,ur,Ee,wt=function(){return P(ne,je)};if(wt()===":"){if(P(ne,1)!==":")return;je+=2,se++,q=se}for(;wt();){if(se===8)return;if(wt()===":"){if(q!==null)return;je++,se++,q=se;continue}for(ut=$e=0;$e<4&&Y(mt,wt());)ut=ut*16+x(wt(),16),je++,$e++;if(wt()==="."){if($e===0||(je-=$e,se>6))return;for(Lt=0;wt();){if(yt=null,Lt>0)if(wt()==="."&&Lt<4)je++;else return;if(!Y(et,wt()))return;for(;Y(et,wt());){if(Xt=x(wt(),10),yt===null)yt=Xt;else{if(yt===0)return;yt=yt*10+Xt}if(yt>255)return;je++}ge[se]=ge[se]*256+yt,Lt++,(Lt===2||Lt===4)&&se++}if(Lt!==4)return;break}else if(wt()===":"){if(je++,!wt())return}else if(wt())return;ge[se++]=ut}if(q!==null)for(ur=se-q,se=7;se!==0&&ur>0;)Ee=ge[se],ge[se--]=ge[q+ur-1],ge[q+--ur]=Ee;else if(se!==8)return;return ge},xe=function(ne){for(var ge=null,se=1,q=null,je=0,ut=0;ut<8;ut++)ne[ut]!==0?(je>se&&(ge=q,se=je),q=null,je=0):(q===null&&(q=ut),++je);return je>se?q:ge},Ne=function(ne){var ge,se,q,je;if(typeof ne=="number"){for(ge=[],se=0;se<4;se++)pe(ge,ne%256),ne=O(ne/256);return B(ge,".")}if(typeof ne=="object"){for(ge="",q=xe(ne),se=0;se<8;se++)je&&ne[se]===0||(je&&(je=!1),q===se?(ge+=se?":":"::",je=!0):(ge+=J(ne[se],16),se<7&&(ge+=":")));return"["+ge+"]"}return ne},Me={},de=I({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),Le=I({},de,{"#":1,"?":1,"{":1,"}":1}),Xe=I({},Le,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),tt=function(ne,ge){var se=N(ne,0);return se>32&&se<127&&!M(ge,ne)?ne:encodeURIComponent(ne)},Ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(ne,ge){var se;return ne.length===2&&Y(ke,P(ne,0))&&((se=P(ne,1))===":"||!ge&&se==="|")},Oe=function(ne){var ge;return ne.length>1&&Te(W(ne,0,2))&&(ne.length===2||(ge=P(ne,2))==="/"||ge==="\\"||ge==="?"||ge==="#")},Be=function(ne){return ne==="."||he(ne)==="%2e"},Mt=function(ne){return ne=he(ne),ne===".."||ne==="%2e."||ne===".%2e"||ne==="%2e%2e"},lt={},Pt={},ye={},Re={},Qe={},we={},ot={},pt={},At={},Tt={},Ft={},nr={},dr={},Jn={},jr={},wn={},$t={},Sr={},yn={},Ar={},Mr={},bn=function(ne,ge,se){var q=m(ne),je,ut,$e;if(ge){if(ut=this.parse(q),ut)throw new $(ut);this.searchParams=null}else{if(se!==void 0&&(je=new bn(se,!0)),ut=this.parse(q,null,je),ut)throw new $(ut);$e=F(new R),$e.bindURL(this),this.searchParams=$e}};bn.prototype={type:"URL",parse:function(ne,ge,se){var q=this,je=ge||lt,ut=0,$e="",Lt=!1,yt=!1,Xt=!1,ur,Ee,wt,Hr;for(ne=m(ne),ge||(q.scheme="",q.username="",q.password="",q.host=null,q.port=null,q.path=[],q.query=null,q.fragment=null,q.cannotBeABaseURL=!1,ne=G(ne,dt,""),ne=G(ne,It,"$1")),ne=G(ne,Ke,""),ur=y(ne);ut<=ur.length;){switch(Ee=ur[ut],je){case lt:if(Ee&&Y(ke,Ee))$e+=he(Ee),je=Pt;else{if(ge)return _e;je=ye;continue}break;case Pt:if(Ee&&(Y(Ze,Ee)||Ee==="+"||Ee==="-"||Ee==="."))$e+=he(Ee);else if(Ee===":"){if(ge&&(q.isSpecial()!==M(Ye,$e)||$e==="file"&&(q.includesCredentials()||q.port!==null)||q.scheme==="file"&&!q.host))return;if(q.scheme=$e,ge){q.isSpecial()&&Ye[q.scheme]===q.port&&(q.port=null);return}$e="",q.scheme==="file"?je=Jn:q.isSpecial()&&se&&se.scheme===q.scheme?je=Re:q.isSpecial()?je=pt:ur[ut+1]==="/"?(je=Qe,ut++):(q.cannotBeABaseURL=!0,k(q.path,""),je=yn)}else{if(ge)return _e;$e="",je=ye,ut=0;continue}break;case ye:if(!se||se.cannotBeABaseURL&&Ee!=="#")return _e;if(se.cannotBeABaseURL&&Ee==="#"){q.scheme=se.scheme,q.path=p(se.path),q.query=se.query,q.fragment="",q.cannotBeABaseURL=!0,je=Mr;break}je=se.scheme==="file"?Jn:we;continue;case Re:if(Ee==="/"&&ur[ut+1]==="/")je=At,ut++;else{je=we;continue}break;case Qe:if(Ee==="/"){je=Tt;break}else{je=Sr;continue}case we:if(q.scheme=se.scheme,Ee===Ae)q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.query=se.query;else if(Ee==="/"||Ee==="\\"&&q.isSpecial())je=ot;else if(Ee==="?")q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.query="",je=Ar;else if(Ee==="#")q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.query=se.query,q.fragment="",je=Mr;else{q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.path.length--,je=Sr;continue}break;case ot:if(q.isSpecial()&&(Ee==="/"||Ee==="\\"))je=At;else if(Ee==="/")je=Tt;else{q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,je=Sr;continue}break;case pt:if(je=At,Ee!=="/"||P($e,ut+1)!=="/")continue;ut++;break;case At:if(Ee!=="/"&&Ee!=="\\"){je=Tt;continue}break;case Tt:if(Ee==="@"){Lt&&($e="%40"+$e),Lt=!0,wt=y($e);for(var hi=0;hi<wt.length;hi++){var Xn=wt[hi];if(Xn===":"&&!Xt){Xt=!0;continue}var Cr=tt(Xn,Xe);Xt?q.password+=Cr:q.username+=Cr}$e=""}else if(Ee===Ae||Ee==="/"||Ee==="?"||Ee==="#"||Ee==="\\"&&q.isSpecial()){if(Lt&&$e==="")return le;ut-=y($e).length+1,$e="",je=Ft}else $e+=Ee;break;case Ft:case nr:if(ge&&q.scheme==="file"){je=wn;continue}else if(Ee===":"&&!yt){if($e==="")return Ue;if(Hr=q.parseHost($e),Hr)return Hr;if($e="",je=dr,ge===nr)return}else if(Ee===Ae||Ee==="/"||Ee==="?"||Ee==="#"||Ee==="\\"&&q.isSpecial()){if(q.isSpecial()&&$e==="")return Ue;if(ge&&$e===""&&(q.includesCredentials()||q.port!==null))return;if(Hr=q.parseHost($e),Hr)return Hr;if($e="",je=$t,ge)return;continue}else Ee==="["?yt=!0:Ee==="]"&&(yt=!1),$e+=Ee;break;case dr:if(Y(et,Ee))$e+=Ee;else if(Ee===Ae||Ee==="/"||Ee==="?"||Ee==="#"||Ee==="\\"&&q.isSpecial()||ge){if($e!==""){var Ki=x($e,10);if(Ki>65535)return De;q.port=q.isSpecial()&&Ki===Ye[q.scheme]?null:Ki,$e=""}if(ge)return;je=$t;continue}else return De;break;case Jn:if(q.scheme="file",Ee==="/"||Ee==="\\")je=jr;else if(se&&se.scheme==="file")switch(Ee){case Ae:q.host=se.host,q.path=p(se.path),q.query=se.query;break;case"?":q.host=se.host,q.path=p(se.path),q.query="",je=Ar;break;case"#":q.host=se.host,q.path=p(se.path),q.query=se.query,q.fragment="",je=Mr;break;default:Oe(B(p(ur,ut),""))||(q.host=se.host,q.path=p(se.path),q.shortenPath()),je=Sr;continue}else{je=Sr;continue}break;case jr:if(Ee==="/"||Ee==="\\"){je=wn;break}se&&se.scheme==="file"&&!Oe(B(p(ur,ut),""))&&(Te(se.path[0],!0)?k(q.path,se.path[0]):q.host=se.host),je=Sr;continue;case wn:if(Ee===Ae||Ee==="/"||Ee==="\\"||Ee==="?"||Ee==="#"){if(!ge&&Te($e))je=Sr;else if($e===""){if(q.host="",ge)return;je=$t}else{if(Hr=q.parseHost($e),Hr)return Hr;if(q.host==="localhost"&&(q.host=""),ge)return;$e="",je=$t}continue}else $e+=Ee;break;case $t:if(q.isSpecial()){if(je=Sr,Ee!=="/"&&Ee!=="\\")continue}else if(!ge&&Ee==="?")q.query="",je=Ar;else if(!ge&&Ee==="#")q.fragment="",je=Mr;else if(Ee!==Ae&&(je=Sr,Ee!=="/"))continue;break;case Sr:if(Ee===Ae||Ee==="/"||Ee==="\\"&&q.isSpecial()||!ge&&(Ee==="?"||Ee==="#")){if(Mt($e)?(q.shortenPath(),Ee!=="/"&&!(Ee==="\\"&&q.isSpecial())&&k(q.path,"")):Be($e)?Ee!=="/"&&!(Ee==="\\"&&q.isSpecial())&&k(q.path,""):(q.scheme==="file"&&!q.path.length&&Te($e)&&(q.host&&(q.host=""),$e=P($e,0)+":"),k(q.path,$e)),$e="",q.scheme==="file"&&(Ee===Ae||Ee==="?"||Ee==="#"))for(;q.path.length>1&&q.path[0]==="";)K(q.path);Ee==="?"?(q.query="",je=Ar):Ee==="#"&&(q.fragment="",je=Mr)}else $e+=tt(Ee,Le);break;case yn:Ee==="?"?(q.query="",je=Ar):Ee==="#"?(q.fragment="",je=Mr):Ee!==Ae&&(q.path[0]+=tt(Ee,Me));break;case Ar:!ge&&Ee==="#"?(q.fragment="",je=Mr):Ee!==Ae&&(Ee==="'"&&q.isSpecial()?q.query+="%27":Ee==="#"?q.query+="%23":q.query+=tt(Ee,Me));break;case Mr:Ee!==Ae&&(q.fragment+=tt(Ee,de));break}ut++}},parseHost:function(ne){var ge,se,q;if(P(ne,0)==="["){if(P(ne,ne.length-1)!=="]"||(ge=fe(W(ne,1,-1)),!ge))return Ue;this.host=ge}else if(this.isSpecial()){if(ne=v(ne),Y(ht,ne)||(ge=Pe(ne),ge===null))return Ue;this.host=ge}else{if(Y(Je,ne))return Ue;for(ge="",se=y(ne),q=0;q<se.length;q++)ge+=tt(se[q],Me);this.host=ge}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return M(Ye,this.scheme)},shortenPath:function(){var ne=this.path,ge=ne.length;ge&&(this.scheme!=="file"||ge!==1||!Te(ne[0],!0))&&ne.length--},serialize:function(){var ne=this,ge=ne.scheme,se=ne.username,q=ne.password,je=ne.host,ut=ne.port,$e=ne.path,Lt=ne.query,yt=ne.fragment,Xt=ge+":";return je!==null?(Xt+="//",ne.includesCredentials()&&(Xt+=se+(q?":"+q:"")+"@"),Xt+=Ne(je),ut!==null&&(Xt+=":"+ut)):ge==="file"&&(Xt+="//"),Xt+=ne.cannotBeABaseURL?$e[0]:$e.length?"/"+B($e,"/"):"",Lt!==null&&(Xt+="?"+Lt),yt!==null&&(Xt+="#"+yt),Xt},setHref:function(ne){var ge=this.parse(ne);if(ge)throw new $(ge);this.searchParams.update()},getOrigin:function(){var ne=this.scheme,ge=this.port;if(ne==="blob")try{return new hn(ne.path[0]).origin}catch(se){return"null"}return ne==="file"||!this.isSpecial()?"null":ne+"://"+Ne(this.host)+(ge!==null?":"+ge:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ne){this.parse(m(ne)+":",lt)},getUsername:function(){return this.username},setUsername:function(ne){var ge=y(m(ne));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var se=0;se<ge.length;se++)this.username+=tt(ge[se],Xe)}},getPassword:function(){return this.password},setPassword:function(ne){var ge=y(m(ne));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var se=0;se<ge.length;se++)this.password+=tt(ge[se],Xe)}},getHost:function(){var ne=this.host,ge=this.port;return ne===null?"":ge===null?Ne(ne):Ne(ne)+":"+ge},setHost:function(ne){this.cannotBeABaseURL||this.parse(ne,Ft)},getHostname:function(){var ne=this.host;return ne===null?"":Ne(ne)},setHostname:function(ne){this.cannotBeABaseURL||this.parse(ne,nr)},getPort:function(){var ne=this.port;return ne===null?"":m(ne)},setPort:function(ne){this.cannotHaveUsernamePasswordPort()||(ne=m(ne),ne===""?this.port=null:this.parse(ne,dr))},getPathname:function(){var ne=this.path;return this.cannotBeABaseURL?ne[0]:ne.length?"/"+B(ne,"/"):""},setPathname:function(ne){this.cannotBeABaseURL||(this.path=[],this.parse(ne,$t))},getSearch:function(){var ne=this.query;return ne?"?"+ne:""},setSearch:function(ne){ne=m(ne),ne===""?this.query=null:(P(ne,0)==="?"&&(ne=W(ne,1)),this.query="",this.parse(ne,Ar)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ne=this.fragment;return ne?"#"+ne:""},setHash:function(ne){if(ne=m(ne),ne===""){this.fragment=null;return}P(ne,0)==="#"&&(ne=W(ne,1)),this.fragment="",this.parse(ne,Mr)},update:function(){this.query=this.searchParams.serialize()||null}};var hn=function(ge){var se=d(this,tr),q=C(arguments.length,1)>1?arguments[1]:void 0,je=A(se,new bn(ge,!1,q));r||(se.href=je.serialize(),se.origin=je.getOrigin(),se.protocol=je.getProtocol(),se.username=je.getUsername(),se.password=je.getPassword(),se.host=je.getHost(),se.hostname=je.getHostname(),se.port=je.getPort(),se.pathname=je.getPathname(),se.search=je.getSearch(),se.searchParams=je.getSearchParams(),se.hash=je.getHash())},tr=hn.prototype,Nr=function(ne,ge){return{get:function(){return w(this)[ne]()},set:ge&&function(se){return w(this)[ge](se)},configurable:!0,enumerable:!0}};if(r&&(f(tr,"href",Nr("serialize","setHref")),f(tr,"origin",Nr("getOrigin")),f(tr,"protocol",Nr("getProtocol","setProtocol")),f(tr,"username",Nr("getUsername","setUsername")),f(tr,"password",Nr("getPassword","setPassword")),f(tr,"host",Nr("getHost","setHost")),f(tr,"hostname",Nr("getHostname","setHostname")),f(tr,"port",Nr("getPort","setPort")),f(tr,"pathname",Nr("getPathname","setPathname")),f(tr,"search",Nr("getSearch","setSearch")),f(tr,"searchParams",Nr("getSearchParams")),f(tr,"hash",Nr("getHash","setHash"))),c(tr,"toJSON",function(){return w(this).serialize()},{enumerable:!0}),c(tr,"toString",function(){return w(this).serialize()},{enumerable:!0}),H){var rn=H.createObjectURL,Wi=H.revokeObjectURL;rn&&c(hn,"createObjectURL",u(rn,H)),Wi&&c(hn,"revokeObjectURL",u(Wi,H))}return D(hn,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!r},{URL:hn}),bq}var Vq;function eDe(){return Vq||(Vq=1,XEe()),wq}eDe();var Bq={},Gq;function tDe(){if(Gq)return Bq;Gq=1;var t=xt(),r=Mn();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),Bq}tDe();var Zq={},Wq;function rDe(){return Wq||(Wq=1,$q()),Zq}rDe();var Kq={},qq;function nDe(){if(qq)return Kq;qq=1;var t=Aa(),r=hr(),n=wi(),a=y4(),u=URLSearchParams,s=u.prototype,c=r(s.append),f=r(s.delete),d=r(s.forEach),M=r([].push),I=new u("a=1&a=2&b=3");return I.delete("a",1),I.delete("b",void 0),I+""!="a=2"&&t(s,"delete",function(y){var p=arguments.length,N=p<2?void 0:arguments[1];if(p&&N===void 0)return f(this,y);var v=[];d(this,function(R,F){M(v,{key:F,value:R})}),a(p,1);for(var m=n(y),D=n(N),C=0,j=0,S=!1,A=v.length,w;C<A;)w=v[C++],S||w.key===m?(S=!0,f(this,w.key)):j++;for(;j<A;)w=v[j++],w.key===m&&w.value===D||c(this,w.key,w.value)},{enumerable:!0,unsafe:!0}),Kq}nDe();var Jq={},Xq;function iDe(){if(Xq)return Jq;Xq=1;var t=Aa(),r=hr(),n=wi(),a=y4(),u=URLSearchParams,s=u.prototype,c=r(s.getAll),f=r(s.has),d=new u("a=1");return(d.has("a",2)||!d.has("a",void 0))&&t(s,"has",function(I){var y=arguments.length,p=y<2?void 0:arguments[1];if(y&&p===void 0)return f(this,I);var N=c(this,I);a(y,1);for(var v=n(p),m=0;m<N.length;)if(N[m++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),Jq}iDe();var eJ={},tJ;function aDe(){if(tJ)return eJ;tJ=1;var t=qr(),r=hr(),n=Su(),a=URLSearchParams.prototype,u=r(a.forEach);return t&&!("size"in a)&&n(a,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),eJ}aDe();function $2(t){"@babel/helpers - typeof";return $2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$2(t)}function oDe(t,r){return cDe(t)||lDe(t,r)||sDe(t,r)||uDe()}function uDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
75
75
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sDe(t,r){if(t){if(typeof t=="string")return rJ(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rJ(t,r):void 0}}function rJ(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function lDe(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function cDe(t){if(Array.isArray(t))return t}function fDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function dDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,nJ(a.key),a)}}function MDe(t,r,n){return r&&dDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Oh(t,r,n){return(r=nJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function nJ(t){var r=gDe(t,"string");return $2(r)=="symbol"?r:r+""}function gDe(t,r){if($2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if($2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var IDe=function(){function t(){fDe(this,t),Oh(this,"_levels",[]),Oh(this,"_transports",[]),Oh(this,"_logs",[]),Oh(this,"_prevTime",0);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var n=r.split(">"),a=oDe(n,2),u=a[0],s=a[1];this._levels=u.split(","),s&&(this._transports=s.split(","))}catch(c){return}}return MDe(t,[{key:"create",value:function(n,a){var u=this;return function(s){var c=Date.now(),f=0;if(u._prevTime&&(f=c-u._prevTime),u._prevTime=c,u._levels.includes(n)&&u._transports.includes("console")){var d=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(d,";"),n,"",s,"color: ".concat(d,";"),f)}u._logs.push("".concat(n,": ").concat(s," +").concat(f,"ms"))}}},{key:"getLogs",value:function(){return this._logs}},{key:"cleanLogs",value:function(){this._logs=[]}},{key:"saveLogsToFile",value:function(){if(!(!this._transports.includes("file")||!this._logs.length)){var n=this._logs.join(`
76
- `),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=u,s.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),PS=new IDe;function Cg(t){"@babel/helpers - typeof";return Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Cg(t)}function Cn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Cn=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(x,O,L,P){return Object.defineProperty(x,O,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,O,L,P){var Y=O&&O.prototype instanceof p?O:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,O,L){try{return{type:"normal",arg:x.call(O,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,C=D&&D(D($([])));C&&C!==n&&a.call(C,s)&&(m=C);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(O){d(x,O,function(L){return this._invoke(O,L)})})}function A(x,O){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Cg(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):O.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new O(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,O){var L=O.method,P=x.i[L];if(P===t)return O.delegate=null,L==="throw"&&x.i.return&&(O.method="return",O.arg=t,w(x,O),O.method==="throw")||L!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,y;var B=Y.arg;return B?B.done?(O[x.r]=B.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,y):B:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Cg(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===N||(O.displayName||O.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,O,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,O,L,P),Y);return r.isGeneratorFunction(O)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var O=Object(x),L=[];for(var P in O)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in O)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!O)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var L=this;function P(K){J.type="throw",J.arg=O,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(O,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(O==="break"||O==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=O,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(O,L){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&L&&(this.next=L),y},finish:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===O)return this.complete(P[4],P[3]),F(P),y}},catch:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===O){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(O,L,P){return this.delegate={i:$(O),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function iJ(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function cu(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){iJ(s,a,u,c,f,"next",d)}function f(d){iJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function pDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function yDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,aJ(a.key),a)}}function hDe(t,r,n){return r&&yDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b4(t,r,n){return(r=aJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function aJ(t){var r=NDe(t,"string");return Cg(r)=="symbol"?r:r+""}function NDe(t,r){if(Cg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Cg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var To=PS.create("wasm_idv"),vDe=function(){function t(r){pDe(this,t),b4(this,"_worker",null),b4(this,"_initialized",!1),b4(this,"_connectedToIdv",!1),b4(this,"_serviceRunning",!1),b4(this,"_userId",che(Ipe)),b4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return hDe(t,[{key:"init",value:function(){var r=cu(Cn().mark(function a(){var u,s,c,f;return Cn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm-development.regulaforensics.com/idv/rc/2.4/7e4b8ba-953234a5c//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,c=URL.createObjectURL(s),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),To("Creating worker error: ".concat(JSON.stringify(M.t0)));case 15:M.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){M.next=20;break}return M.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),M.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/rc/2.4/7e4b8ba-953234a5c/",preMain:!0});case 23:return f=M.sent,f.code===0&&To("Worker was created successfully"),M.abrupt("return",f);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return r.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var r=cu(Cn().mark(function a(u){var s,c;return Cn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:O5.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(s=u.isSecure)!==null&&s!==void 0?s:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),To("IdvWasmService result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var r=cu(Cn().mark(function a(u){var s;return Cn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:O5.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=f.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),To("Connection by URL result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var r=cu(Cn().mark(function a(u,s,c){var f,d;return Cn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},c&&(fhe(c)?f.metadata=c:console.log("WARN (Idv):: metadata is not an object or an empty object")),I.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=I.sent,To("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,s){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=cu(Cn().mark(function a(u,s){var c,f;return Cn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:s},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,To("Continue session result code: ".concat(f.code)),M.abrupt("return",f);case 6:case"end":return M.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var r=cu(Cn().mark(function a(){var u,s,c=arguments;return Cn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=d.sent,To("listWorkflows result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,To("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,To("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,To("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var r=cu(Cn().mark(function a(u){var s;return Cn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=f.sent,To("getWorkflow result code: ".concat(s.code)),f.abrupt("return",s);case 5:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var r=cu(Cn().mark(function a(u,s){var c;return Cn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return c=d.sent,To("pushData result code: ".concat(c.code)),d.abrupt("return",c);case 5:case"end":return d.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,To("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,To("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,To("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var r=cu(Cn().mark(function a(u){var s=this;return Cn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!s._worker)return M();s._worker.onmessage=function(I){var y=I.data.target;if(y==="stdout"){To(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,v=p.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(v)}if(y==="stderr"){var m=I.data.content;To(JSON.stringify(m)),s._setErrorScreen&&s._setErrorScreen(m)}},s._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()}])}();function Og(t){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Og(t)}function oJ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function H2(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oJ(Object(n),!0).forEach(function(a){US(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function US(t,r,n){return(r=mDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function mDe(t){var r=EDe(t,"string");return Og(r)=="symbol"?r:r+""}function EDe(t,r){if(Og(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Og(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ri(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ri=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(x,O,L,P){return Object.defineProperty(x,O,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,O,L,P){var Y=O&&O.prototype instanceof p?O:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,O,L){try{return{type:"normal",arg:x.call(O,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,C=D&&D(D($([])));C&&C!==n&&a.call(C,s)&&(m=C);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(O){d(x,O,function(L){return this._invoke(O,L)})})}function A(x,O){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Og(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):O.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new O(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,O){var L=O.method,P=x.i[L];if(P===t)return O.delegate=null,L==="throw"&&x.i.return&&(O.method="return",O.arg=t,w(x,O),O.method==="throw")||L!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,y;var B=Y.arg;return B?B.done?(O[x.r]=B.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,y):B:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Og(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===N||(O.displayName||O.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,O,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,O,L,P),Y);return r.isGeneratorFunction(O)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var O=Object(x),L=[];for(var P in O)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in O)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!O)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var L=this;function P(K){J.type="throw",J.arg=O,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(O,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(O==="break"||O==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=O,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(O,L){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&L&&(this.next=L),y},finish:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===O)return this.complete(P[4],P[3]),F(P),y}},catch:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===O){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(O,L,P){return this.delegate={i:$(O),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function uJ(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Pl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){uJ(s,a,u,c,f,"next",d)}function f(d){uJ(s,a,u,c,f,"throw",d)}c(void 0)})}}var DDe=PS.create("store_idv"),TDe=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Pl(Ri().mark(function s(){var c;return Ri().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new vDe,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){p.next=3;break}return p.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return p.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=p.sent,M=null,d.code===4&&(M=yg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=yg.PROVIDER_ERROR),M===null){p.next=12;break}return I=new c2({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},s)}))()},connectByUrl:function(u){return Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=n().wasmService,p.next=3,c.connectByUrl(u);case 3:if(f=p.sent,d=null,f.code===4&&(d=yg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=yg.PROVIDER_ERROR),d===null){p.next=13;break}return M=new c2({errorCode:d}),I=new Wy({errorCode:L5.CONNECTION_ISSUE,underlyingBaseError:M}),p.abrupt("return",{workflows:[],error:I});case 13:return p.abrupt("return",{workflows:f.data});case 14:case"end":return p.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=function(f){var d,M=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,I=H2(H2({},f.results),{},{sessionId:M}),y=H2({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(y)};r(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Pl(Ri().mark(function s(){var c,f,d,M;return Ri().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,jDe(c);case 4:return f=y.sent,r(function(){return{externalModules:f}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new l2({errorCode:K0.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=YE(u.find(function(c){return c.templateId===w5}));s.templateLayout=xF(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Pl(Ri().mark(function s(c,f){var d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=Pl(Ri().mark(function v(){var m,D,C,j;return Ri().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(m=A.sent,D=null,m.code===4&&(D=ol.HTTP_ISSUE),m.code!==0&&m.code!==4&&(D=ol.PROVIDER_ERROR),D!==null&&(C=new v4({errorCode:ol.HTTP_ISSUE}),j=new vo({errorCode:No.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:C}),d=j),m.code!==0){A.next=12;break}return d=null,A.abrupt("return",m);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,FE(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.stop()}},s)}));function u(s,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var c=s.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=Pl(Ri().mark(function v(){var m,D,C,j,S,A,w,R,F,H,$,x,O,L;return Ri().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,n().wasmService.getSessionState();case 2:if(j=Y.sent,S=(m=j.data)===null||m===void 0?void 0:m.currentStep,A=(D=j.data)===null||D===void 0?void 0:D.isProcessingFiles,w=(C=j.data)===null||C===void 0||(C=C.workflow)===null||C===void 0?void 0:C.steps,R=uhe(w,S),F=j.code===4,H=j.code!==0&&j.code!==4,$=j.code===0&&(!j.data.workflow||!j.data.currentStep),x=null,w&&!R&&(x=ol.NOT_DATA_TYPE),F&&(x=ol.HTTP_ISSUE),H&&(x=ol.PROVIDER_ERROR),A&&(x=ol.IS_PROCESSING),$&&(x=ol.DECODING_FAILED),x!==null&&(O=new v4({errorCode:x}),L=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:O}),c=L),DDe(JSON.stringify({nextStep:S,isDataType:R,isProcessingFiles:A})),!(R&&!A&&!F&&!H&&!$)){Y.next=21;break}return c=null,Y.abrupt("return",j.data);case 21:return Y.abrupt("return",null);case 22:case"end":return Y.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},p.next=5,FE(f,d);case 5:if(M=p.sent,!c){p.next=8;break}return p.abrupt("return",{error:c});case 8:if(!M){p.next=10;break}return p.abrupt("return",{sessionData:M});case 10:return c=new v4({errorCode:ol.DECODING_FAILED}),I=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var c=n()._findStepById(s);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:Z0.MESSAGE,message:W0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Pl(Ri().mark(function s(c){var f,d,M,I,y,p,N,v,m;return Ri().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(f=n().currentStepId,f){C.next=3;break}return C.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){C.next=7;break}return n().setFinalStepAndStopProcess(),C.abrupt("return");case 7:if(!(c instanceof Wn)){C.next=13;break}return d=c,M=new vo({errorCode:No.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),C.abrupt("return");case 13:return C.next=15,n()._pushStep(f,c);case 15:if(I=C.sent,!I.error){C.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),C.abrupt("return");case 20:return C.next=22,n()._waitingForNextStep();case 22:if(y=C.sent,!y.error){C.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),C.abrupt("return");case 27:if(p=y.sessionData.workflow,N=y.sessionData.currentStep,n().setWorkflow(p),n().setLayout(p.client.layout),n().setProcessingTemplate(p.client.steps),n().setSessionProperties(y.sessionData.properties),v=n()._findStepById(N),m=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(v!=null&&v.final&&!m(v.client))){C.next=38;break}return n().setFinalStepAndStopProcess(v.id),C.abrupt("return");case 38:v!=null&&v.final&&m(v.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return C.stop()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var s=n().workflow,c=n().sessionProperties,f=null;if(u===w5&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,y=n()._findStepById(u);if(typeof(y==null||(M=y.client)===null||M===void 0?void 0:M.templateId)=="string"){var p;f=H2(H2({},y==null?void 0:y.client),{},{templateId:y.client.templateId,dataSource:(p=y.dataSource)!==null&&p!==void 0?p:null,properties:c})}if(f){var N;f.sessionId=(N=n().currentSessionData)===null||N===void 0?void 0:N.sessionId,f.serviceToken=n().serviceToken}if(f&&dhe(y==null||(I=y.client)===null||I===void 0?void 0:I.templateLayout)){var v=xF(y.client.templateLayout,n().layout);v&&(f.templateLayout=v)}}var m=ohe(n().externalModules,s.steps,u);if(f===null||!m){var D=new vo({errorCode:No.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:D}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Pl(Ri().mark(function s(){var c,f;return Ri().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=M.sent,n().resetWasmService(),n().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){M.next=7;break}return M.abrupt("return",{});case 7:return M.abrupt("return",{});case 8:case"end":return M.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(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 r(function(){return{wasmService:null}})}}};function jDe(t){return YS.apply(this,arguments)}function YS(){return YS=Pl(Ri().mark(function t(r){var n,a,u,s,c,f;return Ri().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Yf.getIdentifier(),supportedTemplates:Yf.getSupportedTemplates(),component:Yf}],a=US(US({},x5.LIVENESS,function(){return Promise.resolve().then(()=>Drt)}),x5.DOC_READER,function(){return Promise.resolve().then(()=>Z9t)}),u=Ri().mark(function I(){var y,p,N;return Ri().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(y=c[s],p=function(){return a[y]()},!p){m.next=7;break}return m.next=5,p();case 5:N=m.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return m.stop()}},I)}),s=0,c=r;case 4:if(!(s<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,M.next=4;break;case 9:return f=n.filter(function(I){return I!==null}),M.abrupt("return",f);case 11:case"end":return M.stop()}},t)})),YS.apply(this,arguments)}function V2(t){"@babel/helpers - typeof";return V2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},V2(t)}function sJ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function QS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sJ(Object(n),!0).forEach(function(a){SDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function SDe(t,r,n){return(r=ADe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ADe(t){var r=CDe(t,"string");return V2(r)=="symbol"?r:r+""}function CDe(t,r){if(V2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(V2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Oa=oye(function(){return QS(QS(QS({},Nhe.apply(void 0,arguments)),khe.apply(void 0,arguments)),TDe.apply(void 0,arguments))}),lJ=function(r){var n=r.children;return li.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function B2(t){"@babel/helpers - typeof";return B2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},B2(t)}function cJ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function fJ(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?cJ(Object(n),!0).forEach(function(a){ODe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function ODe(t,r,n){return(r=_De(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function _De(t){var r=xDe(t,"string");return B2(r)=="symbol"?r:r+""}function xDe(t,r){if(B2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(B2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var LDe=function(){var r=Oa(function(N){return N.currentScreenConfig}),n=Oa(function(N){return N.pushStepWaitNextStepAndSet}),a=Oa(function(N){return N.processingTransformedTemplate}),u=Oa(function(N){return N.isProcessing}),s=Oa(function(N){return N.setIsProcessing}),c=Oa(function(N){return N.listener}),f=Oa(function(N){return N.externalModules}),d=Oa(function(N){return N.modulesConfig}),M=function(v,m){c({eventType:Z0.MESSAGE,message:m,module:v})},I=function(v){s(v)},y=function(v){s(!1),n(v)},p=Tr.useCallback(function(){if(!r)return null;var N=f.find(function(v){return v.supportedTemplates.includes(r.templateId)});if(N&&r)return li.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?li.jsx(G5,{direction:Fy.Ltr,children:li.jsx(lJ,{children:"Waiting for play... or process completed"})}):li.jsx(li.Fragment,{children:li.jsx(G5,{direction:Fy.Ltr,children:li.jsxs(li.Fragment,{children:[u&&li.jsx(lJ,{children:a?li.jsx(Yf,{perform:y,moduleProps:fJ(fJ({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function wDe(){return li.jsx(Tr.StrictMode,{children:li.jsx(Ppe,{children:li.jsx(LDe,{})})})}function k4(t){"@babel/helpers - typeof";return k4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},k4(t)}function bDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function dJ(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,gJ(a.key),a)}}function kDe(t,r,n){return r&&dJ(t.prototype,r),n&&dJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function RDe(t,r,n){return r=Z2(r),zDe(t,$S()?Reflect.construct(r,[],Z2(t).constructor):r.apply(t,n))}function zDe(t,r){if(r&&(k4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PDe(t)}function PDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function UDe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&G2(t,r)}function FS(t){var r=typeof Map=="function"?new Map:void 0;return FS=function(a){if(a===null||!QDe(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return YDe(a,arguments,Z2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),G2(u,a)},FS(t)}function YDe(t,r,n){if($S())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&G2(u,n.prototype),u}function $S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return($S=function(){return!!t})()}function QDe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function G2(t,r){return G2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},G2(t,r)}function Z2(t){return Z2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z2(t)}function MJ(t,r,n){return(r=gJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function gJ(t){var r=FDe(t,"string");return k4(r)=="symbol"?r:r+""}function FDe(t,r){if(k4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(k4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $De="*,::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%}",IJ=function(t){function r(){var n;return bDe(this,r),n=RDe(this,r),MJ(n,"_root",ope.createRoot(n.attachShadow({mode:"open"}))),MJ(n,"_mounted",!1),n}return UDe(r,t),kDe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.4.166-rc".trim())}},{key:"render",value:function(){this._root.render(li.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[li.jsx("style",{nonce:Oa.getState().getNonce(),children:$De}),li.jsx(wDe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),PS.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(FS(HTMLElement));function _g(t){"@babel/helpers - typeof";return _g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_g(t)}function Gs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Gs=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(x,O,L,P){return Object.defineProperty(x,O,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,O,L,P){var Y=O&&O.prototype instanceof p?O:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,O,L){try{return{type:"normal",arg:x.call(O,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,C=D&&D(D($([])));C&&C!==n&&a.call(C,s)&&(m=C);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(O){d(x,O,function(L){return this._invoke(O,L)})})}function A(x,O){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&_g(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):O.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new O(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,O){var L=O.method,P=x.i[L];if(P===t)return O.delegate=null,L==="throw"&&x.i.return&&(O.method="return",O.arg=t,w(x,O),O.method==="throw")||L!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,y;var B=Y.arg;return B?B.done?(O[x.r]=B.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,y):B:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(_g(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===N||(O.displayName||O.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,O,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,O,L,P),Y);return r.isGeneratorFunction(O)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var O=Object(x),L=[];for(var P in O)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in O)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!O)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var L=this;function P(K){J.type="throw",J.arg=O,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(O,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(O==="break"||O==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=O,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(O,L){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&L&&(this.next=L),y},finish:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===O)return this.complete(P[4],P[3]),F(P),y}},catch:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===O){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(O,L,P){return this.delegate={i:$(O),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function pJ(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function R4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){pJ(s,a,u,c,f,"next",d)}function f(d){pJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function HDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,GDe(a.key),a)}}function BDe(t,r,n){return r&&VDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function GDe(t){var r=ZDe(t,"string");return _g(r)=="symbol"?r:r+""}function ZDe(t,r){if(_g(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(_g(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var WDe=function(){function t(){HDe(this,t)}return BDe(t,[{key:"initialize",value:function(){var r=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=Oa.getState().initialize(u),f.abrupt("return",s);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,Oa.getState().configure(u);case 3:return s=d.sent,d.abrupt("return",s);case 5:return d.next=7,Oa.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var r=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,Oa.getState().getWorkflows(u);case 2:return s=f.sent,f.abrupt("return",s);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,Oa.getState().prepareWorkflowAndPrepareUi(s);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var r=R4(Gs().mark(function a(u){var s,c,f,d;return Gs().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=Ihe(s),I.next=5,Oa.getState().startNewSession(f,c);case 5:if(d=I.sent,!d.error){I.next=8;break}return I.abrupt("return",d);case 8:return I.abrupt("return",new Promise(function(y){var p=function(v){y(v)};Oa.getState().playWorkflow(p)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=R4(Gs().mark(function a(){var u;return Gs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Oa.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function n(){return r.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.4.166-rc")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){Oa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Oa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Oa.getState().setSessionRestoreMode(n)}}])}(),KDe=window.customElements.get("idv-flow");KDe||window.customElements.define("idv-flow",IJ);var qDe=Object.defineProperty,JDe=Object.defineProperties,XDe=Object.getOwnPropertyDescriptors,yJ=Object.getOwnPropertySymbols,eTe=Object.prototype.hasOwnProperty,tTe=Object.prototype.propertyIsEnumerable,hJ=(t,r,n)=>r in t?qDe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,HS=(t,r)=>{for(var n in r||(r={}))eTe.call(r,n)&&hJ(t,n,r[n]);if(yJ)for(var n of yJ(r))tTe.call(r,n)&&hJ(t,n,r[n]);return t},NJ=(t,r)=>JDe(t,XDe(r)),jo=(t,r,n)=>new Promise((a,u)=>{var s=d=>{try{f(n.next(d))}catch(M){u(M)}},c=d=>{try{f(n.throw(d))}catch(M){u(M)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(s,c);f((n=n.apply(t,r)).next())}),vJ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function mJ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var EJ={exports:{}},W2={},DJ={exports:{}},Jr={},TJ;function rTe(){if(TJ)return Jr;TJ=1;/**
76
+ `),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=u,s.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),PS=new IDe;function Cg(t){"@babel/helpers - typeof";return Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Cg(t)}function Cn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Cn=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(x,O,L,P){return Object.defineProperty(x,O,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,O,L,P){var Y=O&&O.prototype instanceof p?O:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,O,L){try{return{type:"normal",arg:x.call(O,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,C=D&&D(D($([])));C&&C!==n&&a.call(C,s)&&(m=C);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(O){d(x,O,function(L){return this._invoke(O,L)})})}function A(x,O){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Cg(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):O.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new O(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,O){var L=O.method,P=x.i[L];if(P===t)return O.delegate=null,L==="throw"&&x.i.return&&(O.method="return",O.arg=t,w(x,O),O.method==="throw")||L!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,y;var B=Y.arg;return B?B.done?(O[x.r]=B.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,y):B:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Cg(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===N||(O.displayName||O.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,O,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,O,L,P),Y);return r.isGeneratorFunction(O)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var O=Object(x),L=[];for(var P in O)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in O)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!O)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var L=this;function P(K){J.type="throw",J.arg=O,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(O,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(O==="break"||O==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=O,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(O,L){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&L&&(this.next=L),y},finish:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===O)return this.complete(P[4],P[3]),F(P),y}},catch:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===O){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(O,L,P){return this.delegate={i:$(O),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function iJ(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function cu(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){iJ(s,a,u,c,f,"next",d)}function f(d){iJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function pDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function yDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,aJ(a.key),a)}}function hDe(t,r,n){return r&&yDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b4(t,r,n){return(r=aJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function aJ(t){var r=NDe(t,"string");return Cg(r)=="symbol"?r:r+""}function NDe(t,r){if(Cg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Cg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var To=PS.create("wasm_idv"),vDe=function(){function t(r){pDe(this,t),b4(this,"_worker",null),b4(this,"_initialized",!1),b4(this,"_connectedToIdv",!1),b4(this,"_serviceRunning",!1),b4(this,"_userId",che(Ipe)),b4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return hDe(t,[{key:"init",value:function(){var r=cu(Cn().mark(function a(){var u,s,c,f;return Cn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm-development.regulaforensics.com/idv/rc/2.4/7e4b8ba-953234a5c//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,c=URL.createObjectURL(s),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),To("Creating worker error: ".concat(JSON.stringify(M.t0)));case 15:M.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){M.next=20;break}return M.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),M.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/rc/2.4/7e4b8ba-953234a5c/",preMain:!0});case 23:return f=M.sent,f.code===0&&To("Worker was created successfully"),M.abrupt("return",f);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return r.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var r=cu(Cn().mark(function a(u){var s,c;return Cn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:O5.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(s=u.isSecure)!==null&&s!==void 0?s:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),To("IdvWasmService result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var r=cu(Cn().mark(function a(u){var s;return Cn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:O5.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=f.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),To("Connection by URL result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var r=cu(Cn().mark(function a(u,s,c){var f,d;return Cn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},c&&(fhe(c)?f.metadata=c:console.log("WARN (Idv):: metadata is not an object or an empty object")),I.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=I.sent,To("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,s){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=cu(Cn().mark(function a(u,s){var c,f;return Cn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:s},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,To("Continue session result code: ".concat(f.code)),M.abrupt("return",f);case 6:case"end":return M.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var r=cu(Cn().mark(function a(){var u,s,c=arguments;return Cn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=d.sent,To("listWorkflows result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,To("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,To("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,To("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var r=cu(Cn().mark(function a(u){var s;return Cn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=f.sent,To("getWorkflow result code: ".concat(s.code)),f.abrupt("return",s);case 5:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var r=cu(Cn().mark(function a(u,s){var c;return Cn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return c=d.sent,To("pushData result code: ".concat(c.code)),d.abrupt("return",c);case 5:case"end":return d.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,To("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,To("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,To("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var r=cu(Cn().mark(function a(u){var s=this;return Cn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!s._worker)return M();s._worker.onmessage=function(I){var y=I.data.target;if(y==="stdout"){To(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,v=p.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(v)}if(y==="stderr"){var m=I.data.content;To(JSON.stringify(m)),s._setErrorScreen&&s._setErrorScreen(m)}},s._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=cu(Cn().mark(function a(){var u;return Cn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()}])}();function Og(t){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Og(t)}function oJ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function H2(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oJ(Object(n),!0).forEach(function(a){US(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function US(t,r,n){return(r=mDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function mDe(t){var r=EDe(t,"string");return Og(r)=="symbol"?r:r+""}function EDe(t,r){if(Og(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Og(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ri(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ri=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(x,O,L,P){return Object.defineProperty(x,O,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,O,L,P){var Y=O&&O.prototype instanceof p?O:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,O,L){try{return{type:"normal",arg:x.call(O,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,C=D&&D(D($([])));C&&C!==n&&a.call(C,s)&&(m=C);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(O){d(x,O,function(L){return this._invoke(O,L)})})}function A(x,O){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Og(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):O.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new O(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,O){var L=O.method,P=x.i[L];if(P===t)return O.delegate=null,L==="throw"&&x.i.return&&(O.method="return",O.arg=t,w(x,O),O.method==="throw")||L!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,y;var B=Y.arg;return B?B.done?(O[x.r]=B.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,y):B:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Og(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===N||(O.displayName||O.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,O,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,O,L,P),Y);return r.isGeneratorFunction(O)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var O=Object(x),L=[];for(var P in O)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in O)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!O)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var L=this;function P(K){J.type="throw",J.arg=O,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(O,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(O==="break"||O==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=O,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(O,L){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&L&&(this.next=L),y},finish:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===O)return this.complete(P[4],P[3]),F(P),y}},catch:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===O){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(O,L,P){return this.delegate={i:$(O),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function uJ(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Pl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){uJ(s,a,u,c,f,"next",d)}function f(d){uJ(s,a,u,c,f,"throw",d)}c(void 0)})}}var DDe=PS.create("store_idv"),TDe=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Pl(Ri().mark(function s(){var c;return Ri().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new vDe,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){p.next=3;break}return p.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return p.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=p.sent,M=null,d.code===4&&(M=yg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=yg.PROVIDER_ERROR),M===null){p.next=12;break}return I=new c2({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},s)}))()},connectByUrl:function(u){return Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=n().wasmService,p.next=3,c.connectByUrl(u);case 3:if(f=p.sent,d=null,f.code===4&&(d=yg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=yg.PROVIDER_ERROR),d===null){p.next=13;break}return M=new c2({errorCode:d}),I=new Wy({errorCode:L5.CONNECTION_ISSUE,underlyingBaseError:M}),p.abrupt("return",{workflows:[],error:I});case 13:return p.abrupt("return",{workflows:f.data});case 14:case"end":return p.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=function(f){var d,M=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,I=H2(H2({},f.results),{},{sessionId:M}),y=H2({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(y)};r(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Pl(Ri().mark(function s(){var c,f,d,M;return Ri().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,jDe(c);case 4:return f=y.sent,r(function(){return{externalModules:f}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new l2({errorCode:K0.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=YE(u.find(function(c){return c.templateId===w5}));s.templateLayout=xF(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Pl(Ri().mark(function s(c,f){var d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=Pl(Ri().mark(function v(){var m,D,C,j;return Ri().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(m=A.sent,D=null,m.code===4&&(D=ol.HTTP_ISSUE),m.code!==0&&m.code!==4&&(D=ol.PROVIDER_ERROR),D!==null&&(C=new v4({errorCode:ol.HTTP_ISSUE}),j=new vo({errorCode:No.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:C}),d=j),m.code!==0){A.next=12;break}return d=null,A.abrupt("return",m);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,FE(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.stop()}},s)}));function u(s,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var c=s.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=Pl(Ri().mark(function v(){var m,D,C,j,S,A,w,R,F,H,$,x,O,L;return Ri().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,n().wasmService.getSessionState();case 2:if(j=Y.sent,S=(m=j.data)===null||m===void 0?void 0:m.currentStep,A=(D=j.data)===null||D===void 0?void 0:D.isProcessingFiles,w=(C=j.data)===null||C===void 0||(C=C.workflow)===null||C===void 0?void 0:C.steps,R=uhe(w,S),F=j.code===4,H=j.code!==0&&j.code!==4,$=j.code===0&&(!j.data.workflow||!j.data.currentStep),x=null,w&&!R&&(x=ol.NOT_DATA_TYPE),F&&(x=ol.HTTP_ISSUE),H&&(x=ol.PROVIDER_ERROR),A&&(x=ol.IS_PROCESSING),$&&(x=ol.DECODING_FAILED),x!==null&&(O=new v4({errorCode:x}),L=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:O}),c=L),DDe(JSON.stringify({nextStep:S,isDataType:R,isProcessingFiles:A})),!(R&&!A&&!F&&!H&&!$)){Y.next=21;break}return c=null,Y.abrupt("return",j.data);case 21:return Y.abrupt("return",null);case 22:case"end":return Y.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},p.next=5,FE(f,d);case 5:if(M=p.sent,!c){p.next=8;break}return p.abrupt("return",{error:c});case 8:if(!M){p.next=10;break}return p.abrupt("return",{sessionData:M});case 10:return c=new v4({errorCode:ol.DECODING_FAILED}),I=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var c=n()._findStepById(s);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:Z0.MESSAGE,message:W0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Pl(Ri().mark(function s(c){var f,d,M,I,y,p,N,v,m;return Ri().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(f=n().currentStepId,f){C.next=3;break}return C.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){C.next=7;break}return n().setFinalStepAndStopProcess(),C.abrupt("return");case 7:if(!(c instanceof Wn)){C.next=13;break}return d=c,M=new vo({errorCode:No.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),C.abrupt("return");case 13:return C.next=15,n()._pushStep(f,c);case 15:if(I=C.sent,!I.error){C.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),C.abrupt("return");case 20:return C.next=22,n()._waitingForNextStep();case 22:if(y=C.sent,!y.error){C.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),C.abrupt("return");case 27:if(p=y.sessionData.workflow,N=y.sessionData.currentStep,n().setWorkflow(p),n().setLayout(p.client.layout),n().setProcessingTemplate(p.client.steps),n().setSessionProperties(y.sessionData.properties),v=n()._findStepById(N),m=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(v!=null&&v.final&&!m(v.client))){C.next=38;break}return n().setFinalStepAndStopProcess(v.id),C.abrupt("return");case 38:v!=null&&v.final&&m(v.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return C.stop()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var s=n().workflow,c=n().sessionProperties,f=null;if(u===w5&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,y=n()._findStepById(u);if(typeof(y==null||(M=y.client)===null||M===void 0?void 0:M.templateId)=="string"){var p;f=H2(H2({},y==null?void 0:y.client),{},{templateId:y.client.templateId,dataSource:(p=y.dataSource)!==null&&p!==void 0?p:null,properties:c})}if(f){var N;f.sessionId=(N=n().currentSessionData)===null||N===void 0?void 0:N.sessionId,f.serviceToken=n().serviceToken}if(f&&dhe(y==null||(I=y.client)===null||I===void 0?void 0:I.templateLayout)){var v=xF(y.client.templateLayout,n().layout);v&&(f.templateLayout=v)}}var m=ohe(n().externalModules,s.steps,u);if(f===null||!m){var D=new vo({errorCode:No.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:D}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Pl(Ri().mark(function s(){var c,f;return Ri().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=M.sent,n().resetWasmService(),n().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){M.next=7;break}return M.abrupt("return",{});case 7:return M.abrupt("return",{});case 8:case"end":return M.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(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 r(function(){return{wasmService:null}})}}};function jDe(t){return YS.apply(this,arguments)}function YS(){return YS=Pl(Ri().mark(function t(r){var n,a,u,s,c,f;return Ri().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Yf.getIdentifier(),supportedTemplates:Yf.getSupportedTemplates(),component:Yf}],a=US(US({},x5.LIVENESS,function(){return Promise.resolve().then(()=>Drt)}),x5.DOC_READER,function(){return Promise.resolve().then(()=>Z9t)}),u=Ri().mark(function I(){var y,p,N;return Ri().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(y=c[s],p=function(){return a[y]()},!p){m.next=7;break}return m.next=5,p();case 5:N=m.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return m.stop()}},I)}),s=0,c=r;case 4:if(!(s<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,M.next=4;break;case 9:return f=n.filter(function(I){return I!==null}),M.abrupt("return",f);case 11:case"end":return M.stop()}},t)})),YS.apply(this,arguments)}function V2(t){"@babel/helpers - typeof";return V2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},V2(t)}function sJ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function QS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sJ(Object(n),!0).forEach(function(a){SDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function SDe(t,r,n){return(r=ADe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ADe(t){var r=CDe(t,"string");return V2(r)=="symbol"?r:r+""}function CDe(t,r){if(V2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(V2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Oa=oye(function(){return QS(QS(QS({},Nhe.apply(void 0,arguments)),khe.apply(void 0,arguments)),TDe.apply(void 0,arguments))}),lJ=function(r){var n=r.children;return li.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function B2(t){"@babel/helpers - typeof";return B2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},B2(t)}function cJ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function fJ(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?cJ(Object(n),!0).forEach(function(a){ODe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function ODe(t,r,n){return(r=_De(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function _De(t){var r=xDe(t,"string");return B2(r)=="symbol"?r:r+""}function xDe(t,r){if(B2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(B2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var LDe=function(){var r=Oa(function(N){return N.currentScreenConfig}),n=Oa(function(N){return N.pushStepWaitNextStepAndSet}),a=Oa(function(N){return N.processingTransformedTemplate}),u=Oa(function(N){return N.isProcessing}),s=Oa(function(N){return N.setIsProcessing}),c=Oa(function(N){return N.listener}),f=Oa(function(N){return N.externalModules}),d=Oa(function(N){return N.modulesConfig}),M=function(v,m){c({eventType:Z0.MESSAGE,message:m,module:v})},I=function(v){s(v)},y=function(v){s(!1),n(v)},p=Tr.useCallback(function(){if(!r)return null;var N=f.find(function(v){return v.supportedTemplates.includes(r.templateId)});if(N&&r)return li.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?li.jsx(G5,{direction:Fy.Ltr,children:li.jsx(lJ,{children:"Waiting for play... or process completed"})}):li.jsx(li.Fragment,{children:li.jsx(G5,{direction:Fy.Ltr,children:li.jsxs(li.Fragment,{children:[u&&li.jsx(lJ,{children:a?li.jsx(Yf,{perform:y,moduleProps:fJ(fJ({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function wDe(){return li.jsx(Tr.StrictMode,{children:li.jsx(Ppe,{children:li.jsx(LDe,{})})})}function k4(t){"@babel/helpers - typeof";return k4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},k4(t)}function bDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function dJ(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,gJ(a.key),a)}}function kDe(t,r,n){return r&&dJ(t.prototype,r),n&&dJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function RDe(t,r,n){return r=Z2(r),zDe(t,$S()?Reflect.construct(r,[],Z2(t).constructor):r.apply(t,n))}function zDe(t,r){if(r&&(k4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PDe(t)}function PDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function UDe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&G2(t,r)}function FS(t){var r=typeof Map=="function"?new Map:void 0;return FS=function(a){if(a===null||!QDe(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return YDe(a,arguments,Z2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),G2(u,a)},FS(t)}function YDe(t,r,n){if($S())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&G2(u,n.prototype),u}function $S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return($S=function(){return!!t})()}function QDe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function G2(t,r){return G2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},G2(t,r)}function Z2(t){return Z2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z2(t)}function MJ(t,r,n){return(r=gJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function gJ(t){var r=FDe(t,"string");return k4(r)=="symbol"?r:r+""}function FDe(t,r){if(k4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(k4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $De="*,::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%}",IJ=function(t){function r(){var n;return bDe(this,r),n=RDe(this,r),MJ(n,"_root",ope.createRoot(n.attachShadow({mode:"open"}))),MJ(n,"_mounted",!1),n}return UDe(r,t),kDe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.4.167-rc".trim())}},{key:"render",value:function(){this._root.render(li.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[li.jsx("style",{nonce:Oa.getState().getNonce(),children:$De}),li.jsx(wDe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),PS.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(FS(HTMLElement));function _g(t){"@babel/helpers - typeof";return _g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_g(t)}function Gs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Gs=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(x,O,L,P){return Object.defineProperty(x,O,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,O,L,P){var Y=O&&O.prototype instanceof p?O:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,O,L){try{return{type:"normal",arg:x.call(O,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,C=D&&D(D($([])));C&&C!==n&&a.call(C,s)&&(m=C);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(O){d(x,O,function(L){return this._invoke(O,L)})})}function A(x,O){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&_g(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):O.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new O(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,O){var L=O.method,P=x.i[L];if(P===t)return O.delegate=null,L==="throw"&&x.i.return&&(O.method="return",O.arg=t,w(x,O),O.method==="throw")||L!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,y;var B=Y.arg;return B?B.done?(O[x.r]=B.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,y):B:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(_g(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===N||(O.displayName||O.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,O,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,O,L,P),Y);return r.isGeneratorFunction(O)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var O=Object(x),L=[];for(var P in O)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in O)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(O){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!O)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var L=this;function P(K){J.type="throw",J.arg=O,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(O,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(O==="break"||O==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=O,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(O,L){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&L&&(this.next=L),y},finish:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===O)return this.complete(P[4],P[3]),F(P),y}},catch:function(O){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===O){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(O,L,P){return this.delegate={i:$(O),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function pJ(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function R4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){pJ(s,a,u,c,f,"next",d)}function f(d){pJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function HDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,GDe(a.key),a)}}function BDe(t,r,n){return r&&VDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function GDe(t){var r=ZDe(t,"string");return _g(r)=="symbol"?r:r+""}function ZDe(t,r){if(_g(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(_g(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var WDe=function(){function t(){HDe(this,t)}return BDe(t,[{key:"initialize",value:function(){var r=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=Oa.getState().initialize(u),f.abrupt("return",s);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,Oa.getState().configure(u);case 3:return s=d.sent,d.abrupt("return",s);case 5:return d.next=7,Oa.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var r=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,Oa.getState().getWorkflows(u);case 2:return s=f.sent,f.abrupt("return",s);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,Oa.getState().prepareWorkflowAndPrepareUi(s);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var r=R4(Gs().mark(function a(u){var s,c,f,d;return Gs().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=Ihe(s),I.next=5,Oa.getState().startNewSession(f,c);case 5:if(d=I.sent,!d.error){I.next=8;break}return I.abrupt("return",d);case 8:return I.abrupt("return",new Promise(function(y){var p=function(v){y(v)};Oa.getState().playWorkflow(p)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=R4(Gs().mark(function a(){var u;return Gs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Oa.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function n(){return r.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.4.167-rc")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){Oa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Oa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Oa.getState().setSessionRestoreMode(n)}}])}(),KDe=window.customElements.get("idv-flow");KDe||window.customElements.define("idv-flow",IJ);var qDe=Object.defineProperty,JDe=Object.defineProperties,XDe=Object.getOwnPropertyDescriptors,yJ=Object.getOwnPropertySymbols,eTe=Object.prototype.hasOwnProperty,tTe=Object.prototype.propertyIsEnumerable,hJ=(t,r,n)=>r in t?qDe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,HS=(t,r)=>{for(var n in r||(r={}))eTe.call(r,n)&&hJ(t,n,r[n]);if(yJ)for(var n of yJ(r))tTe.call(r,n)&&hJ(t,n,r[n]);return t},NJ=(t,r)=>JDe(t,XDe(r)),jo=(t,r,n)=>new Promise((a,u)=>{var s=d=>{try{f(n.next(d))}catch(M){u(M)}},c=d=>{try{f(n.throw(d))}catch(M){u(M)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(s,c);f((n=n.apply(t,r)).next())}),vJ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function mJ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var EJ={exports:{}},W2={},DJ={exports:{}},Jr={},TJ;function rTe(){if(TJ)return Jr;TJ=1;/**
77
77
  * @license React
78
78
  * react.production.min.js
79
79
  *
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-B0x-s2h5.js";
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-oxFpkCkq.js";
2
2
  export {
3
3
  a as ConnectionError,
4
4
  e as DeinitializationError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/idv-capture-web",
3
- "version": "2.4.166-rc",
3
+ "version": "2.4.167-rc",
4
4
  "description": "Regula framework agnostic web components to work with webcamera",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/main.js",