@regulaforensics/idv-capture-web 0.1.84-nightly → 0.1.85-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.
|
@@ -12574,9 +12574,9 @@ function Q0() {
|
|
|
12574
12574
|
supportedTemplates: kn.getSupportedTemplates(),
|
|
12575
12575
|
component: kn
|
|
12576
12576
|
}], n = Y0(Y0({}, "LIVENESS", function() {
|
|
12577
|
-
return import("./index-
|
|
12577
|
+
return import("./index-C7PErzVl.js");
|
|
12578
12578
|
}), "DOC_READER", function() {
|
|
12579
|
-
return import("./index-
|
|
12579
|
+
return import("./index-C6gMC4vi.js");
|
|
12580
12580
|
}), i = /* @__PURE__ */ xe().mark(function m() {
|
|
12581
12581
|
var h, d, y;
|
|
12582
12582
|
return xe().wrap(function(E) {
|
|
@@ -12931,7 +12931,7 @@ var Fr = t6.create("wasm_idv"), KH = /* @__PURE__ */ function() {
|
|
|
12931
12931
|
return ae().wrap(function(s) {
|
|
12932
12932
|
for (; ; ) switch (s.prev = s.next) {
|
|
12933
12933
|
case 0:
|
|
12934
|
-
return s.prev = 1, s.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-
|
|
12934
|
+
return s.prev = 1, s.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-2a9d1423d//PlatformAdaptor.worker.js");
|
|
12935
12935
|
case 4:
|
|
12936
12936
|
return i = s.sent, s.next = 7, i.blob();
|
|
12937
12937
|
case 7:
|
|
@@ -12958,7 +12958,7 @@ var Fr = t6.create("wasm_idv"), KH = /* @__PURE__ */ function() {
|
|
|
12958
12958
|
}), s.next = 23, this.sendMessage({
|
|
12959
12959
|
target: "worker-init",
|
|
12960
12960
|
URL: document.URL,
|
|
12961
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-
|
|
12961
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-2a9d1423d/",
|
|
12962
12962
|
preMain: !0
|
|
12963
12963
|
});
|
|
12964
12964
|
case 23:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as wo, j as ME } from "./index-
|
|
1
|
+
import { r as wo, j as ME } from "./index-Aj1rSeug.js";
|
|
2
2
|
var MA = Object.defineProperty, PA = Object.defineProperties, xA = Object.getOwnPropertyDescriptors, PE = Object.getOwnPropertySymbols, HA = Object.prototype.hasOwnProperty, VA = Object.prototype.propertyIsEnumerable, xE = (e, t, n) => t in e ? MA(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, q = (e, t) => {
|
|
3
3
|
for (var n in t || (t = {}))
|
|
4
4
|
HA.call(t, n) && xE(e, n, t[n]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as Nn, j as VN } from "./index-
|
|
1
|
+
import { r as Nn, j as VN } from "./index-Aj1rSeug.js";
|
|
2
2
|
var Yx = Object.defineProperty, Hx = Object.defineProperties, Px = Object.getOwnPropertyDescriptors, ZN = Object.getOwnPropertySymbols, Vx = Object.prototype.hasOwnProperty, Zx = Object.prototype.propertyIsEnumerable, RN = (e, M, t) => M in e ? Yx(e, M, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[M] = t, Dy = (e, M) => {
|
|
3
3
|
for (var t in M || (M = {}))
|
|
4
4
|
Vx.call(M, t) && RN(e, t, M[t]);
|
package/dist/main.iife.js
CHANGED
|
@@ -47,7 +47,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
47
47
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fke(e,t){if(e){if(typeof e=="string")return mK(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mK(e,t):void 0}}function mK(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function dke(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function gke(e){if(Array.isArray(e))return e}var Ike=function(t){var r=t.title,n=t.header,i=t.footer,a=t.details,o=t.buttons,l=t.backgroundColor,u=et.useRef(null),s=et.useState(!1),c=cke(s,2),d=c[0],f=c[1];return et.useEffect(function(){u.current&&f(u.current.scrollHeight>u.current.clientHeight)},[]),O.jsx(Mh,{header:n,buttons:o,footer:i,backgroundColor:l,children:O.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:d?"flex-start":"center",height:"100%",minHeight:"100%",overflow:"auto"},ref:u,children:[O.jsx("div",{style:{marginBottom:r?"16px":"0",fontWeight:400,fontSize:"28px"},children:r&&O.jsx(Hd,nn({},r))}),a&&O.jsx(uke,nn({},a))]})})},pke={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},Nke={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function Zd(e){"@babel/helpers - typeof";return Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zd(e)}function TK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TK(Object(r),!0).forEach(function(n){yke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TK(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yke(e,t,r){return(t=hke(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hke(e){var t=Dke(e,"string");return Zd(t)=="symbol"?t:t+""}function Dke(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eke=function(t){var r=t.title,n=t.header,i=t.footer,a=t.image,o=t.description,l=t.buttons,u=t.backgroundColor;return O.jsx(Mh,{header:n,footer:i,buttons:l,backgroundColor:u,children:O.jsx(O.Fragment,{children:O.jsxs("div",{style:CK(CK({},Nke),{},{justifyContent:a?"flex-start":"center"}),children:[a&&O.jsx("div",{style:pke,children:O.jsx(IM,nn({},a))}),r&&O.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:O.jsx(Hd,nn({},r))}),o&&O.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:O.jsx(vS,nn({},o))})]})})})},AK=function(t){var r=t.progressView,n=t.footer,i=t.backgroundColor;return O.jsx(Mh,{footer:n,backgroundColor:i,children:O.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"20px",height:"100%",width:"100%"},children:O.jsx(ske,{title:(r==null?void 0:r.title)||{text:""},indicatorColor:(r==null?void 0:r.indicatorColor)||"black"})})})},jke={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},mke={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},Tke={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},Cke={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},Ake=function(t){var r=t.header,n=t.footer,i=t.image,a=t.title,o=t.description,l=t.buttons,u=t.backgroundColor;return O.jsx(Mh,{header:r,buttons:l,footer:n,backgroundColor:u,children:O.jsxs("div",{style:jke,children:[i&&O.jsx("div",{style:mke,children:O.jsx(IM,nn({},i))}),(a==null?void 0:a.text)&&O.jsx("div",{style:Tke,children:a&&O.jsx(Hd,nn({},a))}),(o==null?void 0:o.text)&&O.jsx("div",{style:Cke,children:O.jsx(vS,nn({},o))})]})})},Ske=function(t){var r=t.template,n=t.templateLayout;if(r==="STATUS")return O.jsx(Ake,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,description:n==null?void 0:n.description,backgroundColor:n==null?void 0:n.backgroundColor});if(r==="INFO")return O.jsx(Eke,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor});if(r==="PROGRESS")return O.jsx(AK,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,progressView:n==null?void 0:n.progressView,backgroundColor:n==null?void 0:n.backgroundColor});if(r==="INFO_DETAILS")return O.jsx(Ike,{header:n==null?void 0:n.header,title:n==null?void 0:n.title,details:n==null?void 0:n.details,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:n==null?void 0:n.backgroundColor})},SK="GUI",e4=function(t){var r=t.moduleProps,n=t.perform,i=r.templateId,a=r.templateLayout,o=et.useCallback(function(l){n&&n(l)},[i]);return i&&a?O.jsx(jbe,{perform:o,children:O.jsx(Ske,{template:i,templateLayout:a})}):O.jsx(AK,{})};e4.getIdentifier=function(){return SK},e4.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},e4.displayName=SK;function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function vke(e,t,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function xke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vK(e,t,r){return(t=Oke(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oke(e){var t=Lke(e,"string");return Gd(t)=="symbol"?t:t+""}function Lke(e,t){if(Gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fh=vke(function e(t,r){xke(this,e),vK(this,"templateLayout",void 0),vK(this,"templateId","STATUS"),this.templateLayout={title:{text:t},image:{imageId:"failure"},description:{text:String(r)},footer:{signature:{imageId:"signature"}}}}),_ke=De,wke=T2.every,zke=wf,bke=zke("every");_ke({target:"Array",proto:!0,forced:!bke},{every:function(t){return wke(this,t,arguments.length>1?arguments[1]:void 0)}});var kke=mY,Rke=_Y;kke("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Rke);var xS=_e,dh=Set.prototype,Al={Set,add:xS(dh.add),has:xS(dh.has),remove:xS(dh.delete),proto:dh},Pke=Al.has,t4=function(e){return Pke(e),e},$ke=Ft,r4=function(e,t,r){for(var n=r?e:e.iterator,i=e.next,a,o;!(a=$ke(i,n)).done;)if(o=t(a.value),o!==void 0)return o},xK=_e,Uke=r4,OK=Al,Hke=OK.Set,LK=OK.proto,Vke=xK(LK.forEach),_K=xK(LK.keys),Yke=_K(new Hke).next,Wd=function(e,t,r){return r?Uke({iterator:_K(e),next:Yke},t):Vke(e,t)},wK=Al,Qke=Wd,Fke=wK.Set,Bke=wK.add,OS=function(e){var t=new Fke;return Qke(e,function(r){Bke(t,r)}),t},Zke=uV,Gke=Al,Kd=Zke(Gke.proto,"size","get")||function(e){return e.size},Wke=function(e){return{iterator:e,next:e.next,done:!1}},zK=Co,bK=ur,kK=Ft,Kke=Xp,Jke=Wke,RK="Invalid size",Xke=RangeError,qke=TypeError,eRe=Math.max,PK=function(e,t){this.set=e,this.size=eRe(t,0),this.has=zK(e.has),this.keys=zK(e.keys)};PK.prototype={getIterator:function(){return Jke(bK(kK(this.keys,this.set)))},includes:function(e){return kK(this.has,this.set,e)}};var n4=function(e){bK(e);var t=+e.size;if(t!==t)throw new qke(RK);var r=Kke(t);if(r<0)throw new Xke(RK);return new PK(e,r)},tRe=t4,$K=Al,rRe=OS,nRe=Kd,iRe=n4,aRe=Wd,oRe=r4,lRe=$K.has,UK=$K.remove,uRe=function(t){var r=tRe(this),n=iRe(t),i=rRe(r);return nRe(r)<=n.size?aRe(r,function(a){n.includes(a)&&UK(i,a)}):oRe(n.getIterator(),function(a){lRe(r,a)&&UK(i,a)}),i},sRe=bn,HK=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},i4=function(e){var t=sRe("Set");try{new t()[e](HK(0));try{return new t()[e](HK(-1)),!1}catch(r){return!0}}catch(r){return!1}},cRe=De,MRe=uRe,fRe=i4;cRe({target:"Set",proto:!0,real:!0,forced:!fRe("difference")},{difference:MRe});var dRe=t4,LS=Al,gRe=Kd,IRe=n4,pRe=Wd,NRe=r4,yRe=LS.Set,VK=LS.add,hRe=LS.has,DRe=function(t){var r=dRe(this),n=IRe(t),i=new yRe;return gRe(r)>n.size?NRe(n.getIterator(),function(a){hRe(r,a)&&VK(i,a)}):pRe(r,function(a){n.includes(a)&&VK(i,a)}),i},ERe=De,jRe=ke,mRe=DRe,TRe=i4,CRe=!TRe("intersection")||jRe(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});ERe({target:"Set",proto:!0,real:!0,forced:CRe},{intersection:mRe});var ARe=t4,SRe=Al.has,vRe=Kd,xRe=n4,ORe=Wd,LRe=r4,_Re=AN,wRe=function(t){var r=ARe(this),n=xRe(t);if(vRe(r)<=n.size)return ORe(r,function(a){if(n.includes(a))return!1},!0)!==!1;var i=n.getIterator();return LRe(i,function(a){if(SRe(r,a))return _Re(i,"normal",!1)})!==!1},zRe=De,bRe=wRe,kRe=i4;zRe({target:"Set",proto:!0,real:!0,forced:!kRe("isDisjointFrom")},{isDisjointFrom:bRe});var RRe=t4,PRe=Kd,$Re=Wd,URe=n4,HRe=function(t){var r=RRe(this),n=URe(t);return PRe(r)>n.size?!1:$Re(r,function(i){if(!n.includes(i))return!1},!0)!==!1},VRe=De,YRe=HRe,QRe=i4;VRe({target:"Set",proto:!0,real:!0,forced:!QRe("isSubsetOf")},{isSubsetOf:YRe});var FRe=t4,BRe=Al.has,ZRe=Kd,GRe=n4,WRe=r4,KRe=AN,JRe=function(t){var r=FRe(this),n=GRe(t);if(ZRe(r)<n.size)return!1;var i=n.getIterator();return WRe(i,function(a){if(!BRe(r,a))return KRe(i,"normal",!1)})!==!1},XRe=De,qRe=JRe,ePe=i4;XRe({target:"Set",proto:!0,real:!0,forced:!ePe("isSupersetOf")},{isSupersetOf:qRe});var tPe=t4,_S=Al,rPe=OS,nPe=n4,iPe=r4,aPe=_S.add,oPe=_S.has,lPe=_S.remove,uPe=function(t){var r=tPe(this),n=nPe(t).getIterator(),i=rPe(r);return iPe(n,function(a){oPe(r,a)?lPe(i,a):aPe(i,a)}),i},sPe=De,cPe=uPe,MPe=i4;sPe({target:"Set",proto:!0,real:!0,forced:!MPe("symmetricDifference")},{symmetricDifference:cPe});var fPe=t4,dPe=Al.add,gPe=OS,IPe=n4,pPe=r4,NPe=function(t){var r=fPe(this),n=IPe(t).getIterator(),i=gPe(r);return pPe(n,function(a){dPe(i,a)}),i},yPe=De,hPe=NPe,DPe=i4;yPe({target:"Set",proto:!0,real:!0,forced:!DPe("union")},{union:hPe});function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}var EPe=function(t,r){return wS(t,r)},wS=function(t,r){var n=zS(t,r);for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var a=n[i];if(gh(a)==="object"&&!Array.isArray(a))n[i]=zS(a,r);else if(Array.isArray(a)){var o=a.map(function(l){return gh(l)==="object"?wS(l,r):l});n[i]=o}}return n},zS=function(t,r){var n=jPe(t),i=t.layout;if(!i||i.length===0)return n;var a=null;if(i.forEach(function(s){var c=r[s];a?c&&mPe(c,a):a=c}),a){var o=zS(a,r);for(var l in o)if(Object.prototype.hasOwnProperty.call(o,l)){var u=o[l];Object.prototype.hasOwnProperty.call(n,l)||(n[l]=u)}}return wS(n,r)},jPe=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&n.toLowerCase()!=="layout"&&(r[n]=t[n]);return r},mPe=function(t,r){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])};function Ih(e){"@babel/helpers - typeof";return Ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ih(e)}function Jd(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Jd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&Ih(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(Ih(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function TPe(e){return vPe(e)||SPe(e)||APe(e)||CPe()}function CPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
48
48
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function APe(e,t){if(e){if(typeof e=="string")return bS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bS(e,t):void 0}}function SPe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vPe(e){if(Array.isArray(e))return bS(e)}function bS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function YK(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function QK(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){YK(a,n,i,o,l,"next",u)}function l(u){YK(a,n,i,o,l,"throw",u)}o(void 0)})}}function ph(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return console.error("Failed to copy object:",t),null}}var FK=function(t,r){if(!t||!r)return null;var n=null;return n=ph(t),n&&(n=EPe(n,r)),n};function xPe(e){return kS.apply(this,arguments)}function kS(){return kS=QK(Jd().mark(function e(t){return Jd().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(i){return setTimeout(i,t)}));case 1:case"end":return n.stop()}},e)})),kS.apply(this,arguments)}function BK(e,t){return RS.apply(this,arguments)}function RS(){return RS=QK(Jd().mark(function e(t,r){var n,i,a,o,l=arguments;return Jd().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:n=l.length>2&&l[2]!==void 0?l[2]:fOe,i=l.length>3&&l[3]!==void 0?l[3]:dOe,a=0;case 3:if(!(a<n)){s.next=15;break}return s.next=6,t();case 6:if(o=s.sent,o===null){s.next=9;break}return s.abrupt("return",o);case 9:if(a++,!(a<n)){s.next=13;break}return s.next=13,xPe(i);case 13:s.next=3;break;case 15:return s.abrupt("return",r());case 16:case"end":return s.stop()}},e)})),RS.apply(this,arguments)}var OPe=function(t,r){var n=t.reduce(function(o,l){return o.push.apply(o,TPe(l.supportedTemplates)),o},[]),i=Array.from(new Set(r.filter(function(o){return o.type!=="PROCESSING"&&o.id!=="SCAN_RFID"&&!o.final}).map(function(o){return o.client.templateId})));function a(o,l){var u=new Set(o);return l.every(function(s){return u.has(s)})}return a(n,i)},LPe=De,_Pe=_e,wPe=df,zPe=Ia,bPe=wf,kPe=_Pe([].join),RPe=wPe!==Object,PPe=RPe||!bPe("join",",");LPe({target:"Array",proto:!0,forced:PPe},{join:function(t){return kPe(zPe(this),t===void 0?",":t)}});var $Pe=De,UPe=_e,ZK=Date,HPe=UPe(ZK.prototype.getTime);$Pe({target:"Date",stat:!0},{now:function(){return HPe(new ZK)}});var VPe=ke,YPe=Mt,QPe=Xe,GK=AU,FPe=YPe("iterator"),WK=!VPe(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(i,a){t.delete("b"),n+=a+i}),r.delete("a",2),r.delete("b",void 0),GK&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(GK||!QPe)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[FPe]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",void 0).host!=="x"}),KK=Xe,BPe=_e,ZPe=Ft,GPe=ke,PS=mf,WPe=Df,KPe=ff,JPe=ki,XPe=df,pM=Object.assign,JK=Object.defineProperty,qPe=BPe([].concat),e$e=!pM||GPe(function(){if(KK&&pM({b:1},pM(JK({},"a",{enumerable:!0,get:function(){JK(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),pM({},e)[r]!==7||PS(pM({},t)).join("")!==n})?function(t,r){for(var n=JPe(t),i=arguments.length,a=1,o=WPe.f,l=KPe.f;i>a;)for(var u=XPe(arguments[a++]),s=o?qPe(PS(u),o(u)):PS(u),c=s.length,d=0,f;c>d;)f=s[d++],(!KK||ZPe(l,u,f))&&(n[f]=u[f]);return n}:pM,a4=_e,$S=2147483647,Xd=36,XK=1,US=26,t$e=38,r$e=700,n$e=72,i$e=128,a$e="-",o$e=/[^\0-\u007E]/,qK=/[.\u3002\uFF0E\uFF61]/g,eJ="Overflow: input needs wider integers to process",HS=Xd-XK,tJ=RangeError,l$e=a4(qK.exec),NM=Math.floor,VS=String.fromCharCode,rJ=a4("".charCodeAt),nJ=a4([].join),tc=a4([].push),u$e=a4("".replace),s$e=a4("".split),c$e=a4("".toLowerCase),M$e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=rJ(e,r++);if(i>=55296&&i<=56319&&r<n){var a=rJ(e,r++);(a&64512)===56320?tc(t,((i&1023)<<10)+(a&1023)+65536):(tc(t,i),r--)}else tc(t,i)}return t},iJ=function(e){return e+22+75*(e<26)},f$e=function(e,t,r){var n=0;for(e=r?NM(e/r$e):e>>1,e+=NM(e/t);e>HS*US>>1;)e=NM(e/HS),n+=Xd;return NM(n+(HS+1)*e/(e+t$e))},d$e=function(e){var t=[];e=M$e(e);var r=e.length,n=i$e,i=0,a=n$e,o,l;for(o=0;o<e.length;o++)l=e[o],l<128&&tc(t,VS(l));var u=t.length,s=u;for(u&&tc(t,a$e);s<r;){var c=$S;for(o=0;o<e.length;o++)l=e[o],l>=n&&l<c&&(c=l);var d=s+1;if(c-n>NM(($S-i)/d))throw new tJ(eJ);for(i+=(c-n)*d,n=c,o=0;o<e.length;o++){if(l=e[o],l<n&&++i>$S)throw new tJ(eJ);if(l===n){for(var f=i,g=Xd;;){var I=g<=a?XK:g>=a+US?US:g-a;if(f<I)break;var p=f-I,j=Xd-I;tc(t,VS(iJ(I+p%j))),f=NM(p/j),g+=Xd}tc(t,VS(iJ(f))),a=f$e(i,d,s===u),i=0,s++}}i++,n++}return nJ(t,"")},g$e=function(e){var t=[],r=s$e(u$e(c$e(e),qK,"."),"."),n,i;for(n=0;n<r.length;n++)i=r[n],tc(t,l$e(o$e,i)?"xn--"+d$e(i):i);return nJ(t,".")},I$e=De,p$e=_e,N$e=pm,y$e=RangeError,aJ=String.fromCharCode,oJ=String.fromCodePoint,h$e=p$e([].join),D$e=!!oJ&&oJ.length!==1;I$e({target:"String",stat:!0,arity:1,forced:D$e},{fromCodePoint:function(t){for(var r=[],n=arguments.length,i=0,a;n>i;){if(a=+arguments[i++],N$e(a,1114111)!==a)throw new y$e(a+" is not a valid code point");r[i]=a<65536?aJ(a):aJ(((a-=65536)>>10)+55296,a%1024+56320)}return h$e(r,"")}});var lJ=vs,E$e=Math.floor,YS=function(e,t){var r=e.length;if(r<8)for(var n=1,i,a;n<r;){for(a=n,i=e[n];a&&t(e[a-1],i)>0;)e[a]=e[--a];a!==n++&&(e[a]=i)}else for(var o=E$e(r/2),l=YS(lJ(e,0,o),t),u=YS(lJ(e,o),t),s=l.length,c=u.length,d=0,f=0;d<s||f<c;)e[d+f]=d<s&&f<c?t(l[d],u[f])<=0?l[d++]:u[f++]:d<s?l[d++]:u[f++];return e},j$e=YS,QS=De,uJ=Ye,FS=vW,m$e=bn,Nh=Ft,zo=_e,qd=Xe,sJ=WK,cJ=Cr,T$e=pu,C$e=TY,A$e=Ao,S$e=kV,BS=Iu,MJ=Pf,ZS=st,v$e=_t,x$e=xs,O$e=jf,L$e=ur,fJ=Lt,$n=ln,_$e=Ss,dJ=O1,gJ=lT,w$e=CN,yh=DN,yM=x2,z$e=Mt,b$e=j$e,k$e=z$e("iterator"),hM="URLSearchParams",IJ=hM+"Iterator",pJ=BS.set,Ta=BS.getterFor(hM),R$e=BS.getterFor(IJ),NJ=FS("fetch"),hh=FS("Request"),e5=FS("Headers"),GS=hh&&hh.prototype,yJ=e5&&e5.prototype,P$e=uJ.TypeError,$$e=uJ.encodeURIComponent,U$e=String.fromCharCode,H$e=m$e("String","fromCodePoint"),V$e=parseInt,Dh=zo("".charAt),hJ=zo([].join),rc=zo([].push),DJ=zo("".replace),Y$e=zo([].shift),EJ=zo([].splice),jJ=zo("".split),mJ=zo("".slice),Q$e=zo(/./.exec),F$e=/\+/g,WS="�",B$e=/^[0-9a-f]+$/i,TJ=function(e,t){var r=mJ(e,t,t+2);return Q$e(B$e,r)?V$e(r,16):NaN},Z$e=function(e){for(var t=0,r=128;r>0&&e&r;r>>=1)t++;return t},G$e=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(e[0]&31)<<6|e[1]&63;break;case 3:t=(e[0]&15)<<12|(e[1]&63)<<6|e[2]&63;break;case 4:t=(e[0]&7)<<18|(e[1]&63)<<12|(e[2]&63)<<6|e[3]&63;break}return t>1114111?null:t},CJ=function(e){e=DJ(e,F$e," ");for(var t=e.length,r="",n=0;n<t;){var i=Dh(e,n);if(i==="%"){if(Dh(e,n+1)==="%"||n+3>t){r+="%",n++;continue}var a=TJ(e,n+1);if(a!==a){r+=i,n++;continue}n+=2;var o=Z$e(a);if(o===0)i=U$e(a);else{if(o===1||o>4){r+=WS,n++;continue}for(var l=[a],u=1;u<o&&(n++,!(n+3>t||Dh(e,n)!=="%"));){var s=TJ(e,n+1);if(s!==s){n+=3;break}if(s>191||s<128)break;rc(l,s),n+=2,u++}if(l.length!==o){r+=WS;continue}var c=G$e(l);c===null?r+=WS:i=H$e(c)}}r+=i,n++}return r},W$e=/[!'()~]|%20/g,K$e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},J$e=function(e){return K$e[e]},AJ=function(e){return DJ($$e(e),W$e,J$e)},KS=S$e(function(t,r){pJ(this,{type:IJ,target:Ta(t).entries,index:0,kind:r})},hM,function(){var t=R$e(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=null,yh(void 0,!0);var i=r[n];switch(t.kind){case"keys":return yh(i.key,!1);case"values":return yh(i.value,!1)}return yh([i.key,i.value],!1)},!0),SJ=function(e){this.entries=[],this.url=null,e!==void 0&&(fJ(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?Dh(e,0)==="?"?mJ(e,1):e:$n(e)))};SJ.prototype={type:hM,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=w$e(e),n,i,a,o,l,u,s;if(r)for(n=gJ(e,r),i=n.next;!(a=Nh(i,n)).done;){if(o=gJ(L$e(a.value)),l=o.next,(u=Nh(l,o)).done||(s=Nh(l,o)).done||!Nh(l,o).done)throw new P$e("Expected sequence with length 2");rc(t,{key:$n(u.value),value:$n(s.value)})}else for(var c in e)v$e(e,c)&&rc(t,{key:c,value:$n(e[c])})},parseQuery:function(e){if(e)for(var t=this.entries,r=jJ(e,"&"),n=0,i,a;n<r.length;)i=r[n++],i.length&&(a=jJ(i,"="),rc(t,{key:CJ(Y$e(a)),value:CJ(hJ(a,"="))}))},serialize:function(){for(var e=this.entries,t=[],r=0,n;r<e.length;)n=e[r++],rc(t,AJ(n.key)+"="+AJ(n.value));return hJ(t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Eh=function(){MJ(this,DM);var t=arguments.length>0?arguments[0]:void 0,r=pJ(this,new SJ(t));qd||(this.size=r.entries.length)},DM=Eh.prototype;if(C$e(DM,{append:function(t,r){var n=Ta(this);yM(arguments.length,2),rc(n.entries,{key:$n(t),value:$n(r)}),qd||this.length++,n.updateURL()},delete:function(e){for(var t=Ta(this),r=yM(arguments.length,1),n=t.entries,i=$n(e),a=r<2?void 0:arguments[1],o=a===void 0?a:$n(a),l=0;l<n.length;){var u=n[l];if(u.key===i&&(o===void 0||u.value===o)){if(EJ(n,l,1),o!==void 0)break}else l++}qd||(this.size=n.length),t.updateURL()},get:function(t){var r=Ta(this).entries;yM(arguments.length,1);for(var n=$n(t),i=0;i<r.length;i++)if(r[i].key===n)return r[i].value;return null},getAll:function(t){var r=Ta(this).entries;yM(arguments.length,1);for(var n=$n(t),i=[],a=0;a<r.length;a++)r[a].key===n&&rc(i,r[a].value);return i},has:function(t){for(var r=Ta(this).entries,n=yM(arguments.length,1),i=$n(t),a=n<2?void 0:arguments[1],o=a===void 0?a:$n(a),l=0;l<r.length;){var u=r[l++];if(u.key===i&&(o===void 0||u.value===o))return!0}return!1},set:function(t,r){var n=Ta(this);yM(arguments.length,1);for(var i=n.entries,a=!1,o=$n(t),l=$n(r),u=0,s;u<i.length;u++)s=i[u],s.key===o&&(a?EJ(i,u--,1):(a=!0,s.value=l));a||rc(i,{key:o,value:l}),qd||(this.size=i.length),n.updateURL()},sort:function(){var t=Ta(this);b$e(t.entries,function(r,n){return r.key>n.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=Ta(this).entries,n=x$e(t,arguments.length>1?arguments[1]:void 0),i=0,a;i<r.length;)a=r[i++],n(a.value,a.key,this)},keys:function(){return new KS(this,"keys")},values:function(){return new KS(this,"values")},entries:function(){return new KS(this,"entries")}},{enumerable:!0}),cJ(DM,k$e,DM.entries,{name:"entries"}),cJ(DM,"toString",function(){return Ta(this).serialize()},{enumerable:!0}),qd&&T$e(DM,"size",{get:function(){return Ta(this).entries.length},configurable:!0,enumerable:!0}),A$e(Eh,hM),QS({global:!0,constructor:!0,forced:!sJ},{URLSearchParams:Eh}),!sJ&&ZS(e5)){var X$e=zo(yJ.has),q$e=zo(yJ.set),vJ=function(e){if(fJ(e)){var t=e.body,r;if(O$e(t)===hM)return r=e.headers?new e5(e.headers):new e5,X$e(r,"content-type")||q$e(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_$e(e,{body:dJ(0,$n(t)),headers:dJ(0,r)})}return e};if(ZS(NJ)&&QS({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return NJ(t,arguments.length>1?vJ(arguments[1]):{})}}),ZS(hh)){var JS=function(t){return MJ(this,GS),new hh(t,arguments.length>1?vJ(arguments[1]):{})};GS.constructor=JS,JS.prototype=GS,QS({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:JS})}}var eUe={URLSearchParams:Eh,getState:Ta},tUe=De,XS=Xe,rUe=WK,qS=Ye,xJ=xs,Ca=_e,jh=Cr,Aa=pu,nUe=Pf,e9=_t,t9=e$e,EM=UG,bo=vs,iUe=uQ.codeAt,aUe=g$e,Lu=ln,oUe=Ao,lUe=x2,OJ=eUe,LJ=Iu,uUe=LJ.set,mh=LJ.getterFor("URL"),sUe=OJ.URLSearchParams,cUe=OJ.getState,t5=qS.URL,r9=qS.TypeError,Th=qS.parseInt,MUe=Math.floor,_J=Math.pow,Sa=Ca("".charAt),ko=Ca(/./.exec),r5=Ca([].join),fUe=Ca(1 .toString),dUe=Ca([].pop),jM=Ca([].push),n9=Ca("".replace),gUe=Ca([].shift),IUe=Ca("".split),n5=Ca("".slice),Ch=Ca("".toLowerCase),pUe=Ca([].unshift),NUe="Invalid authority",i9="Invalid scheme",o4="Invalid host",wJ="Invalid port",zJ=/[a-z]/i,yUe=/[\d+-.a-z]/i,a9=/\d/,hUe=/^0x/i,DUe=/^[0-7]+$/,EUe=/^\d+$/,bJ=/^[\da-f]+$/i,jUe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,mUe=/[\0\t\n\r #/:<>?@[\\\]^|]/,TUe=/^[\u0000-\u0020]+/,CUe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,AUe=/[\t\n\r]/g,va,SUe=function(e){var t=IUe(e,"."),r,n,i,a,o,l,u;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],i=0;i<r;i++){if(a=t[i],a==="")return e;if(o=10,a.length>1&&Sa(a,0)==="0"&&(o=ko(hUe,a)?16:8,a=n5(a,o===8?1:2)),a==="")l=0;else{if(!ko(o===10?EUe:o===8?DUe:bJ,a))return e;l=Th(a,o)}jM(n,l)}for(i=0;i<r;i++)if(l=n[i],i===r-1){if(l>=_J(256,5-r))return null}else if(l>255)return null;for(u=dUe(n),i=0;i<n.length;i++)u+=n[i]*_J(256,3-i);return u},vUe=function(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,i=0,a,o,l,u,s,c,d,f=function(){return Sa(e,i)};if(f()===":"){if(Sa(e,1)!==":")return;i+=2,r++,n=r}for(;f();){if(r===8)return;if(f()===":"){if(n!==null)return;i++,r++,n=r;continue}for(a=o=0;o<4&&ko(bJ,f());)a=a*16+Th(f(),16),i++,o++;if(f()==="."){if(o===0||(i-=o,r>6))return;for(l=0;f();){if(u=null,l>0)if(f()==="."&&l<4)i++;else return;if(!ko(a9,f()))return;for(;ko(a9,f());){if(s=Th(f(),10),u===null)u=s;else{if(u===0)return;u=u*10+s}if(u>255)return;i++}t[r]=t[r]*256+u,l++,(l===2||l===4)&&r++}if(l!==4)return;break}else if(f()===":"){if(i++,!f())return}else if(f())return;t[r++]=a}if(n!==null)for(c=r-n,r=7;r!==0&&c>0;)d=t[r],t[r--]=t[n+c-1],t[n+--c]=d;else if(r!==8)return;return t},xUe=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)e[a]!==0?(i>r&&(t=n,r=i),n=null,i=0):(n===null&&(n=a),++i);return i>r?n:t},i5=function(e){var t,r,n,i;if(typeof e=="number"){for(t=[],r=0;r<4;r++)pUe(t,e%256),e=MUe(e/256);return r5(t,".")}if(typeof e=="object"){for(t="",n=xUe(e),r=0;r<8;r++)i&&e[r]===0||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=fUe(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ah={},kJ=t9({},Ah,{" ":1,'"':1,"<":1,">":1,"`":1}),RJ=t9({},kJ,{"#":1,"?":1,"{":1,"}":1}),o9=t9({},RJ,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),nc=function(e,t){var r=iUe(e,0);return r>32&&r<127&&!e9(t,e)?e:encodeURIComponent(e)},Sh={ftp:21,file:null,http:80,https:443,ws:80,wss:443},a5=function(e,t){var r;return e.length===2&&ko(zJ,Sa(e,0))&&((r=Sa(e,1))===":"||!t&&r==="|")},PJ=function(e){var t;return e.length>1&&a5(n5(e,0,2))&&(e.length===2||(t=Sa(e,2))==="/"||t==="\\"||t==="?"||t==="#")},OUe=function(e){return e==="."||Ch(e)==="%2e"},LUe=function(e){return e=Ch(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},l9={},$J={},u9={},UJ={},HJ={},s9={},VJ={},YJ={},vh={},xh={},c9={},M9={},f9={},d9={},QJ={},g9={},mM={},Sl={},FJ={},l4={},_u={},I9=function(e,t,r){var n=Lu(e),i,a,o;if(t){if(a=this.parse(n),a)throw new r9(a);this.searchParams=null}else{if(r!==void 0&&(i=new I9(r,!0)),a=this.parse(n,null,i),a)throw new r9(a);o=cUe(new sUe),o.bindURL(this),this.searchParams=o}};I9.prototype={type:"URL",parse:function(e,t,r){var n=this,i=t||l9,a=0,o="",l=!1,u=!1,s=!1,c,d,f,g;for(e=Lu(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=n9(e,TUe,""),e=n9(e,CUe,"$1")),e=n9(e,AUe,""),c=EM(e);a<=c.length;){switch(d=c[a],i){case l9:if(d&&ko(zJ,d))o+=Ch(d),i=$J;else{if(t)return i9;i=u9;continue}break;case $J:if(d&&(ko(yUe,d)||d==="+"||d==="-"||d==="."))o+=Ch(d);else if(d===":"){if(t&&(n.isSpecial()!==e9(Sh,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&Sh[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?i=d9:n.isSpecial()&&r&&r.scheme===n.scheme?i=UJ:n.isSpecial()?i=YJ:c[a+1]==="/"?(i=HJ,a++):(n.cannotBeABaseURL=!0,jM(n.path,""),i=FJ)}else{if(t)return i9;o="",i=u9,a=0;continue}break;case u9:if(!r||r.cannotBeABaseURL&&d!=="#")return i9;if(r.cannotBeABaseURL&&d==="#"){n.scheme=r.scheme,n.path=bo(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,i=_u;break}i=r.scheme==="file"?d9:s9;continue;case UJ:if(d==="/"&&c[a+1]==="/")i=vh,a++;else{i=s9;continue}break;case HJ:if(d==="/"){i=xh;break}else{i=Sl;continue}case s9:if(n.scheme=r.scheme,d===va)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=bo(r.path),n.query=r.query;else if(d==="/"||d==="\\"&&n.isSpecial())i=VJ;else if(d==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=bo(r.path),n.query="",i=l4;else if(d==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=bo(r.path),n.query=r.query,n.fragment="",i=_u;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=bo(r.path),n.path.length--,i=Sl;continue}break;case VJ:if(n.isSpecial()&&(d==="/"||d==="\\"))i=vh;else if(d==="/")i=xh;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,i=Sl;continue}break;case YJ:if(i=vh,d!=="/"||Sa(o,a+1)!=="/")continue;a++;break;case vh:if(d!=="/"&&d!=="\\"){i=xh;continue}break;case xh:if(d==="@"){l&&(o="%40"+o),l=!0,f=EM(o);for(var I=0;I<f.length;I++){var p=f[I];if(p===":"&&!s){s=!0;continue}var j=nc(p,o9);s?n.password+=j:n.username+=j}o=""}else if(d===va||d==="/"||d==="?"||d==="#"||d==="\\"&&n.isSpecial()){if(l&&o==="")return NUe;a-=EM(o).length+1,o="",i=c9}else o+=d;break;case c9:case M9:if(t&&n.scheme==="file"){i=g9;continue}else if(d===":"&&!u){if(o==="")return o4;if(g=n.parseHost(o),g)return g;if(o="",i=f9,t===M9)return}else if(d===va||d==="/"||d==="?"||d==="#"||d==="\\"&&n.isSpecial()){if(n.isSpecial()&&o==="")return o4;if(t&&o===""&&(n.includesCredentials()||n.port!==null))return;if(g=n.parseHost(o),g)return g;if(o="",i=mM,t)return;continue}else d==="["?u=!0:d==="]"&&(u=!1),o+=d;break;case f9:if(ko(a9,d))o+=d;else if(d===va||d==="/"||d==="?"||d==="#"||d==="\\"&&n.isSpecial()||t){if(o!==""){var D=Th(o,10);if(D>65535)return wJ;n.port=n.isSpecial()&&D===Sh[n.scheme]?null:D,o=""}if(t)return;i=mM;continue}else return wJ;break;case d9:if(n.scheme="file",d==="/"||d==="\\")i=QJ;else if(r&&r.scheme==="file")switch(d){case va:n.host=r.host,n.path=bo(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=bo(r.path),n.query="",i=l4;break;case"#":n.host=r.host,n.path=bo(r.path),n.query=r.query,n.fragment="",i=_u;break;default:PJ(r5(bo(c,a),""))||(n.host=r.host,n.path=bo(r.path),n.shortenPath()),i=Sl;continue}else{i=Sl;continue}break;case QJ:if(d==="/"||d==="\\"){i=g9;break}r&&r.scheme==="file"&&!PJ(r5(bo(c,a),""))&&(a5(r.path[0],!0)?jM(n.path,r.path[0]):n.host=r.host),i=Sl;continue;case g9:if(d===va||d==="/"||d==="\\"||d==="?"||d==="#"){if(!t&&a5(o))i=Sl;else if(o===""){if(n.host="",t)return;i=mM}else{if(g=n.parseHost(o),g)return g;if(n.host==="localhost"&&(n.host=""),t)return;o="",i=mM}continue}else o+=d;break;case mM:if(n.isSpecial()){if(i=Sl,d!=="/"&&d!=="\\")continue}else if(!t&&d==="?")n.query="",i=l4;else if(!t&&d==="#")n.fragment="",i=_u;else if(d!==va&&(i=Sl,d!=="/"))continue;break;case Sl:if(d===va||d==="/"||d==="\\"&&n.isSpecial()||!t&&(d==="?"||d==="#")){if(LUe(o)?(n.shortenPath(),d!=="/"&&!(d==="\\"&&n.isSpecial())&&jM(n.path,"")):OUe(o)?d!=="/"&&!(d==="\\"&&n.isSpecial())&&jM(n.path,""):(n.scheme==="file"&&!n.path.length&&a5(o)&&(n.host&&(n.host=""),o=Sa(o,0)+":"),jM(n.path,o)),o="",n.scheme==="file"&&(d===va||d==="?"||d==="#"))for(;n.path.length>1&&n.path[0]==="";)gUe(n.path);d==="?"?(n.query="",i=l4):d==="#"&&(n.fragment="",i=_u)}else o+=nc(d,RJ);break;case FJ:d==="?"?(n.query="",i=l4):d==="#"?(n.fragment="",i=_u):d!==va&&(n.path[0]+=nc(d,Ah));break;case l4:!t&&d==="#"?(n.fragment="",i=_u):d!==va&&(d==="'"&&n.isSpecial()?n.query+="%27":d==="#"?n.query+="%23":n.query+=nc(d,Ah));break;case _u:d!==va&&(n.fragment+=nc(d,kJ));break}a++}},parseHost:function(e){var t,r,n;if(Sa(e,0)==="["){if(Sa(e,e.length-1)!=="]"||(t=vUe(n5(e,1,-1)),!t))return o4;this.host=t}else if(this.isSpecial()){if(e=aUe(e),ko(jUe,e)||(t=SUe(e),t===null))return o4;this.host=t}else{if(ko(mUe,e))return o4;for(t="",r=EM(e),n=0;n<r.length;n++)t+=nc(r[n],Ah);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return e9(Sh,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!=="file"||t!==1||!a5(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,l=e.query,u=e.fragment,s=t+":";return i!==null?(s+="//",e.includesCredentials()&&(s+=r+(n?":"+n:"")+"@"),s+=i5(i),a!==null&&(s+=":"+a)):t==="file"&&(s+="//"),s+=e.cannotBeABaseURL?o[0]:o.length?"/"+r5(o,"/"):"",l!==null&&(s+="?"+l),u!==null&&(s+="#"+u),s},setHref:function(e){var t=this.parse(e);if(t)throw new r9(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new TM(e.path[0]).origin}catch(r){return"null"}return e==="file"||!this.isSpecial()?"null":e+"://"+i5(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Lu(e)+":",l9)},getUsername:function(){return this.username},setUsername:function(e){var t=EM(Lu(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=nc(t[r],o9)}},getPassword:function(){return this.password},setPassword:function(e){var t=EM(Lu(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=nc(t[r],o9)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?i5(e):i5(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,c9)},getHostname:function(){var e=this.host;return e===null?"":i5(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,M9)},getPort:function(){var e=this.port;return e===null?"":Lu(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=Lu(e),e===""?this.port=null:this.parse(e,f9))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+r5(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,mM))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=Lu(e),e===""?this.query=null:(Sa(e,0)==="?"&&(e=n5(e,1)),this.query="",this.parse(e,l4)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){if(e=Lu(e),e===""){this.fragment=null;return}Sa(e,0)==="#"&&(e=n5(e,1)),this.fragment="",this.parse(e,_u)},update:function(){this.query=this.searchParams.serialize()||null}};var TM=function(t){var r=nUe(this,Un),n=lUe(arguments.length,1)>1?arguments[1]:void 0,i=uUe(r,new I9(t,!1,n));XS||(r.href=i.serialize(),r.origin=i.getOrigin(),r.protocol=i.getProtocol(),r.username=i.getUsername(),r.password=i.getPassword(),r.host=i.getHost(),r.hostname=i.getHostname(),r.port=i.getPort(),r.pathname=i.getPathname(),r.search=i.getSearch(),r.searchParams=i.getSearchParams(),r.hash=i.getHash())},Un=TM.prototype,xa=function(e,t){return{get:function(){return mh(this)[e]()},set:t&&function(r){return mh(this)[t](r)},configurable:!0,enumerable:!0}};if(XS&&(Aa(Un,"href",xa("serialize","setHref")),Aa(Un,"origin",xa("getOrigin")),Aa(Un,"protocol",xa("getProtocol","setProtocol")),Aa(Un,"username",xa("getUsername","setUsername")),Aa(Un,"password",xa("getPassword","setPassword")),Aa(Un,"host",xa("getHost","setHost")),Aa(Un,"hostname",xa("getHostname","setHostname")),Aa(Un,"port",xa("getPort","setPort")),Aa(Un,"pathname",xa("getPathname","setPathname")),Aa(Un,"search",xa("getSearch","setSearch")),Aa(Un,"searchParams",xa("getSearchParams")),Aa(Un,"hash",xa("getHash","setHash"))),jh(Un,"toJSON",function(){return mh(this).serialize()},{enumerable:!0}),jh(Un,"toString",function(){return mh(this).serialize()},{enumerable:!0}),t5){var BJ=t5.createObjectURL,ZJ=t5.revokeObjectURL;BJ&&jh(TM,"createObjectURL",xJ(BJ,t5)),ZJ&&jh(TM,"revokeObjectURL",xJ(ZJ,t5))}oUe(TM,"URL"),tUe({global:!0,constructor:!0,forced:!rUe,sham:!XS},{URL:TM});var _Ue=De,wUe=Ft;_Ue({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return wUe(URL.prototype.toString,this)}});var zUe=Cr,Oh=_e,GJ=ln,bUe=x2,WJ=URLSearchParams,Lh=WJ.prototype,kUe=Oh(Lh.append),KJ=Oh(Lh.delete),RUe=Oh(Lh.forEach),PUe=Oh([].push),p9=new WJ("a=1&a=2&b=3");p9.delete("a",1),p9.delete("b",void 0),p9+""!="a=2"&&zUe(Lh,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return KJ(this,e);var n=[];RUe(this,function(d,f){PUe(n,{key:f,value:d})}),bUe(t,1);for(var i=GJ(e),a=GJ(r),o=0,l=0,u=!1,s=n.length,c;o<s;)c=n[o++],u||c.key===i?(u=!0,KJ(this,c.key)):l++;for(;l<s;)c=n[l++],c.key===i&&c.value===a||kUe(this,c.key,c.value)},{enumerable:!0,unsafe:!0});var $Ue=Cr,JJ=_e,UUe=ln,HUe=x2,XJ=URLSearchParams,N9=XJ.prototype,VUe=JJ(N9.getAll),YUe=JJ(N9.has),qJ=new XJ("a=1");(qJ.has("a",2)||!qJ.has("a",void 0))&&$Ue(N9,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return YUe(this,t);var i=VUe(this,t);HUe(r,1);for(var a=UUe(n),o=0;o<i.length;)if(i[o++]===a)return!0;return!1},{enumerable:!0,unsafe:!0});var QUe=Xe,FUe=_e,BUe=pu,y9=URLSearchParams.prototype,ZUe=FUe(y9.forEach);QUe&&!("size"in y9)&&BUe(y9,"size",{get:function(){var t=0;return ZUe(this,function(){t++}),t},configurable:!0,enumerable:!0});function o5(e){"@babel/helpers - typeof";return o5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o5(e)}function GUe(e,t){return XUe(e)||JUe(e,t)||KUe(e,t)||WUe()}function WUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KUe(e,t){if(e){if(typeof e=="string")return eX(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eX(e,t):void 0}}function eX(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function JUe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function XUe(e){if(Array.isArray(e))return e}function qUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tX(n.key),n)}}function tHe(e,t,r){return t&&eHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function l5(e,t,r){return(t=tX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tX(e){var t=rHe(e,"string");return o5(t)=="symbol"?t:t+""}function rHe(e,t){if(o5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(o5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nHe=function(){function e(){qUe(this,e),l5(this,"_levels",[]),l5(this,"_transports",[]),l5(this,"_logs",[]),l5(this,"_prevTime",0),l5(this,"logListener",null);try{if(!window.localStorage)return;var t=window.localStorage.getItem("logger");if(!t)return;var r=t.split(">"),n=GUe(r,2),i=n[0],a=n[1];this._levels=i.split(","),a&&(this._transports=a.split(","))}catch(o){return}}return tHe(e,[{key:"create",value:function(r,n){var i=this;return function(a){if(!(!i._levels.includes(r)&&!i._levels.includes("all")&&!i.logListener)){var o=Date.now(),l=0;if(i._prevTime&&(l=o-i._prevTime),i._prevTime=o,i.logListener&&i.logListener("".concat(r,": ").concat(a," +").concat(l,"ms")),i._transports.includes("console")){var u=(n==null?void 0:n.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(u,";"),r,"",a,"color: ".concat(u,";"),l)}i._transports.includes("file")&&i._logs.push("".concat(r,": ").concat(a," +").concat(l,"ms"))}}}},{key:"saveLogs",value:function(){if(this._logs.length){var r=this._logs.join(`
|
|
50
|
-
`),n=new Blob([r],{type:"text/plain"}),i=window.URL.createObjectURL(n),a=document.createElement("a");a.download="log.txt",a.href=i,a.click(),window.URL.revokeObjectURL(i),this._logs=[]}}}])}();const h9=new nHe;function u4(e){"@babel/helpers - typeof";return u4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u4(e)}function Xt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Xt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&u4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(u4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function rX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function wu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){rX(a,n,i,o,l,"next",u)}function l(u){rX(a,n,i,o,l,"throw",u)}o(void 0)})}}function nX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function D9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nX(Object(r),!0).forEach(function(n){E9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nX(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E9(e,t,r){return(t=iHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iHe(e){var t=aHe(e,"string");return u4(t)=="symbol"?t:t+""}function aHe(e,t){if(u4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(u4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oHe=h9.create("store_idv"),iX={isProcessing:!1,proccessingTransformedTemplate:null,nonce:void 0,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,platformConfig:null,workflow:null,externalModulesNames:[],externalModules:[],ignoringSteps:[],workflowSessionCompletion:function(){},listener:function(){}},lHe=function(t,r){return D9(D9({},iX),{},{_connectToIdv:function(){return wu(Xt().mark(function i(){var a,o;return Xt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(a={},r().isRunningWasmService()){u.next=6;break}return u.next=4,r().prepareWasmService();case 4:o=u.sent,(o==null?void 0:o.code)!==0&&(a={error:_d.CONNECTION_ISSUE});case 6:return u.abrupt("return",a);case 7:case"end":return u.stop()}},i)}))()},getWorkflows:function(i){return wu(Xt().mark(function a(){var o,l;return Xt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,r()._connectToIdv();case 2:if(o=s.sent,!o.error){s.next=5;break}return s.abrupt("return",o);case 5:return s.next=7,r().getWorkflowsWasmService(i);case 7:if(l=s.sent,!(l!=null&&l.items)){s.next=10;break}return s.abrupt("return",l.items);case 10:return s.abrupt("return",{error:_d.WORKFLOW_ISSUE});case 11:case"end":return s.stop()}},a)}))()},setWorkflowSessionCompletion:function(i){t(function(){return{workflowSessionCompletion:i}})},setErrorScreenWasmService:function(i){var a=i.type,o=i.details,l=new fh(a,o);r().setIsProcessing(!1),r().onChangeScreen(null,l)},checkExternalModulesAndSetToStore:function(){var n=wu(Xt().mark(function a(){var o,l;return Xt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return o=r().externalModulesNames,s.prev=1,s.next=4,uHe(o);case 4:return l=s.sent,t(function(){return{externalModules:l}}),s.abrupt("return",!0);case 9:return s.prev=9,s.t0=s.catch(1),r().shutDownWasmService(),r().resetProps(),s.abrupt("return",!1);case 14:case"end":return s.stop()}},a,null,[[1,9]])}));function i(){return n.apply(this,arguments)}return i}(),preparareWorkflowAndPrepareUi:function(){var n=wu(Xt().mark(function a(o){var l,u,s,c,d,f;return Xt().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return r().setWorkflowId(o),I.next=3,r()._connectToIdv();case 3:if(l=I.sent,!l.error){I.next=6;break}return I.abrupt("return",l);case 6:return I.next=8,r().getCurrentWorkflowWasmService(o);case 8:if(u=I.sent,u){I.next=11;break}return I.abrupt("return",{error:_d.WORKFLOW_ISSUE});case 11:if(s=ph(u),c=r().externalModules,d=s.steps,f=OPe(c,d),f){I.next=17;break}return I.abrupt("return",{error:_d.WORKFLOW_ISSUE});case 17:return r().setWorkflow(s),r().setIgnoringSteps(s),r().setLayout(s.client.layout),r().setProcessingTemplate(s.client.steps),I.abrupt("return",{workflow:s});case 22:case"end":return I.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}(),startNewSession:function(){var n=wu(Xt().mark(function a(){var o,l,u;return Xt().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(r().isRunningWasmService()){c.next=2;break}return c.abrupt("return",{error:Ou.NOT_PREPARED});case 2:if(!r().currentScreenConfig){c.next=4;break}return c.abrupt("return",{error:Ou.ALREADY_STARTED});case 4:if(r().setIsProcessing(!0),o=r().wasmService,o){c.next=8;break}return c.abrupt("return",{error:Ou.INTERNAL_ISSUE});case 8:return c.next=10,r().startNewSessionWasmService();case 10:if(l=c.sent,l){c.next=13;break}return c.abrupt("return",{error:Ou.SESSION_ISSUE});case 13:return u=l.currentStep,r().setIsProcessing(!1),r().setCurrentStepId(u),c.abrupt("return",{});case 17:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),playWorkflow:function(i){var a=r().currentStepId;r().setWorkflowSessionCompletion(i),a?r().onChangeScreen(a):i({error:Ou.STEP_ISSUE})},setProcessingTemplate:function(i){var a=ph(i.find(function(o){return o.templateId===UA}));a.templateLayout=FK(a.templateLayout,r().layout),t({proccessingTransformedTemplate:a})},setIsProcessing:function(i){t({isProcessing:i})},pushStepWaitNextStepAndSet:function(){var n=wu(Xt().mark(function a(o,l){var u,s,c,d,f,g,I,p,j,D,h,E;return Xt().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return r().setIsProcessing(!0),u=function(){var w=wu(Xt().mark(function z(){var R;return Xt().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,r().pushDataWasmService(o,l);case 2:return R=P.sent,P.abrupt("return",R.connectionError?null:R);case 4:case"end":return P.stop()}},z)}));return function(){return w.apply(this,arguments)}}(),s=function(){var z="Idv Push Data Timeout",R=new fh("ERROR",z);r().onChangeScreen(null,R),r().setIsProcessing(!1),r().workflowSessionCompletion({error:Ou.INTERNAL_ISSUE})},_.next=5,BK(u,s);case 5:return c=r().currentStepId,d=r().ignoringSteps,f=function(){var w=wu(Xt().mark(function z(){var R,$,P,Q,le;return Xt().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.next=2,(R=r().wasmService)===null||R===void 0?void 0:R.getSessionState();case 2:return $=ee.sent,P=$==null?void 0:$.currentStep,Q=$.isProcessingFiles,le=d.includes(P),oHe(JSON.stringify({nextStep:P,isIgnoringStep:le,isProcessingFiles:Q})),ee.abrupt("return",P!==c&&!Q&&!le&&!($!=null&&$.connectionError)?P:null);case 8:case"end":return ee.stop()}},z)}));return function(){return w.apply(this,arguments)}}(),g=function(){var z="Idv Get Session State Timeout",R=new fh("ERROR",z);r().onChangeScreen(null,R),r().setIsProcessing(!1),r().workflowSessionCompletion({error:Ou.INTERNAL_ISSUE})},_.next=11,BK(f,g);case 11:if(I=_.sent,p=r().workflow,!(!p||!I||I===c)){_.next=20;break}return j="Something went wrong",D=new fh("ERROR",j),r().onChangeScreen(null,D),r().setIsProcessing(!1),r().workflowSessionCompletion({error:Ou.INTERNAL_ISSUE}),_.abrupt("return");case 20:if(h=p.steps.find(function(w){return w.id===I}),!(h!=null&&h.final)){_.next=26;break}return E=function(z){return z.id==="ABORT"?Gy.CANCELLED:z.id==="ERROR"?Gy.ERROR:Gy.FINISHED},r().workflowSessionCompletion({results:{status:E(h),results:h}}),r().resetSession(),_.abrupt("return");case 26:r().setCurrentStepId(I),r().onChangeScreen(I),r().setIsProcessing(!1);case 29:case"end":return _.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),setWorkflow:function(i){t(function(){return{workflow:i}})},setLayout:function(i){t(function(){return{layout:i}})},setCurrentStepId:function(i){t(function(){return{currentStepId:i}})},setNonce:function(i){console.log("setNonce function was not set",i)},setWorkflowId:function(i){t(function(){return{workflowId:i}})},setIgnoringSteps:function(i){var a=i.steps.reduce(function(o,l){return l.type==="PROCESSING"&&o.push(l.id),o},[]);t(function(){return{ignoringSteps:a}})},onChangeScreen:function(i,a){var o;if(!i&&!a)return t(function(){return{currentScreenConfig:null}});if(a)return t(function(){return{currentScreenConfig:a}});var l=r().workflow;if(!l)return t(function(){return{currentScreenConfig:null}});var u=null;u=ph(i===UA?l.client.steps.find(function(s){return s.templateId===UA}):(o=l.steps.find(function(s){return s.name===i}))===null||o===void 0?void 0:o.client),u&&u.templateLayout&&(u.templateLayout=FK(u.templateLayout,r().layout)),t(function(){return{currentScreenConfig:u}})},resetProps:function(){return t(function(){return D9({},iX)})},resetSession:function(){return t(function(){return{isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,ignoringSteps:[]}})}})};function uHe(e){return j9.apply(this,arguments)}function j9(){return j9=wu(Xt().mark(function e(t){var r,n,i,a,o,l;return Xt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=[{id:e4.getIdentifier(),supportedTemplates:e4.getSupportedTemplates(),component:e4}],n=E9(E9({},"LIVENESS",function(){return Promise.resolve().then(()=>Oxt)}),"DOC_READER",function(){return Promise.resolve().then(()=>rjr)}),i=Xt().mark(function c(){var d,f,g;return Xt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(d=o[a],f=function(){return n[d]()},!f){p.next=7;break}return p.next=5,f();case 5:g=p.sent,r.push({id:g.default.getIdentifier(),supportedTemplates:g.default.getSupportedTemplates(),component:g.default});case 7:case"end":return p.stop()}},c)}),a=0,o=t;case 4:if(!(a<o.length)){s.next=9;break}return s.delegateYield(i(),"t0",6);case 6:a++,s.next=4;break;case 9:return l=r.filter(function(c){return c!==null}),s.abrupt("return",l);case 11:case"end":return s.stop()}},e)})),j9.apply(this,arguments)}function s4(e){"@babel/helpers - typeof";return s4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s4(e)}function ct(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ct=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&s4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(s4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function aX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function Fi(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){aX(a,n,i,o,l,"next",u)}function l(u){aX(a,n,i,o,l,"throw",u)}o(void 0)})}}function sHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oX(n.key),n)}}function MHe(e,t,r){return t&&cHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CM(e,t,r){return(t=oX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oX(e){var t=fHe(e,"string");return s4(t)=="symbol"?t:t+""}function fHe(e,t){if(s4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(s4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ro=h9.create("wasm_idv"),dHe=function(){function e(t){sHe(this,e),CM(this,"_worker",null),CM(this,"_initialized",!1),CM(this,"_connected",!1),CM(this,"_prepared",!1),CM(this,"_serviceRunning",!1),CM(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return MHe(e,[{key:"init",value:function(){var t=Fi(ct().mark(function n(){var i,a,o,l;return ct().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=1,s.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-18a805482//PlatformAdaptor.worker.js");case 4:return i=s.sent,s.next=7,i.blob();case 7:a=s.sent,o=URL.createObjectURL(a),this._worker=new Worker(o),s.next=15;break;case 12:s.prev=12,s.t0=s.catch(1),Ro("Creating worker error: ".concat(JSON.stringify(s.t0)));case 15:s.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){s.next=20;break}return s.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),s.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-18a805482/",preMain:!0});case 23:return l=s.sent,s.abrupt("return",l);case 25:case"end":return s.stop()}},n,this,[[1,12]])}));function r(){return t.apply(this,arguments)}return r}()},{key:"prepareAndConnect",value:function(){var t=Fi(ct().mark(function n(i){var a;return ct().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:"NEW_TEST_DEVICE_0111",serial:"1111111222211",macAddress:"00:00:00:00:00:00",deviceType:"TEST",heartbeatCadence:2},host:i.host,httpRetryCount:i.httpRetryCount||0,httpTimeoutMs:i.httpTimeoutMs||0,isSecure:!0,password:i.password,port:i.port?i.port:0,schema:i.schema?i.schema:"basic",userName:i.userName},preMain:!0});case 2:return a=l.sent,Ro("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(a))),a.code===0&&(this._prepared=!0,this._serviceRunning=!0),l.abrupt("return",a);case 6:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startSession",value:function(){var t=Fi(ct().mark(function n(i){var a,o;return ct().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a={metadata:{author:"Web Author",title:"Web Title",year:2024},workflowId:i},u.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:a,preMain:!0});case 3:return o=u.sent,Ro("Start session connect result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"listWorkflows",value:function(){var t=Fi(ct().mark(function n(){var i,a,o=arguments;return ct().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{limit:0,skip:0},u.next=3,this.sendMessage({workflowsParams:i,target:"custom",method:"list_workflows",preMain:!0});case 3:return a=u.sent,Ro("listWorkflows result: ".concat(JSON.stringify(a))),u.abrupt("return",a);case 6:case"end":return u.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getHealth",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"abandonSession",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getWorkflow",value:function(){var t=Fi(ct().mark(function n(i){var a;return ct().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({workflowIdParams:{workflowId:i},target:"custom",method:"get_workflow",preMain:!0});case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"pushData",value:function(){var t=Fi(ct().mark(function n(i,a){var o;return ct().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return Ro("Push data: ".concat(i," , ").concat(JSON.stringify(a))),u.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:a,stage:0,step:i},preMain:!0});case 3:return o=u.sent,Ro("Push data result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"getSessionState",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"waitForSessionUpdate",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return i=o.sent,Ro("Wait for session update result: ".concat(JSON.stringify(i))),o.abrupt("return",i);case 5:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"disconnect",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"sendMessage",value:function(){var t=Fi(ct().mark(function n(i){var a=this;return ct().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",new Promise(function(u,s){if(!a._worker)return s();a._worker.onmessage=function(c){var d=c.data.target;if(d==="stdout"){Ro(JSON.stringify(c.data.content));return}if(d==="custom"){var f=c.data,g=f.method,I=f.data;Ro("::: custom method, ".concat(g,", ").concat(JSON.stringify(I))),g==="onRuntimeInitialized"&&(a._initialized=!0),g==="connect_idv"&&(a._connected=!0),u(I)}if(d==="stderr"){var p=c.data.content;Ro(JSON.stringify(p)),a._setErrorScreen&&a._setErrorScreen(p)}},a._worker.postMessage(i)}));case 1:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"shutdown",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(this._worker){o.next=2;break}return o.abrupt("return");case 2:return Ro("Shutting down wasm service"),o.next=5,this.disconnect();case 5:return i=o.sent,this._serviceRunning=!1,this._worker.terminate(),o.abrupt("return",i);case 9:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()}])}();function c4(e){"@babel/helpers - typeof";return c4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c4(e)}function Mr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Mr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&c4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(c4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function lX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function zu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){lX(a,n,i,o,l,"next",u)}function l(u){lX(a,n,i,o,l,"throw",u)}o(void 0)})}}function uX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uX(Object(r),!0).forEach(function(n){gHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uX(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gHe(e,t,r){return(t=IHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IHe(e){var t=pHe(e,"string");return c4(t)=="symbol"?t:t+""}function pHe(e,t){if(c4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(c4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sX={wasmService:null},NHe=function(t,r){return m9(m9({},sX),{},{initWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u;return Mr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=r().setErrorScreenWasmService,l=new dHe(o),u=l.init(),t({wasmService:l}),c.abrupt("return",u);case 5:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),prepareWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u;return Mr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(o=r().platformConfig,!o){c.next=6;break}return c.next=4,(l=r().wasmService)===null||l===void 0?void 0:l.prepareAndConnect(o);case 4:return u=c.sent,c.abrupt("return",u);case 6:return c.abrupt("return",null);case 7:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),shutDownWasmService:function(){var n=zu(Mr().mark(function a(){var o,l;return Mr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.shutdown();case 2:return l=s.sent,s.abrupt("return",l);case 4:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),abandonSessionWasmService:function(){var i;(i=r().wasmService)===null||i===void 0||i.abandonSession()},waitForSessionUpdateWasmService:function(){var n=zu(Mr().mark(function a(){var o,l;return Mr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.waitForSessionUpdate();case 2:return l=s.sent,s.abrupt("return",l);case 4:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),getSessionStateWasmService:function(){var n=zu(Mr().mark(function a(){var o,l;return Mr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.getSessionState();case 2:return l=s.sent,s.abrupt("return",l);case 4:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),getCurrentWorkflowWasmService:function(){var n=zu(Mr().mark(function a(o){var l,u;return Mr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(l=r().wasmService)===null||l===void 0?void 0:l.getWorkflow(o);case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}(),pushDataWasmService:function(){var n=zu(Mr().mark(function a(o,l){var u,s;return Mr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(u=r().wasmService)===null||u===void 0?void 0:u.pushData(o,l);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),getWorkflowsWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u,s=arguments;return Mr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=s.length>0&&s[0]!==void 0?s[0]:{limit:100,skip:0},d.next=3,(o=r().wasmService)===null||o===void 0?void 0:o.listWorkflows(l);case 3:if(u=d.sent,!u){d.next=6;break}return d.abrupt("return",u);case 6:return d.abrupt("return",null);case 7:case"end":return d.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),startNewSessionWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u,s,c,d;return Mr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:o=0,l=r().isRunningWasmService(),u=function(p){return new Promise(function(j){return setTimeout(j,p)})};case 3:if(!(!l&&o<30)){g.next=10;break}return o++,g.next=7,u(500);case 7:l=r().isRunningWasmService(),g.next=3;break;case 10:if(l){g.next=12;break}return g.abrupt("return",null);case 12:if(s=r().workflowId,c=null,!s){g.next=18;break}return g.next=17,(d=r().wasmService)===null||d===void 0?void 0:d.startSession(s);case 17:c=g.sent;case 18:return g.abrupt("return",c);case 19:case"end":return g.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),isRunningWasmService:function(){var i;return(i=r().wasmService)===null||i===void 0?void 0:i.isServiceRunning()},resetWasm:function(){return t(function(){return m9({},sX)})}})};function u5(e){"@babel/helpers - typeof";return u5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u5(e)}function cX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cX(Object(r),!0).forEach(function(n){yHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cX(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yHe(e,t,r){return(t=hHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hHe(e){var t=DHe(e,"string");return u5(t)=="symbol"?t:t+""}function DHe(e,t){if(u5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(u5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qt=F_e(function(){return MX(MX({},lHe.apply(void 0,arguments)),NHe.apply(void 0,arguments))}),EHe=function(t){var r=t.children;return O.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:r})},jHe=function(){var t=qt(function(g){return g.currentScreenConfig}),r=qt(function(g){return g.pushStepWaitNextStepAndSet}),n=qt(function(g){return g.proccessingTransformedTemplate}),i=qt(function(g){return g.isProcessing}),a=qt(function(g){return g.setIsProcessing}),o=qt(function(g){return g.currentStepId}),l=qt(function(g){return g.listener}),u=qt(function(g){return g.externalModules}),s=function(I,p){l({target:PA.WEB_COMPONENT,eventType:kG.MESSAGE,message:p,module:I})},c=function(I){a(I)},d=function(I){o&&(a(!1),r(o,I))},f=et.useCallback(function(){if(!t)return O.jsx(EHe,{children:"Waiting for play... or process completed"});var g=u.find(function(I){return I.supportedTemplates.includes(t.templateId)});if(g&&t)return O.jsx(g.component,{perform:d,moduleProps:t,idvEventListener:s,isProcessing:c})},[t,u]);return O.jsx(O.Fragment,{children:O.jsx(qG,{direction:$A.Ltr,children:O.jsxs(O.Fragment,{children:[i&&O.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"white",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n?O.jsx(e4,{perform:d,moduleProps:n,idvEventListener:s,isProcessing:c}):"Processing..."}),f()]})})})};function mHe(){return O.jsx(et.StrictMode,{children:O.jsx(QLe,{children:O.jsx(jHe,{})})})}const THe="*,*:before,*:after{box-sizing:border-box}ul,p,h1,h2,h3,h4{padding:0;margin:0}li{list-style:none}._window_1wpzq_16{--base-main-color: #7E57C5;--base-font-family: sans-serif;width:100%;max-width:680px;height:100%;position:relative;background:#fff;overflow:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);margin:0 auto;font-family:var(--base-font-family)}._content_1wpzq_35{overflow:auto;height:100%;display:flex;flex-direction:column}._back_1wpzq_42{position:absolute;width:24px;height:24px;top:16px;left:16px;cursor:pointer}._to-mobile_1wpzq_51{position:absolute;left:calc(50% - 12px);height:24px;width:24px;top:16px;cursor:pointer}",CHe="._error-boundary_mput0_1{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;position:absolute;width:100%;height:100%;top:0;left:0}._title_mput0_14{font-size:20px;font-weight:700;margin-bottom:10px}._subtitle_mput0_20{margin-bottom:10px}._details_mput0_24{font-weight:lighter}";function AM(e){"@babel/helpers - typeof";return AM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},AM(e)}function AHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fX(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dX(n.key),n)}}function SHe(e,t,r){return t&&fX(e.prototype,t),r&&fX(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vHe(e,t,r){return t=c5(t),xHe(e,C9()?Reflect.construct(t,[],c5(e).constructor):t.apply(e,r))}function xHe(e,t){if(t&&(AM(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OHe(e)}function OHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s5(e,t)}function T9(e){var t=typeof Map=="function"?new Map:void 0;return T9=function(n){if(n===null||!wHe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return _He(n,arguments,c5(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s5(i,n)},T9(e)}function _He(e,t,r){if(C9())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&s5(i,r.prototype),i}function C9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(C9=function(){return!!e})()}function wHe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function s5(e,t){return s5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},s5(e,t)}function c5(e){return c5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c5(e)}function A9(e,t,r){return(t=dX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dX(e){var t=zHe(e,"string");return AM(t)=="symbol"?t:t+""}function zHe(e,t){if(AM(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(AM(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bHe=[THe,CHe],kHe=[].concat(bHe).reduce(function(e,t){return e+t.toString()},""),gX=function(e){function t(){var r;return AHe(this,t),r=vHe(this,t),A9(r,"_root",wZ(r.attachShadow({mode:"open"}))),A9(r,"_mounted",!1),A9(r,"_nonce",void 0),r}return LHe(t,e),SHe(t,[{key:"setNonce",value:function(n){this._nonce=n,this.render()}},{key:"connectedCallback",value:function(){qt.setState({setNonce:this.setNonce.bind(this)}),this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(O.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[O.jsx("style",{nonce:this._nonce||void 0,children:kHe}),O.jsx(mHe,{})]}))}},{key:"disconnectedCallback",value:function(){var n=this;setTimeout(function(){n._mounted&&(n._mounted=!1,n._root.unmount())}),h9.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(T9(HTMLElement));function M4(e){"@babel/helpers - typeof";return M4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M4(e)}function Po(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Po=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&M4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(M4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function IX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function M5(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){IX(a,n,i,o,l,"next",u)}function l(u){IX(a,n,i,o,l,"throw",u)}o(void 0)})}}function RHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,UHe(n.key),n)}}function $He(e,t,r){return t&&PHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UHe(e){var t=HHe(e,"string");return M4(t)=="symbol"?t:t+""}function HHe(e,t){if(M4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(M4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var VHe=function(){function e(){RHe(this,e)}return $He(e,[{key:"initialize",value:function(){var t=M5(Po().mark(function n(i){var a,o,l,u,s,c;return Po().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!(i.connectionConfig.password&&i.connectionConfig.userName&&i.connectionConfig.host)){f.next=7;break}return i.listener&&qt.setState({listener:i.listener}),qt.setState({platformConfig:{userName:i.connectionConfig.userName,password:i.connectionConfig.password,host:i.connectionConfig.host,httpRetryCount:(a=i.connectionConfig)===null||a===void 0?void 0:a.httpRetryCount,httpTimeoutMs:(o=i.connectionConfig)===null||o===void 0?void 0:o.httpTimeoutMs,isSecure:(l=i.connectionConfig)===null||l===void 0?void 0:l.isSecure,port:(u=i.connectionConfig)===null||u===void 0?void 0:u.port,schema:(s=i.connectionConfig)===null||s===void 0?void 0:s.schema}}),f.next=5,qt.getState().initWasmService();case 5:f.next=8;break;case 7:throw new Error("Please, set client_id, client_secret, idv_base_url");case 8:return qt.setState({externalModulesNames:i.includedModules}),f.next=11,qt.getState().checkExternalModulesAndSetToStore();case 11:if(c=f.sent,!c){f.next=16;break}return f.abrupt("return",{});case 16:return f.abrupt("return",{error:"Initialized Error"});case 17:case"end":return f.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"setNonce",value:function(r){var n=qt.getState().setNonce;n(r)}},{key:"getWorkFlows",value:function(){var t=M5(Po().mark(function n(i){var a;return Po().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,qt.getState().getWorkflows(i);case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"prepareWorkflow",value:function(){var t=M5(Po().mark(function n(i){var a,o;return Po().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=i.workfowId,u.next=3,qt.getState().preparareWorkflowAndPrepareUi(a);case 3:return o=u.sent,u.abrupt("return",o);case 5:case"end":return u.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startWorkflow",value:function(){var t=M5(Po().mark(function n(){var i;return Po().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,qt.getState().startNewSession();case 2:if(i=o.sent,!i.error){o.next=5;break}return o.abrupt("return",i);case 5:return o.abrupt("return",new Promise(function(l){var u=function(c){l(c)};qt.getState().playWorkflow(u)}));case 6:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"deinitialize",value:function(){var t=M5(Po().mark(function n(){var i,a;return Po().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(i=qt.getState())===null||i===void 0?void 0:i.shutDownWasmService();case 2:(a=qt.getState())===null||a===void 0||a.resetProps();case 3:case"end":return l.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()}])}(),YHe=window.customElements.get("idv-flow");YHe||window.customElements.define("idv-flow",gX);var QHe=Object.defineProperty,FHe=Object.defineProperties,BHe=Object.getOwnPropertyDescriptors,pX=Object.getOwnPropertySymbols,ZHe=Object.prototype.hasOwnProperty,GHe=Object.prototype.propertyIsEnumerable,NX=(e,t,r)=>t in e?QHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yX=(e,t)=>{for(var r in t||(t={}))ZHe.call(t,r)&&NX(e,r,t[r]);if(pX)for(var r of pX(t))GHe.call(t,r)&&NX(e,r,t[r]);return e},WHe=(e,t)=>FHe(e,BHe(t)),Yr=(e,t,r)=>new Promise((n,i)=>{var a=u=>{try{l(r.next(u))}catch(s){i(s)}},o=u=>{try{l(r.throw(u))}catch(s){i(s)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);l((r=r.apply(e,t)).next())}),SM=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function hX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DX={exports:{}},_h={},EX={exports:{}},$e={};/**
|
|
50
|
+
`),n=new Blob([r],{type:"text/plain"}),i=window.URL.createObjectURL(n),a=document.createElement("a");a.download="log.txt",a.href=i,a.click(),window.URL.revokeObjectURL(i),this._logs=[]}}}])}();const h9=new nHe;function u4(e){"@babel/helpers - typeof";return u4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u4(e)}function Xt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Xt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&u4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(u4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function rX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function wu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){rX(a,n,i,o,l,"next",u)}function l(u){rX(a,n,i,o,l,"throw",u)}o(void 0)})}}function nX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function D9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nX(Object(r),!0).forEach(function(n){E9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nX(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E9(e,t,r){return(t=iHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iHe(e){var t=aHe(e,"string");return u4(t)=="symbol"?t:t+""}function aHe(e,t){if(u4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(u4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oHe=h9.create("store_idv"),iX={isProcessing:!1,proccessingTransformedTemplate:null,nonce:void 0,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,platformConfig:null,workflow:null,externalModulesNames:[],externalModules:[],ignoringSteps:[],workflowSessionCompletion:function(){},listener:function(){}},lHe=function(t,r){return D9(D9({},iX),{},{_connectToIdv:function(){return wu(Xt().mark(function i(){var a,o;return Xt().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(a={},r().isRunningWasmService()){u.next=6;break}return u.next=4,r().prepareWasmService();case 4:o=u.sent,(o==null?void 0:o.code)!==0&&(a={error:_d.CONNECTION_ISSUE});case 6:return u.abrupt("return",a);case 7:case"end":return u.stop()}},i)}))()},getWorkflows:function(i){return wu(Xt().mark(function a(){var o,l;return Xt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,r()._connectToIdv();case 2:if(o=s.sent,!o.error){s.next=5;break}return s.abrupt("return",o);case 5:return s.next=7,r().getWorkflowsWasmService(i);case 7:if(l=s.sent,!(l!=null&&l.items)){s.next=10;break}return s.abrupt("return",l.items);case 10:return s.abrupt("return",{error:_d.WORKFLOW_ISSUE});case 11:case"end":return s.stop()}},a)}))()},setWorkflowSessionCompletion:function(i){t(function(){return{workflowSessionCompletion:i}})},setErrorScreenWasmService:function(i){var a=i.type,o=i.details,l=new fh(a,o);r().setIsProcessing(!1),r().onChangeScreen(null,l)},checkExternalModulesAndSetToStore:function(){var n=wu(Xt().mark(function a(){var o,l;return Xt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return o=r().externalModulesNames,s.prev=1,s.next=4,uHe(o);case 4:return l=s.sent,t(function(){return{externalModules:l}}),s.abrupt("return",!0);case 9:return s.prev=9,s.t0=s.catch(1),r().shutDownWasmService(),r().resetProps(),s.abrupt("return",!1);case 14:case"end":return s.stop()}},a,null,[[1,9]])}));function i(){return n.apply(this,arguments)}return i}(),preparareWorkflowAndPrepareUi:function(){var n=wu(Xt().mark(function a(o){var l,u,s,c,d,f;return Xt().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return r().setWorkflowId(o),I.next=3,r()._connectToIdv();case 3:if(l=I.sent,!l.error){I.next=6;break}return I.abrupt("return",l);case 6:return I.next=8,r().getCurrentWorkflowWasmService(o);case 8:if(u=I.sent,u){I.next=11;break}return I.abrupt("return",{error:_d.WORKFLOW_ISSUE});case 11:if(s=ph(u),c=r().externalModules,d=s.steps,f=OPe(c,d),f){I.next=17;break}return I.abrupt("return",{error:_d.WORKFLOW_ISSUE});case 17:return r().setWorkflow(s),r().setIgnoringSteps(s),r().setLayout(s.client.layout),r().setProcessingTemplate(s.client.steps),I.abrupt("return",{workflow:s});case 22:case"end":return I.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}(),startNewSession:function(){var n=wu(Xt().mark(function a(){var o,l,u;return Xt().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(r().isRunningWasmService()){c.next=2;break}return c.abrupt("return",{error:Ou.NOT_PREPARED});case 2:if(!r().currentScreenConfig){c.next=4;break}return c.abrupt("return",{error:Ou.ALREADY_STARTED});case 4:if(r().setIsProcessing(!0),o=r().wasmService,o){c.next=8;break}return c.abrupt("return",{error:Ou.INTERNAL_ISSUE});case 8:return c.next=10,r().startNewSessionWasmService();case 10:if(l=c.sent,l){c.next=13;break}return c.abrupt("return",{error:Ou.SESSION_ISSUE});case 13:return u=l.currentStep,r().setIsProcessing(!1),r().setCurrentStepId(u),c.abrupt("return",{});case 17:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),playWorkflow:function(i){var a=r().currentStepId;r().setWorkflowSessionCompletion(i),a?r().onChangeScreen(a):i({error:Ou.STEP_ISSUE})},setProcessingTemplate:function(i){var a=ph(i.find(function(o){return o.templateId===UA}));a.templateLayout=FK(a.templateLayout,r().layout),t({proccessingTransformedTemplate:a})},setIsProcessing:function(i){t({isProcessing:i})},pushStepWaitNextStepAndSet:function(){var n=wu(Xt().mark(function a(o,l){var u,s,c,d,f,g,I,p,j,D,h,E;return Xt().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return r().setIsProcessing(!0),u=function(){var w=wu(Xt().mark(function z(){var R;return Xt().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,r().pushDataWasmService(o,l);case 2:return R=P.sent,P.abrupt("return",R.connectionError?null:R);case 4:case"end":return P.stop()}},z)}));return function(){return w.apply(this,arguments)}}(),s=function(){var z="Idv Push Data Timeout",R=new fh("ERROR",z);r().onChangeScreen(null,R),r().setIsProcessing(!1),r().workflowSessionCompletion({error:Ou.INTERNAL_ISSUE})},_.next=5,BK(u,s);case 5:return c=r().currentStepId,d=r().ignoringSteps,f=function(){var w=wu(Xt().mark(function z(){var R,$,P,Q,le;return Xt().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ee.next=2,(R=r().wasmService)===null||R===void 0?void 0:R.getSessionState();case 2:return $=ee.sent,P=$==null?void 0:$.currentStep,Q=$.isProcessingFiles,le=d.includes(P),oHe(JSON.stringify({nextStep:P,isIgnoringStep:le,isProcessingFiles:Q})),ee.abrupt("return",P!==c&&!Q&&!le&&!($!=null&&$.connectionError)?P:null);case 8:case"end":return ee.stop()}},z)}));return function(){return w.apply(this,arguments)}}(),g=function(){var z="Idv Get Session State Timeout",R=new fh("ERROR",z);r().onChangeScreen(null,R),r().setIsProcessing(!1),r().workflowSessionCompletion({error:Ou.INTERNAL_ISSUE})},_.next=11,BK(f,g);case 11:if(I=_.sent,p=r().workflow,!(!p||!I||I===c)){_.next=20;break}return j="Something went wrong",D=new fh("ERROR",j),r().onChangeScreen(null,D),r().setIsProcessing(!1),r().workflowSessionCompletion({error:Ou.INTERNAL_ISSUE}),_.abrupt("return");case 20:if(h=p.steps.find(function(w){return w.id===I}),!(h!=null&&h.final)){_.next=26;break}return E=function(z){return z.id==="ABORT"?Gy.CANCELLED:z.id==="ERROR"?Gy.ERROR:Gy.FINISHED},r().workflowSessionCompletion({results:{status:E(h),results:h}}),r().resetSession(),_.abrupt("return");case 26:r().setCurrentStepId(I),r().onChangeScreen(I),r().setIsProcessing(!1);case 29:case"end":return _.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),setWorkflow:function(i){t(function(){return{workflow:i}})},setLayout:function(i){t(function(){return{layout:i}})},setCurrentStepId:function(i){t(function(){return{currentStepId:i}})},setNonce:function(i){console.log("setNonce function was not set",i)},setWorkflowId:function(i){t(function(){return{workflowId:i}})},setIgnoringSteps:function(i){var a=i.steps.reduce(function(o,l){return l.type==="PROCESSING"&&o.push(l.id),o},[]);t(function(){return{ignoringSteps:a}})},onChangeScreen:function(i,a){var o;if(!i&&!a)return t(function(){return{currentScreenConfig:null}});if(a)return t(function(){return{currentScreenConfig:a}});var l=r().workflow;if(!l)return t(function(){return{currentScreenConfig:null}});var u=null;u=ph(i===UA?l.client.steps.find(function(s){return s.templateId===UA}):(o=l.steps.find(function(s){return s.name===i}))===null||o===void 0?void 0:o.client),u&&u.templateLayout&&(u.templateLayout=FK(u.templateLayout,r().layout)),t(function(){return{currentScreenConfig:u}})},resetProps:function(){return t(function(){return D9({},iX)})},resetSession:function(){return t(function(){return{isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,ignoringSteps:[]}})}})};function uHe(e){return j9.apply(this,arguments)}function j9(){return j9=wu(Xt().mark(function e(t){var r,n,i,a,o,l;return Xt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=[{id:e4.getIdentifier(),supportedTemplates:e4.getSupportedTemplates(),component:e4}],n=E9(E9({},"LIVENESS",function(){return Promise.resolve().then(()=>Oxt)}),"DOC_READER",function(){return Promise.resolve().then(()=>rjr)}),i=Xt().mark(function c(){var d,f,g;return Xt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(d=o[a],f=function(){return n[d]()},!f){p.next=7;break}return p.next=5,f();case 5:g=p.sent,r.push({id:g.default.getIdentifier(),supportedTemplates:g.default.getSupportedTemplates(),component:g.default});case 7:case"end":return p.stop()}},c)}),a=0,o=t;case 4:if(!(a<o.length)){s.next=9;break}return s.delegateYield(i(),"t0",6);case 6:a++,s.next=4;break;case 9:return l=r.filter(function(c){return c!==null}),s.abrupt("return",l);case 11:case"end":return s.stop()}},e)})),j9.apply(this,arguments)}function s4(e){"@babel/helpers - typeof";return s4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s4(e)}function ct(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ct=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&s4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(s4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function aX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function Fi(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){aX(a,n,i,o,l,"next",u)}function l(u){aX(a,n,i,o,l,"throw",u)}o(void 0)})}}function sHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oX(n.key),n)}}function MHe(e,t,r){return t&&cHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CM(e,t,r){return(t=oX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oX(e){var t=fHe(e,"string");return s4(t)=="symbol"?t:t+""}function fHe(e,t){if(s4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(s4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ro=h9.create("wasm_idv"),dHe=function(){function e(t){sHe(this,e),CM(this,"_worker",null),CM(this,"_initialized",!1),CM(this,"_connected",!1),CM(this,"_prepared",!1),CM(this,"_serviceRunning",!1),CM(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return MHe(e,[{key:"init",value:function(){var t=Fi(ct().mark(function n(){var i,a,o,l;return ct().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=1,s.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-2a9d1423d//PlatformAdaptor.worker.js");case 4:return i=s.sent,s.next=7,i.blob();case 7:a=s.sent,o=URL.createObjectURL(a),this._worker=new Worker(o),s.next=15;break;case 12:s.prev=12,s.t0=s.catch(1),Ro("Creating worker error: ".concat(JSON.stringify(s.t0)));case 15:s.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){s.next=20;break}return s.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),s.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/e744163-2a9d1423d/",preMain:!0});case 23:return l=s.sent,s.abrupt("return",l);case 25:case"end":return s.stop()}},n,this,[[1,12]])}));function r(){return t.apply(this,arguments)}return r}()},{key:"prepareAndConnect",value:function(){var t=Fi(ct().mark(function n(i){var a;return ct().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:"NEW_TEST_DEVICE_0111",serial:"1111111222211",macAddress:"00:00:00:00:00:00",deviceType:"TEST",heartbeatCadence:2},host:i.host,httpRetryCount:i.httpRetryCount||0,httpTimeoutMs:i.httpTimeoutMs||0,isSecure:!0,password:i.password,port:i.port?i.port:0,schema:i.schema?i.schema:"basic",userName:i.userName},preMain:!0});case 2:return a=l.sent,Ro("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(a))),a.code===0&&(this._prepared=!0,this._serviceRunning=!0),l.abrupt("return",a);case 6:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startSession",value:function(){var t=Fi(ct().mark(function n(i){var a,o;return ct().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a={metadata:{author:"Web Author",title:"Web Title",year:2024},workflowId:i},u.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:a,preMain:!0});case 3:return o=u.sent,Ro("Start session connect result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"listWorkflows",value:function(){var t=Fi(ct().mark(function n(){var i,a,o=arguments;return ct().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{limit:0,skip:0},u.next=3,this.sendMessage({workflowsParams:i,target:"custom",method:"list_workflows",preMain:!0});case 3:return a=u.sent,Ro("listWorkflows result: ".concat(JSON.stringify(a))),u.abrupt("return",a);case 6:case"end":return u.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getHealth",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"abandonSession",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"getWorkflow",value:function(){var t=Fi(ct().mark(function n(i){var a;return ct().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({workflowIdParams:{workflowId:i},target:"custom",method:"get_workflow",preMain:!0});case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n,this)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"pushData",value:function(){var t=Fi(ct().mark(function n(i,a){var o;return ct().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return Ro("Push data: ".concat(i," , ").concat(JSON.stringify(a))),u.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:a,stage:0,step:i},preMain:!0});case 3:return o=u.sent,Ro("Push data result: ".concat(JSON.stringify(o))),u.abrupt("return",o);case 6:case"end":return u.stop()}},n,this)}));function r(n,i){return t.apply(this,arguments)}return r}()},{key:"getSessionState",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"waitForSessionUpdate",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return i=o.sent,Ro("Wait for session update result: ".concat(JSON.stringify(i))),o.abrupt("return",i);case 5:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"disconnect",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return i=o.sent,o.abrupt("return",i);case 4:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()},{key:"sendMessage",value:function(){var t=Fi(ct().mark(function n(i){var a=this;return ct().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",new Promise(function(u,s){if(!a._worker)return s();a._worker.onmessage=function(c){var d=c.data.target;if(d==="stdout"){Ro(JSON.stringify(c.data.content));return}if(d==="custom"){var f=c.data,g=f.method,I=f.data;Ro("::: custom method, ".concat(g,", ").concat(JSON.stringify(I))),g==="onRuntimeInitialized"&&(a._initialized=!0),g==="connect_idv"&&(a._connected=!0),u(I)}if(d==="stderr"){var p=c.data.content;Ro(JSON.stringify(p)),a._setErrorScreen&&a._setErrorScreen(p)}},a._worker.postMessage(i)}));case 1:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"shutdown",value:function(){var t=Fi(ct().mark(function n(){var i;return ct().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(this._worker){o.next=2;break}return o.abrupt("return");case 2:return Ro("Shutting down wasm service"),o.next=5,this.disconnect();case 5:return i=o.sent,this._serviceRunning=!1,this._worker.terminate(),o.abrupt("return",i);case 9:case"end":return o.stop()}},n,this)}));function r(){return t.apply(this,arguments)}return r}()}])}();function c4(e){"@babel/helpers - typeof";return c4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c4(e)}function Mr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Mr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&c4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(c4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function lX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function zu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){lX(a,n,i,o,l,"next",u)}function l(u){lX(a,n,i,o,l,"throw",u)}o(void 0)})}}function uX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uX(Object(r),!0).forEach(function(n){gHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uX(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gHe(e,t,r){return(t=IHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IHe(e){var t=pHe(e,"string");return c4(t)=="symbol"?t:t+""}function pHe(e,t){if(c4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(c4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sX={wasmService:null},NHe=function(t,r){return m9(m9({},sX),{},{initWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u;return Mr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=r().setErrorScreenWasmService,l=new dHe(o),u=l.init(),t({wasmService:l}),c.abrupt("return",u);case 5:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),prepareWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u;return Mr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(o=r().platformConfig,!o){c.next=6;break}return c.next=4,(l=r().wasmService)===null||l===void 0?void 0:l.prepareAndConnect(o);case 4:return u=c.sent,c.abrupt("return",u);case 6:return c.abrupt("return",null);case 7:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),shutDownWasmService:function(){var n=zu(Mr().mark(function a(){var o,l;return Mr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.shutdown();case 2:return l=s.sent,s.abrupt("return",l);case 4:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),abandonSessionWasmService:function(){var i;(i=r().wasmService)===null||i===void 0||i.abandonSession()},waitForSessionUpdateWasmService:function(){var n=zu(Mr().mark(function a(){var o,l;return Mr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.waitForSessionUpdate();case 2:return l=s.sent,s.abrupt("return",l);case 4:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),getSessionStateWasmService:function(){var n=zu(Mr().mark(function a(){var o,l;return Mr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(o=r().wasmService)===null||o===void 0?void 0:o.getSessionState();case 2:return l=s.sent,s.abrupt("return",l);case 4:case"end":return s.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),getCurrentWorkflowWasmService:function(){var n=zu(Mr().mark(function a(o){var l,u;return Mr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(l=r().wasmService)===null||l===void 0?void 0:l.getWorkflow(o);case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}(),pushDataWasmService:function(){var n=zu(Mr().mark(function a(o,l){var u,s;return Mr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(u=r().wasmService)===null||u===void 0?void 0:u.pushData(o,l);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function i(a,o){return n.apply(this,arguments)}return i}(),getWorkflowsWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u,s=arguments;return Mr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=s.length>0&&s[0]!==void 0?s[0]:{limit:100,skip:0},d.next=3,(o=r().wasmService)===null||o===void 0?void 0:o.listWorkflows(l);case 3:if(u=d.sent,!u){d.next=6;break}return d.abrupt("return",u);case 6:return d.abrupt("return",null);case 7:case"end":return d.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),startNewSessionWasmService:function(){var n=zu(Mr().mark(function a(){var o,l,u,s,c,d;return Mr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:o=0,l=r().isRunningWasmService(),u=function(p){return new Promise(function(j){return setTimeout(j,p)})};case 3:if(!(!l&&o<30)){g.next=10;break}return o++,g.next=7,u(500);case 7:l=r().isRunningWasmService(),g.next=3;break;case 10:if(l){g.next=12;break}return g.abrupt("return",null);case 12:if(s=r().workflowId,c=null,!s){g.next=18;break}return g.next=17,(d=r().wasmService)===null||d===void 0?void 0:d.startSession(s);case 17:c=g.sent;case 18:return g.abrupt("return",c);case 19:case"end":return g.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}(),isRunningWasmService:function(){var i;return(i=r().wasmService)===null||i===void 0?void 0:i.isServiceRunning()},resetWasm:function(){return t(function(){return m9({},sX)})}})};function u5(e){"@babel/helpers - typeof";return u5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u5(e)}function cX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cX(Object(r),!0).forEach(function(n){yHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cX(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yHe(e,t,r){return(t=hHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hHe(e){var t=DHe(e,"string");return u5(t)=="symbol"?t:t+""}function DHe(e,t){if(u5(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(u5(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qt=F_e(function(){return MX(MX({},lHe.apply(void 0,arguments)),NHe.apply(void 0,arguments))}),EHe=function(t){var r=t.children;return O.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:r})},jHe=function(){var t=qt(function(g){return g.currentScreenConfig}),r=qt(function(g){return g.pushStepWaitNextStepAndSet}),n=qt(function(g){return g.proccessingTransformedTemplate}),i=qt(function(g){return g.isProcessing}),a=qt(function(g){return g.setIsProcessing}),o=qt(function(g){return g.currentStepId}),l=qt(function(g){return g.listener}),u=qt(function(g){return g.externalModules}),s=function(I,p){l({target:PA.WEB_COMPONENT,eventType:kG.MESSAGE,message:p,module:I})},c=function(I){a(I)},d=function(I){o&&(a(!1),r(o,I))},f=et.useCallback(function(){if(!t)return O.jsx(EHe,{children:"Waiting for play... or process completed"});var g=u.find(function(I){return I.supportedTemplates.includes(t.templateId)});if(g&&t)return O.jsx(g.component,{perform:d,moduleProps:t,idvEventListener:s,isProcessing:c})},[t,u]);return O.jsx(O.Fragment,{children:O.jsx(qG,{direction:$A.Ltr,children:O.jsxs(O.Fragment,{children:[i&&O.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"white",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n?O.jsx(e4,{perform:d,moduleProps:n,idvEventListener:s,isProcessing:c}):"Processing..."}),f()]})})})};function mHe(){return O.jsx(et.StrictMode,{children:O.jsx(QLe,{children:O.jsx(jHe,{})})})}const THe="*,*:before,*:after{box-sizing:border-box}ul,p,h1,h2,h3,h4{padding:0;margin:0}li{list-style:none}._window_1wpzq_16{--base-main-color: #7E57C5;--base-font-family: sans-serif;width:100%;max-width:680px;height:100%;position:relative;background:#fff;overflow:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);margin:0 auto;font-family:var(--base-font-family)}._content_1wpzq_35{overflow:auto;height:100%;display:flex;flex-direction:column}._back_1wpzq_42{position:absolute;width:24px;height:24px;top:16px;left:16px;cursor:pointer}._to-mobile_1wpzq_51{position:absolute;left:calc(50% - 12px);height:24px;width:24px;top:16px;cursor:pointer}",CHe="._error-boundary_mput0_1{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;position:absolute;width:100%;height:100%;top:0;left:0}._title_mput0_14{font-size:20px;font-weight:700;margin-bottom:10px}._subtitle_mput0_20{margin-bottom:10px}._details_mput0_24{font-weight:lighter}";function AM(e){"@babel/helpers - typeof";return AM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},AM(e)}function AHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fX(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dX(n.key),n)}}function SHe(e,t,r){return t&&fX(e.prototype,t),r&&fX(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vHe(e,t,r){return t=c5(t),xHe(e,C9()?Reflect.construct(t,[],c5(e).constructor):t.apply(e,r))}function xHe(e,t){if(t&&(AM(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OHe(e)}function OHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s5(e,t)}function T9(e){var t=typeof Map=="function"?new Map:void 0;return T9=function(n){if(n===null||!wHe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return _He(n,arguments,c5(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s5(i,n)},T9(e)}function _He(e,t,r){if(C9())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&s5(i,r.prototype),i}function C9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(C9=function(){return!!e})()}function wHe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function s5(e,t){return s5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},s5(e,t)}function c5(e){return c5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c5(e)}function A9(e,t,r){return(t=dX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dX(e){var t=zHe(e,"string");return AM(t)=="symbol"?t:t+""}function zHe(e,t){if(AM(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(AM(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bHe=[THe,CHe],kHe=[].concat(bHe).reduce(function(e,t){return e+t.toString()},""),gX=function(e){function t(){var r;return AHe(this,t),r=vHe(this,t),A9(r,"_root",wZ(r.attachShadow({mode:"open"}))),A9(r,"_mounted",!1),A9(r,"_nonce",void 0),r}return LHe(t,e),SHe(t,[{key:"setNonce",value:function(n){this._nonce=n,this.render()}},{key:"connectedCallback",value:function(){qt.setState({setNonce:this.setNonce.bind(this)}),this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(O.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[O.jsx("style",{nonce:this._nonce||void 0,children:kHe}),O.jsx(mHe,{})]}))}},{key:"disconnectedCallback",value:function(){var n=this;setTimeout(function(){n._mounted&&(n._mounted=!1,n._root.unmount())}),h9.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(T9(HTMLElement));function M4(e){"@babel/helpers - typeof";return M4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M4(e)}function Po(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Po=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(v,C,m){v[C]=m.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(v,C,m){return Object.defineProperty(v,C,{value:m,enumerable:!0,configurable:!0,writable:!0}),v[C]}try{s({},"")}catch(v){s=function(m,x,L){return m[x]=L}}function c(v,C,m,x){var L=C&&C.prototype instanceof D?C:D,b=Object.create(L.prototype),H=new ee(x||[]);return i(b,"_invoke",{value:P(v,m,H)}),b}function d(v,C,m){try{return{type:"normal",arg:v.call(C,m)}}catch(x){return{type:"throw",arg:x}}}t.wrap=c;var f="suspendedStart",g="suspendedYield",I="executing",p="completed",j={};function D(){}function h(){}function E(){}var T={};s(T,o,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(he([])));w&&w!==r&&n.call(w,o)&&(T=w);var z=E.prototype=D.prototype=Object.create(T);function R(v){["next","throw","return"].forEach(function(C){s(v,C,function(m){return this._invoke(C,m)})})}function $(v,C){function m(L,b,H,F){var Z=d(v[L],v,b);if(Z.type!=="throw"){var ce=Z.arg,oe=ce.value;return oe&&M4(oe)=="object"&&n.call(oe,"__await")?C.resolve(oe.__await).then(function(ue){m("next",ue,H,F)},function(ue){m("throw",ue,H,F)}):C.resolve(oe).then(function(ue){ce.value=ue,H(ce)},function(ue){return m("throw",ue,H,F)})}F(Z.arg)}var x;i(this,"_invoke",{value:function(b,H){function F(){return new C(function(Z,ce){m(b,H,Z,ce)})}return x=x?x.then(F,F):F()}})}function P(v,C,m){var x=f;return function(L,b){if(x===I)throw Error("Generator is already running");if(x===p){if(L==="throw")throw b;return{value:e,done:!0}}for(m.method=L,m.arg=b;;){var H=m.delegate;if(H){var F=Q(H,m);if(F){if(F===j)continue;return F}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(x===f)throw x=p,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);x=I;var Z=d(v,C,m);if(Z.type==="normal"){if(x=m.done?p:g,Z.arg===j)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(x=p,m.method="throw",m.arg=Z.arg)}}}function Q(v,C){var m=C.method,x=v.iterator[m];if(x===e)return C.delegate=null,m==="throw"&&v.iterator.return&&(C.method="return",C.arg=e,Q(v,C),C.method==="throw")||m!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+m+"' method")),j;var L=d(x,v.iterator,C.arg);if(L.type==="throw")return C.method="throw",C.arg=L.arg,C.delegate=null,j;var b=L.arg;return b?b.done?(C[v.resultName]=b.value,C.next=v.nextLoc,C.method!=="return"&&(C.method="next",C.arg=e),C.delegate=null,j):b:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,j)}function le(v){var C={tryLoc:v[0]};1 in v&&(C.catchLoc=v[1]),2 in v&&(C.finallyLoc=v[2],C.afterLoc=v[3]),this.tryEntries.push(C)}function K(v){var C=v.completion||{};C.type="normal",delete C.arg,v.completion=C}function ee(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(le,this),this.reset(!0)}function he(v){if(v||v===""){var C=v[o];if(C)return C.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var m=-1,x=function L(){for(;++m<v.length;)if(n.call(v,m))return L.value=v[m],L.done=!1,L;return L.value=e,L.done=!0,L};return x.next=x}}throw new TypeError(M4(v)+" is not iterable")}return h.prototype=E,i(z,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:h,configurable:!0}),h.displayName=s(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(v){var C=typeof v=="function"&&v.constructor;return!!C&&(C===h||(C.displayName||C.name)==="GeneratorFunction")},t.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,E):(v.__proto__=E,s(v,u,"GeneratorFunction")),v.prototype=Object.create(z),v},t.awrap=function(v){return{__await:v}},R($.prototype),s($.prototype,l,function(){return this}),t.AsyncIterator=$,t.async=function(v,C,m,x,L){L===void 0&&(L=Promise);var b=new $(c(v,C,m,x),L);return t.isGeneratorFunction(C)?b:b.next().then(function(H){return H.done?H.value:b.next()})},R(z),s(z,u,"Generator"),s(z,o,function(){return this}),s(z,"toString",function(){return"[object Generator]"}),t.keys=function(v){var C=Object(v),m=[];for(var x in C)m.push(x);return m.reverse(),function L(){for(;m.length;){var b=m.pop();if(b in C)return L.value=b,L.done=!1,L}return L.done=!0,L}},t.values=he,ee.prototype={constructor:ee,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(K),!C)for(var m in this)m.charAt(0)==="t"&&n.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var m=this;function x(ce,oe){return H.type="throw",H.arg=C,m.next=ce,oe&&(m.method="next",m.arg=e),!!oe}for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L],H=b.completion;if(b.tryLoc==="root")return x("end");if(b.tryLoc<=this.prev){var F=n.call(b,"catchLoc"),Z=n.call(b,"finallyLoc");if(F&&Z){if(this.prev<b.catchLoc)return x(b.catchLoc,!0);if(this.prev<b.finallyLoc)return x(b.finallyLoc)}else if(F){if(this.prev<b.catchLoc)return x(b.catchLoc,!0)}else{if(!Z)throw Error("try statement without catch or finally");if(this.prev<b.finallyLoc)return x(b.finallyLoc)}}}},abrupt:function(C,m){for(var x=this.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var b=L;break}}b&&(C==="break"||C==="continue")&&b.tryLoc<=m&&m<=b.finallyLoc&&(b=null);var H=b?b.completion:{};return H.type=C,H.arg=m,b?(this.method="next",this.next=b.finallyLoc,j):this.complete(H)},complete:function(C,m){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&m&&(this.next=m),j},finish:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.finallyLoc===C)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(C){for(var m=this.tryEntries.length-1;m>=0;--m){var x=this.tryEntries[m];if(x.tryLoc===C){var L=x.completion;if(L.type==="throw"){var b=L.arg;K(x)}return b}}throw Error("illegal catch attempt")},delegateYield:function(C,m,x){return this.delegate={iterator:he(C),resultName:m,nextLoc:x},this.method==="next"&&(this.arg=e),j}},t}function IX(e,t,r,n,i,a,o){try{var l=e[a](o),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,i)}function M5(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){IX(a,n,i,o,l,"next",u)}function l(u){IX(a,n,i,o,l,"throw",u)}o(void 0)})}}function RHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PHe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,UHe(n.key),n)}}function $He(e,t,r){return t&&PHe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UHe(e){var t=HHe(e,"string");return M4(t)=="symbol"?t:t+""}function HHe(e,t){if(M4(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(M4(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var VHe=function(){function e(){RHe(this,e)}return $He(e,[{key:"initialize",value:function(){var t=M5(Po().mark(function n(i){var a,o,l,u,s,c;return Po().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!(i.connectionConfig.password&&i.connectionConfig.userName&&i.connectionConfig.host)){f.next=7;break}return i.listener&&qt.setState({listener:i.listener}),qt.setState({platformConfig:{userName:i.connectionConfig.userName,password:i.connectionConfig.password,host:i.connectionConfig.host,httpRetryCount:(a=i.connectionConfig)===null||a===void 0?void 0:a.httpRetryCount,httpTimeoutMs:(o=i.connectionConfig)===null||o===void 0?void 0:o.httpTimeoutMs,isSecure:(l=i.connectionConfig)===null||l===void 0?void 0:l.isSecure,port:(u=i.connectionConfig)===null||u===void 0?void 0:u.port,schema:(s=i.connectionConfig)===null||s===void 0?void 0:s.schema}}),f.next=5,qt.getState().initWasmService();case 5:f.next=8;break;case 7:throw new Error("Please, set client_id, client_secret, idv_base_url");case 8:return qt.setState({externalModulesNames:i.includedModules}),f.next=11,qt.getState().checkExternalModulesAndSetToStore();case 11:if(c=f.sent,!c){f.next=16;break}return f.abrupt("return",{});case 16:return f.abrupt("return",{error:"Initialized Error"});case 17:case"end":return f.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"setNonce",value:function(r){var n=qt.getState().setNonce;n(r)}},{key:"getWorkFlows",value:function(){var t=M5(Po().mark(function n(i){var a;return Po().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,qt.getState().getWorkflows(i);case 2:return a=l.sent,l.abrupt("return",a);case 4:case"end":return l.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"prepareWorkflow",value:function(){var t=M5(Po().mark(function n(i){var a,o;return Po().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=i.workfowId,u.next=3,qt.getState().preparareWorkflowAndPrepareUi(a);case 3:return o=u.sent,u.abrupt("return",o);case 5:case"end":return u.stop()}},n)}));function r(n){return t.apply(this,arguments)}return r}()},{key:"startWorkflow",value:function(){var t=M5(Po().mark(function n(){var i;return Po().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,qt.getState().startNewSession();case 2:if(i=o.sent,!i.error){o.next=5;break}return o.abrupt("return",i);case 5:return o.abrupt("return",new Promise(function(l){var u=function(c){l(c)};qt.getState().playWorkflow(u)}));case 6:case"end":return o.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()},{key:"deinitialize",value:function(){var t=M5(Po().mark(function n(){var i,a;return Po().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(i=qt.getState())===null||i===void 0?void 0:i.shutDownWasmService();case 2:(a=qt.getState())===null||a===void 0||a.resetProps();case 3:case"end":return l.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}()}])}(),YHe=window.customElements.get("idv-flow");YHe||window.customElements.define("idv-flow",gX);var QHe=Object.defineProperty,FHe=Object.defineProperties,BHe=Object.getOwnPropertyDescriptors,pX=Object.getOwnPropertySymbols,ZHe=Object.prototype.hasOwnProperty,GHe=Object.prototype.propertyIsEnumerable,NX=(e,t,r)=>t in e?QHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yX=(e,t)=>{for(var r in t||(t={}))ZHe.call(t,r)&&NX(e,r,t[r]);if(pX)for(var r of pX(t))GHe.call(t,r)&&NX(e,r,t[r]);return e},WHe=(e,t)=>FHe(e,BHe(t)),Yr=(e,t,r)=>new Promise((n,i)=>{var a=u=>{try{l(r.next(u))}catch(s){i(s)}},o=u=>{try{l(r.throw(u))}catch(s){i(s)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);l((r=r.apply(e,t)).next())}),SM=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function hX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DX={exports:{}},_h={},EX={exports:{}},$e={};/**
|
|
51
51
|
* @license React
|
|
52
52
|
* react.production.min.js
|
|
53
53
|
*
|
package/dist/main.js
CHANGED
package/package.json
CHANGED