@regulaforensics/idv-document 4.0.665-nightly → 4.0.667-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 CHANGED
@@ -32,7 +32,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
32
32
  <slot />
33
33
  `}},qI=function(e,t){return qI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qI(e,t)};function JI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);qI(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function YI(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function XI(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function ZI(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function QI(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function $I(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function eL(e){return this instanceof eL?(this.v=e,this):new eL(e)}function tL(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof eL?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function nL(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ZI==`function`?ZI(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function rL(e){return typeof e==`function`}function iL(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var aL=iL(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
34
34
  `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
35
- `):``,this.name=`UnsubscriptionError`,this.errors=t}});function oL(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sL=(function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ZI(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(rL(c))try{c()}catch(e){i=e instanceof aL?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ZI(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{uL(f)}catch(e){i=i==null?[]:i,e instanceof aL?i=$I($I([],QI(i)),QI(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new aL(i)}},e.prototype.add=function(t){var n;if(t&&t!==this){if(this.closed)uL(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)==null?[]:n).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&oL(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&oL(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),cL=sL.EMPTY;function lL(e){return e instanceof sL||e&&`closed`in e&&rL(e.remove)&&rL(e.add)&&rL(e.unsubscribe)}function uL(e){rL(e)?e():e.unsubscribe()}var dL={Promise:void 0},fL={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$I([e,t],QI(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function pL(e){fL.setTimeout(function(){throw e})}function mL(){}function hL(e){e()}var gL=(function(e){JI(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,lL(t)&&t.add(n)):n.destination=xL,n}return t.create=function(e,t,n){return new vL(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(sL),_L=(function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){yL(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){yL(e)}else yL(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){yL(e)}},e})(),vL=(function(e){JI(t,e);function t(t,n,r){var i=e.call(this)||this;return i.destination=new _L(rL(t)||!t?{next:t==null?void 0:t,error:n==null?void 0:n,complete:r==null?void 0:r}:t),i}return t})(gL);function yL(e){pL(e)}function bL(e){throw e}var xL={closed:!0,next:mL,error:bL,complete:mL},SL=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function CL(e){return e}function wL(e){return e.length===0?CL:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var TL=(function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=OL(e)?e:new vL(e,t,n);return hL(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=EL(t),new t(function(t,r){var i=new vL({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return(t=this.source)==null?void 0:t.subscribe(e)},e.prototype[SL]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wL(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=EL(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e})();function EL(e){var t;return(t=e==null?dL.Promise:e)==null?Promise:t}function DL(e){return e&&rL(e.next)&&rL(e.error)&&rL(e.complete)}function OL(e){return e&&e instanceof gL||DL(e)&&lL(e)}function kL(e){return rL(e==null?void 0:e.lift)}function AL(e){return function(t){if(kL(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function jL(e,t,n,r,i){return new ML(e,t,n,r,i)}var ML=(function(e){JI(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t})(gL),NL=iL(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),PL=(function(e){JI(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new FL(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new NL},t.prototype.next=function(e){var t=this;hL(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ZI(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;hL(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;hL(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)==null?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?cL:(this.currentObservers=null,a.push(e),new sL(function(){t.currentObservers=null,oL(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new TL;return e.source=this,e},t.create=function(e,t){return new FL(e,t)},t})(TL),FL=(function(e){JI(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)==null?void 0:e.complete)==null||t.call(e)},t.prototype._subscribe=function(e){var t,n;return(n=(t=this.source)==null?void 0:t.subscribe(e))==null?cL:n},t})(PL),IL=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function LL(e){return rL(e==null?void 0:e.then)}function RL(e){return rL(e[SL])}function zL(e){return Symbol.asyncIterator&&rL(e==null?void 0:e[Symbol.asyncIterator])}function BL(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function VL(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var HL=VL();function UL(e){return rL(e==null?void 0:e[HL])}function WL(e){return tL(this,arguments,function(){var t,n,r,i;return XI(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,eL(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,eL(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,eL(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function GL(e){return rL(e==null?void 0:e.getReader)}function KL(e){if(e instanceof TL)return e;if(e!=null){if(RL(e))return qL(e);if(IL(e))return JL(e);if(LL(e))return YL(e);if(zL(e))return ZL(e);if(UL(e))return XL(e);if(GL(e))return QL(e)}throw BL(e)}function qL(e){return new TL(function(t){var n=e[SL]();if(rL(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function JL(e){return new TL(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function YL(e){return new TL(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,pL)})}function XL(e){return new TL(function(t){var n,r;try{for(var i=ZI(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ZL(e){return new TL(function(t){$L(e,t).catch(function(e){return t.error(e)})})}function QL(e){return ZL(WL(e))}function $L(e,t){var n,r,i,a;return YI(this,void 0,void 0,function(){var o,s;return XI(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=nL(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function eR(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function tR(e,t){return t===void 0&&(t=0),AL(function(n,r){n.subscribe(jL(r,function(n){return eR(r,e,function(){return r.next(n)},t)},function(){return eR(r,e,function(){return r.complete()},t)},function(n){return eR(r,e,function(){return r.error(n)},t)}))})}function nR(e,t){return t===void 0&&(t=0),AL(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rR(e,t){return KL(e).pipe(nR(t),tR(t))}function iR(e,t){return KL(e).pipe(nR(t),tR(t))}function aR(e,t){return new TL(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function oR(e,t){return new TL(function(n){var r;return eR(n,t,function(){r=e[HL](),eR(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return rL(r==null?void 0:r.return)&&r.return()}})}function sR(e,t){if(!e)throw Error(`Iterable cannot be null`);return new TL(function(n){eR(n,t,function(){var r=e[Symbol.asyncIterator]();eR(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function cR(e,t){return sR(WL(e),t)}function lR(e,t){if(e!=null){if(RL(e))return rR(e,t);if(IL(e))return aR(e,t);if(LL(e))return iR(e,t);if(zL(e))return sR(e,t);if(UL(e))return oR(e,t);if(GL(e))return cR(e,t)}throw BL(e)}function uR(e,t){return t?lR(e,t):KL(e)}function dR(e,t){return AL(function(n,r){var i=0;n.subscribe(jL(r,function(n){r.next(e.call(t,n,i++))}))})}function fR(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){l++;var i=!1;KL(n(e,u++)).subscribe(jL(t,function(e){t.next(e)},function(){i=!0},void 0,function(){if(i)try{l--;for(var e=function(){var e=c.shift();o||m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(jL(t,p,function(){d=!0,f()})),function(){}}function pR(e,t,n){return n===void 0&&(n=1/0),rL(t)?pR(function(n,r){return dR(function(e,i){return t(n,e,r,i)})(KL(e(n,r)))},n):(typeof t==`number`&&(n=t),AL(function(t,r){return fR(t,r,e,n)}))}function mR(e){return AL(function(t,n){var r=null,i=!1,a;r=t.subscribe(jL(n,void 0,void 0,function(o){a=KL(e(o,mR(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function hR(e,t){return rL(t)?pR(e,t,1):pR(e,1)}function gR(e,t,n){return(t=_R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _R(e){var t=vR(e,`string`);return typeof t==`symbol`?t:t+``}function vR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var yR=class{constructor(){gR(this,`taskSubject`,new PL),this.taskSubject.pipe(hR(e=>uR(e()).pipe(mR(e=>uR(Promise.reject(e)))))).subscribe()}addTask(e){return new Promise((t,n)=>{this.taskSubject.next(()=>V(this,null,function*(){try{t(yield e())}catch(e){n(e)}}))})}},bR=`text/plain`,xR=`us-ascii`,SR=`%(?:3A|2F|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)`,CR=`__normalize_url_encoded_reserved__`,wR=/__normalize_url_encoded_reserved__(\d+)__/g,TR=new RegExp(SR,`i`),ER=new RegExp(SR,`gi`),DR=(e,t)=>Array.isArray(t)&&t.some(t=>t instanceof RegExp?t.flags.includes(`g`)||t.flags.includes(`y`)?new RegExp(t.source,t.flags.replaceAll(/[gy]/g,``)).test(e):t.test(e):t===e),OR=new Set([`https:`,`http:`,`file:`]),kR=e=>{if(typeof e!=`string`)return;let t=e.trim().toLowerCase().replace(/:$/,``);return t===``?void 0:`${t}:`},AR=e=>{try{let{protocol:t}=new URL(e),n=e.slice(0,t.length+2).toLowerCase()===`${t}//`;if(t.endsWith(`:`)&&(!t.includes(`.`)||n)&&!OR.has(t))return t}catch(e){}},jR=e=>{try{return decodeURIComponent(e.replaceAll(`+`,`%20`))}catch(t){return new URLSearchParams(`${e}=`).keys().next().value}},MR=e=>{let t=new Set;if(!e)return t;for(let n of e.slice(1).split(`&`))n&&!n.includes(`=`)&&t.add(jR(n));return t},NR=e=>{let t=e;try{t=decodeURIComponent(e)}catch(n){t=new URLSearchParams(e).toString()}let n=e=>{let t=new Set;for(let n of e.matchAll(wR))t.add(Number.parseInt(n[1],10));return t},r=n(e);for(let e of n(t))r.add(e);let i=0;for(;r.has(i);)i++;return`${CR}${i}__`},PR=(e,t)=>{if(!t)return e.sort(),e.toString();let n=e=>e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))),r=[...e.entries()];return r.sort(([e],[t])=>{let r=n(e),i=n(t);return r<i?-1:+(r>i)}),new URLSearchParams(r).toString()},FR=(e,t)=>t?e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))):e,IR=(e,t,n)=>{let r=t===`always`,i=t===`never`,a=r||i?void 0:MR(n),o=e=>e.replaceAll(`+`,`%20`),s=e=>r?`${e}=`:i||a.has(jR(e))?e:`${e}=`,c=e=>{let t=e.indexOf(`=`);if(t===-1)return s(o(e));let n=e.slice(0,t),r=e.slice(t+1);return r===``?n===``?`=`:s(o(n)):`${o(n)}=${r}`},l=e.slice(1).split(`&`).filter(Boolean);return l.length===0?``:`?${l.map(e=>c(e)).join(`&`)}`},LR=(e,{stripHash:t})=>{let n=RegExp(`^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$`).exec(e);if(!n)throw Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups,o=r.split(`;`),s=o.at(-1)===`base64`;s&&o.pop();let c=o.shift().toLowerCase(),l=[...o.map(e=>{let[t,n=``]=e.split(`=`).map(e=>e.trim());return t===`charset`&&(n=n.toLowerCase(),n===xR)?``:`${t}${n?`=${n}`:``}`}).filter(Boolean)];s&&l.push(`base64`),(l.length>0||c&&c!==bR)&&l.unshift(c);let u=t||!a?``:`#${a}`;return`data:${l.join(`;`)},${s?i.trim():i}${u}`};function RR(e,t){if(t=B({defaultProtocol:`http`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,emptyQueryValue:`preserve`},t),typeof t.defaultProtocol==`string`&&!t.defaultProtocol.endsWith(`:`)&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return LR(e,t);let n=Array.isArray(t.customProtocols)?t.customProtocols:[],r=new Set(n.map(e=>kR(e)).filter(Boolean)),i=AR(e);if(i&&!r.has(i))return e;let a=e.startsWith(`//`);(a||!/^\.*\//.test(e))&&!i&&(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let o=new URL(e);if(t.forceHttp&&t.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&o.protocol===`https:`&&(o.protocol=`http:`),t.forceHttps&&o.protocol===`http:`&&(o.protocol=`https:`),t.stripAuthentication&&(o.username=``,o.password=``),t.stripHash?o.hash=``:t.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,``)),o.pathname){let e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,t=0,n=``;for(;;){let r=e.exec(o.pathname);if(!r)break;let i=r[0],a=r.index,s=o.pathname.slice(t,a);n+=s.replaceAll(/\/{2,}/g,`/`),n+=i,t=a+i.length}let r=o.pathname.slice(t);n+=r.replaceAll(/\/{2,}/g,`/`),o.pathname=n}if(o.pathname)try{o.pathname=decodeURI(o.pathname).replaceAll(`\\`,`%5C`)}catch(e){}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split(`/`).filter(Boolean),n=e.at(-1);n&&DR(n,t.removeDirectoryIndex)&&(e.pop(),o.pathname=e.length>0?`/${e.join(`/`)}/`:`/`)}if(t.removePath&&(o.pathname=`/`),t.transformPath&&typeof t.transformPath==`function`){let e=o.pathname.split(`/`).filter(Boolean),n=t.transformPath(e);o.pathname=(n==null?void 0:n.length)>0?`/${n.join(`/`)}`:`/`}o.hostname&&(o.hostname=o.hostname.replace(/\.$/,``),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,``)));let s=o.search,c;if(t.sortQueryParameters&&TR.test(s)){let e=NR(s);o.search=s.replaceAll(ER,t=>`${e}${t.slice(1).toUpperCase()}`),c=RegExp(`${e}([0-9A-F]{2})`,`g`)}let l=Array.isArray(t.keepQueryParameters),{searchParams:u}=o;if(!l&&Array.isArray(t.removeQueryParameters)&&t.removeQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.removeQueryParameters)&&u.delete(e);if(!l&&t.removeQueryParameters===!0&&(o.search=``),l&&t.keepQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.keepQueryParameters)||u.delete(e);else l&&(o.search=``);t.sortQueryParameters&&(o.search=PR(o.searchParams,c),o.search=decodeURIComponent(o.search.replaceAll(/%(?:26|23|3f|25|2b)/gi,e=>`%25${e.slice(1)}`)),c&&(o.search=o.search.replace(c,`%$1`))),o.search=IR(o.search,t.emptyQueryValue,s),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,``)),t.removeExplicitPort&&o.port&&(o.port=``);let d=e;return e=o.toString(),!t.removeSingleSlash&&o.pathname===`/`&&!d.endsWith(`/`)&&o.hash===``&&(e=e.replace(/\/$/,``)),(t.removeTrailingSlash||o.pathname===`/`)&&o.hash===``&&t.removeSingleSlash&&(e=e.replace(/\/$/,``)),a&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,`//`)),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,``)),e}function zR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zR(Object(n),!0).forEach(function(t){VR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VR(e,t,n){return(t=HR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HR(e){var t=UR(e,`string`);return typeof t==`symbol`?t:t+``}function UR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WR=x_.create(`wasm`),GR=x_.create(`main`),KR=class{constructor(){VR(this,`_worker`,null),VR(this,`_initializeListener`,null),VR(this,`_processingListener`,null),VR(this,`_queueService`,new yR),VR(this,`_initProcess`,null),VR(this,`version`,{component:`9.5.2892`}),VR(this,`onFinalize`,null),VR(this,`isPrepared`,!1),VR(this,`isInitialized`,!1),VR(this,`isProcessing`,!1),VR(this,`initData`,null),VR(this,`recognizerProcessParam`,{processParam:{}}),VR(this,`imageProcessParam`,{processParam:{}}),VR(this,`recognizeListener`,null),VR(this,`workerPath`,`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`)}get processingListener(){return this._processingListener}set processingListener(e){this._processingListener=e,e&&e({isProcessing:this.isProcessing})}get initializeListener(){return this._initializeListener}set initializeListener(e){this._initializeListener=e,e&&e({isInitialized:this.isInitialized})}createProcessImageRequest(e,t){let n=e.map((e,t)=>({data:e,light:6,pageIdx:t}));return BR(BR({},t),{},{imagesList:n})}prepareImageData(e){return e.map(e=>e instanceof ImageData?{width:e.width,height:e.height,data:e.data.buffer}:{data:e})}sendMessage(e){return this._queueService.addTask(()=>new Promise((t,n)=>{if(!this._worker)return GR(`Worker is missing)`),n(`Worker is missing`);this._worker.onmessage=e=>{if(e.data.target===lp.custom){let{method:r,response:i,code:a}=e.data.data,o=i&&`reject_message`in i?i.reject_message:``;if(a===xf.ok||a===xf.badLicense&&!o)GR(`Method ${r}: { code: ${a} } `),t(i);else{let e=`Method ${r}: ${Qf[a]||a}${o?` Reject message: ${o}`:``}`;GR(e),n(e)}}e.data.target===lp.stdout&&WR(JSON.stringify(e.data.content)),e.data.target===lp.stderr&&(WR(JSON.stringify(e.data.content)),n(e.data.content))},this._worker.onerror=e=>{WR(JSON.stringify(e.message)),n(e)},GR(`Send message to worker: { target: ${e.target}, method: ${e.method} }`),this._worker.postMessage(BR(BR({},e),{},{preMain:!0}),`data`in e&&e.data?e.data.map(e=>e.data):[])}))}prepare(e){return V(this,null,function*(){var t;GR(`Preparing the service`);{let t=this.workerPath===`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`,n=RR(e&&t?vE(e,`PROD`):this.workerPath),r=yield(yield fetch(`${n}/${Kf}`)).text();t||(r=_E(r,n));let i=new Blob([r],{type:`text/plain`}),a=URL.createObjectURL(i);this._worker=new Worker(a),URL.revokeObjectURL(a)}(t=this._worker)==null||t.postMessage({method:vf.prepare,target:lp.gl,preMain:!0,op:`setPrefetched`}),yield this.sendMessage({method:vf.prepare,target:lp.init,URL:document.URL}),this.isPrepared=!0,GR(`Service prepared`)})}initialize(e){return V(this,null,function*(){return this._initProcess||(this._initProcess=this.doInitialize(e),this._initProcess.catch(()=>{this._initProcess=null})),this._initProcess})}doInitialize(e){return V(this,null,function*(){var t,n;this.isPrepared||(yield this.prepare(e==null?void 0:e.module)),GR(`Initializing the service`);let{scenario:r,license:i}=yield this.sendMessage({target:lp.custom,method:vf.initialize,request:{systemInfo:{userID:p_(Sp),hostName:(t=document.location)==null?void 0:t.origin,license:e==null?void 0:e.license},telemetry:yield __({sdkVersion:`9.5.2892`}),processParam:this.recognizerProcessParam.processParam||this.imageProcessParam.processParam}});return this.initData={scenario:r,license:i},this.isInitialized=!0,(n=this._initializeListener)==null||n.call(this,{isInitialized:this.isInitialized}),GR(`Service initialized: ${JSON.stringify({scenario:r,license:i})}`),this.initData})}doProcess(e,t,n){return V(this,null,function*(){var r,i;GR(`Process method ${e} started`),this.isProcessing=!0,(r=this._processingListener)==null||r.call(this,{isProcessing:this.isProcessing});let a=yield this.sendMessage({target:lp.custom,method:e,request:t,data:n});return this.isProcessing=!1,(i=this._processingListener)==null||i.call(this,{isProcessing:this.isProcessing}),GR(`Process method ${e} finished`),new oE(a)})}processImageBase64(e,t){return V(this,null,function*(){return this.doProcess(vf.processImage,this.createProcessImageRequest(e,t))})}process(e,t){return V(this,null,function*(){var n;let r=this.prepareImageData(e),i=yield this.doProcess(vf.process,t||this.recognizerProcessParam,r);return(n=this.recognizeListener)==null||n.call(this,i),i})}processImage(e,t){return V(this,null,function*(){let n=this.prepareImageData(e);return this.doProcess(vf.processImage,t||this.imageProcessParam,n)})}startNewPage(){return V(this,null,function*(){GR(`Starting new page`),yield this.sendMessage({target:lp.custom,method:vf.startNewPage})})}startNewDocument(e,t){return V(this,null,function*(){return GR(`Starting new document`),yield this.sendMessage({target:lp.custom,method:vf.startNewDocument,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}createBackendTransaction(e,t){return V(this,null,function*(){return GR(`Create backend transaction`),yield this.sendMessage({target:lp.custom,method:vf.createBackendTransaction,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}finalizePackage(){return V(this,null,function*(){try{var e;GR(`Finalize package`);let t=yield this.sendMessage({target:lp.custom,method:vf.finalizePackage});return(e=this.onFinalize)==null||e.call(this,t),t}catch(e){var t;return(t=this.onFinalize)==null||t.call(this,{tag:``,transactionId:``}),Promise.reject(e)}})}addDataToPackage(e,t){return V(this,null,function*(){GR(`Add data to package`),yield this.sendMessage({target:lp.custom,method:vf.addDataToPackage,request:t,data:[{data:e.buffer}]}),GR(`Data added to package`)})}shutdown(){GR(`Shutdown service`),this._worker&&(this._worker.terminate(),GR(`Worker terminated`)),this.isPrepared=!1,this.isInitialized=!1,this.isProcessing=!1,this._initProcess=null}};function qR(){return V(this,null,function*(){let e=window.customElements.get(`document-reader`),t=window.customElements.get(`camera-snapshot`),n=window.customElements.get(`fullscreen-container`);e||window.customElements.define(`document-reader`,TI),t||window.customElements.define(`camera-snapshot`,HI),n||window.customElements.define(`fullscreen-container`,KI);let r=window.customElements.whenDefined(`document-reader`),i=window.customElements.whenDefined(`camera-snapshot`),a=window.customElements.whenDefined(`fullscreen-container`);yield Promise.all([r,i,a])})}var JR={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:E},YR=(e=JR,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function XR(e){return(t,n)=>typeof n==`object`?YR(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var ZR=(e,t,n)=>{for(let n of t)if(n[0]===e)return(0,n[1])();return n==null?void 0:n()};function QR(e){"@babel/helpers - typeof";return QR=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},QR(e)}function $R(e,t){if(QR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ez(e){var t=$R(e,`string`);return QR(t)==`symbol`?t:t+``}function tz(e,t,n){return(t=ez(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nz(Object(n),!0).forEach(function(t){tz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var iz=class e{constructor({errorCode:e,errorCodeKey:t,message:n,underlyingError:r,underlyingBaseError:i,domain:a,module:o,errorEnumName:s,shortDomainCode:c}){this.errorCode=e,this.errorCodeKey=t,this.message=n,this.underlyingError=r,this.underlyingBaseError=i,this.module=o,this.domain=a,this.errorEnumName=s,this.shortDomainCode=c}static getErrorKey(e,t){let n=Object.keys(t).find(n=>t[n]===e);if(!n)throw Error(`Invalid errorCode: ${e} in enum`);return n}get lastUnderlyingError(){let t=this.underlyingBaseError;for(;(t==null?void 0:t.underlyingBaseError)instanceof e;)t=t.underlyingBaseError;return t==null?void 0:t.underlyingError}toObject(){let t={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof e&&(t.underlyingBaseError=this.underlyingBaseError.toObject()),t}get shortChain(){let t=`${this.shortDomainCode}:${this.errorCode}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.shortChain}`),t}get fullChain(){let t=`${this.module}.${this.domain}:${this.errorCodeKey}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.fullChain}`),t}};function az(e,t){if(t.displayName?console.log(`Register module: ${t.displayName}`):console.error(`Missed "displayName" when register module`),t.getSupportedTemplates&&typeof t.getSupportedTemplates==`function`){let e=t.getSupportedTemplates();console.log(`${t==null?void 0:t.displayName} supported templates: ${e.join(`, `)}`)}else console.error(`Missed "getSupportedTemplates" method when register module`);if(t.initialize&&typeof t.initialize==`function`||console.error(`${t==null?void 0:t.displayName} "initialize" method was not implemented`),t.deinitialize&&typeof t.deinitialize==`function`||console.error(`${t==null?void 0:t.displayName} "deinitialize" method was not implemented`),t.cancel&&typeof t.cancel==`function`||console.error(`${t==null?void 0:t.displayName} "cancel" method was not implemented`),t.isReady&&typeof t.isReady==`function`||console.error(`${t==null?void 0:t.displayName} "isReady" method was not implemented`),t.getIdentifier&&typeof t.getIdentifier==`function`){let e=t.getIdentifier();console.log(`Module id: ${e}`)}else console.error(`Missed "getIdentifier" when register module`);customElements.get(t.getIdentifier())?console.log(`Module ${e} has already registered`):customElements.define(e,t),console.log(`-------`)}function oz(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var sz={FORM:`form`,DATA:`data`},cz=[`ar`,`he`],lz=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return cz.includes(n)?`rtl`:`ltr`},uz=(e,t)=>e.base64&&!(t!=null&&t.base64.has(e.base64))?e.base64:e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))?e.imageURL:``,dz=(e,t,n)=>{var r;if(!t)return;let i=(r=e==null?void 0:e.idvAsset)==null?null:r;for(;i;){let e=uz(i,n);if(e)return e;i=i.failurePolicy===`placeholderImage`&&i.placeholderImage||null}},fz={DOC_READER:`DOC_READER`,DOC_READER_GALLERY:`DOC_READER_GALLERY`},pz=function(e){return e[e.NO_INITIALIZED=0]=`NO_INITIALIZED`,e[e.UNKNOWN_STEP=1]=`UNKNOWN_STEP`,e[e.SCAN_ERROR=2]=`SCAN_ERROR`,e[e.RFID_ERROR=3]=`RFID_ERROR`,e[e.IMAGE_LOADING_FAILED=4]=`IMAGE_LOADING_FAILED`,e}({}),mz=function(e){return e[e.CONFIGURATION_FAILED=0]=`CONFIGURATION_FAILED`,e[e.INTERNAL_ERROR=1]=`INTERNAL_ERROR`,e[e.PRESENTER_UNAVAILABLE=2]=`PRESENTER_UNAVAILABLE`,e}({}),hz=`idv-document`,gz={0:pf.auto,1:pf.captureVideo,2:pf.captureFrame},_z={0:yf.line,1:yf.corners},vz={0:!0,1:!0,2:!1,3:!0},yz=1920,bz=4e6,xz=5e7,Sz=function(e){return e.BarcodeMRZ=`BarcodeMRZ`,e.BoundsLite=`BoundsLite`,e}({}),Cz,wz,Tz=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,pz);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Cz=Tz,Cz.MODULE=hz,Cz.ERROR_ENUM_NAME=`ReaderModuleError`,Cz.SHORT_CODE=`RM`;var Ez=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,mz);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};wz=Ez,wz.MODULE=hz,wz.ERROR_ENUM_NAME=`ScanError`,wz.SHORT_CODE=`RMS`;var Dz=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})};function Oz(e){return XR(rz(rz({},e),{},{state:!0,attribute:!1}))}var kz=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function Az(e,t){return(n,r,i)=>{let a=t=>{var n,r;return(n=(r=t.renderRoot)==null?void 0:r.querySelector(e))==null?null:n};if(t){let{get:e,set:t}=typeof r==`object`?n:i==null?(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})():i;return kz(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return kz(n,r,{get(){return a(this)}})}}function jz(e){return Mz.apply(this,arguments)}function Mz(){return Mz=d(function*(e){return new Promise(t=>setTimeout(t,e))}),Mz.apply(this,arguments)}function Nz(e){return Pz.apply(this,arguments)}function Pz(){return Pz=d(function*(e,t=0,n=0){let r=null,i=n*1e3;for(let n=0;n<=t;n++){try{let t=yield e();if(t!=null&&t.transactionId)return t;break}catch(e){r=e}n<t&&(yield jz(i))}throw r}),Pz.apply(this,arguments)}var Fz=e=>e?(e.internalScenario&&(e.scenario=e.internalScenario),delete e.internalScenario,e):{},Iz=e=>{try{return new URL(e),!0}catch(e){return!1}};function Lz(e,t,n,r,i){let a=e*t,o=a>i;return{width:e,height:t,isExtraLargeResolution:o,isDownscaleNeeded:(e>n||t>n||a>r)&&!o}}var Rz=function(){var e=d(function*(e,t,n,r){let i=yield createImageBitmap(e),{width:a,height:o}=i;return i==null||i.close(),Lz(a,o,t,n,r)});return function(t,n,r,i){return e.apply(this,arguments)}}();function zz({width:e,height:t,softSideLimit:n,softPixelLimit:r}){if(!(e>0&&t>0))return{width:1,height:1};let i=Math.max(e,t),a=e*t,o=i>n?n/i:1,s=a>r?Math.sqrt(r/a):1,c=Math.min(o,s,1);return{width:Math.max(1,Math.floor(e*c)),height:Math.max(1,Math.floor(t*c))}}function Bz(e,t,n){return Vz.apply(this,arguments)}function Vz(){return Vz=d(function*(e,t,n){return new Promise(r=>{if(!e||!e.size)return r({ok:!1});let i=document.createElement(`canvas`),a=i.getContext(`2d`),o=URL.createObjectURL(e),s=new Image,c=e=>{try{URL.revokeObjectURL(o)}catch(e){}try{i.width=0,i.height=0}catch(e){}s.onload=null,s.onerror=null,s.src=``,r(e)};s.onload=function(){let e=zz({width:s.width,height:s.height,softSideLimit:t,softPixelLimit:n});if(i.width=e.width,i.height=e.height,a)try{a.drawImage(s,0,0,e.width,e.height);let t=a.getImageData(0,0,e.width,e.height);return c(t?{ok:!0,imageData:t}:{ok:!1})}catch(e){return c({ok:!1})}return c({ok:!1})},s.onerror=()=>c({ok:!1}),s.src=o})}),Vz.apply(this,arguments)}var Hz=e=>{let{translationKeysData:t,translationKeysProps:n,locale:r}=e,i={},a=null;for(let e in t)i[t[e].key]=e;for(let e in n)i[e]&&n[e]&&(a?a[i[e]]=n[e]:a={[i[e]]:n[e]});return a?{[r]:a}:{}},Uz={preparingCamera:{fallback:`Preparing the camera...`,key:`strPrepareCamera`},timeout:{fallback:`Timeout`,key:`strTimeout`},noFocus:{fallback:`No camera focus`,key:`strNoFocus`},somethingWentWrong:{fallback:`Something went wrong`,key:`messageUnknownError`},incorrectCameraId:{fallback:`No camera with the specified ID found.`,key:`InfoScreenIncorrectCameraIdTitle`},done:{fallback:`Done!`,key:`strDoneMessage`},cameraUnavailable:{fallback:`Camera unavailable!`,key:`statusCameraUnavailableTitle`},versionNotSupported:{fallback:`Your browser version is not supported`,key:`statusBrowserNotSupportedTitle`},httpNotSupported:{fallback:`HTTPS not used`,key:`statusBrowserHTTPNotSupportedSubtitle`},insecurePageContext:{fallback:`Insecure context`,key:`statusBrowserInsecurePageContextSubtitle`},badLicense:{fallback:`The license cannot be found or has expired`,key:`statusProcMgrBadLicenseSubtitle`},fileCorrupt:{fallback:`This file is corrupt or not supported`,key:`statusIncorrectDataTitle`},largeFile:{fallback:`This file is too large to be uploaded`,key:`statusLargeDataTitle`},placeDocumentIntoFrame:{fallback:`Fit the document into the frame`,key:`strPlaceDocumentInFrame`},holdDocumentStraight:{fallback:`Hold the document straight`,key:`strHoldDocumentStraight`},glaresOnDocument:{fallback:`Avoid glare on the document`,key:`strGlaresOnDocument`},tryAgain:{fallback:`Try again`,key:`faceLivenessScreenButton`},noCameraAvailable:{fallback:`No camera available`,key:`InfoScreenNoCameraTitle`},positionDocumentCenter:{fallback:`Position the document in the center`,key:`documentReaderDocumentReaderLayoutDocumentCenter`},uploadPhoto:{fallback:`Upload a photo`,key:`cameraCaptureCameraCaptureStartScreenTitle`},moveCloser:{fallback:`Move closer`,key:`hint.moveCloser`},keepDeviceStill:{fallback:`Hold the device still`,key:`strKeepDeviceStill`},camera:{fallback:`Camera`,key:`strCamera`},switchToMobile:{fallback:`Switch to mobile`,key:`switchToMobile`},openPhoneCamera:{fallback:`Open the camera on your mobile device, scan the QR code, and follow the link`,key:`openPhoneCamera`},pleaseWait:{fallback:`Please wait...`,key:`strPleaseWait`},mobileDevice:{fallback:`Mobile device`,key:`mobileDevice`},verifyYourIdentity:{fallback:`Identity document verification`,key:`verifyYourIdentity`},fromCameraFilesMobileDesktop:{fallback:`Capture a document using the computer’s camera, upload it from files, or scan it on a mobile device`,key:`fromCameraFilesMobileDesktop`},fromCameraFilesDesktop:{fallback:`Capture a document using the computer’s camera or upload it from files`,key:`fromCameraFilesDesktop`},fromCameraMobileDesktop:{fallback:`Capture a document using the computer’s camera or scan it on a mobile device`,key:`fromCameraMobileDesktop`},fromFilesMobileDesktop:{fallback:`Upload a document from files or scan it on a mobile device`,key:`fromFilesMobileDesktop`},fromCameraDesktop:{fallback:`Use the computer's camera to capture a document`,key:`fromCameraDesktop`},fromFilesDesktop:{fallback:`Pick a document from files and upload it`,key:`fromFilesDesktop`},fromMobileDesktop:{fallback:`Use your mobile camera to capture a document`,key:`fromMobileDesktop`},fromCameraGalleryMobile:{fallback:`Capture a document using the mobile's camera or upload it from gallery`,key:`fromCameraGalleryMobile`},fromGalleryMobile:{fallback:`Pick a document from the gallery and upload it`,key:`fromGalleryMobile`},gallery:{fallback:`Gallery`,key:`gallery`},files:{fallback:`Files`,key:`files`},returnToComputer:{fallback:`Return to the computer`,key:`returnToComputer`},documentCaptured:{fallback:`Your document has been captured`,key:`documentCaptured`},or:{fallback:`or`,key:`strOr`},continueInBrowser:{fallback:`Click here to continue in browser`,key:`continueInBrowser`},skip:{fallback:`Skip`,key:`strSkip`},flipTheDocument:{fallback:`Flip the document`,key:`documentReaderDocumentReaderLayoutFlipDocument`},tiltTheDocument:{fallback:`Tilt the document`,key:`strTiltDocument`}},Wz=s`
35
+ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function oL(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sL=(function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ZI(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(rL(c))try{c()}catch(e){i=e instanceof aL?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ZI(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{uL(f)}catch(e){i=i==null?[]:i,e instanceof aL?i=$I($I([],QI(i)),QI(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new aL(i)}},e.prototype.add=function(t){var n;if(t&&t!==this){if(this.closed)uL(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)==null?[]:n).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&oL(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&oL(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),cL=sL.EMPTY;function lL(e){return e instanceof sL||e&&`closed`in e&&rL(e.remove)&&rL(e.add)&&rL(e.unsubscribe)}function uL(e){rL(e)?e():e.unsubscribe()}var dL={Promise:void 0},fL={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$I([e,t],QI(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function pL(e){fL.setTimeout(function(){throw e})}function mL(){}function hL(e){e()}var gL=(function(e){JI(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,lL(t)&&t.add(n)):n.destination=xL,n}return t.create=function(e,t,n){return new vL(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(sL),_L=(function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){yL(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){yL(e)}else yL(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){yL(e)}},e})(),vL=(function(e){JI(t,e);function t(t,n,r){var i=e.call(this)||this;return i.destination=new _L(rL(t)||!t?{next:t==null?void 0:t,error:n==null?void 0:n,complete:r==null?void 0:r}:t),i}return t})(gL);function yL(e){pL(e)}function bL(e){throw e}var xL={closed:!0,next:mL,error:bL,complete:mL},SL=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function CL(e){return e}function wL(e){return e.length===0?CL:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var TL=(function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=OL(e)?e:new vL(e,t,n);return hL(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=EL(t),new t(function(t,r){var i=new vL({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return(t=this.source)==null?void 0:t.subscribe(e)},e.prototype[SL]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wL(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=EL(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e})();function EL(e){var t;return(t=e==null?dL.Promise:e)==null?Promise:t}function DL(e){return e&&rL(e.next)&&rL(e.error)&&rL(e.complete)}function OL(e){return e&&e instanceof gL||DL(e)&&lL(e)}function kL(e){return rL(e==null?void 0:e.lift)}function AL(e){return function(t){if(kL(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function jL(e,t,n,r,i){return new ML(e,t,n,r,i)}var ML=(function(e){JI(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t})(gL),NL=iL(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),PL=(function(e){JI(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new FL(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new NL},t.prototype.next=function(e){var t=this;hL(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ZI(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;hL(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;hL(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)==null?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?cL:(this.currentObservers=null,a.push(e),new sL(function(){t.currentObservers=null,oL(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new TL;return e.source=this,e},t.create=function(e,t){return new FL(e,t)},t})(TL),FL=(function(e){JI(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)==null?void 0:e.complete)==null||t.call(e)},t.prototype._subscribe=function(e){var t,n;return(n=(t=this.source)==null?void 0:t.subscribe(e))==null?cL:n},t})(PL),IL=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function LL(e){return rL(e==null?void 0:e.then)}function RL(e){return rL(e[SL])}function zL(e){return Symbol.asyncIterator&&rL(e==null?void 0:e[Symbol.asyncIterator])}function BL(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function VL(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var HL=VL();function UL(e){return rL(e==null?void 0:e[HL])}function WL(e){return tL(this,arguments,function(){var t,n,r,i;return XI(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,eL(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,eL(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,eL(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function GL(e){return rL(e==null?void 0:e.getReader)}function KL(e){if(e instanceof TL)return e;if(e!=null){if(RL(e))return qL(e);if(IL(e))return JL(e);if(LL(e))return YL(e);if(zL(e))return ZL(e);if(UL(e))return XL(e);if(GL(e))return QL(e)}throw BL(e)}function qL(e){return new TL(function(t){var n=e[SL]();if(rL(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function JL(e){return new TL(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function YL(e){return new TL(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,pL)})}function XL(e){return new TL(function(t){var n,r;try{for(var i=ZI(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ZL(e){return new TL(function(t){$L(e,t).catch(function(e){return t.error(e)})})}function QL(e){return ZL(WL(e))}function $L(e,t){var n,r,i,a;return YI(this,void 0,void 0,function(){var o,s;return XI(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=nL(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function eR(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function tR(e,t){return t===void 0&&(t=0),AL(function(n,r){n.subscribe(jL(r,function(n){return eR(r,e,function(){return r.next(n)},t)},function(){return eR(r,e,function(){return r.complete()},t)},function(n){return eR(r,e,function(){return r.error(n)},t)}))})}function nR(e,t){return t===void 0&&(t=0),AL(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rR(e,t){return KL(e).pipe(nR(t),tR(t))}function iR(e,t){return KL(e).pipe(nR(t),tR(t))}function aR(e,t){return new TL(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function oR(e,t){return new TL(function(n){var r;return eR(n,t,function(){r=e[HL](),eR(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return rL(r==null?void 0:r.return)&&r.return()}})}function sR(e,t){if(!e)throw Error(`Iterable cannot be null`);return new TL(function(n){eR(n,t,function(){var r=e[Symbol.asyncIterator]();eR(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function cR(e,t){return sR(WL(e),t)}function lR(e,t){if(e!=null){if(RL(e))return rR(e,t);if(IL(e))return aR(e,t);if(LL(e))return iR(e,t);if(zL(e))return sR(e,t);if(UL(e))return oR(e,t);if(GL(e))return cR(e,t)}throw BL(e)}function uR(e,t){return t?lR(e,t):KL(e)}function dR(e,t){return AL(function(n,r){var i=0;n.subscribe(jL(r,function(n){r.next(e.call(t,n,i++))}))})}function fR(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){l++;var i=!1;KL(n(e,u++)).subscribe(jL(t,function(e){t.next(e)},function(){i=!0},void 0,function(){if(i)try{l--;for(var e=function(){var e=c.shift();o||m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(jL(t,p,function(){d=!0,f()})),function(){}}function pR(e,t,n){return n===void 0&&(n=1/0),rL(t)?pR(function(n,r){return dR(function(e,i){return t(n,e,r,i)})(KL(e(n,r)))},n):(typeof t==`number`&&(n=t),AL(function(t,r){return fR(t,r,e,n)}))}function mR(e){return AL(function(t,n){var r=null,i=!1,a;r=t.subscribe(jL(n,void 0,void 0,function(o){a=KL(e(o,mR(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function hR(e,t){return rL(t)?pR(e,t,1):pR(e,1)}function gR(e,t,n){return(t=_R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _R(e){var t=vR(e,`string`);return typeof t==`symbol`?t:t+``}function vR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var yR=class{constructor(){gR(this,`taskSubject`,new PL),this.taskSubject.pipe(hR(e=>uR(e()).pipe(mR(e=>uR(Promise.reject(e)))))).subscribe()}addTask(e){return new Promise((t,n)=>{this.taskSubject.next(()=>V(this,null,function*(){try{t(yield e())}catch(e){n(e)}}))})}},bR=`text/plain`,xR=`us-ascii`,SR=`%(?:3A|2F|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)`,CR=`__normalize_url_encoded_reserved__`,wR=/__normalize_url_encoded_reserved__(\d+)__/g,TR=new RegExp(SR,`i`),ER=new RegExp(SR,`gi`),DR=(e,t)=>Array.isArray(t)&&t.some(t=>t instanceof RegExp?t.flags.includes(`g`)||t.flags.includes(`y`)?new RegExp(t.source,t.flags.replaceAll(/[gy]/g,``)).test(e):t.test(e):t===e),OR=new Set([`https:`,`http:`,`file:`]),kR=e=>{if(typeof e!=`string`)return;let t=e.trim().toLowerCase().replace(/:$/,``);return t===``?void 0:`${t}:`},AR=e=>{try{let{protocol:t}=new URL(e),n=e.slice(0,t.length+2).toLowerCase()===`${t}//`;if(t.endsWith(`:`)&&(!t.includes(`.`)||n)&&!OR.has(t))return t}catch(e){}},jR=e=>{try{return decodeURIComponent(e.replaceAll(`+`,`%20`))}catch(t){return new URLSearchParams(`${e}=`).keys().next().value}},MR=e=>{let t=new Set;if(!e)return t;for(let n of e.slice(1).split(`&`))n&&!n.includes(`=`)&&t.add(jR(n));return t},NR=e=>{let t=e;try{t=decodeURIComponent(e)}catch(n){t=new URLSearchParams(e).toString()}let n=e=>{let t=new Set;for(let n of e.matchAll(wR))t.add(Number.parseInt(n[1],10));return t},r=n(e);for(let e of n(t))r.add(e);let i=0;for(;r.has(i);)i++;return`${CR}${i}__`},PR=(e,t)=>{if(!t)return e.sort(),e.toString();let n=e=>e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))),r=[...e.entries()];return r.sort(([e],[t])=>{let r=n(e),i=n(t);return r<i?-1:+(r>i)}),new URLSearchParams(r).toString()},FR=(e,t)=>t?e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))):e,IR=(e,t,n)=>{let r=t===`always`,i=t===`never`,a=r||i?void 0:MR(n),o=e=>e.replaceAll(`+`,`%20`),s=e=>r?`${e}=`:i||a.has(jR(e))?e:`${e}=`,c=e=>{let t=e.indexOf(`=`);if(t===-1)return s(o(e));let n=e.slice(0,t),r=e.slice(t+1);return r===``?n===``?`=`:s(o(n)):`${o(n)}=${r}`},l=e.slice(1).split(`&`).filter(Boolean);return l.length===0?``:`?${l.map(e=>c(e)).join(`&`)}`},LR=(e,{stripHash:t})=>{let n=RegExp(`^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$`).exec(e);if(!n)throw Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups,o=r.split(`;`),s=o.at(-1)===`base64`;s&&o.pop();let c=o.shift().toLowerCase(),l=[...o.map(e=>{let[t,n=``]=e.split(`=`).map(e=>e.trim());return t===`charset`&&(n=n.toLowerCase(),n===xR)?``:`${t}${n?`=${n}`:``}`}).filter(Boolean)];s&&l.push(`base64`),(l.length>0||c&&c!==bR)&&l.unshift(c);let u=t||!a?``:`#${a}`;return`data:${l.join(`;`)},${s?i.trim():i}${u}`};function RR(e,t){if(t=B({defaultProtocol:`http`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,emptyQueryValue:`preserve`},t),typeof t.defaultProtocol==`string`&&!t.defaultProtocol.endsWith(`:`)&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return LR(e,t);let n=Array.isArray(t.customProtocols)?t.customProtocols:[],r=new Set(n.map(e=>kR(e)).filter(Boolean)),i=AR(e);if(i&&!r.has(i))return e;let a=e.startsWith(`//`);(a||!/^\.*\//.test(e))&&!i&&(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let o=new URL(e);if(t.forceHttp&&t.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&o.protocol===`https:`&&(o.protocol=`http:`),t.forceHttps&&o.protocol===`http:`&&(o.protocol=`https:`),t.stripAuthentication&&(o.username=``,o.password=``),t.stripHash?o.hash=``:t.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,``)),o.pathname){let e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,t=0,n=``;for(;;){let r=e.exec(o.pathname);if(!r)break;let i=r[0],a=r.index,s=o.pathname.slice(t,a);n+=s.replaceAll(/\/{2,}/g,`/`),n+=i,t=a+i.length}let r=o.pathname.slice(t);n+=r.replaceAll(/\/{2,}/g,`/`),o.pathname=n}if(o.pathname)try{o.pathname=decodeURI(o.pathname).replaceAll(`\\`,`%5C`)}catch(e){}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split(`/`).filter(Boolean),n=e.at(-1);n&&DR(n,t.removeDirectoryIndex)&&(e.pop(),o.pathname=e.length>0?`/${e.join(`/`)}/`:`/`)}if(t.removePath&&(o.pathname=`/`),t.transformPath&&typeof t.transformPath==`function`){let e=o.pathname.split(`/`).filter(Boolean),n=t.transformPath(e);o.pathname=(n==null?void 0:n.length)>0?`/${n.join(`/`)}`:`/`}o.hostname&&(o.hostname=o.hostname.replace(/\.$/,``),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,``)));let s=o.search,c;if(t.sortQueryParameters&&TR.test(s)){let e=NR(s);o.search=s.replaceAll(ER,t=>`${e}${t.slice(1).toUpperCase()}`),c=RegExp(`${e}([0-9A-F]{2})`,`g`)}let l=Array.isArray(t.keepQueryParameters),{searchParams:u}=o;if(!l&&Array.isArray(t.removeQueryParameters)&&t.removeQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.removeQueryParameters)&&u.delete(e);if(!l&&t.removeQueryParameters===!0&&(o.search=``),l&&t.keepQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.keepQueryParameters)||u.delete(e);else l&&(o.search=``);t.sortQueryParameters&&(o.search=PR(o.searchParams,c),o.search=decodeURIComponent(o.search.replaceAll(/%(?:26|23|3f|25|2b)/gi,e=>`%25${e.slice(1)}`)),c&&(o.search=o.search.replace(c,`%$1`))),o.search=IR(o.search,t.emptyQueryValue,s),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,``)),t.removeExplicitPort&&o.port&&(o.port=``);let d=e;return e=o.toString(),!t.removeSingleSlash&&o.pathname===`/`&&!d.endsWith(`/`)&&o.hash===``&&(e=e.replace(/\/$/,``)),(t.removeTrailingSlash||o.pathname===`/`)&&o.hash===``&&t.removeSingleSlash&&(e=e.replace(/\/$/,``)),a&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,`//`)),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,``)),e}function zR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zR(Object(n),!0).forEach(function(t){VR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VR(e,t,n){return(t=HR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HR(e){var t=UR(e,`string`);return typeof t==`symbol`?t:t+``}function UR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WR=x_.create(`wasm`),GR=x_.create(`main`),KR=class{constructor(){VR(this,`_worker`,null),VR(this,`_initializeListener`,null),VR(this,`_processingListener`,null),VR(this,`_queueService`,new yR),VR(this,`_initProcess`,null),VR(this,`version`,{component:`9.5.2892`}),VR(this,`onFinalize`,null),VR(this,`isPrepared`,!1),VR(this,`isInitialized`,!1),VR(this,`isProcessing`,!1),VR(this,`initData`,null),VR(this,`recognizerProcessParam`,{processParam:{}}),VR(this,`imageProcessParam`,{processParam:{}}),VR(this,`recognizeListener`,null),VR(this,`workerPath`,`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`)}get processingListener(){return this._processingListener}set processingListener(e){this._processingListener=e,e&&e({isProcessing:this.isProcessing})}get initializeListener(){return this._initializeListener}set initializeListener(e){this._initializeListener=e,e&&e({isInitialized:this.isInitialized})}createProcessImageRequest(e,t){let n=e.map((e,t)=>({data:e,light:6,pageIdx:t}));return BR(BR({},t),{},{imagesList:n})}prepareImageData(e){return e.map(e=>e instanceof ImageData?{width:e.width,height:e.height,data:e.data.buffer}:{data:e})}sendMessage(e){return this._queueService.addTask(()=>new Promise((t,n)=>{if(!this._worker)return GR(`Worker is missing)`),n(`Worker is missing`);this._worker.onmessage=e=>{if(e.data.target===lp.custom){let{method:r,response:i,code:a}=e.data.data,o=i&&`reject_message`in i?i.reject_message:``;if(a===xf.ok||a===xf.badLicense&&!o)GR(`Method ${r}: { code: ${a} } `),t(i);else{let e=`Method ${r}: ${Qf[a]||a}${o?` Reject message: ${o}`:``}`;GR(e),n(e)}}e.data.target===lp.stdout&&WR(JSON.stringify(e.data.content)),e.data.target===lp.stderr&&(WR(JSON.stringify(e.data.content)),n(e.data.content))},this._worker.onerror=e=>{WR(JSON.stringify(e.message)),n(e)},GR(`Send message to worker: { target: ${e.target}, method: ${e.method} }`),this._worker.postMessage(BR(BR({},e),{},{preMain:!0}),`data`in e&&e.data?e.data.map(e=>e.data):[])}))}prepare(e){return V(this,null,function*(){var t;GR(`Preparing the service`);{let t=this.workerPath===`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`,n=RR(e&&t?vE(e,`PROD`):this.workerPath),r=yield(yield fetch(`${n}/${Kf}`)).text();t||(r=_E(r,n));let i=new Blob([r],{type:`text/plain`}),a=URL.createObjectURL(i);this._worker=new Worker(a),URL.revokeObjectURL(a)}(t=this._worker)==null||t.postMessage({method:vf.prepare,target:lp.gl,preMain:!0,op:`setPrefetched`}),yield this.sendMessage({method:vf.prepare,target:lp.init,URL:document.URL}),this.isPrepared=!0,GR(`Service prepared`)})}initialize(e){return V(this,null,function*(){return this._initProcess||(this._initProcess=this.doInitialize(e),this._initProcess.catch(()=>{this._initProcess=null})),this._initProcess})}doInitialize(e){return V(this,null,function*(){var t,n;this.isPrepared||(yield this.prepare(e==null?void 0:e.module)),GR(`Initializing the service`);let{scenario:r,license:i}=yield this.sendMessage({target:lp.custom,method:vf.initialize,request:{systemInfo:{userID:p_(Sp),hostName:(t=document.location)==null?void 0:t.origin,license:e==null?void 0:e.license},telemetry:yield __({sdkVersion:`9.5.2892`}),processParam:this.recognizerProcessParam.processParam||this.imageProcessParam.processParam}});return this.initData={scenario:r,license:i},this.isInitialized=!0,(n=this._initializeListener)==null||n.call(this,{isInitialized:this.isInitialized}),GR(`Service initialized: ${JSON.stringify({scenario:r,license:i})}`),this.initData})}doProcess(e,t,n){return V(this,null,function*(){var r,i;GR(`Process method ${e} started`),this.isProcessing=!0,(r=this._processingListener)==null||r.call(this,{isProcessing:this.isProcessing});let a=yield this.sendMessage({target:lp.custom,method:e,request:t,data:n});return this.isProcessing=!1,(i=this._processingListener)==null||i.call(this,{isProcessing:this.isProcessing}),GR(`Process method ${e} finished`),new oE(a)})}processImageBase64(e,t){return V(this,null,function*(){return this.doProcess(vf.processImage,this.createProcessImageRequest(e,t))})}process(e,t){return V(this,null,function*(){var n;let r=this.prepareImageData(e),i=yield this.doProcess(vf.process,t||this.recognizerProcessParam,r);return(n=this.recognizeListener)==null||n.call(this,i),i})}processImage(e,t){return V(this,null,function*(){let n=this.prepareImageData(e);return this.doProcess(vf.processImage,t||this.imageProcessParam,n)})}startNewPage(){return V(this,null,function*(){GR(`Starting new page`),yield this.sendMessage({target:lp.custom,method:vf.startNewPage})})}startNewDocument(e,t){return V(this,null,function*(){return GR(`Starting new document`),yield this.sendMessage({target:lp.custom,method:vf.startNewDocument,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}createBackendTransaction(e,t){return V(this,null,function*(){return GR(`Create backend transaction`),yield this.sendMessage({target:lp.custom,method:vf.createBackendTransaction,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}finalizePackage(){return V(this,null,function*(){try{var e;GR(`Finalize package`);let t=yield this.sendMessage({target:lp.custom,method:vf.finalizePackage});return(e=this.onFinalize)==null||e.call(this,t),t}catch(e){var t;return(t=this.onFinalize)==null||t.call(this,{tag:``,transactionId:``}),Promise.reject(e)}})}addDataToPackage(e,t){return V(this,null,function*(){GR(`Add data to package`),yield this.sendMessage({target:lp.custom,method:vf.addDataToPackage,request:t,data:[{data:e.buffer}]}),GR(`Data added to package`)})}shutdown(){GR(`Shutdown service`),this._worker&&(this._worker.terminate(),GR(`Worker terminated`)),this.isPrepared=!1,this.isInitialized=!1,this.isProcessing=!1,this._initProcess=null}};function qR(){return V(this,null,function*(){let e=window.customElements.get(`document-reader`),t=window.customElements.get(`camera-snapshot`),n=window.customElements.get(`fullscreen-container`);e||window.customElements.define(`document-reader`,TI),t||window.customElements.define(`camera-snapshot`,HI),n||window.customElements.define(`fullscreen-container`,KI);let r=window.customElements.whenDefined(`document-reader`),i=window.customElements.whenDefined(`camera-snapshot`),a=window.customElements.whenDefined(`fullscreen-container`);yield Promise.all([r,i,a])})}var JR={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:E},YR=(e=JR,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function XR(e){return(t,n)=>typeof n==`object`?YR(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var ZR=(e,t,n)=>{for(let n of t)if(n[0]===e)return(0,n[1])();return n==null?void 0:n()};function QR(e){"@babel/helpers - typeof";return QR=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},QR(e)}function $R(e,t){if(QR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ez(e){var t=$R(e,`string`);return QR(t)==`symbol`?t:t+``}function tz(e,t,n){return(t=ez(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nz(Object(n),!0).forEach(function(t){tz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var iz=class e{constructor({errorCode:e,errorCodeKey:t,message:n,underlyingError:r,underlyingBaseError:i,domain:a,module:o,errorEnumName:s,shortDomainCode:c}){this.errorCode=e,this.errorCodeKey=t,this.message=n,this.underlyingError=r,this.underlyingBaseError=i,this.module=o,this.domain=a,this.errorEnumName=s,this.shortDomainCode=c}static getErrorKey(e,t){let n=Object.keys(t).find(n=>t[n]===e);if(!n)throw Error(`Invalid errorCode: ${e} in enum`);return n}get lastUnderlyingError(){let t=this.underlyingBaseError;for(;(t==null?void 0:t.underlyingBaseError)instanceof e;)t=t.underlyingBaseError;return t==null?void 0:t.underlyingError}toObject(){let t={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof e&&(t.underlyingBaseError=this.underlyingBaseError.toObject()),t}get shortChain(){let t=`${this.shortDomainCode}:${this.errorCode}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.shortChain}`),t}get fullChain(){let t=`${this.module}.${this.domain}:${this.errorCodeKey}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.fullChain}`),t}};function az(e,t){if(t.displayName?console.log(`Register module: ${t.displayName}`):console.error(`Missed "displayName" when register module`),t.getSupportedTemplates&&typeof t.getSupportedTemplates==`function`){let e=t.getSupportedTemplates();console.log(`${t==null?void 0:t.displayName} supported templates: ${e.join(`, `)}`)}else console.error(`Missed "getSupportedTemplates" method when register module`);if(t.initialize&&typeof t.initialize==`function`||console.error(`${t==null?void 0:t.displayName} "initialize" method was not implemented`),t.deinitialize&&typeof t.deinitialize==`function`||console.error(`${t==null?void 0:t.displayName} "deinitialize" method was not implemented`),t.cancel&&typeof t.cancel==`function`||console.error(`${t==null?void 0:t.displayName} "cancel" method was not implemented`),t.isReady&&typeof t.isReady==`function`||console.error(`${t==null?void 0:t.displayName} "isReady" method was not implemented`),t.getIdentifier&&typeof t.getIdentifier==`function`){let e=t.getIdentifier();console.log(`Module id: ${e}`)}else console.error(`Missed "getIdentifier" when register module`);customElements.get(t.getIdentifier())?console.log(`Module ${e} has already registered`):customElements.define(e,t),console.log(`-------`)}function oz(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var sz={FORM:`form`,DATA:`data`},cz=e=>{if(typeof e!=`string`)return!1;try{return new URL(e),!0}catch(e){return!1}},lz=[`ar`,`he`],uz=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return lz.includes(n)?`rtl`:`ltr`},dz=(e,t)=>e.base64&&!(t!=null&&t.base64.has(e.base64))?e.base64:e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))?e.imageURL:``,fz=(e,t,n)=>{var r;if(!t)return;let i=(r=e==null?void 0:e.idvAsset)==null?null:r;for(;i;){let e=dz(i,n);if(e)return e;i=i.failurePolicy===`placeholderImage`&&i.placeholderImage||null}},pz={DOC_READER:`DOC_READER`,DOC_READER_GALLERY:`DOC_READER_GALLERY`},mz=function(e){return e[e.NO_INITIALIZED=0]=`NO_INITIALIZED`,e[e.UNKNOWN_STEP=1]=`UNKNOWN_STEP`,e[e.SCAN_ERROR=2]=`SCAN_ERROR`,e[e.RFID_ERROR=3]=`RFID_ERROR`,e[e.IMAGE_LOADING_FAILED=4]=`IMAGE_LOADING_FAILED`,e}({}),hz=function(e){return e[e.CONFIGURATION_FAILED=0]=`CONFIGURATION_FAILED`,e[e.INTERNAL_ERROR=1]=`INTERNAL_ERROR`,e[e.PRESENTER_UNAVAILABLE=2]=`PRESENTER_UNAVAILABLE`,e}({}),gz=`idv-document`,_z={0:pf.auto,1:pf.captureVideo,2:pf.captureFrame},vz={0:yf.line,1:yf.corners},yz={0:!0,1:!0,2:!1,3:!0},bz=1920,xz=4e6,Sz=5e7,Cz=function(e){return e.BarcodeMRZ=`BarcodeMRZ`,e.BoundsLite=`BoundsLite`,e}({}),wz,Tz,Ez=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,mz);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};wz=Ez,wz.MODULE=gz,wz.ERROR_ENUM_NAME=`ReaderModuleError`,wz.SHORT_CODE=`RM`;var Dz=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,hz);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Tz=Dz,Tz.MODULE=gz,Tz.ERROR_ENUM_NAME=`ScanError`,Tz.SHORT_CODE=`RMS`;var Oz=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})};function kz(e){return XR(rz(rz({},e),{},{state:!0,attribute:!1}))}var Az=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function jz(e,t){return(n,r,i)=>{let a=t=>{var n,r;return(n=(r=t.renderRoot)==null?void 0:r.querySelector(e))==null?null:n};if(t){let{get:e,set:t}=typeof r==`object`?n:i==null?(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})():i;return Az(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return Az(n,r,{get(){return a(this)}})}}function Mz(e){return Nz.apply(this,arguments)}function Nz(){return Nz=d(function*(e){return new Promise(t=>setTimeout(t,e))}),Nz.apply(this,arguments)}function Pz(e){return Fz.apply(this,arguments)}function Fz(){return Fz=d(function*(e,t=0,n=0){let r=null,i=n*1e3;for(let n=0;n<=t;n++){try{let t=yield e();if(t!=null&&t.transactionId)return t;break}catch(e){r=e}n<t&&(yield Mz(i))}throw r}),Fz.apply(this,arguments)}var Iz=e=>e?(e.internalScenario&&(e.scenario=e.internalScenario),delete e.internalScenario,e):{};function Lz(e,t,n,r,i){let a=e*t,o=a>i;return{width:e,height:t,isExtraLargeResolution:o,isDownscaleNeeded:(e>n||t>n||a>r)&&!o}}var Rz=function(){var e=d(function*(e,t,n,r){let i=yield createImageBitmap(e),{width:a,height:o}=i;return i==null||i.close(),Lz(a,o,t,n,r)});return function(t,n,r,i){return e.apply(this,arguments)}}();function zz({width:e,height:t,softSideLimit:n,softPixelLimit:r}){if(!(e>0&&t>0))return{width:1,height:1};let i=Math.max(e,t),a=e*t,o=i>n?n/i:1,s=a>r?Math.sqrt(r/a):1,c=Math.min(o,s,1);return{width:Math.max(1,Math.floor(e*c)),height:Math.max(1,Math.floor(t*c))}}function Bz(e,t,n){return Vz.apply(this,arguments)}function Vz(){return Vz=d(function*(e,t,n){return new Promise(r=>{if(!e||!e.size)return r({ok:!1});let i=document.createElement(`canvas`),a=i.getContext(`2d`),o=URL.createObjectURL(e),s=new Image,c=e=>{try{URL.revokeObjectURL(o)}catch(e){}try{i.width=0,i.height=0}catch(e){}s.onload=null,s.onerror=null,s.src=``,r(e)};s.onload=function(){let e=zz({width:s.width,height:s.height,softSideLimit:t,softPixelLimit:n});if(i.width=e.width,i.height=e.height,a)try{a.drawImage(s,0,0,e.width,e.height);let t=a.getImageData(0,0,e.width,e.height);return c(t?{ok:!0,imageData:t}:{ok:!1})}catch(e){return c({ok:!1})}return c({ok:!1})},s.onerror=()=>c({ok:!1}),s.src=o})}),Vz.apply(this,arguments)}var Hz=e=>{let{translationKeysData:t,translationKeysProps:n,locale:r}=e,i={},a=null;for(let e in t)i[t[e].key]=e;for(let e in n)i[e]&&n[e]&&(a?a[i[e]]=n[e]:a={[i[e]]:n[e]});return a?{[r]:a}:{}},Uz={preparingCamera:{fallback:`Preparing the camera...`,key:`strPrepareCamera`},timeout:{fallback:`Timeout`,key:`strTimeout`},noFocus:{fallback:`No camera focus`,key:`strNoFocus`},somethingWentWrong:{fallback:`Something went wrong`,key:`messageUnknownError`},incorrectCameraId:{fallback:`No camera with the specified ID found.`,key:`InfoScreenIncorrectCameraIdTitle`},done:{fallback:`Done!`,key:`strDoneMessage`},cameraUnavailable:{fallback:`Camera unavailable!`,key:`statusCameraUnavailableTitle`},versionNotSupported:{fallback:`Your browser version is not supported`,key:`statusBrowserNotSupportedTitle`},httpNotSupported:{fallback:`HTTPS not used`,key:`statusBrowserHTTPNotSupportedSubtitle`},insecurePageContext:{fallback:`Insecure context`,key:`statusBrowserInsecurePageContextSubtitle`},badLicense:{fallback:`The license cannot be found or has expired`,key:`statusProcMgrBadLicenseSubtitle`},fileCorrupt:{fallback:`This file is corrupt or not supported`,key:`statusIncorrectDataTitle`},largeFile:{fallback:`This file is too large to be uploaded`,key:`statusLargeDataTitle`},placeDocumentIntoFrame:{fallback:`Fit the document into the frame`,key:`strPlaceDocumentInFrame`},holdDocumentStraight:{fallback:`Hold the document straight`,key:`strHoldDocumentStraight`},glaresOnDocument:{fallback:`Avoid glare on the document`,key:`strGlaresOnDocument`},tryAgain:{fallback:`Try again`,key:`faceLivenessScreenButton`},noCameraAvailable:{fallback:`No camera available`,key:`InfoScreenNoCameraTitle`},positionDocumentCenter:{fallback:`Position the document in the center`,key:`documentReaderDocumentReaderLayoutDocumentCenter`},uploadPhoto:{fallback:`Upload a photo`,key:`cameraCaptureCameraCaptureStartScreenTitle`},moveCloser:{fallback:`Move closer`,key:`hint.moveCloser`},keepDeviceStill:{fallback:`Hold the device still`,key:`strKeepDeviceStill`},camera:{fallback:`Camera`,key:`strCamera`},switchToMobile:{fallback:`Switch to mobile`,key:`switchToMobile`},openPhoneCamera:{fallback:`Open the camera on your mobile device, scan the QR code, and follow the link`,key:`openPhoneCamera`},pleaseWait:{fallback:`Please wait...`,key:`strPleaseWait`},mobileDevice:{fallback:`Mobile device`,key:`mobileDevice`},verifyYourIdentity:{fallback:`Identity document verification`,key:`verifyYourIdentity`},fromCameraFilesMobileDesktop:{fallback:`Capture a document using the computer’s camera, upload it from files, or scan it on a mobile device`,key:`fromCameraFilesMobileDesktop`},fromCameraFilesDesktop:{fallback:`Capture a document using the computer’s camera or upload it from files`,key:`fromCameraFilesDesktop`},fromCameraMobileDesktop:{fallback:`Capture a document using the computer’s camera or scan it on a mobile device`,key:`fromCameraMobileDesktop`},fromFilesMobileDesktop:{fallback:`Upload a document from files or scan it on a mobile device`,key:`fromFilesMobileDesktop`},fromCameraDesktop:{fallback:`Use the computer's camera to capture a document`,key:`fromCameraDesktop`},fromFilesDesktop:{fallback:`Pick a document from files and upload it`,key:`fromFilesDesktop`},fromMobileDesktop:{fallback:`Use your mobile camera to capture a document`,key:`fromMobileDesktop`},fromCameraGalleryMobile:{fallback:`Capture a document using the mobile's camera or upload it from gallery`,key:`fromCameraGalleryMobile`},fromGalleryMobile:{fallback:`Pick a document from the gallery and upload it`,key:`fromGalleryMobile`},gallery:{fallback:`Gallery`,key:`gallery`},files:{fallback:`Files`,key:`files`},returnToComputer:{fallback:`Return to the computer`,key:`returnToComputer`},documentCaptured:{fallback:`Your document has been captured`,key:`documentCaptured`},or:{fallback:`or`,key:`strOr`},continueInBrowser:{fallback:`Click here to continue in browser`,key:`continueInBrowser`},skip:{fallback:`Skip`,key:`strSkip`},flipTheDocument:{fallback:`Flip the document`,key:`documentReaderDocumentReaderLayoutFlipDocument`},tiltTheDocument:{fallback:`Tilt the document`,key:`strTiltDocument`}},Wz=s`
36
36
  *,
37
37
  ::after,
38
38
  ::before {
@@ -57,7 +57,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
57
57
  width: 100%;
58
58
  height: 100%;
59
59
  }
60
- `;function Gz(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Kz(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var qz=class extends Ne{constructor(...e){super(...e),this._performType=sz.DATA,this.props=null,this._handleDocumentReader=e=>{var t,n,r,i;if((t=this.props)==null||(n=t.idvEventListener)==null||n.call(t,`IDV-DOCUMENT`,e.detail.action),e.detail.action===W.CAMERA_PROCESS_STARTED&&(r=this.props)!=null&&r.isProcessing&&this.props.isProcessing(!1),e.detail.action===W.PROCESS_FINISHED){var a,o,s,c,l;if(((a=e.detail.data)==null?void 0:a.status)===ip.ERROR){var u;let t={transactionId:``,cancel:!1,has_nfc:!1,errorCode:e.detail.data.reason};(u=this.props)==null||u.perform(t,this._performType)}let t=(o=e.detail.data)==null?void 0:o.status,n=t===ip.OK,r=t===ip.TIMEOUT;if(!(n||r)||!((s=e.detail.data)!=null&&s.response))return;if((c=this.props)!=null&&c.isProcessing){var d,f;(d=this.props)==null||(f=d.idvEventListener)==null||f.call(d,`IDV-DOCUMENT`,`Success. Start to finalize package`,`DEBUG`),this.props.isProcessing(!0)}let i=(l=this.props)==null||(l=l.moduleProps)==null?void 0:l.finalizePackageSettings;Nz(()=>window.RegulaDocumentSDK.finalizePackage(),i==null?void 0:i.retryCount,i==null?void 0:i.retryDelay).then(e=>{var t;let n={transactionId:(e==null?void 0:e.transactionId)||``,cancel:!1,has_nfc:!1,errorCode:``};(t=this.props)==null||t.perform(n,this._performType)}).catch(e=>{var t;console.log(`finalizePackage error: `,e),(t=this.props)==null||t.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)})}if(((i=e.detail)==null?void 0:i.action)===W.CLOSE||e.detail.action===W.CAMERA_PROCESS_CLOSED){var p;(p=this.props)==null||p.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}}}_prepareCustomizationStyles(e,t,n){let r=[];if(e!=null&&e.fontFamily&&r.push(s`
60
+ `;function Gz(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Kz(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var qz=class extends Ne{constructor(...e){super(...e),this._performType=sz.DATA,this.props=null,this._handleDocumentReader=e=>{var t,n,r,i;if((t=this.props)==null||(n=t.idvEventListener)==null||n.call(t,`IDV-DOCUMENT`,e.detail.action),e.detail.action===W.CAMERA_PROCESS_STARTED&&(r=this.props)!=null&&r.isProcessing&&this.props.isProcessing(!1),e.detail.action===W.PROCESS_FINISHED){var a,o,s,c,l;if(((a=e.detail.data)==null?void 0:a.status)===ip.ERROR){var u;let t={transactionId:``,cancel:!1,has_nfc:!1,errorCode:e.detail.data.reason};(u=this.props)==null||u.perform(t,this._performType)}let t=(o=e.detail.data)==null?void 0:o.status,n=t===ip.OK,r=t===ip.TIMEOUT;if(!(n||r)||!((s=e.detail.data)!=null&&s.response))return;if((c=this.props)!=null&&c.isProcessing){var d,f;(d=this.props)==null||(f=d.idvEventListener)==null||f.call(d,`IDV-DOCUMENT`,`Success. Start to finalize package`,`DEBUG`),this.props.isProcessing(!0)}let i=(l=this.props)==null||(l=l.moduleProps)==null?void 0:l.finalizePackageSettings;Pz(()=>window.RegulaDocumentSDK.finalizePackage(),i==null?void 0:i.retryCount,i==null?void 0:i.retryDelay).then(e=>{var t;let n={transactionId:(e==null?void 0:e.transactionId)||``,cancel:!1,has_nfc:!1,errorCode:``};(t=this.props)==null||t.perform(n,this._performType)}).catch(e=>{var t;console.log(`finalizePackage error: `,e),(t=this.props)==null||t.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)})}if(((i=e.detail)==null?void 0:i.action)===W.CLOSE||e.detail.action===W.CAMERA_PROCESS_CLOSED){var p;(p=this.props)==null||p.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}}}_prepareCustomizationStyles(e,t,n){let r=[];if(e!=null&&e.fontFamily&&r.push(s`
61
61
  document-reader::part(container) {
62
62
  font-family: ${o(e.fontFamily)};
63
63
  }
@@ -113,39 +113,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
113
113
  document-reader::part(webcamera-video) {
114
114
  background-color: ${o(e.cameraPreviewBackgroundColor)};
115
115
  }
116
- `),e!=null&&e.containerCloseButtonImage){let i=dz(e.containerCloseButtonImage,t,n);i&&r.push(s`
116
+ `),e!=null&&e.containerCloseButtonImage){let i=fz(e.containerCloseButtonImage,t,n);i&&r.push(s`
117
117
  document-reader::part(container-close-button)::before {
118
118
  background-image: url(${o(i)});
119
119
  }
120
- `)}if(e!=null&&e.menuFromCameraButtonImage){let i=dz(e.menuFromCameraButtonImage,t,n);i&&r.push(s`
120
+ `)}if(e!=null&&e.menuFromCameraButtonImage){let i=fz(e.menuFromCameraButtonImage,t,n);i&&r.push(s`
121
121
  document-reader::part(menu-from-camera-button)::before {
122
122
  background-image: url(${o(i)});
123
123
  }
124
- `)}if(e!=null&&e.menuFromGalleryButtonImage){let i=dz(e.menuFromGalleryButtonImage,t,n);i&&r.push(s`
124
+ `)}if(e!=null&&e.menuFromGalleryButtonImage){let i=fz(e.menuFromGalleryButtonImage,t,n);i&&r.push(s`
125
125
  document-reader::part(menu-from-gallery-button)::before {
126
126
  background-image: url(${o(i)});
127
127
  }
128
- `)}if(e!=null&&e.menuFromMobileButtonImage){let i=dz(e.menuFromMobileButtonImage,t,n);i&&r.push(s`
128
+ `)}if(e!=null&&e.menuFromMobileButtonImage){let i=fz(e.menuFromMobileButtonImage,t,n);i&&r.push(s`
129
129
  document-reader::part(menu-from-mobile-button)::before {
130
130
  background-image: url(${o(i)});
131
131
  }
132
- `)}if(e!=null&&e.closeButton){let i=dz(e.closeButton,t,n);i&&r.push(s`
132
+ `)}if(e!=null&&e.closeButton){let i=fz(e.closeButton,t,n);i&&r.push(s`
133
133
  document-reader::part(controls-process-close-button)::before {
134
134
  background-image: url(${o(i)});
135
135
  }
136
- `)}if(e!=null&&e.switchButton){let i=dz(e.switchButton,t,n);i&&r.push(s`
136
+ `)}if(e!=null&&e.switchButton){let i=fz(e.switchButton,t,n);i&&r.push(s`
137
137
  document-reader::part(controls-change-camera-button)::before {
138
138
  background-image: url(${o(i)});
139
139
  }
140
- `)}if(e!=null&&e.infoTryAgainButtonImage){let i=dz(e.infoTryAgainButtonImage,t,n);i&&r.push(s`
140
+ `)}if(e!=null&&e.infoTryAgainButtonImage){let i=fz(e.infoTryAgainButtonImage,t,n);i&&r.push(s`
141
141
  document-reader::part(info-try-again-button)::before {
142
142
  background-image: url(${o(i)});
143
143
  }
144
- `)}return r}_prepareTranslations(e){let{locale:t,localizationKeys:n}=e,r=t&&typeof t==`string`?t.slice(0,2).toLowerCase():``;return!r||!n?null:Hz({translationKeysData:Uz,translationKeysProps:n,locale:r})}_prepareSettings({copyright:e,customization:t,functionality:n,locale:r}){var i,a,o,s,c;let l=oz({copyright:e,skipButton:n==null?void 0:n.showSkipNextPageButton,captureButton:n==null?void 0:n.showCaptureButton,captureButtonDelay:n==null?void 0:n.showCaptureButtonDelayFromStart,cameraFrameOffsetWidth:t==null?void 0:t.cameraFrameWidthOffset,cameraFrameActiveColor:t==null?void 0:t.cameraFrameActiveColor,cameraFrameDefaultColor:t==null?void 0:t.cameraFrameDefaultColor,closeButton:n==null?void 0:n.showCloseButton,changeCameraButton:n==null?void 0:n.showCameraSwitchButton,videoCaptureMotionControl:n==null?void 0:n.videoCaptureMotionControl,statusIcon:t==null?void 0:t.showStatusMessages,cameraFrameBorderWidth:t==null?void 0:t.cameraFrameBorderWidth,cameraFrameLineLength:t==null?void 0:t.cameraFrameLineLength,nextPageAnimationEndDelay:t==null?void 0:t.nextPageAnimationEndDelay,nextPageAnimationStartDelay:t==null?void 0:t.nextPageAnimationStartDelay,statusPositionMultiplier:t==null?void 0:t.statusPositionMultiplier,cameraFrameLandscapeAspectRatio:t==null?void 0:t.cameraFrameLandscapeAspectRatio,cameraFramePortraitAspectRatio:t==null?void 0:t.cameraFramePortraitAspectRatio,cameraFrameCornerRadius:t==null?void 0:t.cameraFrameCornerRadius,cameraFrameVerticalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,cameraFrameHorizontalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,internalScenario:n==null?void 0:n.internalScenario,multipageProcessing:n==null?void 0:n.multipageProcessing,multipleFileInput:n==null?void 0:n.multipleFileInput,cameraId:n==null?void 0:n.cameraId,mirrorType:n==null?void 0:n.mirrorType,mobileDelegate:n==null?void 0:n.mobileDelegate,finalizeOnTimeout:n==null?void 0:n.finalizeOnTimeout,maxImageSize:n==null?void 0:n.maxImageSize,maxResolutionSize:n==null?void 0:n.maxResolutionSize,cameraMode:n==null?void 0:n.cameraMode,videoRecord:n==null?void 0:n.recordScanningProcess,activityIndicatorLandscapePositionMultiplier:t==null?void 0:t.activityIndicatorLandscapePositionMultiplier,activityIndicatorPortraitPositionMultiplier:t==null?void 0:t.activityIndicatorPortraitPositionMultiplier,cameraFrameLineCap:t==null?void 0:t.cameraFrameLineCap,fromCameraButton:t==null?void 0:t.fromCameraButton,uploadFileButton:t==null?void 0:t.uploadFileButton,mirrorButton:t==null?void 0:t.mirrorButton,nonce:(i=this.props)==null?void 0:i.nonce}),u=rz(rz(rz(rz(rz({},!!r&&typeof r==`string`&&{locale:r.slice(0,2).toLowerCase()}),typeof(n==null?void 0:n.captureMode)==`number`&&n.captureMode in gz&&{captureMode:gz[n.captureMode]}),typeof(t==null?void 0:t.cameraFrameShapeType)==`number`&&t.cameraFrameShapeType in _z&&{cameraFrameShapeType:_z[t.cameraFrameShapeType]}),(typeof(n==null||(a=n.videoOutputSettings)==null?void 0:a.AVVideoWidthKey)==`number`||typeof(n==null||(o=n.videoOutputSettings)==null?void 0:o.AVVideoHeightKey)==`number`)&&{resolution:rz(rz({},typeof(n==null||(s=n.videoOutputSettings)==null?void 0:s.AVVideoWidthKey)==`number`&&{width:n.videoOutputSettings.AVVideoWidthKey}),typeof(n==null||(c=n.videoOutputSettings)==null?void 0:c.AVVideoHeightKey)==`number`&&{height:n.videoOutputSettings.AVVideoHeightKey})}),typeof(n==null?void 0:n.cameraFrame)==`number`&&n.cameraFrame in vz&&{cameraFrame:vz[n.cameraFrame]});return rz(rz({},l),u)}_setDocReaderProps(){var e,t,n;if(!this.props||!this._component)return;(e=(t=this.props).isProcessing)==null||e.call(t,!0);let{processParam:r,functionality:i,customization:a,sessionId:o,copyright:s,serviceToken:l,locale:u,preloadAssetsRequired:d,failedAssets:f}=this.props.moduleProps,p=Fz(r),m=p==null||(n=p.backendProcessing)==null?void 0:n.serviceURL;if(!m||!Iz(m)){let e=new Ez({errorCode:mz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Tz({errorCode:pz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}if(l&&p!=null&&p.backendProcessing){var h;p.backendProcessing.httpHeaders=rz({Authorization:`Connection ${l}`},p==null||(h=p.backendProcessing)==null?void 0:h.httpHeaders)}let g={processParam:rz({},p)};o&&(g.tag=o),window.RegulaDocumentSDK.recognizerProcessParam=g,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}},c(this.shadowRoot,[...this.shadowRoot.adoptedStyleSheets,...this._prepareCustomizationStyles(a,d,f)]),this._component.settings=this._prepareSettings({copyright:s,customization:a,functionality:i,locale:u}),this._component.translations=this._prepareTranslations(this.props.moduleProps)}updated(e){e.has(`props`)&&this._setDocReaderProps()}render(){return fe`<document-reader
144
+ `)}return r}_prepareTranslations(e){let{locale:t,localizationKeys:n}=e,r=t&&typeof t==`string`?t.slice(0,2).toLowerCase():``;return!r||!n?null:Hz({translationKeysData:Uz,translationKeysProps:n,locale:r})}_prepareSettings({copyright:e,customization:t,functionality:n,locale:r}){var i,a,o,s,c;let l=oz({copyright:e,skipButton:n==null?void 0:n.showSkipNextPageButton,captureButton:n==null?void 0:n.showCaptureButton,captureButtonDelay:n==null?void 0:n.showCaptureButtonDelayFromStart,cameraFrameOffsetWidth:t==null?void 0:t.cameraFrameWidthOffset,cameraFrameActiveColor:t==null?void 0:t.cameraFrameActiveColor,cameraFrameDefaultColor:t==null?void 0:t.cameraFrameDefaultColor,closeButton:n==null?void 0:n.showCloseButton,changeCameraButton:n==null?void 0:n.showCameraSwitchButton,videoCaptureMotionControl:n==null?void 0:n.videoCaptureMotionControl,statusIcon:t==null?void 0:t.showStatusMessages,cameraFrameBorderWidth:t==null?void 0:t.cameraFrameBorderWidth,cameraFrameLineLength:t==null?void 0:t.cameraFrameLineLength,nextPageAnimationEndDelay:t==null?void 0:t.nextPageAnimationEndDelay,nextPageAnimationStartDelay:t==null?void 0:t.nextPageAnimationStartDelay,statusPositionMultiplier:t==null?void 0:t.statusPositionMultiplier,cameraFrameLandscapeAspectRatio:t==null?void 0:t.cameraFrameLandscapeAspectRatio,cameraFramePortraitAspectRatio:t==null?void 0:t.cameraFramePortraitAspectRatio,cameraFrameCornerRadius:t==null?void 0:t.cameraFrameCornerRadius,cameraFrameVerticalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,cameraFrameHorizontalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,internalScenario:n==null?void 0:n.internalScenario,multipageProcessing:n==null?void 0:n.multipageProcessing,multipleFileInput:n==null?void 0:n.multipleFileInput,cameraId:n==null?void 0:n.cameraId,mirrorType:n==null?void 0:n.mirrorType,mobileDelegate:n==null?void 0:n.mobileDelegate,finalizeOnTimeout:n==null?void 0:n.finalizeOnTimeout,maxImageSize:n==null?void 0:n.maxImageSize,maxResolutionSize:n==null?void 0:n.maxResolutionSize,cameraMode:n==null?void 0:n.cameraMode,videoRecord:n==null?void 0:n.recordScanningProcess,activityIndicatorLandscapePositionMultiplier:t==null?void 0:t.activityIndicatorLandscapePositionMultiplier,activityIndicatorPortraitPositionMultiplier:t==null?void 0:t.activityIndicatorPortraitPositionMultiplier,cameraFrameLineCap:t==null?void 0:t.cameraFrameLineCap,fromCameraButton:t==null?void 0:t.fromCameraButton,uploadFileButton:t==null?void 0:t.uploadFileButton,mirrorButton:t==null?void 0:t.mirrorButton,nonce:(i=this.props)==null?void 0:i.nonce}),u=rz(rz(rz(rz(rz({},!!r&&typeof r==`string`&&{locale:r.slice(0,2).toLowerCase()}),typeof(n==null?void 0:n.captureMode)==`number`&&n.captureMode in _z&&{captureMode:_z[n.captureMode]}),typeof(t==null?void 0:t.cameraFrameShapeType)==`number`&&t.cameraFrameShapeType in vz&&{cameraFrameShapeType:vz[t.cameraFrameShapeType]}),(typeof(n==null||(a=n.videoOutputSettings)==null?void 0:a.AVVideoWidthKey)==`number`||typeof(n==null||(o=n.videoOutputSettings)==null?void 0:o.AVVideoHeightKey)==`number`)&&{resolution:rz(rz({},typeof(n==null||(s=n.videoOutputSettings)==null?void 0:s.AVVideoWidthKey)==`number`&&{width:n.videoOutputSettings.AVVideoWidthKey}),typeof(n==null||(c=n.videoOutputSettings)==null?void 0:c.AVVideoHeightKey)==`number`&&{height:n.videoOutputSettings.AVVideoHeightKey})}),typeof(n==null?void 0:n.cameraFrame)==`number`&&n.cameraFrame in yz&&{cameraFrame:yz[n.cameraFrame]});return rz(rz({},l),u)}_setDocReaderProps(){var e,t,n;if(!this.props||!this._component)return;(e=(t=this.props).isProcessing)==null||e.call(t,!0);let{processParam:r,functionality:i,customization:a,sessionId:o,copyright:s,serviceToken:l,locale:u,preloadAssetsRequired:d,failedAssets:f}=this.props.moduleProps,p=Iz(r),m=p==null||(n=p.backendProcessing)==null?void 0:n.serviceURL;if(!m||!cz(m)){let e=new Dz({errorCode:hz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Ez({errorCode:mz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}if(l&&p!=null&&p.backendProcessing){var h;p.backendProcessing.httpHeaders=rz({Authorization:`Connection ${l}`},p==null||(h=p.backendProcessing)==null?void 0:h.httpHeaders)}let g={processParam:rz({},p)};o&&(g.tag=o),window.RegulaDocumentSDK.recognizerProcessParam=g,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}},c(this.shadowRoot,[...this.shadowRoot.adoptedStyleSheets,...this._prepareCustomizationStyles(a,d,f)]),this._component.settings=this._prepareSettings({copyright:s,customization:a,functionality:i,locale:u}),this._component.translations=this._prepareTranslations(this.props.moduleProps)}updated(e){e.has(`props`)&&this._setDocReaderProps()}render(){return fe`<document-reader
145
145
  new-layout
146
146
  start-screen=${!1}
147
147
  @document-reader=${this._handleDocumentReader}
148
- ></document-reader>`}},Jz=(qz.styles=[Wz],qz);Kz([Oz(),Gz(`design:type`,Object)],Jz.prototype,`props`,void 0),Kz([Az(`document-reader`),Gz(`design:type`,TI===void 0?Object:TI)],Jz.prototype,`_component`,void 0),Jz=Kz([Dz(`document-reader-camera`)],Jz);var Yz=e=>e==null?z:e,Xz=s`
148
+ ></document-reader>`}},Jz=(qz.styles=[Wz],qz);Kz([kz(),Gz(`design:type`,Object)],Jz.prototype,`props`,void 0),Kz([jz(`document-reader`),Gz(`design:type`,TI===void 0?Object:TI)],Jz.prototype,`_component`,void 0),Jz=Kz([Oz(`document-reader-camera`)],Jz);var Yz=e=>e==null?z:e,Xz=s`
149
149
  .gallery-root {
150
150
  display: flex;
151
151
  width: 100%;
@@ -277,10 +277,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
277
277
  d="M93.1547 5.85404C92.7965 5.24412 91.9727 4.77991 90.8981 4.77991C89.0174 4.77991 87.459 6.35794 87.459 8.38431C87.459 10.3925 89.0174 11.9336 90.8981 11.9336C91.9191 11.9336 92.5637 11.6287 93.0651 10.9996V11.6455C93.0651 13.0442 92.08 13.5462 91.1308 13.5462C90.1816 13.5462 89.4292 13.0792 89.286 12.0578H87.7099C87.7818 13.8512 89.2142 15 91.1308 15C93.0474 15 94.6758 13.9063 94.6758 11.539V4.83175H93.1547V5.85404ZM91.0772 10.3911C89.9307 10.3911 89.1069 9.54811 89.1069 8.38291C89.1069 7.21772 89.9307 6.32058 91.0772 6.32058C92.2237 6.32058 93.0651 7.21725 93.0651 8.38291C93.0651 9.54858 92.2232 10.3911 91.0772 10.3911Z"
278
278
  fill="#BD7DFF"
279
279
  />
280
- </svg>`,eB=class extends Ne{constructor(...e){var t;super(...e),t=this,this._performType=sz.DATA,this.props=null,this._handleInputChange=function(){var e=d(function*(e){var n,r,i;let a=[...(n=e.target.files)==null?[]:n];if(!a.length)return;(r=t.props)!=null&&r.isProcessing&&t.props.isProcessing(!0),yield window.RegulaDocumentSDK.createBackendTransaction({},window.RegulaDocumentSDK.recognizerProcessParam);let o=[];for(let e of a){let{isExtraLargeResolution:n,isDownscaleNeeded:r}=yield Rz(e,yz,bz,xz),i=e.type.startsWith(`image/webp`);if(n){var s;(s=t.props)==null||s.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_RESOLUTION_EXCEEDS_LIMIT`},t._performType);return}if(r||i){let n=yield Bz(e,yz,bz);if(!n.ok){var c;let e={transactionId:``,cancel:!1,has_nfc:!1,errorCode:r?`IMAGE_DOWNSCALING_ERROR`:`IMAGE_PROCESSING_ERROR`};(c=t.props)==null||c.perform(e,t._performType);return}o.push(n.imageData)}else o.push(yield e.arrayBuffer())}try{yield window.RegulaDocumentSDK.processImage(o)}catch(e){var l;(l=t.props)==null||l.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_PROCESSING_ERROR`},t._performType);return}let u=(i=t.props)==null||(i=i.moduleProps)==null?void 0:i.finalizePackageSettings;try{var f;let e=yield Nz(d(function*(){return window.RegulaDocumentSDK.finalizePackage()}),u==null?void 0:u.retryCount,u==null?void 0:u.retryDelay),n={transactionId:e==null?void 0:e.transactionId,cancel:!1,has_nfc:!1,errorCode:``};(f=t.props)==null||f.perform(n,t._performType)}catch(e){var p;console.log(`finalizePackage error: `,e),(p=t.props)==null||p.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},t._performType)}});return function(t){return e.apply(this,arguments)}}()}_handleUploadClick(){this._input.click()}_handleCloseClick(){var e;(e=this.props)==null||e.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}_setDocReaderGalleryProps(){var e;if(!this.props)return;let{processParam:t,sessionId:n,serviceToken:r,selectionLimit:i}=this.props.moduleProps;this._input.multiple=typeof i==`number`&&(i===0||i>1);let a=Fz(t),o=a==null||(e=a.backendProcessing)==null?void 0:e.serviceURL;if(!o||!Iz(o)){let e=new Ez({errorCode:mz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Tz({errorCode:pz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}r&&a!=null&&a.backendProcessing&&(a.backendProcessing.httpHeaders={Authorization:`Connection ${r}`});let s={processParam:rz({},a)};n&&(s.tag=n),window.RegulaDocumentSDK.recognizerProcessParam=s,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}}}updated(e){e.has(`props`)&&this._setDocReaderGalleryProps()}render(){var e,t;let n=(e=this.props)==null?void 0:e.moduleProps.locale;return fe`<div
280
+ </svg>`,eB=class extends Ne{constructor(...e){var t;super(...e),t=this,this._performType=sz.DATA,this.props=null,this._handleInputChange=function(){var e=d(function*(e){var n,r,i;let a=[...(n=e.target.files)==null?[]:n];if(!a.length)return;(r=t.props)!=null&&r.isProcessing&&t.props.isProcessing(!0),yield window.RegulaDocumentSDK.createBackendTransaction({},window.RegulaDocumentSDK.recognizerProcessParam);let o=[];for(let e of a){let{isExtraLargeResolution:n,isDownscaleNeeded:r}=yield Rz(e,bz,xz,Sz),i=e.type.startsWith(`image/webp`);if(n){var s;(s=t.props)==null||s.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_RESOLUTION_EXCEEDS_LIMIT`},t._performType);return}if(r||i){let n=yield Bz(e,bz,xz);if(!n.ok){var c;let e={transactionId:``,cancel:!1,has_nfc:!1,errorCode:r?`IMAGE_DOWNSCALING_ERROR`:`IMAGE_PROCESSING_ERROR`};(c=t.props)==null||c.perform(e,t._performType);return}o.push(n.imageData)}else o.push(yield e.arrayBuffer())}try{yield window.RegulaDocumentSDK.processImage(o)}catch(e){var l;(l=t.props)==null||l.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_PROCESSING_ERROR`},t._performType);return}let u=(i=t.props)==null||(i=i.moduleProps)==null?void 0:i.finalizePackageSettings;try{var f;let e=yield Pz(d(function*(){return window.RegulaDocumentSDK.finalizePackage()}),u==null?void 0:u.retryCount,u==null?void 0:u.retryDelay),n={transactionId:e==null?void 0:e.transactionId,cancel:!1,has_nfc:!1,errorCode:``};(f=t.props)==null||f.perform(n,t._performType)}catch(e){var p;console.log(`finalizePackage error: `,e),(p=t.props)==null||p.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},t._performType)}});return function(t){return e.apply(this,arguments)}}()}_handleUploadClick(){this._input.click()}_handleCloseClick(){var e;(e=this.props)==null||e.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}_setDocReaderGalleryProps(){var e;if(!this.props)return;let{processParam:t,sessionId:n,serviceToken:r,selectionLimit:i}=this.props.moduleProps;this._input.multiple=typeof i==`number`&&(i===0||i>1);let a=Iz(t),o=a==null||(e=a.backendProcessing)==null?void 0:e.serviceURL;if(!o||!cz(o)){let e=new Dz({errorCode:hz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Ez({errorCode:mz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}r&&a!=null&&a.backendProcessing&&(a.backendProcessing.httpHeaders={Authorization:`Connection ${r}`});let s={processParam:rz({},a)};n&&(s.tag=n),window.RegulaDocumentSDK.recognizerProcessParam=s,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}}}updated(e){e.has(`props`)&&this._setDocReaderGalleryProps()}render(){var e,t;let n=(e=this.props)==null?void 0:e.moduleProps.locale;return fe`<div
281
281
  part="gallery-root"
282
282
  class="gallery-root"
283
- dir="${lz(n)}"
283
+ dir="${uz(n)}"
284
284
  lang="${n}"
285
285
  style="background: ${Yz((t=this.props)==null||(t=t.moduleProps)==null?void 0:t.backgroundColor)}"
286
286
  >
@@ -298,4 +298,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
298
298
  <div class="footer">
299
299
  <a href>${$z} </a>
300
300
  </div>
301
- </div>`}},tB=(eB.styles=[Xz],eB);Kz([Oz(),Gz(`design:type`,Object)],tB.prototype,`props`,void 0),Kz([Az(`#file-input`),Gz(`design:type`,typeof HTMLInputElement>`u`?Object:HTMLInputElement)],tB.prototype,`_input`,void 0),tB=Kz([Dz(`document-reader-gallery`)],tB);var nB,rB=!1,iB=class e extends Ne{constructor(...e){super(...e),this.props=null,this.renderVersion=0}setProps(t){if(!e.getSupportedTemplates().includes(t.moduleProps.templateId)){var n;let e=new Tz({errorCode:pz.UNKNOWN_STEP,message:`TemplateId ${t.moduleProps.templateId} is not supported`});(n=t.perform)==null||n.call(t,e)}let r=t.moduleProps.failedAssets;if(r&&r.blockingAssets.size>0){var i;let e=new Tz({errorCode:pz.IMAGE_LOADING_FAILED,message:`Failed to load image asset${r.blockingAssets.size>1?`s`:``}: ${[...r.blockingAssets].join(`, `)}`});(i=t.perform)==null||i.call(t,e)}this.renderVersion++,this.props=t}static isReady(){return rB}static getSupportedTemplates(){return[fz.DOC_READER,fz.DOC_READER_GALLERY]}static initialize(e){var t,n;let r=e==null||(t=e.docreader)==null?void 0:t.devLicense,i=e==null||(n=e.docreader)==null?void 0:n.module;window.RegulaDocumentSDK=new KR,console.info(`%cDocument Reader web component version: %s`,`color: #6e56b0;`,window.RegulaDocumentSDK.version.component),qR().then(()=>{window.RegulaDocumentSDK.initialize({license:r,module:i}).then(()=>rB=!0)})}static deinitialize(){var e;rB=!1,(e=window.RegulaDocumentSDK)==null||e.shutdown()}static getIdentifier(){return hz}static cancel(){}render(){var e;return fe`${Be(this.renderVersion,fe`${ZR((e=this.props)==null||(e=e.moduleProps)==null?void 0:e.templateId,[[fz.DOC_READER,()=>fe`<document-reader-camera .props=${this.props}></document-reader-camera>`],[fz.DOC_READER_GALLERY,()=>fe`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`}};return nB=iB,nB.displayName=hz,Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`props`,void 0),Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`renderVersion`,void 0),az(hz,iB),e.DocumentIdv=iB,e.ModuleType=Sz,e})({});
301
+ </div>`}},tB=(eB.styles=[Xz],eB);Kz([kz(),Gz(`design:type`,Object)],tB.prototype,`props`,void 0),Kz([jz(`#file-input`),Gz(`design:type`,typeof HTMLInputElement>`u`?Object:HTMLInputElement)],tB.prototype,`_input`,void 0),tB=Kz([Oz(`document-reader-gallery`)],tB);var nB,rB=!1,iB=class e extends Ne{constructor(...e){super(...e),this.props=null,this.renderVersion=0}setProps(t){if(!e.getSupportedTemplates().includes(t.moduleProps.templateId)){var n;let e=new Ez({errorCode:mz.UNKNOWN_STEP,message:`TemplateId ${t.moduleProps.templateId} is not supported`});(n=t.perform)==null||n.call(t,e)}let r=t.moduleProps.failedAssets;if(r&&r.blockingAssets.size>0){var i;let e=new Ez({errorCode:mz.IMAGE_LOADING_FAILED,message:`Failed to load image asset${r.blockingAssets.size>1?`s`:``}: ${[...r.blockingAssets].join(`, `)}`});(i=t.perform)==null||i.call(t,e)}this.renderVersion++,this.props=t}static isReady(){return rB}static getSupportedTemplates(){return[pz.DOC_READER,pz.DOC_READER_GALLERY]}static initialize(e){var t,n;let r=e==null||(t=e.docreader)==null?void 0:t.devLicense,i=e==null||(n=e.docreader)==null?void 0:n.module;window.RegulaDocumentSDK=new KR,console.info(`%cDocument Reader web component version: %s`,`color: #6e56b0;`,window.RegulaDocumentSDK.version.component),qR().then(()=>{window.RegulaDocumentSDK.initialize({license:r,module:i}).then(()=>rB=!0)})}static deinitialize(){var e;rB=!1,(e=window.RegulaDocumentSDK)==null||e.shutdown()}static getIdentifier(){return gz}static cancel(){}render(){var e;return fe`${Be(this.renderVersion,fe`${ZR((e=this.props)==null||(e=e.moduleProps)==null?void 0:e.templateId,[[pz.DOC_READER,()=>fe`<document-reader-camera .props=${this.props}></document-reader-camera>`],[pz.DOC_READER_GALLERY,()=>fe`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`}};return nB=iB,nB.displayName=gz,Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`props`,void 0),Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`renderVersion`,void 0),az(gz,iB),e.DocumentIdv=iB,e.ModuleType=Cz,e})({});
package/dist/main.js CHANGED
@@ -20769,43 +20769,50 @@ function az(e) {
20769
20769
  var oz = {
20770
20770
  FORM: "form",
20771
20771
  DATA: "data"
20772
- }, sz = ["ar", "he"], cz = (e) => {
20772
+ }, sz = (e) => {
20773
+ if (typeof e != "string") return !1;
20774
+ try {
20775
+ return new URL(e), !0;
20776
+ } catch (e) {
20777
+ return !1;
20778
+ }
20779
+ }, cz = ["ar", "he"], lz = (e) => {
20773
20780
  var t;
20774
20781
  let n = e ? (t = e.substring(0, 2)) == null ? void 0 : t.toLowerCase() : "";
20775
- return sz.includes(n) ? "rtl" : "ltr";
20776
- }, lz = (e, t) => e.base64 && !(t != null && t.base64.has(e.base64)) ? e.base64 : e.imageURL && !(t != null && t.imageURL.has(e.imageURL)) ? e.imageURL : "", uz = (e, t, n) => {
20782
+ return cz.includes(n) ? "rtl" : "ltr";
20783
+ }, uz = (e, t) => e.base64 && !(t != null && t.base64.has(e.base64)) ? e.base64 : e.imageURL && !(t != null && t.imageURL.has(e.imageURL)) ? e.imageURL : "", dz = (e, t, n) => {
20777
20784
  var r;
20778
20785
  if (!t) return;
20779
20786
  let i = (r = e == null ? void 0 : e.idvAsset) == null ? null : r;
20780
20787
  for (; i;) {
20781
- let e = lz(i, n);
20788
+ let e = uz(i, n);
20782
20789
  if (e) return e;
20783
20790
  i = i.failurePolicy === "placeholderImage" && i.placeholderImage || null;
20784
20791
  }
20785
- }, dz = {
20792
+ }, fz = {
20786
20793
  DOC_READER: "DOC_READER",
20787
20794
  DOC_READER_GALLERY: "DOC_READER_GALLERY"
20788
- }, fz = /* @__PURE__ */ function(e) {
20795
+ }, pz = /* @__PURE__ */ function(e) {
20789
20796
  return e[e.NO_INITIALIZED = 0] = "NO_INITIALIZED", e[e.UNKNOWN_STEP = 1] = "UNKNOWN_STEP", e[e.SCAN_ERROR = 2] = "SCAN_ERROR", e[e.RFID_ERROR = 3] = "RFID_ERROR", e[e.IMAGE_LOADING_FAILED = 4] = "IMAGE_LOADING_FAILED", e;
20790
- }({}), pz = /* @__PURE__ */ function(e) {
20797
+ }({}), mz = /* @__PURE__ */ function(e) {
20791
20798
  return e[e.CONFIGURATION_FAILED = 0] = "CONFIGURATION_FAILED", e[e.INTERNAL_ERROR = 1] = "INTERNAL_ERROR", e[e.PRESENTER_UNAVAILABLE = 2] = "PRESENTER_UNAVAILABLE", e;
20792
- }({}), mz = "idv-document", hz = {
20799
+ }({}), hz = "idv-document", gz = {
20793
20800
  0: ff.auto,
20794
20801
  1: ff.captureVideo,
20795
20802
  2: ff.captureFrame
20796
- }, gz = {
20803
+ }, _z = {
20797
20804
  0: vf.line,
20798
20805
  1: vf.corners
20799
- }, _z = {
20806
+ }, vz = {
20800
20807
  0: !0,
20801
20808
  1: !0,
20802
20809
  2: !1,
20803
20810
  3: !0
20804
- }, vz = 1920, yz = 4e6, bz = 5e7, xz = /* @__PURE__ */ function(e) {
20811
+ }, yz = 1920, bz = 4e6, xz = 5e7, Sz = /* @__PURE__ */ function(e) {
20805
20812
  return e.BarcodeMRZ = "BarcodeMRZ", e.BoundsLite = "BoundsLite", e;
20806
- }({}), Sz, Cz, wz = class e extends rz {
20813
+ }({}), Cz, wz, Tz = class e extends rz {
20807
20814
  constructor({ errorCode: t, message: n, underlyingError: r, underlyingBaseError: i }) {
20808
- let a = rz.getErrorKey(t, fz);
20815
+ let a = rz.getErrorKey(t, pz);
20809
20816
  super({
20810
20817
  errorCode: t,
20811
20818
  errorCodeKey: a,
@@ -20819,10 +20826,10 @@ var oz = {
20819
20826
  });
20820
20827
  }
20821
20828
  };
20822
- Sz = wz, Sz.MODULE = mz, Sz.ERROR_ENUM_NAME = "ReaderModuleError", Sz.SHORT_CODE = "RM";
20823
- var Tz = class e extends rz {
20829
+ Cz = Tz, Cz.MODULE = hz, Cz.ERROR_ENUM_NAME = "ReaderModuleError", Cz.SHORT_CODE = "RM";
20830
+ var Ez = class e extends rz {
20824
20831
  constructor({ errorCode: t, message: n, underlyingError: r, underlyingBaseError: i }) {
20825
- let a = rz.getErrorKey(t, pz);
20832
+ let a = rz.getErrorKey(t, mz);
20826
20833
  super({
20827
20834
  errorCode: t,
20828
20835
  errorCodeKey: a,
@@ -20836,17 +20843,17 @@ var Tz = class e extends rz {
20836
20843
  });
20837
20844
  }
20838
20845
  };
20839
- Cz = Tz, Cz.MODULE = mz, Cz.ERROR_ENUM_NAME = "ScanError", Cz.SHORT_CODE = "RMS";
20846
+ wz = Ez, wz.MODULE = hz, wz.ERROR_ENUM_NAME = "ScanError", wz.SHORT_CODE = "RMS";
20840
20847
  //#endregion
20841
20848
  //#region ../../node_modules/@lit/reactive-element/decorators/custom-element.js
20842
- var Ez = (e) => (t, n) => {
20849
+ var Dz = (e) => (t, n) => {
20843
20850
  n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
20844
20851
  customElements.define(e, t);
20845
20852
  });
20846
20853
  };
20847
20854
  //#endregion
20848
20855
  //#region ../../node_modules/@lit/reactive-element/decorators/state.js
20849
- function Dz(e) {
20856
+ function Oz(e) {
20850
20857
  return YR(nz(nz({}, e), {}, {
20851
20858
  state: !0,
20852
20859
  attribute: !1
@@ -20854,10 +20861,10 @@ function Dz(e) {
20854
20861
  }
20855
20862
  //#endregion
20856
20863
  //#region ../../node_modules/@lit/reactive-element/decorators/base.js
20857
- var Oz = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
20864
+ var kz = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
20858
20865
  //#endregion
20859
20866
  //#region ../../node_modules/@lit/reactive-element/decorators/query.js
20860
- function kz(e, t) {
20867
+ function Az(e, t) {
20861
20868
  return (n, r, i) => {
20862
20869
  let a = (t) => {
20863
20870
  var n, r;
@@ -20875,31 +20882,31 @@ function kz(e, t) {
20875
20882
  }
20876
20883
  };
20877
20884
  })() : i;
20878
- return Oz(n, r, { get() {
20885
+ return kz(n, r, { get() {
20879
20886
  let n = e.call(this);
20880
20887
  return n === void 0 && (n = a(this), (n !== null || this.hasUpdated) && t.call(this, n)), n;
20881
20888
  } });
20882
20889
  }
20883
- return Oz(n, r, { get() {
20890
+ return kz(n, r, { get() {
20884
20891
  return a(this);
20885
20892
  } });
20886
20893
  };
20887
20894
  }
20888
20895
  //#endregion
20889
20896
  //#region src/utils/index.ts
20890
- function Az(e) {
20891
- return jz.apply(this, arguments);
20897
+ function jz(e) {
20898
+ return Mz.apply(this, arguments);
20892
20899
  }
20893
- function jz() {
20894
- return jz = u(function* (e) {
20900
+ function Mz() {
20901
+ return Mz = u(function* (e) {
20895
20902
  return new Promise((t) => setTimeout(t, e));
20896
- }), jz.apply(this, arguments);
20903
+ }), Mz.apply(this, arguments);
20897
20904
  }
20898
- function Mz(e) {
20899
- return Nz.apply(this, arguments);
20905
+ function Nz(e) {
20906
+ return Pz.apply(this, arguments);
20900
20907
  }
20901
- function Nz() {
20902
- return Nz = u(function* (e, t = 0, n = 0) {
20908
+ function Pz() {
20909
+ return Pz = u(function* (e, t = 0, n = 0) {
20903
20910
  let r = null, i = n * 1e3;
20904
20911
  for (let n = 0; n <= t; n++) {
20905
20912
  try {
@@ -20909,18 +20916,12 @@ function Nz() {
20909
20916
  } catch (e) {
20910
20917
  r = e;
20911
20918
  }
20912
- n < t && (yield Az(i));
20919
+ n < t && (yield jz(i));
20913
20920
  }
20914
20921
  throw r;
20915
- }), Nz.apply(this, arguments);
20922
+ }), Pz.apply(this, arguments);
20916
20923
  }
20917
- var Pz = (e) => e ? (e.internalScenario && (e.scenario = e.internalScenario), delete e.internalScenario, e) : {}, Fz = (e) => {
20918
- try {
20919
- return new URL(e), !0;
20920
- } catch (e) {
20921
- return !1;
20922
- }
20923
- };
20924
+ var Fz = (e) => e ? (e.internalScenario && (e.scenario = e.internalScenario), delete e.internalScenario, e) : {};
20924
20925
  function Iz(e, t, n, r, i) {
20925
20926
  let a = e * t, o = a > i;
20926
20927
  return {
@@ -21242,7 +21243,7 @@ var Kz = class extends Me {
21242
21243
  (d = this.props) == null || (f = d.idvEventListener) == null || f.call(d, "IDV-DOCUMENT", "Success. Start to finalize package", "DEBUG"), this.props.isProcessing(!0);
21243
21244
  }
21244
21245
  let i = (l = this.props) == null || (l = l.moduleProps) == null ? void 0 : l.finalizePackageSettings;
21245
- Mz(() => window.RegulaDocumentSDK.finalizePackage(), i == null ? void 0 : i.retryCount, i == null ? void 0 : i.retryDelay).then((e) => {
21246
+ Nz(() => window.RegulaDocumentSDK.finalizePackage(), i == null ? void 0 : i.retryCount, i == null ? void 0 : i.retryDelay).then((e) => {
21246
21247
  var t;
21247
21248
  let n = {
21248
21249
  transactionId: (e == null ? void 0 : e.transactionId) || "",
@@ -21331,7 +21332,7 @@ var Kz = class extends Me {
21331
21332
  background-color: ${a(e.cameraPreviewBackgroundColor)};
21332
21333
  }
21333
21334
  `), e != null && e.containerCloseButtonImage) {
21334
- let i = uz(e.containerCloseButtonImage, t, n);
21335
+ let i = dz(e.containerCloseButtonImage, t, n);
21335
21336
  i && r.push(o`
21336
21337
  document-reader::part(container-close-button)::before {
21337
21338
  background-image: url(${a(i)});
@@ -21339,7 +21340,7 @@ var Kz = class extends Me {
21339
21340
  `);
21340
21341
  }
21341
21342
  if (e != null && e.menuFromCameraButtonImage) {
21342
- let i = uz(e.menuFromCameraButtonImage, t, n);
21343
+ let i = dz(e.menuFromCameraButtonImage, t, n);
21343
21344
  i && r.push(o`
21344
21345
  document-reader::part(menu-from-camera-button)::before {
21345
21346
  background-image: url(${a(i)});
@@ -21347,7 +21348,7 @@ var Kz = class extends Me {
21347
21348
  `);
21348
21349
  }
21349
21350
  if (e != null && e.menuFromGalleryButtonImage) {
21350
- let i = uz(e.menuFromGalleryButtonImage, t, n);
21351
+ let i = dz(e.menuFromGalleryButtonImage, t, n);
21351
21352
  i && r.push(o`
21352
21353
  document-reader::part(menu-from-gallery-button)::before {
21353
21354
  background-image: url(${a(i)});
@@ -21355,7 +21356,7 @@ var Kz = class extends Me {
21355
21356
  `);
21356
21357
  }
21357
21358
  if (e != null && e.menuFromMobileButtonImage) {
21358
- let i = uz(e.menuFromMobileButtonImage, t, n);
21359
+ let i = dz(e.menuFromMobileButtonImage, t, n);
21359
21360
  i && r.push(o`
21360
21361
  document-reader::part(menu-from-mobile-button)::before {
21361
21362
  background-image: url(${a(i)});
@@ -21363,7 +21364,7 @@ var Kz = class extends Me {
21363
21364
  `);
21364
21365
  }
21365
21366
  if (e != null && e.closeButton) {
21366
- let i = uz(e.closeButton, t, n);
21367
+ let i = dz(e.closeButton, t, n);
21367
21368
  i && r.push(o`
21368
21369
  document-reader::part(controls-process-close-button)::before {
21369
21370
  background-image: url(${a(i)});
@@ -21371,7 +21372,7 @@ var Kz = class extends Me {
21371
21372
  `);
21372
21373
  }
21373
21374
  if (e != null && e.switchButton) {
21374
- let i = uz(e.switchButton, t, n);
21375
+ let i = dz(e.switchButton, t, n);
21375
21376
  i && r.push(o`
21376
21377
  document-reader::part(controls-change-camera-button)::before {
21377
21378
  background-image: url(${a(i)});
@@ -21379,7 +21380,7 @@ var Kz = class extends Me {
21379
21380
  `);
21380
21381
  }
21381
21382
  if (e != null && e.infoTryAgainButtonImage) {
21382
- let i = uz(e.infoTryAgainButtonImage, t, n);
21383
+ let i = dz(e.infoTryAgainButtonImage, t, n);
21383
21384
  i && r.push(o`
21384
21385
  document-reader::part(info-try-again-button)::before {
21385
21386
  background-image: url(${a(i)});
@@ -21438,20 +21439,20 @@ var Kz = class extends Me {
21438
21439
  uploadFileButton: t == null ? void 0 : t.uploadFileButton,
21439
21440
  mirrorButton: t == null ? void 0 : t.mirrorButton,
21440
21441
  nonce: (i = this.props) == null ? void 0 : i.nonce
21441
- }), u = nz(nz(nz(nz(nz({}, !!r && typeof r == "string" && { locale: r.slice(0, 2).toLowerCase() }), typeof (n == null ? void 0 : n.captureMode) == "number" && n.captureMode in hz && { captureMode: hz[n.captureMode] }), typeof (t == null ? void 0 : t.cameraFrameShapeType) == "number" && t.cameraFrameShapeType in gz && { cameraFrameShapeType: gz[t.cameraFrameShapeType] }), (typeof (n == null || (a = n.videoOutputSettings) == null ? void 0 : a.AVVideoWidthKey) == "number" || typeof (n == null || (o = n.videoOutputSettings) == null ? void 0 : o.AVVideoHeightKey) == "number") && { resolution: nz(nz({}, typeof (n == null || (s = n.videoOutputSettings) == null ? void 0 : s.AVVideoWidthKey) == "number" && { width: n.videoOutputSettings.AVVideoWidthKey }), typeof (n == null || (c = n.videoOutputSettings) == null ? void 0 : c.AVVideoHeightKey) == "number" && { height: n.videoOutputSettings.AVVideoHeightKey }) }), typeof (n == null ? void 0 : n.cameraFrame) == "number" && n.cameraFrame in _z && { cameraFrame: _z[n.cameraFrame] });
21442
+ }), u = nz(nz(nz(nz(nz({}, !!r && typeof r == "string" && { locale: r.slice(0, 2).toLowerCase() }), typeof (n == null ? void 0 : n.captureMode) == "number" && n.captureMode in gz && { captureMode: gz[n.captureMode] }), typeof (t == null ? void 0 : t.cameraFrameShapeType) == "number" && t.cameraFrameShapeType in _z && { cameraFrameShapeType: _z[t.cameraFrameShapeType] }), (typeof (n == null || (a = n.videoOutputSettings) == null ? void 0 : a.AVVideoWidthKey) == "number" || typeof (n == null || (o = n.videoOutputSettings) == null ? void 0 : o.AVVideoHeightKey) == "number") && { resolution: nz(nz({}, typeof (n == null || (s = n.videoOutputSettings) == null ? void 0 : s.AVVideoWidthKey) == "number" && { width: n.videoOutputSettings.AVVideoWidthKey }), typeof (n == null || (c = n.videoOutputSettings) == null ? void 0 : c.AVVideoHeightKey) == "number" && { height: n.videoOutputSettings.AVVideoHeightKey }) }), typeof (n == null ? void 0 : n.cameraFrame) == "number" && n.cameraFrame in vz && { cameraFrame: vz[n.cameraFrame] });
21442
21443
  return nz(nz({}, l), u);
21443
21444
  }
21444
21445
  _setDocReaderProps() {
21445
21446
  var e, t, n;
21446
21447
  if (!this.props || !this._component) return;
21447
21448
  (e = (t = this.props).isProcessing) == null || e.call(t, !0);
21448
- let { processParam: r, functionality: i, customization: a, sessionId: o, copyright: c, serviceToken: l, locale: u, preloadAssetsRequired: d, failedAssets: f } = this.props.moduleProps, p = Pz(r), m = p == null || (n = p.backendProcessing) == null ? void 0 : n.serviceURL;
21449
- if (!m || !Fz(m)) {
21450
- let e = new Tz({
21451
- errorCode: pz.CONFIGURATION_FAILED,
21449
+ let { processParam: r, functionality: i, customization: a, sessionId: o, copyright: c, serviceToken: l, locale: u, preloadAssetsRequired: d, failedAssets: f } = this.props.moduleProps, p = Fz(r), m = p == null || (n = p.backendProcessing) == null ? void 0 : n.serviceURL;
21450
+ if (!m || !sz(m)) {
21451
+ let e = new Ez({
21452
+ errorCode: mz.CONFIGURATION_FAILED,
21452
21453
  message: "serviceURL is not defined or is invalid."
21453
- }), t = new wz({
21454
- errorCode: fz.SCAN_ERROR,
21454
+ }), t = new Tz({
21455
+ errorCode: pz.SCAN_ERROR,
21455
21456
  underlyingBaseError: e
21456
21457
  });
21457
21458
  this.props.perform(t);
@@ -21479,7 +21480,7 @@ var Kz = class extends Me {
21479
21480
  ></document-reader>`;
21480
21481
  }
21481
21482
  }, qz = (Kz.styles = [Uz], Kz);
21482
- Gz([Dz(), Wz("design:type", Object)], qz.prototype, "props", void 0), Gz([kz("document-reader"), Wz("design:type", wI === void 0 ? Object : wI)], qz.prototype, "_component", void 0), qz = Gz([Ez("document-reader-camera")], qz);
21483
+ Gz([Oz(), Wz("design:type", Object)], qz.prototype, "props", void 0), Gz([Az("document-reader"), Wz("design:type", wI === void 0 ? Object : wI)], qz.prototype, "_component", void 0), qz = Gz([Dz("document-reader-camera")], qz);
21483
21484
  //#endregion
21484
21485
  //#region ../../node_modules/lit-html/directives/if-defined.js
21485
21486
  var Jz = (e) => e == null ? z : e, Yz = o`
@@ -21625,7 +21626,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
21625
21626
  (r = t.props) != null && r.isProcessing && t.props.isProcessing(!0), yield window.RegulaDocumentSDK.createBackendTransaction({}, window.RegulaDocumentSDK.recognizerProcessParam);
21626
21627
  let o = [];
21627
21628
  for (let e of a) {
21628
- let { isExtraLargeResolution: n, isDownscaleNeeded: r } = yield Lz(e, vz, yz, bz), i = e.type.startsWith("image/webp");
21629
+ let { isExtraLargeResolution: n, isDownscaleNeeded: r } = yield Lz(e, yz, bz, xz), i = e.type.startsWith("image/webp");
21629
21630
  if (n) {
21630
21631
  var s;
21631
21632
  (s = t.props) == null || s.perform({
@@ -21637,7 +21638,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
21637
21638
  return;
21638
21639
  }
21639
21640
  if (r || i) {
21640
- let n = yield zz(e, vz, yz);
21641
+ let n = yield zz(e, yz, bz);
21641
21642
  if (!n.ok) {
21642
21643
  var c;
21643
21644
  let e = {
@@ -21667,7 +21668,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
21667
21668
  let d = (i = t.props) == null || (i = i.moduleProps) == null ? void 0 : i.finalizePackageSettings;
21668
21669
  try {
21669
21670
  var f;
21670
- let e = yield Mz(u(function* () {
21671
+ let e = yield Nz(u(function* () {
21671
21672
  return window.RegulaDocumentSDK.finalizePackage();
21672
21673
  }), d == null ? void 0 : d.retryCount, d == null ? void 0 : d.retryDelay), n = {
21673
21674
  transactionId: e == null ? void 0 : e.transactionId,
@@ -21708,13 +21709,13 @@ var Jz = (e) => e == null ? z : e, Yz = o`
21708
21709
  if (!this.props) return;
21709
21710
  let { processParam: t, sessionId: n, serviceToken: r, selectionLimit: i } = this.props.moduleProps;
21710
21711
  this._input.multiple = typeof i == "number" && (i === 0 || i > 1);
21711
- let a = Pz(t), o = a == null || (e = a.backendProcessing) == null ? void 0 : e.serviceURL;
21712
- if (!o || !Fz(o)) {
21713
- let e = new Tz({
21714
- errorCode: pz.CONFIGURATION_FAILED,
21712
+ let a = Fz(t), o = a == null || (e = a.backendProcessing) == null ? void 0 : e.serviceURL;
21713
+ if (!o || !sz(o)) {
21714
+ let e = new Ez({
21715
+ errorCode: mz.CONFIGURATION_FAILED,
21715
21716
  message: "serviceURL is not defined or is invalid."
21716
- }), t = new wz({
21717
- errorCode: fz.SCAN_ERROR,
21717
+ }), t = new Tz({
21718
+ errorCode: pz.SCAN_ERROR,
21718
21719
  underlyingBaseError: e
21719
21720
  });
21720
21721
  this.props.perform(t);
@@ -21732,7 +21733,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
21732
21733
  return de`<div
21733
21734
  part="gallery-root"
21734
21735
  class="gallery-root"
21735
- dir="${cz(n)}"
21736
+ dir="${lz(n)}"
21736
21737
  lang="${n}"
21737
21738
  style="background: ${Jz((t = this.props) == null || (t = t.moduleProps) == null ? void 0 : t.backgroundColor)}"
21738
21739
  >
@@ -21753,7 +21754,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
21753
21754
  </div>`;
21754
21755
  }
21755
21756
  }, eB = ($z.styles = [Yz], $z);
21756
- Gz([Dz(), Wz("design:type", Object)], eB.prototype, "props", void 0), Gz([kz("#file-input"), Wz("design:type", typeof HTMLInputElement > "u" ? Object : HTMLInputElement)], eB.prototype, "_input", void 0), eB = Gz([Ez("document-reader-gallery")], eB);
21757
+ Gz([Oz(), Wz("design:type", Object)], eB.prototype, "props", void 0), Gz([Az("#file-input"), Wz("design:type", typeof HTMLInputElement > "u" ? Object : HTMLInputElement)], eB.prototype, "_input", void 0), eB = Gz([Dz("document-reader-gallery")], eB);
21757
21758
  //#endregion
21758
21759
  //#region src/web-components/document-idv/index.ts
21759
21760
  var tB, nB = !1, rB = class e extends Me {
@@ -21763,8 +21764,8 @@ var tB, nB = !1, rB = class e extends Me {
21763
21764
  setProps(t) {
21764
21765
  if (!e.getSupportedTemplates().includes(t.moduleProps.templateId)) {
21765
21766
  var n;
21766
- let e = new wz({
21767
- errorCode: fz.UNKNOWN_STEP,
21767
+ let e = new Tz({
21768
+ errorCode: pz.UNKNOWN_STEP,
21768
21769
  message: `TemplateId ${t.moduleProps.templateId} is not supported`
21769
21770
  });
21770
21771
  (n = t.perform) == null || n.call(t, e);
@@ -21772,8 +21773,8 @@ var tB, nB = !1, rB = class e extends Me {
21772
21773
  let r = t.moduleProps.failedAssets;
21773
21774
  if (r && r.blockingAssets.size > 0) {
21774
21775
  var i;
21775
- let e = new wz({
21776
- errorCode: fz.IMAGE_LOADING_FAILED,
21776
+ let e = new Tz({
21777
+ errorCode: pz.IMAGE_LOADING_FAILED,
21777
21778
  message: `Failed to load image asset${r.blockingAssets.size > 1 ? "s" : ""}: ${[...r.blockingAssets].join(", ")}`
21778
21779
  });
21779
21780
  (i = t.perform) == null || i.call(t, e);
@@ -21784,7 +21785,7 @@ var tB, nB = !1, rB = class e extends Me {
21784
21785
  return nB;
21785
21786
  }
21786
21787
  static getSupportedTemplates() {
21787
- return [dz.DOC_READER, dz.DOC_READER_GALLERY];
21788
+ return [fz.DOC_READER, fz.DOC_READER_GALLERY];
21788
21789
  }
21789
21790
  static initialize(e) {
21790
21791
  var t, n;
@@ -21801,14 +21802,14 @@ var tB, nB = !1, rB = class e extends Me {
21801
21802
  nB = !1, (e = window.RegulaDocumentSDK) == null || e.shutdown();
21802
21803
  }
21803
21804
  static getIdentifier() {
21804
- return mz;
21805
+ return hz;
21805
21806
  }
21806
21807
  static cancel() {}
21807
21808
  render() {
21808
21809
  var e;
21809
- return de`${ze(this.renderVersion, de`${XR((e = this.props) == null || (e = e.moduleProps) == null ? void 0 : e.templateId, [[dz.DOC_READER, () => de`<document-reader-camera .props=${this.props}></document-reader-camera>`], [dz.DOC_READER_GALLERY, () => de`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`;
21810
+ return de`${ze(this.renderVersion, de`${XR((e = this.props) == null || (e = e.moduleProps) == null ? void 0 : e.templateId, [[fz.DOC_READER, () => de`<document-reader-camera .props=${this.props}></document-reader-camera>`], [fz.DOC_READER_GALLERY, () => de`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`;
21810
21811
  }
21811
21812
  };
21812
- tB = rB, tB.displayName = mz, Gz([YR({ attribute: !1 }), Wz("design:type", Object)], rB.prototype, "props", void 0), Gz([YR({ attribute: !1 }), Wz("design:type", Object)], rB.prototype, "renderVersion", void 0), iz(mz, rB);
21813
+ tB = rB, tB.displayName = hz, Gz([YR({ attribute: !1 }), Wz("design:type", Object)], rB.prototype, "props", void 0), Gz([YR({ attribute: !1 }), Wz("design:type", Object)], rB.prototype, "renderVersion", void 0), iz(hz, rB);
21813
21814
  //#endregion
21814
- export { rB as DocumentIdv, xz as ModuleType };
21815
+ export { rB as DocumentIdv, Sz as ModuleType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/idv-document",
3
- "version": "4.0.665-nightly",
3
+ "version": "4.0.667-nightly",
4
4
  "description": "Regula framework agnostic web components to work with document idv",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/main.iife.js",