@regulaforensics/idv-capture-web 1.0.121-rc → 2.3.125-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { B as Xu, r as ga, j as Ns } from "./index-BOrKCelQ.js";
1
+ import { B as Xu, r as ga, j as Ns } from "./index-D_V5Xn4R.js";
2
2
  var P5 = Object.defineProperty, H5 = Object.defineProperties, V5 = Object.getOwnPropertyDescriptors, ss = Object.getOwnPropertySymbols, R5 = Object.prototype.hasOwnProperty, Z5 = Object.prototype.propertyIsEnumerable, Ds = (r, i, M) => i in r ? P5(r, i, { enumerable: !0, configurable: !0, writable: !0, value: M }) : r[i] = M, yg = (r, i) => {
3
3
  for (var M in i || (i = {}))
4
4
  R5.call(i, M) && Ds(r, M, i[M]);
@@ -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-BOrKCelQ.js";
25
+ import { B as cc, r as Bs, j as gE } from "./index-D_V5Xn4R.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) => {
@@ -18145,7 +18145,7 @@ var In = h5.create("wasm_idv"), hA = /* @__PURE__ */ function() {
18145
18145
  return lr().wrap(function(d) {
18146
18146
  for (; ; ) switch (d.prev = d.next) {
18147
18147
  case 0:
18148
- return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/rc/1.0/47f8537-46048241d//PlatformAdaptor.worker.js");
18148
+ return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/c2282f0-9701d74ac//PlatformAdaptor.worker.js");
18149
18149
  case 4:
18150
18150
  return u = d.sent, d.next = 7, u.blob();
18151
18151
  case 7:
@@ -18172,7 +18172,7 @@ var In = h5.create("wasm_idv"), hA = /* @__PURE__ */ function() {
18172
18172
  }), d.next = 23, this.sendMessage({
18173
18173
  target: "worker-init",
18174
18174
  URL: document.URL,
18175
- currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/rc/1.0/47f8537-46048241d/",
18175
+ currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/c2282f0-9701d74ac/",
18176
18176
  preMain: !0
18177
18177
  });
18178
18178
  case 23:
@@ -19520,9 +19520,9 @@ function v2() {
19520
19520
  supportedTemplates: $n.getSupportedTemplates(),
19521
19521
  component: $n
19522
19522
  }], o = f2(f2({}, Fh.LIVENESS, function() {
19523
- return import("./index-DOBJPXao.js");
19523
+ return import("./index-8Tu5BVQa.js");
19524
19524
  }), Fh.DOC_READER, function() {
19525
- return import("./index-BCWSi_qC.js");
19525
+ return import("./index-DZaIN6Vx.js");
19526
19526
  }), u = /* @__PURE__ */ br().mark(function h() {
19527
19527
  var g, w, S;
19528
19528
  return br().wrap(function(O) {
package/dist/main.iife.js CHANGED
@@ -59,7 +59,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
59
59
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kge(t,r){if(t){if(typeof t=="string")return F$(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?F$(t,r):void 0}}function F$(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function qge(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function Jge(t){if(Array.isArray(t))return t}var zM=function(t){var r=t.imageId,i=t.imageURL,a=t.base64,u=t.contentMode,l=u===void 0?C0.ASPECT_FILL:u,c=t.cornerRadius,f=t.backgroundColor,M=f===void 0?"transparent":f,d=function(L){if(L===C0.ASPECT_FILL)return"cover";if(L===C0.ASPECT_FIT)return"contain";if(L===C0.FILL)return"fill"},I=Jn.useState(!0),h=Gge(I,2),y=h[0],N=h[1],m=y&&i,E=function(){N(!1)};if(r){var j=r in Nv?r:"default";return ce.jsx(Zge,{type:j})}if(a||i)return ce.jsxs(ce.Fragment,{children:[m&&ce.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:"#e0e0e0",borderRadius:c}}),ce.jsx("img",{style:{width:"100%",height:"100%",objectFit:d(l),borderRadius:c,backgroundColor:M,display:m?"none":"block"},src:a||i,onLoad:E})]})},Xge=function(t){var r=t.signature;return ce.jsx("footer",{style:{display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:ce.jsx("a",{href:"",children:ce.jsx(zM,{imageId:r==null?void 0:r.imageId})})})},$$={},B$;function e5e(){if(B$)return $$;B$=1;var t=jn(),r=Pn(),i=ef(),a=i6(),u=r(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});return t({target:"Date",proto:!0,arity:1,forced:u},{toJSON:function(l){var c=i(this),f=a(c,"number");return typeof f=="number"&&!isFinite(f)?null:c.toISOString()}}),$$}e5e(),nQ();var Z$=Jn.createContext(void 0),t5e=function(t){var r=t.perform,i=t.children;return ce.jsx(Z$.Provider,{value:{perform:r},children:i})},G$=function(){var t=Jn.useContext(Z$);if(!t)throw new Error("usePerform must be used within a PerformProvider");return t},W$={},mv,K$;function r5e(){if(K$)return mv;K$=1;var t=xi(),r=Pn(),i=Xn(),a=sI(),u=rI(),l=ol(),c=CE().f,f=i(c),M=i([].push),d=t&&r(function(){var h=Object.create(null);return h[2]=2,!f(h,2)}),I=function(h){return function(y){for(var N=l(y),m=u(N),E=d&&a(N)===null,j=m.length,L=0,C=[],T;j>L;)T=m[L++],(!t||(E?T in N:f(N,T)))&&M(C,h?[T,N[T]]:N[T]);return C}};return mv={entries:I(!0),values:I(!1)},mv}var q$;function n5e(){if(q$)return W$;q$=1;var t=jn(),r=r5e().entries;return t({target:"Object",stat:!0},{entries:function(i){return r(i)}}),W$}n5e();function fI(t){"@babel/helpers - typeof";return fI=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},fI(t)}function J$(t){return t.split("\\n")}function X$(t){return t===T0.CENTER?"center":t===T0.RIGHT?"right":"left"}function Ev(t){if(fI(t)==="object"&&t!==null)for(var r in t)fI(t[r])==="object"?Ev(t[r]):t[r]==="true"?t[r]=!0:t[r]==="false"&&(t[r]=!1);return t}var i5e={display:"flex",justifyContent:"center",alignItems:"center",background:"white",borderRadius:"50%",width:"36px",height:"36px",border:"none",cursor:"pointer"},a5e=function(t){var r=t.dataTestId,i=t.responseBody,a=G$(),u=a.perform,l=function(){var c=JSON.parse(JSON.stringify(i));Ev(c),u(c)};return ce.jsx("button",{"data-test":r,onClick:l,style:i5e,children:ce.jsx(zM,{imageId:"cross"})},r)},o5e=function(t){var r=t.closeButton;return ce.jsx("header",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"16px"},children:ce.jsx("div",{children:r&&ce.jsx(a5e,$o({dataTestId:"close-btn"},r))})})},eB={},tB;function u5e(){if(tB)return eB;tB=1;var t=jn(),r=UY(),i=oY().indexOf,a=ZF(),u=r([].indexOf),l=!!u&&1/u([1],1,-0)<0,c=l||!a("indexOf");return t({target:"Array",proto:!0,forced:c},{indexOf:function(f){var M=arguments.length>1?arguments[1]:void 0;return l?u(this,f,M)||0:i(this,f,M)}}),eB}u5e();var rB={},nB;function s5e(){if(nB)return rB;nB=1;var t=jn(),r=oI().map,i=KD(),a=i("map");return t({target:"Array",proto:!0,forced:!a},{map:function(u){return r(this,u,arguments.length>1?arguments[1]:void 0)}}),rB}s5e();var l5e={},iB={},Dv,aB;function c5e(){if(aB)return Dv;aB=1;var t=ao(),r=P2(),i=qa(),a=Mv(),u=T$(),l=xD(),c=u(function(){var f=this.iterator,M=i(t(this.next,f)),d=this.done=!!M.done;if(!d)return l(f,this.mapper,[M.value,this.counter++],!0)});return Dv=function(f){return i(this),r(f),new c(a(this),{mapper:f})},Dv}var oB;function f5e(){if(oB)return iB;oB=1;var t=jn(),r=c5e(),i=s1();return t({target:"Iterator",proto:!0,real:!0,forced:i},{map:r}),iB}var uB;function M5e(){return uB||(uB=1,f5e()),l5e}M5e();var S0=function(t){var r=t.text,i=t.fontName,a=i===void 0?"":i,u=t.fontSize,l=u===void 0?"17px":u,c=t.fontColor,f=c===void 0?"black":c,M=t.alignment,d=M===void 0?T0.LEFT:M,I=t.backgroundColor,h=I===void 0?"transparent":I,y=t.cornerRadius,N=y===void 0?0:y;return ce.jsx("div",{className:"title",style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:l,color:f,textAlign:X$(d),backgroundColor:h,borderRadius:N},children:r&&J$(r)})};function O0(t){"@babel/helpers - typeof";return O0=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},O0(t)}function vv(t,r,i){return(r=d5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function d5e(t){var r=g5e(t,"string");return O0(r)=="symbol"?r:r+""}function g5e(t,r){if(O0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(O0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var I5e=function(t){var r=t.title,i=t.image,a=t.responseBody,u=t.backgroundColor,l=t.cornerRadius,c=t.highlightColor,f=t.dataTestId,M=t.children,d=G$(),I=d.perform,h=function(){var N=JSON.parse(JSON.stringify(a));Ev(N),I(N)},y=vv(vv(vv({height:"50px",width:"100%",padding:"10px 16px",textAlign:"center",fontSize:"16px",fontWeight:"400",border:"none",cursor:"pointer",borderRadius:l||0},"--hover-btn-background",c||"red"),"backgroundColor",u||"transparent"),"transition",".3s");return ce.jsxs("button",{"data-test":f,onClick:h,style:y,children:[i&&ce.jsx(zM,{imageURL:i.imageURL}),M||ce.jsx(S0,$o({},r))]},f)};function _0(t){"@babel/helpers - typeof";return _0=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},_0(t)}var p5e=["items"];function sB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function lB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?sB(Object(i),!0).forEach(function(a){y5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):sB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function y5e(t,r,i){return(r=h5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function h5e(t){var r=N5e(t,"string");return _0(r)=="symbol"?r:r+""}function N5e(t,r){if(_0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(_0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function m5e(t,r){if(t==null)return{};var i,a,u=E5e(t,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)i=l[a],r.indexOf(i)===-1&&{}.propertyIsEnumerable.call(t,i)&&(u[i]=t[i])}return u}function E5e(t,r){if(t==null)return{};var i={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(r.indexOf(a)!==-1)continue;i[a]=t[a]}return i}var D5e=function(t){var r=t.items,i=m5e(t,p5e),a={display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",alignSelf:"flex-end",justifyContent:"center",gap:"8px",width:"100%",height:"auto",alignContent:"flex-end",paddingTop:"20px"};return ce.jsx("div",{className:"buttons",style:lB(lB({},a),i),children:r.map(function(u){var l,c;return ce.jsx(I5e,$o({dataTestId:"button-"+((l=u.title)===null||l===void 0?void 0:l.text)},u),(c=u.title)===null||c===void 0?void 0:c.text)})})};function x0(t){"@babel/helpers - typeof";return x0=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},x0(t)}function cB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function v5e(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?cB(Object(i),!0).forEach(function(a){j5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):cB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function j5e(t,r,i){return(r=T5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function T5e(t){var r=C5e(t,"string");return x0(r)=="symbol"?r:r+""}function C5e(t,r){if(x0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(x0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var MI=function(t){var r=t.children,i=t.header,a=t.footer,u=t.backgroundColor,l=u===void 0?"white":u,c=t.buttons,f=i?60:10,M=a?30:10,d={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"center",alignContent:"center",justifyContent:"center",margin:"0 auto",paddingTop:i?f+10+"px":"10px",paddingBottom:a?M+10+"px":"10px",paddingLeft:"20px",paddingRight:"20px",height:"100%",width:"100%",backgroundColor:l};return ce.jsxs("div",{id:"base-container",style:v5e({},d),children:[i&&ce.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:f},children:ce.jsx(o5e,{closeButton:i.closeButton})}),ce.jsx("div",{style:{height:"100%",flex:"1 1 100%",overflow:"hidden"},children:r}),(c==null?void 0:c.length)&&ce.jsx(D5e,{items:c}),a&&ce.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:M},children:ce.jsx(Xge,$o({},a))})]})},jv=function(t){var r=t.text,i=t.fontName,a=i===void 0?"":i,u=t.fontColor,l=u===void 0?"#000000":u,c=t.alignment,f=c===void 0?T0.LEFT:c,M=t.fontSize,d=M===void 0?17:M,I=t.backgroundColor,h=I===void 0?"transparent":I,y=t.cornerRadius,N=y===void 0?0:y;return ce.jsx("div",{style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:d,textAlign:X$(f),color:l,borderRadius:N,backgroundColor:h,whiteSpace:"pre-line"},children:r&&J$(r).map(function(m,E){return m.length===0?ce.jsx("br",{},"description-text_"+E):ce.jsx("p",{children:m},"description-text_"+E)})})};function L0(t){"@babel/helpers - typeof";return L0=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},L0(t)}function fB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function MB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?fB(Object(i),!0).forEach(function(a){A5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function A5e(t,r,i){return(r=S5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function S5e(t){var r=O5e(t,"string");return L0(r)=="symbol"?r:r+""}function O5e(t,r){if(L0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(L0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var _5e=function(t){var r=t.title,i=t.description,a=t.image,u=t.backgroundColor,l=u===void 0?"transparent":u,c=t.cornerRadius,f=c===void 0?0:c,M=t.isLastChild,d={display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:M?"none":"1px solid #E0E0E0",padding:"16px 0",gap:16};return ce.jsxs("div",{className:"details-item",style:MB(MB({},d),{},{backgroundColor:l,borderRadius:f}),children:[ce.jsxs("div",{style:{flex:"0 1 auto"},children:[ce.jsx("div",{style:{marginBottom:5,fontWeight:"bold",lineHeight:"21px"},children:ce.jsx(S0,$o({},r))}),ce.jsx("div",{style:{lineHeight:"21px",fontWeight:"400"},children:ce.jsx(jv,$o({},i))})]}),ce.jsx("div",{style:{aspectRatio:"1 / 1",width:120,height:120,flex:"0 0 120px"},children:ce.jsx(zM,$o({},a))})]})};function w0(t){"@babel/helpers - typeof";return w0=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},w0(t)}function dB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function gB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?dB(Object(i),!0).forEach(function(a){x5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):dB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function x5e(t,r,i){return(r=L5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function L5e(t){var r=w5e(t,"string");return w0(r)=="symbol"?r:r+""}function w5e(t,r){if(w0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(w0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var b5e={display:"flex",flexDirection:"column",padding:"0 16px"},k5e=function(t){var r=t.items,i=t.backgroundColor,a=i===void 0?"white":i,u=t.cornerRadius,l=u===void 0?16:u;return ce.jsx("div",{className:"details",style:gB(gB({},b5e),{},{backgroundColor:a,borderRadius:l}),children:r.map(function(c,f){return ce.jsx(_5e,$o({isLastChild:f===r.length-1},c),f)})})},z5e=function(t){var r=t.title,i=t.indicatorColor,a=i===void 0?"black":i;return ce.jsxs(ce.Fragment,{children:[ce.jsx(Q$,{indicatorColor:a}),ce.jsx("div",{children:r==null?void 0:r.text})]})};function R5e(t,r){return V5e(t)||H5e(t,r)||U5e(t,r)||P5e()}function P5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
60
60
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U5e(t,r){if(t){if(typeof t=="string")return IB(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?IB(t,r):void 0}}function IB(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function H5e(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function V5e(t){if(Array.isArray(t))return t}var Y5e=function(t){var r=t.title,i=t.header,a=t.footer,u=t.details,l=t.buttons,c=t.backgroundColor,f=Jn.useRef(null),M=Jn.useState(!1),d=R5e(M,2),I=d[0],h=d[1];return Jn.useEffect(function(){f.current&&h(f.current.scrollHeight>f.current.clientHeight)},[]),ce.jsx(MI,{header:i,buttons:l,footer:a,backgroundColor:c,children:ce.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:I?"flex-start":"center",height:"100%",minHeight:"100%",overflow:"auto"},ref:f,children:[ce.jsx("div",{style:{marginBottom:r?"16px":"0",fontWeight:400,fontSize:"28px"},children:r&&ce.jsx(S0,$o({},r))}),u&&ce.jsx(k5e,$o({},u))]})})},Q5e={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},F5e={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function b0(t){"@babel/helpers - typeof";return b0=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},b0(t)}function pB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function yB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?pB(Object(i),!0).forEach(function(a){$5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):pB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function $5e(t,r,i){return(r=B5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function B5e(t){var r=Z5e(t,"string");return b0(r)=="symbol"?r:r+""}function Z5e(t,r){if(b0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(b0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var G5e=function(t){var r=t.title,i=t.header,a=t.footer,u=t.image,l=t.description,c=t.buttons,f=t.backgroundColor;return ce.jsx(MI,{header:i,footer:a,buttons:c,backgroundColor:f,children:ce.jsx(ce.Fragment,{children:ce.jsxs("div",{style:yB(yB({},F5e),{},{justifyContent:u?"flex-start":"center"}),children:[u&&ce.jsx("div",{style:Q5e,children:ce.jsx(zM,$o({},u))}),r&&ce.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:ce.jsx(S0,$o({},r))}),l&&ce.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:ce.jsx(jv,$o({},l))})]})})})},hB=function(t){var r=t.progressView,i=t.footer,a=t.backgroundColor;return ce.jsx(MI,{footer:i,backgroundColor:a,children:ce.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"20px",height:"100%",width:"100%"},children:ce.jsx(z5e,{title:(r==null?void 0:r.title)||{text:""},indicatorColor:(r==null?void 0:r.indicatorColor)||"black"})})})},W5e={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},K5e={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},q5e={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},J5e={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},X5e=function(t){var r=t.header,i=t.footer,a=t.image,u=t.title,l=t.description,c=t.buttons,f=t.backgroundColor;return ce.jsx(MI,{header:r,buttons:c,footer:i,backgroundColor:f,children:ce.jsxs("div",{style:W5e,children:[a&&ce.jsx("div",{style:K5e,children:ce.jsx(zM,$o({},a))}),(u==null?void 0:u.text)&&ce.jsx("div",{style:q5e,children:u&&ce.jsx(S0,$o({},u))}),(l==null?void 0:l.text)&&ce.jsx("div",{style:J5e,children:ce.jsx(jv,$o({},l))})]})})},Tv=!1,eIe=function(t){var r=t.template,i=t.templateLayout;if(r==="STATUS")return ce.jsx(X5e,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,buttons:i==null?void 0:i.buttons,description:i==null?void 0:i.description,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="INFO")return ce.jsx(G5e,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,description:i==null?void 0:i.description,buttons:i==null?void 0:i.buttons,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="PROGRESS")return ce.jsx(hB,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,progressView:i==null?void 0:i.progressView,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="INFO_DETAILS")return ce.jsx(Y5e,{header:i==null?void 0:i.header,title:i==null?void 0:i.title,details:i==null?void 0:i.details,buttons:i==null?void 0:i.buttons,footer:i==null?void 0:i.footer,backgroundColor:i==null?void 0:i.backgroundColor})},NB="GUI",l1=function(t){var r=t.moduleProps,i=t.perform,a=r.templateId,u=r.templateLayout,l=Jn.useCallback(function(c){i&&i(c)},[a]);return a&&u?ce.jsx(t5e,{perform:l,children:ce.jsx(eIe,{template:a,templateLayout:u})}):ce.jsx(hB,{})};l1.getIdentifier=function(){return NB},l1.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},l1.deinitialize=function(){Tv=!1},l1.initialize=function(){Tv=!0},l1.isReady=function(){return Tv},l1.displayName=NB;var mB={},EB;function tIe(){if(EB)return mB;EB=1;var t=Qt(),r=kr(),i=Date,a=r(i.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new i)}}),mB}tIe();var DB={},vB={},Cv,jB;function TB(){if(jB)return Cv;jB=1;var t=Rr(),r=Kn(),i=vn(),a=qo(),u=r("iterator");return Cv=!t(function(){var l=new URL("b?a=1&b=2&c=3","https://a"),c=l.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),M="";return l.pathname="c%20d",c.forEach(function(d,I){c.delete("b"),M+=I+d}),f.delete("a",2),f.delete("b",void 0),a&&(!l.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(a||!i)||!c.sort||l.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"||M!=="a1c3"||new URL("https://x",void 0).host!=="x"}),Cv}var Av,CB;function rIe(){if(CB)return Av;CB=1;var t=vn(),r=kr(),i=Di(),a=Rr(),u=w5(),l=x5(),c=uy(),f=vs(),M=Rd(),d=Object.assign,I=Object.defineProperty,h=r([].concat);return Av=!d||a(function(){if(t&&d({b:1},d(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},N={},m=Symbol("assign detection"),E="abcdefghijklmnopqrst";return y[m]=7,E.split("").forEach(function(j){N[j]=j}),d({},y)[m]!==7||u(d({},N)).join("")!==E})?function(N,m){for(var E=f(N),j=arguments.length,L=1,C=l.f,T=c.f;j>L;)for(var S=M(arguments[L++]),k=C?h(u(S),C(S)):u(S),z=k.length,$=0,Z;z>$;)Z=k[$++],(!t||i(T,S,Z))&&(E[Z]=S[Z]);return E}:d,Av}var Sv,AB;function nIe(){if(AB)return Sv;AB=1;var t=kr(),r=2147483647,i=36,a=1,u=26,l=38,c=700,f=72,M=128,d="-",I=/[^\0-\u007E]/,h=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",N=i-a,m=RangeError,E=t(h.exec),j=Math.floor,L=String.fromCharCode,C=t("".charCodeAt),T=t([].join),S=t([].push),k=t("".replace),z=t("".split),$=t("".toLowerCase),Z=function(J){for(var te=[],oe=0,ue=J.length;oe<ue;){var R=C(J,oe++);if(R>=55296&&R<=56319&&oe<ue){var w=C(J,oe++);(w&64512)===56320?S(te,((R&1023)<<10)+(w&1023)+65536):(S(te,R),oe--)}else S(te,R)}return te},V=function(J){return J+22+75*(J<26)},K=function(J,te,oe){var ue=0;for(J=oe?j(J/c):J>>1,J+=j(J/te);J>N*u>>1;)J=j(J/N),ue+=i;return j(ue+(N+1)*J/(J+l))},ee=function(J){var te=[];J=Z(J);var oe=J.length,ue=M,R=0,w=f,_,U;for(_=0;_<J.length;_++)U=J[_],U<128&&S(te,L(U));var Y=te.length,A=Y;for(Y&&S(te,d);A<oe;){var F=r;for(_=0;_<J.length;_++)U=J[_],U>=ue&&U<F&&(F=U);var Me=A+1;if(F-ue>j((r-R)/Me))throw new m(y);for(R+=(F-ue)*Me,ue=F,_=0;_<J.length;_++){if(U=J[_],U<ue&&++R>r)throw new m(y);if(U===ue){for(var de=R,le=i;;){var De=le<=w?a:le>=w+u?u:le-w;if(de<De)break;var Oe=de-De,Ae=i-De;S(te,L(V(De+Oe%Ae))),de=j(Oe/Ae),le+=i}S(te,L(V(de))),w=K(R,Me,A===Y),R=0,A++}}R++,ue++}return T(te,"")};return Sv=function(J){var te=[],oe=z(k($(J),h,"."),"."),ue,R;for(ue=0;ue<oe.length;ue++)R=oe[ue],S(te,E(I,R)?"xn--"+ee(R):R);return T(te,".")},Sv}var SB={},OB;function iIe(){if(OB)return SB;OB=1;var t=Qt(),r=kr(),i=uh(),a=RangeError,u=String.fromCharCode,l=String.fromCodePoint,c=r([].join),f=!!l&&l.length!==1;return t({target:"String",stat:!0,arity:1,forced:f},{fromCodePoint:function(d){for(var I=[],h=arguments.length,y=0,N;h>y;){if(N=+arguments[y++],i(N,1114111)!==N)throw new a(N+" is not a valid code point");I[y]=N<65536?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(I,"")}}),SB}var Ov,_B;function aIe(){if(_B)return Ov;_B=1;var t=Z1(),r=Math.floor,i=function(a,u){var l=a.length;if(l<8)for(var c=1,f,M;c<l;){for(M=c,f=a[c];M&&u(a[M-1],f)>0;)a[M]=a[--M];M!==c++&&(a[M]=f)}else for(var d=r(l/2),I=i(t(a,0,d),u),h=i(t(a,d),u),y=I.length,N=h.length,m=0,E=0;m<y||E<N;)a[m+E]=m<y&&E<N?u(I[m],h[E])<=0?I[m++]:h[E++]:m<y?I[m++]:h[E++];return a};return Ov=i,Ov}var _v,xB;function LB(){if(xB)return _v;xB=1,mN(),iIe();var t=Qt(),r=an(),i=tU(),a=Ko(),u=Di(),l=kr(),c=vn(),f=TB(),M=Ka(),d=Xc(),I=HN(),h=il(),y=yk(),N=qc(),m=vM(),E=Wn(),j=ji(),L=G1(),C=Fd(),T=ri(),S=_i(),k=Fo(),z=Jc(),$=S2(),Z=LN(),V=R5(),K=Kd(),ee=jM(),J=Kn(),te=aIe(),oe=J("iterator"),ue="URLSearchParams",R=ue+"Iterator",w=N.set,_=N.getterFor(ue),U=N.getterFor(R),Y=i("fetch"),A=i("Request"),F=i("Headers"),Me=A&&A.prototype,de=F&&F.prototype,le=r.TypeError,De=r.encodeURIComponent,Oe=String.fromCharCode,Ae=a("String","fromCodePoint"),Qe=parseInt,rt=l("".charAt),ot=l([].join),st=l([].push),pt=l("".replace),Ot=l([].shift),At=l([].splice),Ct=l("".split),it=l("".slice),dt=l(/./.exec),ct=/\+/g,yt="�",je=/^[0-9a-f]+$/i,$e=function(Ne,be){var Re=it(Ne,be,be+2);return dt(je,Re)?Qe(Re,16):NaN},Ge=function(Ne){for(var be=0,Re=128;Re>0&&(Ne&Re)!==0;Re>>=1)be++;return be},Mt=function(Ne){var be=null;switch(Ne.length){case 1:be=Ne[0];break;case 2:be=(Ne[0]&31)<<6|Ne[1]&63;break;case 3:be=(Ne[0]&15)<<12|(Ne[1]&63)<<6|Ne[2]&63;break;case 4:be=(Ne[0]&7)<<18|(Ne[1]&63)<<12|(Ne[2]&63)<<6|Ne[3]&63;break}return be>1114111?null:be},He=function(Ne){Ne=pt(Ne,ct," ");for(var be=Ne.length,Re="",we=0;we<be;){var et=rt(Ne,we);if(et==="%"){if(rt(Ne,we+1)==="%"||we+3>be){Re+="%",we++;continue}var Nt=$e(Ne,we+1);if(Nt!==Nt){Re+=et,we++;continue}we+=2;var Dt=Ge(Nt);if(Dt===0)et=Oe(Nt);else{if(Dt===1||Dt>4){Re+=yt,we++;continue}for(var jt=[Nt],Pt=1;Pt<Dt&&(we++,!(we+3>be||rt(Ne,we)!=="%"));){var er=$e(Ne,we+1);if(er!==er){we+=3;break}if(er>191||er<128)break;st(jt,er),we+=2,Pt++}if(jt.length!==Dt){Re+=yt;continue}var cr=Mt(jt);cr===null?Re+=yt:et=Ae(cr)}}Re+=et,we++}return Re},Se=/[!'()~]|%20/g,Le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ze=function(Ne){return Le[Ne]},gt=function(Ne){return pt(De(Ne),Se,Ze)},ut=y(function(be,Re){w(this,{type:R,target:_(be).entries,index:0,kind:Re})},ue,function(){var be=U(this),Re=be.target,we=be.index++;if(!Re||we>=Re.length)return be.target=null,K(void 0,!0);var et=Re[we];switch(be.kind){case"keys":return K(et.key,!1);case"values":return K(et.value,!1)}return K([et.key,et.value],!1)},!0),ze=function(Ne){this.entries=[],this.url=null,Ne!==void 0&&(S(Ne)?this.parseObject(Ne):this.parseQuery(typeof Ne=="string"?rt(Ne,0)==="?"?it(Ne,1):Ne:k(Ne)))};ze.prototype={type:ue,bindURL:function(Ne){this.url=Ne,this.update()},parseObject:function(Ne){var be=this.entries,Re=V(Ne),we,et,Nt,Dt,jt,Pt,er;if(Re)for(we=Z(Ne,Re),et=we.next;!(Nt=u(et,we)).done;){if(Dt=Z(T(Nt.value)),jt=Dt.next,(Pt=u(jt,Dt)).done||(er=u(jt,Dt)).done||!u(jt,Dt).done)throw new le("Expected sequence with length 2");st(be,{key:k(Pt.value),value:k(er.value)})}else for(var cr in Ne)j(Ne,cr)&&st(be,{key:cr,value:k(Ne[cr])})},parseQuery:function(Ne){if(Ne)for(var be=this.entries,Re=Ct(Ne,"&"),we=0,et,Nt;we<Re.length;)et=Re[we++],et.length&&(Nt=Ct(et,"="),st(be,{key:He(Ot(Nt)),value:He(ot(Nt,"="))}))},serialize:function(){for(var Ne=this.entries,be=[],Re=0,we;Re<Ne.length;)we=Ne[Re++],st(be,gt(we.key)+"="+gt(we.value));return ot(be,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Te=function(){m(this,xe);var be=arguments.length>0?arguments[0]:void 0,Re=w(this,new ze(be));c||(this.size=Re.entries.length)},xe=Te.prototype;if(I(xe,{append:function(be,Re){var we=_(this);ee(arguments.length,2),st(we.entries,{key:k(be),value:k(Re)}),c||this.length++,we.updateURL()},delete:function(Ne){for(var be=_(this),Re=ee(arguments.length,1),we=be.entries,et=k(Ne),Nt=Re<2?void 0:arguments[1],Dt=Nt===void 0?Nt:k(Nt),jt=0;jt<we.length;){var Pt=we[jt];if(Pt.key===et&&(Dt===void 0||Pt.value===Dt)){if(At(we,jt,1),Dt!==void 0)break}else jt++}c||(this.size=we.length),be.updateURL()},get:function(be){var Re=_(this).entries;ee(arguments.length,1);for(var we=k(be),et=0;et<Re.length;et++)if(Re[et].key===we)return Re[et].value;return null},getAll:function(be){var Re=_(this).entries;ee(arguments.length,1);for(var we=k(be),et=[],Nt=0;Nt<Re.length;Nt++)Re[Nt].key===we&&st(et,Re[Nt].value);return et},has:function(be){for(var Re=_(this).entries,we=ee(arguments.length,1),et=k(be),Nt=we<2?void 0:arguments[1],Dt=Nt===void 0?Nt:k(Nt),jt=0;jt<Re.length;){var Pt=Re[jt++];if(Pt.key===et&&(Dt===void 0||Pt.value===Dt))return!0}return!1},set:function(be,Re){var we=_(this);ee(arguments.length,1);for(var et=we.entries,Nt=!1,Dt=k(be),jt=k(Re),Pt=0,er;Pt<et.length;Pt++)er=et[Pt],er.key===Dt&&(Nt?At(et,Pt--,1):(Nt=!0,er.value=jt));Nt||st(et,{key:Dt,value:jt}),c||(this.size=et.length),we.updateURL()},sort:function(){var be=_(this);te(be.entries,function(Re,we){return Re.key>we.key?1:-1}),be.updateURL()},forEach:function(be){for(var Re=_(this).entries,we=L(be,arguments.length>1?arguments[1]:void 0),et=0,Nt;et<Re.length;)Nt=Re[et++],we(Nt.value,Nt.key,this)},keys:function(){return new ut(this,"keys")},values:function(){return new ut(this,"values")},entries:function(){return new ut(this,"entries")}},{enumerable:!0}),M(xe,oe,xe.entries,{name:"entries"}),M(xe,"toString",function(){return _(this).serialize()},{enumerable:!0}),c&&d(xe,"size",{get:function(){return _(this).entries.length},configurable:!0,enumerable:!0}),h(Te,ue),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:Te}),!f&&E(F)){var Be=l(de.has),It=l(de.set),St=function(Ne){if(S(Ne)){var be=Ne.body,Re;if(C(be)===ue)return Re=Ne.headers?new F(Ne.headers):new F,Be(Re,"content-type")||It(Re,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),z(Ne,{body:$(0,k(be)),headers:$(0,Re)})}return Ne};if(E(Y)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(be){return Y(be,arguments.length>1?St(arguments[1]):{})}}),E(A)){var lr=function(be){return m(this,Me),new A(be,arguments.length>1?St(arguments[1]):{})};Me.constructor=lr,lr.prototype=Me,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:lr})}}return _v={URLSearchParams:Te,getState:_},_v}var wB;function oIe(){if(wB)return vB;wB=1,Pz();var t=Qt(),r=vn(),i=TB(),a=an(),u=G1(),l=kr(),c=Ka(),f=Xc(),M=vM(),d=ji(),I=rIe(),h=IR(),y=Z1(),N=zz().codeAt,m=nIe(),E=Fo(),j=il(),L=jM(),C=LB(),T=qc(),S=T.set,k=T.getterFor("URL"),z=C.URLSearchParams,$=C.getState,Z=a.URL,V=a.TypeError,K=a.parseInt,ee=Math.floor,J=Math.pow,te=l("".charAt),oe=l(/./.exec),ue=l([].join),R=l(1 .toString),w=l([].pop),_=l([].push),U=l("".replace),Y=l([].shift),A=l("".split),F=l("".slice),Me=l("".toLowerCase),de=l([].unshift),le="Invalid authority",De="Invalid scheme",Oe="Invalid host",Ae="Invalid port",Qe=/[a-z]/i,rt=/[\d+-.a-z]/i,ot=/\d/,st=/^0x/i,pt=/^[0-7]+$/,Ot=/^\d+$/,At=/^[\da-f]+$/i,Ct=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,ct=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yt=/[\t\n\r]/g,je,$e=function(re){var ge=A(re,"."),se,G,me,Je,Pe,_t,at;if(ge.length&&ge[ge.length-1]===""&&ge.length--,se=ge.length,se>4)return re;for(G=[],me=0;me<se;me++){if(Je=ge[me],Je==="")return re;if(Pe=10,Je.length>1&&te(Je,0)==="0"&&(Pe=oe(st,Je)?16:8,Je=F(Je,Pe===8?1:2)),Je==="")_t=0;else{if(!oe(Pe===10?Ot:Pe===8?pt:At,Je))return re;_t=K(Je,Pe)}_(G,_t)}for(me=0;me<se;me++)if(_t=G[me],me===se-1){if(_t>=J(256,5-se))return null}else if(_t>255)return null;for(at=w(G),me=0;me<G.length;me++)at+=G[me]*J(256,3-me);return at},Ge=function(re){var ge=[0,0,0,0,0,0,0,0],se=0,G=null,me=0,Je,Pe,_t,at,Kt,ir,he,xt=function(){return te(re,me)};if(xt()===":"){if(te(re,1)!==":")return;me+=2,se++,G=se}for(;xt();){if(se===8)return;if(xt()===":"){if(G!==null)return;me++,se++,G=se;continue}for(Je=Pe=0;Pe<4&&oe(At,xt());)Je=Je*16+K(xt(),16),me++,Pe++;if(xt()==="."){if(Pe===0||(me-=Pe,se>6))return;for(_t=0;xt();){if(at=null,_t>0)if(xt()==="."&&_t<4)me++;else return;if(!oe(ot,xt()))return;for(;oe(ot,xt());){if(Kt=K(xt(),10),at===null)at=Kt;else{if(at===0)return;at=at*10+Kt}if(at>255)return;me++}ge[se]=ge[se]*256+at,_t++,(_t===2||_t===4)&&se++}if(_t!==4)return;break}else if(xt()===":"){if(me++,!xt())return}else if(xt())return;ge[se++]=Je}if(G!==null)for(ir=se-G,se=7;se!==0&&ir>0;)he=ge[se],ge[se--]=ge[G+ir-1],ge[G+--ir]=he;else if(se!==8)return;return ge},Mt=function(re){for(var ge=null,se=1,G=null,me=0,Je=0;Je<8;Je++)re[Je]!==0?(me>se&&(ge=G,se=me),G=null,me=0):(G===null&&(G=Je),++me);return me>se?G:ge},He=function(re){var ge,se,G,me;if(typeof re=="number"){for(ge=[],se=0;se<4;se++)de(ge,re%256),re=ee(re/256);return ue(ge,".")}if(typeof re=="object"){for(ge="",G=Mt(re),se=0;se<8;se++)me&&re[se]===0||(me&&(me=!1),G===se?(ge+=se?":":"::",me=!0):(ge+=R(re[se],16),se<7&&(ge+=":")));return"["+ge+"]"}return re},Se={},Le=I({},Se,{" ":1,'"':1,"<":1,">":1,"`":1}),Ze=I({},Le,{"#":1,"?":1,"{":1,"}":1}),gt=I({},Ze,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(re,ge){var se=N(re,0);return se>32&&se<127&&!d(ge,re)?re:encodeURIComponent(re)},ze={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(re,ge){var se;return re.length===2&&oe(Qe,te(re,0))&&((se=te(re,1))===":"||!ge&&se==="|")},xe=function(re){var ge;return re.length>1&&Te(F(re,0,2))&&(re.length===2||(ge=te(re,2))==="/"||ge==="\\"||ge==="?"||ge==="#")},Be=function(re){return re==="."||Me(re)==="%2e"},It=function(re){return re=Me(re),re===".."||re==="%2e."||re===".%2e"||re==="%2e%2e"},St={},lr={},Ne={},be={},Re={},we={},et={},Nt={},Dt={},jt={},Pt={},er={},cr={},Un={},mr={},Cn={},Ut={},Er={},cn={},Dr={},fr={},An=function(re,ge,se){var G=E(re),me,Je,Pe;if(ge){if(Je=this.parse(G),Je)throw new V(Je);this.searchParams=null}else{if(se!==void 0&&(me=new An(se,!0)),Je=this.parse(G,null,me),Je)throw new V(Je);Pe=$(new z),Pe.bindURL(this),this.searchParams=Pe}};An.prototype={type:"URL",parse:function(re,ge,se){var G=this,me=ge||St,Je=0,Pe="",_t=!1,at=!1,Kt=!1,ir,he,xt,Ur;for(re=E(re),ge||(G.scheme="",G.username="",G.password="",G.host=null,G.port=null,G.path=[],G.query=null,G.fragment=null,G.cannotBeABaseURL=!1,re=U(re,dt,""),re=U(re,ct,"$1")),re=U(re,yt,""),ir=h(re);Je<=ir.length;){switch(he=ir[Je],me){case St:if(he&&oe(Qe,he))Pe+=Me(he),me=lr;else{if(ge)return De;me=Ne;continue}break;case lr:if(he&&(oe(rt,he)||he==="+"||he==="-"||he==="."))Pe+=Me(he);else if(he===":"){if(ge&&(G.isSpecial()!==d(ze,Pe)||Pe==="file"&&(G.includesCredentials()||G.port!==null)||G.scheme==="file"&&!G.host))return;if(G.scheme=Pe,ge){G.isSpecial()&&ze[G.scheme]===G.port&&(G.port=null);return}Pe="",G.scheme==="file"?me=Un:G.isSpecial()&&se&&se.scheme===G.scheme?me=be:G.isSpecial()?me=Nt:ir[Je+1]==="/"?(me=Re,Je++):(G.cannotBeABaseURL=!0,_(G.path,""),me=cn)}else{if(ge)return De;Pe="",me=Ne,Je=0;continue}break;case Ne:if(!se||se.cannotBeABaseURL&&he!=="#")return De;if(se.cannotBeABaseURL&&he==="#"){G.scheme=se.scheme,G.path=y(se.path),G.query=se.query,G.fragment="",G.cannotBeABaseURL=!0,me=fr;break}me=se.scheme==="file"?Un:we;continue;case be:if(he==="/"&&ir[Je+1]==="/")me=Dt,Je++;else{me=we;continue}break;case Re:if(he==="/"){me=jt;break}else{me=Er;continue}case we:if(G.scheme=se.scheme,he===je)G.username=se.username,G.password=se.password,G.host=se.host,G.port=se.port,G.path=y(se.path),G.query=se.query;else if(he==="/"||he==="\\"&&G.isSpecial())me=et;else if(he==="?")G.username=se.username,G.password=se.password,G.host=se.host,G.port=se.port,G.path=y(se.path),G.query="",me=Dr;else if(he==="#")G.username=se.username,G.password=se.password,G.host=se.host,G.port=se.port,G.path=y(se.path),G.query=se.query,G.fragment="",me=fr;else{G.username=se.username,G.password=se.password,G.host=se.host,G.port=se.port,G.path=y(se.path),G.path.length--,me=Er;continue}break;case et:if(G.isSpecial()&&(he==="/"||he==="\\"))me=Dt;else if(he==="/")me=jt;else{G.username=se.username,G.password=se.password,G.host=se.host,G.port=se.port,me=Er;continue}break;case Nt:if(me=Dt,he!=="/"||te(Pe,Je+1)!=="/")continue;Je++;break;case Dt:if(he!=="/"&&he!=="\\"){me=jt;continue}break;case jt:if(he==="@"){_t&&(Pe="%40"+Pe),_t=!0,xt=h(Pe);for(var ui=0;ui<xt.length;ui++){var Hn=xt[ui];if(Hn===":"&&!Kt){Kt=!0;continue}var vr=ut(Hn,gt);Kt?G.password+=vr:G.username+=vr}Pe=""}else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(_t&&Pe==="")return le;Je-=h(Pe).length+1,Pe="",me=Pt}else Pe+=he;break;case Pt:case er:if(ge&&G.scheme==="file"){me=Cn;continue}else if(he===":"&&!at){if(Pe==="")return Oe;if(Ur=G.parseHost(Pe),Ur)return Ur;if(Pe="",me=cr,ge===er)return}else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(G.isSpecial()&&Pe==="")return Oe;if(ge&&Pe===""&&(G.includesCredentials()||G.port!==null))return;if(Ur=G.parseHost(Pe),Ur)return Ur;if(Pe="",me=Ut,ge)return;continue}else he==="["?at=!0:he==="]"&&(at=!1),Pe+=he;break;case cr:if(oe(ot,he))Pe+=he;else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()||ge){if(Pe!==""){var Pi=K(Pe,10);if(Pi>65535)return Ae;G.port=G.isSpecial()&&Pi===ze[G.scheme]?null:Pi,Pe=""}if(ge)return;me=Ut;continue}else return Ae;break;case Un:if(G.scheme="file",he==="/"||he==="\\")me=mr;else if(se&&se.scheme==="file")switch(he){case je:G.host=se.host,G.path=y(se.path),G.query=se.query;break;case"?":G.host=se.host,G.path=y(se.path),G.query="",me=Dr;break;case"#":G.host=se.host,G.path=y(se.path),G.query=se.query,G.fragment="",me=fr;break;default:xe(ue(y(ir,Je),""))||(G.host=se.host,G.path=y(se.path),G.shortenPath()),me=Er;continue}else{me=Er;continue}break;case mr:if(he==="/"||he==="\\"){me=Cn;break}se&&se.scheme==="file"&&!xe(ue(y(ir,Je),""))&&(Te(se.path[0],!0)?_(G.path,se.path[0]):G.host=se.host),me=Er;continue;case Cn:if(he===je||he==="/"||he==="\\"||he==="?"||he==="#"){if(!ge&&Te(Pe))me=Er;else if(Pe===""){if(G.host="",ge)return;me=Ut}else{if(Ur=G.parseHost(Pe),Ur)return Ur;if(G.host==="localhost"&&(G.host=""),ge)return;Pe="",me=Ut}continue}else Pe+=he;break;case Ut:if(G.isSpecial()){if(me=Er,he!=="/"&&he!=="\\")continue}else if(!ge&&he==="?")G.query="",me=Dr;else if(!ge&&he==="#")G.fragment="",me=fr;else if(he!==je&&(me=Er,he!=="/"))continue;break;case Er:if(he===je||he==="/"||he==="\\"&&G.isSpecial()||!ge&&(he==="?"||he==="#")){if(It(Pe)?(G.shortenPath(),he!=="/"&&!(he==="\\"&&G.isSpecial())&&_(G.path,"")):Be(Pe)?he!=="/"&&!(he==="\\"&&G.isSpecial())&&_(G.path,""):(G.scheme==="file"&&!G.path.length&&Te(Pe)&&(G.host&&(G.host=""),Pe=te(Pe,0)+":"),_(G.path,Pe)),Pe="",G.scheme==="file"&&(he===je||he==="?"||he==="#"))for(;G.path.length>1&&G.path[0]==="";)Y(G.path);he==="?"?(G.query="",me=Dr):he==="#"&&(G.fragment="",me=fr)}else Pe+=ut(he,Ze);break;case cn:he==="?"?(G.query="",me=Dr):he==="#"?(G.fragment="",me=fr):he!==je&&(G.path[0]+=ut(he,Se));break;case Dr:!ge&&he==="#"?(G.fragment="",me=fr):he!==je&&(he==="'"&&G.isSpecial()?G.query+="%27":he==="#"?G.query+="%23":G.query+=ut(he,Se));break;case fr:he!==je&&(G.fragment+=ut(he,Le));break}Je++}},parseHost:function(re){var ge,se,G;if(te(re,0)==="["){if(te(re,re.length-1)!=="]"||(ge=Ge(F(re,1,-1)),!ge))return Oe;this.host=ge}else if(this.isSpecial()){if(re=m(re),oe(Ct,re)||(ge=$e(re),ge===null))return Oe;this.host=ge}else{if(oe(it,re))return Oe;for(ge="",se=h(re),G=0;G<se.length;G++)ge+=ut(se[G],Se);this.host=ge}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return d(ze,this.scheme)},shortenPath:function(){var re=this.path,ge=re.length;ge&&(this.scheme!=="file"||ge!==1||!Te(re[0],!0))&&re.length--},serialize:function(){var re=this,ge=re.scheme,se=re.username,G=re.password,me=re.host,Je=re.port,Pe=re.path,_t=re.query,at=re.fragment,Kt=ge+":";return me!==null?(Kt+="//",re.includesCredentials()&&(Kt+=se+(G?":"+G:"")+"@"),Kt+=He(me),Je!==null&&(Kt+=":"+Je)):ge==="file"&&(Kt+="//"),Kt+=re.cannotBeABaseURL?Pe[0]:Pe.length?"/"+ue(Pe,"/"):"",_t!==null&&(Kt+="?"+_t),at!==null&&(Kt+="#"+at),Kt},setHref:function(re){var ge=this.parse(re);if(ge)throw new V(ge);this.searchParams.update()},getOrigin:function(){var re=this.scheme,ge=this.port;if(re==="blob")try{return new fn(re.path[0]).origin}catch(se){return"null"}return re==="file"||!this.isSpecial()?"null":re+"://"+He(this.host)+(ge!==null?":"+ge:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(re){this.parse(E(re)+":",St)},getUsername:function(){return this.username},setUsername:function(re){var ge=h(E(re));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var se=0;se<ge.length;se++)this.username+=ut(ge[se],gt)}},getPassword:function(){return this.password},setPassword:function(re){var ge=h(E(re));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var se=0;se<ge.length;se++)this.password+=ut(ge[se],gt)}},getHost:function(){var re=this.host,ge=this.port;return re===null?"":ge===null?He(re):He(re)+":"+ge},setHost:function(re){this.cannotBeABaseURL||this.parse(re,Pt)},getHostname:function(){var re=this.host;return re===null?"":He(re)},setHostname:function(re){this.cannotBeABaseURL||this.parse(re,er)},getPort:function(){var re=this.port;return re===null?"":E(re)},setPort:function(re){this.cannotHaveUsernamePasswordPort()||(re=E(re),re===""?this.port=null:this.parse(re,cr))},getPathname:function(){var re=this.path;return this.cannotBeABaseURL?re[0]:re.length?"/"+ue(re,"/"):""},setPathname:function(re){this.cannotBeABaseURL||(this.path=[],this.parse(re,Ut))},getSearch:function(){var re=this.query;return re?"?"+re:""},setSearch:function(re){re=E(re),re===""?this.query=null:(te(re,0)==="?"&&(re=F(re,1)),this.query="",this.parse(re,Dr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var re=this.fragment;return re?"#"+re:""},setHash:function(re){if(re=E(re),re===""){this.fragment=null;return}te(re,0)==="#"&&(re=F(re,1)),this.fragment="",this.parse(re,fr)},update:function(){this.query=this.searchParams.serialize()||null}};var fn=function(ge){var se=M(this,Jt),G=L(arguments.length,1)>1?arguments[1]:void 0,me=S(se,new An(ge,!1,G));r||(se.href=me.serialize(),se.origin=me.getOrigin(),se.protocol=me.getProtocol(),se.username=me.getUsername(),se.password=me.getPassword(),se.host=me.getHost(),se.hostname=me.getHostname(),se.port=me.getPort(),se.pathname=me.getPathname(),se.search=me.getSearch(),se.searchParams=me.getSearchParams(),se.hash=me.getHash())},Jt=fn.prototype,Ir=function(re,ge){return{get:function(){return k(this)[re]()},set:ge&&function(se){return k(this)[ge](se)},configurable:!0,enumerable:!0}};if(r&&(f(Jt,"href",Ir("serialize","setHref")),f(Jt,"origin",Ir("getOrigin")),f(Jt,"protocol",Ir("getProtocol","setProtocol")),f(Jt,"username",Ir("getUsername","setUsername")),f(Jt,"password",Ir("getPassword","setPassword")),f(Jt,"host",Ir("getHost","setHost")),f(Jt,"hostname",Ir("getHostname","setHostname")),f(Jt,"port",Ir("getPort","setPort")),f(Jt,"pathname",Ir("getPathname","setPathname")),f(Jt,"search",Ir("getSearch","setSearch")),f(Jt,"searchParams",Ir("getSearchParams")),f(Jt,"hash",Ir("getHash","setHash"))),c(Jt,"toJSON",function(){return k(this).serialize()},{enumerable:!0}),c(Jt,"toString",function(){return k(this).serialize()},{enumerable:!0}),Z){var Kr=Z.createObjectURL,Ri=Z.revokeObjectURL;Kr&&c(fn,"createObjectURL",u(Kr,Z)),Ri&&c(fn,"revokeObjectURL",u(Ri,Z))}return j(fn,"URL"),t({global:!0,constructor:!0,forced:!i,sham:!r},{URL:fn}),vB}var bB;function uIe(){return bB||(bB=1,oIe()),DB}uIe();var kB={},zB;function sIe(){if(zB)return kB;zB=1;var t=Qt(),r=Di();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),kB}sIe();var RB={},PB;function lIe(){return PB||(PB=1,LB()),RB}lIe();var UB={},HB;function cIe(){if(HB)return UB;HB=1;var t=Ka(),r=kr(),i=Fo(),a=jM(),u=URLSearchParams,l=u.prototype,c=r(l.append),f=r(l.delete),M=r(l.forEach),d=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(l,"delete",function(h){var y=arguments.length,N=y<2?void 0:arguments[1];if(y&&N===void 0)return f(this,h);var m=[];M(this,function(z,$){d(m,{key:$,value:z})}),a(y,1);for(var E=i(h),j=i(N),L=0,C=0,T=!1,S=m.length,k;L<S;)k=m[L++],T||k.key===E?(T=!0,f(this,k.key)):C++;for(;C<S;)k=m[C++],k.key===E&&k.value===j||c(this,k.key,k.value)},{enumerable:!0,unsafe:!0}),UB}cIe();var VB={},YB;function fIe(){if(YB)return VB;YB=1;var t=Ka(),r=kr(),i=Fo(),a=jM(),u=URLSearchParams,l=u.prototype,c=r(l.getAll),f=r(l.has),M=new u("a=1");return(M.has("a",2)||!M.has("a",void 0))&&t(l,"has",function(I){var h=arguments.length,y=h<2?void 0:arguments[1];if(h&&y===void 0)return f(this,I);var N=c(this,I);a(h,1);for(var m=i(y),E=0;E<N.length;)if(N[E++]===m)return!0;return!1},{enumerable:!0,unsafe:!0}),VB}fIe();var QB={},FB;function MIe(){if(FB)return QB;FB=1;var t=vn(),r=kr(),i=Xc(),a=URLSearchParams.prototype,u=r(a.forEach);return t&&!("size"in a)&&i(a,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),QB}MIe();function k0(t){"@babel/helpers - typeof";return k0=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},k0(t)}function dIe(t,r){return yIe(t)||pIe(t,r)||IIe(t,r)||gIe()}function gIe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
61
61
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IIe(t,r){if(t){if(typeof t=="string")return $B(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$B(t,r):void 0}}function $B(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function pIe(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function yIe(t){if(Array.isArray(t))return t}function hIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function NIe(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,BB(a.key),a)}}function mIe(t,r,i){return r&&NIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function z0(t,r,i){return(r=BB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function BB(t){var r=EIe(t,"string");return k0(r)=="symbol"?r:r+""}function EIe(t,r){if(k0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(k0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var DIe=function(){function t(){hIe(this,t),z0(this,"_levels",[]),z0(this,"_transports",[]),z0(this,"_logs",[]),z0(this,"_prevTime",0),z0(this,"logListener",null);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var i=r.split(">"),a=dIe(i,2),u=a[0],l=a[1];this._levels=u.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return mIe(t,[{key:"create",value:function(i,a){var u=this;return function(l){if(!(!u._levels.includes(i)&&!u._levels.includes("all")&&!u.logListener)){var c=Date.now(),f=0;if(u._prevTime&&(f=c-u._prevTime),u._prevTime=c,u.logListener&&u.logListener("".concat(i,": ").concat(l," +").concat(f,"ms")),u._transports.includes("console")){var M=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(M,";"),i,"",l,"color: ".concat(M,";"),f)}u._transports.includes("file")&&u._logs.push("".concat(i,": ").concat(l," +").concat(f,"ms"))}}}},{key:"saveLogs",value:function(){if(this._logs.length){var i=this._logs.join(`
62
- `),a=new Blob([i],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this._logs=[]}}}])}();const xv=new DIe;function U2(t){"@babel/helpers - typeof";return U2=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},U2(t)}function mn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,Y){return _[U]=Y}}function I(R,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),F=new oe(U||[]);return u(A,"_invoke",{value:K(R,_,F)}),A}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",m="executing",E="completed",j={};function L(){}function C(){}function T(){}var S={};d(S,c,function(){return this});var k=Object.getPrototypeOf,z=k&&k(k(ue([])));z&&z!==i&&a.call(z,c)&&(S=z);var $=T.prototype=L.prototype=Object.create(S);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function V(R,w){function _(Y,A,F,Me){var de=h(R[Y],R,A);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&U2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,F,Me)},function(Oe){_("throw",Oe,F,Me)}):w.resolve(De).then(function(Oe){le.value=Oe,F(le)},function(Oe){return _("throw",Oe,F,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,F){function Me(){return new w(function(de,le){_(A,F,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(Y,A){if(U===m)throw Error("Generator is already running");if(U===E){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var F=_.delegate;if(F){var Me=ee(F,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=m;var de=h(R,w,_);if(de.type==="normal"){if(U=_.done?E:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=E,_.method="throw",_.arg=de.arg)}}}function ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,R.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[R.resultName]=A.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function te(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function ue(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function Y(){for(;++_<R.length;)if(a.call(R,_))return Y.value=R[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(U2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(V.prototype),d(V.prototype,f,function(){return this}),r.AsyncIterator=V,r.async=function(R,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new V(I(R,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(F){return F.done?F.value:A.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=ue,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(te),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(le,De){return F.type="throw",F.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],F=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var F=A?A.completion:{};return F.type=w,F.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(F)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),te(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;te(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:ue(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function ZB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Bo(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){ZB(l,a,u,c,f,"next",M)}function f(M){ZB(l,a,u,c,f,"throw",M)}c(void 0)})}}function vIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function jIe(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,GB(a.key),a)}}function TIe(t,r,i){return r&&jIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function RM(t,r,i){return(r=GB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function GB(t){var r=CIe(t,"string");return U2(r)=="symbol"?r:r+""}function CIe(t,r){if(U2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(U2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ll=xv.create("wasm_idv"),AIe=function(){function t(r){vIe(this,t),RM(this,"_worker",null),RM(this,"_initialized",!1),RM(this,"_connectedToIdv",!1),RM(this,"_serviceRunning",!1),RM(this,"_userId",D0e(IMe)),RM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return TIe(t,[{key:"init",value:function(){var r=Bo(mn().mark(function a(){var u,l,c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=1,d.next=4,fetch("https://wasm-development.regulaforensics.com/idv/rc/1.0/47f8537-46048241d//PlatformAdaptor.worker.js");case 4:return u=d.sent,d.next=7,u.blob();case 7:l=d.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),ll("Creating worker error: ".concat(JSON.stringify(d.t0)));case 15:d.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){d.next=20;break}return d.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),d.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/rc/1.0/47f8537-46048241d/",preMain:!0});case 23:return f=d.sent,d.abrupt("return",f);case 25:case"end":return d.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Bo(mn().mark(function a(u){var l;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:sm.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return l=f.sent,ll("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(l))),l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var r=Bo(mn().mark(function a(u){var l;return mn().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:sm.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var r=Bo(mn().mark(function a(u,l){var c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c={workflowId:u},l&&(v0e(l)?c.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),d.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:c,preMain:!0});case 4:return f=d.sent,ll("Start session connect result: ".concat(JSON.stringify(f))),d.abrupt("return",f);case 7:case"end":return d.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Bo(mn().mark(function a(u){var l,c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={sessionId:u},M.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=M.sent,ll("continue session result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Bo(mn().mark(function a(){var u,l,c=arguments;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},M.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=M.sent,ll("listWorkflows result: ".concat(JSON.stringify(l))),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getServiceToken",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var r=Bo(mn().mark(function a(u){var l;return mn().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 l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var r=Bo(mn().mark(function a(u,l){var c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return ll("Push data: ".concat(u," , ").concat(JSON.stringify(l))),M.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=M.sent,ll("Push data result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,ll("Wait for session update result: ".concat(JSON.stringify(u))),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 6:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var r=Bo(mn().mark(function a(u){var l=this;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(M,d){if(!l._worker)return d();l._worker.onmessage=function(I){var h=I.data.target;if(h==="stdout"){ll(JSON.stringify(I.data.content));return}if(h==="custom"){var y=I.data,N=y.method,m=y.data;ll("::: custom method, ".concat(N,", ").concat(JSON.stringify(m))),N==="onRuntimeInitialized"&&(l._initialized=!0),M(m)}if(h==="stderr"){var E=I.data.content;ll(JSON.stringify(E)),l._setErrorScreen&&l._setErrorScreen(E)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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 i(){return r.apply(this,arguments)}return i}()}])}();function H2(t){"@babel/helpers - typeof";return H2=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},H2(t)}function WB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function V2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?WB(Object(i),!0).forEach(function(a){Lv(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):WB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Lv(t,r,i){return(r=SIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function SIe(t){var r=OIe(t,"string");return H2(r)=="symbol"?r:r+""}function OIe(t,r){if(H2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(H2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ei(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ei=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,Y){return _[U]=Y}}function I(R,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),F=new oe(U||[]);return u(A,"_invoke",{value:K(R,_,F)}),A}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",m="executing",E="completed",j={};function L(){}function C(){}function T(){}var S={};d(S,c,function(){return this});var k=Object.getPrototypeOf,z=k&&k(k(ue([])));z&&z!==i&&a.call(z,c)&&(S=z);var $=T.prototype=L.prototype=Object.create(S);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function V(R,w){function _(Y,A,F,Me){var de=h(R[Y],R,A);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&H2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,F,Me)},function(Oe){_("throw",Oe,F,Me)}):w.resolve(De).then(function(Oe){le.value=Oe,F(le)},function(Oe){return _("throw",Oe,F,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,F){function Me(){return new w(function(de,le){_(A,F,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(Y,A){if(U===m)throw Error("Generator is already running");if(U===E){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var F=_.delegate;if(F){var Me=ee(F,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=m;var de=h(R,w,_);if(de.type==="normal"){if(U=_.done?E:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=E,_.method="throw",_.arg=de.arg)}}}function ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,R.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[R.resultName]=A.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function te(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function ue(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function Y(){for(;++_<R.length;)if(a.call(R,_))return Y.value=R[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(H2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(V.prototype),d(V.prototype,f,function(){return this}),r.AsyncIterator=V,r.async=function(R,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new V(I(R,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(F){return F.done?F.value:A.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=ue,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(te),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(le,De){return F.type="throw",F.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],F=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var F=A?A.completion:{};return F.type=w,F.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(F)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),te(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;te(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:ue(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function KB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function ks(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){KB(l,a,u,c,f,"next",M)}function f(M){KB(l,a,u,c,f,"throw",M)}c(void 0)})}}var _Ie=xv.create("store_idv"),xIe=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ks(ei().mark(function l(){var c;return ei().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c=new AIe,M.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return ks(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=i().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=i().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(u);case 5:if(M=y.sent,d=null,M.code===4&&(d=x2.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=x2.PROVIDER_ERROR),d===null){y.next=12;break}return I=new I0({errorCode:d}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return ks(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,M=null,f.code===4&&(M=x2.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=x2.PROVIDER_ERROR),M===null){y.next=13;break}return d=new I0({errorCode:M}),I=new B5({errorCode:cm.CONNECTION_ISSUE,underlyingBaseError:d}),y.abrupt("return",{workflows:[],error:I});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var M,d=(M=i().currentSessionData)===null||M===void 0?void 0:M.sessionId,I=V2(V2({},f.results),{},{sessionId:d}),h=V2({results:I},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=ks(ei().mark(function l(){var c,f,M,d;return ei().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,LIe(c);case 4:return f=h.sent,r(function(){return{externalModules:f}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(M=i().wasmService)===null||M===void 0||M.shutdown(),i().resetWasmService(),i().resetProps(),d=new g0({errorCode:t0.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:d});case 16:case"end":return h.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=gE(u.find(function(c){return c.templateId===fm}));l.templateLayout=NH(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=ks(ei().mark(function l(c,f){var M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return M=null,d=function(){var N=ks(ei().mark(function m(){var E,j,L,C;return ei().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,i().wasmService.pushData(c,f);case 2:if(E=S.sent,j=null,E.code===4&&(j=ws.HTTP_ISSUE),E.code!==0&&E.code!==4&&(j=ws.PROVIDER_ERROR),j!==null&&(L=new p0({errorCode:ws.HTTP_ISSUE}),C=new eu({errorCode:Xo.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),M=C),E.code!==0){S.next=12;break}return M=null,S.abrupt("return",E);case 12:return S.abrupt("return",null);case 13:case"end":return S.stop()}},m)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},y.next=5,pE(d,I);case 5:return y.abrupt("return",M?{error:M}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=i().workflow;if(!(!l||!u))return l.steps.find(function(c){return c.id===u})},_waitingForNextStep:function(){var a=ks(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,M=function(){var N=ks(ei().mark(function m(){var E,j,L,C,T,S,k,z,$,Z,V,K,ee,J,te;return ei().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,i().wasmService.getSessionState();case 2:if(C=ue.sent,T=(E=C.data)===null||E===void 0?void 0:E.currentStep,S=(j=C.data)===null||j===void 0?void 0:j.isProcessingFiles,k=(L=C.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,z=N0e(k,T),$=C.code===4,Z=C.code!==0&&C.code!==4,V=C.code===0&&(!C.data.workflow||!C.data.currentStep),K=T&&T===c,ee=null,k&&!z&&(ee=ws.NOT_DATA_TYPE),$&&(ee=ws.HTTP_ISSUE),Z&&(ee=ws.PROVIDER_ERROR),S&&(ee=ws.IS_PROCESSING),K&&(ee=ws.SAME_STEP),V&&(ee=ws.DECODING_FAILED),ee!==null&&(J=new p0({errorCode:ee}),te=new eu({errorCode:Xo.INTERNAL_ISSUE,underlyingBaseError:J}),f=te),_Ie(JSON.stringify({nextStep:T,isDataType:z,isProcessingFiles:S})),!(z&&!K&&!S&&!$&&!Z&&!V)){ue.next=23;break}return f=null,ue.abrupt("return",C.data);case 23:return ue.abrupt("return",null);case 24:case"end":return ue.stop()}},m)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},y.next=6,pE(M,d);case 6:if(I=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});case 9:return y.abrupt("return",{workflow:I==null?void 0:I.workflow,nextStep:I==null?void 0:I.currentStep});case 10:case"end":return y.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||i().currentStepId;if(l){var c=i()._findStepById(l);c&&(i().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),i().resetSession(),i().listener({eventType:Xd.MESSAGE,message:e0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=ks(ei().mark(function l(c,f){var M,d,I,h,y,N,m,E;return ei().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){L.next=4;break}return i().setFinalStepAndStopProcess(),L.abrupt("return");case 4:if(!(f instanceof Rn)){L.next=10;break}return M=f,d=new eu({errorCode:Xo.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:M}),i().workflowSessionCompletion({error:d}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(I=L.sent,!I.error){L.next=17;break}return i().workflowSessionCompletion({error:I.error}),i().resetSession(),L.abrupt("return");case 17:return L.next=19,i()._waitingForNextStep();case 19:if(h=L.sent,!h.error){L.next=24;break}return i().workflowSessionCompletion({error:h.error}),i().resetSession(),L.abrupt("return");case 24:if(y=h.workflow,N=h.nextStep,i().setWorkflow(y),i().setLayout(y.client.layout),i().setProcessingTemplate(y.client.steps),m=i()._findStepById(N),E=function(T){return!!T&&Object.prototype.toString.call(T)==="[object Object]"&&T.templateId},!(m!=null&&m.final&&!E(m.client))){L.next=34;break}return i().setFinalStepAndStopProcess(m.id),L.abrupt("return");case 34:m!=null&&m.final&&E(m.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(N),i().setIsProcessing(!1);case 37:case"end":return L.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),continueSession:function(){var a=ks(ei().mark(function l(){var c,f,M,d,I,h,y,N,m,E,j,L,C;return ei().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(c={isContinue:!1},f=i().workflow,M=i().getCurrentSessionDataLs(),d=i().sessionRestoreMode,d){S.next=6;break}return S.abrupt("return",c);case 6:if(M){S.next=8;break}return S.abrupt("return",c);case 8:if(I=M.sessionId,h=M.workflowId,!(!I||h!==f.id)){S.next=11;break}return S.abrupt("return",c);case 11:return S.next=13,i().wasmService.continueSession(I);case 13:return y=S.sent,N=y.data,m=N.currentStep,"id"in N&&"currentStep"in N||(E=new SM({errorCode:TM.DECODING_FAILED}),j=new eu({errorCode:Xo.START_SESSION_ERROR,underlyingBaseError:E}),c=V2(V2({},c),{},{error:j})),L=i()._findStepById(m),(L==null?void 0:L.final)===!1?(C=N.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(C),i().setCurrentSessionDataLsAndStore({sessionId:N.id,workflowId:h}),i().listener({eventType:Xd.MESSAGE,message:e0.DID_START_RESTORE_SESSION,module:"IDV"}),c=V2(V2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),S.abrupt("return",c);case 20:case"end":return S.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u,l){if(!u&&!l)return r(function(){return{currentScreenConfig:null}});if(l)return r(function(){return{currentScreenConfig:l}});if(u===null)return r(function(){return{currentScreenConfig:null}});var c=i().workflow,f=null;if(u===fm)f=i().proccessingTransformedTemplate;else{var M;if(f=(M=i()._findStepById(u))===null||M===void 0?void 0:M.client,f!==null){var d;f.sessionId=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,f.serviceToken=i().serviceToken}f&&f.templateLayout&&(f.templateLayout=NH(f.templateLayout,i().layout))}var I=h0e(i().externalModules,c.steps,u);if(f===null||!I){var h=new eu({errorCode:Xo.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:h}),r(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=ks(ei().mark(function l(){var c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=d.sent,i().resetWasmService(),i().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){d.next=7;break}return d.abrupt("return",{});case 7:return d.abrupt("return",{});case 8:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function LIe(t){return wv.apply(this,arguments)}function wv(){return wv=ks(ei().mark(function t(r){var i,a,u,l,c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i=[{id:l1.getIdentifier(),supportedTemplates:l1.getSupportedTemplates(),component:l1}],a=Lv(Lv({},lm.LIVENESS,function(){return Promise.resolve().then(()=>XBe)}),lm.DOC_READER,function(){return Promise.resolve().then(()=>C8t)}),u=ei().mark(function I(){var h,y,N;return ei().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(h=c[l],y=function(){return a[h]()},!y){E.next=7;break}return E.next=5,y();case 5:N=E.sent,i.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return E.stop()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){d.next=9;break}return d.delegateYield(u(),"t0",6);case 6:l++,d.next=4;break;case 9:return f=i.filter(function(I){return I!==null}),d.abrupt("return",f);case 11:case"end":return d.stop()}},t)})),wv.apply(this,arguments)}function R0(t){"@babel/helpers - typeof";return R0=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},R0(t)}function qB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function bv(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?qB(Object(i),!0).forEach(function(a){wIe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):qB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function wIe(t,r,i){return(r=bIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function bIe(t){var r=kIe(t,"string");return R0(r)=="symbol"?r:r+""}function kIe(t,r){if(R0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(R0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ia=Mde(function(){return bv(bv(bv({},A0e.apply(void 0,arguments)),H0e.apply(void 0,arguments)),xIe.apply(void 0,arguments))}),JB=function(r){var i=r.children;return qn.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:i})};function P0(t){"@babel/helpers - typeof";return P0=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},P0(t)}function XB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function eZ(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?XB(Object(i),!0).forEach(function(a){zIe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):XB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function zIe(t,r,i){return(r=RIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function RIe(t){var r=PIe(t,"string");return P0(r)=="symbol"?r:r+""}function PIe(t,r){if(P0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(P0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var UIe=function(){var r=ia(function(m){return m.currentScreenConfig}),i=ia(function(m){return m.pushStepWaitNextStepAndSet}),a=ia(function(m){return m.proccessingTransformedTemplate}),u=ia(function(m){return m.isProcessing}),l=ia(function(m){return m.setIsProcessing}),c=ia(function(m){return m.currentStepId}),f=ia(function(m){return m.listener}),M=ia(function(m){return m.externalModules}),d=ia(function(m){return m.modulesConfig}),I=function(E,j){f({eventType:Xd.MESSAGE,message:j,module:E})},h=function(E){l(E)},y=function(E){c&&(l(!1),i(c,E))},N=Jn.useCallback(function(){if(!r)return null;var m=M.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(m&&r)return qn.jsx(m.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:I,isProcessing:h})},[r,M]);return!r&&!a?qn.jsx(Dm,{direction:U5.Ltr,children:qn.jsx(JB,{children:"Waiting for play... or process completed"})}):qn.jsx(qn.Fragment,{children:qn.jsx(Dm,{direction:U5.Ltr,children:qn.jsxs(qn.Fragment,{children:[u&&qn.jsx(JB,{children:a?qn.jsx(l1,{perform:y,moduleProps:eZ(eZ({},a),{},{templateId:"PROGRESS"}),idvEventListener:I,isProcessing:h}):"Processing..."}),N()]})})})};function HIe(){return qn.jsx(Jn.StrictMode,{children:qn.jsx(VMe,{children:qn.jsx(UIe,{})})})}function PM(t){"@babel/helpers - typeof";return PM=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},PM(t)}function VIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tZ(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,nZ(a.key),a)}}function YIe(t,r,i){return r&&tZ(t.prototype,r),i&&tZ(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function QIe(t,r,i){return r=H0(r),FIe(t,zv()?Reflect.construct(r,[],H0(t).constructor):r.apply(t,i))}function FIe(t,r){if(r&&(PM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ie(t)}function $Ie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function BIe(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&&U0(t,r)}function kv(t){var r=typeof Map=="function"?new Map:void 0;return kv=function(a){if(a===null||!GIe(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 ZIe(a,arguments,H0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),U0(u,a)},kv(t)}function ZIe(t,r,i){if(zv())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&U0(u,i.prototype),u}function zv(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(zv=function(){return!!t})()}function GIe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function U0(t,r){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},U0(t,r)}function H0(t){return H0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},H0(t)}function rZ(t,r,i){return(r=nZ(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function nZ(t){var r=WIe(t,"string");return PM(r)=="symbol"?r:r+""}function WIe(t,r){if(PM(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(PM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var KIe="*,::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%}",iZ=function(t){function r(){var i;return VIe(this,r),i=QIe(this,r),rZ(i,"_root",lMe.createRoot(i.attachShadow({mode:"open"}))),rZ(i,"_mounted",!1),i}return BIe(r,t),YIe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(qn.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[qn.jsx("style",{nonce:ia.getState().getNonce(),children:KIe}),qn.jsx(HIe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),xv.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(kv(HTMLElement));function Y2(t){"@babel/helpers - typeof";return Y2=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},Y2(t)}function js(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */js=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,Y){return _[U]=Y}}function I(R,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),F=new oe(U||[]);return u(A,"_invoke",{value:K(R,_,F)}),A}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",m="executing",E="completed",j={};function L(){}function C(){}function T(){}var S={};d(S,c,function(){return this});var k=Object.getPrototypeOf,z=k&&k(k(ue([])));z&&z!==i&&a.call(z,c)&&(S=z);var $=T.prototype=L.prototype=Object.create(S);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function V(R,w){function _(Y,A,F,Me){var de=h(R[Y],R,A);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&Y2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,F,Me)},function(Oe){_("throw",Oe,F,Me)}):w.resolve(De).then(function(Oe){le.value=Oe,F(le)},function(Oe){return _("throw",Oe,F,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,F){function Me(){return new w(function(de,le){_(A,F,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(Y,A){if(U===m)throw Error("Generator is already running");if(U===E){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var F=_.delegate;if(F){var Me=ee(F,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=m;var de=h(R,w,_);if(de.type==="normal"){if(U=_.done?E:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=E,_.method="throw",_.arg=de.arg)}}}function ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,R.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[R.resultName]=A.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function te(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function ue(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function Y(){for(;++_<R.length;)if(a.call(R,_))return Y.value=R[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(Y2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(V.prototype),d(V.prototype,f,function(){return this}),r.AsyncIterator=V,r.async=function(R,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new V(I(R,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(F){return F.done?F.value:A.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=ue,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(te),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(le,De){return F.type="throw",F.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],F=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var F=A?A.completion:{};return F.type=w,F.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(F)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),te(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;te(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:ue(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function aZ(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function UM(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){aZ(l,a,u,c,f,"next",M)}function f(M){aZ(l,a,u,c,f,"throw",M)}c(void 0)})}}function qIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function JIe(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,epe(a.key),a)}}function XIe(t,r,i){return r&&JIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function epe(t){var r=tpe(t,"string");return Y2(r)=="symbol"?r:r+""}function tpe(t,r){if(Y2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Y2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var rpe=function(){function t(){qIe(this,t)}return XIe(t,[{key:"initialize",value:function(){var r=UM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ia.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"configure",value:function(){var r=UM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(typeof u=="string"){M.next=5;break}return M.next=3,ia.getState().configure(u);case 3:return l=M.sent,M.abrupt("return",l);case 5:return M.next=7,ia.getState().configureWithUrl(u);case 7:return c=M.sent,M.abrupt("return",c);case 9:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=UM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var r=UM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=u.workflowId,M.next=3,ia.getState().preparareWorkflowAndPrepareUi(l);case 3:return c=M.sent,M.abrupt("return",c);case 5:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=UM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().startNewSession(u);case 2:if(l=f.sent,!l.error){f.next=5;break}return f.abrupt("return",l);case 5:return f.abrupt("return",new Promise(function(M){var d=function(h){M(h)};ia.getState().playWorkflow(d)}));case 6:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=UM(js().mark(function a(){var u;return js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){ia.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ia.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ia.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ia.getState().getCurrentSessionId()}}])}(),npe=window.customElements.get("idv-flow");npe||window.customElements.define("idv-flow",iZ);var ipe=Object.defineProperty,ape=Object.defineProperties,ope=Object.getOwnPropertyDescriptors,oZ=Object.getOwnPropertySymbols,upe=Object.prototype.hasOwnProperty,spe=Object.prototype.propertyIsEnumerable,uZ=(t,r,i)=>r in t?ipe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Rv=(t,r)=>{for(var i in r||(r={}))upe.call(r,i)&&uZ(t,i,r[i]);if(oZ)for(var i of oZ(r))spe.call(r,i)&&uZ(t,i,r[i]);return t},lpe=(t,r)=>ape(t,ope(r)),oo=(t,r,i)=>new Promise((a,u)=>{var l=M=>{try{f(i.next(M))}catch(d){u(d)}},c=M=>{try{f(i.throw(M))}catch(d){u(d)}},f=M=>M.done?a(M.value):Promise.resolve(M.value).then(l,c);f((i=i.apply(t,r)).next())}),sZ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function lZ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cZ={exports:{}},V0={},fZ={exports:{}},Br={},MZ;function cpe(){if(MZ)return Br;MZ=1;/**
62
+ `),a=new Blob([i],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this._logs=[]}}}])}();const xv=new DIe;function U2(t){"@babel/helpers - typeof";return U2=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},U2(t)}function mn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,Y){return _[U]=Y}}function I(R,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),F=new oe(U||[]);return u(A,"_invoke",{value:K(R,_,F)}),A}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",m="executing",E="completed",j={};function L(){}function C(){}function T(){}var S={};d(S,c,function(){return this});var k=Object.getPrototypeOf,z=k&&k(k(ue([])));z&&z!==i&&a.call(z,c)&&(S=z);var $=T.prototype=L.prototype=Object.create(S);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function V(R,w){function _(Y,A,F,Me){var de=h(R[Y],R,A);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&U2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,F,Me)},function(Oe){_("throw",Oe,F,Me)}):w.resolve(De).then(function(Oe){le.value=Oe,F(le)},function(Oe){return _("throw",Oe,F,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,F){function Me(){return new w(function(de,le){_(A,F,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(Y,A){if(U===m)throw Error("Generator is already running");if(U===E){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var F=_.delegate;if(F){var Me=ee(F,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=m;var de=h(R,w,_);if(de.type==="normal"){if(U=_.done?E:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=E,_.method="throw",_.arg=de.arg)}}}function ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,R.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[R.resultName]=A.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function te(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function ue(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function Y(){for(;++_<R.length;)if(a.call(R,_))return Y.value=R[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(U2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(V.prototype),d(V.prototype,f,function(){return this}),r.AsyncIterator=V,r.async=function(R,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new V(I(R,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(F){return F.done?F.value:A.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=ue,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(te),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(le,De){return F.type="throw",F.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],F=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var F=A?A.completion:{};return F.type=w,F.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(F)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),te(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;te(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:ue(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function ZB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Bo(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){ZB(l,a,u,c,f,"next",M)}function f(M){ZB(l,a,u,c,f,"throw",M)}c(void 0)})}}function vIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function jIe(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,GB(a.key),a)}}function TIe(t,r,i){return r&&jIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function RM(t,r,i){return(r=GB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function GB(t){var r=CIe(t,"string");return U2(r)=="symbol"?r:r+""}function CIe(t,r){if(U2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(U2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ll=xv.create("wasm_idv"),AIe=function(){function t(r){vIe(this,t),RM(this,"_worker",null),RM(this,"_initialized",!1),RM(this,"_connectedToIdv",!1),RM(this,"_serviceRunning",!1),RM(this,"_userId",D0e(IMe)),RM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return TIe(t,[{key:"init",value:function(){var r=Bo(mn().mark(function a(){var u,l,c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=1,d.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/c2282f0-9701d74ac//PlatformAdaptor.worker.js");case 4:return u=d.sent,d.next=7,u.blob();case 7:l=d.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),ll("Creating worker error: ".concat(JSON.stringify(d.t0)));case 15:d.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){d.next=20;break}return d.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),d.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/c2282f0-9701d74ac/",preMain:!0});case 23:return f=d.sent,d.abrupt("return",f);case 25:case"end":return d.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Bo(mn().mark(function a(u){var l;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:sm.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return l=f.sent,ll("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(l))),l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var r=Bo(mn().mark(function a(u){var l;return mn().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:sm.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var r=Bo(mn().mark(function a(u,l){var c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c={workflowId:u},l&&(v0e(l)?c.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),d.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:c,preMain:!0});case 4:return f=d.sent,ll("Start session connect result: ".concat(JSON.stringify(f))),d.abrupt("return",f);case 7:case"end":return d.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Bo(mn().mark(function a(u){var l,c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={sessionId:u},M.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=M.sent,ll("continue session result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Bo(mn().mark(function a(){var u,l,c=arguments;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},M.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=M.sent,ll("listWorkflows result: ".concat(JSON.stringify(l))),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getServiceToken",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var r=Bo(mn().mark(function a(u){var l;return mn().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 l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var r=Bo(mn().mark(function a(u,l){var c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return ll("Push data: ".concat(u," , ").concat(JSON.stringify(l))),M.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=M.sent,ll("Push data result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,ll("Wait for session update result: ".concat(JSON.stringify(u))),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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,c.abrupt("return",u);case 6:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var r=Bo(mn().mark(function a(u){var l=this;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(M,d){if(!l._worker)return d();l._worker.onmessage=function(I){var h=I.data.target;if(h==="stdout"){ll(JSON.stringify(I.data.content));return}if(h==="custom"){var y=I.data,N=y.method,m=y.data;ll("::: custom method, ".concat(N,", ").concat(JSON.stringify(m))),N==="onRuntimeInitialized"&&(l._initialized=!0),M(m)}if(h==="stderr"){var E=I.data.content;ll(JSON.stringify(E)),l._setErrorScreen&&l._setErrorScreen(E)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=Bo(mn().mark(function a(){var u;return mn().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 i(){return r.apply(this,arguments)}return i}()}])}();function H2(t){"@babel/helpers - typeof";return H2=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},H2(t)}function WB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function V2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?WB(Object(i),!0).forEach(function(a){Lv(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):WB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Lv(t,r,i){return(r=SIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function SIe(t){var r=OIe(t,"string");return H2(r)=="symbol"?r:r+""}function OIe(t,r){if(H2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(H2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ei(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ei=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,Y){return _[U]=Y}}function I(R,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),F=new oe(U||[]);return u(A,"_invoke",{value:K(R,_,F)}),A}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",m="executing",E="completed",j={};function L(){}function C(){}function T(){}var S={};d(S,c,function(){return this});var k=Object.getPrototypeOf,z=k&&k(k(ue([])));z&&z!==i&&a.call(z,c)&&(S=z);var $=T.prototype=L.prototype=Object.create(S);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function V(R,w){function _(Y,A,F,Me){var de=h(R[Y],R,A);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&H2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,F,Me)},function(Oe){_("throw",Oe,F,Me)}):w.resolve(De).then(function(Oe){le.value=Oe,F(le)},function(Oe){return _("throw",Oe,F,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,F){function Me(){return new w(function(de,le){_(A,F,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(Y,A){if(U===m)throw Error("Generator is already running");if(U===E){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var F=_.delegate;if(F){var Me=ee(F,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=m;var de=h(R,w,_);if(de.type==="normal"){if(U=_.done?E:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=E,_.method="throw",_.arg=de.arg)}}}function ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,R.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[R.resultName]=A.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function te(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function ue(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function Y(){for(;++_<R.length;)if(a.call(R,_))return Y.value=R[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(H2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(V.prototype),d(V.prototype,f,function(){return this}),r.AsyncIterator=V,r.async=function(R,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new V(I(R,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(F){return F.done?F.value:A.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=ue,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(te),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(le,De){return F.type="throw",F.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],F=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var F=A?A.completion:{};return F.type=w,F.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(F)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),te(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;te(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:ue(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function KB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function ks(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){KB(l,a,u,c,f,"next",M)}function f(M){KB(l,a,u,c,f,"throw",M)}c(void 0)})}}var _Ie=xv.create("store_idv"),xIe=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ks(ei().mark(function l(){var c;return ei().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c=new AIe,M.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return ks(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=i().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=i().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(u);case 5:if(M=y.sent,d=null,M.code===4&&(d=x2.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=x2.PROVIDER_ERROR),d===null){y.next=12;break}return I=new I0({errorCode:d}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return ks(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,M=null,f.code===4&&(M=x2.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=x2.PROVIDER_ERROR),M===null){y.next=13;break}return d=new I0({errorCode:M}),I=new B5({errorCode:cm.CONNECTION_ISSUE,underlyingBaseError:d}),y.abrupt("return",{workflows:[],error:I});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var M,d=(M=i().currentSessionData)===null||M===void 0?void 0:M.sessionId,I=V2(V2({},f.results),{},{sessionId:d}),h=V2({results:I},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=ks(ei().mark(function l(){var c,f,M,d;return ei().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,LIe(c);case 4:return f=h.sent,r(function(){return{externalModules:f}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(M=i().wasmService)===null||M===void 0||M.shutdown(),i().resetWasmService(),i().resetProps(),d=new g0({errorCode:t0.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:d});case 16:case"end":return h.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=gE(u.find(function(c){return c.templateId===fm}));l.templateLayout=NH(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=ks(ei().mark(function l(c,f){var M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return M=null,d=function(){var N=ks(ei().mark(function m(){var E,j,L,C;return ei().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,i().wasmService.pushData(c,f);case 2:if(E=S.sent,j=null,E.code===4&&(j=ws.HTTP_ISSUE),E.code!==0&&E.code!==4&&(j=ws.PROVIDER_ERROR),j!==null&&(L=new p0({errorCode:ws.HTTP_ISSUE}),C=new eu({errorCode:Xo.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),M=C),E.code!==0){S.next=12;break}return M=null,S.abrupt("return",E);case 12:return S.abrupt("return",null);case 13:case"end":return S.stop()}},m)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},y.next=5,pE(d,I);case 5:return y.abrupt("return",M?{error:M}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=i().workflow;if(!(!l||!u))return l.steps.find(function(c){return c.id===u})},_waitingForNextStep:function(){var a=ks(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,M=function(){var N=ks(ei().mark(function m(){var E,j,L,C,T,S,k,z,$,Z,V,K,ee,J,te;return ei().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,i().wasmService.getSessionState();case 2:if(C=ue.sent,T=(E=C.data)===null||E===void 0?void 0:E.currentStep,S=(j=C.data)===null||j===void 0?void 0:j.isProcessingFiles,k=(L=C.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,z=N0e(k,T),$=C.code===4,Z=C.code!==0&&C.code!==4,V=C.code===0&&(!C.data.workflow||!C.data.currentStep),K=T&&T===c,ee=null,k&&!z&&(ee=ws.NOT_DATA_TYPE),$&&(ee=ws.HTTP_ISSUE),Z&&(ee=ws.PROVIDER_ERROR),S&&(ee=ws.IS_PROCESSING),K&&(ee=ws.SAME_STEP),V&&(ee=ws.DECODING_FAILED),ee!==null&&(J=new p0({errorCode:ee}),te=new eu({errorCode:Xo.INTERNAL_ISSUE,underlyingBaseError:J}),f=te),_Ie(JSON.stringify({nextStep:T,isDataType:z,isProcessingFiles:S})),!(z&&!K&&!S&&!$&&!Z&&!V)){ue.next=23;break}return f=null,ue.abrupt("return",C.data);case 23:return ue.abrupt("return",null);case 24:case"end":return ue.stop()}},m)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},y.next=6,pE(M,d);case 6:if(I=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});case 9:return y.abrupt("return",{workflow:I==null?void 0:I.workflow,nextStep:I==null?void 0:I.currentStep});case 10:case"end":return y.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||i().currentStepId;if(l){var c=i()._findStepById(l);c&&(i().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),i().resetSession(),i().listener({eventType:Xd.MESSAGE,message:e0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=ks(ei().mark(function l(c,f){var M,d,I,h,y,N,m,E;return ei().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){L.next=4;break}return i().setFinalStepAndStopProcess(),L.abrupt("return");case 4:if(!(f instanceof Rn)){L.next=10;break}return M=f,d=new eu({errorCode:Xo.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:M}),i().workflowSessionCompletion({error:d}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(I=L.sent,!I.error){L.next=17;break}return i().workflowSessionCompletion({error:I.error}),i().resetSession(),L.abrupt("return");case 17:return L.next=19,i()._waitingForNextStep();case 19:if(h=L.sent,!h.error){L.next=24;break}return i().workflowSessionCompletion({error:h.error}),i().resetSession(),L.abrupt("return");case 24:if(y=h.workflow,N=h.nextStep,i().setWorkflow(y),i().setLayout(y.client.layout),i().setProcessingTemplate(y.client.steps),m=i()._findStepById(N),E=function(T){return!!T&&Object.prototype.toString.call(T)==="[object Object]"&&T.templateId},!(m!=null&&m.final&&!E(m.client))){L.next=34;break}return i().setFinalStepAndStopProcess(m.id),L.abrupt("return");case 34:m!=null&&m.final&&E(m.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(N),i().setIsProcessing(!1);case 37:case"end":return L.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),continueSession:function(){var a=ks(ei().mark(function l(){var c,f,M,d,I,h,y,N,m,E,j,L,C;return ei().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(c={isContinue:!1},f=i().workflow,M=i().getCurrentSessionDataLs(),d=i().sessionRestoreMode,d){S.next=6;break}return S.abrupt("return",c);case 6:if(M){S.next=8;break}return S.abrupt("return",c);case 8:if(I=M.sessionId,h=M.workflowId,!(!I||h!==f.id)){S.next=11;break}return S.abrupt("return",c);case 11:return S.next=13,i().wasmService.continueSession(I);case 13:return y=S.sent,N=y.data,m=N.currentStep,"id"in N&&"currentStep"in N||(E=new SM({errorCode:TM.DECODING_FAILED}),j=new eu({errorCode:Xo.START_SESSION_ERROR,underlyingBaseError:E}),c=V2(V2({},c),{},{error:j})),L=i()._findStepById(m),(L==null?void 0:L.final)===!1?(C=N.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(C),i().setCurrentSessionDataLsAndStore({sessionId:N.id,workflowId:h}),i().listener({eventType:Xd.MESSAGE,message:e0.DID_START_RESTORE_SESSION,module:"IDV"}),c=V2(V2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),S.abrupt("return",c);case 20:case"end":return S.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u,l){if(!u&&!l)return r(function(){return{currentScreenConfig:null}});if(l)return r(function(){return{currentScreenConfig:l}});if(u===null)return r(function(){return{currentScreenConfig:null}});var c=i().workflow,f=null;if(u===fm)f=i().proccessingTransformedTemplate;else{var M;if(f=(M=i()._findStepById(u))===null||M===void 0?void 0:M.client,f!==null){var d;f.sessionId=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,f.serviceToken=i().serviceToken}f&&f.templateLayout&&(f.templateLayout=NH(f.templateLayout,i().layout))}var I=h0e(i().externalModules,c.steps,u);if(f===null||!I){var h=new eu({errorCode:Xo.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:h}),r(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=ks(ei().mark(function l(){var c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=d.sent,i().resetWasmService(),i().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){d.next=7;break}return d.abrupt("return",{});case 7:return d.abrupt("return",{});case 8:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function LIe(t){return wv.apply(this,arguments)}function wv(){return wv=ks(ei().mark(function t(r){var i,a,u,l,c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i=[{id:l1.getIdentifier(),supportedTemplates:l1.getSupportedTemplates(),component:l1}],a=Lv(Lv({},lm.LIVENESS,function(){return Promise.resolve().then(()=>XBe)}),lm.DOC_READER,function(){return Promise.resolve().then(()=>C8t)}),u=ei().mark(function I(){var h,y,N;return ei().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(h=c[l],y=function(){return a[h]()},!y){E.next=7;break}return E.next=5,y();case 5:N=E.sent,i.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return E.stop()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){d.next=9;break}return d.delegateYield(u(),"t0",6);case 6:l++,d.next=4;break;case 9:return f=i.filter(function(I){return I!==null}),d.abrupt("return",f);case 11:case"end":return d.stop()}},t)})),wv.apply(this,arguments)}function R0(t){"@babel/helpers - typeof";return R0=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},R0(t)}function qB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function bv(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?qB(Object(i),!0).forEach(function(a){wIe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):qB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function wIe(t,r,i){return(r=bIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function bIe(t){var r=kIe(t,"string");return R0(r)=="symbol"?r:r+""}function kIe(t,r){if(R0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(R0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ia=Mde(function(){return bv(bv(bv({},A0e.apply(void 0,arguments)),H0e.apply(void 0,arguments)),xIe.apply(void 0,arguments))}),JB=function(r){var i=r.children;return qn.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:i})};function P0(t){"@babel/helpers - typeof";return P0=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},P0(t)}function XB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function eZ(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?XB(Object(i),!0).forEach(function(a){zIe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):XB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function zIe(t,r,i){return(r=RIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function RIe(t){var r=PIe(t,"string");return P0(r)=="symbol"?r:r+""}function PIe(t,r){if(P0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(P0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var UIe=function(){var r=ia(function(m){return m.currentScreenConfig}),i=ia(function(m){return m.pushStepWaitNextStepAndSet}),a=ia(function(m){return m.proccessingTransformedTemplate}),u=ia(function(m){return m.isProcessing}),l=ia(function(m){return m.setIsProcessing}),c=ia(function(m){return m.currentStepId}),f=ia(function(m){return m.listener}),M=ia(function(m){return m.externalModules}),d=ia(function(m){return m.modulesConfig}),I=function(E,j){f({eventType:Xd.MESSAGE,message:j,module:E})},h=function(E){l(E)},y=function(E){c&&(l(!1),i(c,E))},N=Jn.useCallback(function(){if(!r)return null;var m=M.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(m&&r)return qn.jsx(m.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:I,isProcessing:h})},[r,M]);return!r&&!a?qn.jsx(Dm,{direction:U5.Ltr,children:qn.jsx(JB,{children:"Waiting for play... or process completed"})}):qn.jsx(qn.Fragment,{children:qn.jsx(Dm,{direction:U5.Ltr,children:qn.jsxs(qn.Fragment,{children:[u&&qn.jsx(JB,{children:a?qn.jsx(l1,{perform:y,moduleProps:eZ(eZ({},a),{},{templateId:"PROGRESS"}),idvEventListener:I,isProcessing:h}):"Processing..."}),N()]})})})};function HIe(){return qn.jsx(Jn.StrictMode,{children:qn.jsx(VMe,{children:qn.jsx(UIe,{})})})}function PM(t){"@babel/helpers - typeof";return PM=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},PM(t)}function VIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tZ(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,nZ(a.key),a)}}function YIe(t,r,i){return r&&tZ(t.prototype,r),i&&tZ(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function QIe(t,r,i){return r=H0(r),FIe(t,zv()?Reflect.construct(r,[],H0(t).constructor):r.apply(t,i))}function FIe(t,r){if(r&&(PM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ie(t)}function $Ie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function BIe(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&&U0(t,r)}function kv(t){var r=typeof Map=="function"?new Map:void 0;return kv=function(a){if(a===null||!GIe(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 ZIe(a,arguments,H0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),U0(u,a)},kv(t)}function ZIe(t,r,i){if(zv())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&U0(u,i.prototype),u}function zv(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(zv=function(){return!!t})()}function GIe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function U0(t,r){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},U0(t,r)}function H0(t){return H0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},H0(t)}function rZ(t,r,i){return(r=nZ(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function nZ(t){var r=WIe(t,"string");return PM(r)=="symbol"?r:r+""}function WIe(t,r){if(PM(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(PM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var KIe="*,::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%}",iZ=function(t){function r(){var i;return VIe(this,r),i=QIe(this,r),rZ(i,"_root",lMe.createRoot(i.attachShadow({mode:"open"}))),rZ(i,"_mounted",!1),i}return BIe(r,t),YIe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(qn.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[qn.jsx("style",{nonce:ia.getState().getNonce(),children:KIe}),qn.jsx(HIe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),xv.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(kv(HTMLElement));function Y2(t){"@babel/helpers - typeof";return Y2=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},Y2(t)}function js(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */js=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,Y){return _[U]=Y}}function I(R,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),F=new oe(U||[]);return u(A,"_invoke",{value:K(R,_,F)}),A}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",m="executing",E="completed",j={};function L(){}function C(){}function T(){}var S={};d(S,c,function(){return this});var k=Object.getPrototypeOf,z=k&&k(k(ue([])));z&&z!==i&&a.call(z,c)&&(S=z);var $=T.prototype=L.prototype=Object.create(S);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function V(R,w){function _(Y,A,F,Me){var de=h(R[Y],R,A);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&Y2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,F,Me)},function(Oe){_("throw",Oe,F,Me)}):w.resolve(De).then(function(Oe){le.value=Oe,F(le)},function(Oe){return _("throw",Oe,F,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,F){function Me(){return new w(function(de,le){_(A,F,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(Y,A){if(U===m)throw Error("Generator is already running");if(U===E){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var F=_.delegate;if(F){var Me=ee(F,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=m;var de=h(R,w,_);if(de.type==="normal"){if(U=_.done?E:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=E,_.method="throw",_.arg=de.arg)}}}function ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,R.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[R.resultName]=A.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function te(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function ue(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function Y(){for(;++_<R.length;)if(a.call(R,_))return Y.value=R[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(Y2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(V.prototype),d(V.prototype,f,function(){return this}),r.AsyncIterator=V,r.async=function(R,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new V(I(R,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(F){return F.done?F.value:A.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=ue,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(te),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(le,De){return F.type="throw",F.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],F=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var F=A?A.completion:{};return F.type=w,F.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(F)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),te(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;te(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:ue(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function aZ(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function UM(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){aZ(l,a,u,c,f,"next",M)}function f(M){aZ(l,a,u,c,f,"throw",M)}c(void 0)})}}function qIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function JIe(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,epe(a.key),a)}}function XIe(t,r,i){return r&&JIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function epe(t){var r=tpe(t,"string");return Y2(r)=="symbol"?r:r+""}function tpe(t,r){if(Y2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Y2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var rpe=function(){function t(){qIe(this,t)}return XIe(t,[{key:"initialize",value:function(){var r=UM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ia.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"configure",value:function(){var r=UM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(typeof u=="string"){M.next=5;break}return M.next=3,ia.getState().configure(u);case 3:return l=M.sent,M.abrupt("return",l);case 5:return M.next=7,ia.getState().configureWithUrl(u);case 7:return c=M.sent,M.abrupt("return",c);case 9:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=UM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var r=UM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=u.workflowId,M.next=3,ia.getState().preparareWorkflowAndPrepareUi(l);case 3:return c=M.sent,M.abrupt("return",c);case 5:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=UM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().startNewSession(u);case 2:if(l=f.sent,!l.error){f.next=5;break}return f.abrupt("return",l);case 5:return f.abrupt("return",new Promise(function(M){var d=function(h){M(h)};ia.getState().playWorkflow(d)}));case 6:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=UM(js().mark(function a(){var u;return js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){ia.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ia.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ia.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ia.getState().getCurrentSessionId()}}])}(),npe=window.customElements.get("idv-flow");npe||window.customElements.define("idv-flow",iZ);var ipe=Object.defineProperty,ape=Object.defineProperties,ope=Object.getOwnPropertyDescriptors,oZ=Object.getOwnPropertySymbols,upe=Object.prototype.hasOwnProperty,spe=Object.prototype.propertyIsEnumerable,uZ=(t,r,i)=>r in t?ipe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Rv=(t,r)=>{for(var i in r||(r={}))upe.call(r,i)&&uZ(t,i,r[i]);if(oZ)for(var i of oZ(r))spe.call(r,i)&&uZ(t,i,r[i]);return t},lpe=(t,r)=>ape(t,ope(r)),oo=(t,r,i)=>new Promise((a,u)=>{var l=M=>{try{f(i.next(M))}catch(d){u(d)}},c=M=>{try{f(i.throw(M))}catch(d){u(d)}},f=M=>M.done?a(M.value):Promise.resolve(M.value).then(l,c);f((i=i.apply(t,r)).next())}),sZ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function lZ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cZ={exports:{}},V0={},fZ={exports:{}},Br={},MZ;function cpe(){if(MZ)return Br;MZ=1;/**
63
63
  * @license React
64
64
  * react.production.min.js
65
65
  *
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-BOrKCelQ.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-D_V5Xn4R.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": "1.0.121-rc",
3
+ "version": "2.3.125-nightly",
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",