@regulaforensics/idv-capture-web 2.5.179-nightly → 2.5.180-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.
- package/dist/main.iife.js +1 -1
- package/dist/main.js +5 -5
- package/package.json +1 -1
package/dist/main.iife.js
CHANGED
|
@@ -78,4 +78,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
78
78
|
`,this.shadowRoot.querySelector("#idv-gui-styles")||this.shadowRoot.appendChild(o)}this._root.render(w.jsx(SI,{moduleProps:this.props.moduleProps,perform:this.props.perform,idvEventListener:this.props.idvEventListener}))}},{key:"disconnectedCallback",value:function(){var o=this;setTimeout(function(){o._mounted&&(o._mounted=!1)})}}],[{key:"isReady",value:function(){return ov}},{key:"initialize",value:function(o){ov=!0}},{key:"deinitialize",value:function(){ov=!1}}])}(NE);ta(qu,"displayName",$0),ta(qu,"getSupportedTemplates",function(){return Object.values(Ai)}),ta(qu,"getIdentifier",function(){return"gui-idv"}),DE($0,qu);function uo(r){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uo(r)}function Hy(r){return EI(r)||bI(r)||wI(r)||CI()}function CI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
79
79
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wI(r,e){if(r){if(typeof r=="string")return av(r,e);var n={}.toString.call(r).slice(8,-1);return n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set"?Array.from(r):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?av(r,e):void 0}}function bI(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function EI(r){if(Array.isArray(r))return av(r)}function av(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,o=Array(e);n<e;n++)o[n]=r[n];return o}function yt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */yt=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&uo(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(uo(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function Gy(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function $u(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gy(Object(n),!0).forEach(function(o){_I(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Gy(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function _I(r,e,n){return(e=OI(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function OI(r){var e=RI(r,"string");return uo(e)=="symbol"?e:e+""}function RI(r,e){if(uo(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(uo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Ky(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function gi(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){Ky(l,o,u,c,f,"next",d)}function f(d){Ky(l,o,u,c,f,"throw",d)}c(void 0)})}}var II=function(e,n){return{_isInitialized:!1,_initializationInProgress:!1,_isConnectedToPlatform:!1,_prepareDataForWorkflow:function(u){n().setWorkflowId(u.workflow.id),n().setWorkflow(u.workflow),n().setLayout(u.workflow.client.layout),n().setProcessingTemplate(u.workflow.client.steps),n().setSessionProperties(u.properties)},_continueSession:function(){var o=gi(yt().mark(function l(c){var f,d,p,g,S,y,b,C,E,P,N,k,D;return yt().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(f={isContinue:!1},d=n().workflowId,p=n().getCurrentSessionDataLs(),g=n().sessionRestoreMode,g){M.next=6;break}return M.abrupt("return",f);case 6:if(p){M.next=8;break}return M.abrupt("return",f);case 8:if(S=p.sessionId,y=p.workflowId,!(!S||y!==d)){M.next=11;break}return M.abrupt("return",f);case 11:return M.next=13,n().wasmService.continueSession(S,c);case 13:if(b=M.sent,C=b.data,"id"in C&&"currentStep"in C){M.next=20;break}return E=new io({errorCode:Yi.DECODING_FAILED}),P=new Rt({errorCode:Ot.START_SESSION_ERROR,underlyingBaseError:E}),f=$u($u({},f),{},{error:P}),M.abrupt("return",f);case 20:return N=C.currentStep,n()._prepareDataForWorkflow(C),k=n()._findStepById(N),(k==null?void 0:k.final)===!1?(D=C.currentStep,n().setIsProcessing(!1),n().setCurrentStepId(D),n().setCurrentSessionDataLsAndStore({sessionId:C.id,workflowId:y}),n().listener({eventType:tu.MESSAGE,message:nu.DID_START_RESTORE_SESSION,module:"IDV"}),f=$u($u({},f),{},{isContinue:!0})):n().setCurrentSessionDataLsAndStore(null),M.abrupt("return",f);case 25:case"end":return M.stop()}},l)}));function u(l){return o.apply(this,arguments)}return u}(),initialize:function(u){return gi(yt().mark(function l(){var c,f,d;return yt().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(!n()._isInitialized){g.next=3;break}return console.warn("Idv:: Already initialized"),g.abrupt("return",{});case 3:if(!n()._initializationInProgress){g.next=5;break}return g.abrupt("return",new gu({errorCode:iu.INITIALIZATION_IN_PROGRESS}));case 5:return e({_initializationInProgress:!0}),g.next=8,n().setAndInitWasmService();case 8:return e({modulesConfig:u.modulesConfig||{}}),c=[qu],Array.isArray(u==null?void 0:u.includedModules)&&(f=u.includedModules.filter(function(S){return typeof S=="function"&&S.displayName&&!c.some(function(y){return y.displayName===S.displayName})}),c=[].concat(Hy(c),Hy(f))),g.next=13,n().loadModules(c);case 13:if(d=g.sent,!d.error){g.next=16;break}return g.abrupt("return",{error:d.error});case 16:return e({_initializationInProgress:!1,_isInitialized:!0}),g.abrupt("return",{});case 18:case"end":return g.stop()}},l)}))()},configureWithUrl:function(u){return gi(yt().mark(function l(){var c;return yt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(n()._isInitialized){d.next=2;break}return d.abrupt("return",{error:new hi({errorCode:Li.INITIALIZATION_REQUIRED})});case 2:if(!n().currentScreenConfig){d.next=4;break}return d.abrupt("return",{error:new hi({errorCode:Li.SCENARIO_IN_PROGRESS})});case 4:return d.next=6,n().connectByUrl(u);case 6:if(c=d.sent,!c.error){d.next=9;break}return d.abrupt("return",{error:c.error});case 9:return e({_isConnectedToPlatform:!0}),d.abrupt("return",c.workflows);case 11:case"end":return d.stop()}},l)}))()},configure:function(u){return gi(yt().mark(function l(){var c,f,d,p;return yt().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(n()._isInitialized){S.next=2;break}return S.abrupt("return",{error:new hi({errorCode:Li.INITIALIZATION_REQUIRED})});case 2:if(!n().currentScreenConfig){S.next=4;break}return S.abrupt("return",{error:new hi({errorCode:Li.SCENARIO_IN_PROGRESS})});case 4:if(c=["password","userName","host"],f=c.filter(function(y){return!(u!=null&&u[y])}),!(f.length>0)){S.next=8;break}return S.abrupt("return",{error:new hi({errorCode:Li.CONFIG_MISSED_OR_INVALID,message:"Missing parameters: ".concat(f.join(", "))})});case 8:return S.next=10,n().connectToIdv(u);case 10:if(d=S.sent,!d.error){S.next=14;break}return p=new hi({errorCode:Li.CONNECTION_ISSUE,underlyingBaseError:d.error}),S.abrupt("return",{error:p});case 14:return e({_isConnectedToPlatform:!0}),S.abrupt("return",{workflows:[]});case 16:case"end":return S.stop()}},l)}))()},getWorkflows:function(){var u=arguments;return gi(yt().mark(function l(){var c,f,d,p,g,S,y;return yt().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(c=u.length>0&&u[0]!==void 0?u[0]:{limit:100,skip:0},n()._isInitialized){C.next=4;break}return f=new Xn({errorCode:Vn.INITIALIZATION_REQUIRED}),C.abrupt("return",{error:f});case 4:if(n()._isConnectedToPlatform){C.next=7;break}return d=new Xn({errorCode:Vn.CONNECTION_ISSUE}),C.abrupt("return",{error:d});case 7:return C.next=9,n().wasmService.listWorkflows(c);case 9:if(p=C.sent,g=null,p.code===4&&(g=Tn.HTTP_ISSUE),p.code!==0&&p.code!==4&&(g=Tn.PROVIDER_ERROR),p.code===0&&!p.data.items&&(g=Tn.DECODING_FAILED),g===null){C.next=18;break}return S=new wu({errorCode:g}),y=new Xn({errorCode:Vn.WORKFLOW_ISSUE,message:"No workflow list",underlyingBaseError:S}),C.abrupt("return",{error:y});case 18:return C.abrupt("return",{results:p.data.items});case 19:case"end":return C.stop()}},l)}))()},prepareWorkflowAndPrepareUi:function(u){return gi(yt().mark(function l(){var c,f,d,p,g,S,y,b,C,E,P,N,k,D,j,M,K;return yt().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(n()._isInitialized){G.next=3;break}return f=new Xn({errorCode:Vn.INITIALIZATION_REQUIRED}),G.abrupt("return",{error:f});case 3:if(n()._isConnectedToPlatform){G.next=6;break}return d=new Xn({errorCode:Vn.CONNECTION_ISSUE}),G.abrupt("return",{error:d});case 6:if(!n().currentScreenConfig){G.next=9;break}return p=new Xn({errorCode:Vn.SCENARIO_IN_PROGRESS}),G.abrupt("return",{error:p});case 9:return G.next=11,n().wasmService.getWorkflow(u);case 11:if(g=G.sent,S=k0(g.data),y=((c=S.client)===null||c===void 0?void 0:c.steps)&&S.client.steps.some(function(ee){return ee.templateId===Od}),b=null,g.code===4&&(b=Tn.HTTP_ISSUE),g.code!==0&&g.code!==4&&(b=Tn.PROVIDER_ERROR),g.code===0&&!g.data.id&&(b=Tn.DECODING_FAILED),g.data.id&&S===null&&(b=Tn.DECODING_FAILED),y||(b=Tn.DECODING_FAILED),b===null){G.next=24;break}return C=new wu({errorCode:b}),E=new Xn({errorCode:Vn.INTERNAL_ISSUE,underlyingBaseError:C}),G.abrupt("return",{error:E});case 24:return P=n().externalModules,N=S.steps,k=fE(P,N),D=k.isAllTemplatesSupported,j=k.unsupportedSteps,D||console.log("IDV:: Warning. Unsupported steps found: ",j),M=n().workflowId,M&&u!==M&&P.forEach(function(ee){ee.component.deinitialize()}),K=n().modulesConfig,P.forEach(function(ee){ee.component.isReady()||ee.component.initialize(K)}),n().setLayout(S.client.layout),n().setProcessingTemplate(S.client.steps),n().setWorkflowId(u),G.abrupt("return",{workflow:S});case 36:case"end":return G.stop()}},l)}))()},startNewSession:function(u,l){return gi(yt().mark(function c(){var f,d,p,g,S,y,b,C,E,P,N,k,D,j,M,K,$,G,ee,_,m,O,I,x,L,B;return yt().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(n()._isInitialized){T.next=3;break}return f=new Rt({errorCode:Ot.INITIALIZATION_REQUIRED}),T.abrupt("return",{error:f});case 3:if(d=n().workflowId,d){T.next=7;break}return p=new Rt({errorCode:Ot.PREPARED_REQUIRED}),T.abrupt("return",{error:p});case 7:if(!n().currentScreenConfig){T.next=10;break}return g=new Rt({errorCode:Ot.ALREADY_STARTED}),T.abrupt("return",{error:g});case 10:return n().setIsProcessing(!0),S=function(){var V=gi(yt().mark(function Q(){var A,X;return yt().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return X=(A=n().wasmService)===null||A===void 0?void 0:A.isServiceRunning(),de.abrupt("return",X||null);case 2:case"end":return de.stop()}},Q)}));return function(){return V.apply(this,arguments)}}(),y=function(){return null},T.next=15,L0(S,y);case 15:if(b=T.sent,b){T.next=19;break}return C=new Rt({errorCode:Ot.INTERNAL_ISSUE,message:"Service is not running"}),T.abrupt("return",{error:C});case 19:return T.next=21,n().wasmService.getServiceToken();case 21:if(E=T.sent,P=E.data,!(!P||typeof P!="string")){T.next=27;break}return N=new io({errorCode:Yi.TOKEN_ERROR}),k=new Rt({errorCode:Ot.START_SESSION_ERROR,underlyingBaseError:N}),T.abrupt("return",{error:k});case 27:return n().setServiceSessionToken(P),T.next=30,n()._continueSession(u);case 30:if(D=T.sent,!D.error){T.next=33;break}return T.abrupt("return",{error:D.error});case 33:if(!D.isContinue){T.next=35;break}return T.abrupt("return",{});case 35:return T.next=37,n().wasmService.startSession(d,u,l);case 37:if(j=T.sent,!("httpCode"in j.data)){T.next=43;break}return $=typeof((M=j.data)===null||M===void 0?void 0:M.what)=="string"&&j.data.what.length?(K=j.data)===null||K===void 0?void 0:K.what:null,G=new io($u({errorCode:Yi.HTTP_ISSUE},$?{message:$}:{})),ee=new Rt({errorCode:Ot.START_SESSION_ERROR,underlyingBaseError:G}),T.abrupt("return",{error:ee});case 43:if(_=j.data,m=_.id,O=_.currentStep,I=_.workflow,x=m&&O&&I,x){T.next=49;break}return L=new io({errorCode:Yi.DECODING_FAILED}),B=new Rt({errorCode:Ot.START_SESSION_ERROR,underlyingBaseError:L}),T.abrupt("return",{error:B});case 49:return n()._prepareDataForWorkflow(j.data),n().setCurrentSessionDataLsAndStore({sessionId:j.data.id,workflowId:d}),n().setIsProcessing(!1),n().setCurrentStepId(O),n().listener({eventType:tu.MESSAGE,message:nu.DID_START_SESSION,module:"IDV"}),T.abrupt("return",{});case 55:case"end":return T.stop()}},c)}))()},playWorkflow:function(u){var l=n().currentStepId;if(n().setWorkflowSessionCompletion(u),l)n().onChangeScreen(l);else{var c=new Rt({errorCode:Ot.UNKNOWN_STEP});n().workflowSessionCompletion({error:c})}},deinitialize:function(){return gi(yt().mark(function u(){var l,c,f;return yt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(n()._isInitialized){p.next=3;break}return l=new Cu({errorCode:ou.INITIALIZATION_REQUIRED}),p.abrupt("return",{error:l});case 3:if(!n().currentScreenConfig){p.next=6;break}return c=new Cu({errorCode:ou.SCENARIO_IN_PROGRESS}),p.abrupt("return",{error:c});case 6:return p.next=8,n().deinitializationIdv();case 8:return f=p.sent,n().resetProps(),e({_isInitialized:!1}),p.abrupt("return",f);case 12:case"end":return p.stop()}},u)}))()}}},Zy={},Qy={},uv,Yy;function Xy(){if(Yy)return uv;Yy=1;var r=ur(),e=Ar(),n=wr(),o=$t(),u=e("iterator");return uv=!r(function(){var l=new URL("b?a=1&b=2&c=3","https://a"),c=l.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),d="";return l.pathname="c%20d",c.forEach(function(p,g){c.delete("b"),d+=g+p}),f.delete("a",2),f.delete("b",void 0),o&&(!l.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(o||!n)||!c.sort||l.href!=="https://a/c%20d?a=1&c=3"||c.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!c[u]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||d!=="a1c3"||new URL("https://x",void 0).host!=="x"}),uv}var sv,Jy;function xI(){if(Jy)return sv;Jy=1;var r=wr(),e=or(),n=Dr(),o=ur(),u=Ka(),l=As(),c=Ps(),f=Yt(),d=qa(),p=Object.assign,g=Object.defineProperty,S=e([].concat);return sv=!p||o(function(){if(r&&p({b:1},p(g({},"a",{enumerable:!0,get:function(){g(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},b={},C=Symbol("assign detection"),E="abcdefghijklmnopqrst";return y[C]=7,E.split("").forEach(function(P){b[P]=P}),p({},y)[C]!==7||u(p({},b)).join("")!==E})?function(b,C){for(var E=f(b),P=arguments.length,N=1,k=l.f,D=c.f;P>N;)for(var j=d(arguments[N++]),M=k?S(u(j),k(j)):u(j),K=M.length,$=0,G;K>$;)G=M[$++],(!r||n(D,j,G))&&(E[G]=j[G]);return E}:p,sv}var lv,em;function PI(){if(em)return lv;em=1;var r=or(),e=2147483647,n=36,o=1,u=26,l=38,c=700,f=72,d=128,p="-",g=/[^\0-\u007E]/,S=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",b=n-o,C=RangeError,E=r(S.exec),P=Math.floor,N=String.fromCharCode,k=r("".charCodeAt),D=r([].join),j=r([].push),M=r("".replace),K=r("".split),$=r("".toLowerCase),G=function(O){for(var I=[],x=0,L=O.length;x<L;){var B=k(O,x++);if(B>=55296&&B<=56319&&x<L){var Y=k(O,x++);(Y&64512)===56320?j(I,((B&1023)<<10)+(Y&1023)+65536):(j(I,B),x--)}else j(I,B)}return I},ee=function(O){return O+22+75*(O<26)},_=function(O,I,x){var L=0;for(O=x?P(O/c):O>>1,O+=P(O/I);O>b*u>>1;)O=P(O/b),L+=n;return P(L+(b+1)*O/(O+l))},m=function(O){var I=[];O=G(O);var x=O.length,L=d,B=0,Y=f,T,V;for(T=0;T<O.length;T++)V=O[T],V<128&&j(I,N(V));var Q=I.length,A=Q;for(Q&&j(I,p);A<x;){var X=e;for(T=0;T<O.length;T++)V=O[T],V>=L&&V<X&&(X=V);var ve=A+1;if(X-L>P((e-B)/ve))throw new C(y);for(B+=(X-L)*ve,L=X,T=0;T<O.length;T++){if(V=O[T],V<L&&++B>e)throw new C(y);if(V===L){for(var de=B,pe=n;;){var Le=pe<=Y?o:pe>=Y+u?u:pe-Y;if(de<Le)break;var je=de-Le,ke=n-Le;j(I,N(ee(Le+je%ke))),de=P(je/ke),pe+=n}j(I,N(ee(de))),Y=_(B,ve,A===Q),B=0,A++}}B++,L++}return D(I,"")};return lv=function(O){var I=[],x=K(M($(O),S,"."),"."),L,B;for(L=0;L<x.length;L++)B=x[L],j(I,E(g,B)?"xn--"+m(B):B);return D(I,".")},lv}var rm={},tm;function TI(){if(tm)return rm;tm=1;var r=De(),e=or(),n=wf(),o=RangeError,u=String.fromCharCode,l=String.fromCodePoint,c=e([].join),f=!!l&&l.length!==1;return r({target:"String",stat:!0,arity:1,forced:f},{fromCodePoint:function(p){for(var g=[],S=arguments.length,y=0,b;S>y;){if(b=+arguments[y++],n(b,1114111)!==b)throw new o(b+" is not a valid code point");g[y]=b<65536?u(b):u(((b-=65536)>>10)+55296,b%1024+56320)}return c(g,"")}}),rm}var cv,nm;function kI(){if(nm)return cv;nm=1;var r=Ti(),e=Math.floor,n=function(o,u){var l=o.length;if(l<8)for(var c=1,f,d;c<l;){for(d=c,f=o[c];d&&u(o[d-1],f)>0;)o[d]=o[--d];d!==c++&&(o[d]=f)}else for(var p=e(l/2),g=n(r(o,0,p),u),S=n(r(o,p),u),y=g.length,b=S.length,C=0,E=0;C<y||E<b;)o[C+E]=C<y&&E<b?u(g[C],S[E])<=0?g[C++]:S[E++]:C<y?g[C++]:S[E++];return o};return cv=n,cv}var fv,im;function om(){if(im)return fv;im=1,L1(),TI();var r=De(),e=Sr(),n=U8(),o=qt(),u=Dr(),l=or(),c=wr(),f=Xy(),d=dt(),p=mn(),g=ed(),S=xn(),y=Gp(),b=un(),C=Wo(),E=Mr(),P=Vr(),N=ki(),k=Ga(),D=Ur(),j=Zr(),M=vt(),K=In(),$=Qi(),G=H1(),ee=Fs(),_=eu(),m=Vo(),O=Ar(),I=kI(),x=O("iterator"),L="URLSearchParams",B=L+"Iterator",Y=b.set,T=b.getterFor(L),V=b.getterFor(B),Q=n("fetch"),A=n("Request"),X=n("Headers"),ve=A&&A.prototype,de=X&&X.prototype,pe=e.TypeError,Le=e.encodeURIComponent,je=String.fromCharCode,ke=o("String","fromCodePoint"),Te=parseInt,tr=l("".charAt),mr=l([].join),dr=l([].push),Ge=l("".replace),Je=l([].shift),nr=l([].splice),ar=l("".split),Ze=l("".slice),Qe=l(/./.exec),Cr=/\+/g,gr="�",pr=/^[0-9a-f]+$/i,W=function(Oe,Ue){var qe=Ze(Oe,Ue,Ue+2);return Qe(pr,qe)?Te(qe,16):NaN},q=function(Oe){for(var Ue=0,qe=128;qe>0&&(Oe&qe)!==0;qe>>=1)Ue++;return Ue},J=function(Oe){var Ue=null;switch(Oe.length){case 1:Ue=Oe[0];break;case 2:Ue=(Oe[0]&31)<<6|Oe[1]&63;break;case 3:Ue=(Oe[0]&15)<<12|(Oe[1]&63)<<6|Oe[2]&63;break;case 4:Ue=(Oe[0]&7)<<18|(Oe[1]&63)<<12|(Oe[2]&63)<<6|Oe[3]&63;break}return Ue>1114111?null:Ue},he=function(Oe){Oe=Ge(Oe,Cr," ");for(var Ue=Oe.length,qe="",We=0;We<Ue;){var er=tr(Oe,We);if(er==="%"){if(tr(Oe,We+1)==="%"||We+3>Ue){qe+="%",We++;continue}var vr=W(Oe,We+1);if(vr!==vr){qe+=er,We++;continue}We+=2;var Rr=q(vr);if(Rr===0)er=je(vr);else{if(Rr===1||Rr>4){qe+=gr,We++;continue}for(var Lr=[vr],qr=1;qr<Rr&&(We++,!(We+3>Ue||tr(Oe,We)!=="%"));){var rt=W(Oe,We+1);if(rt!==rt){We+=3;break}if(rt>191||rt<128)break;dr(Lr,rt),We+=2,qr++}if(Lr.length!==Rr){qe+=gr;continue}var Pt=J(Lr);Pt===null?qe+=gr:er=ke(Pt)}}qe+=er,We++}return qe},ue=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fe=function(Oe){return ae[Oe]},xe=function(Oe){return Ge(Le(Oe),ue,fe)},Ne=y(function(Ue,qe){Y(this,{type:B,target:T(Ue).entries,index:0,kind:qe})},L,function(){var Ue=V(this),qe=Ue.target,We=Ue.index++;if(!qe||We>=qe.length)return Ue.target=null,_(void 0,!0);var er=qe[We];switch(Ue.kind){case"keys":return _(er.key,!1);case"values":return _(er.value,!1)}return _([er.key,er.value],!1)},!0),Pe=function(Oe){this.entries=[],this.url=null,Oe!==void 0&&(j(Oe)?this.parseObject(Oe):this.parseQuery(typeof Oe=="string"?tr(Oe,0)==="?"?Ze(Oe,1):Oe:M(Oe)))};Pe.prototype={type:L,bindURL:function(Oe){this.url=Oe,this.update()},parseObject:function(Oe){var Ue=this.entries,qe=ee(Oe),We,er,vr,Rr,Lr,qr,rt;if(qe)for(We=G(Oe,qe),er=We.next;!(vr=u(er,We)).done;){if(Rr=G(D(vr.value)),Lr=Rr.next,(qr=u(Lr,Rr)).done||(rt=u(Lr,Rr)).done||!u(Lr,Rr).done)throw new pe("Expected sequence with length 2");dr(Ue,{key:M(qr.value),value:M(rt.value)})}else for(var Pt in Oe)P(Oe,Pt)&&dr(Ue,{key:Pt,value:M(Oe[Pt])})},parseQuery:function(Oe){if(Oe)for(var Ue=this.entries,qe=ar(Oe,"&"),We=0,er,vr;We<qe.length;)er=qe[We++],er.length&&(vr=ar(er,"="),dr(Ue,{key:he(Je(vr)),value:he(mr(vr,"="))}))},serialize:function(){for(var Oe=this.entries,Ue=[],qe=0,We;qe<Oe.length;)We=Oe[qe++],dr(Ue,xe(We.key)+"="+xe(We.value));return mr(Ue,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Re=function(){C(this,ge);var Ue=arguments.length>0?arguments[0]:void 0,qe=Y(this,new Pe(Ue));c||(this.size=qe.entries.length)},ge=Re.prototype;if(g(ge,{append:function(Ue,qe){var We=T(this);m(arguments.length,2),dr(We.entries,{key:M(Ue),value:M(qe)}),c||this.length++,We.updateURL()},delete:function(Oe){for(var Ue=T(this),qe=m(arguments.length,1),We=Ue.entries,er=M(Oe),vr=qe<2?void 0:arguments[1],Rr=vr===void 0?vr:M(vr),Lr=0;Lr<We.length;){var qr=We[Lr];if(qr.key===er&&(Rr===void 0||qr.value===Rr)){if(nr(We,Lr,1),Rr!==void 0)break}else Lr++}c||(this.size=We.length),Ue.updateURL()},get:function(Ue){var qe=T(this).entries;m(arguments.length,1);for(var We=M(Ue),er=0;er<qe.length;er++)if(qe[er].key===We)return qe[er].value;return null},getAll:function(Ue){var qe=T(this).entries;m(arguments.length,1);for(var We=M(Ue),er=[],vr=0;vr<qe.length;vr++)qe[vr].key===We&&dr(er,qe[vr].value);return er},has:function(Ue){for(var qe=T(this).entries,We=m(arguments.length,1),er=M(Ue),vr=We<2?void 0:arguments[1],Rr=vr===void 0?vr:M(vr),Lr=0;Lr<qe.length;){var qr=qe[Lr++];if(qr.key===er&&(Rr===void 0||qr.value===Rr))return!0}return!1},set:function(Ue,qe){var We=T(this);m(arguments.length,1);for(var er=We.entries,vr=!1,Rr=M(Ue),Lr=M(qe),qr=0,rt;qr<er.length;qr++)rt=er[qr],rt.key===Rr&&(vr?nr(er,qr--,1):(vr=!0,rt.value=Lr));vr||dr(er,{key:Rr,value:Lr}),c||(this.size=er.length),We.updateURL()},sort:function(){var Ue=T(this);I(Ue.entries,function(qe,We){return qe.key>We.key?1:-1}),Ue.updateURL()},forEach:function(Ue){for(var qe=T(this).entries,We=N(Ue,arguments.length>1?arguments[1]:void 0),er=0,vr;er<qe.length;)vr=qe[er++],We(vr.value,vr.key,this)},keys:function(){return new Ne(this,"keys")},values:function(){return new Ne(this,"values")},entries:function(){return new Ne(this,"entries")}},{enumerable:!0}),d(ge,x,ge.entries,{name:"entries"}),d(ge,"toString",function(){return T(this).serialize()},{enumerable:!0}),c&&p(ge,"size",{get:function(){return T(this).entries.length},configurable:!0,enumerable:!0}),S(Re,L),r({global:!0,constructor:!0,forced:!f},{URLSearchParams:Re}),!f&&E(X)){var ze=l(de.has),sr=l(de.set),br=function(Oe){if(j(Oe)){var Ue=Oe.body,qe;if(k(Ue)===L)return qe=Oe.headers?new X(Oe.headers):new X,ze(qe,"content-type")||sr(qe,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),K(Oe,{body:$(0,M(Ue)),headers:$(0,qe)})}return Oe};if(E(Q)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Ue){return Q(Ue,arguments.length>1?br(arguments[1]):{})}}),E(A)){var St=function(Ue){return C(this,ve),new A(Ue,arguments.length>1?br(arguments[1]):{})};ve.constructor=St,St.prototype=ve,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:St})}}return fv={URLSearchParams:Re,getState:T},fv}var am;function jI(){if(am)return Qy;am=1,p3();var r=De(),e=wr(),n=Xy(),o=Sr(),u=ki(),l=or(),c=dt(),f=mn(),d=Wo(),p=Vr(),g=xI(),S=Q3(),y=Ti(),b=d3().codeAt,C=PI(),E=vt(),P=xn(),N=Vo(),k=om(),D=un(),j=D.set,M=D.getterFor("URL"),K=k.URLSearchParams,$=k.getState,G=o.URL,ee=o.TypeError,_=o.parseInt,m=Math.floor,O=Math.pow,I=l("".charAt),x=l(/./.exec),L=l([].join),B=l(1 .toString),Y=l([].pop),T=l([].push),V=l("".replace),Q=l([].shift),A=l("".split),X=l("".slice),ve=l("".toLowerCase),de=l([].unshift),pe="Invalid authority",Le="Invalid scheme",je="Invalid host",ke="Invalid port",Te=/[a-z]/i,tr=/[\d+-.a-z]/i,mr=/\d/,dr=/^0x/i,Ge=/^[0-7]+$/,Je=/^\d+$/,nr=/^[\da-f]+$/i,ar=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ze=/[\0\t\n\r #/:<>?@[\\\]^|]/,Qe=/^[\u0000-\u0020]+/,Cr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,gr=/[\t\n\r]/g,pr,W=function(oe){var Ee=A(oe,"."),le,re,ye,rr,$e,$r,fr;if(Ee.length&&Ee[Ee.length-1]===""&&Ee.length--,le=Ee.length,le>4)return oe;for(re=[],ye=0;ye<le;ye++){if(rr=Ee[ye],rr==="")return oe;if($e=10,rr.length>1&&I(rr,0)==="0"&&($e=x(dr,rr)?16:8,rr=X(rr,$e===8?1:2)),rr==="")$r=0;else{if(!x($e===10?Je:$e===8?Ge:nr,rr))return oe;$r=_(rr,$e)}T(re,$r)}for(ye=0;ye<le;ye++)if($r=re[ye],ye===le-1){if($r>=O(256,5-le))return null}else if($r>255)return null;for(fr=Y(re),ye=0;ye<re.length;ye++)fr+=re[ye]*O(256,3-ye);return fr},q=function(oe){var Ee=[0,0,0,0,0,0,0,0],le=0,re=null,ye=0,rr,$e,$r,fr,at,Ct,be,Br=function(){return I(oe,ye)};if(Br()===":"){if(I(oe,1)!==":")return;ye+=2,le++,re=le}for(;Br();){if(le===8)return;if(Br()===":"){if(re!==null)return;ye++,le++,re=le;continue}for(rr=$e=0;$e<4&&x(nr,Br());)rr=rr*16+_(Br(),16),ye++,$e++;if(Br()==="."){if($e===0||(ye-=$e,le>6))return;for($r=0;Br();){if(fr=null,$r>0)if(Br()==="."&&$r<4)ye++;else return;if(!x(mr,Br()))return;for(;x(mr,Br());){if(at=_(Br(),10),fr===null)fr=at;else{if(fr===0)return;fr=fr*10+at}if(fr>255)return;ye++}Ee[le]=Ee[le]*256+fr,$r++,($r===2||$r===4)&&le++}if($r!==4)return;break}else if(Br()===":"){if(ye++,!Br())return}else if(Br())return;Ee[le++]=rr}if(re!==null)for(Ct=le-re,le=7;le!==0&&Ct>0;)be=Ee[le],Ee[le--]=Ee[re+Ct-1],Ee[re+--Ct]=be;else if(le!==8)return;return Ee},J=function(oe){for(var Ee=null,le=1,re=null,ye=0,rr=0;rr<8;rr++)oe[rr]!==0?(ye>le&&(Ee=re,le=ye),re=null,ye=0):(re===null&&(re=rr),++ye);return ye>le?re:Ee},he=function(oe){var Ee,le,re,ye;if(typeof oe=="number"){for(Ee=[],le=0;le<4;le++)de(Ee,oe%256),oe=m(oe/256);return L(Ee,".")}if(typeof oe=="object"){for(Ee="",re=J(oe),le=0;le<8;le++)ye&&oe[le]===0||(ye&&(ye=!1),re===le?(Ee+=le?":":"::",ye=!0):(Ee+=B(oe[le],16),le<7&&(Ee+=":")));return"["+Ee+"]"}return oe},ue={},ae=g({},ue,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=g({},ae,{"#":1,"?":1,"{":1,"}":1}),xe=g({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ne=function(oe,Ee){var le=b(oe,0);return le>32&&le<127&&!p(Ee,oe)?oe:encodeURIComponent(oe)},Pe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Re=function(oe,Ee){var le;return oe.length===2&&x(Te,I(oe,0))&&((le=I(oe,1))===":"||!Ee&&le==="|")},ge=function(oe){var Ee;return oe.length>1&&Re(X(oe,0,2))&&(oe.length===2||(Ee=I(oe,2))==="/"||Ee==="\\"||Ee==="?"||Ee==="#")},ze=function(oe){return oe==="."||ve(oe)==="%2e"},sr=function(oe){return oe=ve(oe),oe===".."||oe==="%2e."||oe===".%2e"||oe==="%2e%2e"},br={},St={},Oe={},Ue={},qe={},We={},er={},vr={},Rr={},Lr={},qr={},rt={},Pt={},Si={},zt={},ei={},Xr={},Ht={},An={},Gt={},Tt={},ri=function(oe,Ee,le){var re=E(oe),ye,rr,$e;if(Ee){if(rr=this.parse(re),rr)throw new ee(rr);this.searchParams=null}else{if(le!==void 0&&(ye=new ri(le,!0)),rr=this.parse(re,null,ye),rr)throw new ee(rr);$e=$(new K),$e.bindURL(this),this.searchParams=$e}};ri.prototype={type:"URL",parse:function(oe,Ee,le){var re=this,ye=Ee||br,rr=0,$e="",$r=!1,fr=!1,at=!1,Ct,be,Br,cn;for(oe=E(oe),Ee||(re.scheme="",re.username="",re.password="",re.host=null,re.port=null,re.path=[],re.query=null,re.fragment=null,re.cannotBeABaseURL=!1,oe=V(oe,Qe,""),oe=V(oe,Cr,"$1")),oe=V(oe,gr,""),Ct=S(oe);rr<=Ct.length;){switch(be=Ct[rr],ye){case br:if(be&&x(Te,be))$e+=ve(be),ye=St;else{if(Ee)return Le;ye=Oe;continue}break;case St:if(be&&(x(tr,be)||be==="+"||be==="-"||be==="."))$e+=ve(be);else if(be===":"){if(Ee&&(re.isSpecial()!==p(Pe,$e)||$e==="file"&&(re.includesCredentials()||re.port!==null)||re.scheme==="file"&&!re.host))return;if(re.scheme=$e,Ee){re.isSpecial()&&Pe[re.scheme]===re.port&&(re.port=null);return}$e="",re.scheme==="file"?ye=Si:re.isSpecial()&&le&&le.scheme===re.scheme?ye=Ue:re.isSpecial()?ye=vr:Ct[rr+1]==="/"?(ye=qe,rr++):(re.cannotBeABaseURL=!0,T(re.path,""),ye=An)}else{if(Ee)return Le;$e="",ye=Oe,rr=0;continue}break;case Oe:if(!le||le.cannotBeABaseURL&&be!=="#")return Le;if(le.cannotBeABaseURL&&be==="#"){re.scheme=le.scheme,re.path=y(le.path),re.query=le.query,re.fragment="",re.cannotBeABaseURL=!0,ye=Tt;break}ye=le.scheme==="file"?Si:We;continue;case Ue:if(be==="/"&&Ct[rr+1]==="/")ye=Rr,rr++;else{ye=We;continue}break;case qe:if(be==="/"){ye=Lr;break}else{ye=Ht;continue}case We:if(re.scheme=le.scheme,be===pr)re.username=le.username,re.password=le.password,re.host=le.host,re.port=le.port,re.path=y(le.path),re.query=le.query;else if(be==="/"||be==="\\"&&re.isSpecial())ye=er;else if(be==="?")re.username=le.username,re.password=le.password,re.host=le.host,re.port=le.port,re.path=y(le.path),re.query="",ye=Gt;else if(be==="#")re.username=le.username,re.password=le.password,re.host=le.host,re.port=le.port,re.path=y(le.path),re.query=le.query,re.fragment="",ye=Tt;else{re.username=le.username,re.password=le.password,re.host=le.host,re.port=le.port,re.path=y(le.path),re.path.length--,ye=Ht;continue}break;case er:if(re.isSpecial()&&(be==="/"||be==="\\"))ye=Rr;else if(be==="/")ye=Lr;else{re.username=le.username,re.password=le.password,re.host=le.host,re.port=le.port,ye=Ht;continue}break;case vr:if(ye=Rr,be!=="/"||I($e,rr+1)!=="/")continue;rr++;break;case Rr:if(be!=="/"&&be!=="\\"){ye=Lr;continue}break;case Lr:if(be==="@"){$r&&($e="%40"+$e),$r=!0,Br=S($e);for(var Ni=0;Ni<Br.length;Ni++){var Ci=Br[Ni];if(Ci===":"&&!at){at=!0;continue}var Kt=Ne(Ci,xe);at?re.password+=Kt:re.username+=Kt}$e=""}else if(be===pr||be==="/"||be==="?"||be==="#"||be==="\\"&&re.isSpecial()){if($r&&$e==="")return pe;rr-=S($e).length+1,$e="",ye=qr}else $e+=be;break;case qr:case rt:if(Ee&&re.scheme==="file"){ye=ei;continue}else if(be===":"&&!fr){if($e==="")return je;if(cn=re.parseHost($e),cn)return cn;if($e="",ye=Pt,Ee===rt)return}else if(be===pr||be==="/"||be==="?"||be==="#"||be==="\\"&&re.isSpecial()){if(re.isSpecial()&&$e==="")return je;if(Ee&&$e===""&&(re.includesCredentials()||re.port!==null))return;if(cn=re.parseHost($e),cn)return cn;if($e="",ye=Xr,Ee)return;continue}else be==="["?fr=!0:be==="]"&&(fr=!1),$e+=be;break;case Pt:if(x(mr,be))$e+=be;else if(be===pr||be==="/"||be==="?"||be==="#"||be==="\\"&&re.isSpecial()||Ee){if($e!==""){var vo=_($e,10);if(vo>65535)return ke;re.port=re.isSpecial()&&vo===Pe[re.scheme]?null:vo,$e=""}if(Ee)return;ye=Xr;continue}else return ke;break;case Si:if(re.scheme="file",be==="/"||be==="\\")ye=zt;else if(le&&le.scheme==="file")switch(be){case pr:re.host=le.host,re.path=y(le.path),re.query=le.query;break;case"?":re.host=le.host,re.path=y(le.path),re.query="",ye=Gt;break;case"#":re.host=le.host,re.path=y(le.path),re.query=le.query,re.fragment="",ye=Tt;break;default:ge(L(y(Ct,rr),""))||(re.host=le.host,re.path=y(le.path),re.shortenPath()),ye=Ht;continue}else{ye=Ht;continue}break;case zt:if(be==="/"||be==="\\"){ye=ei;break}le&&le.scheme==="file"&&!ge(L(y(Ct,rr),""))&&(Re(le.path[0],!0)?T(re.path,le.path[0]):re.host=le.host),ye=Ht;continue;case ei:if(be===pr||be==="/"||be==="\\"||be==="?"||be==="#"){if(!Ee&&Re($e))ye=Ht;else if($e===""){if(re.host="",Ee)return;ye=Xr}else{if(cn=re.parseHost($e),cn)return cn;if(re.host==="localhost"&&(re.host=""),Ee)return;$e="",ye=Xr}continue}else $e+=be;break;case Xr:if(re.isSpecial()){if(ye=Ht,be!=="/"&&be!=="\\")continue}else if(!Ee&&be==="?")re.query="",ye=Gt;else if(!Ee&&be==="#")re.fragment="",ye=Tt;else if(be!==pr&&(ye=Ht,be!=="/"))continue;break;case Ht:if(be===pr||be==="/"||be==="\\"&&re.isSpecial()||!Ee&&(be==="?"||be==="#")){if(sr($e)?(re.shortenPath(),be!=="/"&&!(be==="\\"&&re.isSpecial())&&T(re.path,"")):ze($e)?be!=="/"&&!(be==="\\"&&re.isSpecial())&&T(re.path,""):(re.scheme==="file"&&!re.path.length&&Re($e)&&(re.host&&(re.host=""),$e=I($e,0)+":"),T(re.path,$e)),$e="",re.scheme==="file"&&(be===pr||be==="?"||be==="#"))for(;re.path.length>1&&re.path[0]==="";)Q(re.path);be==="?"?(re.query="",ye=Gt):be==="#"&&(re.fragment="",ye=Tt)}else $e+=Ne(be,fe);break;case An:be==="?"?(re.query="",ye=Gt):be==="#"?(re.fragment="",ye=Tt):be!==pr&&(re.path[0]+=Ne(be,ue));break;case Gt:!Ee&&be==="#"?(re.fragment="",ye=Tt):be!==pr&&(be==="'"&&re.isSpecial()?re.query+="%27":be==="#"?re.query+="%23":re.query+=Ne(be,ue));break;case Tt:be!==pr&&(re.fragment+=Ne(be,ae));break}rr++}},parseHost:function(oe){var Ee,le,re;if(I(oe,0)==="["){if(I(oe,oe.length-1)!=="]"||(Ee=q(X(oe,1,-1)),!Ee))return je;this.host=Ee}else if(this.isSpecial()){if(oe=C(oe),x(ar,oe)||(Ee=W(oe),Ee===null))return je;this.host=Ee}else{if(x(Ze,oe))return je;for(Ee="",le=S(oe),re=0;re<le.length;re++)Ee+=Ne(le[re],ue);this.host=Ee}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return p(Pe,this.scheme)},shortenPath:function(){var oe=this.path,Ee=oe.length;Ee&&(this.scheme!=="file"||Ee!==1||!Re(oe[0],!0))&&oe.length--},serialize:function(){var oe=this,Ee=oe.scheme,le=oe.username,re=oe.password,ye=oe.host,rr=oe.port,$e=oe.path,$r=oe.query,fr=oe.fragment,at=Ee+":";return ye!==null?(at+="//",oe.includesCredentials()&&(at+=le+(re?":"+re:"")+"@"),at+=he(ye),rr!==null&&(at+=":"+rr)):Ee==="file"&&(at+="//"),at+=oe.cannotBeABaseURL?$e[0]:$e.length?"/"+L($e,"/"):"",$r!==null&&(at+="?"+$r),fr!==null&&(at+="#"+fr),at},setHref:function(oe){var Ee=this.parse(oe);if(Ee)throw new ee(Ee);this.searchParams.update()},getOrigin:function(){var oe=this.scheme,Ee=this.port;if(oe==="blob")try{return new Nn(oe.path[0]).origin}catch(le){return"null"}return oe==="file"||!this.isSpecial()?"null":oe+"://"+he(this.host)+(Ee!==null?":"+Ee:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(oe){this.parse(E(oe)+":",br)},getUsername:function(){return this.username},setUsername:function(oe){var Ee=S(E(oe));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var le=0;le<Ee.length;le++)this.username+=Ne(Ee[le],xe)}},getPassword:function(){return this.password},setPassword:function(oe){var Ee=S(E(oe));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var le=0;le<Ee.length;le++)this.password+=Ne(Ee[le],xe)}},getHost:function(){var oe=this.host,Ee=this.port;return oe===null?"":Ee===null?he(oe):he(oe)+":"+Ee},setHost:function(oe){this.cannotBeABaseURL||this.parse(oe,qr)},getHostname:function(){var oe=this.host;return oe===null?"":he(oe)},setHostname:function(oe){this.cannotBeABaseURL||this.parse(oe,rt)},getPort:function(){var oe=this.port;return oe===null?"":E(oe)},setPort:function(oe){this.cannotHaveUsernamePasswordPort()||(oe=E(oe),oe===""?this.port=null:this.parse(oe,Pt))},getPathname:function(){var oe=this.path;return this.cannotBeABaseURL?oe[0]:oe.length?"/"+L(oe,"/"):""},setPathname:function(oe){this.cannotBeABaseURL||(this.path=[],this.parse(oe,Xr))},getSearch:function(){var oe=this.query;return oe?"?"+oe:""},setSearch:function(oe){oe=E(oe),oe===""?this.query=null:(I(oe,0)==="?"&&(oe=X(oe,1)),this.query="",this.parse(oe,Gt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var oe=this.fragment;return oe?"#"+oe:""},setHash:function(oe){if(oe=E(oe),oe===""){this.fragment=null;return}I(oe,0)==="#"&&(oe=X(oe,1)),this.fragment="",this.parse(oe,Tt)},update:function(){this.query=this.searchParams.serialize()||null}};var Nn=function(Ee){var le=d(this,ct),re=N(arguments.length,1)>1?arguments[1]:void 0,ye=j(le,new ri(Ee,!1,re));e||(le.href=ye.serialize(),le.origin=ye.getOrigin(),le.protocol=ye.getProtocol(),le.username=ye.getUsername(),le.password=ye.getPassword(),le.host=ye.getHost(),le.hostname=ye.getHostname(),le.port=ye.getPort(),le.pathname=ye.getPathname(),le.search=ye.getSearch(),le.searchParams=ye.getSearchParams(),le.hash=ye.getHash())},ct=Nn.prototype,Lt=function(oe,Ee){return{get:function(){return M(this)[oe]()},set:Ee&&function(le){return M(this)[Ee](le)},configurable:!0,enumerable:!0}};if(e&&(f(ct,"href",Lt("serialize","setHref")),f(ct,"origin",Lt("getOrigin")),f(ct,"protocol",Lt("getProtocol","setProtocol")),f(ct,"username",Lt("getUsername","setUsername")),f(ct,"password",Lt("getPassword","setPassword")),f(ct,"host",Lt("getHost","setHost")),f(ct,"hostname",Lt("getHostname","setHostname")),f(ct,"port",Lt("getPort","setPort")),f(ct,"pathname",Lt("getPathname","setPathname")),f(ct,"search",Lt("getSearch","setSearch")),f(ct,"searchParams",Lt("getSearchParams")),f(ct,"hash",Lt("getHash","setHash"))),c(ct,"toJSON",function(){return M(this).serialize()},{enumerable:!0}),c(ct,"toString",function(){return M(this).serialize()},{enumerable:!0}),G){var Sn=G.createObjectURL,fo=G.revokeObjectURL;Sn&&c(Nn,"createObjectURL",u(Sn,G)),fo&&c(Nn,"revokeObjectURL",u(fo,G))}return P(Nn,"URL"),r({global:!0,constructor:!0,forced:!n,sham:!e},{URL:Nn}),Qy}var um;function LI(){return um||(um=1,jI()),Zy}LI();var sm={},lm;function AI(){if(lm)return sm;lm=1;var r=De(),e=Dr();return r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return e(URL.prototype.toString,this)}}),sm}AI();var cm={},fm;function NI(){return fm||(fm=1,om()),cm}NI();var dm={},vm;function DI(){if(vm)return dm;vm=1;var r=dt(),e=or(),n=vt(),o=Vo(),u=URLSearchParams,l=u.prototype,c=e(l.append),f=e(l.delete),d=e(l.forEach),p=e([].push),g=new u("a=1&a=2&b=3");return g.delete("a",1),g.delete("b",void 0),g+""!="a=2"&&r(l,"delete",function(S){var y=arguments.length,b=y<2?void 0:arguments[1];if(y&&b===void 0)return f(this,S);var C=[];d(this,function(K,$){p(C,{key:$,value:K})}),o(y,1);for(var E=n(S),P=n(b),N=0,k=0,D=!1,j=C.length,M;N<j;)M=C[N++],D||M.key===E?(D=!0,f(this,M.key)):k++;for(;k<j;)M=C[k++],M.key===E&&M.value===P||c(this,M.key,M.value)},{enumerable:!0,unsafe:!0}),dm}DI();var pm={},hm;function MI(){if(hm)return pm;hm=1;var r=dt(),e=or(),n=vt(),o=Vo(),u=URLSearchParams,l=u.prototype,c=e(l.getAll),f=e(l.has),d=new u("a=1");return(d.has("a",2)||!d.has("a",void 0))&&r(l,"has",function(g){var S=arguments.length,y=S<2?void 0:arguments[1];if(S&&y===void 0)return f(this,g);var b=c(this,g);o(S,1);for(var C=n(y),E=0;E<b.length;)if(b[E++]===C)return!0;return!1},{enumerable:!0,unsafe:!0}),pm}MI();var ym={},mm;function FI(){if(mm)return ym;mm=1;var r=wr(),e=or(),n=mn(),o=URLSearchParams.prototype,u=e(o.forEach);return r&&!("size"in o)&&n(o,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),ym}FI();var gm={},Sm;function UI(){if(Sm)return gm;Sm=1;var r=De(),e=or(),n=Date,o=e(n.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return o(new n)}}),gm}UI();var Cm={},dv,wm;function qI(){if(wm)return dv;wm=1;var r=za(),e=vt(),n=di(),o=RangeError;return dv=function(l){var c=e(n(this)),f="",d=r(l);if(d<0||d===1/0)throw new o("Wrong number of repetitions");for(;d>0;(d>>>=1)&&(c+=c))d&1&&(f+=c);return f},dv}var vv,bm;function $I(){if(bm)return vv;bm=1;var r=or(),e=u6(),n=vt(),o=qI(),u=di(),l=r(o),c=r("".slice),f=Math.ceil,d=function(p){return function(g,S,y){var b=n(u(g)),C=e(S),E=b.length,P=y===void 0?" ":n(y),N,k;return C<=E||P===""?b:(N=C-E,k=l(P,f(N/P.length)),k.length>N&&(k=c(k,0,N)),p?b+k:k+b)}};return vv={start:d(!1),end:d(!0)},vv}var pv,Em;function BI(){if(Em)return pv;Em=1;var r=or(),e=ur(),n=$I().start,o=RangeError,u=isFinite,l=Math.abs,c=Date.prototype,f=c.toISOString,d=r(c.getTime),p=r(c.getUTCDate),g=r(c.getUTCFullYear),S=r(c.getUTCHours),y=r(c.getUTCMilliseconds),b=r(c.getUTCMinutes),C=r(c.getUTCMonth),E=r(c.getUTCSeconds);return pv=e(function(){return f.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!e(function(){f.call(new Date(NaN))})?function(){if(!u(d(this)))throw new o("Invalid time value");var N=this,k=g(N),D=y(N),j=k<0?"-":k>9999?"+":"";return j+n(l(k),j?6:4,0)+"-"+n(C(N)+1,2,0)+"-"+n(p(N),2,0)+"T"+n(S(N),2,0)+":"+n(b(N),2,0)+":"+n(E(N),2,0)+"."+n(D,3,0)+"Z"}:f,pv}var _m;function WI(){if(_m)return Cm;_m=1;var r=De(),e=BI();return r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==e},{toISOString:e}),Cm}WI();function Bu(r){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bu(r)}function VI(r,e){return KI(r)||GI(r,e)||HI(r,e)||zI()}function zI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
80
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HI(r,e){if(r){if(typeof r=="string")return Om(r,e);var n={}.toString.call(r).slice(8,-1);return n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set"?Array.from(r):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Om(r,e):void 0}}function Om(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,o=Array(e);n<e;n++)o[n]=r[n];return o}function GI(r,e){var n=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var o,u,l,c,f=[],d=!0,p=!1;try{if(l=(n=n.call(r)).next,e!==0)for(;!(d=(o=l.call(n)).done)&&(f.push(o.value),f.length!==e);d=!0);}catch(g){p=!0,u=g}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw u}}return f}}function KI(r){if(Array.isArray(r))return r}function ZI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function QI(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,Rm(o.key),o)}}function YI(r,e,n){return e&&QI(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function sl(r,e,n){return(e=Rm(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Rm(r){var e=XI(r,"string");return Bu(e)=="symbol"?e:e+""}function XI(r,e){if(Bu(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(Bu(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var JI=function(){function r(){ZI(this,r),sl(this,"_domains",[]),sl(this,"_transports",[]),sl(this,"_logs",[]),sl(this,"_prevTime",0);try{if(!window.localStorage)return;var e=window.localStorage.getItem("logger");if(!e)return;var n=e.split(">"),o=VI(n,2),u=o[0],l=o[1];this._domains=u.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return YI(r,[{key:"create",value:function(n,o){var u=this;return function(l){var c=Date.now(),f=new Date(c).toISOString(),d=0;if(u._prevTime&&(d=c-u._prevTime),u._prevTime=c,u._domains.includes(n)&&u._transports.includes("console")){var p=(o==null?void 0:o.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(p,";"),"".concat(f," ").concat(n),"",l,"color: ".concat(p,";"),d)}u._logs.push("".concat(f," ").concat(n,": ").concat(l," +").concat(d,"ms"))}}},{key:"getLogs",value:function(){return this._logs}},{key:"clearLogs",value:function(){this._logs=[]}},{key:"saveLogsToFile",value:function(){if(!(!this._transports.includes("file")||!this._logs.length)){var n=this._logs.join(`
|
|
81
|
-
`),o=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(o),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this.clearLogs()}}}])}(),na=new JI;function so(r){"@babel/helpers - typeof";return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},so(r)}function _r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */_r=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&so(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(so(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function Im(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function xt(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){Im(l,o,u,c,f,"next",d)}function f(d){Im(l,o,u,c,f,"throw",d)}c(void 0)})}}function ex(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function rx(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,xm(o.key),o)}}function tx(r,e,n){return e&&rx(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function ia(r,e,n){return(e=xm(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function xm(r){var e=nx(r,"string");return so(e)=="symbol"?e:e+""}function nx(r,e){if(so(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(so(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var oa=na.create("session_log"),ix=function(){function r(e){ex(this,r),ia(this,"_worker",null),ia(this,"_initialized",!1),ia(this,"_connectedToIdv",!1),ia(this,"_serviceRunning",!1),ia(this,"_userId",vE(pw)),ia(this,"_setErrorScreen",null),e&&(this._setErrorScreen=e)}return tx(r,[{key:"init",value:function(){var e=xt(_r().mark(function o(){var u,l,c,f;return _r().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=1,p.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.5/3cd4db9-dc872ea28//PlatformAdaptor.worker.js");case 4:return u=p.sent,p.next=7,u.blob();case 7:l=p.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),p.next=15;break;case 12:p.prev=12,p.t0=p.catch(1),console.log("Creating worker error: ".concat(JSON.stringify(p.t0)));case 15:p.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){p.next=20;break}return p.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),p.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.5/3cd4db9-dc872ea28/",preMain:!0});case 23:return f=p.sent,p.abrupt("return",f);case 25:case"end":return p.stop()}},o,this,[[1,12]])}));function n(){return e.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var e=xt(_r().mark(function o(u){var l,c;return _r().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bd.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(l=u.isSecure)!==null&&l!==void 0?l:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),d.abrupt("return",c);case 5:case"end":return d.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var e=xt(_r().mark(function o(u){var l;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bd.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),f.abrupt("return",l);case 5:case"end":return f.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var e=xt(_r().mark(function o(u,l,c){var f,d;return _r().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return f={workflowId:u,locale:l},pE(c)&&(f.metadata=c),g.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=g.sent,d.code===0&&(na.clearLogs(),oa("Command: 5. Result code: ".concat(d.code,". Session id: ").concat(d.data.id,". Cur step: ").concat(d.data.currentStep,"."))),g.abrupt("return",d);case 7:case"end":return g.stop()}},o,this)}));function n(o,u,l){return e.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var e=xt(_r().mark(function o(u,l){var c,f;return _r().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c={sessionId:u,locale:l},p.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=p.sent,f.code===0&&(na.clearLogs(),oa("Command: 10. Result code: ".concat(f.code,". Session id: ").concat(f.data.id,". Cur step: ").concat(f.data.currentStep,"."))),p.abrupt("return",f);case 6:case"end":return p.stop()}},o,this)}));function n(o,u){return e.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var e=xt(_r().mark(function o(){var u,l,c=arguments;return _r().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,d.abrupt("return",l);case 5:case"end":return d.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var e=xt(_r().mark(function o(u){var l;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var e=xt(_r().mark(function o(u,l){var c;return _r().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return oa("Command: 9. Request payload: ".concat(JSON.stringify(l))),d.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=d.sent,oa("Command: 9. Result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},o,this)}));function n(o,u){return e.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,oa("Command: 7. Result code: ".concat(u.code,". Cur step: ").concat(u.data.currentStep,". Proc files: ").concat(u.data.isProcessingFiles)),c.abrupt("return",u);case 5:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,oa("Command: 8. Result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"pushSessionLogs",value:function(){var e=xt(_r().mark(function o(u){var l;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_session_logs",pushSessionLogsParams:u,preMain:!0});case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,c.abrupt("return",u);case 6:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var e=xt(_r().mark(function o(u){var l=this;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,p){if(!l._worker)return p();l._worker.onmessage=function(g){var S=g.data.target;if(S!=="stdout"){if(S==="custom"){var y=g.data,b=y.method,C=y.data;b==="onRuntimeInitialized"&&(l._initialized=!0),d(C)}if(S==="stderr"){var E=g.data.content;l._setErrorScreen&&l._setErrorScreen(E)}}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()}])}();function lo(r){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lo(r)}function Pm(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function Wu(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pm(Object(n),!0).forEach(function(o){ox(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Pm(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function ox(r,e,n){return(e=ax(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function ax(r){var e=ux(r,"string");return lo(e)=="symbol"?e:e+""}function ux(r,e){if(lo(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(lo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Yr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Yr=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&lo(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(lo(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function Tm(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function Ln(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){Tm(l,o,u,c,f,"next",d)}function f(d){Tm(l,o,u,c,f,"throw",d)}c(void 0)})}}var sx=function(e,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var o=Ln(Yr().mark(function l(){var c;return Yr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new ix,d.next=3,c.init();case 3:e({wasmService:c});case 4:case"end":return d.stop()}},l)}));function u(){return o.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){e({isFinalWaitingUi:u})},connectToIdv:function(u){return Ln(Yr().mark(function l(){var c,f,d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=y.sent,p=null,d.code===4&&(p=Xi.HTTP_ISSUE),d.code!==0&&d.code!==4&&(p=Xi.PROVIDER_ERROR),p===null){y.next=12;break}return g=new Su({errorCode:p}),y.abrupt("return",{error:g});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return Ln(Yr().mark(function l(){var c,f,d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,d=null,f.code===4&&(d=Xi.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=Xi.PROVIDER_ERROR),d===null){y.next=13;break}return p=new Su({errorCode:d}),g=new Hs({errorCode:_d.CONNECTION_ISSUE,underlyingBaseError:p}),y.abrupt("return",{workflows:[],error:g});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var d,p=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,g=Wu(Wu({},f.results),{},{sessionId:p}),S=Wu({results:g},f.error&&{error:f.error});if(n().setCurrentSessionDataLsAndStore(null),u(S),f.error){var y=na.getLogs(),b=y.join("; ");n().wasmService.pushSessionLogs({sessionId:p,body:{log:b,errorCode:f.error.shortChain,deviceInfo:{platform:"Web"}}})}na.clearLogs()};e(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var o=Ln(Yr().mark(function l(c){var f,d,p;return Yr().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,S.next=3,lx(c);case 3:return f=S.sent,e(function(){return{externalModules:f}}),S.abrupt("return",{});case 8:return S.prev=8,S.t0=S.catch(0),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),p=new gu({errorCode:iu.MODULES_INSTANTIATION_FAILURE}),S.abrupt("return",{error:p});case 15:case"end":return S.stop()}},l,null,[[0,8]])}));function u(l){return o.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=k0(u.find(function(c){return c.templateId===Od}));l.templateLayout=t7(l.templateLayout,n().layout),e({processingTransformedTemplate:l})},setIsProcessing:function(u){e({isProcessing:u})},_pushStep:function(){var o=Ln(Yr().mark(function l(c,f){var d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,p=function(){var b=Ln(Yr().mark(function C(){var E,P,N,k;return Yr().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,n().wasmService.pushData(c,f);case 2:if(E=j.sent,P=null,E.code===4&&(P=gn.HTTP_ISSUE),E.code!==0&&E.code!==4&&(P=gn.PROVIDER_ERROR),P!==null&&(N=new Zo({errorCode:gn.HTTP_ISSUE}),k=new Rt({errorCode:Ot.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:N}),d=k),E.code!==0){j.next=12;break}return d=null,j.abrupt("return",E);case 12:return j.abrupt("return",null);case 13:case"end":return j.stop()}},C)}));return function(){return b.apply(this,arguments)}}(),g=function(){return null},y.next=5,L0(p,g);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return o.apply(this,arguments)}return u}(),_findStepById:function(u){var l=n().workflow;if(!l||!u)return null;var c=l.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var o=Ln(Yr().mark(function l(){var c,f,d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=null,f=function(){var b=Ln(Yr().mark(function C(){var E,P,N,k,D,j,M,K,$,G,ee,_,m,O;return Yr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,n().wasmService.getSessionState();case 2:if(k=x.sent,D=(E=k.data)===null||E===void 0?void 0:E.currentStep,j=(P=k.data)===null||P===void 0?void 0:P.isProcessingFiles,M=(N=k.data)===null||N===void 0||(N=N.workflow)===null||N===void 0?void 0:N.steps,K=cE(M,D),$=k.code===4,G=k.code!==0&&k.code!==4,ee=k.code===0&&(!k.data.workflow||!k.data.currentStep),_=null,M&&!K&&(_=gn.NOT_DATA_TYPE),$&&(_=gn.HTTP_ISSUE),G&&(_=gn.PROVIDER_ERROR),j&&(_=gn.IS_PROCESSING),ee&&(_=gn.DECODING_FAILED),_!==null&&(m=new Zo({errorCode:_}),O=new Rt({errorCode:Ot.INTERNAL_ISSUE,underlyingBaseError:m}),c=O),!(K&&!j&&!$&&!G&&!ee)){x.next=20;break}return c=null,x.abrupt("return",k.data);case 20:return x.abrupt("return",null);case 21:case"end":return x.stop()}},C)}));return function(){return b.apply(this,arguments)}}(),d=function(){return null},y.next=5,L0(f,d);case 5:if(p=y.sent,!c){y.next=8;break}return y.abrupt("return",{error:c});case 8:if(!p){y.next=10;break}return y.abrupt("return",{sessionData:p});case 10:return c=new Zo({errorCode:gn.DECODING_FAILED}),g=new Rt({errorCode:Ot.INTERNAL_ISSUE,underlyingBaseError:c}),y.abrupt("return",{error:g});case 13:case"end":return y.stop()}},l)}));function u(){return o.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||n().currentStepId;if(l){var c=n()._findStepById(l);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:tu.MESSAGE,message:nu.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var o=Ln(Yr().mark(function l(c){var f,d,p,g,S,y,b,C,E;return Yr().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(f=n().currentStepId,f){N.next=3;break}return N.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){N.next=7;break}return n().setFinalStepAndStopProcess(),N.abrupt("return");case 7:if(!(c instanceof Qr)){N.next=13;break}return d=c,p=new Rt({errorCode:Ot.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:p}),n().resetSession(),N.abrupt("return");case 13:return N.next=15,n()._pushStep(f,c);case 15:if(g=N.sent,!g.error){N.next=20;break}return n().workflowSessionCompletion({error:g.error}),n().resetSession(),N.abrupt("return");case 20:return N.next=22,n()._waitingForNextStep();case 22:if(S=N.sent,!S.error){N.next=27;break}return n().workflowSessionCompletion({error:S.error}),n().resetSession(),N.abrupt("return");case 27:if(y=S.sessionData.workflow,b=S.sessionData.currentStep,n().setWorkflow(y),n().setLayout(y.client.layout),n().setProcessingTemplate(y.client.steps),n().setSessionProperties(S.sessionData.properties),C=n()._findStepById(b),E=function(D){return!!D&&Object.prototype.toString.call(D)==="[object Object]"&&D.templateId},!(C!=null&&C.final&&!E(C.client))){N.next=38;break}return n().setFinalStepAndStopProcess(C.id),N.abrupt("return");case 38:C!=null&&C.final&&E(C.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(b),n().setIsProcessing(!1);case 41:case"end":return N.stop()}},l)}));function u(l){return o.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return e(function(){return{currentScreenConfig:null}});var l=n().workflow,c=n().sessionProperties,f=null;if(u===Od&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var p,g,S=n()._findStepById(u);if(typeof(S==null||(p=S.client)===null||p===void 0?void 0:p.templateId)=="string"){var y;f=Wu(Wu({},S==null?void 0:S.client),{},{templateId:S.client.templateId,dataSource:(y=S.dataSource)!==null&&y!==void 0?y:null,properties:c})}if(f){var b;f.sessionId=(b=n().currentSessionData)===null||b===void 0?void 0:b.sessionId,f.serviceToken=n().serviceToken}if(f&&hE(S==null||(g=S.client)===null||g===void 0?void 0:g.templateLayout)){var C=t7(S.client.templateLayout,n().layout);C&&(f.templateLayout=C)}}var E=lE(n().externalModules,l.steps,u);if(f===null||!E){var P=new Rt({errorCode:Ot.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:P}),e(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),e(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var o=Ln(Yr().mark(function l(){var c,f;return Yr().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=p.sent,n().resetWasmService(),n().externalModules.forEach(function(g){g.component.deinitialize&&g.component.isReady&&g.component.deinitialize()}),(f==null?void 0:f.code)!==0){p.next=7;break}return p.abrupt("return",{});case 7:return p.abrupt("return",{});case 8:case"end":return p.stop()}},l)}));function u(){return o.apply(this,arguments)}return u}(),resetSession:function(){return e(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return e(function(){return{wasmService:null}})}}};function lx(r){return hv.apply(this,arguments)}function hv(){return hv=Ln(Yr().mark(function r(e){var n,o,u,l,c;return Yr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:for(n=[],o=0,u=e;o<u.length;o++)l=u[o],l&&n.push({id:l.getIdentifier(),supportedTemplates:l.getSupportedTemplates(),component:l});return c=n.filter(function(p){return p!==null}),d.abrupt("return",c);case 4:case"end":return d.stop()}},r)})),hv.apply(this,arguments)}function Vu(r){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vu(r)}function km(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function yv(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?km(Object(n),!0).forEach(function(o){cx(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function cx(r,e,n){return(e=fx(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function fx(r){var e=dx(r,"string");return Vu(e)=="symbol"?e:e+""}function dx(r,e){if(Vu(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(Vu(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var lt=sb(function(){return yv(yv(yv({},bE.apply(void 0,arguments)),II.apply(void 0,arguments)),sx.apply(void 0,arguments))}),jm=function(e){var n=e.children;return w.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1e3},children:n})};function zu(r){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zu(r)}function Lm(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function Am(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lm(Object(n),!0).forEach(function(o){vx(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function vx(r,e,n){return(e=px(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function px(r){var e=hx(r,"string");return zu(e)=="symbol"?e:e+""}function hx(r,e){if(zu(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(zu(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Nm=function(e){var n=e.config,o=e.tagName,u=lr.useRef(null);return lr.useEffect(function(){u.current&&u.current.setProps(n)},[n]),lr.createElement(o,{ref:u,style:{width:"100%",height:"100%"}})},yx=function(){var e=lt(function(C){return C.currentScreenConfig}),n=lt(function(C){return C.pushStepWaitNextStepAndSet}),o=lt(function(C){return C.processingTransformedTemplate}),u=lt(function(C){return C.isProcessing}),l=lt(function(C){return C.setIsProcessing}),c=lt(function(C){return C.listener}),f=lt(function(C){return C.externalModules}),d=lt(function(C){return C.modulesConfig}),p=function(E,P){c({eventType:tu.MESSAGE,message:P,module:E})},g=function(E){l(E)},S=function(E){l(!1),n(E)},y=lr.useCallback(function(){var C=f.find(function(E){return E.supportedTemplates.includes("PROGRESS")});return C&&o?w.jsx(Nm,{config:{perform:S,moduleProps:Am(Am({},o),{},{templateId:"PROGRESS"}),modulesConfig:d,idvEventListener:p,isProcessing:g},tagName:C==null?void 0:C.id}):"Processing..."},[f,e,o]),b=lr.useCallback(function(){if(!e)return null;var C=f.find(function(E){return E.supportedTemplates.includes(e.templateId)});if(C&&e)return w.jsx(Nm,{config:{perform:S,moduleProps:e,modulesConfig:d,idvEventListener:p,isProcessing:g},tagName:C==null?void 0:C.id})},[e,f]);return!e&&!o?w.jsx(Fd,{direction:qs.Ltr,children:w.jsx(jm,{children:"Waiting for play... or process completed"})}):w.jsx(w.Fragment,{children:w.jsx(Fd,{direction:qs.Ltr,children:w.jsxs(w.Fragment,{children:[u&&w.jsx(jm,{children:y()}),b()]})})})};function mx(){return w.jsx(lr.StrictMode,{children:w.jsx(Fw,{children:w.jsx(yx,{})})})}function aa(r){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(r)}function gx(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Dm(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,Fm(o.key),o)}}function Sx(r,e,n){return e&&Dm(r.prototype,e),n&&Dm(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Cx(r,e,n){return e=Gu(e),wx(r,gv()?Reflect.construct(e,[],Gu(r).constructor):e.apply(r,n))}function wx(r,e){if(e&&(aa(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bx(r)}function bx(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Ex(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Hu(r,e)}function mv(r){var e=typeof Map=="function"?new Map:void 0;return mv=function(o){if(o===null||!Ox(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(o))return e.get(o);e.set(o,u)}function u(){return _x(o,arguments,Gu(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Hu(u,o)},mv(r)}function _x(r,e,n){if(gv())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var u=new(r.bind.apply(r,o));return n&&Hu(u,n.prototype),u}function gv(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gv=function(){return!!r})()}function Ox(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch(e){return typeof r=="function"}}function Hu(r,e){return Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Hu(r,e)}function Gu(r){return Gu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gu(r)}function Mm(r,e,n){return(e=Fm(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Fm(r){var e=Rx(r,"string");return aa(e)=="symbol"?e:e+""}function Rx(r,e){if(aa(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(aa(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Ix="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",Um=function(r){function e(){var n;return gx(this,e),n=Cx(this,e),Mm(n,"_root",U3.createRoot(n.attachShadow({mode:"open"}))),Mm(n,"_mounted",!1),n}return Ex(e,r),Sx(e,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.5.179-nightly".trim())}},{key:"render",value:function(){this._root.render(w.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[w.jsx("style",{nonce:lt.getState().getNonce(),children:Ix}),w.jsx(mx,{})]}))}},{key:"disconnectedCallback",value:function(){var o=this;setTimeout(function(){o._mounted&&(o._mounted=!1,o._root.unmount(),na.clearLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(mv(HTMLElement));function co(r){"@babel/helpers - typeof";return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},co(r)}function ln(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ln=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&co(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(co(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function qm(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function ua(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){qm(l,o,u,c,f,"next",d)}function f(d){qm(l,o,u,c,f,"throw",d)}c(void 0)})}}function xx(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Px(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,kx(o.key),o)}}function Tx(r,e,n){return e&&Px(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function kx(r){var e=jx(r,"string");return co(e)=="symbol"?e:e+""}function jx(r,e){if(co(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(co(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Lx=function(){function r(){xx(this,r)}return Tx(r,[{key:"initialize",value:function(){var e=ua(ln().mark(function o(u){var l;return ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=lt.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"configure",value:function(){var e=ua(ln().mark(function o(u){var l,c;return ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,lt.getState().configure(u);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,lt.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var e=ua(ln().mark(function o(u){var l;return ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,lt.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var e=ua(ln().mark(function o(u){var l,c;return ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=u.workflowId,d.next=3,lt.getState().prepareWorkflowAndPrepareUi(l);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var e=ua(ln().mark(function o(u){var l,c,f,d;return ln().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return l=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=gE(l),g.next=5,lt.getState().startNewSession(f,c);case 5:if(d=g.sent,!d.error){g.next=8;break}return g.abrupt("return",d);case 8:return g.abrupt("return",new Promise(function(S){var y=function(C){S(C)};lt.getState().playWorkflow(y)}));case 9:case"end":return g.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var e=ua(ln().mark(function o(){var u;return ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,lt.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o)}));function n(){return e.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.5.179-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){lt.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}lt.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){lt.getState().setSessionRestoreMode(n)}}])}(),Ax=window.customElements.get("idv-flow");return Ax||window.customElements.define("idv-flow",Um),Er.ConnectionError=Xi,Er.DeinitializationError=ou,Er.IdvEventTypesEnum=tu,Er.IdvIntegrationService=Lx,Er.IdvModules=lw,Er.IdvServiceMessages=nu,Er.IdvWebComponent=Um,Er.InitializeError=iu,Er.PrepareWorkflowError=Vn,Er.ScenarioError=Ot,Er.SessionError=gn,Er.StartSessionError=Yi,Er.WorkflowError=Tn,Object.defineProperty(Er,Symbol.toStringTag,{value:"Module"}),Er}({});
|
|
81
|
+
`),o=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(o),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this.clearLogs()}}}])}(),na=new JI;function so(r){"@babel/helpers - typeof";return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},so(r)}function _r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */_r=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&so(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(so(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function Im(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function xt(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){Im(l,o,u,c,f,"next",d)}function f(d){Im(l,o,u,c,f,"throw",d)}c(void 0)})}}function ex(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function rx(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,xm(o.key),o)}}function tx(r,e,n){return e&&rx(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function ia(r,e,n){return(e=xm(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function xm(r){var e=nx(r,"string");return so(e)=="symbol"?e:e+""}function nx(r,e){if(so(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(so(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var oa=na.create("session_log"),ix=function(){function r(e){ex(this,r),ia(this,"_worker",null),ia(this,"_initialized",!1),ia(this,"_connectedToIdv",!1),ia(this,"_serviceRunning",!1),ia(this,"_userId",vE(pw)),ia(this,"_setErrorScreen",null),e&&(this._setErrorScreen=e)}return tx(r,[{key:"init",value:function(){var e=xt(_r().mark(function o(){var u,l,c,f;return _r().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=1,p.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.5/635e251-06ed10567//PlatformAdaptor.worker.js");case 4:return u=p.sent,p.next=7,u.blob();case 7:l=p.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),p.next=15;break;case 12:p.prev=12,p.t0=p.catch(1),console.log("Creating worker error: ".concat(JSON.stringify(p.t0)));case 15:p.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){p.next=20;break}return p.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),p.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.5/635e251-06ed10567/",preMain:!0});case 23:return f=p.sent,p.abrupt("return",f);case 25:case"end":return p.stop()}},o,this,[[1,12]])}));function n(){return e.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var e=xt(_r().mark(function o(u){var l,c;return _r().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bd.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(l=u.isSecure)!==null&&l!==void 0?l:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),d.abrupt("return",c);case 5:case"end":return d.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var e=xt(_r().mark(function o(u){var l;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bd.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),f.abrupt("return",l);case 5:case"end":return f.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var e=xt(_r().mark(function o(u,l,c){var f,d;return _r().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return f={workflowId:u,locale:l},pE(c)&&(f.metadata=c),g.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=g.sent,d.code===0&&(na.clearLogs(),oa("Command: 5. Result code: ".concat(d.code,". Session id: ").concat(d.data.id,". Cur step: ").concat(d.data.currentStep,"."))),g.abrupt("return",d);case 7:case"end":return g.stop()}},o,this)}));function n(o,u,l){return e.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var e=xt(_r().mark(function o(u,l){var c,f;return _r().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c={sessionId:u,locale:l},p.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=p.sent,f.code===0&&(na.clearLogs(),oa("Command: 10. Result code: ".concat(f.code,". Session id: ").concat(f.data.id,". Cur step: ").concat(f.data.currentStep,"."))),p.abrupt("return",f);case 6:case"end":return p.stop()}},o,this)}));function n(o,u){return e.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var e=xt(_r().mark(function o(){var u,l,c=arguments;return _r().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,d.abrupt("return",l);case 5:case"end":return d.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var e=xt(_r().mark(function o(u){var l;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var e=xt(_r().mark(function o(u,l){var c;return _r().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return oa("Command: 9. Request payload: ".concat(JSON.stringify(l))),d.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=d.sent,oa("Command: 9. Result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},o,this)}));function n(o,u){return e.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,oa("Command: 7. Result code: ".concat(u.code,". Cur step: ").concat(u.data.currentStep,". Proc files: ").concat(u.data.isProcessingFiles)),c.abrupt("return",u);case 5:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,oa("Command: 8. Result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"pushSessionLogs",value:function(){var e=xt(_r().mark(function o(u){var l;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_session_logs",pushSessionLogsParams:u,preMain:!0});case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},o,this)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,c.abrupt("return",u);case 6:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var e=xt(_r().mark(function o(u){var l=this;return _r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,p){if(!l._worker)return p();l._worker.onmessage=function(g){var S=g.data.target;if(S!=="stdout"){if(S==="custom"){var y=g.data,b=y.method,C=y.data;b==="onRuntimeInitialized"&&(l._initialized=!0),d(C)}if(S==="stderr"){var E=g.data.content;l._setErrorScreen&&l._setErrorScreen(E)}}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var e=xt(_r().mark(function o(){var u;return _r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},o,this)}));function n(){return e.apply(this,arguments)}return n}()}])}();function lo(r){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lo(r)}function Pm(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function Wu(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pm(Object(n),!0).forEach(function(o){ox(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Pm(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function ox(r,e,n){return(e=ax(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function ax(r){var e=ux(r,"string");return lo(e)=="symbol"?e:e+""}function ux(r,e){if(lo(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(lo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Yr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Yr=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&lo(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(lo(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function Tm(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function Ln(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){Tm(l,o,u,c,f,"next",d)}function f(d){Tm(l,o,u,c,f,"throw",d)}c(void 0)})}}var sx=function(e,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var o=Ln(Yr().mark(function l(){var c;return Yr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new ix,d.next=3,c.init();case 3:e({wasmService:c});case 4:case"end":return d.stop()}},l)}));function u(){return o.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){e({isFinalWaitingUi:u})},connectToIdv:function(u){return Ln(Yr().mark(function l(){var c,f,d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=y.sent,p=null,d.code===4&&(p=Xi.HTTP_ISSUE),d.code!==0&&d.code!==4&&(p=Xi.PROVIDER_ERROR),p===null){y.next=12;break}return g=new Su({errorCode:p}),y.abrupt("return",{error:g});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return Ln(Yr().mark(function l(){var c,f,d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,d=null,f.code===4&&(d=Xi.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=Xi.PROVIDER_ERROR),d===null){y.next=13;break}return p=new Su({errorCode:d}),g=new Hs({errorCode:_d.CONNECTION_ISSUE,underlyingBaseError:p}),y.abrupt("return",{workflows:[],error:g});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var d,p=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,g=Wu(Wu({},f.results),{},{sessionId:p}),S=Wu({results:g},f.error&&{error:f.error});if(n().setCurrentSessionDataLsAndStore(null),u(S),f.error){var y=na.getLogs(),b=y.join("; ");n().wasmService.pushSessionLogs({sessionId:p,body:{log:b,errorCode:f.error.shortChain,deviceInfo:{platform:"Web"}}})}na.clearLogs()};e(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var o=Ln(Yr().mark(function l(c){var f,d,p;return Yr().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,S.next=3,lx(c);case 3:return f=S.sent,e(function(){return{externalModules:f}}),S.abrupt("return",{});case 8:return S.prev=8,S.t0=S.catch(0),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),p=new gu({errorCode:iu.MODULES_INSTANTIATION_FAILURE}),S.abrupt("return",{error:p});case 15:case"end":return S.stop()}},l,null,[[0,8]])}));function u(l){return o.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=k0(u.find(function(c){return c.templateId===Od}));l.templateLayout=t7(l.templateLayout,n().layout),e({processingTransformedTemplate:l})},setIsProcessing:function(u){e({isProcessing:u})},_pushStep:function(){var o=Ln(Yr().mark(function l(c,f){var d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,p=function(){var b=Ln(Yr().mark(function C(){var E,P,N,k;return Yr().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,n().wasmService.pushData(c,f);case 2:if(E=j.sent,P=null,E.code===4&&(P=gn.HTTP_ISSUE),E.code!==0&&E.code!==4&&(P=gn.PROVIDER_ERROR),P!==null&&(N=new Zo({errorCode:gn.HTTP_ISSUE}),k=new Rt({errorCode:Ot.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:N}),d=k),E.code!==0){j.next=12;break}return d=null,j.abrupt("return",E);case 12:return j.abrupt("return",null);case 13:case"end":return j.stop()}},C)}));return function(){return b.apply(this,arguments)}}(),g=function(){return null},y.next=5,L0(p,g);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return o.apply(this,arguments)}return u}(),_findStepById:function(u){var l=n().workflow;if(!l||!u)return null;var c=l.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var o=Ln(Yr().mark(function l(){var c,f,d,p,g;return Yr().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=null,f=function(){var b=Ln(Yr().mark(function C(){var E,P,N,k,D,j,M,K,$,G,ee,_,m,O;return Yr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,n().wasmService.getSessionState();case 2:if(k=x.sent,D=(E=k.data)===null||E===void 0?void 0:E.currentStep,j=(P=k.data)===null||P===void 0?void 0:P.isProcessingFiles,M=(N=k.data)===null||N===void 0||(N=N.workflow)===null||N===void 0?void 0:N.steps,K=cE(M,D),$=k.code===4,G=k.code!==0&&k.code!==4,ee=k.code===0&&(!k.data.workflow||!k.data.currentStep),_=null,M&&!K&&(_=gn.NOT_DATA_TYPE),$&&(_=gn.HTTP_ISSUE),G&&(_=gn.PROVIDER_ERROR),j&&(_=gn.IS_PROCESSING),ee&&(_=gn.DECODING_FAILED),_!==null&&(m=new Zo({errorCode:_}),O=new Rt({errorCode:Ot.INTERNAL_ISSUE,underlyingBaseError:m}),c=O),!(K&&!j&&!$&&!G&&!ee)){x.next=20;break}return c=null,x.abrupt("return",k.data);case 20:return x.abrupt("return",null);case 21:case"end":return x.stop()}},C)}));return function(){return b.apply(this,arguments)}}(),d=function(){return null},y.next=5,L0(f,d);case 5:if(p=y.sent,!c){y.next=8;break}return y.abrupt("return",{error:c});case 8:if(!p){y.next=10;break}return y.abrupt("return",{sessionData:p});case 10:return c=new Zo({errorCode:gn.DECODING_FAILED}),g=new Rt({errorCode:Ot.INTERNAL_ISSUE,underlyingBaseError:c}),y.abrupt("return",{error:g});case 13:case"end":return y.stop()}},l)}));function u(){return o.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||n().currentStepId;if(l){var c=n()._findStepById(l);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:tu.MESSAGE,message:nu.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var o=Ln(Yr().mark(function l(c){var f,d,p,g,S,y,b,C,E;return Yr().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(f=n().currentStepId,f){N.next=3;break}return N.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){N.next=7;break}return n().setFinalStepAndStopProcess(),N.abrupt("return");case 7:if(!(c instanceof Qr&&c.errorCode)){N.next=13;break}return d=c,p=new Rt({errorCode:Ot.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:p}),n().resetSession(),N.abrupt("return");case 13:return N.next=15,n()._pushStep(f,c);case 15:if(g=N.sent,!g.error){N.next=20;break}return n().workflowSessionCompletion({error:g.error}),n().resetSession(),N.abrupt("return");case 20:return N.next=22,n()._waitingForNextStep();case 22:if(S=N.sent,!S.error){N.next=27;break}return n().workflowSessionCompletion({error:S.error}),n().resetSession(),N.abrupt("return");case 27:if(y=S.sessionData.workflow,b=S.sessionData.currentStep,n().setWorkflow(y),n().setLayout(y.client.layout),n().setProcessingTemplate(y.client.steps),n().setSessionProperties(S.sessionData.properties),C=n()._findStepById(b),E=function(D){return!!D&&Object.prototype.toString.call(D)==="[object Object]"&&D.templateId},!(C!=null&&C.final&&!E(C.client))){N.next=38;break}return n().setFinalStepAndStopProcess(C.id),N.abrupt("return");case 38:C!=null&&C.final&&E(C.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(b),n().setIsProcessing(!1);case 41:case"end":return N.stop()}},l)}));function u(l){return o.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return e(function(){return{currentScreenConfig:null}});var l=n().workflow,c=n().sessionProperties,f=null;if(u===Od&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var p,g,S=n()._findStepById(u);if(typeof(S==null||(p=S.client)===null||p===void 0?void 0:p.templateId)=="string"){var y;f=Wu(Wu({},S==null?void 0:S.client),{},{templateId:S.client.templateId,dataSource:(y=S.dataSource)!==null&&y!==void 0?y:null,properties:c})}if(f){var b;f.sessionId=(b=n().currentSessionData)===null||b===void 0?void 0:b.sessionId,f.serviceToken=n().serviceToken}if(f&&hE(S==null||(g=S.client)===null||g===void 0?void 0:g.templateLayout)){var C=t7(S.client.templateLayout,n().layout);C&&(f.templateLayout=C)}}var E=lE(n().externalModules,l.steps,u);if(f===null||!E){var P=new Rt({errorCode:Ot.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:P}),e(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),e(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var o=Ln(Yr().mark(function l(){var c,f;return Yr().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=p.sent,n().resetWasmService(),n().externalModules.forEach(function(g){g.component.deinitialize&&g.component.isReady&&g.component.deinitialize()}),(f==null?void 0:f.code)!==0){p.next=7;break}return p.abrupt("return",{});case 7:return p.abrupt("return",{});case 8:case"end":return p.stop()}},l)}));function u(){return o.apply(this,arguments)}return u}(),resetSession:function(){return e(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return e(function(){return{wasmService:null}})}}};function lx(r){return hv.apply(this,arguments)}function hv(){return hv=Ln(Yr().mark(function r(e){var n,o,u,l,c;return Yr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:for(n=[],o=0,u=e;o<u.length;o++)l=u[o],l&&n.push({id:l.getIdentifier(),supportedTemplates:l.getSupportedTemplates(),component:l});return c=n.filter(function(p){return p!==null}),d.abrupt("return",c);case 4:case"end":return d.stop()}},r)})),hv.apply(this,arguments)}function Vu(r){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vu(r)}function km(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function yv(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?km(Object(n),!0).forEach(function(o){cx(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function cx(r,e,n){return(e=fx(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function fx(r){var e=dx(r,"string");return Vu(e)=="symbol"?e:e+""}function dx(r,e){if(Vu(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(Vu(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var lt=sb(function(){return yv(yv(yv({},bE.apply(void 0,arguments)),II.apply(void 0,arguments)),sx.apply(void 0,arguments))}),jm=function(e){var n=e.children;return w.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1e3},children:n})};function zu(r){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zu(r)}function Lm(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,o)}return n}function Am(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lm(Object(n),!0).forEach(function(o){vx(r,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(n,o))})}return r}function vx(r,e,n){return(e=px(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function px(r){var e=hx(r,"string");return zu(e)=="symbol"?e:e+""}function hx(r,e){if(zu(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(zu(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Nm=function(e){var n=e.config,o=e.tagName,u=lr.useRef(null);return lr.useEffect(function(){u.current&&u.current.setProps(n)},[n]),lr.createElement(o,{ref:u,style:{width:"100%",height:"100%"}})},yx=function(){var e=lt(function(C){return C.currentScreenConfig}),n=lt(function(C){return C.pushStepWaitNextStepAndSet}),o=lt(function(C){return C.processingTransformedTemplate}),u=lt(function(C){return C.isProcessing}),l=lt(function(C){return C.setIsProcessing}),c=lt(function(C){return C.listener}),f=lt(function(C){return C.externalModules}),d=lt(function(C){return C.modulesConfig}),p=function(E,P){c({eventType:tu.MESSAGE,message:P,module:E})},g=function(E){l(E)},S=function(E){l(!1),n(E)},y=lr.useCallback(function(){var C=f.find(function(E){return E.supportedTemplates.includes("PROGRESS")});return C&&o?w.jsx(Nm,{config:{perform:S,moduleProps:Am(Am({},o),{},{templateId:"PROGRESS"}),modulesConfig:d,idvEventListener:p,isProcessing:g},tagName:C==null?void 0:C.id}):"Processing..."},[f,e,o]),b=lr.useCallback(function(){if(!e)return null;var C=f.find(function(E){return E.supportedTemplates.includes(e.templateId)});if(C&&e)return w.jsx(Nm,{config:{perform:S,moduleProps:e,modulesConfig:d,idvEventListener:p,isProcessing:g},tagName:C==null?void 0:C.id})},[e,f]);return!e&&!o?w.jsx(Fd,{direction:qs.Ltr,children:w.jsx(jm,{children:"Waiting for play... or process completed"})}):w.jsx(w.Fragment,{children:w.jsx(Fd,{direction:qs.Ltr,children:w.jsxs(w.Fragment,{children:[u&&w.jsx(jm,{children:y()}),b()]})})})};function mx(){return w.jsx(lr.StrictMode,{children:w.jsx(Fw,{children:w.jsx(yx,{})})})}function aa(r){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(r)}function gx(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Dm(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,Fm(o.key),o)}}function Sx(r,e,n){return e&&Dm(r.prototype,e),n&&Dm(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Cx(r,e,n){return e=Gu(e),wx(r,gv()?Reflect.construct(e,[],Gu(r).constructor):e.apply(r,n))}function wx(r,e){if(e&&(aa(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bx(r)}function bx(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Ex(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Hu(r,e)}function mv(r){var e=typeof Map=="function"?new Map:void 0;return mv=function(o){if(o===null||!Ox(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(o))return e.get(o);e.set(o,u)}function u(){return _x(o,arguments,Gu(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Hu(u,o)},mv(r)}function _x(r,e,n){if(gv())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var u=new(r.bind.apply(r,o));return n&&Hu(u,n.prototype),u}function gv(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gv=function(){return!!r})()}function Ox(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch(e){return typeof r=="function"}}function Hu(r,e){return Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Hu(r,e)}function Gu(r){return Gu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gu(r)}function Mm(r,e,n){return(e=Fm(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Fm(r){var e=Rx(r,"string");return aa(e)=="symbol"?e:e+""}function Rx(r,e){if(aa(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(aa(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Ix="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",Um=function(r){function e(){var n;return gx(this,e),n=Cx(this,e),Mm(n,"_root",U3.createRoot(n.attachShadow({mode:"open"}))),Mm(n,"_mounted",!1),n}return Ex(e,r),Sx(e,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.5.180-nightly".trim())}},{key:"render",value:function(){this._root.render(w.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[w.jsx("style",{nonce:lt.getState().getNonce(),children:Ix}),w.jsx(mx,{})]}))}},{key:"disconnectedCallback",value:function(){var o=this;setTimeout(function(){o._mounted&&(o._mounted=!1,o._root.unmount(),na.clearLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(mv(HTMLElement));function co(r){"@babel/helpers - typeof";return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},co(r)}function ln(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ln=function(){return e};var r,e={},n=Object.prototype,o=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(_,m,O,I){return Object.defineProperty(_,m,{value:O,enumerable:!I,configurable:!I,writable:!I})}try{d({},"")}catch(_){d=function(O,I,x){return O[I]=x}}function p(_,m,O,I){var x=m&&m.prototype instanceof y?m:y,L=Object.create(x.prototype);return d(L,"_invoke",function(B,Y,T){var V=1;return function(Q,A){if(V===3)throw Error("Generator is already running");if(V===4){if(Q==="throw")throw A;return{value:r,done:!0}}for(T.method=Q,T.arg=A;;){var X=T.delegate;if(X){var ve=M(X,T);if(ve){if(ve===S)continue;return ve}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===1)throw V=4,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=3;var de=g(B,Y,T);if(de.type==="normal"){if(V=T.done?4:2,de.arg===S)continue;return{value:de.arg,done:T.done}}de.type==="throw"&&(V=4,T.method="throw",T.arg=de.arg)}}}(_,O,new G(I||[])),!0),L}function g(_,m,O){try{return{type:"normal",arg:_.call(m,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=p;var S={};function y(){}function b(){}function C(){}var E={};d(E,l,function(){return this});var P=Object.getPrototypeOf,N=P&&P(P(ee([])));N&&N!==n&&o.call(N,l)&&(E=N);var k=C.prototype=y.prototype=Object.create(E);function D(_){["next","throw","return"].forEach(function(m){d(_,m,function(O){return this._invoke(m,O)})})}function j(_,m){function O(x,L,B,Y){var T=g(_[x],_,L);if(T.type!=="throw"){var V=T.arg,Q=V.value;return Q&&co(Q)=="object"&&o.call(Q,"__await")?m.resolve(Q.__await).then(function(A){O("next",A,B,Y)},function(A){O("throw",A,B,Y)}):m.resolve(Q).then(function(A){V.value=A,B(V)},function(A){return O("throw",A,B,Y)})}Y(T.arg)}var I;d(this,"_invoke",function(x,L){function B(){return new m(function(Y,T){O(x,L,Y,T)})}return I=I?I.then(B,B):B()},!0)}function M(_,m){var O=m.method,I=_.i[O];if(I===r)return m.delegate=null,O==="throw"&&_.i.return&&(m.method="return",m.arg=r,M(_,m),m.method==="throw")||O!=="return"&&(m.method="throw",m.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var x=g(I,_.i,m.arg);if(x.type==="throw")return m.method="throw",m.arg=x.arg,m.delegate=null,S;var L=x.arg;return L?L.done?(m[_.r]=L.value,m.next=_.n,m.method!=="return"&&(m.method="next",m.arg=r),m.delegate=null,S):L:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function K(_){this.tryEntries.push(_)}function $(_){var m=_[4]||{};m.type="normal",m.arg=r,_[4]=m}function G(_){this.tryEntries=[[-1]],_.forEach(K,this),this.reset(!0)}function ee(_){if(_!=null){var m=_[l];if(m)return m.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length)){var O=-1,I=function x(){for(;++O<_.length;)if(o.call(_,O))return x.value=_[O],x.done=!1,x;return x.value=r,x.done=!0,x};return I.next=I}}throw new TypeError(co(_)+" is not iterable")}return b.prototype=C,d(k,"constructor",C),d(C,"constructor",b),b.displayName=d(C,f,"GeneratorFunction"),e.isGeneratorFunction=function(_){var m=typeof _=="function"&&_.constructor;return!!m&&(m===b||(m.displayName||m.name)==="GeneratorFunction")},e.mark=function(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,C):(_.__proto__=C,d(_,f,"GeneratorFunction")),_.prototype=Object.create(k),_},e.awrap=function(_){return{__await:_}},D(j.prototype),d(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(_,m,O,I,x){x===void 0&&(x=Promise);var L=new j(p(_,m,O,I),x);return e.isGeneratorFunction(m)?L:L.next().then(function(B){return B.done?B.value:L.next()})},D(k),d(k,f,"Generator"),d(k,l,function(){return this}),d(k,"toString",function(){return"[object Generator]"}),e.keys=function(_){var m=Object(_),O=[];for(var I in m)O.unshift(I);return function x(){for(;O.length;)if((I=O.pop())in m)return x.value=I,x.done=!1,x;return x.done=!0,x}},e.values=ee,G.prototype={constructor:G,reset:function(m){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach($),!m)for(var O in this)O.charAt(0)==="t"&&o.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=r)},stop:function(){this.done=!0;var m=this.tryEntries[0][4];if(m.type==="throw")throw m.arg;return this.rval},dispatchException:function(m){if(this.done)throw m;var O=this;function I(Q){B.type="throw",B.arg=m,O.next=Q}for(var x=O.tryEntries.length-1;x>=0;--x){var L=this.tryEntries[x],B=L[4],Y=this.prev,T=L[1],V=L[2];if(L[0]===-1)return I("end"),!1;if(!T&&!V)throw Error("try statement without catch or finally");if(L[0]!=null&&L[0]<=Y){if(Y<T)return this.method="next",this.arg=r,I(T),!0;if(Y<V)return I(V),!1}}},abrupt:function(m,O){for(var I=this.tryEntries.length-1;I>=0;--I){var x=this.tryEntries[I];if(x[0]>-1&&x[0]<=this.prev&&this.prev<x[2]){var L=x;break}}L&&(m==="break"||m==="continue")&&L[0]<=O&&O<=L[2]&&(L=null);var B=L?L[4]:{};return B.type=m,B.arg=O,L?(this.method="next",this.next=L[2],S):this.complete(B)},complete:function(m,O){if(m.type==="throw")throw m.arg;return m.type==="break"||m.type==="continue"?this.next=m.arg:m.type==="return"?(this.rval=this.arg=m.arg,this.method="return",this.next="end"):m.type==="normal"&&O&&(this.next=O),S},finish:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[2]===m)return this.complete(I[4],I[3]),$(I),S}},catch:function(m){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I[0]===m){var x=I[4];if(x.type==="throw"){var L=x.arg;$(I)}return L}}throw Error("illegal catch attempt")},delegateYield:function(m,O,I){return this.delegate={i:ee(m),r:O,n:I},this.method==="next"&&(this.arg=r),S}},e}function qm(r,e,n,o,u,l,c){try{var f=r[l](c),d=f.value}catch(p){return void n(p)}f.done?e(d):Promise.resolve(d).then(o,u)}function ua(r){return function(){var e=this,n=arguments;return new Promise(function(o,u){var l=r.apply(e,n);function c(d){qm(l,o,u,c,f,"next",d)}function f(d){qm(l,o,u,c,f,"throw",d)}c(void 0)})}}function xx(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Px(r,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,kx(o.key),o)}}function Tx(r,e,n){return e&&Px(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function kx(r){var e=jx(r,"string");return co(e)=="symbol"?e:e+""}function jx(r,e){if(co(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var o=n.call(r,e);if(co(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Lx=function(){function r(){xx(this,r)}return Tx(r,[{key:"initialize",value:function(){var e=ua(ln().mark(function o(u){var l;return ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=lt.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"configure",value:function(){var e=ua(ln().mark(function o(u){var l,c;return ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,lt.getState().configure(u);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,lt.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var e=ua(ln().mark(function o(u){var l;return ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,lt.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var e=ua(ln().mark(function o(u){var l,c;return ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=u.workflowId,d.next=3,lt.getState().prepareWorkflowAndPrepareUi(l);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var e=ua(ln().mark(function o(u){var l,c,f,d;return ln().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return l=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=gE(l),g.next=5,lt.getState().startNewSession(f,c);case 5:if(d=g.sent,!d.error){g.next=8;break}return g.abrupt("return",d);case 8:return g.abrupt("return",new Promise(function(S){var y=function(C){S(C)};lt.getState().playWorkflow(y)}));case 9:case"end":return g.stop()}},o)}));function n(o){return e.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var e=ua(ln().mark(function o(){var u;return ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,lt.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},o)}));function n(){return e.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.5.180-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){lt.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}lt.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){lt.getState().setSessionRestoreMode(n)}}])}(),Ax=window.customElements.get("idv-flow");return Ax||window.customElements.define("idv-flow",Um),Er.ConnectionError=Xi,Er.DeinitializationError=ou,Er.IdvEventTypesEnum=tu,Er.IdvIntegrationService=Lx,Er.IdvModules=lw,Er.IdvServiceMessages=nu,Er.IdvWebComponent=Um,Er.InitializeError=iu,Er.PrepareWorkflowError=Vn,Er.ScenarioError=Ot,Er.SessionError=gn,Er.StartSessionError=Yi,Er.WorkflowError=Tn,Object.defineProperty(Er,Symbol.toStringTag,{value:"Module"}),Er}({});
|
package/dist/main.js
CHANGED
|
@@ -18423,7 +18423,7 @@ var ta = va.create("session_log"), kP = /* @__PURE__ */ function() {
|
|
|
18423
18423
|
return Er().wrap(function(p) {
|
|
18424
18424
|
for (; ; ) switch (p.prev = p.next) {
|
|
18425
18425
|
case 0:
|
|
18426
|
-
return p.prev = 1, p.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.5/
|
|
18426
|
+
return p.prev = 1, p.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.5/635e251-06ed10567//PlatformAdaptor.worker.js");
|
|
18427
18427
|
case 4:
|
|
18428
18428
|
return u = p.sent, p.next = 7, u.blob();
|
|
18429
18429
|
case 7:
|
|
@@ -18450,7 +18450,7 @@ var ta = va.create("session_log"), kP = /* @__PURE__ */ function() {
|
|
|
18450
18450
|
}), p.next = 23, this.sendMessage({
|
|
18451
18451
|
target: "worker-init",
|
|
18452
18452
|
URL: document.URL,
|
|
18453
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.5/
|
|
18453
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.5/635e251-06ed10567/",
|
|
18454
18454
|
preMain: !0
|
|
18455
18455
|
});
|
|
18456
18456
|
case 23:
|
|
@@ -19616,7 +19616,7 @@ var NP = function(e, n) {
|
|
|
19616
19616
|
}
|
|
19617
19617
|
return n().setFinalStepAndStopProcess(), N.abrupt("return");
|
|
19618
19618
|
case 7:
|
|
19619
|
-
if (!(c instanceof Xr)) {
|
|
19619
|
+
if (!(c instanceof Xr && c.errorCode)) {
|
|
19620
19620
|
N.next = 13;
|
|
19621
19621
|
break;
|
|
19622
19622
|
}
|
|
@@ -20101,7 +20101,7 @@ var eT = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
|
|
|
20101
20101
|
}, {
|
|
20102
20102
|
key: "version",
|
|
20103
20103
|
get: function() {
|
|
20104
|
-
return "".concat("2.5.
|
|
20104
|
+
return "".concat("2.5.180-nightly".trim());
|
|
20105
20105
|
}
|
|
20106
20106
|
}, {
|
|
20107
20107
|
key: "render",
|
|
@@ -20571,7 +20571,7 @@ var cT = /* @__PURE__ */ function() {
|
|
|
20571
20571
|
key: "version",
|
|
20572
20572
|
get: function() {
|
|
20573
20573
|
var n;
|
|
20574
|
-
return (n = "2.5.
|
|
20574
|
+
return (n = "2.5.180-nightly") !== null && n !== void 0 ? n : "Version unavailable. Something went wrong";
|
|
20575
20575
|
}
|
|
20576
20576
|
}, {
|
|
20577
20577
|
key: "nonce",
|
package/package.json
CHANGED