New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scanbot-web-sdk

Package Overview
Dependencies
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scanbot-web-sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

bundle/ScanbotSDK.Core.js

@@ -1,1 +0,1 @@

!function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=21)}({2:function(t,n,e){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.Constants=void 0;r(e(3));class i{}n.Constants=i,i.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@1.0.1/bundle/"},21:function(t,n,e){"use strict";var r=e(2);let i;const a={initialize:async function(t,n,a){const o=e(22),u={locateFile:function(t,e){let i;return i=n?function(t){return-1!==t.indexOf("http")}(n)?n:"":r.Constants.CDN_PATH,i+"ScanbotSDK.Asm.wasm"}};return await o(u),i=u,i.initialize(t||"",a)},getLicenseInfo:async function(){return i.getLicenseInfo()},detectDocument:async function(t,n,e){const r=s(t);return await o(i.detectDocument(r.buffer,r.width,r.height,n,e))},detectAndCropDocument:async function(t){const n=s(t);return await o(i.detectAndCropDocument(n.buffer,n.width,n.height))}};async function o(t){if(!t)return{success:!1,detectionStatus:"Error_License"};const n=(e=t.detectionResult,l[e]?l[e]:e>=200?"Error_Unknown":"OK");var e;const r={detectionStatus:n,success:u(n)},i=[];i.push(c(t.originalImageJpegData)),r.success&&(i.push(c(t.croppedImageJpegData)),r.polygon=function(t){if(t.length%2!=0)throw Error("pointCoords size is not even.");const n=[];for(let e=0;e<t.length;e+=2)n.push({x:t[e],y:t[e+1]});return n}(t.polygon));const[a,o]=await Promise.all(i);return r.original=a,r.cropped=o,t.delete(),r}function u(t){return"OK"===t.substr(0,2)}function s(t){const{width:n,height:e,data:r}=t,a=i._malloc(4*n*e);return i.HEAPU8.set(r,a),{buffer:a,width:n,height:e}}function c(t){return new Promise(n=>{if(t){var e=new Blob([t],{type:"image/jpeg"}),r=new FileReader;r.onload=function(){n(r.result)},r.readAsDataURL(e)}else n()})}const l={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(t){const{command:n,args:e,ticket:r}=t.data;if(!i&&"initialize"!==n)throw Error("WASM module not loaded yet.");a[n].apply(null,e).then(t=>self.postMessage({ticket:r,result:t})).catch(t=>{console.error(t),self.postMessage({ticket:r,error:t.toString()})})}},22:function(t,n,e){"use strict";var r,i=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var n,e,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){n=t,e=r}));var a,o={};for(a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);var u,s=[],c="./this.program",l=function(t,n){throw n},f="";f=self.location.href,r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",u=function(t){var n=new XMLHttpRequest;return n.open("GET",t,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)};var p=i.print||console.log.bind(console),d=i.printErr||console.warn.bind(console);for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);o=null,i.arguments&&(s=i.arguments),i.thisProgram&&(c=i.thisProgram),i.quit&&(l=i.quit);var _,y,h,m=0,v=function(t){m=t};i.wasmBinary&&(_=i.wasmBinary),i.noExitRuntime&&(y=i.noExitRuntime),"object"!=typeof WebAssembly&&et("no native wasm support detected");var g=new WebAssembly.Table({initial:2842,maximum:2842,element:"anyfunc"}),C=!1,w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,n,e){for(var r=n+e,i=n;t[i]&&!(i>=r);)++i;if(i-n>16&&t.subarray&&w)return w.decode(t.subarray(n,i));for(var a="";n<i;){var o=t[n++];if(128&o){var u=63&t[n++];if(192!=(224&o)){var s=63&t[n++];if((o=224==(240&o)?(15&o)<<12|u<<6|s:(7&o)<<18|u<<12|s<<6|63&t[n++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|u)}else a+=String.fromCharCode(o)}return a}function T(t,n){return t?b(D,t,n):""}function j(t,n,e,r){if(!(r>0))return 0;for(var i=e,a=e+r-1,o=0;o<t.length;++o){var u=t.charCodeAt(o);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&t.charCodeAt(++o)),u<=127){if(e>=a)break;n[e++]=u}else if(u<=2047){if(e+1>=a)break;n[e++]=192|u>>6,n[e++]=128|63&u}else if(u<=65535){if(e+2>=a)break;n[e++]=224|u>>12,n[e++]=128|u>>6&63,n[e++]=128|63&u}else{if(e+3>=a)break;n[e++]=240|u>>18,n[e++]=128|u>>12&63,n[e++]=128|u>>6&63,n[e++]=128|63&u}}return n[e]=0,e-i}function P(t,n,e){return j(t,D,n,e)}function $(t){for(var n=0,e=0;e<t.length;++e){var r=t.charCodeAt(e);r>=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++e)),r<=127?++n:n+=r<=2047?2:r<=65535?3:4}return n}var A,k,D,O,S,x,F,E,W,M="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function R(t,n){for(var e=t,r=e>>1,i=r+n/2;!(r>=i)&&S[r];)++r;if((e=r<<1)-t>32&&M)return M.decode(D.subarray(t,e));for(var a=0,o="";;){var u=O[t+2*a>>1];if(0==u||a==n/2)return o;++a,o+=String.fromCharCode(u)}}function I(t,n,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var r=n,i=(e-=2)<2*t.length?e/2:t.length,a=0;a<i;++a){var o=t.charCodeAt(a);O[n>>1]=o,n+=2}return O[n>>1]=0,n-r}function z(t){return 2*t.length}function U(t,n){for(var e=0,r="";!(e>=n/4);){var i=x[t+4*e>>2];if(0==i)break;if(++e,i>=65536){var a=i-65536;r+=String.fromCharCode(55296|a>>10,56320|1023&a)}else r+=String.fromCharCode(i)}return r}function Y(t,n,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var r=n,i=r+e-4,a=0;a<t.length;++a){var o=t.charCodeAt(a);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++a)),x[n>>2]=o,(n+=4)+4>i)break}return x[n>>2]=0,n-r}function H(t){for(var n=0,e=0;e<t.length;++e){var r=t.charCodeAt(e);r>=55296&&r<=57343&&++e,n+=4}return n}function B(t){var n=$(t)+1,e=ae(n);return e&&j(t,k,e,n),e}function V(t,n){k.set(t,n)}function G(t){A=t,i.HEAP8=k=new Int8Array(t),i.HEAP16=O=new Int16Array(t),i.HEAP32=x=new Int32Array(t),i.HEAPU8=D=new Uint8Array(t),i.HEAPU16=S=new Uint16Array(t),i.HEAPU32=F=new Uint32Array(t),i.HEAPF32=E=new Float32Array(t),i.HEAPF64=W=new Float64Array(t)}var L=1148128,N=i.INITIAL_MEMORY||16777216;function q(t){for(;t.length>0;){var n=t.shift();if("function"!=typeof n){var e=n.func;"number"==typeof e?void 0===n.arg?i.dynCall_v(e):i.dynCall_vi(e,n.arg):e(void 0===n.arg?null:n.arg)}else n(i)}}(h=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:N/65536,maximum:32768}))&&(A=h.buffer),N=A.byteLength,G(A),x[L>>2]=6391184;var K=[],Q=[],J=[],Z=[];Math.abs,Math.ceil,Math.floor,Math.min;var X=0,tt=null,nt=null;function et(t){i.onAbort&&i.onAbort(t),d(t+=""),C=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var n=new WebAssembly.RuntimeError(t);throw e(n),n}function rt(t){return n=t,e="data:application/octet-stream;base64,",String.prototype.startsWith?n.startsWith(e):0===n.indexOf(e);var n,e}i.preloadedImages={},i.preloadedAudios={};var it,at="ScanbotSDK.Asm.wasm";function ot(){try{if(_)return new Uint8Array(_);if(u)return u(at);throw"both async and sync fetching of the wasm failed"}catch(t){et(t)}}rt(at)||(it=at,at=i.locateFile?i.locateFile(it,f):f+it);var ut,st={5920:function(t){return B(function(){return this[T(t)].toString()}.apply((0,eval)("(()=>this)()")))}};function ct(t){return x[ue()>>2]=t,t}function lt(t,n){var e;if(0===t)e=Date.now();else{if(1!==t&&4!==t)return ct(28),-1;e=ut()}return x[n>>2]=e/1e3|0,x[n+4>>2]=e%1e3*1e3*1e3|0,0}Q.push({func:function(){re()}}),ut=function(){return performance.now()};var ft=0,pt=4,dt=8,_t=12,yt=13,ht=16;function mt(t,n){}function vt(t){this.excPtr=t,this.ptr=t-ht,this.set_type=function(t){x[this.ptr+dt>>2]=t},this.get_type=function(){return x[this.ptr+dt>>2]},this.set_destructor=function(t){x[this.ptr+ft>>2]=t},this.get_destructor=function(){return x[this.ptr+ft>>2]},this.set_refcount=function(t){x[this.ptr+pt>>2]=t},this.set_caught=function(t){t=t?1:0,k[this.ptr+_t>>0]=t},this.get_caught=function(){return 0!=k[this.ptr+_t>>0]},this.set_rethrown=function(t){t=t?1:0,k[this.ptr+yt>>0]=t},this.get_rethrown=function(){return 0!=k[this.ptr+yt>>0]},this.init=function(t,n){this.set_type(t),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=x[this.ptr+pt>>2];x[this.ptr+pt>>2]=t+1},this.release_ref=function(){var t=x[this.ptr+pt>>2];return x[this.ptr+pt>>2]=t-1,1===t}}function gt(t){this.free=function(){oe(this.ptr),this.ptr=0},this.set_base_ptr=function(t){x[this.ptr>>2]=t},this.get_base_ptr=function(){return x[this.ptr>>2]},this.set_adjusted_ptr=function(t){x[this.ptr+4>>2]=t},this.get_adjusted_ptr=function(){return x[this.ptr+4>>2]},this.get_exception_ptr=function(){if(___cxa_is_pointer_type(this.get_exception_info().get_type()))return x[this.get_base_ptr()>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.get_base_ptr()},this.get_exception_info=function(){return new vt(this.get_base_ptr())},void 0===t?(this.ptr=ae(8),this.set_adjusted_ptr(0)):this.ptr=t}var Ct=[];function wt(){return wt.uncaught_exceptions>0}var bt=0;function Tt(t){return oe(new vt(t).ptr)}var jt={mappings:{},buffers:[null,[],[]],printChar:function(t,n){var e=jt.buffers[t];0===n||10===n?((1===t?p:d)(b(e,0)),e.length=0):e.push(n)},varargs:void 0,get:function(){return jt.varargs+=4,x[jt.varargs-4>>2]},getStr:function(t){return T(t)},get64:function(t,n){return t}},Pt={};function $t(t){for(;t.length;){var n=t.pop();t.pop()(n)}}function At(t){return this.fromWireType(F[t>>2])}var kt={},Dt={},Ot={};function St(t){if(void 0===t)return"_unknown";var n=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return n>=48&&n<=57?"_"+t:t}function xt(t,n){return t=St(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(n)}function Ft(t,n){var e=xt(n,(function(t){this.name=n,this.message=t;var e=new Error(t).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var Et=void 0;function Wt(t){throw new Et(t)}function Mt(t,n,e){function r(n){var r=e(n);r.length!==t.length&&Wt("Mismatched type converter count");for(var i=0;i<t.length;++i)Ht(t[i],r[i])}t.forEach((function(t){Ot[t]=n}));var i=new Array(n.length),a=[],o=0;n.forEach((function(t,n){Dt.hasOwnProperty(t)?i[n]=Dt[t]:(a.push(t),kt.hasOwnProperty(t)||(kt[t]=[]),kt[t].push((function(){i[n]=Dt[t],++o===a.length&&r(i)})))})),0===a.length&&r(i)}function Rt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var It=void 0;function zt(t){for(var n="",e=t;D[e];)n+=It[D[e++]];return n}var Ut=void 0;function Yt(t){throw new Ut(t)}function Ht(t,n,e){if(e=e||{},!("argPackAdvance"in n))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=n.name;if(t||Yt('type "'+r+'" must have a positive integer typeid pointer'),Dt.hasOwnProperty(t)){if(e.ignoreDuplicateRegistrations)return;Yt("Cannot register type '"+r+"' twice")}if(Dt[t]=n,delete Ot[t],kt.hasOwnProperty(t)){var i=kt[t];delete kt[t],i.forEach((function(t){t()}))}}function Bt(t){if(!(this instanceof en))return!1;if(!(t instanceof en))return!1;for(var n=this.$$.ptrType.registeredClass,e=this.$$.ptr,r=t.$$.ptrType.registeredClass,i=t.$$.ptr;n.baseClass;)e=n.upcast(e),n=n.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return n===r&&e===i}function Vt(t){Yt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Gt=!1;function Lt(t){}function Nt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function qt(t){return"undefined"==typeof FinalizationGroup?(qt=function(t){return t},t):(Gt=new FinalizationGroup((function(t){for(var n=t.next();!n.done;n=t.next()){var e=n.value;e.ptr?Nt(e):console.warn("object already deleted: "+e.ptr)}})),Lt=function(t){Gt.unregister(t.$$)},(qt=function(t){return Gt.register(t,t.$$,t.$$),t})(t))}function Kt(){if(this.$$.ptr||Vt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,n=qt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return n.$$.count.value+=1,n.$$.deleteScheduled=!1,n}function Qt(){this.$$.ptr||Vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Yt("Object already scheduled for deletion"),Lt(this),Nt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Jt(){return!this.$$.ptr}var Zt=void 0,Xt=[];function tn(){for(;Xt.length;){var t=Xt.pop();t.$$.deleteScheduled=!1,t.delete()}}function nn(){return this.$$.ptr||Vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Yt("Object already scheduled for deletion"),Xt.push(this),1===Xt.length&&Zt&&Zt(tn),this.$$.deleteScheduled=!0,this}function en(){}var rn={};function an(t,n,e){i.hasOwnProperty(t)?((void 0===e||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[e])&&Yt("Cannot register public name '"+t+"' twice"),function(t,n,e){if(void 0===t[n].overloadTable){var r=t[n];t[n]=function(){return t[n].overloadTable.hasOwnProperty(arguments.length)||Yt("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[n].overloadTable+")!"),t[n].overloadTable[arguments.length].apply(this,arguments)},t[n].overloadTable=[],t[n].overloadTable[r.argCount]=r}}(i,t,t),i.hasOwnProperty(e)&&Yt("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),i[t].overloadTable[e]=n):(i[t]=n,void 0!==e&&(i[t].numArguments=e))}function on(t,n,e,r,i,a,o,u){this.name=t,this.constructor=n,this.instancePrototype=e,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=u,this.pureVirtualFunctions=[]}function un(t,n,e){for(;n!==e;)n.upcast||Yt("Expected null or instance of "+e.name+", got an instance of "+n.name),t=n.upcast(t),n=n.baseClass;return t}function sn(t,n){if(null===n)return this.isReference&&Yt("null is not a valid "+this.name),0;n.$$||Yt('Cannot pass "'+Mn(n)+'" as a '+this.name),n.$$.ptr||Yt("Cannot pass deleted object as a pointer of type "+this.name);var e=n.$$.ptrType.registeredClass;return un(n.$$.ptr,e,this.registeredClass)}function cn(t,n){var e;if(null===n)return this.isReference&&Yt("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,e),e):0;n.$$||Yt('Cannot pass "'+Mn(n)+'" as a '+this.name),n.$$.ptr||Yt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&n.$$.ptrType.isConst&&Yt("Cannot convert argument of type "+(n.$$.smartPtrType?n.$$.smartPtrType.name:n.$$.ptrType.name)+" to parameter type "+this.name);var r=n.$$.ptrType.registeredClass;if(e=un(n.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===n.$$.smartPtr&&Yt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:n.$$.smartPtrType===this?e=n.$$.smartPtr:Yt("Cannot convert argument of type "+(n.$$.smartPtrType?n.$$.smartPtrType.name:n.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=n.$$.smartPtr;break;case 2:if(n.$$.smartPtrType===this)e=n.$$.smartPtr;else{var i=n.clone();e=this.rawShare(e,Fn((function(){i.delete()}))),null!==t&&t.push(this.rawDestructor,e)}break;default:Yt("Unsupporting sharing policy")}return e}function ln(t,n){if(null===n)return this.isReference&&Yt("null is not a valid "+this.name),0;n.$$||Yt('Cannot pass "'+Mn(n)+'" as a '+this.name),n.$$.ptr||Yt("Cannot pass deleted object as a pointer of type "+this.name),n.$$.ptrType.isConst&&Yt("Cannot convert argument of type "+n.$$.ptrType.name+" to parameter type "+this.name);var e=n.$$.ptrType.registeredClass;return un(n.$$.ptr,e,this.registeredClass)}function fn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function pn(t){this.rawDestructor&&this.rawDestructor(t)}function dn(t){null!==t&&t.delete()}function _n(){return Object.keys(mn).length}function yn(){var t=[];for(var n in mn)mn.hasOwnProperty(n)&&t.push(mn[n]);return t}function hn(t){Zt=t,Xt.length&&Zt&&Zt(tn)}var mn={};function vn(t,n){return n=function(t,n){for(void 0===n&&Yt("ptr should not be undefined");t.baseClass;)n=t.upcast(n),t=t.baseClass;return n}(t,n),mn[n]}function gn(t,n){return n.ptrType&&n.ptr||Wt("makeClassHandle requires ptr and ptrType"),!!n.smartPtrType!=!!n.smartPtr&&Wt("Both smartPtrType and smartPtr must be specified"),n.count={value:1},qt(Object.create(t,{$$:{value:n}}))}function Cn(t){var n=this.getPointee(t);if(!n)return this.destructor(t),null;var e=vn(this.registeredClass,n);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=n,e.$$.smartPtr=t,e.clone();var r=e.clone();return this.destructor(t),r}function i(){return this.isSmartPointer?gn(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:n,smartPtrType:this,smartPtr:t}):gn(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,o=this.registeredClass.getActualType(n),u=rn[o];if(!u)return i.call(this);a=this.isConst?u.constPointerType:u.pointerType;var s=function t(n,e,r){if(e===r)return n;if(void 0===r.baseClass)return null;var i=t(n,e,r.baseClass);return null===i?null:r.downcast(i)}(n,this.registeredClass,a.registeredClass);return null===s?i.call(this):this.isSmartPointer?gn(a.registeredClass.instancePrototype,{ptrType:a,ptr:s,smartPtrType:this,smartPtr:t}):gn(a.registeredClass.instancePrototype,{ptrType:a,ptr:s})}function wn(t,n,e,r,i,a,o,u,s,c,l){this.name=t,this.registeredClass=n,this.isReference=e,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=l,i||void 0!==n.baseClass?this.toWireType=cn:r?(this.toWireType=sn,this.destructorFunction=null):(this.toWireType=ln,this.destructorFunction=null)}function bn(t,n,e){i.hasOwnProperty(t)||Wt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==e?i[t].overloadTable[e]=n:(i[t]=n,i[t].argCount=e)}function Tn(t,n){t=zt(t);var e=function(e){for(var r=[],i=1;i<t.length;++i)r.push("a"+i);var a="return function dynCall_"+t+"_"+n+"("+r.join(", ")+") {\n";return a+=" return dynCall(rawFunction"+(r.length?", ":"")+r.join(", ")+");\n",a+="};\n",new Function("dynCall","rawFunction",a)(e,n)}(i["dynCall_"+t]);return"function"!=typeof e&&Yt("unknown function pointer with signature "+t+": "+n),e}var jn=void 0;function Pn(t){var n=se(t),e=zt(n);return oe(n),e}function $n(t,n){var e=[],r={};throw n.forEach((function t(n){r[n]||Dt[n]||(Ot[n]?Ot[n].forEach(t):(e.push(n),r[n]=!0))})),new jn(t+": "+e.map(Pn).join([", "]))}function An(t,n,e){return t instanceof Object||Yt(e+' with invalid "this": '+t),t instanceof n.registeredClass.constructor||Yt(e+' incompatible with "this" of type '+t.constructor.name),t.$$.ptr||Yt("cannot call emscripten binding method "+e+" on deleted object"),un(t.$$.ptr,t.$$.ptrType.registeredClass,n.registeredClass)}var kn=[],Dn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function On(t){t>4&&0==--Dn[t].refcount&&(Dn[t]=void 0,kn.push(t))}function Sn(){for(var t=0,n=5;n<Dn.length;++n)void 0!==Dn[n]&&++t;return t}function xn(){for(var t=5;t<Dn.length;++t)if(void 0!==Dn[t])return Dn[t];return null}function Fn(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var n=kn.length?kn.pop():Dn.length;return Dn[n]={refcount:1,value:t},n}}function En(t,n,e){switch(n){case 0:return function(t){var n=e?k:D;return this.fromWireType(n[t])};case 1:return function(t){var n=e?O:S;return this.fromWireType(n[t>>1])};case 2:return function(t){var n=e?x:F;return this.fromWireType(n[t>>2])};default:throw new TypeError("Unknown integer type: "+t)}}function Wn(t,n){var e=Dt[t];return void 0===e&&Yt(n+" has unknown type "+Pn(t)),e}function Mn(t){if(null===t)return"null";var n=typeof t;return"object"===n||"array"===n||"function"===n?t.toString():""+t}function Rn(t,n){switch(n){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(W[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function In(t,n){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var e=xt(t.name||"unknownFunctionName",(function(){}));e.prototype=t.prototype;var r=new e,i=t.apply(r,n);return i instanceof Object?i:r}function zn(t,n,e){switch(n){case 0:return e?function(t){return k[t]}:function(t){return D[t]};case 1:return e?function(t){return O[t>>1]}:function(t){return S[t>>1]};case 2:return e?function(t){return x[t>>2]}:function(t){return F[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var Un={};function Yn(t){var n=Un[t];return void 0===n?zt(t):n}var Hn=[];function Bn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Vn(t){try{return h.grow(t-A.byteLength+65535>>>16),G(h.buffer),1}catch(t){}}var Gn={};function Ln(){if(!Ln.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var n in Gn)t[n]=Gn[n];var e=[];for(var n in t)e.push(n+"="+t[n]);Ln.strings=e}return Ln.strings}function Nn(t,n){!function t(){if(!t.called){t.called=!0,x[fe()>>2]=60*(new Date).getTimezoneOffset();var n=(new Date).getFullYear(),e=new Date(n,0,1),r=new Date(n,6,1);x[le()>>2]=Number(e.getTimezoneOffset()!=r.getTimezoneOffset());var i=s(e),a=s(r),o=B(i),u=B(a);r.getTimezoneOffset()<e.getTimezoneOffset()?(x[ce()>>2]=o,x[ce()+4>>2]=u):(x[ce()>>2]=u,x[ce()+4>>2]=o)}function s(t){var n=t.toTimeString().match(/\(([A-Za-z ]+)\)$/);return n?n[1]:"GMT"}}();var e=new Date(1e3*x[t>>2]);x[n>>2]=e.getSeconds(),x[n+4>>2]=e.getMinutes(),x[n+8>>2]=e.getHours(),x[n+12>>2]=e.getDate(),x[n+16>>2]=e.getMonth(),x[n+20>>2]=e.getFullYear()-1900,x[n+24>>2]=e.getDay();var r=new Date(e.getFullYear(),0,1),i=(e.getTime()-r.getTime())/864e5|0;x[n+28>>2]=i,x[n+36>>2]=-60*e.getTimezoneOffset();var a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),o=r.getTimezoneOffset(),u=0|(a!=o&&e.getTimezoneOffset()==Math.min(o,a));x[n+32>>2]=u;var s=x[ce()+(u?4:0)>>2];return x[n+40>>2]=s,n}function qn(t){return t%4==0&&(t%100!=0||t%400==0)}function Kn(t,n){for(var e=0,r=0;r<=n;e+=t[r++]);return e}P("GMT",1148192,4);var Qn=[31,29,31,30,31,30,31,31,30,31,30,31],Jn=[31,28,31,30,31,30,31,31,30,31,30,31];function Zn(t,n){for(var e=new Date(t.getTime());n>0;){var r=qn(e.getFullYear()),i=e.getMonth(),a=(r?Qn:Jn)[i];if(!(n>a-e.getDate()))return e.setDate(e.getDate()+n),e;n-=a-e.getDate()+1,e.setDate(1),i<11?e.setMonth(i+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Xn(t,n,e,r){var i=x[r+40>>2],a={tm_sec:x[r>>2],tm_min:x[r+4>>2],tm_hour:x[r+8>>2],tm_mday:x[r+12>>2],tm_mon:x[r+16>>2],tm_year:x[r+20>>2],tm_wday:x[r+24>>2],tm_yday:x[r+28>>2],tm_isdst:x[r+32>>2],tm_gmtoff:x[r+36>>2],tm_zone:i?T(i):""},o=T(e),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var s in u)o=o.replace(new RegExp(s,"g"),u[s]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(t,n,e){for(var r="number"==typeof t?t.toString():t||"";r.length<n;)r=e[0]+r;return r}function p(t,n){return f(t,n,"0")}function d(t,n){function e(t){return t<0?-1:t>0?1:0}var r;return 0===(r=e(t.getFullYear()-n.getFullYear()))&&0===(r=e(t.getMonth()-n.getMonth()))&&(r=e(t.getDate()-n.getDate())),r}function _(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function y(t){var n=Zn(new Date(t.tm_year+1900,0,1),t.tm_yday),e=new Date(n.getFullYear(),0,4),r=new Date(n.getFullYear()+1,0,4),i=_(e),a=_(r);return d(i,n)<=0?d(a,n)<=0?n.getFullYear()+1:n.getFullYear():n.getFullYear()-1}var h={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return l[t.tm_mon].substring(0,3)},"%B":function(t){return l[t.tm_mon]},"%C":function(t){return p((t.tm_year+1900)/100|0,2)},"%d":function(t){return p(t.tm_mday,2)},"%e":function(t){return f(t.tm_mday,2," ")},"%g":function(t){return y(t).toString().substring(2)},"%G":function(t){return y(t)},"%H":function(t){return p(t.tm_hour,2)},"%I":function(t){var n=t.tm_hour;return 0==n?n=12:n>12&&(n-=12),p(n,2)},"%j":function(t){return p(t.tm_mday+Kn(qn(t.tm_year+1900)?Qn:Jn,t.tm_mon-1),3)},"%m":function(t){return p(t.tm_mon+1,2)},"%M":function(t){return p(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return p(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var n=new Date(t.tm_year+1900,0,1),e=0===n.getDay()?n:Zn(n,7-n.getDay()),r=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(d(e,r)<0){var i=Kn(qn(r.getFullYear())?Qn:Jn,r.getMonth()-1)-31,a=31-e.getDate()+i+r.getDate();return p(Math.ceil(a/7),2)}return 0===d(e,n)?"01":"00"},"%V":function(t){var n,e=new Date(t.tm_year+1900,0,4),r=new Date(t.tm_year+1901,0,4),i=_(e),a=_(r),o=Zn(new Date(t.tm_year+1900,0,1),t.tm_yday);return d(o,i)<0?"53":d(a,o)<=0?"01":(n=i.getFullYear()<t.tm_year+1900?t.tm_yday+32-i.getDate():t.tm_yday+1-i.getDate(),p(Math.ceil(n/7),2))},"%w":function(t){return t.tm_wday},"%W":function(t){var n=new Date(t.tm_year,0,1),e=1===n.getDay()?n:Zn(n,0===n.getDay()?1:7-n.getDay()+1),r=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(d(e,r)<0){var i=Kn(qn(r.getFullYear())?Qn:Jn,r.getMonth()-1)-31,a=31-e.getDate()+i+r.getDate();return p(Math.ceil(a/7),2)}return 0===d(e,n)?"01":"00"},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var n=t.tm_gmtoff,e=n>=0;return n=(n=Math.abs(n)/60)/60*100+n%60,(e?"+":"-")+String("0000"+n).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var s in h)o.indexOf(s)>=0&&(o=o.replace(new RegExp(s,"g"),h[s](a)));var m,v,g,C,w,b,P=(m=o,v=!1,C=g>0?g:$(m)+1,w=new Array(C),b=j(m,w,0,w.length),v&&(w.length=b),w);return P.length>n?0:(V(P,t),P.length-1)}var te=[];Et=i.InternalError=Ft(Error,"InternalError"),function(){for(var t=new Array(256),n=0;n<256;++n)t[n]=String.fromCharCode(n);It=t}(),Ut=i.BindingError=Ft(Error,"BindingError"),en.prototype.isAliasOf=Bt,en.prototype.clone=Kt,en.prototype.delete=Qt,en.prototype.isDeleted=Jt,en.prototype.deleteLater=nn,wn.prototype.getPointee=fn,wn.prototype.destructor=pn,wn.prototype.argPackAdvance=8,wn.prototype.readValueFromPointer=At,wn.prototype.deleteObject=dn,wn.prototype.fromWireType=Cn,i.getInheritedInstanceCount=_n,i.getLiveInheritedInstances=yn,i.flushPendingDeletes=tn,i.setDelayFunction=hn,jn=i.UnboundTypeError=Ft(Error,"UnboundTypeError"),i.count_emval_handles=Sn,i.get_first_emval=xn;var ne,ee={__clock_gettime:function(t,n){return lt(t,n)},__cxa_allocate_exception:function(t){return ae(t+ht)+ht},__cxa_atexit:function(t,n){},__cxa_begin_catch:function(t){var n=new gt(t),e=n.get_exception_info();return e.get_caught()||(e.set_caught(!0),wt.uncaught_exceptions--),e.set_rethrown(!1),Ct.push(n),function(t){t.add_ref()}(e),n.get_exception_ptr()},__cxa_end_catch:function(){pe(0);var t=Ct.pop();!function(t){if(t.release_ref()&&!t.get_rethrown()){var n=t.get_destructor();n&&i.dynCall_ii(n,t.excPtr),Tt(t.excPtr)}}(t.get_exception_info()),t.free(),bt=0},__cxa_find_matching_catch_2:function(){var t=bt;if(!t)return 0|(v(0),0);var n=new vt(t),e=n.get_type(),r=new gt;if(r.set_base_ptr(t),!e)return 0|(v(0),r.ptr);var i=Array.prototype.slice.call(arguments),a=1148288;x[a>>2]=t;for(var o=0;o<i.length;o++){var u=i[o];if(0===u||u===e)break;if(___cxa_can_catch(u,e,a)){var s=x[a>>2];return t!==s&&r.set_adjusted_ptr(s),0|(v(u),r.ptr)}}return 0|(v(e),r.ptr)},__cxa_find_matching_catch_3:function(){var t=bt;if(!t)return 0|(v(0),0);var n=new vt(t),e=n.get_type(),r=new gt;if(r.set_base_ptr(t),!e)return 0|(v(0),r.ptr);var i=Array.prototype.slice.call(arguments),a=1148288;x[a>>2]=t;for(var o=0;o<i.length;o++){var u=i[o];if(0===u||u===e)break;if(___cxa_can_catch(u,e,a)){var s=x[a>>2];return t!==s&&r.set_adjusted_ptr(s),0|(v(u),r.ptr)}}return 0|(v(e),r.ptr)},__cxa_free_exception:Tt,__cxa_rethrow:function(){var t=Ct.pop(),n=t.get_exception_info(),e=t.get_base_ptr();throw n.get_rethrown()?t.free():(Ct.push(t),n.set_rethrown(!0)),bt=e,e},__cxa_throw:function(t,n,e){throw new vt(t).init(n,e),bt=t,"uncaught_exception"in wt?wt.uncaught_exceptions++:wt.uncaught_exceptions=1,t},__cxa_uncaught_exceptions:function(){return wt.uncaught_exceptions},__map_file:function(t,n){return ct(63),-1},__resumeException:function(t){var n=new gt(t),e=n.get_base_ptr();throw bt||(bt=e),n.free(),e},__sys__newselect:function(t,n,e,r,i){},__sys_fcntl64:function(t,n,e){return jt.varargs=e,0},__sys_fstat64:function(t,n){},__sys_getpid:function(){return 42},__sys_getuid32:function(){return 0},__sys_ioctl:function(t,n,e){return jt.varargs=e,0},__sys_mmap2:function(t,n,e,r,i,a){return function(t,n,e,r,i,a){var o;a<<=12;var u=!1;return 0!=(16&r)&&t%16384!=0?-28:0==(32&r)?-52:(o=ye(16384,n))?(ie(o,0,n),u=!0,jt.mappings[o]={malloc:o,len:n,allocated:u,fd:i,prot:e,flags:r,offset:a},o):-48}(t,n,e,r,i,a)},__sys_munmap:function(t,n){return function(t,n){if(-1==(0|t)||0===n)return-28;var e=jt.mappings[t];return e?(n===e.len&&(jt.mappings[t]=null,e.allocated&&oe(e.malloc)),0):0}(t,n)},__sys_open:function(t,n,e){jt.varargs=e},__sys_read:function(t,n,e){},__sys_rmdir:function(t){},__sys_stat64:function(t,n){},__sys_unlink:function(t){},_embind_finalize_value_object:function(t){var n=Pt[t];delete Pt[t];var e=n.rawConstructor,r=n.rawDestructor,i=n.fields;Mt([t],i.map((function(t){return t.getterReturnType})).concat(i.map((function(t){return t.setterArgumentType}))),(function(t){var a={};return i.forEach((function(n,e){var r=n.fieldName,o=t[e],u=n.getter,s=n.getterContext,c=t[e+i.length],l=n.setter,f=n.setterContext;a[r]={read:function(t){return o.fromWireType(u(s,t))},write:function(t,n){var e=[];l(f,t,c.toWireType(e,n)),$t(e)}}})),[{name:n.name,fromWireType:function(t){var n={};for(var e in a)n[e]=a[e].read(t);return r(t),n},toWireType:function(t,n){for(var i in a)if(!(i in n))throw new TypeError('Missing field: "'+i+'"');var o=e();for(i in a)a[i].write(o,n[i]);return null!==t&&t.push(r,o),o},argPackAdvance:8,readValueFromPointer:At,destructorFunction:r}]}))},_embind_register_bool:function(t,n,e,r,i){var a=Rt(e);Ht(t,{name:n=zt(n),fromWireType:function(t){return!!t},toWireType:function(t,n){return n?r:i},argPackAdvance:8,readValueFromPointer:function(t){var r;if(1===e)r=k;else if(2===e)r=O;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+n);r=x}return this.fromWireType(r[t>>a])},destructorFunction:null})},_embind_register_class:function(t,n,e,r,i,a,o,u,s,c,l,f,p){l=zt(l),a=Tn(i,a),u&&(u=Tn(o,u)),c&&(c=Tn(s,c)),p=Tn(f,p);var d=St(l);an(d,(function(){$n("Cannot construct "+l+" due to unbound types",[r])})),Mt([t,n,e],r?[r]:[],(function(n){var e,i;n=n[0],i=r?(e=n.registeredClass).instancePrototype:en.prototype;var o=xt(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Ut("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Ut(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new Ut("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),s=Object.create(i,{constructor:{value:o}});o.prototype=s;var f=new on(l,o,s,p,e,a,u,c),_=new wn(l,f,!0,!1,!1),y=new wn(l+"*",f,!1,!1,!1),h=new wn(l+" const*",f,!1,!0,!1);return rn[t]={pointerType:y,constPointerType:h},bn(d,o),[_,y,h]}))},_embind_register_class_property:function(t,n,e,r,i,a,o,u,s,c){n=zt(n),i=Tn(r,i),Mt([],[t],(function(t){var r=(t=t[0]).name+"."+n,l={get:function(){$n("Cannot access "+r+" due to unbound types",[e,o])},enumerable:!0,configurable:!0};return l.set=s?function(){$n("Cannot access "+r+" due to unbound types",[e,o])}:function(t){Yt(r+" is a read-only property")},Object.defineProperty(t.registeredClass.instancePrototype,n,l),Mt([],s?[e,o]:[e],(function(e){var o=e[0],l={get:function(){var n=An(this,t,r+" getter");return o.fromWireType(i(a,n))},enumerable:!0};if(s){s=Tn(u,s);var f=e[1];l.set=function(n){var e=An(this,t,r+" setter"),i=[];s(c,e,f.toWireType(i,n)),$t(i)}}return Object.defineProperty(t.registeredClass.instancePrototype,n,l),[]})),[]}))},_embind_register_emval:function(t,n){Ht(t,{name:n=zt(n),fromWireType:function(t){var n=Dn[t].value;return On(t),n},toWireType:function(t,n){return Fn(n)},argPackAdvance:8,readValueFromPointer:At,destructorFunction:null})},_embind_register_enum:function(t,n,e,r){var i=Rt(e);function a(){}n=zt(n),a.values={},Ht(t,{name:n,constructor:a,fromWireType:function(t){return this.constructor.values[t]},toWireType:function(t,n){return n.value},argPackAdvance:8,readValueFromPointer:En(n,i,r),destructorFunction:null}),an(n,a)},_embind_register_enum_value:function(t,n,e){var r=Wn(t,"enum");n=zt(n);var i=r.constructor,a=Object.create(r.constructor.prototype,{value:{value:e},constructor:{value:xt(r.name+"_"+n,(function(){}))}});i.values[e]=a,i[n]=a},_embind_register_float:function(t,n,e){var r=Rt(e);Ht(t,{name:n=zt(n),fromWireType:function(t){return t},toWireType:function(t,n){if("number"!=typeof n&&"boolean"!=typeof n)throw new TypeError('Cannot convert "'+Mn(n)+'" to '+this.name);return n},argPackAdvance:8,readValueFromPointer:Rn(n,r),destructorFunction:null})},_embind_register_function:function(t,n,e,r,i,a){var o=function(t,n){for(var e=[],r=0;r<t;r++)e.push(x[(n>>2)+r]);return e}(n,e);t=zt(t),i=Tn(r,i),an(t,(function(){$n("Cannot call "+t+" due to unbound types",o)}),n-1),Mt([],o,(function(e){var r=[e[0],null].concat(e.slice(1));return bn(t,function(t,n,e,r,i){var a=n.length;a<2&&Yt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==n[1]&&null!==e,u=!1,s=1;s<n.length;++s)if(null!==n[s]&&void 0===n[s].destructorFunction){u=!0;break}var c="void"!==n[0].name,l="",f="";for(s=0;s<a-2;++s)l+=(0!==s?", ":"")+"arg"+s,f+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+St(t)+"("+l+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",_=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[Yt,r,i,$t,n[0],n[1]];for(o&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),s=0;s<a-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+n[s+2].name+"\n",_.push("argType"+s),y.push(n[s+2]);if(o&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)p+="runDestructors(destructors);\n";else for(s=o?1:2;s<n.length;++s){var h=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==n[s].destructorFunction&&(p+=h+"_dtor("+h+"); // "+n[s].name+"\n",_.push(h+"_dtor"),y.push(n[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",_.push(p),In(Function,_).apply(null,y)}(t,r,null,i,a),n-1),[]}))},_embind_register_integer:function(t,n,e,r,i){n=zt(n),-1===i&&(i=4294967295);var a=Rt(e),o=function(t){return t};if(0===r){var u=32-8*e;o=function(t){return t<<u>>>u}}var s=-1!=n.indexOf("unsigned");Ht(t,{name:n,fromWireType:o,toWireType:function(t,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+Mn(e)+'" to '+this.name);if(e<r||e>i)throw new TypeError('Passing a number "'+Mn(e)+'" from JS side to C/C++ side to an argument of type "'+n+'", which is outside the valid range ['+r+", "+i+"]!");return s?e>>>0:0|e},argPackAdvance:8,readValueFromPointer:zn(n,a,0!==r),destructorFunction:null})},_embind_register_memory_view:function(t,n,e){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][n];function i(t){var n=F,e=n[t>>=2],i=n[t+1];return new r(A,i,e)}Ht(t,{name:e=zt(e),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(t,n){var e="std::string"===(n=zt(n));Ht(t,{name:n,fromWireType:function(t){var n,r=F[t>>2];if(e)for(var i=t+4,a=0;a<=r;++a){var o=t+4+a;if(a==r||0==D[o]){var u=T(i,o-i);void 0===n?n=u:(n+=String.fromCharCode(0),n+=u),i=o+1}}else{var s=new Array(r);for(a=0;a<r;++a)s[a]=String.fromCharCode(D[t+4+a]);n=s.join("")}return oe(t),n},toWireType:function(t,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var r="string"==typeof n;r||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Int8Array||Yt("Cannot pass non-string to std::string");var i=(e&&r?function(){return $(n)}:function(){return n.length})(),a=ae(4+i+1);if(F[a>>2]=i,e&&r)P(n,a+4,i+1);else if(r)for(var o=0;o<i;++o){var u=n.charCodeAt(o);u>255&&(oe(a),Yt("String has UTF-16 code units that do not fit in 8 bits")),D[a+4+o]=u}else for(o=0;o<i;++o)D[a+4+o]=n[o];return null!==t&&t.push(oe,a),a},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(t){oe(t)}})},_embind_register_std_wstring:function(t,n,e){var r,i,a,o,u;e=zt(e),2===n?(r=R,i=I,o=z,a=function(){return S},u=1):4===n&&(r=U,i=Y,o=H,a=function(){return F},u=2),Ht(t,{name:e,fromWireType:function(t){for(var e,i=F[t>>2],o=a(),s=t+4,c=0;c<=i;++c){var l=t+4+c*n;if(c==i||0==o[l>>u]){var f=r(s,l-s);void 0===e?e=f:(e+=String.fromCharCode(0),e+=f),s=l+n}}return oe(t),e},toWireType:function(t,r){"string"!=typeof r&&Yt("Cannot pass non-string to C++ string type "+e);var a=o(r),s=ae(4+a+n);return F[s>>2]=a>>u,i(r,s+4,a+n),null!==t&&t.push(oe,s),s},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(t){oe(t)}})},_embind_register_value_object:function(t,n,e,r,i,a){Pt[t]={name:zt(n),rawConstructor:Tn(e,r),rawDestructor:Tn(i,a),fields:[]}},_embind_register_value_object_field:function(t,n,e,r,i,a,o,u,s,c){Pt[t].fields.push({fieldName:zt(n),getterReturnType:e,getter:Tn(r,i),getterContext:a,setterArgumentType:o,setter:Tn(u,s),setterContext:c})},_embind_register_void:function(t,n){Ht(t,{isVoid:!0,name:n=zt(n),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,n){}})},_emval_call_method:function(t,n,e,r,i){return(t=Hn[t])(n=function(t){return t||Yt("Cannot use deleted val. handle = "+t),Dn[t].value}(n),e=Yn(e),function(t){var n=[];return x[t>>2]=Fn(n),n}(r),i)},_emval_decref:On,_emval_get_global:function(t){return 0===t?Fn(Bn()):(t=Yn(t),Fn(Bn()[t]))},_emval_get_method_caller:function(t,n){for(var e=function(t,n){for(var e=new Array(t),r=0;r<t;++r)e[r]=Wn(x[(n>>2)+r],"parameter "+r);return e}(t,n),r=e[0],i=r.name+"_$"+e.slice(1).map((function(t){return t.name})).join("_")+"$",a=["retType"],o=[r],u="",s=0;s<t-1;++s)u+=(0!==s?", ":"")+"arg"+s,a.push("argType"+s),o.push(e[1+s]);var c="return function "+St("methodCaller_"+i)+"(handle, name, destructors, args) {\n",l=0;for(s=0;s<t-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=e[s+1].argPackAdvance;for(c+=" var rv = handle[name]("+u+");\n",s=0;s<t-1;++s)e[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");r.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",a.push(c);var f,p,d=In(Function,a).apply(null,o);return f=d,p=Hn.length,Hn.push(f),p},_emval_incref:function(t){t>4&&(Dn[t].refcount+=1)},_emval_run_destructors:function(t){$t(Dn[t].value),On(t)},_emval_take_value:function(t,n){return Fn((t=Wn(t,"_emval_take_value")).readValueFromPointer(n))},abort:function(){et()},atexit:mt,clock:function t(){return void 0===t.start&&(t.start=Date.now()),1e3*(Date.now()-t.start)|0},clock_gettime:lt,emscripten_asm_const_iii:function(t,n,e){var r=function(t,n){var e;for(te.length=0,n>>=2;e=D[t++];){var r=e<105;r&&1&n&&n++,te.push(r?W[n++>>1]:x[n]),++n}return te}(n,e);return st[t].apply(null,r)},emscripten_get_sbrk_ptr:function(){return 1148128},emscripten_longjmp:function(t,n){!function(t,n){throw pe(t,n||1),"longjmp"}(t,n)},emscripten_memcpy_big:function(t,n,e){D.copyWithin(t,n,n+e)},emscripten_resize_heap:function(t){t>>>=0;var n=D.length;if(t>2147483648)return!1;for(var e,r,i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Vn(Math.min(2147483648,((e=Math.max(16777216,t,a))%(r=65536)>0&&(e+=r-e%r),e))))return!0}return!1},environ_get:function(t,n){var e=0;return Ln().forEach((function(r,i){var a=n+e;x[t+4*i>>2]=a,function(t,n,e){for(var r=0;r<t.length;++r)k[n++>>0]=t.charCodeAt(r);e||(k[n>>0]=0)}(r,a),e+=r.length+1})),0},environ_sizes_get:function(t,n){var e=Ln();x[t>>2]=e.length;var r=0;return e.forEach((function(t){r+=t.length+1})),x[n>>2]=r,0},exit:function(t){!function(t,n){n&&y&&0===t||(y||(C=!0,i.onExit&&i.onExit(t)),l(t,new Ge(t)))}(t)},fd_close:function(t){return 0},fd_fdstat_get:function(t,n){var e=1==t||2==t?2:et();return k[n>>0]=e,0},fd_read:function(t,n,e,r){var i=jt.getStreamFromFD(t),a=jt.doReadv(i,n,e);return x[r>>2]=a,0},fd_seek:function(t,n,e,r,i){},fd_write:function(t,n,e,r){for(var i=0,a=0;a<e;a++){for(var o=x[n+8*a>>2],u=x[n+(8*a+4)>>2],s=0;s<u;s++)jt.printChar(t,D[o+s]);i+=u}return x[r>>2]=i,0},getSelf:function(){return B(location.toString())},getTempRet0:function(){return 0|m},gettimeofday:function(t){var n=Date.now();return x[t>>2]=n/1e3|0,x[t+4>>2]=n%1e3*1e3|0,0},initializeOpenGL:function(){return B((t=Qe,self[t("0x0","2E$9")][t("0x1","eDuR")]()));var t},invoke_diii:function(t,n,e,r){var i=de();try{return Ve(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_fiii:function(t,n,e,r){var i=de();try{return Be(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_i:function(t){var n=de();try{return ke(t)}catch(t){if(_e(n),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_ii:function(t,n){var e=de();try{return De(t,n)}catch(t){if(_e(e),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iii:function(t,n,e){var r=de();try{return Oe(t,n,e)}catch(t){if(_e(r),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiii:function(t,n,e,r){var i=de();try{return Se(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiii:function(t,n,e,r,i){var a=de();try{return xe(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiid:function(t,n,e,r,i,a){var o=de();try{return Ue(t,n,e,r,i,a)}catch(t){if(_e(o),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiii:function(t,n,e,r,i,a){var o=de();try{return Fe(t,n,e,r,i,a)}catch(t){if(_e(o),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiii:function(t,n,e,r,i,a,o){var u=de();try{return Ee(t,n,e,r,i,a,o)}catch(t){if(_e(u),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiii:function(t,n,e,r,i,a,o,u){var s=de();try{return We(t,n,e,r,i,a,o,u)}catch(t){if(_e(s),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c){var l=de();try{return Me(t,n,e,r,i,a,o,u,s,c)}catch(t){if(_e(l),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l){var f=de();try{return Re(t,n,e,r,i,a,o,u,s,c,l)}catch(t){if(_e(f),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l,f){var p=de();try{return Ie(t,n,e,r,i,a,o,u,s,c,l,f)}catch(t){if(_e(p),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l,f,p){var d=de();try{return ze(t,n,e,r,i,a,o,u,s,c,l,f,p)}catch(t){if(_e(d),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_jii:function(t,n,e){var r=de();try{return Ye(t,n,e)}catch(t){if(_e(r),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_jiiii:function(t,n,e,r,i){var a=de();try{return He(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_v:function(t){var n=de();try{he(t)}catch(t){if(_e(n),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_vi:function(t,n){var e=de();try{me(t,n)}catch(t){if(_e(e),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_vii:function(t,n,e){var r=de();try{ve(t,n,e)}catch(t){if(_e(r),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viidd:function(t,n,e,r,i){var a=de();try{Ae(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viii:function(t,n,e,r){var i=de();try{ge(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiii:function(t,n,e,r,i){var a=de();try{Ce(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiii:function(t,n,e,r,i,a){var o=de();try{we(t,n,e,r,i,a)}catch(t){if(_e(o),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiii:function(t,n,e,r,i,a,o){var u=de();try{be(t,n,e,r,i,a,o)}catch(t){if(_e(u),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiii:function(t,n,e,r,i,a,o,u){var s=de();try{Te(t,n,e,r,i,a,o,u)}catch(t){if(_e(s),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiiiii:function(t,n,e,r,i,a,o,u,s,c){var l=de();try{je(t,n,e,r,i,a,o,u,s,c)}catch(t){if(_e(l),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l){var f=de();try{Pe(t,n,e,r,i,a,o,u,s,c,l)}catch(t){if(_e(f),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l,f,p,d,_,y){var h=de();try{$e(t,n,e,r,i,a,o,u,s,c,l,f,p,d,_,y)}catch(t){if(_e(h),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},localtime:function(t){return Nn(t,1148144)},memory:h,pthread_mutexattr_destroy:function(){},pthread_mutexattr_init:function(){},pthread_mutexattr_settype:function(){},setTempRet0:function(t){v(0|t)},strftime:Xn,strftime_l:function(t,n,e,r){return Xn(t,n,e,r)},sysconf:function(t){switch(t){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ct(28),-1},table:g,time:function(t){var n=Date.now()/1e3|0;return t&&(x[t>>2]=n),n}},re=(function(){var t={env:ee,wasi_snapshot_preview1:ee};function n(t,n){var e=t.exports;i.asm=e,function(t){if(X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),0==X&&(null!==tt&&(clearInterval(tt),tt=null),nt)){var n=nt;nt=null,n()}}()}function e(t){n(t.instance)}function r(n){return(_||"function"!=typeof fetch?new Promise((function(t,n){t(ot())})):fetch(at,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+at+"'";return t.arrayBuffer()})).catch((function(){return ot()}))).then((function(n){return WebAssembly.instantiate(n,t)})).then(n,(function(t){d("failed to asynchronously prepare wasm: "+t),et(t)}))}if(X++,i.monitorRunDependencies&&i.monitorRunDependencies(X),i.instantiateWasm)try{return i.instantiateWasm(t,n)}catch(t){return d("Module.instantiateWasm callback failed with error: "+t),!1}!function(){if(_||"function"!=typeof WebAssembly.instantiateStreaming||rt(at)||"function"!=typeof fetch)return r(e);fetch(at,{credentials:"same-origin"}).then((function(n){return WebAssembly.instantiateStreaming(n,t).then(e,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),r(e)}))}))}()}(),i.___wasm_call_ctors=function(){return(re=i.___wasm_call_ctors=i.asm.__wasm_call_ctors).apply(null,arguments)}),ie=i._memset=function(){return(ie=i._memset=i.asm.memset).apply(null,arguments)},ae=i._malloc=function(){return(ae=i._malloc=i.asm.malloc).apply(null,arguments)},oe=i._free=function(){return(oe=i._free=i.asm.free).apply(null,arguments)},ue=(i.___em_js__getSelf=function(){return(i.___em_js__getSelf=i.asm.__em_js__getSelf).apply(null,arguments)},i.___em_js__initializeOpenGL=function(){return(i.___em_js__initializeOpenGL=i.asm.__em_js__initializeOpenGL).apply(null,arguments)},i.___errno_location=function(){return(ue=i.___errno_location=i.asm.__errno_location).apply(null,arguments)}),se=(i._testSetjmp=function(){return(i._testSetjmp=i.asm.testSetjmp).apply(null,arguments)},i._saveSetjmp=function(){return(i._saveSetjmp=i.asm.saveSetjmp).apply(null,arguments)},i._realloc=function(){return(i._realloc=i.asm.realloc).apply(null,arguments)},i.___getTypeName=function(){return(se=i.___getTypeName=i.asm.__getTypeName).apply(null,arguments)}),ce=(i.___embind_register_native_and_builtin_types=function(){return(i.___embind_register_native_and_builtin_types=i.asm.__embind_register_native_and_builtin_types).apply(null,arguments)},i.__get_tzname=function(){return(ce=i.__get_tzname=i.asm._get_tzname).apply(null,arguments)}),le=i.__get_daylight=function(){return(le=i.__get_daylight=i.asm._get_daylight).apply(null,arguments)},fe=i.__get_timezone=function(){return(fe=i.__get_timezone=i.asm._get_timezone).apply(null,arguments)},pe=i._setThrew=function(){return(pe=i._setThrew=i.asm.setThrew).apply(null,arguments)},de=i.stackSave=function(){return(de=i.stackSave=i.asm.stackSave).apply(null,arguments)},_e=i.stackRestore=function(){return(_e=i.stackRestore=i.asm.stackRestore).apply(null,arguments)},ye=(i.stackAlloc=function(){return(i.stackAlloc=i.asm.stackAlloc).apply(null,arguments)},i._memalign=function(){return(ye=i._memalign=i.asm.memalign).apply(null,arguments)}),he=i.dynCall_v=function(){return(he=i.dynCall_v=i.asm.dynCall_v).apply(null,arguments)},me=i.dynCall_vi=function(){return(me=i.dynCall_vi=i.asm.dynCall_vi).apply(null,arguments)},ve=i.dynCall_vii=function(){return(ve=i.dynCall_vii=i.asm.dynCall_vii).apply(null,arguments)},ge=i.dynCall_viii=function(){return(ge=i.dynCall_viii=i.asm.dynCall_viii).apply(null,arguments)},Ce=i.dynCall_viiii=function(){return(Ce=i.dynCall_viiii=i.asm.dynCall_viiii).apply(null,arguments)},we=i.dynCall_viiiii=function(){return(we=i.dynCall_viiiii=i.asm.dynCall_viiiii).apply(null,arguments)},be=i.dynCall_viiiiii=function(){return(be=i.dynCall_viiiiii=i.asm.dynCall_viiiiii).apply(null,arguments)},Te=i.dynCall_viiiiiii=function(){return(Te=i.dynCall_viiiiiii=i.asm.dynCall_viiiiiii).apply(null,arguments)},je=i.dynCall_viiiiiiiii=function(){return(je=i.dynCall_viiiiiiiii=i.asm.dynCall_viiiiiiiii).apply(null,arguments)},Pe=i.dynCall_viiiiiiiiii=function(){return(Pe=i.dynCall_viiiiiiiiii=i.asm.dynCall_viiiiiiiiii).apply(null,arguments)},$e=i.dynCall_viiiiiiiiiiiiiii=function(){return($e=i.dynCall_viiiiiiiiiiiiiii=i.asm.dynCall_viiiiiiiiiiiiiii).apply(null,arguments)},Ae=i.dynCall_viidd=function(){return(Ae=i.dynCall_viidd=i.asm.dynCall_viidd).apply(null,arguments)},ke=i.dynCall_i=function(){return(ke=i.dynCall_i=i.asm.dynCall_i).apply(null,arguments)},De=i.dynCall_ii=function(){return(De=i.dynCall_ii=i.asm.dynCall_ii).apply(null,arguments)},Oe=i.dynCall_iii=function(){return(Oe=i.dynCall_iii=i.asm.dynCall_iii).apply(null,arguments)},Se=i.dynCall_iiii=function(){return(Se=i.dynCall_iiii=i.asm.dynCall_iiii).apply(null,arguments)},xe=i.dynCall_iiiii=function(){return(xe=i.dynCall_iiiii=i.asm.dynCall_iiiii).apply(null,arguments)},Fe=i.dynCall_iiiiii=function(){return(Fe=i.dynCall_iiiiii=i.asm.dynCall_iiiiii).apply(null,arguments)},Ee=i.dynCall_iiiiiii=function(){return(Ee=i.dynCall_iiiiiii=i.asm.dynCall_iiiiiii).apply(null,arguments)},We=i.dynCall_iiiiiiii=function(){return(We=i.dynCall_iiiiiiii=i.asm.dynCall_iiiiiiii).apply(null,arguments)},Me=i.dynCall_iiiiiiiiii=function(){return(Me=i.dynCall_iiiiiiiiii=i.asm.dynCall_iiiiiiiiii).apply(null,arguments)},Re=i.dynCall_iiiiiiiiiii=function(){return(Re=i.dynCall_iiiiiiiiiii=i.asm.dynCall_iiiiiiiiiii).apply(null,arguments)},Ie=i.dynCall_iiiiiiiiiiii=function(){return(Ie=i.dynCall_iiiiiiiiiiii=i.asm.dynCall_iiiiiiiiiiii).apply(null,arguments)},ze=i.dynCall_iiiiiiiiiiiii=function(){return(ze=i.dynCall_iiiiiiiiiiiii=i.asm.dynCall_iiiiiiiiiiiii).apply(null,arguments)},Ue=i.dynCall_iiiiid=function(){return(Ue=i.dynCall_iiiiid=i.asm.dynCall_iiiiid).apply(null,arguments)},Ye=i.dynCall_jii=function(){return(Ye=i.dynCall_jii=i.asm.dynCall_jii).apply(null,arguments)},He=i.dynCall_jiiii=function(){return(He=i.dynCall_jiiii=i.asm.dynCall_jiiii).apply(null,arguments)},Be=i.dynCall_fiii=function(){return(Be=i.dynCall_fiii=i.asm.dynCall_fiii).apply(null,arguments)},Ve=i.dynCall_diii=function(){return(Ve=i.dynCall_diii=i.asm.dynCall_diii).apply(null,arguments)};function Ge(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Le(t){function e(){ne||(ne=!0,i.calledRun=!0,C||(q(Q),q(J),n(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),Z.unshift(t);var t;q(Z)}()))}t=t||s,X>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),K.unshift(t);var t;q(K)}(),X>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viijii=function(){return(i.dynCall_viijii=i.asm.dynCall_viijii).apply(null,arguments)},i.dynCall_iiddd=function(){return(i.dynCall_iiddd=i.asm.dynCall_iiddd).apply(null,arguments)},i.dynCall_iidid=function(){return(i.dynCall_iidid=i.asm.dynCall_iidid).apply(null,arguments)},i.dynCall_viiiidd=function(){return(i.dynCall_viiiidd=i.asm.dynCall_viiiidd).apply(null,arguments)},i.dynCall_iiiiidd=function(){return(i.dynCall_iiiiidd=i.asm.dynCall_iiiiidd).apply(null,arguments)},i.dynCall_viiiiiiii=function(){return(i.dynCall_viiiiiiii=i.asm.dynCall_viiiiiiii).apply(null,arguments)},i.dynCall_viiiiiiiiidd=function(){return(i.dynCall_viiiiiiiiidd=i.asm.dynCall_viiiiiiiiidd).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.dynCall_jiji).apply(null,arguments)},i.dynCall_ji=function(){return(i.dynCall_ji=i.asm.dynCall_ji).apply(null,arguments)},i.dynCall_viiiiiiiddi=function(){return(i.dynCall_viiiiiiiddi=i.asm.dynCall_viiiiiiiddi).apply(null,arguments)},i.dynCall_viiiiiiiiiiddi=function(){return(i.dynCall_viiiiiiiiiiddi=i.asm.dynCall_viiiiiiiiiiddi).apply(null,arguments)},i.dynCall_viiid=function(){return(i.dynCall_viiid=i.asm.dynCall_viiid).apply(null,arguments)},i.dynCall_iiiiiiiii=function(){return(i.dynCall_iiiiiiiii=i.asm.dynCall_iiiiiiiii).apply(null,arguments)},i.dynCall_viiiid=function(){return(i.dynCall_viiiid=i.asm.dynCall_viiiid).apply(null,arguments)},i.dynCall_viidi=function(){return(i.dynCall_viidi=i.asm.dynCall_viidi).apply(null,arguments)},i.dynCall_vidii=function(){return(i.dynCall_vidii=i.asm.dynCall_vidii).apply(null,arguments)},i.dynCall_viiiiiiiiiiii=function(){return(i.dynCall_viiiiiiiiiiii=i.asm.dynCall_viiiiiiiiiiii).apply(null,arguments)},i.dynCall_viij=function(){return(i.dynCall_viij=i.asm.dynCall_viij).apply(null,arguments)},i.dynCall_iiid=function(){return(i.dynCall_iiid=i.asm.dynCall_iiid).apply(null,arguments)},i.dynCall_iidiiii=function(){return(i.dynCall_iidiiii=i.asm.dynCall_iidiiii).apply(null,arguments)},i.dynCall_iiiiij=function(){return(i.dynCall_iiiiij=i.asm.dynCall_iiiiij).apply(null,arguments)},i.dynCall_iiiiijj=function(){return(i.dynCall_iiiiijj=i.asm.dynCall_iiiiijj).apply(null,arguments)},i.dynCall_iiiiiijj=function(){return(i.dynCall_iiiiiijj=i.asm.dynCall_iiiiiijj).apply(null,arguments)},i.__growWasmMemory=function(){return(i.__growWasmMemory=i.asm.__growWasmMemory).apply(null,arguments)},i.UTF8ToString=T,i.stringToUTF8=P,i.lengthBytesUTF8=$,i.allocateUTF8=B,nt=function t(){ne||Le(),ne||(nt=t)},i.run=Le,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();y=!0,Le();var Ne,qe,Ke=["kmkKk1qvW4P6qa==","W6XLWP0OnCkKz8kV"];Ne=Ke,qe=367,function(t){for(;--t;)Ne.push(Ne.shift())}(++qe);var ighnua,Qe=function(t,n){var e=Ke[t-=0];void 0===Qe.BbQzCq&&(Qe.RqQOYO=function(t,n){for(var e,r,i=[],a=0,o="",u="",s=0,c=(t=function(t){for(var n,e,r=String(t).replace(/=+$/,""),i="",a=0,o=0;e=r.charAt(o++);~e&&(n=a%4?64*n+e:e,a++%4)?i+=String.fromCharCode(255&n>>(-2*a&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);return i}(t)).length;s<c;s++)u+="%"+("00"+t.charCodeAt(s).toString(16)).slice(-2);for(t=decodeURIComponent(u),r=0;r<256;r++)i[r]=r;for(r=0;r<256;r++)a=(a+i[r]+n.charCodeAt(r%n.length))%256,e=i[r],i[r]=i[a],i[a]=e;r=0,a=0;for(var l=0;l<t.length;l++)a=(a+i[r=(r+1)%256])%256,e=i[r],i[r]=i[a],i[a]=e,o+=String.fromCharCode(t.charCodeAt(l)^i[(i[r]+i[a])%256]);return o},Qe.eGnrQI={},Qe.BbQzCq=!0);var r=Qe.eGnrQI[t];return void 0===r?(void 0===Qe.IatgZU&&(Qe.IatgZU=!0),e=Qe.RqQOYO(e,n),Qe.eGnrQI[t]=e):e=r,e},Je=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup})(this,(function(){var t=function(){return!t.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Je)};return t()}));return Je(),t.ready});t.exports=i},3:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=""}});
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=21)}({2:function(t,n,e){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.Constants=void 0;r(e(3));class i{}n.Constants=i,i.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@1.0.2/bundle/"},21:function(t,n,e){"use strict";var r=e(2);let i;const a={initialize:async function(t,n,a){const o=e(22),u={locateFile:function(t,e){let i;return i=n?function(t){return-1!==t.indexOf("http")}(n)?n:"":r.Constants.CDN_PATH,i+"ScanbotSDK.Asm.wasm"}};return await o(u),i=u,i.initialize(t||"",a)},getLicenseInfo:async function(){return i.getLicenseInfo()},detectDocument:async function(t,n,e){const r=s(t);return await o(i.detectDocument(r.buffer,r.width,r.height,n,e))},detectAndCropDocument:async function(t){const n=s(t);return await o(i.detectAndCropDocument(n.buffer,n.width,n.height))}};async function o(t){if(!t)return{success:!1,detectionStatus:"Error_License"};const n=(e=t.detectionResult,l[e]?l[e]:e>=200?"Error_Unknown":"OK");var e;const r={detectionStatus:n,success:u(n)},i=[];i.push(c(t.originalImageJpegData)),r.success&&(i.push(c(t.croppedImageJpegData)),r.polygon=function(t){if(t.length%2!=0)throw Error("pointCoords size is not even.");const n=[];for(let e=0;e<t.length;e+=2)n.push({x:t[e],y:t[e+1]});return n}(t.polygon));const[a,o]=await Promise.all(i);return r.original=a,r.cropped=o,t.delete(),r}function u(t){return"OK"===t.substr(0,2)}function s(t){const{width:n,height:e,data:r}=t,a=i._malloc(4*n*e);return i.HEAPU8.set(r,a),{buffer:a,width:n,height:e}}function c(t){return new Promise(n=>{if(t){var e=new Blob([t],{type:"image/jpeg"}),r=new FileReader;r.onload=function(){n(r.result)},r.readAsDataURL(e)}else n()})}const l={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(t){const{command:n,args:e,ticket:r}=t.data;if(!i&&"initialize"!==n)throw Error("WASM module not loaded yet.");a[n].apply(null,e).then(t=>self.postMessage({ticket:r,result:t})).catch(t=>{console.error(t),self.postMessage({ticket:r,error:t.toString()})})}},22:function(t,n,e){"use strict";var r,i=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var n,e,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){n=t,e=r}));var a,o={};for(a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);var u,s=[],c="./this.program",l=function(t,n){throw n},f="";f=self.location.href,r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",u=function(t){var n=new XMLHttpRequest;return n.open("GET",t,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)};var p=i.print||console.log.bind(console),d=i.printErr||console.warn.bind(console);for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);o=null,i.arguments&&(s=i.arguments),i.thisProgram&&(c=i.thisProgram),i.quit&&(l=i.quit);var _,y,h,m=0,v=function(t){m=t};i.wasmBinary&&(_=i.wasmBinary),i.noExitRuntime&&(y=i.noExitRuntime),"object"!=typeof WebAssembly&&et("no native wasm support detected");var g=new WebAssembly.Table({initial:2842,maximum:2842,element:"anyfunc"}),C=!1,w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,n,e){for(var r=n+e,i=n;t[i]&&!(i>=r);)++i;if(i-n>16&&t.subarray&&w)return w.decode(t.subarray(n,i));for(var a="";n<i;){var o=t[n++];if(128&o){var u=63&t[n++];if(192!=(224&o)){var s=63&t[n++];if((o=224==(240&o)?(15&o)<<12|u<<6|s:(7&o)<<18|u<<12|s<<6|63&t[n++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|u)}else a+=String.fromCharCode(o)}return a}function T(t,n){return t?b(S,t,n):""}function j(t,n,e,r){if(!(r>0))return 0;for(var i=e,a=e+r-1,o=0;o<t.length;++o){var u=t.charCodeAt(o);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&t.charCodeAt(++o)),u<=127){if(e>=a)break;n[e++]=u}else if(u<=2047){if(e+1>=a)break;n[e++]=192|u>>6,n[e++]=128|63&u}else if(u<=65535){if(e+2>=a)break;n[e++]=224|u>>12,n[e++]=128|u>>6&63,n[e++]=128|63&u}else{if(e+3>=a)break;n[e++]=240|u>>18,n[e++]=128|u>>12&63,n[e++]=128|u>>6&63,n[e++]=128|63&u}}return n[e]=0,e-i}function P(t,n,e){return j(t,S,n,e)}function $(t){for(var n=0,e=0;e<t.length;++e){var r=t.charCodeAt(e);r>=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++e)),r<=127?++n:n+=r<=2047?2:r<=65535?3:4}return n}var A,k,S,D,O,x,F,W,E,M="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function R(t,n){for(var e=t,r=e>>1,i=r+n/2;!(r>=i)&&O[r];)++r;if((e=r<<1)-t>32&&M)return M.decode(S.subarray(t,e));for(var a=0,o="";;){var u=D[t+2*a>>1];if(0==u||a==n/2)return o;++a,o+=String.fromCharCode(u)}}function z(t,n,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var r=n,i=(e-=2)<2*t.length?e/2:t.length,a=0;a<i;++a){var o=t.charCodeAt(a);D[n>>1]=o,n+=2}return D[n>>1]=0,n-r}function I(t){return 2*t.length}function U(t,n){for(var e=0,r="";!(e>=n/4);){var i=x[t+4*e>>2];if(0==i)break;if(++e,i>=65536){var a=i-65536;r+=String.fromCharCode(55296|a>>10,56320|1023&a)}else r+=String.fromCharCode(i)}return r}function Y(t,n,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var r=n,i=r+e-4,a=0;a<t.length;++a){var o=t.charCodeAt(a);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++a)),x[n>>2]=o,(n+=4)+4>i)break}return x[n>>2]=0,n-r}function H(t){for(var n=0,e=0;e<t.length;++e){var r=t.charCodeAt(e);r>=55296&&r<=57343&&++e,n+=4}return n}function N(t){var n=$(t)+1,e=ae(n);return e&&j(t,k,e,n),e}function B(t,n){k.set(t,n)}function V(t){A=t,i.HEAP8=k=new Int8Array(t),i.HEAP16=D=new Int16Array(t),i.HEAP32=x=new Int32Array(t),i.HEAPU8=S=new Uint8Array(t),i.HEAPU16=O=new Uint16Array(t),i.HEAPU32=F=new Uint32Array(t),i.HEAPF32=W=new Float32Array(t),i.HEAPF64=E=new Float64Array(t)}var L=1148128,G=i.INITIAL_MEMORY||16777216;function K(t){for(;t.length>0;){var n=t.shift();if("function"!=typeof n){var e=n.func;"number"==typeof e?void 0===n.arg?i.dynCall_v(e):i.dynCall_vi(e,n.arg):e(void 0===n.arg?null:n.arg)}else n(i)}}(h=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:G/65536,maximum:32768}))&&(A=h.buffer),G=A.byteLength,V(A),x[L>>2]=6391184;var q=[],J=[],Z=[],Q=[];Math.abs,Math.ceil,Math.floor,Math.min;var X=0,tt=null,nt=null;function et(t){i.onAbort&&i.onAbort(t),d(t+=""),C=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var n=new WebAssembly.RuntimeError(t);throw e(n),n}function rt(t){return n=t,e="data:application/octet-stream;base64,",String.prototype.startsWith?n.startsWith(e):0===n.indexOf(e);var n,e}i.preloadedImages={},i.preloadedAudios={};var it,at="ScanbotSDK.Asm.wasm";function ot(){try{if(_)return new Uint8Array(_);if(u)return u(at);throw"both async and sync fetching of the wasm failed"}catch(t){et(t)}}rt(at)||(it=at,at=i.locateFile?i.locateFile(it,f):f+it);var ut,st={5920:function(t){return N(function(){return this[T(t)].toString()}.apply((0,eval)("(()=>this)()")))}};function ct(t){return x[ue()>>2]=t,t}function lt(t,n){var e;if(0===t)e=Date.now();else{if(1!==t&&4!==t)return ct(28),-1;e=ut()}return x[n>>2]=e/1e3|0,x[n+4>>2]=e%1e3*1e3*1e3|0,0}J.push({func:function(){re()}}),ut=function(){return performance.now()};var ft=0,pt=4,dt=8,_t=12,yt=13,ht=16;function mt(t,n){}function vt(t){this.excPtr=t,this.ptr=t-ht,this.set_type=function(t){x[this.ptr+dt>>2]=t},this.get_type=function(){return x[this.ptr+dt>>2]},this.set_destructor=function(t){x[this.ptr+ft>>2]=t},this.get_destructor=function(){return x[this.ptr+ft>>2]},this.set_refcount=function(t){x[this.ptr+pt>>2]=t},this.set_caught=function(t){t=t?1:0,k[this.ptr+_t>>0]=t},this.get_caught=function(){return 0!=k[this.ptr+_t>>0]},this.set_rethrown=function(t){t=t?1:0,k[this.ptr+yt>>0]=t},this.get_rethrown=function(){return 0!=k[this.ptr+yt>>0]},this.init=function(t,n){this.set_type(t),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=x[this.ptr+pt>>2];x[this.ptr+pt>>2]=t+1},this.release_ref=function(){var t=x[this.ptr+pt>>2];return x[this.ptr+pt>>2]=t-1,1===t}}function gt(t){this.free=function(){oe(this.ptr),this.ptr=0},this.set_base_ptr=function(t){x[this.ptr>>2]=t},this.get_base_ptr=function(){return x[this.ptr>>2]},this.set_adjusted_ptr=function(t){x[this.ptr+4>>2]=t},this.get_adjusted_ptr=function(){return x[this.ptr+4>>2]},this.get_exception_ptr=function(){if(___cxa_is_pointer_type(this.get_exception_info().get_type()))return x[this.get_base_ptr()>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.get_base_ptr()},this.get_exception_info=function(){return new vt(this.get_base_ptr())},void 0===t?(this.ptr=ae(8),this.set_adjusted_ptr(0)):this.ptr=t}var Ct=[];function wt(){return wt.uncaught_exceptions>0}var bt=0;function Tt(t){return oe(new vt(t).ptr)}var jt={mappings:{},buffers:[null,[],[]],printChar:function(t,n){var e=jt.buffers[t];0===n||10===n?((1===t?p:d)(b(e,0)),e.length=0):e.push(n)},varargs:void 0,get:function(){return jt.varargs+=4,x[jt.varargs-4>>2]},getStr:function(t){return T(t)},get64:function(t,n){return t}},Pt={};function $t(t){for(;t.length;){var n=t.pop();t.pop()(n)}}function At(t){return this.fromWireType(F[t>>2])}var kt={},St={},Dt={};function Ot(t){if(void 0===t)return"_unknown";var n=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return n>=48&&n<=57?"_"+t:t}function xt(t,n){return t=Ot(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(n)}function Ft(t,n){var e=xt(n,(function(t){this.name=n,this.message=t;var e=new Error(t).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var Wt=void 0;function Et(t){throw new Wt(t)}function Mt(t,n,e){function r(n){var r=e(n);r.length!==t.length&&Et("Mismatched type converter count");for(var i=0;i<t.length;++i)Ht(t[i],r[i])}t.forEach((function(t){Dt[t]=n}));var i=new Array(n.length),a=[],o=0;n.forEach((function(t,n){St.hasOwnProperty(t)?i[n]=St[t]:(a.push(t),kt.hasOwnProperty(t)||(kt[t]=[]),kt[t].push((function(){i[n]=St[t],++o===a.length&&r(i)})))})),0===a.length&&r(i)}function Rt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var zt=void 0;function It(t){for(var n="",e=t;S[e];)n+=zt[S[e++]];return n}var Ut=void 0;function Yt(t){throw new Ut(t)}function Ht(t,n,e){if(e=e||{},!("argPackAdvance"in n))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=n.name;if(t||Yt('type "'+r+'" must have a positive integer typeid pointer'),St.hasOwnProperty(t)){if(e.ignoreDuplicateRegistrations)return;Yt("Cannot register type '"+r+"' twice")}if(St[t]=n,delete Dt[t],kt.hasOwnProperty(t)){var i=kt[t];delete kt[t],i.forEach((function(t){t()}))}}function Nt(t){if(!(this instanceof en))return!1;if(!(t instanceof en))return!1;for(var n=this.$$.ptrType.registeredClass,e=this.$$.ptr,r=t.$$.ptrType.registeredClass,i=t.$$.ptr;n.baseClass;)e=n.upcast(e),n=n.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return n===r&&e===i}function Bt(t){Yt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Vt=!1;function Lt(t){}function Gt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Kt(t){return"undefined"==typeof FinalizationGroup?(Kt=function(t){return t},t):(Vt=new FinalizationGroup((function(t){for(var n=t.next();!n.done;n=t.next()){var e=n.value;e.ptr?Gt(e):console.warn("object already deleted: "+e.ptr)}})),Lt=function(t){Vt.unregister(t.$$)},(Kt=function(t){return Vt.register(t,t.$$,t.$$),t})(t))}function qt(){if(this.$$.ptr||Bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,n=Kt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return n.$$.count.value+=1,n.$$.deleteScheduled=!1,n}function Jt(){this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Yt("Object already scheduled for deletion"),Lt(this),Gt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Zt(){return!this.$$.ptr}var Qt=void 0,Xt=[];function tn(){for(;Xt.length;){var t=Xt.pop();t.$$.deleteScheduled=!1,t.delete()}}function nn(){return this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Yt("Object already scheduled for deletion"),Xt.push(this),1===Xt.length&&Qt&&Qt(tn),this.$$.deleteScheduled=!0,this}function en(){}var rn={};function an(t,n,e){i.hasOwnProperty(t)?((void 0===e||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[e])&&Yt("Cannot register public name '"+t+"' twice"),function(t,n,e){if(void 0===t[n].overloadTable){var r=t[n];t[n]=function(){return t[n].overloadTable.hasOwnProperty(arguments.length)||Yt("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[n].overloadTable+")!"),t[n].overloadTable[arguments.length].apply(this,arguments)},t[n].overloadTable=[],t[n].overloadTable[r.argCount]=r}}(i,t,t),i.hasOwnProperty(e)&&Yt("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),i[t].overloadTable[e]=n):(i[t]=n,void 0!==e&&(i[t].numArguments=e))}function on(t,n,e,r,i,a,o,u){this.name=t,this.constructor=n,this.instancePrototype=e,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=u,this.pureVirtualFunctions=[]}function un(t,n,e){for(;n!==e;)n.upcast||Yt("Expected null or instance of "+e.name+", got an instance of "+n.name),t=n.upcast(t),n=n.baseClass;return t}function sn(t,n){if(null===n)return this.isReference&&Yt("null is not a valid "+this.name),0;n.$$||Yt('Cannot pass "'+Mn(n)+'" as a '+this.name),n.$$.ptr||Yt("Cannot pass deleted object as a pointer of type "+this.name);var e=n.$$.ptrType.registeredClass;return un(n.$$.ptr,e,this.registeredClass)}function cn(t,n){var e;if(null===n)return this.isReference&&Yt("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,e),e):0;n.$$||Yt('Cannot pass "'+Mn(n)+'" as a '+this.name),n.$$.ptr||Yt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&n.$$.ptrType.isConst&&Yt("Cannot convert argument of type "+(n.$$.smartPtrType?n.$$.smartPtrType.name:n.$$.ptrType.name)+" to parameter type "+this.name);var r=n.$$.ptrType.registeredClass;if(e=un(n.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===n.$$.smartPtr&&Yt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:n.$$.smartPtrType===this?e=n.$$.smartPtr:Yt("Cannot convert argument of type "+(n.$$.smartPtrType?n.$$.smartPtrType.name:n.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=n.$$.smartPtr;break;case 2:if(n.$$.smartPtrType===this)e=n.$$.smartPtr;else{var i=n.clone();e=this.rawShare(e,Fn((function(){i.delete()}))),null!==t&&t.push(this.rawDestructor,e)}break;default:Yt("Unsupporting sharing policy")}return e}function ln(t,n){if(null===n)return this.isReference&&Yt("null is not a valid "+this.name),0;n.$$||Yt('Cannot pass "'+Mn(n)+'" as a '+this.name),n.$$.ptr||Yt("Cannot pass deleted object as a pointer of type "+this.name),n.$$.ptrType.isConst&&Yt("Cannot convert argument of type "+n.$$.ptrType.name+" to parameter type "+this.name);var e=n.$$.ptrType.registeredClass;return un(n.$$.ptr,e,this.registeredClass)}function fn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function pn(t){this.rawDestructor&&this.rawDestructor(t)}function dn(t){null!==t&&t.delete()}function _n(){return Object.keys(mn).length}function yn(){var t=[];for(var n in mn)mn.hasOwnProperty(n)&&t.push(mn[n]);return t}function hn(t){Qt=t,Xt.length&&Qt&&Qt(tn)}var mn={};function vn(t,n){return n=function(t,n){for(void 0===n&&Yt("ptr should not be undefined");t.baseClass;)n=t.upcast(n),t=t.baseClass;return n}(t,n),mn[n]}function gn(t,n){return n.ptrType&&n.ptr||Et("makeClassHandle requires ptr and ptrType"),!!n.smartPtrType!=!!n.smartPtr&&Et("Both smartPtrType and smartPtr must be specified"),n.count={value:1},Kt(Object.create(t,{$$:{value:n}}))}function Cn(t){var n=this.getPointee(t);if(!n)return this.destructor(t),null;var e=vn(this.registeredClass,n);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=n,e.$$.smartPtr=t,e.clone();var r=e.clone();return this.destructor(t),r}function i(){return this.isSmartPointer?gn(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:n,smartPtrType:this,smartPtr:t}):gn(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,o=this.registeredClass.getActualType(n),u=rn[o];if(!u)return i.call(this);a=this.isConst?u.constPointerType:u.pointerType;var s=function t(n,e,r){if(e===r)return n;if(void 0===r.baseClass)return null;var i=t(n,e,r.baseClass);return null===i?null:r.downcast(i)}(n,this.registeredClass,a.registeredClass);return null===s?i.call(this):this.isSmartPointer?gn(a.registeredClass.instancePrototype,{ptrType:a,ptr:s,smartPtrType:this,smartPtr:t}):gn(a.registeredClass.instancePrototype,{ptrType:a,ptr:s})}function wn(t,n,e,r,i,a,o,u,s,c,l){this.name=t,this.registeredClass=n,this.isReference=e,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=l,i||void 0!==n.baseClass?this.toWireType=cn:r?(this.toWireType=sn,this.destructorFunction=null):(this.toWireType=ln,this.destructorFunction=null)}function bn(t,n,e){i.hasOwnProperty(t)||Et("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==e?i[t].overloadTable[e]=n:(i[t]=n,i[t].argCount=e)}function Tn(t,n){t=It(t);var e=function(e){for(var r=[],i=1;i<t.length;++i)r.push("a"+i);var a="return function dynCall_"+t+"_"+n+"("+r.join(", ")+") {\n";return a+=" return dynCall(rawFunction"+(r.length?", ":"")+r.join(", ")+");\n",a+="};\n",new Function("dynCall","rawFunction",a)(e,n)}(i["dynCall_"+t]);return"function"!=typeof e&&Yt("unknown function pointer with signature "+t+": "+n),e}var jn=void 0;function Pn(t){var n=se(t),e=It(n);return oe(n),e}function $n(t,n){var e=[],r={};throw n.forEach((function t(n){r[n]||St[n]||(Dt[n]?Dt[n].forEach(t):(e.push(n),r[n]=!0))})),new jn(t+": "+e.map(Pn).join([", "]))}function An(t,n,e){return t instanceof Object||Yt(e+' with invalid "this": '+t),t instanceof n.registeredClass.constructor||Yt(e+' incompatible with "this" of type '+t.constructor.name),t.$$.ptr||Yt("cannot call emscripten binding method "+e+" on deleted object"),un(t.$$.ptr,t.$$.ptrType.registeredClass,n.registeredClass)}var kn=[],Sn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Dn(t){t>4&&0==--Sn[t].refcount&&(Sn[t]=void 0,kn.push(t))}function On(){for(var t=0,n=5;n<Sn.length;++n)void 0!==Sn[n]&&++t;return t}function xn(){for(var t=5;t<Sn.length;++t)if(void 0!==Sn[t])return Sn[t];return null}function Fn(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var n=kn.length?kn.pop():Sn.length;return Sn[n]={refcount:1,value:t},n}}function Wn(t,n,e){switch(n){case 0:return function(t){var n=e?k:S;return this.fromWireType(n[t])};case 1:return function(t){var n=e?D:O;return this.fromWireType(n[t>>1])};case 2:return function(t){var n=e?x:F;return this.fromWireType(n[t>>2])};default:throw new TypeError("Unknown integer type: "+t)}}function En(t,n){var e=St[t];return void 0===e&&Yt(n+" has unknown type "+Pn(t)),e}function Mn(t){if(null===t)return"null";var n=typeof t;return"object"===n||"array"===n||"function"===n?t.toString():""+t}function Rn(t,n){switch(n){case 2:return function(t){return this.fromWireType(W[t>>2])};case 3:return function(t){return this.fromWireType(E[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function zn(t,n){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var e=xt(t.name||"unknownFunctionName",(function(){}));e.prototype=t.prototype;var r=new e,i=t.apply(r,n);return i instanceof Object?i:r}function In(t,n,e){switch(n){case 0:return e?function(t){return k[t]}:function(t){return S[t]};case 1:return e?function(t){return D[t>>1]}:function(t){return O[t>>1]};case 2:return e?function(t){return x[t>>2]}:function(t){return F[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var Un={};function Yn(t){var n=Un[t];return void 0===n?It(t):n}var Hn=[];function Nn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Bn(t){try{return h.grow(t-A.byteLength+65535>>>16),V(h.buffer),1}catch(t){}}var Vn={};function Ln(){if(!Ln.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var n in Vn)t[n]=Vn[n];var e=[];for(var n in t)e.push(n+"="+t[n]);Ln.strings=e}return Ln.strings}function Gn(t,n){!function t(){if(!t.called){t.called=!0,x[fe()>>2]=60*(new Date).getTimezoneOffset();var n=(new Date).getFullYear(),e=new Date(n,0,1),r=new Date(n,6,1);x[le()>>2]=Number(e.getTimezoneOffset()!=r.getTimezoneOffset());var i=s(e),a=s(r),o=N(i),u=N(a);r.getTimezoneOffset()<e.getTimezoneOffset()?(x[ce()>>2]=o,x[ce()+4>>2]=u):(x[ce()>>2]=u,x[ce()+4>>2]=o)}function s(t){var n=t.toTimeString().match(/\(([A-Za-z ]+)\)$/);return n?n[1]:"GMT"}}();var e=new Date(1e3*x[t>>2]);x[n>>2]=e.getSeconds(),x[n+4>>2]=e.getMinutes(),x[n+8>>2]=e.getHours(),x[n+12>>2]=e.getDate(),x[n+16>>2]=e.getMonth(),x[n+20>>2]=e.getFullYear()-1900,x[n+24>>2]=e.getDay();var r=new Date(e.getFullYear(),0,1),i=(e.getTime()-r.getTime())/864e5|0;x[n+28>>2]=i,x[n+36>>2]=-60*e.getTimezoneOffset();var a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),o=r.getTimezoneOffset(),u=0|(a!=o&&e.getTimezoneOffset()==Math.min(o,a));x[n+32>>2]=u;var s=x[ce()+(u?4:0)>>2];return x[n+40>>2]=s,n}function Kn(t){return t%4==0&&(t%100!=0||t%400==0)}function qn(t,n){for(var e=0,r=0;r<=n;e+=t[r++]);return e}P("GMT",1148192,4);var Jn=[31,29,31,30,31,30,31,31,30,31,30,31],Zn=[31,28,31,30,31,30,31,31,30,31,30,31];function Qn(t,n){for(var e=new Date(t.getTime());n>0;){var r=Kn(e.getFullYear()),i=e.getMonth(),a=(r?Jn:Zn)[i];if(!(n>a-e.getDate()))return e.setDate(e.getDate()+n),e;n-=a-e.getDate()+1,e.setDate(1),i<11?e.setMonth(i+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Xn(t,n,e,r){var i=x[r+40>>2],a={tm_sec:x[r>>2],tm_min:x[r+4>>2],tm_hour:x[r+8>>2],tm_mday:x[r+12>>2],tm_mon:x[r+16>>2],tm_year:x[r+20>>2],tm_wday:x[r+24>>2],tm_yday:x[r+28>>2],tm_isdst:x[r+32>>2],tm_gmtoff:x[r+36>>2],tm_zone:i?T(i):""},o=T(e),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var s in u)o=o.replace(new RegExp(s,"g"),u[s]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(t,n,e){for(var r="number"==typeof t?t.toString():t||"";r.length<n;)r=e[0]+r;return r}function p(t,n){return f(t,n,"0")}function d(t,n){function e(t){return t<0?-1:t>0?1:0}var r;return 0===(r=e(t.getFullYear()-n.getFullYear()))&&0===(r=e(t.getMonth()-n.getMonth()))&&(r=e(t.getDate()-n.getDate())),r}function _(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function y(t){var n=Qn(new Date(t.tm_year+1900,0,1),t.tm_yday),e=new Date(n.getFullYear(),0,4),r=new Date(n.getFullYear()+1,0,4),i=_(e),a=_(r);return d(i,n)<=0?d(a,n)<=0?n.getFullYear()+1:n.getFullYear():n.getFullYear()-1}var h={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return l[t.tm_mon].substring(0,3)},"%B":function(t){return l[t.tm_mon]},"%C":function(t){return p((t.tm_year+1900)/100|0,2)},"%d":function(t){return p(t.tm_mday,2)},"%e":function(t){return f(t.tm_mday,2," ")},"%g":function(t){return y(t).toString().substring(2)},"%G":function(t){return y(t)},"%H":function(t){return p(t.tm_hour,2)},"%I":function(t){var n=t.tm_hour;return 0==n?n=12:n>12&&(n-=12),p(n,2)},"%j":function(t){return p(t.tm_mday+qn(Kn(t.tm_year+1900)?Jn:Zn,t.tm_mon-1),3)},"%m":function(t){return p(t.tm_mon+1,2)},"%M":function(t){return p(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return p(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var n=new Date(t.tm_year+1900,0,1),e=0===n.getDay()?n:Qn(n,7-n.getDay()),r=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(d(e,r)<0){var i=qn(Kn(r.getFullYear())?Jn:Zn,r.getMonth()-1)-31,a=31-e.getDate()+i+r.getDate();return p(Math.ceil(a/7),2)}return 0===d(e,n)?"01":"00"},"%V":function(t){var n,e=new Date(t.tm_year+1900,0,4),r=new Date(t.tm_year+1901,0,4),i=_(e),a=_(r),o=Qn(new Date(t.tm_year+1900,0,1),t.tm_yday);return d(o,i)<0?"53":d(a,o)<=0?"01":(n=i.getFullYear()<t.tm_year+1900?t.tm_yday+32-i.getDate():t.tm_yday+1-i.getDate(),p(Math.ceil(n/7),2))},"%w":function(t){return t.tm_wday},"%W":function(t){var n=new Date(t.tm_year,0,1),e=1===n.getDay()?n:Qn(n,0===n.getDay()?1:7-n.getDay()+1),r=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(d(e,r)<0){var i=qn(Kn(r.getFullYear())?Jn:Zn,r.getMonth()-1)-31,a=31-e.getDate()+i+r.getDate();return p(Math.ceil(a/7),2)}return 0===d(e,n)?"01":"00"},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var n=t.tm_gmtoff,e=n>=0;return n=(n=Math.abs(n)/60)/60*100+n%60,(e?"+":"-")+String("0000"+n).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var s in h)o.indexOf(s)>=0&&(o=o.replace(new RegExp(s,"g"),h[s](a)));var m,v,g,C,w,b,P=(m=o,v=!1,C=g>0?g:$(m)+1,w=new Array(C),b=j(m,w,0,w.length),v&&(w.length=b),w);return P.length>n?0:(B(P,t),P.length-1)}var te=[];Wt=i.InternalError=Ft(Error,"InternalError"),function(){for(var t=new Array(256),n=0;n<256;++n)t[n]=String.fromCharCode(n);zt=t}(),Ut=i.BindingError=Ft(Error,"BindingError"),en.prototype.isAliasOf=Nt,en.prototype.clone=qt,en.prototype.delete=Jt,en.prototype.isDeleted=Zt,en.prototype.deleteLater=nn,wn.prototype.getPointee=fn,wn.prototype.destructor=pn,wn.prototype.argPackAdvance=8,wn.prototype.readValueFromPointer=At,wn.prototype.deleteObject=dn,wn.prototype.fromWireType=Cn,i.getInheritedInstanceCount=_n,i.getLiveInheritedInstances=yn,i.flushPendingDeletes=tn,i.setDelayFunction=hn,jn=i.UnboundTypeError=Ft(Error,"UnboundTypeError"),i.count_emval_handles=On,i.get_first_emval=xn;var ne,ee={__clock_gettime:function(t,n){return lt(t,n)},__cxa_allocate_exception:function(t){return ae(t+ht)+ht},__cxa_atexit:function(t,n){},__cxa_begin_catch:function(t){var n=new gt(t),e=n.get_exception_info();return e.get_caught()||(e.set_caught(!0),wt.uncaught_exceptions--),e.set_rethrown(!1),Ct.push(n),function(t){t.add_ref()}(e),n.get_exception_ptr()},__cxa_end_catch:function(){pe(0);var t=Ct.pop();!function(t){if(t.release_ref()&&!t.get_rethrown()){var n=t.get_destructor();n&&i.dynCall_ii(n,t.excPtr),Tt(t.excPtr)}}(t.get_exception_info()),t.free(),bt=0},__cxa_find_matching_catch_2:function(){var t=bt;if(!t)return 0|(v(0),0);var n=new vt(t),e=n.get_type(),r=new gt;if(r.set_base_ptr(t),!e)return 0|(v(0),r.ptr);var i=Array.prototype.slice.call(arguments),a=1148288;x[a>>2]=t;for(var o=0;o<i.length;o++){var u=i[o];if(0===u||u===e)break;if(___cxa_can_catch(u,e,a)){var s=x[a>>2];return t!==s&&r.set_adjusted_ptr(s),0|(v(u),r.ptr)}}return 0|(v(e),r.ptr)},__cxa_find_matching_catch_3:function(){var t=bt;if(!t)return 0|(v(0),0);var n=new vt(t),e=n.get_type(),r=new gt;if(r.set_base_ptr(t),!e)return 0|(v(0),r.ptr);var i=Array.prototype.slice.call(arguments),a=1148288;x[a>>2]=t;for(var o=0;o<i.length;o++){var u=i[o];if(0===u||u===e)break;if(___cxa_can_catch(u,e,a)){var s=x[a>>2];return t!==s&&r.set_adjusted_ptr(s),0|(v(u),r.ptr)}}return 0|(v(e),r.ptr)},__cxa_free_exception:Tt,__cxa_rethrow:function(){var t=Ct.pop(),n=t.get_exception_info(),e=t.get_base_ptr();throw n.get_rethrown()?t.free():(Ct.push(t),n.set_rethrown(!0)),bt=e,e},__cxa_throw:function(t,n,e){throw new vt(t).init(n,e),bt=t,"uncaught_exception"in wt?wt.uncaught_exceptions++:wt.uncaught_exceptions=1,t},__cxa_uncaught_exceptions:function(){return wt.uncaught_exceptions},__map_file:function(t,n){return ct(63),-1},__resumeException:function(t){var n=new gt(t),e=n.get_base_ptr();throw bt||(bt=e),n.free(),e},__sys__newselect:function(t,n,e,r,i){},__sys_fcntl64:function(t,n,e){return jt.varargs=e,0},__sys_fstat64:function(t,n){},__sys_getpid:function(){return 42},__sys_getuid32:function(){return 0},__sys_ioctl:function(t,n,e){return jt.varargs=e,0},__sys_mmap2:function(t,n,e,r,i,a){return function(t,n,e,r,i,a){var o;a<<=12;var u=!1;return 0!=(16&r)&&t%16384!=0?-28:0==(32&r)?-52:(o=ye(16384,n))?(ie(o,0,n),u=!0,jt.mappings[o]={malloc:o,len:n,allocated:u,fd:i,prot:e,flags:r,offset:a},o):-48}(t,n,e,r,i,a)},__sys_munmap:function(t,n){return function(t,n){if(-1==(0|t)||0===n)return-28;var e=jt.mappings[t];return e?(n===e.len&&(jt.mappings[t]=null,e.allocated&&oe(e.malloc)),0):0}(t,n)},__sys_open:function(t,n,e){jt.varargs=e},__sys_read:function(t,n,e){},__sys_rmdir:function(t){},__sys_stat64:function(t,n){},__sys_unlink:function(t){},_embind_finalize_value_object:function(t){var n=Pt[t];delete Pt[t];var e=n.rawConstructor,r=n.rawDestructor,i=n.fields;Mt([t],i.map((function(t){return t.getterReturnType})).concat(i.map((function(t){return t.setterArgumentType}))),(function(t){var a={};return i.forEach((function(n,e){var r=n.fieldName,o=t[e],u=n.getter,s=n.getterContext,c=t[e+i.length],l=n.setter,f=n.setterContext;a[r]={read:function(t){return o.fromWireType(u(s,t))},write:function(t,n){var e=[];l(f,t,c.toWireType(e,n)),$t(e)}}})),[{name:n.name,fromWireType:function(t){var n={};for(var e in a)n[e]=a[e].read(t);return r(t),n},toWireType:function(t,n){for(var i in a)if(!(i in n))throw new TypeError('Missing field: "'+i+'"');var o=e();for(i in a)a[i].write(o,n[i]);return null!==t&&t.push(r,o),o},argPackAdvance:8,readValueFromPointer:At,destructorFunction:r}]}))},_embind_register_bool:function(t,n,e,r,i){var a=Rt(e);Ht(t,{name:n=It(n),fromWireType:function(t){return!!t},toWireType:function(t,n){return n?r:i},argPackAdvance:8,readValueFromPointer:function(t){var r;if(1===e)r=k;else if(2===e)r=D;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+n);r=x}return this.fromWireType(r[t>>a])},destructorFunction:null})},_embind_register_class:function(t,n,e,r,i,a,o,u,s,c,l,f,p){l=It(l),a=Tn(i,a),u&&(u=Tn(o,u)),c&&(c=Tn(s,c)),p=Tn(f,p);var d=Ot(l);an(d,(function(){$n("Cannot construct "+l+" due to unbound types",[r])})),Mt([t,n,e],r?[r]:[],(function(n){var e,i;n=n[0],i=r?(e=n.registeredClass).instancePrototype:en.prototype;var o=xt(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Ut("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Ut(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new Ut("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),s=Object.create(i,{constructor:{value:o}});o.prototype=s;var f=new on(l,o,s,p,e,a,u,c),_=new wn(l,f,!0,!1,!1),y=new wn(l+"*",f,!1,!1,!1),h=new wn(l+" const*",f,!1,!0,!1);return rn[t]={pointerType:y,constPointerType:h},bn(d,o),[_,y,h]}))},_embind_register_class_property:function(t,n,e,r,i,a,o,u,s,c){n=It(n),i=Tn(r,i),Mt([],[t],(function(t){var r=(t=t[0]).name+"."+n,l={get:function(){$n("Cannot access "+r+" due to unbound types",[e,o])},enumerable:!0,configurable:!0};return l.set=s?function(){$n("Cannot access "+r+" due to unbound types",[e,o])}:function(t){Yt(r+" is a read-only property")},Object.defineProperty(t.registeredClass.instancePrototype,n,l),Mt([],s?[e,o]:[e],(function(e){var o=e[0],l={get:function(){var n=An(this,t,r+" getter");return o.fromWireType(i(a,n))},enumerable:!0};if(s){s=Tn(u,s);var f=e[1];l.set=function(n){var e=An(this,t,r+" setter"),i=[];s(c,e,f.toWireType(i,n)),$t(i)}}return Object.defineProperty(t.registeredClass.instancePrototype,n,l),[]})),[]}))},_embind_register_emval:function(t,n){Ht(t,{name:n=It(n),fromWireType:function(t){var n=Sn[t].value;return Dn(t),n},toWireType:function(t,n){return Fn(n)},argPackAdvance:8,readValueFromPointer:At,destructorFunction:null})},_embind_register_enum:function(t,n,e,r){var i=Rt(e);function a(){}n=It(n),a.values={},Ht(t,{name:n,constructor:a,fromWireType:function(t){return this.constructor.values[t]},toWireType:function(t,n){return n.value},argPackAdvance:8,readValueFromPointer:Wn(n,i,r),destructorFunction:null}),an(n,a)},_embind_register_enum_value:function(t,n,e){var r=En(t,"enum");n=It(n);var i=r.constructor,a=Object.create(r.constructor.prototype,{value:{value:e},constructor:{value:xt(r.name+"_"+n,(function(){}))}});i.values[e]=a,i[n]=a},_embind_register_float:function(t,n,e){var r=Rt(e);Ht(t,{name:n=It(n),fromWireType:function(t){return t},toWireType:function(t,n){if("number"!=typeof n&&"boolean"!=typeof n)throw new TypeError('Cannot convert "'+Mn(n)+'" to '+this.name);return n},argPackAdvance:8,readValueFromPointer:Rn(n,r),destructorFunction:null})},_embind_register_function:function(t,n,e,r,i,a){var o=function(t,n){for(var e=[],r=0;r<t;r++)e.push(x[(n>>2)+r]);return e}(n,e);t=It(t),i=Tn(r,i),an(t,(function(){$n("Cannot call "+t+" due to unbound types",o)}),n-1),Mt([],o,(function(e){var r=[e[0],null].concat(e.slice(1));return bn(t,function(t,n,e,r,i){var a=n.length;a<2&&Yt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==n[1]&&null!==e,u=!1,s=1;s<n.length;++s)if(null!==n[s]&&void 0===n[s].destructorFunction){u=!0;break}var c="void"!==n[0].name,l="",f="";for(s=0;s<a-2;++s)l+=(0!==s?", ":"")+"arg"+s,f+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+Ot(t)+"("+l+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",_=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[Yt,r,i,$t,n[0],n[1]];for(o&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),s=0;s<a-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+n[s+2].name+"\n",_.push("argType"+s),y.push(n[s+2]);if(o&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)p+="runDestructors(destructors);\n";else for(s=o?1:2;s<n.length;++s){var h=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==n[s].destructorFunction&&(p+=h+"_dtor("+h+"); // "+n[s].name+"\n",_.push(h+"_dtor"),y.push(n[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",_.push(p),zn(Function,_).apply(null,y)}(t,r,null,i,a),n-1),[]}))},_embind_register_integer:function(t,n,e,r,i){n=It(n),-1===i&&(i=4294967295);var a=Rt(e),o=function(t){return t};if(0===r){var u=32-8*e;o=function(t){return t<<u>>>u}}var s=-1!=n.indexOf("unsigned");Ht(t,{name:n,fromWireType:o,toWireType:function(t,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+Mn(e)+'" to '+this.name);if(e<r||e>i)throw new TypeError('Passing a number "'+Mn(e)+'" from JS side to C/C++ side to an argument of type "'+n+'", which is outside the valid range ['+r+", "+i+"]!");return s?e>>>0:0|e},argPackAdvance:8,readValueFromPointer:In(n,a,0!==r),destructorFunction:null})},_embind_register_memory_view:function(t,n,e){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][n];function i(t){var n=F,e=n[t>>=2],i=n[t+1];return new r(A,i,e)}Ht(t,{name:e=It(e),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(t,n){var e="std::string"===(n=It(n));Ht(t,{name:n,fromWireType:function(t){var n,r=F[t>>2];if(e)for(var i=t+4,a=0;a<=r;++a){var o=t+4+a;if(a==r||0==S[o]){var u=T(i,o-i);void 0===n?n=u:(n+=String.fromCharCode(0),n+=u),i=o+1}}else{var s=new Array(r);for(a=0;a<r;++a)s[a]=String.fromCharCode(S[t+4+a]);n=s.join("")}return oe(t),n},toWireType:function(t,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var r="string"==typeof n;r||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Int8Array||Yt("Cannot pass non-string to std::string");var i=(e&&r?function(){return $(n)}:function(){return n.length})(),a=ae(4+i+1);if(F[a>>2]=i,e&&r)P(n,a+4,i+1);else if(r)for(var o=0;o<i;++o){var u=n.charCodeAt(o);u>255&&(oe(a),Yt("String has UTF-16 code units that do not fit in 8 bits")),S[a+4+o]=u}else for(o=0;o<i;++o)S[a+4+o]=n[o];return null!==t&&t.push(oe,a),a},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(t){oe(t)}})},_embind_register_std_wstring:function(t,n,e){var r,i,a,o,u;e=It(e),2===n?(r=R,i=z,o=I,a=function(){return O},u=1):4===n&&(r=U,i=Y,o=H,a=function(){return F},u=2),Ht(t,{name:e,fromWireType:function(t){for(var e,i=F[t>>2],o=a(),s=t+4,c=0;c<=i;++c){var l=t+4+c*n;if(c==i||0==o[l>>u]){var f=r(s,l-s);void 0===e?e=f:(e+=String.fromCharCode(0),e+=f),s=l+n}}return oe(t),e},toWireType:function(t,r){"string"!=typeof r&&Yt("Cannot pass non-string to C++ string type "+e);var a=o(r),s=ae(4+a+n);return F[s>>2]=a>>u,i(r,s+4,a+n),null!==t&&t.push(oe,s),s},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(t){oe(t)}})},_embind_register_value_object:function(t,n,e,r,i,a){Pt[t]={name:It(n),rawConstructor:Tn(e,r),rawDestructor:Tn(i,a),fields:[]}},_embind_register_value_object_field:function(t,n,e,r,i,a,o,u,s,c){Pt[t].fields.push({fieldName:It(n),getterReturnType:e,getter:Tn(r,i),getterContext:a,setterArgumentType:o,setter:Tn(u,s),setterContext:c})},_embind_register_void:function(t,n){Ht(t,{isVoid:!0,name:n=It(n),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,n){}})},_emval_call_method:function(t,n,e,r,i){return(t=Hn[t])(n=function(t){return t||Yt("Cannot use deleted val. handle = "+t),Sn[t].value}(n),e=Yn(e),function(t){var n=[];return x[t>>2]=Fn(n),n}(r),i)},_emval_decref:Dn,_emval_get_global:function(t){return 0===t?Fn(Nn()):(t=Yn(t),Fn(Nn()[t]))},_emval_get_method_caller:function(t,n){for(var e=function(t,n){for(var e=new Array(t),r=0;r<t;++r)e[r]=En(x[(n>>2)+r],"parameter "+r);return e}(t,n),r=e[0],i=r.name+"_$"+e.slice(1).map((function(t){return t.name})).join("_")+"$",a=["retType"],o=[r],u="",s=0;s<t-1;++s)u+=(0!==s?", ":"")+"arg"+s,a.push("argType"+s),o.push(e[1+s]);var c="return function "+Ot("methodCaller_"+i)+"(handle, name, destructors, args) {\n",l=0;for(s=0;s<t-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=e[s+1].argPackAdvance;for(c+=" var rv = handle[name]("+u+");\n",s=0;s<t-1;++s)e[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");r.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",a.push(c);var f,p,d=zn(Function,a).apply(null,o);return f=d,p=Hn.length,Hn.push(f),p},_emval_incref:function(t){t>4&&(Sn[t].refcount+=1)},_emval_run_destructors:function(t){$t(Sn[t].value),Dn(t)},_emval_take_value:function(t,n){return Fn((t=En(t,"_emval_take_value")).readValueFromPointer(n))},abort:function(){et()},atexit:mt,clock:function t(){return void 0===t.start&&(t.start=Date.now()),1e3*(Date.now()-t.start)|0},clock_gettime:lt,emscripten_asm_const_iii:function(t,n,e){var r=function(t,n){var e;for(te.length=0,n>>=2;e=S[t++];){var r=e<105;r&&1&n&&n++,te.push(r?E[n++>>1]:x[n]),++n}return te}(n,e);return st[t].apply(null,r)},emscripten_get_sbrk_ptr:function(){return 1148128},emscripten_longjmp:function(t,n){!function(t,n){throw pe(t,n||1),"longjmp"}(t,n)},emscripten_memcpy_big:function(t,n,e){S.copyWithin(t,n,n+e)},emscripten_resize_heap:function(t){t>>>=0;var n=S.length;if(t>2147483648)return!1;for(var e,r,i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Bn(Math.min(2147483648,((e=Math.max(16777216,t,a))%(r=65536)>0&&(e+=r-e%r),e))))return!0}return!1},environ_get:function(t,n){var e=0;return Ln().forEach((function(r,i){var a=n+e;x[t+4*i>>2]=a,function(t,n,e){for(var r=0;r<t.length;++r)k[n++>>0]=t.charCodeAt(r);e||(k[n>>0]=0)}(r,a),e+=r.length+1})),0},environ_sizes_get:function(t,n){var e=Ln();x[t>>2]=e.length;var r=0;return e.forEach((function(t){r+=t.length+1})),x[n>>2]=r,0},exit:function(t){!function(t,n){n&&y&&0===t||(y||(C=!0,i.onExit&&i.onExit(t)),l(t,new Ve(t)))}(t)},fd_close:function(t){return 0},fd_fdstat_get:function(t,n){var e=1==t||2==t?2:et();return k[n>>0]=e,0},fd_read:function(t,n,e,r){var i=jt.getStreamFromFD(t),a=jt.doReadv(i,n,e);return x[r>>2]=a,0},fd_seek:function(t,n,e,r,i){},fd_write:function(t,n,e,r){for(var i=0,a=0;a<e;a++){for(var o=x[n+8*a>>2],u=x[n+(8*a+4)>>2],s=0;s<u;s++)jt.printChar(t,S[o+s]);i+=u}return x[r>>2]=i,0},getSelf:function(){return N(location.toString())},getTempRet0:function(){return 0|m},gettimeofday:function(t){var n=Date.now();return x[t>>2]=n/1e3|0,x[t+4>>2]=n%1e3*1e3|0,0},initializeOpenGL:function(){return N((t=Je,self[t("0x0","BMvb")][t("0x1","l9)M")]()));var t},invoke_diii:function(t,n,e,r){var i=de();try{return Be(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_fiii:function(t,n,e,r){var i=de();try{return Ne(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_i:function(t){var n=de();try{return ke(t)}catch(t){if(_e(n),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_ii:function(t,n){var e=de();try{return Se(t,n)}catch(t){if(_e(e),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iii:function(t,n,e){var r=de();try{return De(t,n,e)}catch(t){if(_e(r),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiii:function(t,n,e,r){var i=de();try{return Oe(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiii:function(t,n,e,r,i){var a=de();try{return xe(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiid:function(t,n,e,r,i,a){var o=de();try{return Ue(t,n,e,r,i,a)}catch(t){if(_e(o),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiii:function(t,n,e,r,i,a){var o=de();try{return Fe(t,n,e,r,i,a)}catch(t){if(_e(o),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiii:function(t,n,e,r,i,a,o){var u=de();try{return We(t,n,e,r,i,a,o)}catch(t){if(_e(u),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiii:function(t,n,e,r,i,a,o,u){var s=de();try{return Ee(t,n,e,r,i,a,o,u)}catch(t){if(_e(s),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c){var l=de();try{return Me(t,n,e,r,i,a,o,u,s,c)}catch(t){if(_e(l),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l){var f=de();try{return Re(t,n,e,r,i,a,o,u,s,c,l)}catch(t){if(_e(f),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l,f){var p=de();try{return ze(t,n,e,r,i,a,o,u,s,c,l,f)}catch(t){if(_e(p),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_iiiiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l,f,p){var d=de();try{return Ie(t,n,e,r,i,a,o,u,s,c,l,f,p)}catch(t){if(_e(d),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_jii:function(t,n,e){var r=de();try{return Ye(t,n,e)}catch(t){if(_e(r),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_jiiii:function(t,n,e,r,i){var a=de();try{return He(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_v:function(t){var n=de();try{he(t)}catch(t){if(_e(n),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_vi:function(t,n){var e=de();try{me(t,n)}catch(t){if(_e(e),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_vii:function(t,n,e){var r=de();try{ve(t,n,e)}catch(t){if(_e(r),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viidd:function(t,n,e,r,i){var a=de();try{Ae(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viii:function(t,n,e,r){var i=de();try{ge(t,n,e,r)}catch(t){if(_e(i),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiii:function(t,n,e,r,i){var a=de();try{Ce(t,n,e,r,i)}catch(t){if(_e(a),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiii:function(t,n,e,r,i,a){var o=de();try{we(t,n,e,r,i,a)}catch(t){if(_e(o),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiii:function(t,n,e,r,i,a,o){var u=de();try{be(t,n,e,r,i,a,o)}catch(t){if(_e(u),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiii:function(t,n,e,r,i,a,o,u){var s=de();try{Te(t,n,e,r,i,a,o,u)}catch(t){if(_e(s),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiiiii:function(t,n,e,r,i,a,o,u,s,c){var l=de();try{je(t,n,e,r,i,a,o,u,s,c)}catch(t){if(_e(l),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l){var f=de();try{Pe(t,n,e,r,i,a,o,u,s,c,l)}catch(t){if(_e(f),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},invoke_viiiiiiiiiiiiiii:function(t,n,e,r,i,a,o,u,s,c,l,f,p,d,_,y){var h=de();try{$e(t,n,e,r,i,a,o,u,s,c,l,f,p,d,_,y)}catch(t){if(_e(h),t!==t+0&&"longjmp"!==t)throw t;pe(1,0)}},localtime:function(t){return Gn(t,1148144)},memory:h,pthread_mutexattr_destroy:function(){},pthread_mutexattr_init:function(){},pthread_mutexattr_settype:function(){},setTempRet0:function(t){v(0|t)},strftime:Xn,strftime_l:function(t,n,e,r){return Xn(t,n,e,r)},sysconf:function(t){switch(t){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ct(28),-1},table:g,time:function(t){var n=Date.now()/1e3|0;return t&&(x[t>>2]=n),n}},re=(function(){var t={env:ee,wasi_snapshot_preview1:ee};function n(t,n){var e=t.exports;i.asm=e,function(t){if(X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),0==X&&(null!==tt&&(clearInterval(tt),tt=null),nt)){var n=nt;nt=null,n()}}()}function e(t){n(t.instance)}function r(n){return(_||"function"!=typeof fetch?new Promise((function(t,n){t(ot())})):fetch(at,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+at+"'";return t.arrayBuffer()})).catch((function(){return ot()}))).then((function(n){return WebAssembly.instantiate(n,t)})).then(n,(function(t){d("failed to asynchronously prepare wasm: "+t),et(t)}))}if(X++,i.monitorRunDependencies&&i.monitorRunDependencies(X),i.instantiateWasm)try{return i.instantiateWasm(t,n)}catch(t){return d("Module.instantiateWasm callback failed with error: "+t),!1}!function(){if(_||"function"!=typeof WebAssembly.instantiateStreaming||rt(at)||"function"!=typeof fetch)return r(e);fetch(at,{credentials:"same-origin"}).then((function(n){return WebAssembly.instantiateStreaming(n,t).then(e,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),r(e)}))}))}()}(),i.___wasm_call_ctors=function(){return(re=i.___wasm_call_ctors=i.asm.__wasm_call_ctors).apply(null,arguments)}),ie=i._memset=function(){return(ie=i._memset=i.asm.memset).apply(null,arguments)},ae=i._malloc=function(){return(ae=i._malloc=i.asm.malloc).apply(null,arguments)},oe=i._free=function(){return(oe=i._free=i.asm.free).apply(null,arguments)},ue=(i.___em_js__getSelf=function(){return(i.___em_js__getSelf=i.asm.__em_js__getSelf).apply(null,arguments)},i.___em_js__initializeOpenGL=function(){return(i.___em_js__initializeOpenGL=i.asm.__em_js__initializeOpenGL).apply(null,arguments)},i.___errno_location=function(){return(ue=i.___errno_location=i.asm.__errno_location).apply(null,arguments)}),se=(i._testSetjmp=function(){return(i._testSetjmp=i.asm.testSetjmp).apply(null,arguments)},i._saveSetjmp=function(){return(i._saveSetjmp=i.asm.saveSetjmp).apply(null,arguments)},i._realloc=function(){return(i._realloc=i.asm.realloc).apply(null,arguments)},i.___getTypeName=function(){return(se=i.___getTypeName=i.asm.__getTypeName).apply(null,arguments)}),ce=(i.___embind_register_native_and_builtin_types=function(){return(i.___embind_register_native_and_builtin_types=i.asm.__embind_register_native_and_builtin_types).apply(null,arguments)},i.__get_tzname=function(){return(ce=i.__get_tzname=i.asm._get_tzname).apply(null,arguments)}),le=i.__get_daylight=function(){return(le=i.__get_daylight=i.asm._get_daylight).apply(null,arguments)},fe=i.__get_timezone=function(){return(fe=i.__get_timezone=i.asm._get_timezone).apply(null,arguments)},pe=i._setThrew=function(){return(pe=i._setThrew=i.asm.setThrew).apply(null,arguments)},de=i.stackSave=function(){return(de=i.stackSave=i.asm.stackSave).apply(null,arguments)},_e=i.stackRestore=function(){return(_e=i.stackRestore=i.asm.stackRestore).apply(null,arguments)},ye=(i.stackAlloc=function(){return(i.stackAlloc=i.asm.stackAlloc).apply(null,arguments)},i._memalign=function(){return(ye=i._memalign=i.asm.memalign).apply(null,arguments)}),he=i.dynCall_v=function(){return(he=i.dynCall_v=i.asm.dynCall_v).apply(null,arguments)},me=i.dynCall_vi=function(){return(me=i.dynCall_vi=i.asm.dynCall_vi).apply(null,arguments)},ve=i.dynCall_vii=function(){return(ve=i.dynCall_vii=i.asm.dynCall_vii).apply(null,arguments)},ge=i.dynCall_viii=function(){return(ge=i.dynCall_viii=i.asm.dynCall_viii).apply(null,arguments)},Ce=i.dynCall_viiii=function(){return(Ce=i.dynCall_viiii=i.asm.dynCall_viiii).apply(null,arguments)},we=i.dynCall_viiiii=function(){return(we=i.dynCall_viiiii=i.asm.dynCall_viiiii).apply(null,arguments)},be=i.dynCall_viiiiii=function(){return(be=i.dynCall_viiiiii=i.asm.dynCall_viiiiii).apply(null,arguments)},Te=i.dynCall_viiiiiii=function(){return(Te=i.dynCall_viiiiiii=i.asm.dynCall_viiiiiii).apply(null,arguments)},je=i.dynCall_viiiiiiiii=function(){return(je=i.dynCall_viiiiiiiii=i.asm.dynCall_viiiiiiiii).apply(null,arguments)},Pe=i.dynCall_viiiiiiiiii=function(){return(Pe=i.dynCall_viiiiiiiiii=i.asm.dynCall_viiiiiiiiii).apply(null,arguments)},$e=i.dynCall_viiiiiiiiiiiiiii=function(){return($e=i.dynCall_viiiiiiiiiiiiiii=i.asm.dynCall_viiiiiiiiiiiiiii).apply(null,arguments)},Ae=i.dynCall_viidd=function(){return(Ae=i.dynCall_viidd=i.asm.dynCall_viidd).apply(null,arguments)},ke=i.dynCall_i=function(){return(ke=i.dynCall_i=i.asm.dynCall_i).apply(null,arguments)},Se=i.dynCall_ii=function(){return(Se=i.dynCall_ii=i.asm.dynCall_ii).apply(null,arguments)},De=i.dynCall_iii=function(){return(De=i.dynCall_iii=i.asm.dynCall_iii).apply(null,arguments)},Oe=i.dynCall_iiii=function(){return(Oe=i.dynCall_iiii=i.asm.dynCall_iiii).apply(null,arguments)},xe=i.dynCall_iiiii=function(){return(xe=i.dynCall_iiiii=i.asm.dynCall_iiiii).apply(null,arguments)},Fe=i.dynCall_iiiiii=function(){return(Fe=i.dynCall_iiiiii=i.asm.dynCall_iiiiii).apply(null,arguments)},We=i.dynCall_iiiiiii=function(){return(We=i.dynCall_iiiiiii=i.asm.dynCall_iiiiiii).apply(null,arguments)},Ee=i.dynCall_iiiiiiii=function(){return(Ee=i.dynCall_iiiiiiii=i.asm.dynCall_iiiiiiii).apply(null,arguments)},Me=i.dynCall_iiiiiiiiii=function(){return(Me=i.dynCall_iiiiiiiiii=i.asm.dynCall_iiiiiiiiii).apply(null,arguments)},Re=i.dynCall_iiiiiiiiiii=function(){return(Re=i.dynCall_iiiiiiiiiii=i.asm.dynCall_iiiiiiiiiii).apply(null,arguments)},ze=i.dynCall_iiiiiiiiiiii=function(){return(ze=i.dynCall_iiiiiiiiiiii=i.asm.dynCall_iiiiiiiiiiii).apply(null,arguments)},Ie=i.dynCall_iiiiiiiiiiiii=function(){return(Ie=i.dynCall_iiiiiiiiiiiii=i.asm.dynCall_iiiiiiiiiiiii).apply(null,arguments)},Ue=i.dynCall_iiiiid=function(){return(Ue=i.dynCall_iiiiid=i.asm.dynCall_iiiiid).apply(null,arguments)},Ye=i.dynCall_jii=function(){return(Ye=i.dynCall_jii=i.asm.dynCall_jii).apply(null,arguments)},He=i.dynCall_jiiii=function(){return(He=i.dynCall_jiiii=i.asm.dynCall_jiiii).apply(null,arguments)},Ne=i.dynCall_fiii=function(){return(Ne=i.dynCall_fiii=i.asm.dynCall_fiii).apply(null,arguments)},Be=i.dynCall_diii=function(){return(Be=i.dynCall_diii=i.asm.dynCall_diii).apply(null,arguments)};function Ve(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Le(t){function e(){ne||(ne=!0,i.calledRun=!0,C||(K(J),K(Z),n(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),Q.unshift(t);var t;K(Q)}()))}t=t||s,X>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),q.unshift(t);var t;K(q)}(),X>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viijii=function(){return(i.dynCall_viijii=i.asm.dynCall_viijii).apply(null,arguments)},i.dynCall_iiddd=function(){return(i.dynCall_iiddd=i.asm.dynCall_iiddd).apply(null,arguments)},i.dynCall_iidid=function(){return(i.dynCall_iidid=i.asm.dynCall_iidid).apply(null,arguments)},i.dynCall_viiiidd=function(){return(i.dynCall_viiiidd=i.asm.dynCall_viiiidd).apply(null,arguments)},i.dynCall_iiiiidd=function(){return(i.dynCall_iiiiidd=i.asm.dynCall_iiiiidd).apply(null,arguments)},i.dynCall_viiiiiiii=function(){return(i.dynCall_viiiiiiii=i.asm.dynCall_viiiiiiii).apply(null,arguments)},i.dynCall_viiiiiiiiidd=function(){return(i.dynCall_viiiiiiiiidd=i.asm.dynCall_viiiiiiiiidd).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.dynCall_jiji).apply(null,arguments)},i.dynCall_ji=function(){return(i.dynCall_ji=i.asm.dynCall_ji).apply(null,arguments)},i.dynCall_viiiiiiiddi=function(){return(i.dynCall_viiiiiiiddi=i.asm.dynCall_viiiiiiiddi).apply(null,arguments)},i.dynCall_viiiiiiiiiiddi=function(){return(i.dynCall_viiiiiiiiiiddi=i.asm.dynCall_viiiiiiiiiiddi).apply(null,arguments)},i.dynCall_viiid=function(){return(i.dynCall_viiid=i.asm.dynCall_viiid).apply(null,arguments)},i.dynCall_iiiiiiiii=function(){return(i.dynCall_iiiiiiiii=i.asm.dynCall_iiiiiiiii).apply(null,arguments)},i.dynCall_viiiid=function(){return(i.dynCall_viiiid=i.asm.dynCall_viiiid).apply(null,arguments)},i.dynCall_viidi=function(){return(i.dynCall_viidi=i.asm.dynCall_viidi).apply(null,arguments)},i.dynCall_vidii=function(){return(i.dynCall_vidii=i.asm.dynCall_vidii).apply(null,arguments)},i.dynCall_viiiiiiiiiiii=function(){return(i.dynCall_viiiiiiiiiiii=i.asm.dynCall_viiiiiiiiiiii).apply(null,arguments)},i.dynCall_viij=function(){return(i.dynCall_viij=i.asm.dynCall_viij).apply(null,arguments)},i.dynCall_iiid=function(){return(i.dynCall_iiid=i.asm.dynCall_iiid).apply(null,arguments)},i.dynCall_iidiiii=function(){return(i.dynCall_iidiiii=i.asm.dynCall_iidiiii).apply(null,arguments)},i.dynCall_iiiiij=function(){return(i.dynCall_iiiiij=i.asm.dynCall_iiiiij).apply(null,arguments)},i.dynCall_iiiiijj=function(){return(i.dynCall_iiiiijj=i.asm.dynCall_iiiiijj).apply(null,arguments)},i.dynCall_iiiiiijj=function(){return(i.dynCall_iiiiiijj=i.asm.dynCall_iiiiiijj).apply(null,arguments)},i.__growWasmMemory=function(){return(i.__growWasmMemory=i.asm.__growWasmMemory).apply(null,arguments)},i.UTF8ToString=T,i.stringToUTF8=P,i.lengthBytesUTF8=$,i.allocateUTF8=N,nt=function t(){ne||Le(),ne||(nt=t)},i.run=Le,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();y=!0,Le();var Ge,Ke,qe=["mYxdMmoUhSkoW7y+","xCoDCvRdSSo2iIa="];Ge=qe,Ke=468,function(t){for(;--t;)Ge.push(Ge.shift())}(++Ke);var ighnua,Je=function(t,n){var e=qe[t-=0];void 0===Je.yKMuWw&&(Je.pOPNMQ=function(t,n){for(var e,r,i=[],a=0,o="",u="",s=0,c=(t=function(t){for(var n,e,r=String(t).replace(/=+$/,""),i="",a=0,o=0;e=r.charAt(o++);~e&&(n=a%4?64*n+e:e,a++%4)?i+=String.fromCharCode(255&n>>(-2*a&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);return i}(t)).length;s<c;s++)u+="%"+("00"+t.charCodeAt(s).toString(16)).slice(-2);for(t=decodeURIComponent(u),r=0;r<256;r++)i[r]=r;for(r=0;r<256;r++)a=(a+i[r]+n.charCodeAt(r%n.length))%256,e=i[r],i[r]=i[a],i[a]=e;r=0,a=0;for(var l=0;l<t.length;l++)a=(a+i[r=(r+1)%256])%256,e=i[r],i[r]=i[a],i[a]=e,o+=String.fromCharCode(t.charCodeAt(l)^i[(i[r]+i[a])%256]);return o},Je.zkyoWb={},Je.yKMuWw=!0);var r=Je.zkyoWb[t];return void 0===r?(void 0===Je.ZIQcsW&&(Je.ZIQcsW=!0),e=Je.pOPNMQ(e,n),Je.zkyoWb[t]=e):e=r,e},Ze=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup})(this,(function(){var t=function(){return!t.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Ze)};return t()}));return Ze(),t.ready});t.exports=i},3:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=""}});
/*! For license information please see ScanbotSDK.min.js.LICENSE.txt */
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e,n){"use strict";n.r(e),n.d(e,"render",(function(){return R})),n.d(e,"hydrate",(function(){return F})),n.d(e,"createElement",(function(){return p})),n.d(e,"h",(function(){return p})),n.d(e,"Fragment",(function(){return y})),n.d(e,"createRef",(function(){return m})),n.d(e,"isValidElement",(function(){return r})),n.d(e,"Component",(function(){return g})),n.d(e,"cloneElement",(function(){return I})),n.d(e,"createContext",(function(){return H})),n.d(e,"toChildArray",(function(){return E})),n.d(e,"__u",(function(){return N})),n.d(e,"options",(function(){return o}));var o,r,i,s,a,u,c,l={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var n in e)t[n]=e[n];return t}function _(t){var e=t.parentNode;e&&e.removeChild(t)}function p(t,e,n){var o,r=arguments,i={};for(o in e)"key"!==o&&"ref"!==o&&(i[o]=e[o]);if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(r[o]);if(null!=n&&(i.children=n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===i[o]&&(i[o]=t.defaultProps[o]);return v(t,i,e&&e.key,e&&e.ref,null)}function v(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function m(){return{current:null}}function y(t){return t.children}function g(t,e){this.props=t,this.context=e}function b(t,e){if(null==e)return t.__?b(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?b(t):null}function C(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return C(t)}}function k(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!S.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||s)(S)}function S(){for(var t;S.__r=i.length;)t=i.sort((function(t,e){return t.__v.__b-e.__v.__b})),i=[],t.some((function(t){var e,n,o,r,i,s,a;t.__d&&(s=(i=(e=t).__v).__e,(a=e.__P)&&(n=[],(o=h({},i)).__v=o,r=A(a,i,o,e.__n,void 0!==a.ownerSVGElement,null,n,null==s?b(i):s),T(n,i),r!=s&&C(i)))}))}function w(t,e,n,o,r,i,s,a,u,c){var f,h,p,m,g,C,k,S=o&&o.__k||d,w=S.length;for(u==l&&(u=null!=s?s[0]:w?b(o,0):null),n.__k=[],f=0;f<e.length;f++)if(null!=(m=n.__k[f]=null==(m=e[f])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m?v(null,m,null,null,m):Array.isArray(m)?v(y,{children:m},null,null,null):null!=m.__e||null!=m.__c?v(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=S[f])||p&&m.key==p.key&&m.type===p.type)S[f]=void 0;else for(h=0;h<w;h++){if((p=S[h])&&m.key==p.key&&m.type===p.type){S[h]=void 0;break}p=null}g=A(t,m,p=p||l,r,i,s,a,u,c),(h=m.ref)&&p.ref!=h&&(k||(k=[]),p.ref&&k.push(p.ref,null,m),k.push(h,m.__c||g,m)),null!=g?(null==C&&(C=g),u=x(t,m,p,S,s,g,u),"option"==n.type?t.value="":"function"==typeof n.type&&(n.__d=u)):u&&p.__e==u&&u.parentNode!=t&&(u=b(p))}if(n.__e=C,null!=s&&"function"!=typeof n.type)for(f=s.length;f--;)null!=s[f]&&_(s[f]);for(f=w;f--;)null!=S[f]&&N(S[f],S[f]);if(k)for(f=0;f<k.length;f++)U(k[f],k[++f],k[++f])}function E(t){return null==t||"boolean"==typeof t?[]:Array.isArray(t)?d.concat.apply([],t.map(E)):[t]}function x(t,e,n,o,r,i,s){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(r==n||i!=s||null==i.parentNode)t:if(null==s||s.parentNode!==t)t.appendChild(i),a=null;else{for(u=s,c=0;(u=u.nextSibling)&&c<o.length;c+=2)if(u==i)break t;t.insertBefore(i,s),a=s}return void 0!==a?a:i.nextSibling}function O(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]="number"==typeof n&&!1===f.test(e)?n+"px":null==n?"":n}function D(t,e,n,o,r){var i,s,a,u,c;if(r?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(i=t.style,"string"==typeof n)i.cssText=n;else{if("string"==typeof o&&(i.cssText="",o=null),o)for(u in o)n&&u in n||O(i,u,"");if(n)for(c in n)o&&n[c]===o[c]||O(i,c,n[c])}else"o"===e[0]&&"n"===e[1]?(s=e!==(e=e.replace(/Capture$/,"")),a=e.toLowerCase(),e=(a in t?a:e).slice(2),n?(o||t.addEventListener(e,M,s),(t.l||(t.l={}))[e]=n):t.removeEventListener(e,M,s)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!r&&e in t?t[e]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==n||!1===n?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,n))}function M(t){this.l[t.type](o.event?o.event(t):t)}function P(t,e,n){var o,r;for(o=0;o<t.__k.length;o++)(r=t.__k[o])&&(r.__=t,r.__e&&("function"==typeof r.type&&r.__k.length>1&&P(r,e,n),e=x(n,r,r,t.__k,null,r.__e,e),"function"==typeof t.type&&(t.__d=e)))}function A(t,e,n,r,i,s,a,u,c){var l,d,f,_,p,v,m,b,C,k,S,E=e.type;if(void 0!==e.constructor)return null;(l=o.__b)&&l(e);try{t:if("function"==typeof E){if(b=e.props,C=(l=E.contextType)&&r[l.__c],k=l?C?C.props.value:l.__:r,n.__c?m=(d=e.__c=n.__c).__=d.__E:("prototype"in E&&E.prototype.render?e.__c=d=new E(b,k):(e.__c=d=new g(b,k),d.constructor=E,d.render=L),C&&C.sub(d),d.props=b,d.state||(d.state={}),d.context=k,d.__n=r,f=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=h({},d.__s)),h(d.__s,E.getDerivedStateFromProps(b,d.__s))),_=d.props,p=d.state,f)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&b!==_&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,k),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,k)||e.__v===n.__v){d.props=b,d.state=d.__s,e.__v!==n.__v&&(d.__d=!1),d.__v=e,e.__e=n.__e,e.__k=n.__k,d.__h.length&&a.push(d),P(e,u,t);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,k),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(_,p,v)}))}d.context=k,d.props=b,d.state=d.__s,(l=o.__r)&&l(e),d.__d=!1,d.__v=e,d.__P=t,l=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(r=h(h({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(v=d.getSnapshotBeforeUpdate(_,p)),S=null!=l&&l.type==y&&null==l.key?l.props.children:l,w(t,Array.isArray(S)?S:[S],e,n,r,i,s,a,u,c),d.base=e.__e,d.__h.length&&a.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=j(n.__e,e,n,r,i,s,a,c);(l=o.diffed)&&l(e)}catch(t){e.__v=null,o.__e(t,e,n)}return e.__e}function T(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function j(t,e,n,o,r,i,s,a){var u,c,f,h,_,p=n.props,v=e.props;if(r="svg"===e.type||r,null!=i)for(u=0;u<i.length;u++)if(null!=(c=i[u])&&((null===e.type?3===c.nodeType:c.localName===e.type)||t==c)){t=c,i[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(v);t=r?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,v.is&&{is:v.is}),i=null,a=!1}if(null===e.type)p!==v&&t.data!=v&&(t.data=v);else{if(null!=i&&(i=d.slice.call(t.childNodes)),f=(p=n.props||l).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!a){if(null!=i)for(p={},_=0;_<t.attributes.length;_++)p[t.attributes[_].name]=t.attributes[_].value;(h||f)&&(h&&f&&h.__html==f.__html||(t.innerHTML=h&&h.__html||""))}(function(t,e,n,o,r){var i;for(i in n)"children"===i||"key"===i||i in e||D(t,i,null,n[i],o);for(i in e)r&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||D(t,i,e[i],n[i],o)})(t,v,p,r,a),h?e.__k=[]:(u=e.props.children,w(t,Array.isArray(u)?u:[u],e,n,o,"foreignObject"!==e.type&&r,i,s,l,a)),a||("value"in v&&void 0!==(u=v.value)&&u!==t.value&&D(t,"value",u,p.value,!1),"checked"in v&&void 0!==(u=v.checked)&&u!==t.checked&&D(t,"checked",u,p.checked,!1))}return t}function U(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function N(t,e,n){var r,i,s;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||U(r,null,e)),n||"function"==typeof t.type||(n=null!=(i=t.__e)),t.__e=t.__d=void 0,null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],e,n);null!=i&&_(i)}function L(t,e,n){return this.constructor(t,n)}function R(t,e,n){var r,i,s;o.__&&o.__(t,e),i=(r=n===u)?null:n&&n.__k||e.__k,t=p(y,null,[t]),s=[],A(e,(r?e:n||e).__k=t,i||l,l,void 0!==e.ownerSVGElement,n&&!r?[n]:i?null:e.childNodes.length?d.slice.call(e.childNodes):null,s,n||l,r),T(s,t)}function F(t,e){R(t,e,u)}function I(t,e){var n,o;for(o in e=h(h({},t.props),e),arguments.length>2&&(e.children=d.slice.call(arguments,2)),n={},e)"key"!==o&&"ref"!==o&&(n[o]=e[o]);return v(t.type,n,e.key||t.key,e.ref||t.ref,null)}function H(t){var e={},n={__c:"__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var o,r=this;return this.getChildContext||(o=[],this.getChildContext=function(){return e[n.__c]=r,e},this.shouldComponentUpdate=function(t){r.props.value!==t.value&&o.some((function(e){e.context=t.value,k(e)}))},this.sub=function(t){o.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){o.splice(o.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}o={__e:function(t,e){for(var n,o;e=e.__;)if((n=e.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(o=!0,n.setState(n.constructor.getDerivedStateFromError(t))),null!=n.componentDidCatch&&(o=!0,n.componentDidCatch(t)),o)return k(n.__E=n)}catch(e){t=e}throw t}},r=function(t){return null!=t&&void 0===t.constructor},g.prototype.setState=function(t,e){var n;n=this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(n,this.props)),t&&h(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),k(this))},g.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},g.prototype.render=y,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S.__r=0,u=l,c=0},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var r=(s=o,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(u," */")),i=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[n].concat(i).concat([r]).join("\n")}var s,a,u;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var u=[].concat(t[a]);o&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),e.push(u))}},e}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=void 0;o(n(3));class r{}e.Constants=r,r.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@1.0.1/bundle/"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=""},function(t,e,n){"use strict";n.r(e),n.d(e,"useState",(function(){return _})),n.d(e,"useReducer",(function(){return p})),n.d(e,"useEffect",(function(){return v})),n.d(e,"useLayoutEffect",(function(){return m})),n.d(e,"useRef",(function(){return y})),n.d(e,"useImperativeHandle",(function(){return g})),n.d(e,"useMemo",(function(){return b})),n.d(e,"useCallback",(function(){return C})),n.d(e,"useContext",(function(){return k})),n.d(e,"useDebugValue",(function(){return S})),n.d(e,"useErrorBoundary",(function(){return w})),n.d(e,"createElement",(function(){return s.createElement})),n.d(e,"createContext",(function(){return s.createContext})),n.d(e,"createRef",(function(){return s.createRef})),n.d(e,"Fragment",(function(){return s.Fragment})),n.d(e,"Component",(function(){return s.Component})),n.d(e,"version",(function(){return rt})),n.d(e,"Children",(function(){return I})),n.d(e,"render",(function(){return X})),n.d(e,"hydrate",(function(){return Y})),n.d(e,"unmountComponentAtNode",(function(){return ut})),n.d(e,"createPortal",(function(){return G})),n.d(e,"createFactory",(function(){return it})),n.d(e,"cloneElement",(function(){return at})),n.d(e,"isValidElement",(function(){return st})),n.d(e,"findDOMNode",(function(){return ct})),n.d(e,"PureComponent",(function(){return j})),n.d(e,"memo",(function(){return U})),n.d(e,"forwardRef",(function(){return R})),n.d(e,"unstable_batchedUpdates",(function(){return lt})),n.d(e,"StrictMode",(function(){return dt})),n.d(e,"Suspense",(function(){return B})),n.d(e,"SuspenseList",(function(){return K})),n.d(e,"lazy",(function(){return V}));var o,r,i,s=n(0),a=0,u=[],c=s.options.__r,l=s.options.diffed,d=s.options.__c,f=s.options.unmount;function h(t,e){s.options.__h&&s.options.__h(r,t,a||e),a=0;var n=r.__H||(r.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function _(t){return a=1,p(P,t)}function p(t,e,n){var i=h(o++,2);return i.t=t,i.__c||(i.__c=r,i.__=[n?n(e):P(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}]),i.__}function v(t,e){var n=h(o++,3);!s.options.__s&&M(n.__H,e)&&(n.__=t,n.__H=e,r.__H.__h.push(n))}function m(t,e){var n=h(o++,4);!s.options.__s&&M(n.__H,e)&&(n.__=t,n.__H=e,r.__h.push(n))}function y(t){return a=5,b((function(){return{current:t}}),[])}function g(t,e,n){a=6,m((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))}function b(t,e){var n=h(o++,7);return M(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function C(t,e){return a=8,b((function(){return t}),e)}function k(t){var e=r.context[t.__c],n=h(o++,9);return n.__c=t,e?(null==n.__&&(n.__=!0,e.sub(r)),e.props.value):t.__}function S(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t)}function w(t){var e=h(o++,10),n=_();return e.__=t,r.componentDidCatch||(r.componentDidCatch=function(t){e.__&&e.__(t),n[1](t)}),[n[0],function(){n[1](void 0)}]}function E(){u.some((function(t){if(t.__P)try{t.__H.__h.forEach(O),t.__H.__h.forEach(D),t.__H.__h=[]}catch(e){return t.__H.__h=[],s.options.__e(e,t.__v),!0}})),u=[]}s.options.__r=function(t){c&&c(t),o=0;var e=(r=t.__c).__H;e&&(e.__h.forEach(O),e.__h.forEach(D),e.__h=[])},s.options.diffed=function(t){l&&l(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&i===s.options.requestAnimationFrame||((i=s.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(o),x&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);x&&(e=requestAnimationFrame(n))})(E))},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(O),t.__h=t.__h.filter((function(t){return!t.__||D(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.options.__e(n,t.__v)}})),d&&d(t,e)},s.options.unmount=function(t){f&&f(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(O)}catch(t){s.options.__e(t,e.__v)}};var x="function"==typeof requestAnimationFrame;function O(t){"function"==typeof t.u&&t.u()}function D(t){t.u=t.__()}function M(t,e){return!t||e.some((function(e,n){return e!==t[n]}))}function P(t,e){return"function"==typeof e?e(t):e}function A(t,e){for(var n in e)t[n]=e[n];return t}function T(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var o in e)if("__source"!==o&&t[o]!==e[o])return!0;return!1}var j=function(t){var e,n;function o(e){var n;return(n=t.call(this,e)||this).isPureReactComponent=!0,n}return n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,o.prototype.shouldComponentUpdate=function(t,e){return T(this.props,t)||T(this.state,e)},o}(s.Component);function U(t,e){function n(t){var n=this.props.ref,o=n==t.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!o:T(this.props,t)}function o(e){return this.shouldComponentUpdate=n,Object(s.createElement)(t,e)}return o.prototype.isReactComponent=!0,o.displayName="Memo("+(t.displayName||t.name)+")",o.t=!0,o}var N=s.options.__b;s.options.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),N&&N(t)};var L="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function R(t){function e(e,n){var o=A({},e);return delete o.ref,t(o,(n=e.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return e.$$typeof=L,e.render=e,e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var F=function(t,e){return t?Object(s.toChildArray)(t).reduce((function(t,n,o){return t.concat(e(n,o))}),[]):null},I={map:F,forEach:F,count:function(t){return t?Object(s.toChildArray)(t).length:0},only:function(t){if(1!==(t=Object(s.toChildArray)(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:s.toChildArray},H=s.options.__e;function W(t){return t&&((t=A({},t)).__c=null,t.__k=t.__k&&t.__k.map(W)),t}function B(){this.__u=0,this.o=null,this.__b=null}function z(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function V(t){var e,n,o;function r(r){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){o=t})),o)throw o;if(!n)throw e;return Object(s.createElement)(n,r)}return r.displayName="Lazy",r.t=!0,r}function K(){this.i=null,this.l=null}s.options.__e=function(t,e,n){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return o.__c(t,e.__c);H(t,e,n)},(B.prototype=new s.Component).__c=function(t,e){var n=this;null==n.o&&(n.o=[]),n.o.push(e);var o=z(n.__v),r=!1,i=function(){r||(r=!0,o?o(s):s())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var s=function(){var t;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});t=n.o.pop();)t.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(i,i)},B.prototype.render=function(t,e){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=W(this.__b)),this.__b=null),[Object(s.createElement)(s.Fragment,null,e.u?null:t.children),e.u&&t.fallback]};var $=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(K.prototype=new s.Component).u=function(t){var e=this,n=z(e.__v),o=e.l.get(t);return o[0]++,function(r){var i=function(){e.props.revealOrder?(o.push(r),$(e,t,o)):r()};n?n(i):i()}},K.prototype.render=function(t){this.i=null,this.l=new Map;var e=Object(s.toChildArray)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},K.prototype.componentDidUpdate=K.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,n){$(t,n,e)}))};var q=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function J(t){var e=this,n=t.container,o=Object(s.createElement)(q,{context:e.context},t.vnode);return e.s&&e.s!==n&&(e.v.parentNode&&e.s.removeChild(e.v),Object(s.__u)(e.h),e.p=!1),t.vnode?e.p?(n.__k=e.__k,Object(s.render)(o,n),e.__k=n.__k):(e.v=document.createTextNode(""),Object(s.hydrate)("",n),n.appendChild(e.v),e.p=!0,e.s=n,Object(s.render)(o,n,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),Object(s.__u)(e.h)),e.h=o,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),Object(s.__u)(e.h)},null}function G(t,e){return Object(s.createElement)(J,{vnode:t,container:e})}var Z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;s.Component.prototype.isReactComponent={};var Q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function X(t,e,n){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return Object(s.render)(t,e),"function"==typeof n&&n(),t?t.__c:null}function Y(t,e,n){return Object(s.hydrate)(t,e),"function"==typeof n&&n(),t?t.__c:null}var tt=s.options.event;function et(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t}})}s.options.event=function(t){tt&&(t=tt(t)),t.persist=function(){};var e=!1,n=!1,o=t.stopPropagation;t.stopPropagation=function(){o.call(t),e=!0};var r=t.preventDefault;return t.preventDefault=function(){r.call(t),n=!0},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return n},t.nativeEvent=t};var nt={configurable:!0,get:function(){return this.class}},ot=s.options.vnode;s.options.vnode=function(t){t.$$typeof=Q;var e=t.type,n=t.props;if(e){if(n.class!=n.className&&(nt.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",nt)),"function"!=typeof e){var o,r,i;for(i in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===e&&(Object(s.toChildArray)(n.children).forEach((function(t){-1!=n.value.indexOf(t.props.value)&&(t.props.selected=!0)})),delete n.value),n)if(o=Z.test(i))break;if(o)for(i in r=t.props={},n)r[Z.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=n[i]}!function(e){var n=t.type,o=t.props;if(o&&"string"==typeof n){var r={};for(var i in o)/^on(Ani|Tra|Tou)/.test(i)&&(o[i.toLowerCase()]=o[i],delete o[i]),r[i.toLowerCase()]=i;if(r.ondoubleclick&&(o.ondblclick=o[r.ondoubleclick],delete o[r.ondoubleclick]),r.onbeforeinput&&(o.onbeforeinput=o[r.onbeforeinput],delete o[r.onbeforeinput]),r.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(o.type))){var s=r.oninput||"oninput";o[s]||(o[s]=o[r.onchange],delete o[r.onchange])}}}(),"function"==typeof e&&!e.m&&e.prototype&&(et(e.prototype,"componentWillMount"),et(e.prototype,"componentWillReceiveProps"),et(e.prototype,"componentWillUpdate"),e.m=!0)}ot&&ot(t)};var rt="16.8.0";function it(t){return s.createElement.bind(null,t)}function st(t){return!!t&&t.$$typeof===Q}function at(t){return st(t)?s.cloneElement.apply(null,arguments):t}function ut(t){return!!t.__k&&(Object(s.render)(null,t),!0)}function ct(t){return t&&(t.base||1===t.nodeType&&t)||null}var lt=function(t,e){return t(e)},dt=s.Fragment;e.default={useState:_,useReducer:p,useEffect:v,useLayoutEffect:m,useRef:y,useImperativeHandle:g,useMemo:b,useCallback:C,useContext:k,useDebugValue:S,version:"16.8.0",Children:I,render:X,hydrate:Y,unmountComponentAtNode:ut,createPortal:G,createElement:s.createElement,createContext:s.createContext,createFactory:it,cloneElement:at,createRef:s.createRef,Fragment:s.Fragment,isValidElement:st,findDOMNode:ct,Component:s.Component,PureComponent:j,memo:U,forwardRef:R,unstable_batchedUpdates:lt,StrictMode:s.Fragment,Suspense:B,SuspenseList:K,lazy:V}},function(t,e,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)&&o.length){var s=r.apply(null,o);s&&t.push(s)}else if("object"===i)for(var a in o)n.call(o,a)&&o[a]&&t.push(a)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){"use strict";var o,r=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n<s.length;n++)if(s[n].identifier===t){e=n;break}return e}function u(t,e){for(var n={},o=[],r=0;r<t.length;r++){var i=t[r],u=e.base?i[0]+e.base:i[0],c=n[u]||0,l="".concat(u," ").concat(c);n[u]=c+1;var d=a(l),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(s[d].references++,s[d].updater(f)):s.push({identifier:l,updater:v(f,e),references:1}),o.push(l)}return o}function c(t){var e=document.createElement("style"),o=t.attributes||{};if(void 0===o.nonce){var r=n.nc;r&&(o.nonce=r)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var s=i(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var l,d=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function f(t,e,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=d(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function h(t,e,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),i&&btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var _=null,p=0;function v(t,e){var n,o,r;if(e.singleton){var i=p++;n=_||(_=c(e)),o=f.bind(null,n,i,!1),r=f.bind(null,n,i,!0)}else n=c(e),o=h.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var n=u(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var r=a(n[o]);s[r].references--}for(var i=u(t,e),c=0;c<n.length;c++){var l=a(n[c]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}n=i}}}},function(t,e,n){"use strict";var o,r=n(8),i=(o=r)&&o.__esModule?o:{default:o},s=n(20);!function(t){t.ScanbotSDK={initialize:async function(t){return await i.default.initialize(t)}},t.ScanbotErrors=s.ErrorCode}(window)},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(n(9)),s=n(18),a=n(19);class u{static initialize(t){return o(this,void 0,void 0,(function*(){const e=new u,n=t.engine||u.defaultEnginePath;e.bridge=yield s.WorkerBridge.initialize(n);const o=[t.licenseKey,n,window.location.hostname];return e.initialized=yield e.bridge.post("initialize",o),e}))}getLicenseInfo(){return o(this,void 0,void 0,(function*(){const t=yield this.bridge.post("getLicenseInfo",[]);return a.LicenseInfo.fromJson(t)}))}createDocumentScanner(t){return o(this,void 0,void 0,(function*(){return yield i.default.create(t,this.bridge)}))}}e.default=u,u.defaultEnginePath=""},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},s=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const a=i(n(0)),u=n(0),c=n(10),l=n(13),d=n(14),f=n(15);class h extends a.Component{constructor(t){if(super(t),this.onVideoReady=()=>{const{onReady:t}=this.props;t&&t(this)},this.onVideoError=t=>{const{onError:e}=this.props;e&&e(t)},this.defaultCaptureButtonClick=()=>s(this,void 0,void 0,(function*(){const t=yield this.detectAndCrop();this.configuration.onDocumentDetected(t)})),this.state={action:this.defaultAction},!h.isSupported()){throw Error("Camera can only be accessed if the content is served via HTTPS, or on localhost. Check DocumentScannerView.isSupported() before creating the scanner.")}}get defaultAction(){return this.autoCaptureEnabled?"searching":"manual"}get enabled(){return("searching"==this.state.action||"capturing"==this.state.action)&&!this.disposed}get autoCaptureEnabled(){return this.configuration.autoCaptureEnabled}get configuration(){return l.DocumentScannerConfiguration.fromJson(this.props.configuration)}get bridge(){return this.props.bridge}static isSupported(){return"localhost"===location.hostname||"https:"===location.protocol}static create(t,e){return s(this,void 0,void 0,(function*(){const n=document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise((o,r)=>{u.render(u.h(h,{container:n,configuration:t,bridge:e,onReady:o,onError:r}),n)})}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with createDocumentScanner. Remove component from render tree to dispose.");this.componentWillUnmount(),u.render(null,t)}detectAndCrop(){return s(this,void 0,void 0,(function*(){try{this.setState({action:"processing"});const t=this.camera.createImageData();return yield this.bridge.post("detectAndCropDocument",[t])}finally{this.setState({action:this.defaultAction})}}))}componentDidMount(){this.disposed=!1,this.detect()}componentWillUnmount(){this.disposed=!0,this.handleAutoCapture(!1)}detect(){return s(this,void 0,void 0,(function*(){try{if(!this.enabled)return;const t=yield this.detectInWebWorker();if(!this.enabled)return;if(!t)return;if(!this.outline)return;const e=this.getStatusString(t),n="OK"===e,o=this.camera.convertToViewportPoints(t.polygon,h.DEFAULT_DETECTION_RESOLUTION);this.outline.update(n,o,this.configuration.text.hint[e]),yield this.handleAutoCapture(n)}finally{requestAnimationFrame(this.detect.bind(this))}}))}getStatusString(t){return this.configuration.ignoreBadAspectRatio&&"OK_BadAspectRatio"===t.detectionStatus?"OK":t.detectionStatus}detectInWebWorker(){return s(this,void 0,void 0,(function*(){const t=this.camera.createImageData(h.DEFAULT_DETECTION_RESOLUTION);if(!t)return;const e=[t,this.configuration.acceptedAngleScore,this.configuration.acceptedSizeScore];return yield this.bridge.post("detectDocument",e)}))}handleAutoCapture(t){return s(this,void 0,void 0,(function*(){if(this.configuration.autoCaptureEnabled)if(t&&!this.autoCaptureToken){this.updateButton("capturing");const t=3e3*(1-this.configuration.autoCaptureSensitivity);this.autoCaptureToken=setTimeout(()=>s(this,void 0,void 0,(function*(){if(this.autoCaptureToken=void 0,!this.enabled)return;const t=yield this.detectAndCrop();t.success&&this.configuration.onDocumentDetected&&this.configuration.onDocumentDetected(t)})),t)}else!t&&this.autoCaptureToken&&(this.updateButton("searching"),clearTimeout(this.autoCaptureToken),this.autoCaptureToken=void 0)}))}updateButton(t){this.setState({action:t})}render(){var t,e,n,o,r;const{action:i}=this.state,{configuration:s}=this,a=null===(t=s.style)||void 0===t?void 0:t.captureButton;return u.h("div",{style:{position:"relative",width:"100%",height:"100%"}},u.h(d.ScanbotCameraView,{videoConstraints:s.videoConstraints,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),u.h(c.DocumentOutline,{style:{polygon:null===(n=null===(e=s.style)||void 0===e?void 0:e.outline)||void 0===n?void 0:n.polygon,label:null===(r=null===(o=s.style)||void 0===o?void 0:o.outline)||void 0===r?void 0:r.label},showLabel:"searching"==i||"capturing"==i,visible:"processing"!=i,ref:t=>{this.outline=t}}),u.h(f.ShutterButton,{color:(null==a?void 0:a.color)?a.color:"FFF",action:i,onClick:s.onCaptureButtonClick||this.defaultCaptureButtonClick}))}}e.default=h,h.DEFAULT_DETECTION_RESOLUTION=600},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentOutline=void 0;const r=o(n(4)),i=n(0),s=o(n(5));n(11);class a extends r.default.Component{constructor(){super(),this.outlineClassName="scanbot-document-outline",this.hintLabelClassName="scanbot-document-hint-text",this.PULL_FORCE=4,this.MIN_SPEED=100,this.state={text:"Initializing..."}}render(){const{ok:t,text:e,validPoints:n}=this.state,o=this.props.visible&&n,r=s.default({[this.outlineClassName]:!0,[this.outlineClassName+"-visible"]:o,[this.outlineClassName+"-hidden"]:!o,[this.outlineClassName+"-ok"]:t}),a=s.default({[this.hintLabelClassName]:!0,[this.hintLabelClassName+"-visible"]:o,[this.hintLabelClassName+"-hidden"]:!o});return i.h("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},i.h("svg",{style:{width:"100%",height:"100%"}},i.h("polygon",{style:this.props.style.polygon,class:r,ref:t=>{this.polygon=t}})),this.props.showLabel&&i.h("label",{style:this.props.style.label,class:a,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){e&&(this.overlayPolygonCurrent||(this.overlayPolygonCurrent=e),this.overlayPolygonTarget||requestAnimationFrame(this.animate.bind(this)),this.overlayPolygonTarget=e),this.setState({ok:t,text:n,validPoints:!!e})}animate(t){if(!this.overlayPolygonTarget)return;const e=(this.animationLastTime?t-this.animationLastTime:0)/1e3;let n=0;for(let t=0;t<4;++t){const o=this.overlayPolygonCurrent[t],r=this.overlayPolygonTarget[t],i=this.absMin(this.absMax(this.MIN_SPEED*Math.sign(r.x-o.x)*e,(r.x-o.x)*this.PULL_FORCE*e),r.x-o.x),s=this.absMin(this.absMax(this.MIN_SPEED*Math.sign(r.y-o.y)*e,(r.y-o.y)*this.PULL_FORCE*e),r.y-o.y);o.x+=i,o.y+=s,n+=Math.abs(i),n+=Math.abs(s)}const o=this.overlayPolygonCurrent.map(t=>`${t.x},${t.y}`).join(" ");this.polygon&&this.polygon.setAttribute("points",o),n<1&&null!==this.animationLastTime?(this.overlayPolygonTarget=null,this.animationLastTime=null):(this.animationLastTime=t,requestAnimationFrame(this.animate.bind(this)))}absMin(t,e){return Math.abs(t)<Math.abs(e)?t:e}absMax(t,e){return Math.abs(t)>Math.abs(e)?t:e}}e.DocumentOutline=a},function(t,e,n){var o=n(6),r=n(12);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var i={insert:"head",singleton:!1};o(r,i);t.exports=r.locals||{}},function(t,e,n){"use strict";n.r(e);var o=n(1),r=n.n(o)()(!1);r.push([t.i,"\n.scanbot-document-outline {\n stroke: yellow;\n stroke-width: 2px;\n fill: none;\n}\n\n.scanbot-document-outline-ok {\n stroke: green;\n}\n\n.scanbot-document-outline-visible {\n opacity: 1;\n transition: opacity .3s ease-in-out;\n}\n\n.scanbot-document-outline-hidden {\n opacity: 0;\n transition: opacity .3s ease-in-out;\n}\n\n.scanbot-document-hint-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n border-radius: 0.25em;\n padding: 0.05em 0.3em 0.05em 0.3em;\n font-family: sans-serif;\n font-size: 0.9em;\n font-weight: 300;\n}\n",""]),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentScannerConfiguration=void 0;class o{constructor(){this.containerId=void 0,this.acceptedAngleScore=75,this.acceptedSizeScore=75,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.ignoreBadAspectRatio=!0,this.text={hint:{OK:"Don't move. Capturing document...",OK_SmallSize:"Move closer",OK_BadAngles:"Turn your device to<br>have a more rectangular outline",OK_BadAspectRatio:"Wrong aspect ratio - rotate your device",OK_OffCenter:"Move to the center",Error_NothingDetected:"Searching for document...",Error_Brightness:"Poor light<br>Searching for document...",Error_Noise:"Noisy background<br>Searching for document..."}},this.style={outline:{polygon:{stroke:void 0,strokeWidth:void 0,fill:void 0},label:{position:void 0,top:void 0,left:void 0,transform:void 0,textAlign:void 0,backgroundColor:void 0,color:void 0,borderRadius:void 0,padding:void 0,fontFamily:void 0,fontSize:void 0}},captureButton:{color:"#FFF"}},this.videoConstraints={width:{ideal:o.DEFAULT_VIDEO_WIDTH},height:{ideal:o.DEFAULT_VIDEO_HEIGHT}},this.onError=function(t){},this.onDocumentDetected=function(t){}}static fromJson(t){const e=new o,n=e;return Object.keys(t).forEach(e=>{n[e]=t[e]}),e.videoConstraints.facingMode="environment",e.videoConstraints.resizeMode="none",e}}e.DocumentScannerConfiguration=o,o.DEFAULT_VIDEO_WIDTH=3840,o.DEFAULT_VIDEO_HEIGHT=2160},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ScanbotCameraView=void 0;const i=n(0),s=r(n(4));class a extends s.default.Component{constructor(t){super(t),this.state={}}createImageData(t=0){if(this.ctx||this.getCanvas(),!this.ctx)return;if(!this.video)return;const{videoWidth:e,videoHeight:n}=this.video,{frameWidth:o,frameHeight:r}=this.calculateFrameSize(t);this.ctx.drawImage(this.video,0,0,e,n,0,0,o,r);return this.ctx.getImageData(0,0,o,r)}calculateFrameSize(t){const{videoWidth:e,videoHeight:n}=this.video;let o=e,r=n;if(t>0&&0!=e&&0!=n){const i=e/n;e<n?(o=e<t?e:t,r=o/i):(r=n<t?n:t,o=r*i)}return{frameWidth:o,frameHeight:r}}convertToViewportPoints(t,e){if(!t||!this.video)return;const{clientWidth:n,clientHeight:o}=this.video,{frameWidth:r,frameHeight:i}=this.calculateFrameSize(e);if(0==n||0==o||0==r||0==i)return;let s,a=0,u=0;r/i>n/o?(s=o/i,a=(r-n/s)/2):(s=n/r,u=(i-o/s)/2);return t.map(t=>({x:s*(t.x-a),y:s*(t.y-u)}))}getCanvas(){return this.video?0===this.video.videoWidth?null:(this.ctx||(this.canvas=document.createElement("canvas"),this.canvas.className="scanbot-sdk-canvas-element",this.canvas.width=this.video.videoWidth,this.canvas.height=this.video.videoHeight,this.ctx=this.canvas.getContext("2d")),this.canvas):null}_requestUserMedia(){return o(this,void 0,void 0,(function*(){const t={video:this.props.videoConstraints};this.stream=yield navigator.mediaDevices.getUserMedia(t);try{return this.video&&(this.video.srcObject=this.stream),{hasUserMedia:!0}}catch(t){return this.videoObjectUrl=window.URL.createObjectURL(this.stream),{hasUserMedia:!0,src:this.videoObjectUrl}}}))}componentDidMount(){return o(this,void 0,void 0,(function*(){const{onError:t,onReady:e}=this.props;try{yield this._requestUserMedia(),e&&e()}catch(e){t&&t(e)}}))}componentWillUnmount(){this.canvas=null,this.ctx=null,this.stream&&(this.stream.getVideoTracks&&this.stream.getAudioTracks&&(this.stream.getVideoTracks().map(t=>t.stop()),this.stream.getAudioTracks().map(t=>t.stop())),this.stream=null),this.videoObjectUrl&&(window.URL.revokeObjectURL(this.videoObjectUrl),this.videoObjectUrl=null)}render(){return i.h("video",{autoplay:!0,src:this.videoObjectUrl,muted:!0,playsinline:!0,class:"scanbot-camera-view",ref:t=>{this.video=t},style:{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}}e.ScanbotCameraView=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ShutterButton=e.ShutterButtonProps=void 0;const r=o(n(4)),i=n(0);n(16);const s=o(n(5));e.ShutterButtonProps=class{};class a{constructor(t){this.lastTime=0,this.lastDuration=0,this.t=0,this.element=null,this.animationClass="",this.animationClass=t}setDuration(t){const e=Date.now()/1e3,n=e-this.lastTime;this.lastDuration&&(this.t+=n%this.lastDuration/this.lastDuration,this.t-=0|this.t);const o=-t*this.t;this.element&&(this.element.style.animationDuration=t+"s",this.element.style.animationDelay=o+"s",this.element.classList.remove(this.animationClass),this.element.offsetHeight,this.element.classList.add(this.animationClass)),this.lastTime=e,this.lastDuration=t}}class u extends r.default.Component{constructor(){super(...arguments),this.inner1=new a("scanbot-shutter-rotate"),this.inner2=new a("scanbot-shutter-rotate")}render(){return i.h("div",{className:"scanbot-shutter-button",onClick:this.props.onClick},this.captureBackground(),this.captureInnerCircle(),this.captureSearchingInner1(),this.captureSearchingInner2())}updateAnimationSpeed(t){"searching"==t?(this.inner1.setDuration(3),this.inner2.setDuration(2)):(this.inner1.setDuration(1.5),this.inner2.setDuration(.75))}componentDidMount(){this.updateAnimationSpeed(this.props.action)}componentDidUpdate(){this.updateAnimationSpeed(this.props.action)}captureBackground(){return this.svgBase(null,i.h("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M32 0c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32C14.327 64 0 49.673 0 32 0 14.327 14.327 0 32 0zm0 3C15.984 3 3 15.984 3 32s12.984 29 29 29 29-12.984 29-29S48.016 3 32 3z")))}captureInnerCircle(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"processing"==t||"manual"==t,"scanbot-shutter-fade-out":"searching"==t||"capturing"==t,"scanbot-shutter-pulse-fast":"processing"==t},i.h("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},i.h("circle",{cx:"32",cy:"32",r:"24",fill:this.props.color,fillRule:"nonzero"})))}captureSearchingInner1(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},i.h("g",{fill:"none",fillOpacity:"0.7",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M44.24 51.476a1 1 0 01-1.066-1.692A20.981 20.981 0 0053 32c0-11.598-9.402-21-21-21a1 1 0 010-2c12.703 0 23 10.297 23 23a22.98 22.98 0 01-10.76 19.476z")),t=>{this.inner1.element=t})}captureSearchingInner2(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},i.h("g",{fill:"none",fillOpacity:"0.4",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M46.624 35.35a1 1 0 01-1.95-.445C44.89 33.96 45 32.988 45 32c0-7.18-5.82-13-13-13a1 1 0 010-2c8.284 0 15 6.716 15 15 0 1.138-.127 2.26-.376 3.35z")),t=>{this.inner2.element=t})}path(t){return i.h("path",{fill:this.props.color,fillRule:"nonzero",d:t})}svgBase(t,e,n){return i.h("div",{class:s.default(t),ref:n},i.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64"},e))}}e.ShutterButton=u},function(t,e,n){var o=n(6),r=n(17);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var i={insert:"head",singleton:!1};o(r,i);t.exports=r.locals||{}},function(t,e,n){"use strict";n.r(e);var o=n(1),r=n.n(o)()(!1);r.push([t.i,"\n.scanbot-shutter-fade-in {\n opacity: 1;\n}\n\n.scanbot-shutter-fade-out {\n opacity: 0;\n}\n\n.scanbot-shutter-rotate {\n animation: scanbot-shutter-rotating linear infinite;\n}\n\n.scanbot-shutter-pulse-fast {\n animation: scanbot-shutter-pulsing 1s ease-in-out infinite;\n}\n\n.scanbot-shutter-button {\n position: relative;\n width: 64px;\n height: 64px;\n left: 50%;\n bottom: 12px;\n transform: translate(-50%, -100%);\n}\n\n.scanbot-shutter-button-part {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transition: opacity 0.5s ease-in-out;\n}\n\n@keyframes scanbot-shutter-rotating {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes scanbot-shutter-pulsing {\n 0% {\n opacity: 0.25;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 0.25;\n }\n}\n",""]),e.default=r},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBridge=void 0;const r=n(2);class i{constructor(){this.ASM_JS="ScanbotSDK.Core.js"}static initialize(t){return o(this,void 0,void 0,(function*(){const e=new i;if(t||(t=r.Constants.CDN_PATH),t+=e.ASM_JS,e.continuations={},e.isRemote(t)){const n=new Blob([`importScripts("${t}")`]);e.instance=new Worker(URL.createObjectURL(n))}else e.instance=new Worker(t);const n=e;return e.instance.onmessage=function(t){const{ticket:e,result:o,error:r}=t.data,{resolve:i,reject:s}=n.continuations[e];delete n.continuations[e],r?s(r):i(o)},e}))}post(t,e){return new Promise((n,o)=>{const r=Math.random().toString(36);this.continuations[r]={resolve:n,reject:o},this.instance.postMessage({command:t,args:e,ticket:r})})}isRemote(t){return-1!==t.indexOf("http")}}e.WorkerBridge=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LicenseInfo=void 0;class o{isValid(){return"Okay"===this.status}static fromJson(t){const e=new o;return e.status=t.licenseStatus,e.description=t.description,e}}e.LicenseInfo=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCode=void 0;class o{}e.ErrorCode=o,o.Default=-1,o.CameraPermissionDenied=100,o.NoCamera=101,o.UnsupportedBrowser=102,o.RequiresLocalhostOrHttps=103}]);
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e,n){"use strict";n.r(e),n.d(e,"render",(function(){return R})),n.d(e,"hydrate",(function(){return F})),n.d(e,"createElement",(function(){return p})),n.d(e,"h",(function(){return p})),n.d(e,"Fragment",(function(){return y})),n.d(e,"createRef",(function(){return m})),n.d(e,"isValidElement",(function(){return r})),n.d(e,"Component",(function(){return g})),n.d(e,"cloneElement",(function(){return I})),n.d(e,"createContext",(function(){return H})),n.d(e,"toChildArray",(function(){return E})),n.d(e,"__u",(function(){return N})),n.d(e,"options",(function(){return o}));var o,r,i,s,a,u,c,l={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var n in e)t[n]=e[n];return t}function _(t){var e=t.parentNode;e&&e.removeChild(t)}function p(t,e,n){var o,r=arguments,i={};for(o in e)"key"!==o&&"ref"!==o&&(i[o]=e[o]);if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(r[o]);if(null!=n&&(i.children=n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===i[o]&&(i[o]=t.defaultProps[o]);return v(t,i,e&&e.key,e&&e.ref,null)}function v(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function m(){return{current:null}}function y(t){return t.children}function g(t,e){this.props=t,this.context=e}function b(t,e){if(null==e)return t.__?b(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?b(t):null}function C(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return C(t)}}function k(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!S.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||s)(S)}function S(){for(var t;S.__r=i.length;)t=i.sort((function(t,e){return t.__v.__b-e.__v.__b})),i=[],t.some((function(t){var e,n,o,r,i,s,a;t.__d&&(s=(i=(e=t).__v).__e,(a=e.__P)&&(n=[],(o=h({},i)).__v=o,r=A(a,i,o,e.__n,void 0!==a.ownerSVGElement,null,n,null==s?b(i):s),T(n,i),r!=s&&C(i)))}))}function w(t,e,n,o,r,i,s,a,u,c){var f,h,p,m,g,C,k,S=o&&o.__k||d,w=S.length;for(u==l&&(u=null!=s?s[0]:w?b(o,0):null),n.__k=[],f=0;f<e.length;f++)if(null!=(m=n.__k[f]=null==(m=e[f])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m?v(null,m,null,null,m):Array.isArray(m)?v(y,{children:m},null,null,null):null!=m.__e||null!=m.__c?v(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=S[f])||p&&m.key==p.key&&m.type===p.type)S[f]=void 0;else for(h=0;h<w;h++){if((p=S[h])&&m.key==p.key&&m.type===p.type){S[h]=void 0;break}p=null}g=A(t,m,p=p||l,r,i,s,a,u,c),(h=m.ref)&&p.ref!=h&&(k||(k=[]),p.ref&&k.push(p.ref,null,m),k.push(h,m.__c||g,m)),null!=g?(null==C&&(C=g),u=x(t,m,p,S,s,g,u),"option"==n.type?t.value="":"function"==typeof n.type&&(n.__d=u)):u&&p.__e==u&&u.parentNode!=t&&(u=b(p))}if(n.__e=C,null!=s&&"function"!=typeof n.type)for(f=s.length;f--;)null!=s[f]&&_(s[f]);for(f=w;f--;)null!=S[f]&&N(S[f],S[f]);if(k)for(f=0;f<k.length;f++)U(k[f],k[++f],k[++f])}function E(t){return null==t||"boolean"==typeof t?[]:Array.isArray(t)?d.concat.apply([],t.map(E)):[t]}function x(t,e,n,o,r,i,s){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(r==n||i!=s||null==i.parentNode)t:if(null==s||s.parentNode!==t)t.appendChild(i),a=null;else{for(u=s,c=0;(u=u.nextSibling)&&c<o.length;c+=2)if(u==i)break t;t.insertBefore(i,s),a=s}return void 0!==a?a:i.nextSibling}function O(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]="number"==typeof n&&!1===f.test(e)?n+"px":null==n?"":n}function D(t,e,n,o,r){var i,s,a,u,c;if(r?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(i=t.style,"string"==typeof n)i.cssText=n;else{if("string"==typeof o&&(i.cssText="",o=null),o)for(u in o)n&&u in n||O(i,u,"");if(n)for(c in n)o&&n[c]===o[c]||O(i,c,n[c])}else"o"===e[0]&&"n"===e[1]?(s=e!==(e=e.replace(/Capture$/,"")),a=e.toLowerCase(),e=(a in t?a:e).slice(2),n?(o||t.addEventListener(e,M,s),(t.l||(t.l={}))[e]=n):t.removeEventListener(e,M,s)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!r&&e in t?t[e]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==n||!1===n?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,n))}function M(t){this.l[t.type](o.event?o.event(t):t)}function P(t,e,n){var o,r;for(o=0;o<t.__k.length;o++)(r=t.__k[o])&&(r.__=t,r.__e&&("function"==typeof r.type&&r.__k.length>1&&P(r,e,n),e=x(n,r,r,t.__k,null,r.__e,e),"function"==typeof t.type&&(t.__d=e)))}function A(t,e,n,r,i,s,a,u,c){var l,d,f,_,p,v,m,b,C,k,S,E=e.type;if(void 0!==e.constructor)return null;(l=o.__b)&&l(e);try{t:if("function"==typeof E){if(b=e.props,C=(l=E.contextType)&&r[l.__c],k=l?C?C.props.value:l.__:r,n.__c?m=(d=e.__c=n.__c).__=d.__E:("prototype"in E&&E.prototype.render?e.__c=d=new E(b,k):(e.__c=d=new g(b,k),d.constructor=E,d.render=L),C&&C.sub(d),d.props=b,d.state||(d.state={}),d.context=k,d.__n=r,f=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=h({},d.__s)),h(d.__s,E.getDerivedStateFromProps(b,d.__s))),_=d.props,p=d.state,f)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&b!==_&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,k),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,k)||e.__v===n.__v){d.props=b,d.state=d.__s,e.__v!==n.__v&&(d.__d=!1),d.__v=e,e.__e=n.__e,e.__k=n.__k,d.__h.length&&a.push(d),P(e,u,t);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,k),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(_,p,v)}))}d.context=k,d.props=b,d.state=d.__s,(l=o.__r)&&l(e),d.__d=!1,d.__v=e,d.__P=t,l=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(r=h(h({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(v=d.getSnapshotBeforeUpdate(_,p)),S=null!=l&&l.type==y&&null==l.key?l.props.children:l,w(t,Array.isArray(S)?S:[S],e,n,r,i,s,a,u,c),d.base=e.__e,d.__h.length&&a.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=j(n.__e,e,n,r,i,s,a,c);(l=o.diffed)&&l(e)}catch(t){e.__v=null,o.__e(t,e,n)}return e.__e}function T(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function j(t,e,n,o,r,i,s,a){var u,c,f,h,_,p=n.props,v=e.props;if(r="svg"===e.type||r,null!=i)for(u=0;u<i.length;u++)if(null!=(c=i[u])&&((null===e.type?3===c.nodeType:c.localName===e.type)||t==c)){t=c,i[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(v);t=r?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,v.is&&{is:v.is}),i=null,a=!1}if(null===e.type)p!==v&&t.data!=v&&(t.data=v);else{if(null!=i&&(i=d.slice.call(t.childNodes)),f=(p=n.props||l).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!a){if(null!=i)for(p={},_=0;_<t.attributes.length;_++)p[t.attributes[_].name]=t.attributes[_].value;(h||f)&&(h&&f&&h.__html==f.__html||(t.innerHTML=h&&h.__html||""))}(function(t,e,n,o,r){var i;for(i in n)"children"===i||"key"===i||i in e||D(t,i,null,n[i],o);for(i in e)r&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||D(t,i,e[i],n[i],o)})(t,v,p,r,a),h?e.__k=[]:(u=e.props.children,w(t,Array.isArray(u)?u:[u],e,n,o,"foreignObject"!==e.type&&r,i,s,l,a)),a||("value"in v&&void 0!==(u=v.value)&&u!==t.value&&D(t,"value",u,p.value,!1),"checked"in v&&void 0!==(u=v.checked)&&u!==t.checked&&D(t,"checked",u,p.checked,!1))}return t}function U(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function N(t,e,n){var r,i,s;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||U(r,null,e)),n||"function"==typeof t.type||(n=null!=(i=t.__e)),t.__e=t.__d=void 0,null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],e,n);null!=i&&_(i)}function L(t,e,n){return this.constructor(t,n)}function R(t,e,n){var r,i,s;o.__&&o.__(t,e),i=(r=n===u)?null:n&&n.__k||e.__k,t=p(y,null,[t]),s=[],A(e,(r?e:n||e).__k=t,i||l,l,void 0!==e.ownerSVGElement,n&&!r?[n]:i?null:e.childNodes.length?d.slice.call(e.childNodes):null,s,n||l,r),T(s,t)}function F(t,e){R(t,e,u)}function I(t,e){var n,o;for(o in e=h(h({},t.props),e),arguments.length>2&&(e.children=d.slice.call(arguments,2)),n={},e)"key"!==o&&"ref"!==o&&(n[o]=e[o]);return v(t.type,n,e.key||t.key,e.ref||t.ref,null)}function H(t){var e={},n={__c:"__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var o,r=this;return this.getChildContext||(o=[],this.getChildContext=function(){return e[n.__c]=r,e},this.shouldComponentUpdate=function(t){r.props.value!==t.value&&o.some((function(e){e.context=t.value,k(e)}))},this.sub=function(t){o.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){o.splice(o.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}o={__e:function(t,e){for(var n,o;e=e.__;)if((n=e.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(o=!0,n.setState(n.constructor.getDerivedStateFromError(t))),null!=n.componentDidCatch&&(o=!0,n.componentDidCatch(t)),o)return k(n.__E=n)}catch(e){t=e}throw t}},r=function(t){return null!=t&&void 0===t.constructor},g.prototype.setState=function(t,e){var n;n=this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(n,this.props)),t&&h(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),k(this))},g.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},g.prototype.render=y,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S.__r=0,u=l,c=0},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var r=(s=o,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(u," */")),i=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[n].concat(i).concat([r]).join("\n")}var s,a,u;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var u=[].concat(t[a]);o&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),e.push(u))}},e}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=void 0;o(n(3));class r{}e.Constants=r,r.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@1.0.2/bundle/"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=""},function(t,e,n){"use strict";n.r(e),n.d(e,"useState",(function(){return _})),n.d(e,"useReducer",(function(){return p})),n.d(e,"useEffect",(function(){return v})),n.d(e,"useLayoutEffect",(function(){return m})),n.d(e,"useRef",(function(){return y})),n.d(e,"useImperativeHandle",(function(){return g})),n.d(e,"useMemo",(function(){return b})),n.d(e,"useCallback",(function(){return C})),n.d(e,"useContext",(function(){return k})),n.d(e,"useDebugValue",(function(){return S})),n.d(e,"useErrorBoundary",(function(){return w})),n.d(e,"createElement",(function(){return s.createElement})),n.d(e,"createContext",(function(){return s.createContext})),n.d(e,"createRef",(function(){return s.createRef})),n.d(e,"Fragment",(function(){return s.Fragment})),n.d(e,"Component",(function(){return s.Component})),n.d(e,"version",(function(){return rt})),n.d(e,"Children",(function(){return I})),n.d(e,"render",(function(){return X})),n.d(e,"hydrate",(function(){return Y})),n.d(e,"unmountComponentAtNode",(function(){return ut})),n.d(e,"createPortal",(function(){return G})),n.d(e,"createFactory",(function(){return it})),n.d(e,"cloneElement",(function(){return at})),n.d(e,"isValidElement",(function(){return st})),n.d(e,"findDOMNode",(function(){return ct})),n.d(e,"PureComponent",(function(){return j})),n.d(e,"memo",(function(){return U})),n.d(e,"forwardRef",(function(){return R})),n.d(e,"unstable_batchedUpdates",(function(){return lt})),n.d(e,"StrictMode",(function(){return dt})),n.d(e,"Suspense",(function(){return B})),n.d(e,"SuspenseList",(function(){return K})),n.d(e,"lazy",(function(){return V}));var o,r,i,s=n(0),a=0,u=[],c=s.options.__r,l=s.options.diffed,d=s.options.__c,f=s.options.unmount;function h(t,e){s.options.__h&&s.options.__h(r,t,a||e),a=0;var n=r.__H||(r.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function _(t){return a=1,p(P,t)}function p(t,e,n){var i=h(o++,2);return i.t=t,i.__c||(i.__c=r,i.__=[n?n(e):P(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}]),i.__}function v(t,e){var n=h(o++,3);!s.options.__s&&M(n.__H,e)&&(n.__=t,n.__H=e,r.__H.__h.push(n))}function m(t,e){var n=h(o++,4);!s.options.__s&&M(n.__H,e)&&(n.__=t,n.__H=e,r.__h.push(n))}function y(t){return a=5,b((function(){return{current:t}}),[])}function g(t,e,n){a=6,m((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))}function b(t,e){var n=h(o++,7);return M(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function C(t,e){return a=8,b((function(){return t}),e)}function k(t){var e=r.context[t.__c],n=h(o++,9);return n.__c=t,e?(null==n.__&&(n.__=!0,e.sub(r)),e.props.value):t.__}function S(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t)}function w(t){var e=h(o++,10),n=_();return e.__=t,r.componentDidCatch||(r.componentDidCatch=function(t){e.__&&e.__(t),n[1](t)}),[n[0],function(){n[1](void 0)}]}function E(){u.some((function(t){if(t.__P)try{t.__H.__h.forEach(O),t.__H.__h.forEach(D),t.__H.__h=[]}catch(e){return t.__H.__h=[],s.options.__e(e,t.__v),!0}})),u=[]}s.options.__r=function(t){c&&c(t),o=0;var e=(r=t.__c).__H;e&&(e.__h.forEach(O),e.__h.forEach(D),e.__h=[])},s.options.diffed=function(t){l&&l(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&i===s.options.requestAnimationFrame||((i=s.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(o),x&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);x&&(e=requestAnimationFrame(n))})(E))},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(O),t.__h=t.__h.filter((function(t){return!t.__||D(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.options.__e(n,t.__v)}})),d&&d(t,e)},s.options.unmount=function(t){f&&f(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(O)}catch(t){s.options.__e(t,e.__v)}};var x="function"==typeof requestAnimationFrame;function O(t){"function"==typeof t.u&&t.u()}function D(t){t.u=t.__()}function M(t,e){return!t||e.some((function(e,n){return e!==t[n]}))}function P(t,e){return"function"==typeof e?e(t):e}function A(t,e){for(var n in e)t[n]=e[n];return t}function T(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var o in e)if("__source"!==o&&t[o]!==e[o])return!0;return!1}var j=function(t){var e,n;function o(e){var n;return(n=t.call(this,e)||this).isPureReactComponent=!0,n}return n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,o.prototype.shouldComponentUpdate=function(t,e){return T(this.props,t)||T(this.state,e)},o}(s.Component);function U(t,e){function n(t){var n=this.props.ref,o=n==t.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!o:T(this.props,t)}function o(e){return this.shouldComponentUpdate=n,Object(s.createElement)(t,e)}return o.prototype.isReactComponent=!0,o.displayName="Memo("+(t.displayName||t.name)+")",o.t=!0,o}var N=s.options.__b;s.options.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),N&&N(t)};var L="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function R(t){function e(e,n){var o=A({},e);return delete o.ref,t(o,(n=e.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return e.$$typeof=L,e.render=e,e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var F=function(t,e){return t?Object(s.toChildArray)(t).reduce((function(t,n,o){return t.concat(e(n,o))}),[]):null},I={map:F,forEach:F,count:function(t){return t?Object(s.toChildArray)(t).length:0},only:function(t){if(1!==(t=Object(s.toChildArray)(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:s.toChildArray},H=s.options.__e;function W(t){return t&&((t=A({},t)).__c=null,t.__k=t.__k&&t.__k.map(W)),t}function B(){this.__u=0,this.o=null,this.__b=null}function z(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function V(t){var e,n,o;function r(r){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){o=t})),o)throw o;if(!n)throw e;return Object(s.createElement)(n,r)}return r.displayName="Lazy",r.t=!0,r}function K(){this.i=null,this.l=null}s.options.__e=function(t,e,n){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return o.__c(t,e.__c);H(t,e,n)},(B.prototype=new s.Component).__c=function(t,e){var n=this;null==n.o&&(n.o=[]),n.o.push(e);var o=z(n.__v),r=!1,i=function(){r||(r=!0,o?o(s):s())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var s=function(){var t;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});t=n.o.pop();)t.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(i,i)},B.prototype.render=function(t,e){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=W(this.__b)),this.__b=null),[Object(s.createElement)(s.Fragment,null,e.u?null:t.children),e.u&&t.fallback]};var $=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(K.prototype=new s.Component).u=function(t){var e=this,n=z(e.__v),o=e.l.get(t);return o[0]++,function(r){var i=function(){e.props.revealOrder?(o.push(r),$(e,t,o)):r()};n?n(i):i()}},K.prototype.render=function(t){this.i=null,this.l=new Map;var e=Object(s.toChildArray)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},K.prototype.componentDidUpdate=K.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,n){$(t,n,e)}))};var q=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function J(t){var e=this,n=t.container,o=Object(s.createElement)(q,{context:e.context},t.vnode);return e.s&&e.s!==n&&(e.v.parentNode&&e.s.removeChild(e.v),Object(s.__u)(e.h),e.p=!1),t.vnode?e.p?(n.__k=e.__k,Object(s.render)(o,n),e.__k=n.__k):(e.v=document.createTextNode(""),Object(s.hydrate)("",n),n.appendChild(e.v),e.p=!0,e.s=n,Object(s.render)(o,n,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),Object(s.__u)(e.h)),e.h=o,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),Object(s.__u)(e.h)},null}function G(t,e){return Object(s.createElement)(J,{vnode:t,container:e})}var Z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;s.Component.prototype.isReactComponent={};var Q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function X(t,e,n){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return Object(s.render)(t,e),"function"==typeof n&&n(),t?t.__c:null}function Y(t,e,n){return Object(s.hydrate)(t,e),"function"==typeof n&&n(),t?t.__c:null}var tt=s.options.event;function et(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t}})}s.options.event=function(t){tt&&(t=tt(t)),t.persist=function(){};var e=!1,n=!1,o=t.stopPropagation;t.stopPropagation=function(){o.call(t),e=!0};var r=t.preventDefault;return t.preventDefault=function(){r.call(t),n=!0},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return n},t.nativeEvent=t};var nt={configurable:!0,get:function(){return this.class}},ot=s.options.vnode;s.options.vnode=function(t){t.$$typeof=Q;var e=t.type,n=t.props;if(e){if(n.class!=n.className&&(nt.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",nt)),"function"!=typeof e){var o,r,i;for(i in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===e&&(Object(s.toChildArray)(n.children).forEach((function(t){-1!=n.value.indexOf(t.props.value)&&(t.props.selected=!0)})),delete n.value),n)if(o=Z.test(i))break;if(o)for(i in r=t.props={},n)r[Z.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=n[i]}!function(e){var n=t.type,o=t.props;if(o&&"string"==typeof n){var r={};for(var i in o)/^on(Ani|Tra|Tou)/.test(i)&&(o[i.toLowerCase()]=o[i],delete o[i]),r[i.toLowerCase()]=i;if(r.ondoubleclick&&(o.ondblclick=o[r.ondoubleclick],delete o[r.ondoubleclick]),r.onbeforeinput&&(o.onbeforeinput=o[r.onbeforeinput],delete o[r.onbeforeinput]),r.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(o.type))){var s=r.oninput||"oninput";o[s]||(o[s]=o[r.onchange],delete o[r.onchange])}}}(),"function"==typeof e&&!e.m&&e.prototype&&(et(e.prototype,"componentWillMount"),et(e.prototype,"componentWillReceiveProps"),et(e.prototype,"componentWillUpdate"),e.m=!0)}ot&&ot(t)};var rt="16.8.0";function it(t){return s.createElement.bind(null,t)}function st(t){return!!t&&t.$$typeof===Q}function at(t){return st(t)?s.cloneElement.apply(null,arguments):t}function ut(t){return!!t.__k&&(Object(s.render)(null,t),!0)}function ct(t){return t&&(t.base||1===t.nodeType&&t)||null}var lt=function(t,e){return t(e)},dt=s.Fragment;e.default={useState:_,useReducer:p,useEffect:v,useLayoutEffect:m,useRef:y,useImperativeHandle:g,useMemo:b,useCallback:C,useContext:k,useDebugValue:S,version:"16.8.0",Children:I,render:X,hydrate:Y,unmountComponentAtNode:ut,createPortal:G,createElement:s.createElement,createContext:s.createContext,createFactory:it,cloneElement:at,createRef:s.createRef,Fragment:s.Fragment,isValidElement:st,findDOMNode:ct,Component:s.Component,PureComponent:j,memo:U,forwardRef:R,unstable_batchedUpdates:lt,StrictMode:s.Fragment,Suspense:B,SuspenseList:K,lazy:V}},function(t,e,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)&&o.length){var s=r.apply(null,o);s&&t.push(s)}else if("object"===i)for(var a in o)n.call(o,a)&&o[a]&&t.push(a)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){"use strict";var o,r=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n<s.length;n++)if(s[n].identifier===t){e=n;break}return e}function u(t,e){for(var n={},o=[],r=0;r<t.length;r++){var i=t[r],u=e.base?i[0]+e.base:i[0],c=n[u]||0,l="".concat(u," ").concat(c);n[u]=c+1;var d=a(l),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(s[d].references++,s[d].updater(f)):s.push({identifier:l,updater:v(f,e),references:1}),o.push(l)}return o}function c(t){var e=document.createElement("style"),o=t.attributes||{};if(void 0===o.nonce){var r=n.nc;r&&(o.nonce=r)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var s=i(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var l,d=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function f(t,e,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=d(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function h(t,e,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),i&&btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var _=null,p=0;function v(t,e){var n,o,r;if(e.singleton){var i=p++;n=_||(_=c(e)),o=f.bind(null,n,i,!1),r=f.bind(null,n,i,!0)}else n=c(e),o=h.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var n=u(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var r=a(n[o]);s[r].references--}for(var i=u(t,e),c=0;c<n.length;c++){var l=a(n[c]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}n=i}}}},function(t,e,n){"use strict";var o,r=n(8),i=(o=r)&&o.__esModule?o:{default:o},s=n(20);!function(t){t.ScanbotSDK={initialize:async function(t){return await i.default.initialize(t)}},t.ScanbotErrors=s.ErrorCode}(window)},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(n(9)),s=n(18),a=n(19);class u{static initialize(t){return o(this,void 0,void 0,(function*(){const e=new u,n=t.engine||u.defaultEnginePath;e.bridge=yield s.WorkerBridge.initialize(n);const o=[t.licenseKey,n,window.location.hostname];return e.initialized=yield e.bridge.post("initialize",o),e}))}getLicenseInfo(){return o(this,void 0,void 0,(function*(){const t=yield this.bridge.post("getLicenseInfo",[]);return a.LicenseInfo.fromJson(t)}))}createDocumentScanner(t){return o(this,void 0,void 0,(function*(){return yield i.default.create(t,this.bridge)}))}}e.default=u,u.defaultEnginePath=""},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},s=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const a=i(n(0)),u=n(0),c=n(10),l=n(13),d=n(14),f=n(15);class h extends a.Component{constructor(t){if(super(t),this.onVideoReady=()=>{const{onReady:t}=this.props;t&&t(this)},this.onVideoError=t=>{const{onError:e}=this.props;e&&e(t)},this.defaultCaptureButtonClick=()=>s(this,void 0,void 0,(function*(){const t=yield this.detectAndCrop();this.configuration.onDocumentDetected(t)})),this.state={action:this.defaultAction},!h.isSupported()){throw Error("Camera can only be accessed if the content is served via HTTPS, or on localhost. Check DocumentScannerView.isSupported() before creating the scanner.")}}get defaultAction(){return this.autoCaptureEnabled?"searching":"manual"}get enabled(){return("searching"==this.state.action||"capturing"==this.state.action)&&!this.disposed}get autoCaptureEnabled(){return this.configuration.autoCaptureEnabled}get configuration(){return l.DocumentScannerConfiguration.fromJson(this.props.configuration)}get bridge(){return this.props.bridge}static isSupported(){return"localhost"===location.hostname||"https:"===location.protocol}static create(t,e){return s(this,void 0,void 0,(function*(){const n=document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise((o,r)=>{u.render(u.h(h,{container:n,configuration:t,bridge:e,onReady:o,onError:r}),n)})}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with createDocumentScanner. Remove component from render tree to dispose.");this.componentWillUnmount(),u.render(null,t)}detectAndCrop(){return s(this,void 0,void 0,(function*(){try{this.setState({action:"processing"});const t=this.camera.createImageData();return yield this.bridge.post("detectAndCropDocument",[t])}finally{this.setState({action:this.defaultAction})}}))}componentDidMount(){this.disposed=!1,this.detect()}componentWillUnmount(){this.disposed=!0,this.handleAutoCapture(!1)}detect(){return s(this,void 0,void 0,(function*(){try{if(!this.enabled)return;const t=yield this.detectInWebWorker();if(!this.enabled)return;if(!t)return;if(!this.outline)return;const e=this.getStatusString(t),n="OK"===e,o=this.camera.convertToViewportPoints(t.polygon,h.DEFAULT_DETECTION_RESOLUTION);this.outline.update(n,o,this.configuration.text.hint[e]),yield this.handleAutoCapture(n)}finally{requestAnimationFrame(this.detect.bind(this))}}))}getStatusString(t){return this.configuration.ignoreBadAspectRatio&&"OK_BadAspectRatio"===t.detectionStatus?"OK":t.detectionStatus}detectInWebWorker(){return s(this,void 0,void 0,(function*(){const t=this.camera.createImageData(h.DEFAULT_DETECTION_RESOLUTION);if(!t)return;const e=[t,this.configuration.acceptedAngleScore,this.configuration.acceptedSizeScore];return yield this.bridge.post("detectDocument",e)}))}handleAutoCapture(t){return s(this,void 0,void 0,(function*(){if(this.configuration.autoCaptureEnabled)if(t&&!this.autoCaptureToken){this.updateButton("capturing");const t=3e3*(1-this.configuration.autoCaptureSensitivity);this.autoCaptureToken=setTimeout(()=>s(this,void 0,void 0,(function*(){if(this.autoCaptureToken=void 0,!this.enabled)return;const t=yield this.detectAndCrop();t.success&&this.configuration.onDocumentDetected&&this.configuration.onDocumentDetected(t)})),t)}else!t&&this.autoCaptureToken&&(this.updateButton("searching"),clearTimeout(this.autoCaptureToken),this.autoCaptureToken=void 0)}))}updateButton(t){this.setState({action:t})}render(){var t,e,n,o,r;const{action:i}=this.state,{configuration:s}=this,a=null===(t=s.style)||void 0===t?void 0:t.captureButton;return u.h("div",{style:{position:"relative",width:"100%",height:"100%"}},u.h(d.ScanbotCameraView,{videoConstraints:s.videoConstraints,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),u.h(c.DocumentOutline,{style:{polygon:null===(n=null===(e=s.style)||void 0===e?void 0:e.outline)||void 0===n?void 0:n.polygon,label:null===(r=null===(o=s.style)||void 0===o?void 0:o.outline)||void 0===r?void 0:r.label},showLabel:"searching"==i||"capturing"==i,visible:"processing"!=i,ref:t=>{this.outline=t}}),u.h(f.ShutterButton,{color:(null==a?void 0:a.color)?a.color:"FFF",action:i,onClick:s.onCaptureButtonClick||this.defaultCaptureButtonClick}))}}e.default=h,h.DEFAULT_DETECTION_RESOLUTION=600},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentOutline=void 0;const r=o(n(4)),i=n(0),s=o(n(5));n(11);class a extends r.default.Component{constructor(){super(),this.outlineClassName="scanbot-document-outline",this.hintLabelClassName="scanbot-document-hint-text",this.PULL_FORCE=4,this.MIN_SPEED=100,this.state={text:"Initializing..."}}render(){const{ok:t,text:e,validPoints:n}=this.state,o=this.props.visible&&n,r=s.default({[this.outlineClassName]:!0,[this.outlineClassName+"-visible"]:o,[this.outlineClassName+"-hidden"]:!o,[this.outlineClassName+"-ok"]:t}),a=s.default({[this.hintLabelClassName]:!0,[this.hintLabelClassName+"-visible"]:o,[this.hintLabelClassName+"-hidden"]:!o});return i.h("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},i.h("svg",{style:{width:"100%",height:"100%"}},i.h("polygon",{style:this.props.style.polygon,class:r,ref:t=>{this.polygon=t}})),this.props.showLabel&&i.h("label",{style:this.props.style.label,class:a,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){e&&(this.overlayPolygonCurrent||(this.overlayPolygonCurrent=e),this.overlayPolygonTarget||requestAnimationFrame(this.animate.bind(this)),this.overlayPolygonTarget=e),this.setState({ok:t,text:n,validPoints:!!e})}animate(t){if(!this.overlayPolygonTarget)return;const e=(this.animationLastTime?t-this.animationLastTime:0)/1e3;let n=0;for(let t=0;t<4;++t){const o=this.overlayPolygonCurrent[t],r=this.overlayPolygonTarget[t],i=this.absMin(this.absMax(this.MIN_SPEED*Math.sign(r.x-o.x)*e,(r.x-o.x)*this.PULL_FORCE*e),r.x-o.x),s=this.absMin(this.absMax(this.MIN_SPEED*Math.sign(r.y-o.y)*e,(r.y-o.y)*this.PULL_FORCE*e),r.y-o.y);o.x+=i,o.y+=s,n+=Math.abs(i),n+=Math.abs(s)}const o=this.overlayPolygonCurrent.map(t=>`${t.x},${t.y}`).join(" ");this.polygon&&this.polygon.setAttribute("points",o),n<1&&null!==this.animationLastTime?(this.overlayPolygonTarget=null,this.animationLastTime=null):(this.animationLastTime=t,requestAnimationFrame(this.animate.bind(this)))}absMin(t,e){return Math.abs(t)<Math.abs(e)?t:e}absMax(t,e){return Math.abs(t)>Math.abs(e)?t:e}}e.DocumentOutline=a},function(t,e,n){var o=n(6),r=n(12);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var i={insert:"head",singleton:!1};o(r,i);t.exports=r.locals||{}},function(t,e,n){"use strict";n.r(e);var o=n(1),r=n.n(o)()(!1);r.push([t.i,"\n.scanbot-document-outline {\n stroke: yellow;\n stroke-width: 2px;\n fill: none;\n}\n\n.scanbot-document-outline-ok {\n stroke: green;\n}\n\n.scanbot-document-outline-visible {\n opacity: 1;\n transition: opacity .3s ease-in-out;\n}\n\n.scanbot-document-outline-hidden {\n opacity: 0;\n transition: opacity .3s ease-in-out;\n}\n\n.scanbot-document-hint-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n border-radius: 0.25em;\n padding: 0.05em 0.3em 0.05em 0.3em;\n font-family: sans-serif;\n font-size: 0.9em;\n font-weight: 300;\n}\n",""]),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentScannerConfiguration=void 0;class o{constructor(){this.containerId=void 0,this.acceptedAngleScore=75,this.acceptedSizeScore=75,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.ignoreBadAspectRatio=!0,this.text={hint:{OK:"Don't move. Capturing document...",OK_SmallSize:"Move closer",OK_BadAngles:"Turn your device to<br>have a more rectangular outline",OK_BadAspectRatio:"Wrong aspect ratio - rotate your device",OK_OffCenter:"Move to the center",Error_NothingDetected:"Searching for document...",Error_Brightness:"Poor light<br>Searching for document...",Error_Noise:"Noisy background<br>Searching for document..."}},this.style={outline:{polygon:{stroke:void 0,strokeWidth:void 0,fill:void 0},label:{position:void 0,top:void 0,left:void 0,transform:void 0,textAlign:void 0,backgroundColor:void 0,color:void 0,borderRadius:void 0,padding:void 0,fontFamily:void 0,fontSize:void 0}},captureButton:{color:"#FFF"}},this.videoConstraints={width:{ideal:o.DEFAULT_VIDEO_WIDTH},height:{ideal:o.DEFAULT_VIDEO_HEIGHT}},this.onError=function(t){},this.onDocumentDetected=function(t){}}static fromJson(t){const e=new o,n=e;return Object.keys(t).forEach(e=>{n[e]=t[e]}),e.videoConstraints.facingMode="environment",e.videoConstraints.resizeMode="none",e}}e.DocumentScannerConfiguration=o,o.DEFAULT_VIDEO_WIDTH=3840,o.DEFAULT_VIDEO_HEIGHT=2160},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ScanbotCameraView=void 0;const i=n(0),s=r(n(4));class a extends s.default.Component{constructor(t){super(t),this.state={}}createImageData(t=0){if(this.ctx||this.getCanvas(),!this.ctx)return;if(!this.video)return;const{videoWidth:e,videoHeight:n}=this.video,{frameWidth:o,frameHeight:r}=this.calculateFrameSize(t);this.ctx.drawImage(this.video,0,0,e,n,0,0,o,r);return this.ctx.getImageData(0,0,o,r)}calculateFrameSize(t){const{videoWidth:e,videoHeight:n}=this.video;let o=e,r=n;if(t>0&&0!=e&&0!=n){const i=e/n;e<n?(o=e<t?e:t,r=o/i):(r=n<t?n:t,o=r*i)}return{frameWidth:o,frameHeight:r}}convertToViewportPoints(t,e){if(!t||!this.video)return;const{clientWidth:n,clientHeight:o}=this.video,{frameWidth:r,frameHeight:i}=this.calculateFrameSize(e);if(0==n||0==o||0==r||0==i)return;let s,a=0,u=0;r/i>n/o?(s=o/i,a=(r-n/s)/2):(s=n/r,u=(i-o/s)/2);return t.map(t=>({x:s*(t.x-a),y:s*(t.y-u)}))}getCanvas(){return this.video?0===this.video.videoWidth?null:(this.ctx||(this.canvas=document.createElement("canvas"),this.canvas.className="scanbot-sdk-canvas-element",this.canvas.width=this.video.videoWidth,this.canvas.height=this.video.videoHeight,this.ctx=this.canvas.getContext("2d")),this.canvas):null}_requestUserMedia(){return o(this,void 0,void 0,(function*(){const t={video:this.props.videoConstraints};this.stream=yield navigator.mediaDevices.getUserMedia(t);try{return this.video&&(this.video.srcObject=this.stream),{hasUserMedia:!0}}catch(t){return this.videoObjectUrl=window.URL.createObjectURL(this.stream),{hasUserMedia:!0,src:this.videoObjectUrl}}}))}componentDidMount(){return o(this,void 0,void 0,(function*(){const{onError:t,onReady:e}=this.props;try{yield this._requestUserMedia(),e&&e()}catch(e){t&&t(e)}}))}componentWillUnmount(){this.canvas=null,this.ctx=null,this.stream&&(this.stream.getVideoTracks&&this.stream.getAudioTracks&&(this.stream.getVideoTracks().map(t=>t.stop()),this.stream.getAudioTracks().map(t=>t.stop())),this.stream=null),this.videoObjectUrl&&(window.URL.revokeObjectURL(this.videoObjectUrl),this.videoObjectUrl=null)}render(){return i.h("video",{autoplay:!0,src:this.videoObjectUrl,muted:!0,playsinline:!0,class:"scanbot-camera-view",ref:t=>{this.video=t},style:{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}}e.ScanbotCameraView=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ShutterButton=e.ShutterButtonProps=void 0;const r=o(n(4)),i=n(0);n(16);const s=o(n(5));e.ShutterButtonProps=class{};class a{constructor(t){this.lastTime=0,this.lastDuration=0,this.t=0,this.element=null,this.animationClass="",this.animationClass=t}setDuration(t){const e=Date.now()/1e3,n=e-this.lastTime;this.lastDuration&&(this.t+=n%this.lastDuration/this.lastDuration,this.t-=0|this.t);const o=-t*this.t;this.element&&(this.element.style.animationDuration=t+"s",this.element.style.animationDelay=o+"s",this.element.classList.remove(this.animationClass),this.element.offsetHeight,this.element.classList.add(this.animationClass)),this.lastTime=e,this.lastDuration=t}}class u extends r.default.Component{constructor(){super(...arguments),this.inner1=new a("scanbot-shutter-rotate"),this.inner2=new a("scanbot-shutter-rotate")}render(){return i.h("div",{className:"scanbot-shutter-button",onClick:this.props.onClick},this.captureBackground(),this.captureInnerCircle(),this.captureSearchingInner1(),this.captureSearchingInner2())}updateAnimationSpeed(t){"searching"==t?(this.inner1.setDuration(3),this.inner2.setDuration(2)):(this.inner1.setDuration(1.5),this.inner2.setDuration(.75))}componentDidMount(){this.updateAnimationSpeed(this.props.action)}componentDidUpdate(){this.updateAnimationSpeed(this.props.action)}captureBackground(){return this.svgBase(null,i.h("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M32 0c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32C14.327 64 0 49.673 0 32 0 14.327 14.327 0 32 0zm0 3C15.984 3 3 15.984 3 32s12.984 29 29 29 29-12.984 29-29S48.016 3 32 3z")))}captureInnerCircle(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"processing"==t||"manual"==t,"scanbot-shutter-fade-out":"searching"==t||"capturing"==t,"scanbot-shutter-pulse-fast":"processing"==t},i.h("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},i.h("circle",{cx:"32",cy:"32",r:"24",fill:this.props.color,fillRule:"nonzero"})))}captureSearchingInner1(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},i.h("g",{fill:"none",fillOpacity:"0.7",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M44.24 51.476a1 1 0 01-1.066-1.692A20.981 20.981 0 0053 32c0-11.598-9.402-21-21-21a1 1 0 010-2c12.703 0 23 10.297 23 23a22.98 22.98 0 01-10.76 19.476z")),t=>{this.inner1.element=t})}captureSearchingInner2(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},i.h("g",{fill:"none",fillOpacity:"0.4",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M46.624 35.35a1 1 0 01-1.95-.445C44.89 33.96 45 32.988 45 32c0-7.18-5.82-13-13-13a1 1 0 010-2c8.284 0 15 6.716 15 15 0 1.138-.127 2.26-.376 3.35z")),t=>{this.inner2.element=t})}path(t){return i.h("path",{fill:this.props.color,fillRule:"nonzero",d:t})}svgBase(t,e,n){return i.h("div",{class:s.default(t),ref:n},i.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64"},e))}}e.ShutterButton=u},function(t,e,n){var o=n(6),r=n(17);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var i={insert:"head",singleton:!1};o(r,i);t.exports=r.locals||{}},function(t,e,n){"use strict";n.r(e);var o=n(1),r=n.n(o)()(!1);r.push([t.i,"\n.scanbot-shutter-fade-in {\n opacity: 1;\n}\n\n.scanbot-shutter-fade-out {\n opacity: 0;\n}\n\n.scanbot-shutter-rotate {\n animation: scanbot-shutter-rotating linear infinite;\n}\n\n.scanbot-shutter-pulse-fast {\n animation: scanbot-shutter-pulsing 1s ease-in-out infinite;\n}\n\n.scanbot-shutter-button {\n position: relative;\n width: 64px;\n height: 64px;\n left: 50%;\n bottom: 12px;\n transform: translate(-50%, -100%);\n}\n\n.scanbot-shutter-button-part {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transition: opacity 0.5s ease-in-out;\n}\n\n@keyframes scanbot-shutter-rotating {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes scanbot-shutter-pulsing {\n 0% {\n opacity: 0.25;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 0.25;\n }\n}\n",""]),e.default=r},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBridge=void 0;const r=n(2);class i{constructor(){this.ASM_JS="ScanbotSDK.Core.js"}static initialize(t){return o(this,void 0,void 0,(function*(){const e=new i;if(t||(t=r.Constants.CDN_PATH),t+=e.ASM_JS,e.continuations={},e.isRemote(t)){const n=new Blob([`importScripts("${t}")`]);e.instance=new Worker(URL.createObjectURL(n))}else e.instance=new Worker(t);const n=e;return e.instance.onmessage=function(t){const{ticket:e,result:o,error:r}=t.data,{resolve:i,reject:s}=n.continuations[e];delete n.continuations[e],r?s(r):i(o)},e}))}post(t,e){return new Promise((n,o)=>{const r=Math.random().toString(36);this.continuations[r]={resolve:n,reject:o},this.instance.postMessage({command:t,args:e,ticket:r})})}isRemote(t){return-1!==t.indexOf("http")}}e.WorkerBridge=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LicenseInfo=void 0;class o{isValid(){return"Okay"===this.status}static fromJson(t){const e=new o;return e.status=t.licenseStatus,e.description=t.description,e}}e.LicenseInfo=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCode=void 0;class o{}e.ErrorCode=o,o.Default=-1,o.CameraPermissionDenied=100,o.NoCamera=101,o.UnsupportedBrowser=102,o.RequiresLocalhostOrHttps=103}]);

@@ -1,1 +0,1 @@

export default "1.0.1";
export default "1.0.2";
{
"name": "scanbot-web-sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "Scanbot Web Document Scanner SDK",

@@ -5,0 +5,0 @@ "keywords": [

@@ -10,3 +10,3 @@ # Web Document Scanner SDK

The Web SDK is based on Web Assembly and the HTML Media Capture API and can be used on iOS (Safari)
and Android (Chrome, Firefox, Samsung Internet).
and Android (Chrome, Firefox, Edge).

@@ -13,0 +13,0 @@

// Main entry point for webpack-based projects
// require('scanbot-web-sdk') resolves to this file, which automatically copies the web-worker and webassembly files using file-loader
var ScanbotSDK = module.exports = require('./component/scanbot-sdk')
const ScanbotSDK = module.exports = require('./component/scanbot-sdk');
require('!!file-loader?name=ScanbotSDK.Core.js!./bundle/ScanbotSDK.Core.js');

@@ -9,4 +9,4 @@

// which prevents .wasm files from being used with file-loader
var path = require('!!file-loader?name=ScanbotSDK.Asm.wasm!./bundle/ScanbotSDK.Asm.wasm-webpack-file-loader');
const path = require('!!file-loader?esModule=false&name=ScanbotSDK.Asm.wasm!./bundle/ScanbotSDK.Asm.wasm-webpack-file-loader');
ScanbotSDK.default.defaultEnginePath = path.split('/').slice(0, -1).join('/') + '/'
ScanbotSDK.default.defaultEnginePath = path.split('/').slice(0, -1).join('/') + '/';
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc